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
Spawns a bot into existence based on a given class name.
void spawnBot( String className, String messager ) { spawnBot( className, null, null, messager); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void spawnBot( String className, String login, String password, String messager ) {\n CoreData cdata = m_botAction.getCoreData();\n long currentTime;\n\n String rawClassName = className.toLowerCase();\n BotSettings botInfo = cdata.getBotConfig( rawClassName );\n\n if( botInfo == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"That bot type does not exist, or the CFG file for it is missing.\" );\n return;\n }\n\n Integer maxBots = botInfo.getInteger( \"Max Bots\" );\n Integer currentBotCount = m_botTypes.get( rawClassName );\n\n if( maxBots == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"The CFG file for that bot type is invalid. (MaxBots improperly defined)\" );\n return;\n }\n\n if( login == null && maxBots.intValue() == 0 ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Bots of this type are currently disabled on this hub. If you are running another hub, please try from it instead.\" );\n return;\n }\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( rawClassName, currentBotCount );\n }\n\n if( login == null && currentBotCount.intValue() >= maxBots.intValue() ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Maximum number of bots of this type (\" + maxBots + \") has been reached.\" );\n return;\n }\n\n String botName, botPassword;\n currentBotCount = new Integer( getFreeBotNumber( botInfo ) );\n\n if( login == null || password == null ) {\n botName = botInfo.getString( \"Name\" + currentBotCount );\n botPassword = botInfo.getString( \"Password\" + currentBotCount );\n } else {\n botName = login;\n botPassword = password;\n }\n\n Session childBot = null;\n\n try {\n // FIXME: KNOWN BUG - sometimes, even when it detects that a class is updated, the loader\n // will load the old copy/cached class. Perhaps Java itself is caching the class on occasion?\n if( m_loader.shouldReload() ) {\n System.out.println( \"Reinstantiating class loader; cached classes are not up to date.\" );\n resetRepository();\n m_loader = m_loader.reinstantiate();\n }\n\n Class<? extends SubspaceBot> roboClass = m_loader.loadClass( \"twcore.bots.\" + rawClassName + \".\" + rawClassName ).asSubclass(SubspaceBot.class);\n String altIP = botInfo.getString(\"AltIP\" + currentBotCount);\n int altPort = botInfo.getInt(\"AltPort\" + currentBotCount);\n String altSysop = botInfo.getString(\"AltSysop\" + currentBotCount);\n\n if(altIP != null && altSysop != null && altPort > 0)\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, altIP, altPort, altSysop, true);\n else\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, true);\n } catch( ClassNotFoundException cnfe ) {\n Tools.printLog( \"Class not found: \" + rawClassName + \".class. Reinstall this bot?\" );\n return;\n }\n\n currentTime = System.currentTimeMillis();\n\n if( m_lastSpawnTime + SPAWN_DELAY > currentTime ) {\n m_botAction.sendSmartPrivateMessage( messager, \"Subspace only allows a certain amount of logins in a short time frame. Please be patient while your bot waits to be spawned.\" );\n\n if( m_spawnQueue.isEmpty() == false ) {\n int size = m_spawnQueue.size();\n\n if( size > 1 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"There are currently \" + m_spawnQueue.size() + \" bots in front of yours.\" );\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"There is only one bot in front of yours.\" );\n }\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"You are the only person waiting in line. Your bot will log in shortly.\" );\n }\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" in queue to spawn bot of type \" + className );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader in queue to spawn bot of type \" + className );\n }\n\n String creator;\n\n if(messager != null) creator = messager;\n else creator = \"AutoLoader\";\n\n ChildBot newChildBot = new ChildBot( rawClassName, creator, childBot );\n addToBotCount( rawClassName, 1 );\n m_botStable.put( botName, newChildBot );\n m_spawnQueue.add( newChildBot );\n }", "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "ChildBot( String className, String creator, Session bot ) {\n m_bot = bot;\n m_creator = creator;\n m_className = className;\n }", "public GameManager(List<String> botNames){\n\t\tdeck = new Deck();\n\t\ttable = new Table();\n\t\tplayers = new ArrayList<Bot>();\n\t\t\n\t\t//create player objects via reflection\n\t\tfor (String botName : botNames){\n\t\t\ttry {\n\t\t\t\tplayers.add(newInstance(botName));\n\t\t\t} catch (ClassNotFoundException | NoSuchMethodException\t| InstantiationException | \n\t\t\t\t\tIllegalAccessException| IllegalArgumentException | InvocationTargetException e) {\n\t\t\t\t\t\tSystem.err.println(\"No such bot class found: \" + botName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "void listBots( String className, String messager ) {\n Iterator<ChildBot> i;\n ChildBot bot;\n String rawClassName = className.toLowerCase();\n\n if( rawClassName.compareTo( \"hubbot\" ) == 0 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"There is only one true master, and that is me.\" );\n } else if( getNumberOfBots( className ) == 0 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"No bots of that type.\" );\n } else {\n m_botAction.sendSmartPrivateMessage( messager, className + \":\" );\n\n for( i = m_botStable.values().iterator(); i.hasNext(); ) {\n bot = i.next();\n\n if( bot != null )\n if( bot.getClassName().compareTo( className ) == 0 )\n m_botAction.sendSmartPrivateMessage( messager, bot.getBot().getBotName() + \" (in \" + bot.getBot().getBotAction().getArenaName() + \"), created by \" + bot.getCreator());\n }\n\n m_botAction.sendSmartPrivateMessage( messager, \"End of list\" );\n }\n }", "@Override\n public String getName() {\n return \"sspawn:spawn\";\n }", "boolean registerType(SpawnType spawnType);", "Intent createNewIntent(Class cls);", "void spawnEntityAt(String typeName, int x, int y);", "private void createAgent(Class<?> clazz, String name) {\r\n try {\r\n // Fill description of an agent to be created\r\n CreateAgent ca = new CreateAgent();\r\n ca.setAgentName(name);\r\n ca.setClassName(clazz.getCanonicalName());\r\n ca.setContainer(container);\r\n\r\n Action act = new Action(getAMS(), ca);\r\n ACLMessage req = new ACLMessage(ACLMessage.REQUEST);\r\n req.addReceiver(getAMS());\r\n req.setOntology(ontology.getName());\r\n req.setLanguage(FIPANames.ContentLanguage.FIPA_SL);\r\n req.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n getContentManager().fillContent(req, act);\r\n \r\n // AMS sends a response, \r\n addBehaviour(new AchieveREInitiator(this, req) {\r\n @Override\r\n protected void handleInform(ACLMessage inform) {\r\n logger.severe(\"Success\");\r\n }\r\n\r\n @Override\r\n protected void handleFailure(ACLMessage inform) {\r\n logger.severe(\"Failure\");\r\n }\r\n });\r\n } catch (CodecException | OntologyException e) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n PrintStream printer = new PrintStream(out);\r\n e.printStackTrace(printer);\r\n logger.severe(out.toString());\r\n }\r\n }", "public void spawnRobots() {\n\t\tString robotName\t= \"\";\n\t\tPlayer newPlayer\t= null;\n\t\tint numberOfRobots \t= 0;\n\t\tint robotsPerPlayer = server.getRobotsPerPlayer();\n\t\tint numberOfPlayers = server.getPlayerCount();\n\t\tint robotsPerLevel\t= server.getRobotsPerLevel();\n\t\t\n\t\t// calculate how many robots that should be spawned\n\t\trobotsPerPlayer = robotsPerPlayer *\n\t\t\t\t\t\t (robotsPerLevel * \n\t\t\t\t\t\t currentLevel);\n\t\t\n\t\tnumberOfRobots \t= robotsPerPlayer *\n\t\t\t\t\t\t numberOfPlayers;\n\t\t\n\t\tfor(int i = 0; i < numberOfRobots; i++) {\n\t\t\trobotName \t\t\t= \"Robot\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(robotName, \n\t\t\t\t\t\t\t\t \t\t\t PlayerType.Robot, \n\t\t\t\t\t\t\t\t \t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "private void createGame(String name){\n\n }", "@SuppressWarnings(\"unused\")\n public void run() {\n Iterator<String> i;\n String key;\n Session bot;\n ChildBot childBot;\n long currentTime = 0;\n long lastStateDetection = 0;\n int SQLStatusTime = 0;\n final int DETECTION_TIME = 5000;\n\n while( m_botAction.getBotState() != Session.NOT_RUNNING ) {\n if( SQLStatusTime == 2400 ) {\n SQLStatusTime = 0;\n m_botAction.getCoreData().getSQLManager().printStatusToLog();\n }\n\n try {\n currentTime = System.currentTimeMillis() + 1000;\n\n if( m_spawnQueue.isEmpty() == false ) {\n if( !m_spawnBots ) {\n childBot = m_spawnQueue.remove(0);\n\n if(childBot.getBot() != null) {\n m_botStable.remove( childBot.getBot().getBotName() );\n addToBotCount( childBot.getClassName(), (-1) );\n }\n\n if(childBot.getCreator() != null) {\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Bot failed to log in. Spawning of new bots is currently disabled.\");\n }\n\n m_botAction.sendChatMessage( 1, \"Bot of type \" + childBot.getClassName() + \" failed to log in. Spawning of new bots is currently disabled.\");\n\n } else if( m_lastSpawnTime + SPAWN_DELAY < currentTime ) {\n childBot = m_spawnQueue.remove( 0 );\n bot = childBot.getBot();\n\n bot.start();\n\n while( bot.getBotState() == Session.STARTING ) {\n Thread.sleep( 5 );\n }\n\n if( bot.getBotState() == Session.NOT_RUNNING ) {\n removeBot( bot.getBotName(), \"log in failure; possible bad login/password\" );\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Bot failed to log in. Verify login and password are correct.\" );\n m_botAction.sendChatMessage( 1, \"Bot of type \" + childBot.getClassName() + \" failed to log in. Verify login and password are correct.\" );\n } else {\n if(childBot.getCreator() != null) {\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Your new bot is named \" + bot.getBotName() + \".\" );\n m_botAction.sendChatMessage( 1, childBot.getCreator() + \" spawned \" + childBot.getBot().getBotName() + \" of type \" + childBot.getClassName() );\n } else\n m_botAction.sendChatMessage( 1, \"AutoLoader spawned \" + childBot.getBot().getBotName() + \" of type \" + childBot.getClassName() );\n }\n\n m_lastSpawnTime = currentTime;\n }\n }\n\n // Removes bots that are no longer running.\n if( lastStateDetection + DETECTION_TIME < currentTime ) {\n for( i = m_botStable.keySet().iterator(); i.hasNext(); ) {\n key = i.next();\n childBot = m_botStable.get( key );\n\n if( childBot.getBot().getBotState() == Session.NOT_RUNNING && key != null) {\n String removalStatus = removeBot( key );\n\n if( key == null )\n m_botAction.sendChatMessage( 1, \"NOTICE: Unknown (null) bot disconnected without being properly released from stable.\" );\n else\n m_botAction.sendChatMessage( 1, key + \"(\" + childBot.getClassName() + \") \" + removalStatus + \".\" );\n\n childBot = null;\n }\n }\n\n lastStateDetection = currentTime;\n }\n\n SQLStatusTime++;\n Thread.sleep( 1000 );\n } catch( ConcurrentModificationException e ) {\n //m_botAction.sendChatMessage( 1, \"Concurrent modification. No state detection done this time\" );\n } catch( Exception e ) {\n Tools.printStackTrace( e );\n }\n }\n }", "@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}", "@Test\n public void botPlay() {\n Bot.randomBot(0);\n }", "@Override\n\tpublic void spawn(Location loc) {\n\t\t\n\t}", "public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "public void spawnEnemy(Location location) {\r\n\t\t\tlocation.addNpc((Npc) this.getNpcSpawner().newObject());\r\n\t\t}", "public void spawn(boolean type)\n\t{\n\t\tif (type)\n\t\t{\n\t\t\triver[findEmpty()] = new Bear();\n\t\t}\n\t\telse\n\t\t{\n\t\t\triver[findEmpty()] = new Fish();\n\t\t}\n\t}", "Bot getBotBySwapbotUsername(String username) throws CantGetBotException;", "void startNewGame(String playerName, String gameType) throws GameServiceException;", "public void executeBot(){\n if(botSignal){\n if(bot != null){\n bot.execute();\n }\n }\n botSignal=false;\n }", "private Role createRole( String className, Agent agent ) {\n// System.out.println(\"Attempting to create class \" + className);\n Class cl = null;\n try {\n cl = Class.forName( \"tns.roles.\" + className );\n } catch ( ClassNotFoundException e ) {\n System.err.println( \"Can't find your darned class.\" );\n System.exit( 0 );\n } // end try-catch\n\n Constructor c = null;\n Object o = null;\n try {\n c = cl.getConstructor(new Class[] {Agent.class});\n o = c.newInstance(new Object[] {agent});\n } catch (NoSuchMethodException e) {\n System.err.println(\"Can't find you class' constructor.\");\n System.exit(0);\n } catch (SecurityException e) {\n System.err.println(\"Security Exception. Can't access your class.\");\n System.exit(0);\n } catch ( InstantiationException e ) {\n System.err.println( \"Can't make your darned class.\" );\n System.exit( 0 );\n } catch ( IllegalAccessException e ) {\n System.err.println( \"Can't access your darned class.\" );\n System.exit( 0 );\n } catch (IllegalArgumentException e) {\n System.err.println(\"Can't create your class. Illegal arguments.\");\n System.exit(0);\n } catch (InvocationTargetException e) {\n System.err.println(\"Can't create your class. Contructor threw an exception.\");\n System.exit(0);\n } // end try-catch\n\n return (Role)o;\n\n }", "public void control(Spawn spawn) {}", "BotQueue( ThreadGroup group, BotAction botAction ) {\n super( group, \"BotQueue\" );\n repository = new Vector<File>();\n m_group = group;\n m_lastSpawnTime = 0;\n m_botAction = botAction;\n directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( \"Core Location\" ));\n\n int delay = m_botAction.getGeneralSettings().getInt( \"SpawnDelay\" );\n\n if( delay == 0 )\n SPAWN_DELAY = 20000;\n else\n SPAWN_DELAY = delay;\n\n if ( m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"localhost\") ||\n m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"127.0.0.1\"))\n SPAWN_DELAY = 100;\n\n resetRepository();\n\n m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() );\n m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() );\n m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() );\n\n m_botTypes.put( \"hubbot\", new Integer( 1 ));\n\n if( repository.size() == 0 ) {\n Tools.printLog( \"There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?\" );\n } else {\n System.out.println( \"Looking through \" + directory.getAbsolutePath()\n + \" for bots. \" + (repository.size() - 1) + \" child directories.\" );\n System.out.println();\n System.out.println(\"=== Loading bots ... ===\");\n }\n\n m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() );\n }", "public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }", "void forceSpawn() throws SpawnException;", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "private void launchCreateGame() {\n\t\tString name = nameText.getText().toString();\n\t\tString cycle = cycleText.getText().toString();\n\t\tString scent = scentText.getText().toString();\n\t\tString kill = killText.getText().toString();\n\t\t\n\t\tif (name.equals(\"\")){\n\t\t\tname = defaultName;\n\t\t} \n\t\tif (cycle.equals(\"\")) {\n\t\t\tcycle = \"720\";\n\t\t} \n\t\tif (scent.equals(\"\")) {\n\t\t\tscent = \"1.0\";\n\t\t}\n\t\tif (kill.equals(\"\")) {\n\t\t\tkill = \".5\";\n\t\t}\n\t\t\n\t\t\t\n\t\tAsyncJSONParser pewpew = new AsyncJSONParser(this);\n\t\tpewpew.addParameter(\"name\", name);\n\t\tpewpew.addParameter(\"cycle_length\", cycle);\n\t\tpewpew.addParameter(\"scent_range\", scent);\n\t\tpewpew.addParameter(\"kill_range\", kill);\n\t\tpewpew.execute(WerewolfUrls.CREATE_GAME);\n\t\t\n\t\tsetProgressBarEnabled(true);\n\t\tsetErrorMessage(\"\");\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "@SuppressWarnings(\"unchecked\")\n public static <T extends CommandBase> T getFromName(String cmdName,\n Class<T> cmdClass) throws CommandNotFoundException {\n T cmd = null;\n try {\n Method getFullClassName = cmdClass.getMethod(\"getFullClassName\", String.class);\n cmdName = (String)getFullClassName.invoke(null, cmdName);\n\n Class<?> specificClass = Class.forName(cmdName);\n cmd = (T) specificClass.newInstance();\n } catch (NoSuchMethodException e) {\n // Este tipo de erro nao pode passar em branco. Alguem esqueceu de implementar\n // o metodo estatico \"getFullClassName\" na superclasse de comando\n Logger.error(\"getFullClassName nao esta definifo - \" + cmdClass.getName());\n throw new RuntimeException(\"getFullClassName nao esta definido em \"\n + cmdClass.getName());\n } catch (Exception e) {\n // Qualquer outro problema durante a instanciacao do comando\n // e tratado como command not found\n Logger.error(\"Exception durante a criacao do comando!\", e);\n throw new CommandNotFoundException(e);\n }\n return cmd;\n }", "public void load() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n loader = HijackLoader.create(Language.ENGLISH, true);\n callback.call();\n } catch (Exception e) {\n e.printStackTrace();\n log(Bot.class, Level.SEVERE, \"Error loading bot!\");\n }\n initialized = true;\n log(Bot.class, \"Bot now active.\");\n\n while ((canvas = getCanvas()) == null) {\n Utils.sleep(1);\n }\n\n canvas.setBot(Bot.this);\n Utils.sleep(3000);\n inputHandler = new InputHandler(bot, canvas);\n }\n }).start();\n\n thread = new Thread(new Runnable() {\n @Override\n public void run() {\n while (true) {\n if (!scriptStack.isEmpty()) {\n final Script script = scriptStack.peek();\n if (script != null) {\n final ScriptContext context = script.getContext();\n if (context.randomEvents != null) {\n context.randomEvents.check();\n }\n if (script.isExitRequested()) {\n context.getBot().popScript();\n break;\n }\n if (!script.isPaused()) {\n long time = System.currentTimeMillis();\n if (time >= script.getNextExecutionTime()) {\n int delay = script.pulse();\n if (delay < 0)\n context.getBot().popScript();\n script.setNextExecutionTime(time + delay);\n }\n }\n\n try {\n if (script.getNextExecutionTime() > 0) {\n long sleep = script.getNextExecutionTime() - System.currentTimeMillis();\n if (sleep > 0)\n Thread.sleep(script.getNextExecutionTime()\n - System.currentTimeMillis());\n } else {\n Thread.sleep(500);\n }\n } catch (InterruptedException e1) {\n // ignore the exception, because interrupting is normal\n }\n }\n } else {\n Utils.sleep(5000);\n }\n }\n\n }\n });\n thread.setName(\"Bot-\" + getBotIndex());\n thread.start();\n }", "@SuppressWarnings(\"unused\")\n void spawn(Entity entity);", "private void handleCreateCommand() throws IOException,\r\n ClassNotFoundException,\r\n InstantiationException,\r\n IllegalAccessException {\r\n final String className = (String) m_in.readObject();\r\n Class klass = Class.forName(className, false, m_loader);\r\n final Object instance = klass.newInstance();\r\n final String handle = RemoteProxy.wrapInstance(instance);\r\n m_out.writeObject(handle);\r\n m_out.flush();\r\n }", "public void setBotName(String botName) {\n this.botName = botName;\n }", "public void addBot(int x, int y) {\n\t\tbots.add(new Bot(x, y, width, height, botSize, bots));\n\t}", "public static Unit generateDummy(String className)\r\n {\r\n try\r\n {\r\n //find constructor requiring no parameters\r\n Class classToCreate = Class.forName(\"TowerDefense.\"+className);\r\n Class[] params = {};\r\n Constructor constructor = classToCreate.getConstructor(params);\r\n \r\n //create instance of object using found constructor\r\n Object[] argList = {};\r\n return (Tower)constructor.newInstance(argList);\r\n }\r\n catch (Exception e)\r\n {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}", "Bot getBotByBotId(String botId) throws CantGetBotException;", "void joinGame(String playeruuid);", "public void runit(String class_name)\n {\n runit(class_name, null);\n }", "private void sendGameCommand(){\n\n }", "public void requestBot(String s) {\n\t\tLEDManager.requestConnection(s);\n\t}", "@Override\n\tpublic void execute() throws InstantiationException,\n\t\t\tIllegalAccessException, ClassNotFoundException, IOException {\n\t\tBuilding building = (Building) Class.forName(\n\t\t\t\tConstant.TILE_PACKAGE + commandData.get(\"tileName\"))\n\t\t\t\t.newInstance();\n\t\tbuilding.setX((Integer) commandData.get(\"pointX\"));\n\t\tbuilding.setY((Integer) commandData.get(\"pointY\"));\n\t\tbuilding.setTileManager(tileManager);\n\t\tbuilding.setFocusManager(focusManager);\n\t\tbuilding.setUUID((UUID) commandData.get(\"focusID\"));\n\t\tbuilding.initBuildingImage((String) commandData.get(\"buildingName\"));\n\t\ttileManager.addTile((Tile) building);\n\t}", "public void kickStart() {\n startLobby();\n }", "SpawnType getLobbySpawnType();", "SpawnController createSpawnController();", "public void spawnRubble() {\n\t\tString rubbleName \t= \"\";\n\t\tPlayer newPlayer \t= null; \n\t\tint numberOfRubble \t= server.getRubbleCount();\n\t\t\n\t\tfor(int i = 0; i < numberOfRubble; i++) {\n\t\t\trubbleName = \"Rubble\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(rubbleName, \n\t\t\t\t\t\t\t\t\t\t\t PlayerType.Rubble, \n\t\t\t\t\t\t\t\t\t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "NamedClass createNamedClass();", "public void gameSetupSinglePlayer(boolean botMode) {\r\n\t\tthis.screen = new Screen(this); //creazione schermo di gioco\r\n\t\tthis.botMode = botMode;\r\n\t\t\r\n\t\tint n;\r\n\t\t\r\n\t\tif(botMode) n = 2; \r\n\t\telse n = 1;\r\n\t\t\t\t\r\n\t\tscreen.setNumberOfPlayers(n);\r\n\t\tfor (int i=0; i<n; i++) {\r\n\t\t\tplayers.add(new Player());\r\n\t\t}\r\n\t\t\r\n\t\tscreen.addPlayers(players);\r\n\t\t//screen.start();\r\n\t\tscreen.setLevel(level);\r\n\t\tscreen.setMusic(music);\r\n\t\t\r\n\t\tgameFrame.add(screen);\r\n\t\tgameFrame.requestFocusInWindow();\r\n\r\n\t\t// aggiungo controllo da tastiera\r\n\t\tgameFrame.addKeyListener(players.get(0).getInputHandler());\r\n\t\tgameFrame.pack();\r\n\t\tgameFrame.setVisible(true);\r\n\t\t\t\t\r\n\t\t// avvio ciclo di gioco\r\n\t\tnew Thread(screen).start();\r\n\t\tscreen.setVisible(true);\r\n\t}", "@Override\n\t\t\tpublic void Execute()\n\t\t\t{\n\t\t\tSquare square = (Square) receiver;\n\t\t\t// The args for SpawnBuildingCommand are the X,Y coordinate for the Building used by the factory, \n\t\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\t\tSystem.out.println(\"Spawning Building at (\" + args[0] + \",\" + args[1] + \")\");\n\t\t\tsquare.Add(factory.MakeBuilding());\n\t\t\tGameBoard.Instance().IncrementBuildingCount();\n\t\t}", "public void agregarRobot(String nombre);", "private void launchSingle(String name) {\n Intent sing = new Intent(homeActivity.this, cardsMenu.class);\n Bundle b = new Bundle();\n b.putString(\"key\",\"single\"); //pass along that this will be a single player multigame\n b.putString(\"name\",name); //pass the player's name\n //b.putString(\"State\", State); //pass along the game type\n sing.putExtras(b);\n startActivity(sing);\n }", "public boolean allowBotSpawn(boolean allowSpawning) {\n if(m_spawnBots == allowSpawning) {\n return false;\n }\n\n m_spawnBots = allowSpawning;\n return true;\n }", "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "private void startSpawning()\n {\n MAUtils.setSpawnFlags(plugin, world, 1, allowMonsters, allowAnimals);\n \n // Start the spawnThread.\n spawnThread = new MASpawnThread(plugin, this);\n spawnTaskId = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, spawnThread, waveDelay, (!waveClear) ? waveInterval : 60);\n }", "public static void spawn(String spawnName, Player player) {\n World w = Bukkit.getWorld(FileManager.getSpawnYml().getString(\"Spawns.\" + spawnName + \".world\"));\n Double x = FileManager.getSpawnYml().getDouble(\"Spawns.\" + spawnName + \".x\");\n Double y = FileManager.getSpawnYml().getDouble(\"Spawns.\" + spawnName + \".y\");\n Double z = FileManager.getSpawnYml().getDouble(\"Spawns.\" + spawnName + \".z\");\n int ya = FileManager.getSpawnYml().getInt(\"Spawns.\" + spawnName + \".yaw\");\n int pi = FileManager.getSpawnYml().getInt(\"Spawns.\" + spawnName + \".pitch\");\n Location spawnLoc = new Location(w, x, y, z, ya, pi);\n player.teleport(spawnLoc);\n if (Main.plugin.getConfig().getString(\"NOTIFICATIONS.Spawn\").equalsIgnoreCase(\"True\")) {\n String msg = MessageManager.getMessageYml().getString(\"Spawn.Spawn\");\n player.sendMessage(MessageManager.getPrefix() + ChatColor.translateAlternateColorCodes('&', msg));\n }\n }", "public void createClassObjects(String input) {\n // Find target\n if (input.matches(\".* (announcement|session|assignment) for.*\")) {\n String target = substr(input, \"for (\\\\S*)\\\\s?\");\n\n // Obtain the class here\n // If no target is found\n if (target == null || target == \"\") {\n System.out.println(\"No class found\");\n replyChat(\"This class does not exist.\");\n return;\n }\n\n if (input.matches(\".*(announcement).*\")) {\n System.out.println(\"Create an announcement for \" + target);\n } else if (input.matches(\".*(session).*(today)\")) {\n System.out.println(\"Create a session for \" + target);\n\n // Get today's date\n input = input.trim();\n String date = \"\";\n boolean processDate = true;\n try {\n // Convert date to a string that can be read by <input> tags\n DateTimeFormatter dateFmt = DateTimeFormat.forPattern(\"YYYY-MM-dd\");\n date = new DateTime().toString(dateFmt);\n } catch (Exception e) {\n System.out.println(\"Invalid date\");\n processDate = false;\n }\n\n if (processDate) {\n addCreateSession(target, date, null);\n } else {\n // No date\n addCreateSession(target, null, null);\n }\n\n // Get optional time (must be a range)\n // if(input.matches(\".*(between|from) (.*) (and|to|until) (.*)\"))\n } else if (input.matches(\".*(session).*\")) {\n System.out.println(\"Create a session for \" + target);\n\n // Get optional date\n input = input.trim();\n String dateInput = substr(input, \".*on (.*)\");\n dateInput = dateInput != null ? dateInput.trim() : \"\";\n String date = \"\";\n boolean processDate = true;\n try {\n // Convert date to a string that can be read by <input> tags\n DateTimeFormatter dateFmt = DateTimeFormat.forPattern(\"YYYY-MM-dd\");\n date = new DateTime(Quick.getDate(dateInput)).toString(dateFmt);\n } catch (Exception e) {\n System.out.println(\"Invalid date\");\n processDate = false;\n }\n\n if (processDate) {\n addCreateSession(target, date, null);\n } else {\n // No date\n addCreateSession(target, null, null);\n }\n } else if (input.matches(\".*(assignment).*\")) {\n\n // Detect ID and name\n String title = substr2(input, \".*(named|titled|name|title) [\\\"\\']([^\\']*)[\\\"\\']\") != null && !substr2(input, \".*(named|titled|name|title) [\\\"\\']([^\\']*)[\\\"\\']\").trim().isEmpty() ? substr2(input, \".*(named|titled|name|title) [\\\"\\']([^\\']*)[\\\"\\']\") : substr2(input, \".*(named|titled|name|title) (\\\\S*)\\\\s?\");\n String description = substr2(input, \".*(message|description) [\\\"\\']([^\\']*)[\\\"\\']\") != null && !substr2(input, \".*(message|description) [\\\"\\']([^\\']*)[\\\"\\']\").trim().isEmpty() ? substr2(input, \".*(message|description) [\\\"\\']([^\\']*)[\\\"\\']\") : substr2(input, \".*(message|description) (\\\\S*)\\\\s?\");\n\n System.out.println(title);\n\n System.out.println(title.trim().isEmpty());\n // If ID provided\n if (title != null && !title.trim().isEmpty()) {\n\n // And name as well\n if (description != null && !description.trim().isEmpty()) {\n addCreateAssignment(target, title, description);\n } else {\n addCreateAssignment(target, title, null);\n }\n } // If name only\n else if (description != null && !description.trim().isEmpty()) {\n addCreateAssignment(target, null, description);\n } else {\n addCreateAssignment(target, null, null);\n }\n } else {\n System.out.println(\"Sorry, I don't understand\");\n replyChat(\"This class does not exist.\");\n }\n }\n\n }", "PlayerBean create(String name);", "public void newQuest(String name) {\n\t\t//Prevent NullPointerExcpetions\n\t\tif (name == null) {\n\t\t\tbakeInstance.getLogger().info(\"[Bake] Null name for new generated quest. Falling back to default quest selection.\");\n\t\t\tnewQuest();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (QuestCfg.getString(\"quests.\" + name + \".type\", \"N/A\").equals(\"N/A\")) {\n\t\t\tbakeInstance.getLogger().info(\"[Bake] Invalid name (\" + name + \") for new generated quest. Falling back to default quest selection.\");\n\t\t\t//Invalid quest name\n\t\t\tnewQuest();\n\t\t} else {\n\t\t\t//Valid quest name\n\t\t\tactiveQuest = new Quest(QuestCfg, name);\n\t\t}\n\t}", "public void spawnBoss(Vector2 spawnPosition) {\n\n Foe newBoss = new Foe(getController(), spawnPosition, \"boss\", 3.5f, new IABoss(getController()));\n newBoss.initialize();\n newBoss.setPlayerCanKill(false);\n newBoss.setFixedFacing(true);\n\n getController().getStage().registerActor(newBoss);\n }", "public interface BuildStrategy {\n\n public void execute(GameSession session, int village) throws InterruptedException;\n\n}", "private Class<?> getNMSClass(String name) {\n\t\tString version = Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n\t\ttry {\n\t\t\treturn Class.forName(\"net.minecraft.server.\" + version + \".\" + name);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n try {\n Bot bot = new Bot(TOKEN, PREFIX);\n } catch (LoginException exception) {\n exception.printStackTrace();\n }\n }", "public interface CommandFactory {\n ICommand create(Class<? extends ICommand> klass);\n}", "int registerPlayer(String name, ITankGameGUI application, boolean singlePlayerMode) throws Exception;", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tSystem.out.println(\"Welcome to ChatBot. Choose the personality of your new friend:\");\n\t\tSystem.out.println(\"Sarcastic\");\n\t\tSystem.out.println(\"Enthusiastic\");\n\t\tSystem.out.println(\"Depressed\");\n\t\tString personality = in.nextLine();\n\t\t\n\t\t// creates the chatbot. \n\t\t// notice what it is declared as vs what it is defined as.\n\t\tChatBot bot;\n\t\tif (personality.equalsIgnoreCase(\"Sarcastic\"))\n\t\t\tbot = new SarcasticBot();\n\t\telse if (personality.equalsIgnoreCase(\"Enthusiastic\"))\n\t\t\tbot = new EnthusiasticBot();\n\t\telse\n\t\t\tbot = new DepressedBot();\n\t\t\n\t\t// runs a structured conversation between the user and the chatbot\n\t\tbot.sayHi();\n\t\tString hello = in.nextLine();\n\t\tbot.startConversation();\n\t\tString convo = in.nextLine();\n\t\tbot.askFirstQuestion();\n\t\tString answer1 = in.nextLine();\n\t\tbot.askSecondQuestion();\n\t\tString answer2 = in.nextLine();\n\t\tbot.askThirdQuestion();\n\t\tString answer3 = in.nextLine();\n\t\tbot.sayBye();\n\t\tin.close();\n\t}", "private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }", "public static void main(String[] args) throws ClassNotFoundException {\n Class.forName(\"Mgr01\");\n }", "private void verifyClassName() {\n\t\t\n\t\tif (classNameTF.getText().isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Class Name\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tClass newClass = new Class(classNameTF.getText());\n\t\t\tteacher.addClass(newClass);\n\t\t\ttAddClassWindow.dispose();\n\t\t\ttPortalWindow.dispose();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t}", "public static void createNPC() {\n //create the good npc\n BSChristiansen.setName(\"BS_Christiansen\");\n BSChristiansen.setCurrentRoom(jungle);\n BSChristiansen.setDescription(\"The survivor of the plane crash look to be some kind of veteran soldier, \"\n + \"\\nbut he is heavly injured on his right leg so he cant move \");\n BSChristiansen.addDialog(\"If you want to survive on this GOD forsaken island, you \\nmust first find food and shelter.\"\n + \"\\nYou can craft items to help you survive, if you \\nhave the right components.\");\n BSChristiansen.addDialog(\"To escape the island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n\n //create the bad npc\n josephSchnitzel.setName(\"Joseph_Schnitzel\");\n josephSchnitzel.setCurrentRoom(mountain);\n josephSchnitzel.setDescription(\"A lonely surviver with very filthy hair, and a wierd smell of weinerschnitzel.\");\n josephSchnitzel.addDialog(\"Heeelloooo there my freshlooking friend, I am Joseph\\nSchnitzel, if you scratch my back I might scratch your's.\" + \"\\n\" + \"Go fetch me some eggs, or I'll kill you\");\n josephSchnitzel.addDialog(\"Talks to himself\\nis that muppet still alive\");\n josephSchnitzel.addDialog(\"Talks to himself\\nHow long is he going to last\");\n josephSchnitzel.addDialog(\"Talks to himself\\nI wonder what those noises were ing the cave\");\n josephSchnitzel.addDialog(\"GET THE HELL OUT OF MY WAY!!!\");\n josephSchnitzel.setDamageValue(100);\n\n //create another npc\n mysteriousCrab.setName(\"Mysterious_Crab\");\n mysteriousCrab.setCurrentRoom(cave);\n mysteriousCrab.setDescription(\"A mysterious crab that you dont really get why can talk\");\n mysteriousCrab.addDialog(\"MUHAHAHA i'm the finest and most knowledgeable \\ncrab of them all mr.Crab and know this island\\nlike the back of my hand! oh i mean claw...\"\n + \"\\nA Random fact: \"\n + \"to escape this island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n }", "public static void main(String[] args)\n {\n Pokeball pokeball = new Pokeball();\n Pokeball greatball = new Greatball();\n Pokeball ultraball = new Ultraball();\n Pokeball masterball = new Masterball();\n ArrayList<AbstractPokemon> ashPokemon = new ArrayList<AbstractPokemon>();\n ashPokemon.add(new Charmander());\n ashPokemon.add(new Squirtle());\n ashPokemon.add(new Bulbasaur());\n PokemonTrainer ash = new PokemonTrainer(\"Ash\", ashPokemon, AbstractPokemon.Type.ANY_TYPE, masterball);\n ActorWorld world = new ActorWorld();\n AbstractPokemon charmander = new Charmander();\n AbstractPokemon squirtle = new Squirtle();\n AbstractPokemon bulbasaur = new Bulbasaur();\n AbstractPokemon vulpix = new Vulpix();\n AbstractPokemon poliwhirl = new Poliwhirl();\n AbstractPokemon sunkern = new Sunkern();\n AbstractPokemon magby = new Magby();\n AbstractPokemon magikarp = new Magikarp();\n AbstractPokemon oddish = new Oddish();\n String[] worldChoices = {\"Randomly Generated\", \"Blank\", \"Cancel\"};\n int worldSelection = JOptionPane.showOptionDialog(null, \"Please select the world template:\", \"World Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, worldChoices, worldChoices[0]);\n if (worldSelection == 2)\n {\n JOptionPane.showMessageDialog(null, \"No world chosen. Program will terminate.\", \"World Selection\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (worldSelection == 0)\n {\n spawn(charmander, world);\n spawn(squirtle, world);\n spawn(bulbasaur, world);\n spawn(vulpix, world);\n spawn(poliwhirl, world);\n spawn(sunkern, world);\n spawn(magby, world);\n spawn(magikarp, world);\n spawn(oddish, world);\n spawn(ash, world);\n }\n world.show();\n }", "public void action(BotInstance bot, Message message);", "public static void startInternalBots(boolean visualize) {\n\t\tConfig config = new Config();\n\t\t\n\t\tconfig.bot1Init = \"internal:conquest.bot.BotStarter\";\n\t\tconfig.bot2Init = \"internal:conquest.bot.BotStarter\";\n\t\t\t\t\n\t\tconfig.visualize = visualize;\n\t\t\n\t\tconfig.replayLog = new File(\"./replay.log\");\n\t\t\n\t\tRunGame run = new RunGame(config);\n\t\tGameResult result = run.go();\n\t\t\n\t\tSystem.exit(0);\n\t}", "public static void startProcessBots(boolean visualize) {\n\t\tConfig config = new Config();\n\t\t\n\t\tconfig.bot1Init = \"process:java -cp bin conquest.bot.BotStarter\";\n\t\tconfig.bot2Init = \"dir;process:./bin;java conquest.bot.BotStarter\";\n\t\t\t\t\n\t\tconfig.visualize = visualize;\n\t\t\n\t\tconfig.replayLog = new File(\"./replay.log\");\n\t\t\n\t\tRunGame run = new RunGame(config);\n\t\tGameResult result = run.go();\n\t\t\n\t\tSystem.exit(0);\n\t}", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public void newQuest() {\n\t\tList <String> quests;\n\t\tif (activeQuest == null) {\n\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t} else {\n\t\t\tquests = activeQuest.getSuccessors();\n\t\t\tif (quests == null) {\n\t\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t\t}\n\t\t}\n\t\tbakeInstance.getLogger().info(\"[BAKE] Choosing new quest. Quests available: \" + quests.toString());\n\t\tint questID = (int) Math.round(Math.random()*(quests.size()-1));\n\t\tactiveQuest = new Quest(QuestCfg, quests.get(questID));\n\t}", "MiniBotXboxInputEventHandler(String _botName) {\n botName = _botName;\n }", "public void createInstance(String className, String instanceName)\r\n\t{\r\n\t\t\r\n\t\tOntClass c = obtainOntClass(className);\r\n\t\t\r\n\t\tString longName;\r\n\t\tif(instanceName.contains(\"#\"))\r\n\t\t\tlongName = instanceName;\r\n\t\tif(instanceName.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(instanceName);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + instanceName;\r\n\t\t\r\n\t\tc.createIndividual(longName);\r\n\t}", "public void win()\r\n {\n Actor win;\r\n win=getOneObjectAtOffset(0,0,Goal.class);\r\n if (win !=null)\r\n {\r\n World myWorld=getWorld();\r\n Congrats cong=new Congrats();\r\n myWorld.addObject(cong,myWorld.getWidth()/2,myWorld.getHeight()/2); //(Greenfoot,2013) \r\n \r\n Greenfoot.stop();\r\n Greenfoot.playSound(\"finish.wav\"); //(Sound-Ideas,2014)\r\n \r\n }\r\n }", "public static void createCritter(String critter_class_name)\n throws InvalidCritterException {\n //does the desired critter class exist????\n Class<?> myCritClass;\n try {\n myCritClass = Class.forName(myPackage+\".\"+critter_class_name);\n if(!Critter.class.isAssignableFrom(myCritClass)) {\n throw new InvalidCritterException(critter_class_name);\n }\n } catch (ClassNotFoundException e) {\n throw new InvalidCritterException(critter_class_name);\n }\n\n //init the critters data and check for collisions\n try {\n //set the critters position and energy\n Critter critterToAdd = (Critter)(myCritClass.newInstance());\n critterToAdd.x_coord = getRandomInt(Params.WORLD_WIDTH);\n critterToAdd.y_coord = getRandomInt(Params.WORLD_HEIGHT);\n critterToAdd.energy = Params.START_ENERGY;\n\n //if two critters collide on spawning then their fight is done on the next time step\n\n population.add(critterToAdd);\n } catch (InstantiationException | IllegalAccessException e) {\n throw new InvalidCritterException(critter_class_name);\n }\n }", "void hardRemoveAllBotsOfType( String className, String initiator ) {\n String rawClassName = className.toLowerCase();\n Integer numBots = m_botTypes.get( rawClassName );\n LinkedList<String> names = new LinkedList<String>();\n\n for( ChildBot c : m_botStable.values() )\n if( c != null ) {\n if(c.getClassName().equals( rawClassName ))\n names.add( c.getBot().getBotName() );\n }\n\n for( String name : names ) {\n removeBot( name, \"!removetype by \" + initiator );\n m_botAction.sendChatMessage( 1, name + \" logged off. (!removetype initiated.)\" );\n }\n\n if( numBots != null && numBots.intValue() != 0 )\n m_botTypes.put( rawClassName, new Integer(0) );\n }", "public static void main(String[] args) {\n BackgroundBot bg = new BackgroundBot();\n try {\n while(true) {\n bg.getAnswer();\n Thread.sleep(5000);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@SuppressWarnings({\"unchecked\"})\n // Must be synchronized for the Maven Parallel Junit runner to work\n public static synchronized <T> T instantiate(String className, ClassLoader classLoader) {\n try {\n return (T) Class.forName(className, true, classLoader).getDeclaredConstructor().newInstance();\n } catch (Exception e) {\n throw new FlywayException(\"Unable to instantiate class \" + className + \" : \" + e.getMessage(), e);\n }\n }", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "private void openNewActivity(Class<RegisterActivity> class_argument) {\r\n Intent intent = new Intent(this, class_argument);\r\n startActivity(intent);\r\n }", "public static void main(String[] asd){\nHuman bob = new Human(\"steve\");\nHuman b = new Human(\"chris\");\nHuman bb = new Human(\"nick\");\n\t\t\t//2. create a new Robot army of good and evil robots.\nRobot a = new Robot(\"dog\",true);\nRobot d = new Robot(\"og\",false);\nRobot c = new Robot(\"g\",false);\n\t\t\t\n\t\t\t//3. command your robot to destroy a huma\na.destroy(bb);\n\t\t}", "int getNumberOfBots( String className ) {\n Integer number = m_botTypes.get( className );\n\n if( number == null ) {\n return 0;\n } else {\n return number.intValue();\n }\n }", "private CompositeStrategyInterface getStrategyFromClass (String class_name) throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {\n\t\t\n\t \t\n \t// Reflection load of the class\n \tClass<?> c = Class.forName(\"es.um.dis.umutextstats.compositestrategies.\" + class_name);\n \t\n \t\n \t// Create the dimension\n \tCompositeStrategyInterface o = (CompositeStrategyInterface) c.getConstructor().newInstance();\n \t\n \treturn o;\n\t \t\n\t}", "Guild createGuild(long gameId, String title, String clanPrefix);", "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 Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "@Override\n public void logic() throws PogamutException {\n /*\n * Step:\n * 1. find the bot and approach him (get near him ... distance < 200)\n * 2. greet him by saying \"Hello!\"\n * 3. upon receiving reply \"Hello, my friend!\"\n * 4. answer \"I'm not your friend.\"\n * 5. and fire a bit at CheckerBot (do not kill him, just a few bullets)\n * 6. then CheckerBot should tell you \"COOL!\"\n * 7. then CheckerBot respawns itself\n * 8. repeat 1-6 until CheckerBot replies with \"EXERCISE FINISHED\"\n */\n Location loc = new Location(0, 0, 0);\n weaponry.changeWeapon(UT2004ItemType.ASSAULT_RIFLE);\n switch (state) {\n case 0: // navigate to random point\n if (!navigation.isNavigating())\n navigation.navigate(this.navPoints.getRandomNavPoint());\n if (players.canSeePlayers()) {\n loc = players.getNearestVisiblePlayer().getLocation();\n navigation.navigate(loc);\n log.info(\"Bot see player on \" + loc.toString());\n }\n if (loc.getDistance(bot.getLocation()) < 190) {\n navigation.stopNavigation();\n log.info(\"Bot is close enough\");\n state = 1;\n }\n if (congrats_receive) {\n log.info(\"Received info about success\");\n state = 7;\n }\n break;\n case 1: // nearby player\n this.sayGlobal(\"Hello!\");\n resetTimeout();\n state = 2;\n break;\n case 2: //waiting for answer\n tickTimeout();\n if (received.equals(\"Hello, my friend!\")) {\n log.info(\"Answer received\");\n state = 3;\n }\n else if (receiveTimeout) {\n log.warning(\"Answer didn't received, repeating.\");\n navigation.navigate(navPoints.getRandomNavPoint());\n state = 0;\n }\n break;\n case 3: // say back\n this.sayGlobal(\"I'm not your friend.\");\n state = 4;\n break;\n case 4:\n if (players.getNearestVisiblePlayer() == null) {\n log.warning(\"Resetting because no player in view\");\n state = 0;\n } else {\n shoot.shoot(players.getNearestVisiblePlayer());\n log.info(\"Start shooting at the enemy\");\n resetTimeout();\n state = 5;\n }\n break;\n case 5:\n tickTimeout();\n if (damaged) {\n shoot.stopShooting();\n damaged = false;\n resetTimeout();\n log.info(\"Enemy damaged\");\n state = 6;\n } else if (receiveTimeout) {\n log.warning(\"Resetting because not damage to the enemy\");\n state = 0;\n }\n break;\n case 6:\n tickTimeout();\n if (cool_received){\n log.info(\"Success in the turn, repeating\");\n cool_received = false;\n resetTimeout();\n state = 0;\n }\n else if(receiveTimeout) {\n log.warning(\"No final answer, repeating\");\n state = 0;\n }\n break;\n case 7:\n sayGlobal(\"I solved the exercise.\");\n }\n }", "@Override\n\tpublic void Execute()\n\t{\n\t\tGameBoard board = (GameBoard)receiver;\n\t\tSystem.out.println(\"Spawning shield at (\" + args[0] + \",\" + args[1] + \")\");\n\n\t\t//get the Square we want to decorate using its grid position x,y\n\t\tint x = Integer.parseInt(args[0]);\n\t\tint y = Integer.parseInt(args[1]);\n\t\tBoardComponent square = board.GetBoard().get(y).get(x);\n\n\t\t//singleton factory create shieldedSquare\n\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\tBoardComponent shieldedSquare = factory.MakeShield(square);\n\n\t\t//replace square with shieldedSquare inside board\n\t\tArrayList<BoardComponent> row = board.GetBoard().get(y);\n\t\trow.set(x,shieldedSquare);\n\n\t\t//Attach shield to Subject (note this also detaches the square and its children)\n\t\tshieldedSquare.Attach();\n\t}", "private void awaitT(){\n try {\n game.getBarrier().await(20, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (BrokenBarrierException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n trimBarrier();\n synchronized (lock){\n if(!botSignal){\n bot = new BotClient();\n new Thread(bot).start();\n botSignal = true;\n }\n\n }\n }\n }", "public int createBot(Bot bot) {\n final String insertQuery = \"INSERT INTO Bots (company_id, active_time, probability, activity_status) \" +\n \"VALUES (%d, %f, %f, TRUE);\";\n final String selectQuery = \"SELECT * FROM Bots WHERE company_id = %d ORDER BY created_at DESC LIMIT 1;\";\n final String successMessage = \"New bot with id %d has been created\";\n final String errorMessage = \"Error in creating bot for %s\";\n\n // Create the new bot for the specified company\n dbConnector.insertQuery(String.format(Locale.US, insertQuery, bot.getCompany().getCompanyId(), bot.getActiveTime(),\n bot.getProbability()));\n\n // Get the latest bot created for the specified company\n ResultSet verify = dbConnector.selectQuery(String.format(Locale.US, selectQuery, bot.getCompany().getCompanyId()));\n try {\n while (verify.next()) {\n int botId = verify.getInt(\"bot_id\");\n System.out.println(String.format(Locale.US, successMessage, botId));\n return botId;\n }\n } catch (SQLException e) {\n System.out.println(String.format(Locale.US, errorMessage, bot.getCompany().getCompanyId()));\n }\n return -1;\n }", "public void spawnFirstCreature(){\n\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\"))\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"antorc\"+spawnId);\n\t\t\n\t\t//Add new event into pool which will spawn the rest of the worms ( -1 because this method already spawned one )\n\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,spawnCount-1));\n\t}", "public void startGame(){\n\t\tIntent intent = new Intent(getApplicationContext(), AndroidLauncher.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n\t\tintent.putExtra(Bluetooth.PRIMARY_BT_GAME, String.valueOf(false));\n\t\tintent.putExtra(Bluetooth.SECONDARY_BT_GAME, String.valueOf(true));\n\t\tstartActivity(intent);\n\t}", "void createNewGame(Player player);", "public boolean isBot(){\n return false;\n }" ]
[ "0.7158125", "0.64861053", "0.5384915", "0.5376677", "0.5349362", "0.52913207", "0.5239962", "0.51804477", "0.5179637", "0.5169821", "0.5152667", "0.5138501", "0.51156414", "0.5064774", "0.5028997", "0.5017036", "0.5006259", "0.49970102", "0.49813467", "0.49707472", "0.4952213", "0.49489915", "0.49475783", "0.4940655", "0.49327993", "0.4894418", "0.48693076", "0.4868361", "0.48599917", "0.48562643", "0.48467612", "0.48382413", "0.48241624", "0.48209694", "0.48166957", "0.48146844", "0.48086923", "0.4798252", "0.4793847", "0.47913772", "0.47727957", "0.47689715", "0.47687677", "0.47681013", "0.47677392", "0.47665668", "0.47532126", "0.47312674", "0.47252026", "0.47244072", "0.47127762", "0.47116232", "0.470691", "0.4706801", "0.47026014", "0.46973452", "0.46886864", "0.46866724", "0.46855494", "0.46841273", "0.4677245", "0.4674936", "0.46728244", "0.4664697", "0.46566212", "0.46470422", "0.4634424", "0.4633857", "0.46262887", "0.4621601", "0.46213177", "0.4613734", "0.4612059", "0.45947745", "0.4594337", "0.45937455", "0.4591155", "0.45865744", "0.45818692", "0.45760447", "0.45727503", "0.45713222", "0.45694578", "0.45599762", "0.4552353", "0.45499346", "0.45459732", "0.45362094", "0.4525866", "0.45175597", "0.4515924", "0.45113462", "0.45055988", "0.45055503", "0.45036763", "0.4502693", "0.45011652", "0.4501048", "0.44994143", "0.44982964" ]
0.7400824
0
Spawns a bot into existence based on a given class name. In order for the bot to be spawned, the class must exist, and the CFG must exist and be properly formed. Additionally, if a "force spawn" is not being performed, the maximum number of bots of the type allowed must be less than the number currently active.
void spawnBot( String className, String login, String password, String messager ) { CoreData cdata = m_botAction.getCoreData(); long currentTime; String rawClassName = className.toLowerCase(); BotSettings botInfo = cdata.getBotConfig( rawClassName ); if( botInfo == null ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn bot of type " + className + ". Invalid bot type or missing CFG file." ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn bot of type " + className + ". Invalid bot type or missing CFG file." ); m_botAction.sendSmartPrivateMessage( messager, "That bot type does not exist, or the CFG file for it is missing." ); return; } Integer maxBots = botInfo.getInteger( "Max Bots" ); Integer currentBotCount = m_botTypes.get( rawClassName ); if( maxBots == null ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn bot of type " + className + ". Invalid settings file. (MaxBots improperly defined)" ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn bot of type " + className + ". Invalid settings file. (MaxBots improperly defined)" ); m_botAction.sendSmartPrivateMessage( messager, "The CFG file for that bot type is invalid. (MaxBots improperly defined)" ); return; } if( login == null && maxBots.intValue() == 0 ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn bot of type " + className + ". Spawning for this type is disabled on this hub." ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn bot of type " + className + ". Spawning for this type is disabled on this hub." ); m_botAction.sendSmartPrivateMessage( messager, "Bots of this type are currently disabled on this hub. If you are running another hub, please try from it instead." ); return; } if( currentBotCount == null ) { currentBotCount = new Integer( 0 ); m_botTypes.put( rawClassName, currentBotCount ); } if( login == null && currentBotCount.intValue() >= maxBots.intValue() ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn a new bot of type " + className + ". Maximum number already reached (" + maxBots + ")" ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn a new bot of type " + className + ". Maximum number already reached (" + maxBots + ")" ); m_botAction.sendSmartPrivateMessage( messager, "Maximum number of bots of this type (" + maxBots + ") has been reached." ); return; } String botName, botPassword; currentBotCount = new Integer( getFreeBotNumber( botInfo ) ); if( login == null || password == null ) { botName = botInfo.getString( "Name" + currentBotCount ); botPassword = botInfo.getString( "Password" + currentBotCount ); } else { botName = login; botPassword = password; } Session childBot = null; try { // FIXME: KNOWN BUG - sometimes, even when it detects that a class is updated, the loader // will load the old copy/cached class. Perhaps Java itself is caching the class on occasion? if( m_loader.shouldReload() ) { System.out.println( "Reinstantiating class loader; cached classes are not up to date." ); resetRepository(); m_loader = m_loader.reinstantiate(); } Class<? extends SubspaceBot> roboClass = m_loader.loadClass( "twcore.bots." + rawClassName + "." + rawClassName ).asSubclass(SubspaceBot.class); String altIP = botInfo.getString("AltIP" + currentBotCount); int altPort = botInfo.getInt("AltPort" + currentBotCount); String altSysop = botInfo.getString("AltSysop" + currentBotCount); if(altIP != null && altSysop != null && altPort > 0) childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, altIP, altPort, altSysop, true); else childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, true); } catch( ClassNotFoundException cnfe ) { Tools.printLog( "Class not found: " + rawClassName + ".class. Reinstall this bot?" ); return; } currentTime = System.currentTimeMillis(); if( m_lastSpawnTime + SPAWN_DELAY > currentTime ) { m_botAction.sendSmartPrivateMessage( messager, "Subspace only allows a certain amount of logins in a short time frame. Please be patient while your bot waits to be spawned." ); if( m_spawnQueue.isEmpty() == false ) { int size = m_spawnQueue.size(); if( size > 1 ) { m_botAction.sendSmartPrivateMessage( messager, "There are currently " + m_spawnQueue.size() + " bots in front of yours." ); } else { m_botAction.sendSmartPrivateMessage( messager, "There is only one bot in front of yours." ); } } else { m_botAction.sendSmartPrivateMessage( messager, "You are the only person waiting in line. Your bot will log in shortly." ); } if(messager != null) m_botAction.sendChatMessage( 1, messager + " in queue to spawn bot of type " + className ); else m_botAction.sendChatMessage( 1, "AutoLoader in queue to spawn bot of type " + className ); } String creator; if(messager != null) creator = messager; else creator = "AutoLoader"; ChildBot newChildBot = new ChildBot( rawClassName, creator, childBot ); addToBotCount( rawClassName, 1 ); m_botStable.put( botName, newChildBot ); m_spawnQueue.add( newChildBot ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void spawnBot( String className, String messager ) {\n spawnBot( className, null, null, messager);\n }", "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "public void spawnRobots() {\n\t\tString robotName\t= \"\";\n\t\tPlayer newPlayer\t= null;\n\t\tint numberOfRobots \t= 0;\n\t\tint robotsPerPlayer = server.getRobotsPerPlayer();\n\t\tint numberOfPlayers = server.getPlayerCount();\n\t\tint robotsPerLevel\t= server.getRobotsPerLevel();\n\t\t\n\t\t// calculate how many robots that should be spawned\n\t\trobotsPerPlayer = robotsPerPlayer *\n\t\t\t\t\t\t (robotsPerLevel * \n\t\t\t\t\t\t currentLevel);\n\t\t\n\t\tnumberOfRobots \t= robotsPerPlayer *\n\t\t\t\t\t\t numberOfPlayers;\n\t\t\n\t\tfor(int i = 0; i < numberOfRobots; i++) {\n\t\t\trobotName \t\t\t= \"Robot\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(robotName, \n\t\t\t\t\t\t\t\t \t\t\t PlayerType.Robot, \n\t\t\t\t\t\t\t\t \t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "void forceSpawn() throws SpawnException;", "public GameManager(List<String> botNames){\n\t\tdeck = new Deck();\n\t\ttable = new Table();\n\t\tplayers = new ArrayList<Bot>();\n\t\t\n\t\t//create player objects via reflection\n\t\tfor (String botName : botNames){\n\t\t\ttry {\n\t\t\t\tplayers.add(newInstance(botName));\n\t\t\t} catch (ClassNotFoundException | NoSuchMethodException\t| InstantiationException | \n\t\t\t\t\tIllegalAccessException| IllegalArgumentException | InvocationTargetException e) {\n\t\t\t\t\t\tSystem.err.println(\"No such bot class found: \" + botName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\n public void run() {\n Iterator<String> i;\n String key;\n Session bot;\n ChildBot childBot;\n long currentTime = 0;\n long lastStateDetection = 0;\n int SQLStatusTime = 0;\n final int DETECTION_TIME = 5000;\n\n while( m_botAction.getBotState() != Session.NOT_RUNNING ) {\n if( SQLStatusTime == 2400 ) {\n SQLStatusTime = 0;\n m_botAction.getCoreData().getSQLManager().printStatusToLog();\n }\n\n try {\n currentTime = System.currentTimeMillis() + 1000;\n\n if( m_spawnQueue.isEmpty() == false ) {\n if( !m_spawnBots ) {\n childBot = m_spawnQueue.remove(0);\n\n if(childBot.getBot() != null) {\n m_botStable.remove( childBot.getBot().getBotName() );\n addToBotCount( childBot.getClassName(), (-1) );\n }\n\n if(childBot.getCreator() != null) {\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Bot failed to log in. Spawning of new bots is currently disabled.\");\n }\n\n m_botAction.sendChatMessage( 1, \"Bot of type \" + childBot.getClassName() + \" failed to log in. Spawning of new bots is currently disabled.\");\n\n } else if( m_lastSpawnTime + SPAWN_DELAY < currentTime ) {\n childBot = m_spawnQueue.remove( 0 );\n bot = childBot.getBot();\n\n bot.start();\n\n while( bot.getBotState() == Session.STARTING ) {\n Thread.sleep( 5 );\n }\n\n if( bot.getBotState() == Session.NOT_RUNNING ) {\n removeBot( bot.getBotName(), \"log in failure; possible bad login/password\" );\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Bot failed to log in. Verify login and password are correct.\" );\n m_botAction.sendChatMessage( 1, \"Bot of type \" + childBot.getClassName() + \" failed to log in. Verify login and password are correct.\" );\n } else {\n if(childBot.getCreator() != null) {\n m_botAction.sendSmartPrivateMessage( childBot.getCreator(), \"Your new bot is named \" + bot.getBotName() + \".\" );\n m_botAction.sendChatMessage( 1, childBot.getCreator() + \" spawned \" + childBot.getBot().getBotName() + \" of type \" + childBot.getClassName() );\n } else\n m_botAction.sendChatMessage( 1, \"AutoLoader spawned \" + childBot.getBot().getBotName() + \" of type \" + childBot.getClassName() );\n }\n\n m_lastSpawnTime = currentTime;\n }\n }\n\n // Removes bots that are no longer running.\n if( lastStateDetection + DETECTION_TIME < currentTime ) {\n for( i = m_botStable.keySet().iterator(); i.hasNext(); ) {\n key = i.next();\n childBot = m_botStable.get( key );\n\n if( childBot.getBot().getBotState() == Session.NOT_RUNNING && key != null) {\n String removalStatus = removeBot( key );\n\n if( key == null )\n m_botAction.sendChatMessage( 1, \"NOTICE: Unknown (null) bot disconnected without being properly released from stable.\" );\n else\n m_botAction.sendChatMessage( 1, key + \"(\" + childBot.getClassName() + \") \" + removalStatus + \".\" );\n\n childBot = null;\n }\n }\n\n lastStateDetection = currentTime;\n }\n\n SQLStatusTime++;\n Thread.sleep( 1000 );\n } catch( ConcurrentModificationException e ) {\n //m_botAction.sendChatMessage( 1, \"Concurrent modification. No state detection done this time\" );\n } catch( Exception e ) {\n Tools.printStackTrace( e );\n }\n }\n }", "BotQueue( ThreadGroup group, BotAction botAction ) {\n super( group, \"BotQueue\" );\n repository = new Vector<File>();\n m_group = group;\n m_lastSpawnTime = 0;\n m_botAction = botAction;\n directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( \"Core Location\" ));\n\n int delay = m_botAction.getGeneralSettings().getInt( \"SpawnDelay\" );\n\n if( delay == 0 )\n SPAWN_DELAY = 20000;\n else\n SPAWN_DELAY = delay;\n\n if ( m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"localhost\") ||\n m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"127.0.0.1\"))\n SPAWN_DELAY = 100;\n\n resetRepository();\n\n m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() );\n m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() );\n m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() );\n\n m_botTypes.put( \"hubbot\", new Integer( 1 ));\n\n if( repository.size() == 0 ) {\n Tools.printLog( \"There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?\" );\n } else {\n System.out.println( \"Looking through \" + directory.getAbsolutePath()\n + \" for bots. \" + (repository.size() - 1) + \" child directories.\" );\n System.out.println();\n System.out.println(\"=== Loading bots ... ===\");\n }\n\n m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() );\n }", "int getNumberOfBots( String className ) {\n Integer number = m_botTypes.get( className );\n\n if( number == null ) {\n return 0;\n } else {\n return number.intValue();\n }\n }", "public boolean allowBotSpawn(boolean allowSpawning) {\n if(m_spawnBots == allowSpawning) {\n return false;\n }\n\n m_spawnBots = allowSpawning;\n return true;\n }", "public static void createCritter(String critter_class_name)\n throws InvalidCritterException {\n //does the desired critter class exist????\n Class<?> myCritClass;\n try {\n myCritClass = Class.forName(myPackage+\".\"+critter_class_name);\n if(!Critter.class.isAssignableFrom(myCritClass)) {\n throw new InvalidCritterException(critter_class_name);\n }\n } catch (ClassNotFoundException e) {\n throw new InvalidCritterException(critter_class_name);\n }\n\n //init the critters data and check for collisions\n try {\n //set the critters position and energy\n Critter critterToAdd = (Critter)(myCritClass.newInstance());\n critterToAdd.x_coord = getRandomInt(Params.WORLD_WIDTH);\n critterToAdd.y_coord = getRandomInt(Params.WORLD_HEIGHT);\n critterToAdd.energy = Params.START_ENERGY;\n\n //if two critters collide on spawning then their fight is done on the next time step\n\n population.add(critterToAdd);\n } catch (InstantiationException | IllegalAccessException e) {\n throw new InvalidCritterException(critter_class_name);\n }\n }", "boolean registerType(SpawnType spawnType);", "public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }", "ChildBot( String className, String creator, Session bot ) {\n m_bot = bot;\n m_creator = creator;\n m_className = className;\n }", "private void createAgent(Class<?> clazz, String name) {\r\n try {\r\n // Fill description of an agent to be created\r\n CreateAgent ca = new CreateAgent();\r\n ca.setAgentName(name);\r\n ca.setClassName(clazz.getCanonicalName());\r\n ca.setContainer(container);\r\n\r\n Action act = new Action(getAMS(), ca);\r\n ACLMessage req = new ACLMessage(ACLMessage.REQUEST);\r\n req.addReceiver(getAMS());\r\n req.setOntology(ontology.getName());\r\n req.setLanguage(FIPANames.ContentLanguage.FIPA_SL);\r\n req.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n getContentManager().fillContent(req, act);\r\n \r\n // AMS sends a response, \r\n addBehaviour(new AchieveREInitiator(this, req) {\r\n @Override\r\n protected void handleInform(ACLMessage inform) {\r\n logger.severe(\"Success\");\r\n }\r\n\r\n @Override\r\n protected void handleFailure(ACLMessage inform) {\r\n logger.severe(\"Failure\");\r\n }\r\n });\r\n } catch (CodecException | OntologyException e) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n PrintStream printer = new PrintStream(out);\r\n e.printStackTrace(printer);\r\n logger.severe(out.toString());\r\n }\r\n }", "public void spawn(boolean type)\n\t{\n\t\tif (type)\n\t\t{\n\t\t\triver[findEmpty()] = new Bear();\n\t\t}\n\t\telse\n\t\t{\n\t\t\triver[findEmpty()] = new Fish();\n\t\t}\n\t}", "public void spawnObstacle(){\n\t\tif(this.seconds > this.nextSpawn && !this.gameOver){\n\t\t\tint pX = this.radom.nextInt(350);\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,0,30,pX,0));\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,pX+110,30,HEIGHT-pX-111,0));\n\t\t\tthis.goals.add(new Goal(WIDTH,pX,30,110,0xffffff));\n\t\t\tthis.nextSpawn = this.seconds + this.spawnRate;\n\t\t}\n\t}", "public static Unit generateDummy(String className)\r\n {\r\n try\r\n {\r\n //find constructor requiring no parameters\r\n Class classToCreate = Class.forName(\"TowerDefense.\"+className);\r\n Class[] params = {};\r\n Constructor constructor = classToCreate.getConstructor(params);\r\n \r\n //create instance of object using found constructor\r\n Object[] argList = {};\r\n return (Tower)constructor.newInstance(argList);\r\n }\r\n catch (Exception e)\r\n {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "private void verifyClassName() {\n\t\t\n\t\tif (classNameTF.getText().isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Class Name\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tClass newClass = new Class(classNameTF.getText());\n\t\t\tteacher.addClass(newClass);\n\t\t\ttAddClassWindow.dispose();\n\t\t\ttPortalWindow.dispose();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t}", "void listBots( String className, String messager ) {\n Iterator<ChildBot> i;\n ChildBot bot;\n String rawClassName = className.toLowerCase();\n\n if( rawClassName.compareTo( \"hubbot\" ) == 0 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"There is only one true master, and that is me.\" );\n } else if( getNumberOfBots( className ) == 0 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"No bots of that type.\" );\n } else {\n m_botAction.sendSmartPrivateMessage( messager, className + \":\" );\n\n for( i = m_botStable.values().iterator(); i.hasNext(); ) {\n bot = i.next();\n\n if( bot != null )\n if( bot.getClassName().compareTo( className ) == 0 )\n m_botAction.sendSmartPrivateMessage( messager, bot.getBot().getBotName() + \" (in \" + bot.getBot().getBotAction().getArenaName() + \"), created by \" + bot.getCreator());\n }\n\n m_botAction.sendSmartPrivateMessage( messager, \"End of list\" );\n }\n }", "public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}", "private void setBaseSpawns() {\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-X:148\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Radius:20\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-X:330\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Radius:20\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-X:694\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Radius:20\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-X:876\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Radius:20\");\r\n\r\n }", "private void launchCreateGame() {\n\t\tString name = nameText.getText().toString();\n\t\tString cycle = cycleText.getText().toString();\n\t\tString scent = scentText.getText().toString();\n\t\tString kill = killText.getText().toString();\n\t\t\n\t\tif (name.equals(\"\")){\n\t\t\tname = defaultName;\n\t\t} \n\t\tif (cycle.equals(\"\")) {\n\t\t\tcycle = \"720\";\n\t\t} \n\t\tif (scent.equals(\"\")) {\n\t\t\tscent = \"1.0\";\n\t\t}\n\t\tif (kill.equals(\"\")) {\n\t\t\tkill = \".5\";\n\t\t}\n\t\t\n\t\t\t\n\t\tAsyncJSONParser pewpew = new AsyncJSONParser(this);\n\t\tpewpew.addParameter(\"name\", name);\n\t\tpewpew.addParameter(\"cycle_length\", cycle);\n\t\tpewpew.addParameter(\"scent_range\", scent);\n\t\tpewpew.addParameter(\"kill_range\", kill);\n\t\tpewpew.execute(WerewolfUrls.CREATE_GAME);\n\t\t\n\t\tsetProgressBarEnabled(true);\n\t\tsetErrorMessage(\"\");\n\t}", "void spawnEntityAt(String typeName, int x, int y);", "public static void main(String[] args)\n {\n Pokeball pokeball = new Pokeball();\n Pokeball greatball = new Greatball();\n Pokeball ultraball = new Ultraball();\n Pokeball masterball = new Masterball();\n ArrayList<AbstractPokemon> ashPokemon = new ArrayList<AbstractPokemon>();\n ashPokemon.add(new Charmander());\n ashPokemon.add(new Squirtle());\n ashPokemon.add(new Bulbasaur());\n PokemonTrainer ash = new PokemonTrainer(\"Ash\", ashPokemon, AbstractPokemon.Type.ANY_TYPE, masterball);\n ActorWorld world = new ActorWorld();\n AbstractPokemon charmander = new Charmander();\n AbstractPokemon squirtle = new Squirtle();\n AbstractPokemon bulbasaur = new Bulbasaur();\n AbstractPokemon vulpix = new Vulpix();\n AbstractPokemon poliwhirl = new Poliwhirl();\n AbstractPokemon sunkern = new Sunkern();\n AbstractPokemon magby = new Magby();\n AbstractPokemon magikarp = new Magikarp();\n AbstractPokemon oddish = new Oddish();\n String[] worldChoices = {\"Randomly Generated\", \"Blank\", \"Cancel\"};\n int worldSelection = JOptionPane.showOptionDialog(null, \"Please select the world template:\", \"World Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, worldChoices, worldChoices[0]);\n if (worldSelection == 2)\n {\n JOptionPane.showMessageDialog(null, \"No world chosen. Program will terminate.\", \"World Selection\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (worldSelection == 0)\n {\n spawn(charmander, world);\n spawn(squirtle, world);\n spawn(bulbasaur, world);\n spawn(vulpix, world);\n spawn(poliwhirl, world);\n spawn(sunkern, world);\n spawn(magby, world);\n spawn(magikarp, world);\n spawn(oddish, world);\n spawn(ash, world);\n }\n world.show();\n }", "SpawnType getLobbySpawnType();", "public void control(Spawn spawn) {}", "private Role createRole( String className, Agent agent ) {\n// System.out.println(\"Attempting to create class \" + className);\n Class cl = null;\n try {\n cl = Class.forName( \"tns.roles.\" + className );\n } catch ( ClassNotFoundException e ) {\n System.err.println( \"Can't find your darned class.\" );\n System.exit( 0 );\n } // end try-catch\n\n Constructor c = null;\n Object o = null;\n try {\n c = cl.getConstructor(new Class[] {Agent.class});\n o = c.newInstance(new Object[] {agent});\n } catch (NoSuchMethodException e) {\n System.err.println(\"Can't find you class' constructor.\");\n System.exit(0);\n } catch (SecurityException e) {\n System.err.println(\"Security Exception. Can't access your class.\");\n System.exit(0);\n } catch ( InstantiationException e ) {\n System.err.println( \"Can't make your darned class.\" );\n System.exit( 0 );\n } catch ( IllegalAccessException e ) {\n System.err.println( \"Can't access your darned class.\" );\n System.exit( 0 );\n } catch (IllegalArgumentException e) {\n System.err.println(\"Can't create your class. Illegal arguments.\");\n System.exit(0);\n } catch (InvocationTargetException e) {\n System.err.println(\"Can't create your class. Contructor threw an exception.\");\n System.exit(0);\n } // end try-catch\n\n return (Role)o;\n\n }", "private RubyClass defineClassIfAllowed(String name, RubyClass superClass) {\n if (superClass != null && profile.allowClass(name)) {\n return defineClass(name, superClass, superClass.getAllocator());\n }\n return null;\n }", "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "int getBotCount(String className) {\n Integer currentBotCount = m_botTypes.get( className.toLowerCase() );\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( className.toLowerCase(), currentBotCount );\n }\n\n return currentBotCount;\n }", "public static void createCritter(String critter_class_name)\r\n throws InvalidCritterException {\r\n \r\n \ttry {\r\n \t\tString name = myPackage + \".\" + critter_class_name;\r\n \t\tClass added = Class.forName(name);\r\n \t\t\r\n \t\t//throws InvalidCritterException if cannot make the critter\r\n \t\tif((critter_class_name == \"Critter\") || (!Critter.class.isAssignableFrom(added))){\r\n \t\t\tthrow new InvalidCritterException(critter_class_name);\r\n \t\t}\r\n \t\t\r\n \t\t//create an instance and then cast that to a critter\r\n \t\tObject inst = added.newInstance();\r\n \t\tCritter newCritt = (Critter) inst;\r\n \t\t\r\n \t\t//initialize critter's parameters\r\n \t\tnewCritt.hasMoved = false;\r\n \t\tnewCritt.isFight = false;\r\n \t\tnewCritt.energy = Params.START_ENERGY;\r\n \t\tnewCritt.y_coord = getRandomInt(Params.WORLD_HEIGHT);\r\n \t\tnewCritt.x_coord = getRandomInt(Params.WORLD_WIDTH);\r\n \t\t\r\n \t\t//get the string coordinates of the critter's position\r\n \t\tString pos = newCritt.x_coord + \"_\" + newCritt.y_coord;\r\n \t\t\r\n \t\t//if position is not in the hash map as a key yet, add it to the population hash map\r\n \t\tif(!(population.containsKey(pos))) {\r\n \t\t\tArrayList<Critter> critterList = new ArrayList<Critter>();\r\n \t\t\tcritterList.add(newCritt);\r\n \t\t\tpopulation.put(pos, critterList);\r\n \t\t}\r\n \t\t\r\n \t\t//if position is already in the hash map as a key\r\n \t\telse {\r\n \t\t\tArrayList<Critter> list = population.get(pos);\r\n \t\t\tlist.add(newCritt);\r\n \t\t\tpopulation.replace(pos, list);\r\n \t\t}\r\n \t\t//Main.createSound();\r\n \t}\r\n \t\r\n \t//catch an exception\r\n \tcatch (Exception e) {\r\n \t\tthrow new InvalidCritterException(critter_class_name);\r\n \t}\r\n }", "private Class<?> getNMSClass(String name) {\n\t\tString version = Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n\t\ttry {\n\t\t\treturn Class.forName(\"net.minecraft.server.\" + version + \".\" + name);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "protected Enemy spawn(Class enemyClass, final ArrayList<Enemy> enemies, final int spawnRadius, final int escapeRadius) {\n // at a random angle\n double theta = Math.random() * 2 * Math.PI;\n // pick a random point from 10% spawn radius to 100% spawn radius\n double radius = (Math.random() * 0.9 + 0.1) * spawnRadius;\n\n GameUtils.Position p = GameUtils.radialLocation(radius, theta);\n\n Enemy newEnemy = null;\n if (enemyClass == BasicEnemy.class) {\n newEnemy = new BasicEnemy(p.x, p.y, escapeRadius);\n } else if (enemyClass == ShootEnemy.class) {\n newEnemy = new ShootEnemy(p.x, p.y, escapeRadius);\n } else if (enemyClass == LaserEnemy.class) {\n newEnemy = new LaserEnemy(p.x, p.y, escapeRadius);\n } else if (enemyClass == BombEnemy.class) {\n newEnemy = new BombEnemy(p.x, p.y, escapeRadius);\n } else if (enemyClass == Kraken.class) {\n newEnemy = new Kraken(escapeRadius, spawnRadius);\n } else if (enemyClass == ArcEnemy.class) {\n int rotateSide = (int)Math.round(Math.random());\n newEnemy = new ArcEnemy(p.x, p.y, escapeRadius, rotateSide);\n } else if (enemyClass == ArcShootEnemy.class) {\n int rotateSide = (int)Math.round(Math.random());\n newEnemy = new ArcShootEnemy(p.x, p.y, escapeRadius, rotateSide);\n }\n\n if(newEnemy == null) {\n System.err.println(\"Stage cannot spawn enemy of type \" + enemyClass);\n }\n\n return newEnemy;\n }", "SpawnType getGameSpawnType();", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "public void createClassObjects(String input) {\n // Find target\n if (input.matches(\".* (announcement|session|assignment) for.*\")) {\n String target = substr(input, \"for (\\\\S*)\\\\s?\");\n\n // Obtain the class here\n // If no target is found\n if (target == null || target == \"\") {\n System.out.println(\"No class found\");\n replyChat(\"This class does not exist.\");\n return;\n }\n\n if (input.matches(\".*(announcement).*\")) {\n System.out.println(\"Create an announcement for \" + target);\n } else if (input.matches(\".*(session).*(today)\")) {\n System.out.println(\"Create a session for \" + target);\n\n // Get today's date\n input = input.trim();\n String date = \"\";\n boolean processDate = true;\n try {\n // Convert date to a string that can be read by <input> tags\n DateTimeFormatter dateFmt = DateTimeFormat.forPattern(\"YYYY-MM-dd\");\n date = new DateTime().toString(dateFmt);\n } catch (Exception e) {\n System.out.println(\"Invalid date\");\n processDate = false;\n }\n\n if (processDate) {\n addCreateSession(target, date, null);\n } else {\n // No date\n addCreateSession(target, null, null);\n }\n\n // Get optional time (must be a range)\n // if(input.matches(\".*(between|from) (.*) (and|to|until) (.*)\"))\n } else if (input.matches(\".*(session).*\")) {\n System.out.println(\"Create a session for \" + target);\n\n // Get optional date\n input = input.trim();\n String dateInput = substr(input, \".*on (.*)\");\n dateInput = dateInput != null ? dateInput.trim() : \"\";\n String date = \"\";\n boolean processDate = true;\n try {\n // Convert date to a string that can be read by <input> tags\n DateTimeFormatter dateFmt = DateTimeFormat.forPattern(\"YYYY-MM-dd\");\n date = new DateTime(Quick.getDate(dateInput)).toString(dateFmt);\n } catch (Exception e) {\n System.out.println(\"Invalid date\");\n processDate = false;\n }\n\n if (processDate) {\n addCreateSession(target, date, null);\n } else {\n // No date\n addCreateSession(target, null, null);\n }\n } else if (input.matches(\".*(assignment).*\")) {\n\n // Detect ID and name\n String title = substr2(input, \".*(named|titled|name|title) [\\\"\\']([^\\']*)[\\\"\\']\") != null && !substr2(input, \".*(named|titled|name|title) [\\\"\\']([^\\']*)[\\\"\\']\").trim().isEmpty() ? substr2(input, \".*(named|titled|name|title) [\\\"\\']([^\\']*)[\\\"\\']\") : substr2(input, \".*(named|titled|name|title) (\\\\S*)\\\\s?\");\n String description = substr2(input, \".*(message|description) [\\\"\\']([^\\']*)[\\\"\\']\") != null && !substr2(input, \".*(message|description) [\\\"\\']([^\\']*)[\\\"\\']\").trim().isEmpty() ? substr2(input, \".*(message|description) [\\\"\\']([^\\']*)[\\\"\\']\") : substr2(input, \".*(message|description) (\\\\S*)\\\\s?\");\n\n System.out.println(title);\n\n System.out.println(title.trim().isEmpty());\n // If ID provided\n if (title != null && !title.trim().isEmpty()) {\n\n // And name as well\n if (description != null && !description.trim().isEmpty()) {\n addCreateAssignment(target, title, description);\n } else {\n addCreateAssignment(target, title, null);\n }\n } // If name only\n else if (description != null && !description.trim().isEmpty()) {\n addCreateAssignment(target, null, description);\n } else {\n addCreateAssignment(target, null, null);\n }\n } else {\n System.out.println(\"Sorry, I don't understand\");\n replyChat(\"This class does not exist.\");\n }\n }\n\n }", "public static void makeCritter(String critter_class_name) throws InvalidCritterException {\n\t\tCritter critter;\n\t//Create the critter\t\n\t\ttry {\n\t\t\tClass<?> critter_class = Class.forName(myPackage + \".\" + critter_class_name);\n\t\t\tcritter = (Critter) critter_class.newInstance();\n\t\t}\n\t\tcatch (ClassNotFoundException e1) {\t\t//Class.forName() exception\n\t\t\tthrow new InvalidCritterException(critter_class_name);\n\t\t}\n\t\tcatch (IllegalAccessException e2) {\t\t//Class.newInstance() exception\n\t\t\tthrow new InvalidCritterException(critter_class_name);\n\t\t}\n\t\tcatch (InstantiationException e3) { \t//Class.newInstance() exception\n\t\t\tthrow new InvalidCritterException(critter_class_name);\n\t\t}\n\t//Initialize the location/energy of the critter\n\t\tcritter.energy = Params.start_energy;\n\t\tcritter.x_coord = getRandomInt(Params.world_width);\n\t\tcritter.y_coord = getRandomInt(Params.world_height);\n\t//Add the critter to the world\n\t\tpopulation.add(critter);\n\t}", "@Override\n\tpublic void spawn(Location loc) {\n\t\t\n\t}", "@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}", "public static void createNPC() {\n //create the good npc\n BSChristiansen.setName(\"BS_Christiansen\");\n BSChristiansen.setCurrentRoom(jungle);\n BSChristiansen.setDescription(\"The survivor of the plane crash look to be some kind of veteran soldier, \"\n + \"\\nbut he is heavly injured on his right leg so he cant move \");\n BSChristiansen.addDialog(\"If you want to survive on this GOD forsaken island, you \\nmust first find food and shelter.\"\n + \"\\nYou can craft items to help you survive, if you \\nhave the right components.\");\n BSChristiansen.addDialog(\"To escape the island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n\n //create the bad npc\n josephSchnitzel.setName(\"Joseph_Schnitzel\");\n josephSchnitzel.setCurrentRoom(mountain);\n josephSchnitzel.setDescription(\"A lonely surviver with very filthy hair, and a wierd smell of weinerschnitzel.\");\n josephSchnitzel.addDialog(\"Heeelloooo there my freshlooking friend, I am Joseph\\nSchnitzel, if you scratch my back I might scratch your's.\" + \"\\n\" + \"Go fetch me some eggs, or I'll kill you\");\n josephSchnitzel.addDialog(\"Talks to himself\\nis that muppet still alive\");\n josephSchnitzel.addDialog(\"Talks to himself\\nHow long is he going to last\");\n josephSchnitzel.addDialog(\"Talks to himself\\nI wonder what those noises were ing the cave\");\n josephSchnitzel.addDialog(\"GET THE HELL OUT OF MY WAY!!!\");\n josephSchnitzel.setDamageValue(100);\n\n //create another npc\n mysteriousCrab.setName(\"Mysterious_Crab\");\n mysteriousCrab.setCurrentRoom(cave);\n mysteriousCrab.setDescription(\"A mysterious crab that you dont really get why can talk\");\n mysteriousCrab.addDialog(\"MUHAHAHA i'm the finest and most knowledgeable \\ncrab of them all mr.Crab and know this island\\nlike the back of my hand! oh i mean claw...\"\n + \"\\nA Random fact: \"\n + \"to escape this island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n }", "@Override\n public void logic() throws PogamutException {\n /*\n * Step:\n * 1. find the bot and approach him (get near him ... distance < 200)\n * 2. greet him by saying \"Hello!\"\n * 3. upon receiving reply \"Hello, my friend!\"\n * 4. answer \"I'm not your friend.\"\n * 5. and fire a bit at CheckerBot (do not kill him, just a few bullets)\n * 6. then CheckerBot should tell you \"COOL!\"\n * 7. then CheckerBot respawns itself\n * 8. repeat 1-6 until CheckerBot replies with \"EXERCISE FINISHED\"\n */\n Location loc = new Location(0, 0, 0);\n weaponry.changeWeapon(UT2004ItemType.ASSAULT_RIFLE);\n switch (state) {\n case 0: // navigate to random point\n if (!navigation.isNavigating())\n navigation.navigate(this.navPoints.getRandomNavPoint());\n if (players.canSeePlayers()) {\n loc = players.getNearestVisiblePlayer().getLocation();\n navigation.navigate(loc);\n log.info(\"Bot see player on \" + loc.toString());\n }\n if (loc.getDistance(bot.getLocation()) < 190) {\n navigation.stopNavigation();\n log.info(\"Bot is close enough\");\n state = 1;\n }\n if (congrats_receive) {\n log.info(\"Received info about success\");\n state = 7;\n }\n break;\n case 1: // nearby player\n this.sayGlobal(\"Hello!\");\n resetTimeout();\n state = 2;\n break;\n case 2: //waiting for answer\n tickTimeout();\n if (received.equals(\"Hello, my friend!\")) {\n log.info(\"Answer received\");\n state = 3;\n }\n else if (receiveTimeout) {\n log.warning(\"Answer didn't received, repeating.\");\n navigation.navigate(navPoints.getRandomNavPoint());\n state = 0;\n }\n break;\n case 3: // say back\n this.sayGlobal(\"I'm not your friend.\");\n state = 4;\n break;\n case 4:\n if (players.getNearestVisiblePlayer() == null) {\n log.warning(\"Resetting because no player in view\");\n state = 0;\n } else {\n shoot.shoot(players.getNearestVisiblePlayer());\n log.info(\"Start shooting at the enemy\");\n resetTimeout();\n state = 5;\n }\n break;\n case 5:\n tickTimeout();\n if (damaged) {\n shoot.stopShooting();\n damaged = false;\n resetTimeout();\n log.info(\"Enemy damaged\");\n state = 6;\n } else if (receiveTimeout) {\n log.warning(\"Resetting because not damage to the enemy\");\n state = 0;\n }\n break;\n case 6:\n tickTimeout();\n if (cool_received){\n log.info(\"Success in the turn, repeating\");\n cool_received = false;\n resetTimeout();\n state = 0;\n }\n else if(receiveTimeout) {\n log.warning(\"No final answer, repeating\");\n state = 0;\n }\n break;\n case 7:\n sayGlobal(\"I solved the exercise.\");\n }\n }", "void startNewGame(String playerName, String gameType) throws GameServiceException;", "public interface BuildStrategy {\n\n public void execute(GameSession session, int village) throws InterruptedException;\n\n}", "private void startSpawning()\n {\n MAUtils.setSpawnFlags(plugin, world, 1, allowMonsters, allowAnimals);\n \n // Start the spawnThread.\n spawnThread = new MASpawnThread(plugin, this);\n spawnTaskId = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, spawnThread, waveDelay, (!waveClear) ? waveInterval : 60);\n }", "@Override\n public String getName() {\n return \"sspawn:spawn\";\n }", "void hardRemoveAllBotsOfType( String className, String initiator ) {\n String rawClassName = className.toLowerCase();\n Integer numBots = m_botTypes.get( rawClassName );\n LinkedList<String> names = new LinkedList<String>();\n\n for( ChildBot c : m_botStable.values() )\n if( c != null ) {\n if(c.getClassName().equals( rawClassName ))\n names.add( c.getBot().getBotName() );\n }\n\n for( String name : names ) {\n removeBot( name, \"!removetype by \" + initiator );\n m_botAction.sendChatMessage( 1, name + \" logged off. (!removetype initiated.)\" );\n }\n\n if( numBots != null && numBots.intValue() != 0 )\n m_botTypes.put( rawClassName, new Integer(0) );\n }", "public void setUp() throws ClassNotFoundException, InstantiationException, IllegalAccessException {\r\n \t\r\n players = new ArrayList<>();\r\n Scanner scanner = new Scanner(System.in);\r\n \r\n System.out.println(\"How many players?\");\r\n \r\n // Instead of using nextInt(), since that messes with the following nextLine, we will just convert from string to int. \r\n playerNum = Integer.parseInt(scanner.nextLine());\r\n \r\n playerBank = new int[playerNum];\r\n for (int i = 0; i < playerNum; i++) {\r\n System.out.println(\"What is Player \" + (i + 1) + \"'s name?\");\r\n System.out.println(\"Current options are Folchi, Matt, Justin, and Chris.\");\r\n \r\n // If-chain statement that handles all types of players\r\n // Reflection portion of code\r\n // The \"program2.\" is tacked onto any valid input so reflection works\r\n \r\n String input = scanner.nextLine();\r\n \r\n try {\r\n PlayerIf player = (PlayerIf) Class.forName(\"project2.Player\" + input).newInstance();\r\n player.setName(input);\r\n players.add(player);\r\n } catch (InstantiationException 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} catch (IllegalAccessException 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} catch (ClassNotFoundException e) {\r\n \t\t\t\t\tPlayerIf player = (PlayerIf) Class.forName(\"project2.SamplePlayer\").newInstance();\r\n player.setName(input);\r\n players.add(player);\r\n \t\t\t\t}\r\n \r\n playerBank[i] = 100;\r\n }\r\n \r\n scanner.close();\r\n }", "private void spawnBigEnemy(IEnemyService spawner, World world, GameData gameData) {\r\n if (spawner != null) {\r\n spawner.createBigEnemy(world, gameData, new Position(randomIntRange(1600, 3200), gameData.getGroundHeight()));\r\n spawner.createBigEnemy(world, gameData, new Position(randomIntRange(-600, -2000), gameData.getGroundHeight()));\r\n }\r\n }", "public void executeNewGame(int gridsize, Player[] players) {\r\n players[0].setPlayerType(Player.NETWORK);\r\n players[1].setPlayerType(Player.HUMAN);\r\n for (int i = 2; i < players.length; i++) {\r\n if (players[i].getPlayerType() != Player.DISABLED) {\r\n players[i].setPlayerType(Player.NETWORK);\r\n }\r\n }\r\n game.gmvBeginNewGame(gridsize, players);\r\n nui.closeWindow();\r\n game.setNI(this);\r\n }", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "private void startComponents(){\n\n if(isAllowed(sentinel)){\n SentinelComponent sentinelComponent = new SentinelComponent(getInstance());\n sentinelComponent.getCanonicalName();\n }\n\n if(isAllowed(\"fileserver\")){\n FileServer fileServer = new FileServer(getInstance());\n fileServer.getCanonicalName();\n }\n\n if(isAllowed(\"manager\")){\n ManagerComponent Manager = new ManagerComponent(getInstance());\n Manager.getCanonicalName();\n }\n\n// if(isAllowed(\"sdk\")){\n// SDK sdk = new SDK(getInstance());\n// sdk.getCanonicalName();\n// }\n\n if(isAllowed(\"centrum\")){\n CentrumComponent centrum1 = new CentrumComponent(getInstance(), null);\n centrum1.getCanonicalName();\n }\n\n }", "public void spawnNpcOnChance(Location location) {\r\n\t\t\tif(location.isOutdoors() && Math.random() < 0.20) {\r\n\t\t\t\tthis.spawnEnemy(location);\r\n\t\t\t}\r\n\t\t}", "public void spawnFirstCreature(){\n\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\"))\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"antorc\"+spawnId);\n\t\t\n\t\t//Add new event into pool which will spawn the rest of the worms ( -1 because this method already spawned one )\n\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,spawnCount-1));\n\t}", "@Override\n\tpublic void execute() throws InstantiationException,\n\t\t\tIllegalAccessException, ClassNotFoundException, IOException {\n\t\tBuilding building = (Building) Class.forName(\n\t\t\t\tConstant.TILE_PACKAGE + commandData.get(\"tileName\"))\n\t\t\t\t.newInstance();\n\t\tbuilding.setX((Integer) commandData.get(\"pointX\"));\n\t\tbuilding.setY((Integer) commandData.get(\"pointY\"));\n\t\tbuilding.setTileManager(tileManager);\n\t\tbuilding.setFocusManager(focusManager);\n\t\tbuilding.setUUID((UUID) commandData.get(\"focusID\"));\n\t\tbuilding.initBuildingImage((String) commandData.get(\"buildingName\"));\n\t\ttileManager.addTile((Tile) building);\n\t}", "private void waitForCommands() throws IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tboolean gameBegins = false;\n\t\t\n\t\twhile(!gameBegins)\n\t\t{\n\t\t\tObject object = objectInputStream.readObject();\n\t\t\t\n\t\t\t//Hier Abfragen, ob der Server uns andre Anweisungen melden will (Kartenname, usw.)\n\t\t\t\n\t\t\t//Das Spiel soll beginnen\n\t\t\tif(object instanceof GameStarts)\n\t\t\t{\n\t\t\t\tobject = objectInputStream.readObject();\n\t\t\t\t//Model vom Server kriegen\n\t\t\t\tif(object instanceof Game)\n\t\t\t\t{\n\t\t\t\t\tgame = (Game) object;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new UnableToStartGameException(\"Konnte das Model nicht empfangen.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgameBegins = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tGameManager gameManager = new GameManager(socket, gameServer, playerId, game, objectInputStream);\n\t\t//Uebergang von vor dem Spiel ins Spiel\n\t\tnew Thread(gameManager).start();\n\t}", "public String createAgent(String agName, String agSource, String agClass, Collection<String> archClasses, ClassParameters bbPars, Settings stts, Agent father) throws Exception;", "public static void main(String[] args) { \n\t\tRobot bots[] = new Robot[5];\n\t\tint x = 400;\n\t\tfor(int i = 0; i< bots.length; i++) {\n\t\t\tbots[i] = new Robot();\n\t\t\tbots[i].setY(350);\n\t\t\tbots[i].setX(x);\n\t\t\tx+=100;\n\t\t\tbots[i].setSpeed(15);\n\t\t}\n\t\tboolean ifWin = false;\n\t\twhile(ifWin == false) {\n\t\t\tfor(int j = 0; j<bots.length; j++) {\n\t\t\t\tRandom number = new Random();\n\t\t\t\tint movingY = number.nextInt(20);\n\t\t\t\tbots[j].move(movingY);\n\t\t\t\tbots[j].turn(-3);\n\t\t\t\tif(bots[j].getX()<=500 && bots[j].getX()>450 && bots[j].getY()<500 && bots[j].getY()>450) {\n\t\t\t\t\tifWin = true;\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Winner!\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tifWin = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void greedyEnemySpawner(float enemyCap, IEnemyService spawner, World world, GameData gameData) {\r\n while (enemyCap >= MEDIUM_ENEMY_COST) {\r\n\r\n if (enemyCap >= MEDIUM_ENEMY_COST + BIG_ENEMY_COST) {\r\n spawnBigAndMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST + BIG_ENEMY_COST;\r\n\r\n } else if (enemyCap >= BIG_ENEMY_COST) {\r\n spawnBigEnemy(spawner, world, gameData);\r\n enemyCap -= BIG_ENEMY_COST;\r\n\r\n } else {\r\n spawnMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST;\r\n }\r\n }\r\n }", "@Override\n\t\t\tpublic void Execute()\n\t\t\t{\n\t\t\tSquare square = (Square) receiver;\n\t\t\t// The args for SpawnBuildingCommand are the X,Y coordinate for the Building used by the factory, \n\t\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\t\tSystem.out.println(\"Spawning Building at (\" + args[0] + \",\" + args[1] + \")\");\n\t\t\tsquare.Add(factory.MakeBuilding());\n\t\t\tGameBoard.Instance().IncrementBuildingCount();\n\t\t}", "public Bot(int x, int y, int xMax, int yMax, int botSize, ArrayList<Bot> bots) {\n\t\tsens = new Sensors(x, y, xMax, yMax, botSize, bots);\n\t\tcloseBots = new ArrayList<Bot>();\n\t\ttickCount = (int) (Math.random() * 20);\n\t\tisActive = true;\n\t}", "public void enemySpawn(String typeofEnemy) {\n if (spawnTimer == 0) {\n if (typeofEnemy.equals(\"bee\")) {\n outerloop:\n//label to later break when enemy is spawned\n for (int row = 3; row < 5; row++) {\n for (int column = 0; column < 8; column++) {\n if (canSpawn[row][column] == false) {\n handler.getGalagaState().entityManager.entities.add(new EnemyBee(x, y, 32, 32, handler, row, column));\n canSpawn[row][column] = true;\n spawnTimer = random.nextInt(60 * 7);\n break outerloop;\n } else continue;\n }\n }\n } else {//ENEMYOTHER\n outerloop:\n for (int row = 1; row < 3; row++) {\n for (int column = 0; column < 8; column++) {\n if (canSpawn[row][column] == false) {\n handler.getGalagaState().entityManager.entities.add(new EnemyOther(x, y, 32, 32, handler, row, column));\n canSpawn[row][column] = true;\n spawnTimer = random.nextInt(60 * 7);\n break outerloop;\n } else continue;\n }\n }\n\n }\n }\n else {\n spawnTimer--;\n }\n\n// int enemyType = random.nextInt(2);\n// spawnTimer--;\n// if (spawnTimer == 0) {\n// if (typeofEnemy.equals(\"bee\")) {\n// int row = random.nextInt(2) + 3, column = random.nextInt(8);\n// if (canSpawn[row][column] == false) {\n// handler.getGalagaState().entityManager.entities.add(new EnemyBee(x, y, 32, 32, handler, row, column));\n// canSpawn[row][column] = true;\n// } else {\n// return;\n// }\n// } else {\n// int row = random.nextInt(2) + 1, column = random.nextInt(8);\n// if (canSpawn[row][column] == false) {\n// handler.getGalagaState().entityManager.entities.add(new EnemyOther(x, y, 32, 32, handler, row, column));\n// canSpawn[row][column] = true;\n// }\n// }\n// }\n// else{\n// spawnTimer--;\n// }\n\n\n\n\n }", "public Workload getNewInstanceOfThisWorkload() {\n\t\t\n\t\tWorkload workload = new Workload(numOfSlotsNeededToSendPacket);\n Random rand = new Random(randomSeed);\n\t\t\n List<Vertex> vertices = topology.getVerticesWithOneNeighbor();\n Vertex gateway = topology.getGateway();\n \tfor(Vertex vertex : vertices) {\n \t\tif(vertex != gateway) {\n \t\t\tif(flowClasses.length == 1) {\n \t\t\tif(randomFlowPhase) {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, rand.nextInt(flowClasses[0]), flowClasses[0], flowClasses[0]);\n \t\t\t} else {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, 0, flowClasses[0], flowClasses[0]);\n \t\t\t}\n \t\t} else {\n \t\t\tint pickedFlowClass = rand.nextInt(flowClasses.length);\n \t\t\tif(randomFlowPhase) {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, rand.nextInt(flowClasses[pickedFlowClass]), flowClasses[pickedFlowClass], flowClasses[pickedFlowClass]);\n \t\t\t} else {\n \t\t\t\tworkload.newPeriodicFlow(vertex, gateway, 0, flowClasses[pickedFlowClass], flowClasses[pickedFlowClass]);\n \t\t\t}\n \t\t}\n \t\t}\n \t}\n \tworkload.assignPriorities();\n \t\n \treturn workload;\n\t}", "private void spawnStart() {\n\t\tswitch (gameType) {\n\t\t\n\t\t}\n\t\tspawnCloud(10,1,0,0); //spawns base cloud\n\t\tspawnCloud(rng(7,10),6,rng(1,2),rng(2,3)); //spawns first clouds\n\t\tspawnCloud(rng(9,12),6,rng(1,2),rng(2,3));\n\t\t//spawnCloud(10,6,16,0);\n\t}", "public static void startProcessBots(boolean visualize) {\n\t\tConfig config = new Config();\n\t\t\n\t\tconfig.bot1Init = \"process:java -cp bin conquest.bot.BotStarter\";\n\t\tconfig.bot2Init = \"dir;process:./bin;java conquest.bot.BotStarter\";\n\t\t\t\t\n\t\tconfig.visualize = visualize;\n\t\t\n\t\tconfig.replayLog = new File(\"./replay.log\");\n\t\t\n\t\tRunGame run = new RunGame(config);\n\t\tGameResult result = run.go();\n\t\t\n\t\tSystem.exit(0);\n\t}", "public void spawnEnemy(Location location) {\r\n\t\t\tlocation.addNpc((Npc) this.getNpcSpawner().newObject());\r\n\t\t}", "private void spawnMediumEnemy(IEnemyService spawner, World world, GameData gameData) {\r\n if (spawner != null) {\r\n spawner.createMediumEnemy(world, gameData, new Position(randomIntRange(1600, 3200), gameData.getGroundHeight()));\r\n spawner.createMediumEnemy(world, gameData, new Position(randomIntRange(-600, -2000), gameData.getGroundHeight()));\r\n }\r\n }", "public void placeMandatoryObjects()\r\n {\r\n Random rng = new Random();\r\n //Adds an endgame chest somewhere (NOT in spawn)\r\n Room tempRoom = getRoom(rng.nextInt(dungeonWidth - 1) +1, rng.nextInt(dungeonHeight - 1) +1);\r\n tempRoom.addObject(new RoomObject(\"Endgame Chest\", \"overflowing with coolness!\"));\r\n if (tempRoom.getMonster() != null)\r\n {\r\n tempRoom.removeMonster();\r\n }\r\n tempRoom.addMonster(new Monster(\"Pelo Den Stygge\", \"FINAL BOSS\", 220, 220, 12));\r\n //Adds a merchant to the spawn room\r\n getRoom(0,0).addObject(new RoomObject(\"Merchant\", \"like a nice fella with a lot of goods (type \\\"wares\\\" to see his goods)\"));\r\n }", "public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}", "SpawnController createSpawnController();", "public static void main(String[] args) {\r\n\t\tint portNumber = 1500;\r\n\t\tString serverAddress = \"localhost\";\r\n\t\tString userName = \"Anonymous\";\r\n\t\tint type = 1;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter Character Name: \");\r\n\t\tuserName = scan.nextLine();\r\n\t\tSystem.out.println(\"Type '1' to be a warrior\");\r\n\t\tSystem.out.println(\"Type '2' to be a wizard\");\r\n\t\tSystem.out.println(\"Type '3' to be a paladin\");\r\n\t\ttype = Integer.parseInt(scan.nextLine());\r\n\r\n\t\tswitch(type) {\r\n\t\t\tcase 1:\r\n\t\t\t\tp = new Player(userName, 1);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tp = new Player(userName, 2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tp = new Player(userName, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tp = new Player(userName, 1);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tClient client = new Client(serverAddress, portNumber, p);\r\n\t\tif(!client.start())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tSystem.out.println(\"Instructions:\");\r\n\t\tSystem.out.println(\"1. Simply type the message to send broadcast to all active clients\");\r\n\t\tSystem.out.println(\"2. Type 'LIST PARTY' to see who is in the game\");\r\n\t\tSystem.out.println(\"3. Type 'STATUS' to show your stats.\");\r\n\t\tSystem.out.println(\"4. Type 'ENEMIES' to show enemies in room\");\r\n\t\tSystem.out.println(\"5. Type 'TURN' to show your parties remaining turns.\");\r\n\t\tSystem.out.println(\"6. Type 'ATTACK X' where X is the enemy target.\");\r\n\t\tSystem.out.println(\"7. Type 'QUIT' to close the game\\n\");\r\n\t\t\r\n\t\twhile(true) {\r\n\t\t\tSystem.out.print(\"> \");\r\n\t\t\tString msg = scan.nextLine();\r\n\t\t\tif(msg.equalsIgnoreCase(\"QUIT\")) {\r\n\t\t\t\tclient.sendMessage(\"QUIT\");\r\n\t\t\t\tbreak;\r\n\t\t\t}else if(msg.length() > 0){\r\n\t\t\t\tclient.sendMessage(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tscan.close();\r\n\t\tclient.disconnect();\t\r\n\t}", "public void newQuest(String name) {\n\t\t//Prevent NullPointerExcpetions\n\t\tif (name == null) {\n\t\t\tbakeInstance.getLogger().info(\"[Bake] Null name for new generated quest. Falling back to default quest selection.\");\n\t\t\tnewQuest();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (QuestCfg.getString(\"quests.\" + name + \".type\", \"N/A\").equals(\"N/A\")) {\n\t\t\tbakeInstance.getLogger().info(\"[Bake] Invalid name (\" + name + \") for new generated quest. Falling back to default quest selection.\");\n\t\t\t//Invalid quest name\n\t\t\tnewQuest();\n\t\t} else {\n\t\t\t//Valid quest name\n\t\t\tactiveQuest = new Quest(QuestCfg, name);\n\t\t}\n\t}", "public static void spawn(String spawnName, Player player) {\n World w = Bukkit.getWorld(FileManager.getSpawnYml().getString(\"Spawns.\" + spawnName + \".world\"));\n Double x = FileManager.getSpawnYml().getDouble(\"Spawns.\" + spawnName + \".x\");\n Double y = FileManager.getSpawnYml().getDouble(\"Spawns.\" + spawnName + \".y\");\n Double z = FileManager.getSpawnYml().getDouble(\"Spawns.\" + spawnName + \".z\");\n int ya = FileManager.getSpawnYml().getInt(\"Spawns.\" + spawnName + \".yaw\");\n int pi = FileManager.getSpawnYml().getInt(\"Spawns.\" + spawnName + \".pitch\");\n Location spawnLoc = new Location(w, x, y, z, ya, pi);\n player.teleport(spawnLoc);\n if (Main.plugin.getConfig().getString(\"NOTIFICATIONS.Spawn\").equalsIgnoreCase(\"True\")) {\n String msg = MessageManager.getMessageYml().getString(\"Spawn.Spawn\");\n player.sendMessage(MessageManager.getPrefix() + ChatColor.translateAlternateColorCodes('&', msg));\n }\n }", "YobBuilderOrBuiltObject(String qualifiedClassName,\n ClassLoader registeredAppClassLoader) {\n try {\n yangDefaultClass =\n registeredAppClassLoader.loadClass(qualifiedClassName);\n yangBuilderClass = yangDefaultClass.getDeclaredClasses()[0];\n setBuilderObject(yangBuilderClass.newInstance());\n } catch (ClassNotFoundException e) {\n log.error(L_FAIL_TO_LOAD_CLASS, qualifiedClassName);\n throw new YobException(E_FAIL_TO_LOAD_CLASS + qualifiedClassName);\n } catch (InstantiationException | IllegalAccessException e) {\n log.error(L_FAIL_TO_CREATE_OBJ, qualifiedClassName);\n throw new YobException(E_FAIL_TO_CREATE_OBJ + qualifiedClassName);\n } catch (NullPointerException e) {\n log.error(L_REFLECTION_FAIL_TO_CREATE_OBJ, qualifiedClassName);\n throw new YobException(E_REFLECTION_FAIL_TO_CREATE_OBJ +\n qualifiedClassName);\n }\n }", "public void spawnInLattice() throws GameActionException {\n boolean isMyCurrentSquareGood = checkIfGoodSquare(Cache.CURRENT_LOCATION);\n\n // if in danger from muckraker, get out\n if (runFromMuckrakerMove() != 0) {\n return;\n }\n\n if (isMyCurrentSquareGood) {\n currentSquareIsGoodExecute();\n } else {\n currentSquareIsBadExecute();\n }\n\n }", "private void spawnTrees() {\n int spawnNum = this.random.nextInt(10) + 20;\n if (this.treeTiles.size() >= 30) { // max 30 trees\n spawnNum = 0;\n }\n for (int i = 0; i < spawnNum; i++) {\n String tree = trees[this.random.nextInt(trees.length)];\n int y = this.random.nextInt(this.getMap().length);\n Tile spawnTile = this.getMapAt(this.random.nextInt(this.getMap()[y].length), y);\n Tile centerTile;\n if ((spawnTile != null) && this.inMap(spawnTile.getX()-2, spawnTile.getY()-1)) {\n centerTile = this.getMapAt(spawnTile.getX()-2, spawnTile.getY()-1);\n } else {\n centerTile = null;\n }\n if ((spawnTile != null) && (spawnTile instanceof GroundTile)\n && (centerTile != null) && (centerTile instanceof GroundTile)\n && (spawnTile.getContent() == null)) {\n ExtrinsicTree newTree = new ExtrinsicTree(tree);\n newTree.setStage(17);\n spawnTile.setContent(newTree);\n this.treeTiles.add(spawnTile);\n }\n }\n }", "private void makeRobot(int lvl)\r\n {\r\n maxHealth = lvl*10;\r\n health = maxHealth;\r\n \r\n Equip tempWeapon = null;\r\n Equip tempArmor = null;\r\n if (type == SOLDIER)\r\n {\r\n tempWeapon = new Equip(\"rifle\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"leather armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == ELF)\r\n {\r\n tempWeapon = new Equip(\"bow\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == KNIGHT)\r\n {\r\n tempWeapon = new Equip(\"sword\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"splendid shield\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == MAGICIAN)\r\n {\r\n tempWeapon = new Equip(\"magic\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else\r\n {\r\n tempWeapon = new Equip(\"broom stick\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"straw\", Equip.ARMOR, lvl*2);\r\n }\r\n tempWeapon.changeOwner(this);\r\n tempArmor.changeOwner(this);\r\n tempWeapon.equipTo(this);\r\n tempArmor.equipTo(this);\r\n }", "@Override\n public void run() {\n World world=Bukkit.getWorld(\"world\");\n world.spawnEntity(world.getHighestBlockAt(world.getSpawnLocation()).getLocation(), EntityType.VILLAGER);\n }", "public AllSystemsClimbCenter() {\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=PARAMETERS\n // Add Commands here:\n // e.g. addSequential(new Command1());\n // addSequential(new Command2());\n // these will run in order.\n\n // To run multiple commands at the same time,\n // use addParallel()\n // e.g. addParallel(new Command1());\n // addSequential(new Command2());\n // Command1 and Command2 will run in parallel.\n\n // A command group will require all of the subsystems that each member\n // would require.\n // e.g. if Command1 requires chassis, and Command2 requires arm,\n // a CommandGroup containing them would require both the chassis and the\n // arm.\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=COMMAND_DECLARATIONS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=COMMAND_DECLARATIONS\n\n // if (!Robot.getKillClimber()) constantly checks if climber was killed by driver\n\n // if (!Robot.getKillClimber())\n // {\n // // set drive direction to correct orientation for climbing (front of robot direction)\n // Robot.chassis.setDriveDirection(-1);\n // }\n\n // if (!Robot.getKillClimber())\n // {\n // // ensure robot intake is in start position\n // addParallel(new ShooterAngleRotate(Constants.ALL_CENTER_SHOOTER_CLIMB_START_POSITION));\n // // ensure robot is against platform\n // addSequential(new DriveWithPower(Constants.ALL_CENTER_CHASSIS_INITIAL_POWER, \n // Constants.ALL_CENTER_CHASSIS_INITIAL_TIME), Constants.ALL_CENTER_CHASSIS_TIMEOUT);\n // }\n \n // extends front and back climber at the same time\n if (!Robot.getKillClimber())\n {\n addParallel(new ClimberFrontSetPosition(Constants.ALL_CENTER_FRONT_CLIMBER_EXTEND_POSITION));\n addParallel(new ClimberBackSetPosition(Constants.ALL_CENTER_BACK_CLIMBER_EXTEND_POSITION));\n // delay only 2 seconds in order to rotate shooter angle to pull in position faster\n addSequential(new Delay(2));\n }\n\n // // rotate shooter angle in order to pull robot onto platform\n // if (!Robot.getKillClimber())\n // {\n // addParallel(new ShooterAngleRotate(Constants.ALL_CENTER_SHOOTER_PULL_IN_POSITION));\n // addSequential(new Delay(2));\n // }\n \n // if (!Robot.getKillClimber())\n // {\n // // start shooter climber wheels in order to pull in\n // addParallel(new SetShooterSpeedStraight(Constants.ALL_CENTER_SHOOTER_PULL_IN_RPM));\n // // drive forward onto the platform\n // addSequential(new DriveWithPower(Constants.ALL_CENTER_CHASSIS_PLATFORM_POWER, \n // Constants.ALL_CENTER_CHASSIS_PLATFORM_TIME), Constants.ALL_CENTER_CHASSIS_TIMEOUT);\n // }\n\n // // bring up back climber\n // if (!Robot.getKillClimber())\n // {\n // addParallel(new ClimberBackSetPosition(Constants.ALL_CENTER_BACK_CLIMBER_RETRACT_POSITION));\n // addSequential(new Delay(2));\n // }\n\n // // drive forward onto the platform\n // if (!Robot.getKillClimber())\n // {\n // addSequential(new DriveWithPower(Constants.ALL_CENTER_CHASSIS_PLATFORM_POWER, \n // Constants.ALL_CENTER_CHASSIS_PLATFORM_TIME), Constants.ALL_CENTER_CHASSIS_TIMEOUT);\n // }\n\n // if (!Robot.getKillClimber())\n // {\n // // bring up front climber\n // addParallel(new ClimberFrontSetPosition(Constants.ALL_CENTER_FRONT_CLIMBER_RETRACT_POSITION));\n // addSequential(new Delay(2));\n // }\n // if (!Robot.getKillClimber())\n // {\n // // drive forward onto the platform\n // addParallel(new DriveWithPower(Constants.ALL_CENTER_CHASSIS_PLATFORM_POWER, \n // Constants.ALL_CENTER_CHASSIS_PLATFORM_TIME), Constants.ALL_CENTER_CHASSIS_TIMEOUT);\n // // bring shooter angle rotate to home position so it doesn't hit driver station\n // addSequential(new ShooterAngleRotate(Constants.ALL_CENTER_SHOOTER_HOME_POSITION));\n // }\n }", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public void enemySpawner(){\n\t\tif (spawnFrame >= spawnTime){\n\t\t\tfor(int i =0;i<enemies.size();i++){\n\t\t\t\tif (!enemies.get(i).getInGame()){\n\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy);\n\t\t\t\t\tbreak;\n\t\t\t\t\t/*if (enemies.get(i).getNum()==1){\n\t\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (enemies.get(i).getNum()==2){\n\t\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (enemies.get(i).getNum()==3){\n\t\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tspawnFrame=0;\n\t\t} else{\n\t\t\tspawnFrame+=1;\n\t\t}\n\t}", "private void createGame(String name){\n\n }", "public void createInstance(String className, String instanceName)\r\n\t{\r\n\t\t\r\n\t\tOntClass c = obtainOntClass(className);\r\n\t\t\r\n\t\tString longName;\r\n\t\tif(instanceName.contains(\"#\"))\r\n\t\t\tlongName = instanceName;\r\n\t\tif(instanceName.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(instanceName);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + instanceName;\r\n\t\t\r\n\t\tc.createIndividual(longName);\r\n\t}", "public void newQuest() {\n\t\tList <String> quests;\n\t\tif (activeQuest == null) {\n\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t} else {\n\t\t\tquests = activeQuest.getSuccessors();\n\t\t\tif (quests == null) {\n\t\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t\t}\n\t\t}\n\t\tbakeInstance.getLogger().info(\"[BAKE] Choosing new quest. Quests available: \" + quests.toString());\n\t\tint questID = (int) Math.round(Math.random()*(quests.size()-1));\n\t\tactiveQuest = new Quest(QuestCfg, quests.get(questID));\n\t}", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "@SuppressWarnings(\"unused\")\n void spawn(Entity entity);", "public void spawnBoss(Vector2 spawnPosition) {\n\n Foe newBoss = new Foe(getController(), spawnPosition, \"boss\", 3.5f, new IABoss(getController()));\n newBoss.initialize();\n newBoss.setPlayerCanKill(false);\n newBoss.setFixedFacing(true);\n\n getController().getStage().registerActor(newBoss);\n }", "public void spawnRubble() {\n\t\tString rubbleName \t= \"\";\n\t\tPlayer newPlayer \t= null; \n\t\tint numberOfRubble \t= server.getRubbleCount();\n\t\t\n\t\tfor(int i = 0; i < numberOfRubble; i++) {\n\t\t\trubbleName = \"Rubble\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(rubbleName, \n\t\t\t\t\t\t\t\t\t\t\t PlayerType.Rubble, \n\t\t\t\t\t\t\t\t\t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "Guild createGuild(long gameId, String title, String clanPrefix);", "public static void main(String args[]) {\n File config = new File(\"files/config.txt\");\n\n try {\n JavaBot.FileReader = new BufferedReader(new FileReader(config));\n String line = null;\n line = JavaBot.FileReader.readLine();\n\n while (line != null) {\n final String[] array = line.split(\"=\");\n\n if (array.length == 2) {\n JavaBot.configNameArray.add(array[0].replaceAll(\"=\", \"\").trim());\n JavaBot.configArray.add(array[1].trim());\n }\n\n line = JavaBot.FileReader.readLine();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JavaBot.getAllConfig();\n\n String[] channels = JavaBot.CHANNELS.split(SERVERS_SEPERATOR); \n String[] passwords = JavaBot.NICKSERV_PASSWORDS.split(SERVERS_SEPERATOR); \n String[] names = JavaBot.NAMES.split(SERVERS_SEPERATOR);\n\n /** TRIMMING VARIABLES */\n SERVERS_ARRAY = trimArray(SERVERS_ARRAY);\n channels = trimArray(channels);\n passwords = trimArray(passwords);\n names = trimArray(names);\n\n initPlugins();\n \n /** CLASSES onStart() */\n new onStart();\n\n /** PLUGINS onStart() */\n\n for (final javaBotPlugin plugin : plugins) {\n plugin.onStart();\n }\n\n for (int i = 0; i < SERVERS_ARRAY.length; i++) {\n JavaBot bot = new JavaBot();\n\n // setting of values respective to each instance of the bot\n bot.setServer(SERVERS_ARRAY[i]);\n bot.setBotName(names[i]);\n bot.setPassword(passwords[i]);\n bot.channels_array = channels[i].split(CHANNELS_SEPERATOR); // split up channels\n new Thread(bot).start();\n }\n }", "public static Character newPlayer(int nbPlayer) {\n\n\n\n int characterClass, level, strength, agility, intelligence, health;\n System.out.println(\"Création du personnage du Joueur \" + nbPlayer);\n characterClass = Character.askAction(\"Veuillez choisir la classe de votre personnage (1 : Guerrier, 2 : Rôdeur, 3 : Mage)\", 1, 3);\n\n do {\n level = Character.askAction(\"Niveau du personnage ?\", 1, 100);\n health = 5 * level;\n System.out.println(\"Votre personnage possède \" + health + \" points de vie\");\n System.out.println(\"Il vous reste \" + level + \" point(s) restant à allouer aux caractéristiques de votre personnage\");\n strength = Character.askAction(\"Force du personnage ?\", 0);\n\n while (level <= 0 || level > 100){\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n level = Character.askAction(\"Niveau du personnage ?\", 0);\n }\n while (strength < 0 || strength > level) {\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n strength = Character.askAction(\"Force du personnage ?\", 0);\n }\n\n int levelMinusStrength = level - strength;\n System.out.println(\"Il vous reste \" + levelMinusStrength + \" point(s) restant à allouer aux caractéristiques de votre personnage\");\n agility = Character.askAction(\"Agilité du personnage ?\", 0);\n while (agility <0 || agility > level - strength) {\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n strength = Character.askAction(\"Agilité du personnage ?\", 0);\n }\n\n\n\n int levelMinusStrengthMinusAgility = level - strength - agility;\n System.out.println(\"Il vous reste \" + levelMinusStrengthMinusAgility + \" point(s) restant à allouer aux caractéristiques de votre personnage\");\n intelligence = Character.askAction(\"Intelligence du personnage ?\", 0);\n while (intelligence <0 || intelligence > level - strength - agility) {\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n strength = Character.askAction(\"Intelligence du personnage ?\", 0);\n }\n\n\n if (strength + agility + intelligence != level) {\n System.out.println(\"Attention le total 'force + agilité + intelligence' doit être égal au niveau du joueur !\");\n }\n }while (strength + agility + intelligence != level);\n\n Character player;\n switch (characterClass) {\n case 1:\n player = new Warrior(nbPlayer, strength, agility, intelligence);\n break;\n case 2:\n player = new Prowler(nbPlayer, strength, agility, intelligence);\n break;\n default:\n player = new Wizard(nbPlayer, strength, agility, intelligence);\n break;\n }\n return player;\n }", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getCraftBukkitClass(final String className) {\n \t\tif (craftbukkitPackage == null) {\n \t\t\tcraftbukkitPackage = new CachedPackage(getCraftBukkitPackage());\n \t\t}\n \t\treturn craftbukkitPackage.getPackageClass(className);\n \t}", "private static PublishLogDataStrategy createNewStrategie(String className) {\n\n\t\tPublishLogDataStrategy request = null;\n\n\t\ttry {\n\t\t\tClass<?> cl = Class.forName(className);\n\t\t\tLOGGER.info(cl.toString() + \" instantiated\");\n\t\t\tif (cl.getSuperclass() == PublishLogDataStrategy.class) {\n\t\t\t\trequest = (PublishLogDataStrategy) cl.newInstance();\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLOGGER.severe(\"ClassNotFound\");\n\t\t} catch (InstantiationException e) {\n\t\t\tLOGGER.severe(\"InstantiationException\");\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLOGGER.severe(\"IllegalAccessException\");\n\t\t}\n\n\t\treturn request;\n\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\t\r\n\t\t\t\t\tfor(Entity as: Bukkit.getWorld(\"world\").getEntities()) {\r\n\t\t\t\t\t\tif(as instanceof ArmorStand) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tas.remove();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TOPS\r\n\t\t\t\t\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"topkills\")) {\r\n\t\t\t\t\t getTop(locTopKILLS,\"Kills\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP KILLS ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP KILLS NAO PODE SER CARREGADO, POIS A WARP topkills NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"topcoins\")) {\r\n\t\t\t\t\t getTop(locTopCoins,\"Coins\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP COINS ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP COINS NAO PODE SER CARREGADO, POIS A WARP topkills NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"top1v1\")) {\r\n\t\t\t\t\t getTop(locTop1v1,\"wins\");\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlTOP 1v1 ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP 1v1 NAO PODE SER CARREGADO, POIS A WARP top1v1 NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Caixa misteriosa\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(MetodosWarps.containsWarp(\"misteryBox\")) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t Spawn(misteryBox, \"žažlCAIXA MISTERIOSA\",misteryBox.getY()-1.7);\r\n\t\t\t\t\t Spawn(misteryBox, \"žežlEM BREVE!\",misteryBox.getY()-2);\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žAžlMYSTERYBOX ATUALIZADO COM SUCESSO! \\n \");\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tBukkit.getConsoleSender().sendMessage(\" \\n žcžlO TOP COINS NAO PODE SER CARREGADO, POIS A WARP misteryBox NAO ESTA SETADA! \\n \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public Class<?> getNmsClass(String name) throws ClassNotFoundException {\n String[] array = Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\");\n\n // pick out the component representing the package version if it's present\n String packageVersion = array.length == 4 ? array[3] + \".\" : \"\";\n\n // construct the qualified class name from the obtained package version\n String qualName = \"net.minecraft.server.\" + packageVersion + name;\n\n // simple call to get the Class object\n return Class.forName(qualName);\n }", "public Bot(int x, int y, int xMax, int yMax, int botSize, ArrayList<Bot> bots) {\n\t\t\n\t\t// init the vars\n\t\tthis.charge = -1.5D;\n\t\tthis.desiredDirection = Math.random() * 360.0;\t// random starting direction\n\t\tthis.seenBots = new ArrayList<Bot>();\n\t\tthis.closeBots = new ArrayList<Bot>();\n\t\tthis.seenCharges = new ArrayList<Object>();\n\t\tthis.LEDs = new ArrayList<LED>();\n\t\tthis.closestWhiteLED = null;\n\t\tthis.botConnectedTo = null;\n\t\tthis.tickCount = (int) (Math.random() * 20);\n\t\tthis.isActive = true;\n\t\t\n\t\t// create the sensors\n\t\tthis.sens = new Sensors(x, y, xMax, yMax, botSize, bots, desiredDirection, this);\n\t\t\n\t\t// add the LEDs\n\t\tLEDs.add(new LED(this, 45));\n\t\tLEDs.add(new LED(this, 90));\n\t\tLEDs.add(new LED(this, 135));\n\t\tLEDs.add(new LED(this, 180));\n\t\tLEDs.add(new LED(this, 225));\n\t\tLEDs.add(new LED(this, 270));\n\t\tLEDs.add(new LED(this, 315));\n\t\tLEDManager = new LEDManager(this.LEDs);\n\t\t\n\t}", "abstract public void initSpawn();", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getMinecraftClass(final String className,\n \t\t\tfinal String... aliases) {\n \t\ttry {\n \t\t\t// Try the main class first\n \t\t\treturn getMinecraftClass(className);\n \t\t} catch (final RuntimeException e1) {\n \t\t\tClass success = null;\n \n \t\t\t// Try every alias too\n \t\t\tfor (final String alias : aliases) {\n \t\t\t\ttry {\n \t\t\t\t\tsuccess = getMinecraftClass(alias);\n \t\t\t\t\tbreak;\n \t\t\t\t} catch (final RuntimeException e2) {\n \t\t\t\t\t// Swallov\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (success != null) {\n \t\t\t\t// Save it for later\n \t\t\t\tminecraftPackage.setPackageClass(className, success);\n \t\t\t\treturn success;\n \t\t\t} else {\n \t\t\t\t// Hack failed\n \t\t\t\tthrow new RuntimeException(String.format(\n \t\t\t\t\t\t\"Unable to find %s (%s)\", className, Joiner.on(\", \")\n \t\t\t\t\t\t\t\t.join(aliases)));\n \t\t\t}\n \t\t}\n \t}", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "private void prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }" ]
[ "0.6792781", "0.5987635", "0.5690723", "0.54388493", "0.5294434", "0.5198574", "0.5171938", "0.5127998", "0.5101774", "0.5082403", "0.5071311", "0.50427103", "0.49756142", "0.49472263", "0.4895344", "0.48863313", "0.48824736", "0.48812363", "0.48524782", "0.48379663", "0.4828346", "0.4808474", "0.4788887", "0.47870603", "0.47611088", "0.47592577", "0.4754152", "0.474516", "0.47308716", "0.47288707", "0.47140324", "0.46790195", "0.4673213", "0.46728113", "0.46692055", "0.46667358", "0.46439263", "0.46412718", "0.4634372", "0.4633458", "0.462664", "0.4624797", "0.46232837", "0.46170765", "0.46111685", "0.45906344", "0.45883587", "0.45828626", "0.45740253", "0.45617455", "0.45590347", "0.45578668", "0.45514426", "0.45447612", "0.4540719", "0.45382288", "0.45360804", "0.45306936", "0.4526983", "0.45154557", "0.45032012", "0.4501141", "0.44850603", "0.4482604", "0.44761267", "0.44596305", "0.44564313", "0.44530353", "0.44471067", "0.44303545", "0.44151774", "0.44069895", "0.44039562", "0.440249", "0.43945447", "0.43889597", "0.43875608", "0.43823063", "0.43803924", "0.4377992", "0.43659022", "0.43634567", "0.4357484", "0.4355375", "0.43531352", "0.43485478", "0.43416932", "0.433872", "0.43369922", "0.43296102", "0.43274626", "0.43240637", "0.43203983", "0.43152666", "0.43145195", "0.4314432", "0.43108258", "0.43033352", "0.43030614", "0.4300315" ]
0.7649557
0
Sets whether or not new bots are allowed to spawn.
public boolean allowBotSpawn(boolean allowSpawning) { if(m_spawnBots == allowSpawning) { return false; } m_spawnBots = allowSpawning; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSpawn(boolean spawn) {\r\n this.spawn = spawn;\r\n }", "boolean spawningEnabled();", "public boolean getCanSpawnHere()\r\n {\r\n return false;\r\n }", "public void setSleepingAllowed (boolean flag) {\n\t\tbody.setSleepingAllowed(flag);\n\t}", "public boolean isBot(){\n return false;\n }", "void setAllowFriendlyFire(boolean allowFriendlyFire);", "public void initDisableSpawn(String worldname) {\n\t\tspawnDisabledWorlds.add(worldname);\n\t}", "public void setAllowedByRobotsTXT(java.lang.Boolean value) {\n this.allowedByRobotsTXT = value;\n }", "private void setBlocked(boolean value) {\n\n blocked_ = value;\n }", "public default boolean shouldSpawnEntity(){ return false; }", "public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "public void setMine()\n {\n mine = true;\n }", "public boolean canRespawnHere()\n {\n return false;\n }", "private void setBaseSpawns() {\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-X:148\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Radius:20\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-X:330\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Radius:20\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-X:694\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Radius:20\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-X:876\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Y:517\");\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Radius:20\");\r\n\r\n }", "void setSpawnsRequired(double spawnsRequired);", "@Override\n\tpublic boolean setAbilities(Ability... abilities) {\n\t\treturn false;\n\t}", "public Builder setBlocked(boolean value) {\n copyOnWrite();\n instance.setBlocked(value);\n return this;\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public boolean canRespawnHere() {\n\t\treturn false;\n\t}", "public void setSpawned() {\n spawned = 1;\n setChanged();\n notifyObservers(1);\n }", "@Override\n\tpublic boolean canRespawnHere()\n\t{\n\t\treturn false;\n\t}", "public void setWhitelisted ( boolean value ) {\n\t\texecute ( handle -> handle.setWhitelisted ( value ) );\n\t}", "void spawnBot( String className, String login, String password, String messager ) {\n CoreData cdata = m_botAction.getCoreData();\n long currentTime;\n\n String rawClassName = className.toLowerCase();\n BotSettings botInfo = cdata.getBotConfig( rawClassName );\n\n if( botInfo == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"That bot type does not exist, or the CFG file for it is missing.\" );\n return;\n }\n\n Integer maxBots = botInfo.getInteger( \"Max Bots\" );\n Integer currentBotCount = m_botTypes.get( rawClassName );\n\n if( maxBots == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"The CFG file for that bot type is invalid. (MaxBots improperly defined)\" );\n return;\n }\n\n if( login == null && maxBots.intValue() == 0 ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Bots of this type are currently disabled on this hub. If you are running another hub, please try from it instead.\" );\n return;\n }\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( rawClassName, currentBotCount );\n }\n\n if( login == null && currentBotCount.intValue() >= maxBots.intValue() ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Maximum number of bots of this type (\" + maxBots + \") has been reached.\" );\n return;\n }\n\n String botName, botPassword;\n currentBotCount = new Integer( getFreeBotNumber( botInfo ) );\n\n if( login == null || password == null ) {\n botName = botInfo.getString( \"Name\" + currentBotCount );\n botPassword = botInfo.getString( \"Password\" + currentBotCount );\n } else {\n botName = login;\n botPassword = password;\n }\n\n Session childBot = null;\n\n try {\n // FIXME: KNOWN BUG - sometimes, even when it detects that a class is updated, the loader\n // will load the old copy/cached class. Perhaps Java itself is caching the class on occasion?\n if( m_loader.shouldReload() ) {\n System.out.println( \"Reinstantiating class loader; cached classes are not up to date.\" );\n resetRepository();\n m_loader = m_loader.reinstantiate();\n }\n\n Class<? extends SubspaceBot> roboClass = m_loader.loadClass( \"twcore.bots.\" + rawClassName + \".\" + rawClassName ).asSubclass(SubspaceBot.class);\n String altIP = botInfo.getString(\"AltIP\" + currentBotCount);\n int altPort = botInfo.getInt(\"AltPort\" + currentBotCount);\n String altSysop = botInfo.getString(\"AltSysop\" + currentBotCount);\n\n if(altIP != null && altSysop != null && altPort > 0)\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, altIP, altPort, altSysop, true);\n else\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, true);\n } catch( ClassNotFoundException cnfe ) {\n Tools.printLog( \"Class not found: \" + rawClassName + \".class. Reinstall this bot?\" );\n return;\n }\n\n currentTime = System.currentTimeMillis();\n\n if( m_lastSpawnTime + SPAWN_DELAY > currentTime ) {\n m_botAction.sendSmartPrivateMessage( messager, \"Subspace only allows a certain amount of logins in a short time frame. Please be patient while your bot waits to be spawned.\" );\n\n if( m_spawnQueue.isEmpty() == false ) {\n int size = m_spawnQueue.size();\n\n if( size > 1 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"There are currently \" + m_spawnQueue.size() + \" bots in front of yours.\" );\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"There is only one bot in front of yours.\" );\n }\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"You are the only person waiting in line. Your bot will log in shortly.\" );\n }\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" in queue to spawn bot of type \" + className );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader in queue to spawn bot of type \" + className );\n }\n\n String creator;\n\n if(messager != null) creator = messager;\n else creator = \"AutoLoader\";\n\n ChildBot newChildBot = new ChildBot( rawClassName, creator, childBot );\n addToBotCount( rawClassName, 1 );\n m_botStable.put( botName, newChildBot );\n m_spawnQueue.add( newChildBot );\n }", "public void setAchieved(Boolean newValue);", "private boolean isAllowed(String who){\n Boolean result = settings.containsKey(who)\n || settings.getProperty(\"components\").contentEquals(\"\");\n return result;\n }", "public void spawnRobots() {\n\t\tString robotName\t= \"\";\n\t\tPlayer newPlayer\t= null;\n\t\tint numberOfRobots \t= 0;\n\t\tint robotsPerPlayer = server.getRobotsPerPlayer();\n\t\tint numberOfPlayers = server.getPlayerCount();\n\t\tint robotsPerLevel\t= server.getRobotsPerLevel();\n\t\t\n\t\t// calculate how many robots that should be spawned\n\t\trobotsPerPlayer = robotsPerPlayer *\n\t\t\t\t\t\t (robotsPerLevel * \n\t\t\t\t\t\t currentLevel);\n\t\t\n\t\tnumberOfRobots \t= robotsPerPlayer *\n\t\t\t\t\t\t numberOfPlayers;\n\t\t\n\t\tfor(int i = 0; i < numberOfRobots; i++) {\n\t\t\trobotName \t\t\t= \"Robot\" + (i+1);\n\t\t\tnewPlayer = initPlayerToGameplane(robotName, \n\t\t\t\t\t\t\t\t \t\t\t PlayerType.Robot, \n\t\t\t\t\t\t\t\t \t\t\t 0, 0);\n\t\t\t\n\t\t\tHandleCommunication.broadcastToClient(null, \n\t\t\t\t\t\t\t\t\t\t\t\t server.getConnectedClientList(), \n\t\t\t\t\t\t\t\t\t\t\t\t SendSetting.AddPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t newPlayer, \n\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t}\n\t}", "public void setWon(){\n won = true;\n }", "protected boolean canTriggerWalking()\n {\n return false;\n }", "final boolean isRobotBlocked() {\n return mIsBlocked;\n }", "void setGodPower(boolean b);", "@Override\n\tpublic boolean canRespawnHere() {\n\t\treturn true;\n\t}", "public Boolean setFloodPerm(String floodPerm) throws PermissionDeniedException;", "public void setAllowGuestControl(boolean allowGuestControl) {\r\n this.allowGuestControl = allowGuestControl;\r\n }", "private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }", "public void setProtection(boolean value);", "public void setBlocked(Boolean blocked) {\n this.blocked = blocked;\n }", "public void permitirRobotsSuperpuestos(boolean superpuestos);", "public boolean canSpawnLightningBolt()\n {\n return this.func_150559_j() ? false : this.enableRain;\n }", "public void setEnabled (boolean enabled) {\r\n\tcheckWidget ();\r\n\tint topHandle = topHandle ();\r\n\tint flags = enabled ? 0 : OS.Pt_BLOCKED | OS.Pt_GHOST;\r\n\tOS.PtSetResource (topHandle, OS.Pt_ARG_FLAGS, flags, OS.Pt_BLOCKED | OS.Pt_GHOST);\r\n}", "public boolean areCommandsAllowed()\n {\n return allowCommands;\n }", "void setAlive(boolean isAlive);", "public boolean canInteract(){\n\t\treturn false;\n\t}", "public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}", "@NonNull\n public EmailBuilder setAllowNewAccounts(boolean allow) {\n getParams().putBoolean(ExtraConstants.ALLOW_NEW_EMAILS, allow);\n return this;\n }", "void setValidSettings(boolean valid);", "public final native void setAllowMultiple(boolean allowMultiple) /*-{\r\n\t\tthis.allowMultiple = allowMultiple;\r\n\t}-*/;", "@objid (\"7f09cb7d-1dec-11e2-8cad-001ec947c8cc\")\n public boolean allowsMove() {\n return true;\n }", "public boolean isBot() {\n//\t\treturn this.getUserIO().checkConnection();\n\t\treturn false;\n\t}", "void setProtection(boolean value);", "private boolean allowsInstantMessage()\n {\n for(ChatTransport tr : transportMenuItems.keySet())\n {\n if(tr.allowsInstantMessage())\n {\n return true;\n }\n }\n\n return false;\n }", "public boolean canDespawn()\n {\n return false;\n }", "public void setAllowRun(boolean allowRun) {\r\n\t\tthis.allowRun = allowRun;\r\n\t}", "public void setSpawnActionInNewThread(boolean spawnActionInNewThread)\n {\n this.spawnActionInNewThread = spawnActionInNewThread;\n }", "public boolean isCrossWorldActivationAllowed() {\n return getConfig().getBoolean(\"teleportal.cross-world\", true);\n }", "private void setAlive(boolean value) {\n \n alive_ = value;\n }", "public void disableChat(Reason denyReason);", "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "public void setGameWon(Boolean won){\n\t\tm_gameWon = won;\n\t}", "@Override\n public void SetSpawnProb(double SP){\n if(SP > 0.5){\n spawn = true;\n }else{\n spawn = false;\n }\n }", "public void setAwake(boolean aw)\n {\n awake = aw;\n }", "private boolean isCreateBattle() {\r\n int percent = ConfigUtil.getConfigInteger(\"battlePercent\", 30);\r\n if(RandomUtil.nextInt(100) < percent){\r\n return true;\r\n }\r\n return false;\r\n }", "public sparqles.avro.discovery.DGETInfo.Builder setAllowedByRobotsTXT(boolean value) {\n validate(fields()[0], value);\n this.allowedByRobotsTXT = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "private boolean spawn(int x, int y) {\n\t\treturn false;\n\t}", "public void control(Spawn spawn) {}", "public void setAdmin(boolean value) {\r\n this.admin = value;\r\n }", "@Override\r\n\tpublic boolean canTeleport() {\n\t\treturn false;\r\n\t}", "Boolean isAllowingNewAuctions();", "private void isAbleToBuild() throws RemoteException {\n int gebouwdeGebouwen = speler.getGebouwdeGebouwen();\n int bouwLimiet = speler.getKarakter().getBouwLimiet();\n if (gebouwdeGebouwen >= bouwLimiet) {\n bouwbutton.setDisable(true); // Disable button\n }\n }", "public void disableAddToList() {\n members_addToList.setDisable(true);\n members_removeFromList.setDisable(false);\n teams_addToList.setDisable(true);\n teams_removeFromList.setDisable(false);\n }", "public boolean getBot() {\n return bot;\n }", "public boolean canDespawn()\n {\n return true;\n }", "public boolean canCreateAnother() {\n\t\treturn new Date(startDate.getTime() + duration + cooldown)\n\t\t\t\t.before(new Date());\n\t}", "public void setAllowStop(boolean allowed);", "@Override\n public void setForceEphemeralUsers(ComponentName who, boolean forceEphemeralUsers) {\n throw new UnsupportedOperationException(\"This method was used by split system user only.\");\n }", "public void setAlive(boolean x){\n \talive = x;\r\n }", "private void setMembershipPanelEdiableFalse() {\n \n accountNrTF.setEditable(false);\n fromDateTF.setEditable(false);\n groupTrainingCB.setEnabled(false);\n monthPayTF.setEditable(false);\n pbsDateTF.setEditable(false);\n pbsNumberTF.setEditable(false);\n regNrTF.setEditable(false);\n balanceTF.setEditable(false);\n poolsCB.setEnabled(false);\n timeLimitCB.setEnabled(false);\n endDateTF.setEditable(false);\n membershipDropD.setEnabled(false);\n }", "@Override\n public void setOmni(boolean omni) {\n\n // Perform the superclass' action.\n super.setOmni(omni);\n\n // Add BattleArmorHandles to OmniMechs.\n if (omni && !hasBattleArmorHandles()) {\n addTransporter(new BattleArmorHandles());\n }\n }", "public void setCanTunnelMovement(boolean canTunnelMovement) {\n\t\tthis.canTunnelMovement = canTunnelMovement;\n\t}", "public void setNotVisibleIfNotBlockedAndReplaced() {\n\t\tif (!isBlocked && getReplacementAttribute() == null) {\n\t\t\tthis.isVisible = false;\n\t\t}\n\t}", "public boolean isAllowGuestControl() {\r\n return allowGuestControl;\r\n }", "@Override\n public boolean isNeedShowBOTPRule() {\n \treturn true;\n }", "protected void setCanBeActive(boolean canBeActive) {\n\tmCanBeActive = canBeActive;\n}", "public void setAlive() {\n\t\tif(alive)\n\t\t\talive = false;\n\t\telse\n\t\t\talive = true;\n\t}", "public void setDistributable(boolean distributable);", "private void setDefaultEnabled() {\n\t\tnewGame = new JButton(\"New Game\");\n\t\tnewGame.addActionListener(new newGameListener());\n\t\tnewGame.setEnabled(true);\n\t\tnameLabel = new JLabel(\"Player Name: \");\n\t}", "private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }", "public void setAlive() {\n\t\tif (this.alive == true) {\n\t\t\tthis.alive = false;\n\t\t} else {\n\t\t\tthis.alive = true;\n\t\t}\n\t}", "private void setMembershipPanelEditableTrue() {\n \n accountNrTF.setEditable(true);\n fromDateTF.setEditable(true);\n groupTrainingCB.setEnabled(true);\n monthPayTF.setEditable(true);\n pbsDateTF.setEditable(true);\n pbsNumberTF.setEditable(true);\n regNrTF.setEditable(true);\n balanceTF.setEditable(true);\n poolsCB.setEnabled(true);\n timeLimitCB.setEnabled(true);\n endDateTF.setEditable(true);\n membershipDropD.setEnabled(true);\n }", "public void setMine() {\r\n\t\tisMine=true;\r\n\t}", "public boolean canSpawnMore() {\n for(int e: enemiesLeft) {\n if(e > 0) {\n return true;\n }\n }\n\n return false;\n }", "@Override\n\tprotected boolean canDespawn() {\n\t\treturn false;\n\t}", "public void setByhand(java.lang.Boolean newByhand)\n\t\tthrows java.rmi.RemoteException;", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "public void setRestricted( boolean val ) {\n this.restricted = val;\n if ( !val && getFlow().getRestriction() != null ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"restriction\", null ) );\n }\n }", "public boolean isAllowed() {\n \t\treturn isAllowed;\n \t}", "public boolean isSleepingAllowed () {\n\t\treturn body.isSleepingAllowed();\n\t}", "boolean hasInstantiatePermission();", "public void setIsInPlatform(boolean val){\n setInPlatform(val);\n }", "int enableWorld(String worldName, Server server);" ]
[ "0.650009", "0.6194335", "0.6039308", "0.5820751", "0.58044356", "0.5769762", "0.5617042", "0.56052685", "0.55736184", "0.55254066", "0.5480372", "0.54572743", "0.5453233", "0.5450413", "0.5361047", "0.53282875", "0.53222394", "0.52960217", "0.52947026", "0.52809066", "0.5262284", "0.5261978", "0.5260679", "0.52386993", "0.52325934", "0.52219784", "0.51928705", "0.51797724", "0.51531184", "0.5127833", "0.51040566", "0.5103975", "0.51000136", "0.50832015", "0.5059712", "0.50592756", "0.5057793", "0.5048856", "0.5047307", "0.5021517", "0.5005405", "0.5004396", "0.49882212", "0.49797598", "0.4978257", "0.49703407", "0.4968772", "0.4967575", "0.49671152", "0.49662778", "0.49563915", "0.4955834", "0.49549854", "0.49485976", "0.49474126", "0.49466422", "0.4943918", "0.4940831", "0.49336943", "0.49319407", "0.49312323", "0.49236828", "0.49210393", "0.49096423", "0.49076468", "0.49052316", "0.49014047", "0.48989648", "0.48906553", "0.48905402", "0.48871487", "0.48861364", "0.48772877", "0.487684", "0.4862583", "0.48587137", "0.4855547", "0.48495615", "0.484626", "0.4845311", "0.48423395", "0.48388228", "0.4838288", "0.48325318", "0.48300463", "0.4828542", "0.48278165", "0.48270825", "0.48268232", "0.48178527", "0.48142433", "0.48138517", "0.4813753", "0.48131424", "0.48081017", "0.47998062", "0.47969127", "0.47936803", "0.47934473", "0.4785174" ]
0.7396128
0
Queue thread execution loop. Attempts to spawn the next bot on the waiting list, if the proper delay time has been reached.
@SuppressWarnings("unused") public void run() { Iterator<String> i; String key; Session bot; ChildBot childBot; long currentTime = 0; long lastStateDetection = 0; int SQLStatusTime = 0; final int DETECTION_TIME = 5000; while( m_botAction.getBotState() != Session.NOT_RUNNING ) { if( SQLStatusTime == 2400 ) { SQLStatusTime = 0; m_botAction.getCoreData().getSQLManager().printStatusToLog(); } try { currentTime = System.currentTimeMillis() + 1000; if( m_spawnQueue.isEmpty() == false ) { if( !m_spawnBots ) { childBot = m_spawnQueue.remove(0); if(childBot.getBot() != null) { m_botStable.remove( childBot.getBot().getBotName() ); addToBotCount( childBot.getClassName(), (-1) ); } if(childBot.getCreator() != null) { m_botAction.sendSmartPrivateMessage( childBot.getCreator(), "Bot failed to log in. Spawning of new bots is currently disabled."); } m_botAction.sendChatMessage( 1, "Bot of type " + childBot.getClassName() + " failed to log in. Spawning of new bots is currently disabled."); } else if( m_lastSpawnTime + SPAWN_DELAY < currentTime ) { childBot = m_spawnQueue.remove( 0 ); bot = childBot.getBot(); bot.start(); while( bot.getBotState() == Session.STARTING ) { Thread.sleep( 5 ); } if( bot.getBotState() == Session.NOT_RUNNING ) { removeBot( bot.getBotName(), "log in failure; possible bad login/password" ); m_botAction.sendSmartPrivateMessage( childBot.getCreator(), "Bot failed to log in. Verify login and password are correct." ); m_botAction.sendChatMessage( 1, "Bot of type " + childBot.getClassName() + " failed to log in. Verify login and password are correct." ); } else { if(childBot.getCreator() != null) { m_botAction.sendSmartPrivateMessage( childBot.getCreator(), "Your new bot is named " + bot.getBotName() + "." ); m_botAction.sendChatMessage( 1, childBot.getCreator() + " spawned " + childBot.getBot().getBotName() + " of type " + childBot.getClassName() ); } else m_botAction.sendChatMessage( 1, "AutoLoader spawned " + childBot.getBot().getBotName() + " of type " + childBot.getClassName() ); } m_lastSpawnTime = currentTime; } } // Removes bots that are no longer running. if( lastStateDetection + DETECTION_TIME < currentTime ) { for( i = m_botStable.keySet().iterator(); i.hasNext(); ) { key = i.next(); childBot = m_botStable.get( key ); if( childBot.getBot().getBotState() == Session.NOT_RUNNING && key != null) { String removalStatus = removeBot( key ); if( key == null ) m_botAction.sendChatMessage( 1, "NOTICE: Unknown (null) bot disconnected without being properly released from stable." ); else m_botAction.sendChatMessage( 1, key + "(" + childBot.getClassName() + ") " + removalStatus + "." ); childBot = null; } } lastStateDetection = currentTime; } SQLStatusTime++; Thread.sleep( 1000 ); } catch( ConcurrentModificationException e ) { //m_botAction.sendChatMessage( 1, "Concurrent modification. No state detection done this time" ); } catch( Exception e ) { Tools.printStackTrace( e ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void execute() {\n thread = Thread.currentThread();\n while (!queue.isEmpty()) {\n if (currentThreads.get() < maxThreads) {\n queue.remove(0).start();\n currentThreads.incrementAndGet();\n } else {\n try {\n Thread.sleep(Long.MAX_VALUE);\n } catch (InterruptedException ex) {}\n }\n }\n while (currentThreads.get() > 0) {\n try {\n Thread.sleep(Long.MAX_VALUE);\n } catch (InterruptedException ex) {}\n }\n }", "protected abstract long waitOnQueue();", "private void awaitT(){\n try {\n game.getBarrier().await(20, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (BrokenBarrierException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n trimBarrier();\n synchronized (lock){\n if(!botSignal){\n bot = new BotClient();\n new Thread(bot).start();\n botSignal = true;\n }\n\n }\n }\n }", "private void busquets() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -25;\n\t\tint yInit = -10;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit *selfPerception.getSide().value());\n\t\t\n\t\twhile (commander.isActive()) {\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\tstate = State.ATTACKING;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\t//if(closer)\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void listWaitingList( String messager ) {\n int i;\n ChildBot bot;\n ListIterator<ChildBot> iterator;\n\n m_botAction.sendSmartPrivateMessage( messager, \"Waiting list:\" );\n\n for( iterator = m_spawnQueue.listIterator(), i = 1; iterator.hasNext(); i++ ) {\n bot = iterator.next();\n m_botAction.sendSmartPrivateMessage( messager, i + \": \" + bot.getBot().getBotName() + \", created by \" + bot.getCreator() + \".\" );\n }\n\n m_botAction.sendSmartPrivateMessage( messager, \"End of list\" );\n }", "public void delay(long waitAmount){\r\n long time = System.currentTimeMillis();\r\n while ((time+waitAmount)>=System.currentTimeMillis()){ \r\n //nothing\r\n }\r\n }", "@Override\n public synchronized void run() {\n while (true) {\n int nodesInQueue = 0;\n //find nodes for jobs to run on\n Iterator<AmuseJob> iterator = queue.iterator();\n while (iterator.hasNext()) {\n AmuseJob job = iterator.next();\n\n if (job.isPending()) {\n //find nodes to run this job on. Always only a single pilot, but may contain multiple nodes per pilot.\n PilotManager target = pilots.getSuitablePilot(job);\n\n //If suitable nodes are found\n if (target != null) {\n job.start(target);\n //remove this job from the queue\n iterator.remove();\n } else {\n nodesInQueue++;\n }\n } else {\n //remove this job from the queue\n iterator.remove();\n }\n }\n\n if (nodesInQueue > 0) {\n logger.info(\"Now \" + nodesInQueue + \" waiting in queue\");\n }\n \n try {\n wait(5000);\n } catch (InterruptedException e) {\n logger.debug(\"Scheduler thread interrupted, time to quit\");\n return;\n }\n \n \n }\n }", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"AddToQueue Thread Running\");\n\t\t//Create passenger creator\n\t\tCreatePassenger creator = new CreatePassenger();\n\t\t//Start time\n\t\tint start = LocalDateTime.now().getSecond();\n\t\tint time = 0;\n\t\tcounter = 0;\n\t\t//Loop until counter reaches max passengers or time equals max time\n\t\twhile(counter <= MAX_PASSENGERS && time < MAX_TIME) {\n\t\t\t//Create new passenger\n\t\t\tPassenger arrived = creator.create();\n\t\t\t//Add passenger to order array\n\t\t\tthis.arrivedAdd(arrived);\n\t\t\t//Clear line\n\t\t\tSystem.out.print(\"\\033[2K\");\n\t\t\t//Add passenger to queue\n\t\t\tqueue.offer(arrived);\n\t\t\t//Incremement counter\n\t\t\tcounter++;\n\t\t\t//Print out new queue\n\t\t\tSystem.out.print(\"\\r\" + queue);\n\t\t\tint now = LocalDateTime.now().getSecond();\n\t\t\tif(now >= start) {\n\t\t\t\t\ttime = now - start;\n\t\t\t} else {\n\t\t\t\ttime = (now + 59) - start;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(300); \n\t\t\t} catch(InterruptedException e) {\n\t\t\t\tSystem.out.println(\"Error! Thread was interrupted!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void initialBlockOnMoarRunners() throws InterruptedException\n {\n lock.lock();\n try\n {\n if (taskQueue.isEmpty() && runners > 1)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n }\n }\n finally\n {\n lock.unlock();\n }\n }", "public void executWaiting() {\n for (Runnable action : this.todo) {\n runAction( action );\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\twhile (true) {\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (Message message : pending) {\n\t\t\t\t\t\tif (canLCBdeliver(message)) {\n\t\t\t\t\t\t\tfifoBC.canDeliver(message);\n\t\t\t\t\t\t\tp.Pendinglock.lock();\n\t\t\t\t\t\t\tpending.remove(message);\n\t\t\t\t\t\t\tp.Pendinglock.unlock();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"Failed to sleep in deliver thread.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\r\n public void run() {\r\n CountDown.addItems(3);\r\n while(AH_AgentThread.running) {\r\n try {\r\n int i = 0;\r\n ArrayList<Item> auctionList = getAuctionList();\r\n int size = auctionList.size();\r\n int needed = 3 - auctionList.size();\r\n if(needed > 0){\r\n addItems(needed);\r\n }\r\n //change to while\r\n while(i < size) {\r\n Item listItem = auctionList.get(i);\r\n long currentTime = System.currentTimeMillis();\r\n listItem.remainingTime(currentTime);\r\n long timeLeft = listItem.getRemainingTime();\r\n if (timeLeft <= 0) {\r\n itemResult(listItem);\r\n }\r\n i++;\r\n size = auctionList.size();\r\n }\r\n Thread.sleep(500);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void nextTurn() {\r\n ArrayList<Bomb> copy_bombs = new ArrayList<>(this.bombs);\r\n for (Bomb b : copy_bombs) {\r\n if(b.getDelay() == 1){\r\n this.explode = true;\r\n }\r\n b.tick();\r\n b.explode(this);\r\n }\r\n this.ordering = new LinkedList<>();\r\n this.fillPlayerQueue();\r\n if (this.random_order) {\r\n Collections.shuffle((List)this.ordering);\r\n }\r\n\r\n this.turn_number++;\r\n }", "@Override\r\n\tpublic void run() {\r\n\t\twhile (!player.gameEnd) {\r\n\t\t\tif (fst) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tfst = false ; \r\n\t\t\t\t}catch (Exception e ) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayer.moveDownn();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(time_to_sleep);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void run(){\n long startTime = System.nanoTime();\n long elapsedTime = System.nanoTime() - startTime;\n while(elapsedTime<500000000 && p.acknowledged == false){\n //echo(\"Waiting\");\n elapsedTime = System.nanoTime() - startTime;\n if(p.acknowledged == true){\n return;\n }\n }\n if(elapsedTime>= 500000000)\n {\n p.timed = true;\n //System.out.println(\"thread timed out at packet \"+ p.getSeq());\n for(int i=p.getSeq(); i<p.getSeq()+window; i++){\n if(i<packets.size()){\n packets.get(i).sent = false;\n }\n }\n //p.sent = false;\n }\n\n\n }", "@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\tqueue.get();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run(){\n while(true){\n ArrayList<Thread> threads = new ArrayList<Thread>();\n \n //construct the string\n String message = String.format(\"hb|%d|%d\", serverPort, sequence);\n\n //have a thread to send heart beat\n for(ServerInfo peer : serverStatus.keySet()){\n //pass it to the client runnable\n Thread thread = new Thread(new SenderRunnable(peer, message));\n threads.add(thread);\n thread.start();\n }\n\n //wait for the completion\n for(Thread thread : threads){\n try{\n thread.join();\n }catch(Exception e){}\n \n \n }\n\n //increment the sequence by 1\n sequence += 1;\n\n //sleep for 2 secs\n try{\n Thread.sleep(2000);\n }catch(InterruptedException e){\n //System.err.println(e);\n }\n\n }\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\ttry {\r\n\t\t for (int i = 0; i < 30; i++) {\r\n\t\t Thread.sleep(3500);\r\n\t\t try { \r\n\t\t\t\t\t\t\tif(str!=\" \"){\r\n\t\t\t\t\t\t\t\tstr=bf.readLine();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t \r\n\t\t Message msg = new Message();\r\n\t\t handler.sendMessage(msg);\r\n\t\t }\r\n\t\t Intent intent=new Intent(main.this,end.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tmain.this.finish();\r\n\t\t } catch (InterruptedException e) {\r\n\t\t\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t}", "void threadDelay() {\n saveState();\n if (pauseSimulator) {\n halt();\n }\n try {\n Thread.sleep(Algorithm_Simulator.timeGap);\n\n } catch (InterruptedException ex) {\n Logger.getLogger(RunBFS.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (pauseSimulator) {\n halt();\n }\n }", "public void run ()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep (ageLimit);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tif (threads.size () > threadMinimum)\n\t\t\t\t{\n\t\t\t\t\tint theThreadCount = threads.size ();\n\t\t\t\t\tthreads.filteredRemoval (new I_QueueFilter ()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpublic boolean filter (Object aPayload)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tboolean retVal = false;\n\t\t\t\t\t\t\t\tif (threadCount > threadMinimum &&\n\t\t\t\t\t\t\t\t\taPayload != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tA_MessageThread theThread = (A_MessageThread) aPayload;\n\t\t\t\t\t\t\t\t\tretVal = theThread.tryThreadShutdown (ageLimit);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn retVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\tif (theThreadCount != threads.size ())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotifyThreadListeners (threadCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n // If we've sent all the messages\n if (count >= bombAmount)\n {\n SwapSendButton(0);\n }\n // If we get our defuseal text\n if (bombDefuse.equals(SmsListener.messageBody))\n {\n SwapSendButton(0);\n Toast.makeText(getApplicationContext(), \"Bomb Defused\", Toast.LENGTH_SHORT).show();\n }\n else if (count < bombAmount && !bombDefuse.equals(SmsListener.messageBody))\n {\n // a delay of 0 doesn't work IRL\n // So in truth the quickest you can send a text bomb is 1 second apart\n if (delayAmount < 1)\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, ((delayAmount + 1) * 1000));\n ++count;\n }\n else\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, (delayAmount * 1000));\n ++count;\n }\n }\n }", "public void run() {\n for (CrawlTask newTask = queue.pop(level); newTask != null; newTask = queue.pop(level))\n /*while (queue.getQueueSize(currentLevel)>0)*/ {\n//\t\t\tObject newTask = queue.pop(currentLevel);\n // Tell the message receiver what we're doing now\n mainCrawler.receiveMessage(newTask, id);\n // Process the newTask\n process(newTask);\n // If there are less threads running than it could, try\n // starting more threads\n if (tc.getMaxThreads() > tc.getRunningThreads()) {\n try {\n tc.startThreads();\n } catch (Exception e) {\n System.err.println(\"[\" + id + \"] \" + e.toString());\n }\n }\n }\n // Notify the ThreadController that we're done\n tc.finished(id);\n }", "private void startGameAfterDelay() {\n int delay = (int) (double) DiaConfig.SECONDS_UNTIL_START.get() * MinecraftConstants.TICKS_PER_SECOND + 1;\n\n this.startingTask = new BukkitRunnable() {\n @Override\n public void run() {\n startGame();\n }\n }.runTaskLater(DiaHuntPlugin.getInstance(), delay);\n }", "public final void run() {\n while (isrunning) {\n try {\n LDAPMessage response = null;\n\n while ((isrunning)\n && (!searchqueue.isResponseReceived(messageid))) {\n try {\n sleep(sleepTime);\n } catch (InterruptedException e) {\n ///CLOVER:OFF\n // ignore exception, just log it\n if (Debug.LDAP_DEBUG) {\n Debug.trace(\n Debug.EventsCalls,\n \"Interrupt Exception\"\n + e.getMessage());\n }\n ///CLOVER:ON\n }\n }\n\n if (isrunning) {\n response = searchqueue.getResponse(messageid);\n }\n\n if (response != null) {\n processmessage(response);\n }\n } catch (LDAPException e) {\n ///CLOVER:OFF\n LDAPExceptionEvent exceptionevent =\n new LDAPExceptionEvent(eventsource, e, null);\n eventlistener.ldapExceptionNotification(\n exceptionevent);\n ///CLOVER:ON\n }\n }\n }", "public void flushQueue() {\n // Ignore if queue is empty\n if (playersQueue.isEmpty())\n return;\n\n // Get status of target server\n ServerInfoGetter mainServerInfo = ServerInfoGetter.awaitServerInfo(Config.target);\n\n // Allow player to join the main server - 1s (ping timeout) + ~500ms (connection time) < 2s (interval)\n if (mainServerInfo.isOnline && mainServerInfo.playerCount < Config.maxPlayers && Math.min(Config.maxPlayers - mainServerInfo.playerCount, playersQueue.size()) > 0) {\n try {\n mutex.acquire();\n\n ProxiedPlayer player = null;\n\n // try to find the first player that got not kicked recently\n for (ProxiedPlayer testPlayer : playersQueue) {\n if (kickedPlayers.containsKey(testPlayer)) continue;\n\n player = testPlayer;\n break;\n }\n\n // if no player was found return\n if (player == null) return;\n\n playersQueue.remove(player);\n\n if (player.isConnected()) {\n ProxiedPlayer finalPlayer = player;\n ServerInfo targetServer = ProxyServer.getInstance().getServerInfo(Config.target);\n\n if (isNotConnected(player, targetServer)) {\n Callback<Boolean> cb = (result, error) -> {\n if (result) {\n Main.log(\"flushQueue\", \"§3§b\" + finalPlayer.toString() + \"§3 connected to §b\" + Config.target + \"§3. Queue count is \" + playersQueue.size() + \". Main count is \" + (mainServerInfo.playerCount + 1) + \" of \" + Config.maxPlayers + \".\");\n } else {\n Main.log(\"flushQueue\", \"§c§b\" + finalPlayer.toString() + \"s§c connection to §b\" + Config.target + \"§c failed: \" + error.getMessage());\n finalPlayer.sendMessage(TextComponent.fromLegacyText(\"§cConnection to \" + Config.serverName + \" failed!§r\"));\n playersQueue.add(finalPlayer);\n }\n };\n\n player.sendMessage(TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&', Config.messageConnecting) + \"§r\"));\n player.connect(targetServer, cb);\n } else {\n player.disconnect(TextComponent.fromLegacyText(\"§cYou are already connected to \" + Config.serverName + \"!\"));\n Main.log(\"flushQueue\", \"§c§b\" + player.toString() + \"§c was disconnected because there was already a connection for this account to the server.\");\n }\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n mutex.release();\n }\n }\n }", "@Override\n public void run() {\n try{\n for(int n = 0;n < 20; n++){\n //This simulates 1sec of busy activity\n Thread.sleep(1000);\n //now talk to the ain thread\n myHandler.post(foregroundTask);\n }\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile (i < 50) {\r\n\t\t\t\t\tString job = Thread.currentThread().getName() + \"---\" + new Random(99999L).toString();\r\n\t\t\t\t\tprinter.addJob(job);\r\n\t\t\t\t\tSystem.out.println(\"Added \" + job + \" to Printer Queue\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(15);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void run() {\n if (this.runQueueProcessor.get()) {\n try {\n // wait until we are ready to run again\n if (this.tools.getTimestamp() >= this.runAgainAfterMs.get()) {\n\n long timeNow = this.tools.getTimestamp();\n long sinceLastRun = timeNow - this.lastRun;\n long sinceLastKick = timeNow - this.lastKicked;\n\n boolean kicked = sinceLastRun > sinceLastKick;\n double secondsSinceLastRun = sinceLastRun / 1000.0;\n LogMap logmap = LogMap.map(\"Op\", \"queuecheck\")\n .put(\"gap\", secondsSinceLastRun)\n .put(\"kicked\", kicked);\n this.logger.logDebug(this.logFrom, String.format(\"queue check: last check was %.1fs ago%s\",\n secondsSinceLastRun,\n (kicked) ? String.format(\", kicked %.1fs ago\", sinceLastKick / 1000.0) : \"\"),\n logmap);\n this.lastRun = timeNow;\n\n // by default, wait a small amount of time to check again\n // this may be changed inside processQueue\n queueCheckAgainAfter(this.config.getProcessQueueIntervalDefault());\n\n // process queue now\n processQueue();\n }\n } catch (Exception e) {\n this.logger.logException(this.logFrom, e);\n }\n }\n }", "public synchronized void waitingToThraeds()\n\t{\n\t\twhile (countOfThreads<numberOfThreads)\n\t\t\n\t\ttry \n\t\t{\n\t\t\twait();\n\t\t}\n\t\tcatch(InterruptedException e)\n\t\t{\n\t\t\tSystem.out.println(\"Interrupted while waiting\");\n\t\t}\n\t \t\n\t\t\n \t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\twhile(true){\n\t\t\t\t\t\n\t\t\t\t\tlong time = System.currentTimeMillis();\n\t\t\t\t\tgameLoop();\n\t\t\t\t\t\n\t\t\t\t\tlong waitTime = 100 - time;\n\t\t\t\t\t\n\t\t\t\t\tif(waitTime < 10){\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitTime = 10;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(waitTime);\n\t\t\t\t\t} catch (InterruptedException 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}\n\t\t\t}", "@Override\n\t\tpublic void run() {\n\n\t\t\twhile (isRun) {\n\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(500);\n\n\t\t\t\t\tisRun = false;\n\t\t\t\t\thandler.sendEmptyMessage(2);\n\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tTask t = bq.take();\n\n\t\t\t\t\n\t\t\t\tThread.sleep(t.getProcessTime() * 1000);\n\t\t\t\twaitingTime.addAndGet((-1) * t.getProcessTime());\n\t\t\t\tSimulator.getFrame().displayData(\"Client \"+t.getNr()+\" left. \\n\");\n\t\t\t\tsize--;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void run(){\n try{\n while (true) {\n if (Running && step==1) {\n if (pause_before) {\n Thread.sleep(speed);\n pause_before = false;\n }\n handler1.sendEmptyMessage(1);\n setStep(2);\n Thread.sleep(750);//time pause for 0.75s, allow the screen to stay in no mole for 0.75s\n\n }\n if (Running && step==2) {\n if (pause_before) {\n Thread.sleep(750);\n pause_before = false;\n }\n next = (int) (Math.random() * 9) + 1;\n handler2.sendEmptyMessage(1);\n if (random)\n speed = (int) (Math.random() * 751) + 250;\n setStep(1);\n Thread.sleep(speed);//time pause for 0.75s, by default, allow the screen to stay in mole for 0.75s\n next = 0;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic void run() {\n\t\twhile (true) {\r\n\t\t\tif (MatchReqPool.size() == 0) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tmatchReqDao = new MatchReqDaoImpl();\r\n\r\n\t\t\t\t\tList<MatchReq> list = matchReqDao.getAllNewReq();\r\n\r\n\t\t\t\t\tIterator<MatchReq> iterator = list.iterator();\r\n\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\t\t\tLogger.info(\"Has New Request....\");\r\n\r\n\t\t\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\t\t\tMatchReq req = iterator.next();\r\n\t\t\t\t\t\t\treq.setPoint(\"[0:0]\");\r\n\t\t\t\t\t\t\treq.setStatus(MatchStatus.START);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatchReqDao.update(list);\r\n\t\t\t\t\t\tMatchReqPool.put(list);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (MatchException em) {\r\n\t\t\t\t\tem.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tsleep(5000);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We cannot wait for the request infinitely, but we also cannot remove the object\n * from the queue - FIXME in case of situation when queue of waiting objects grow to X we have to\n * brake connection.\n */\n\n Iterator<RedisQueryRequest> iterator = queue.iterator();\n int i = 0;\n long timeNow = System.currentTimeMillis();\n /*\n * we are tracking 'i' because we want to do only some work, not all the work.\n * we cannot take too much time in timeout checking.\n */\n\n while (iterator.hasNext() && i < 100) {\n RedisQueryRequest current = iterator.next();\n if (current.isTimeouted()) {\n //already been here.\n continue;\n }\n long whenRequestStarted = current.getRequestTimeStart();\n long requestTimeUntilNow = timeNow - whenRequestStarted;\n if (requestTimeUntilNow >= 1000) {\n LOG.error(\"Timeouted request detected\");\n current.markTimeouted();\n current.getCompletableFuture().completeExceptionally(new TimeoutException(\"Timeout occurred.\"));\n }\n\n i++;\n }\n\n }, 100, 100, TimeUnit.MILLISECONDS);\n }", "public void crawlDelay()\n\t{\n//\t\tint delay = robot.getCrawlDelay(best_match);\n//\t\tif (delay!=-1)\n//\t\t{\n//\t\t\ttry \n//\t\t\t{\n//\t\t\t\tTimeUnit.SECONDS.sleep(robot.getCrawlDelay(best_match));\n//\t\t\t} \n//\t\t\tcatch (InterruptedException e) \n//\t\t\t{\n//\t\t\t\treturn;\n//\t\t\t}\n//\t\t}\n\t}", "@Override\r\n\tpublic synchronized void run() {\r\n\r\n\t\t// Declare and initialise variable\r\n\t\tint admissionNumber = 0;\r\n\r\n\t\tdo {\r\n\r\n\t\t\t// Increment patient number\r\n\t\t\tadmissionNumber++;\r\n\r\n\t\t\t// Set triage rating\r\n\t\t\ttry {\r\n\t\t\t\tReceptionist.patientsFromDB.get(0).setTriageNumber(\r\n\t\t\t\t\t\tpresetTriageNumber());\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// Set patient's admission number\r\n\t\t\tReceptionist.patientsFromDB.get(0).setAdmissionNumber(\r\n\t\t\t\t\tadmissionNumber);\r\n\t\t\t\r\n\t\t\t// Get new instant of time\r\n\t\t\tInstant startWait = Instant.now();\r\n\r\n\t\t\t// Set time patient added to waiting list in milliseconds since the\r\n\t\t\t// 1970 epoch\r\n\t\t\tReceptionist.patientsFromDB.get(0).setStartTimeWait(\r\n\t\t\t\t\tstartWait.toEpochMilli());\r\n\r\n\t\t\t// Add patient to Queue\r\n\t\t\thospQueue.addToQueue(Receptionist.patientsFromDB.get(0));\r\n\r\n\t\t\t// Remove first patient from the LinkedList of patients imported\r\n\t\t\t// from the database\r\n\t\t\tReceptionist.patientsFromDB.removeFirst();\r\n\r\n\t\t\t// Pause to represent gaps between patients - set at 1 to 2 minutes\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep((random.nextInt(60000) + 60000)\r\n\t\t\t\t\t\t/ TheQueue.TIME_FACTOR);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// While there are patients in the LinkedList from database\r\n\t\t} while (Receptionist.patientsFromDB.size() != 0);\r\n\r\n\t}", "void runQueue();", "public void run() {\n\t\tcurrentTime = 0;\n\t\twhile (currentTime < timeLimit) {\n\t\t\t// add chosen task(s) to the scheduler\n\t\t\taddTaskToServer();\n\t\t\t// calculate the peak hour in every step and empty queue time\n\t\t\tcalculatePeakHour();\n\t\t\tcalculateEmptyQueueTime();\n\t\t\t// show the evolution of the queues\n\t\t\tframe.displayData(getTasks(), generatedTasks, currentTime);\n\t\t\tcurrentTime++;\n\t\t\ttry {\n\t\t\t\tThread.sleep(simulationSpeed);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// the time is over, stop other threads from running\n\t\tframe.displayData(getTasks(), generatedTasks, currentTime);\n\t\tthis.scheduler.stopServers();\n\t\t// wait one more second before showing statistics\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\tframe.dispayStatistics();\n\n\t\twriter.close();\n\t}", "BotQueue( ThreadGroup group, BotAction botAction ) {\n super( group, \"BotQueue\" );\n repository = new Vector<File>();\n m_group = group;\n m_lastSpawnTime = 0;\n m_botAction = botAction;\n directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( \"Core Location\" ));\n\n int delay = m_botAction.getGeneralSettings().getInt( \"SpawnDelay\" );\n\n if( delay == 0 )\n SPAWN_DELAY = 20000;\n else\n SPAWN_DELAY = delay;\n\n if ( m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"localhost\") ||\n m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"127.0.0.1\"))\n SPAWN_DELAY = 100;\n\n resetRepository();\n\n m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() );\n m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() );\n m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() );\n\n m_botTypes.put( \"hubbot\", new Integer( 1 ));\n\n if( repository.size() == 0 ) {\n Tools.printLog( \"There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?\" );\n } else {\n System.out.println( \"Looking through \" + directory.getAbsolutePath()\n + \" for bots. \" + (repository.size() - 1) + \" child directories.\" );\n System.out.println();\n System.out.println(\"=== Loading bots ... ===\");\n }\n\n m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() );\n }", "private void requestThread() {\n while (true) {\n long elapsedMillis = System.currentTimeMillis() - lastHeartbeatTime;\n long remainingMillis = heartbeatMillis - elapsedMillis;\n if (remainingMillis <= 0) {\n sendHeartbeats();\n } else {\n try {\n Thread.sleep(Math.max(remainingMillis, 3));\n } catch (InterruptedException e) {\n }\n }\n }\n }", "@Test\n public void testQueueLimiting() throws Exception {\n // Block the underlying fake proxy from actually completing any calls.\n DelayAnswer delayer = new DelayAnswer(LOG);\n Mockito.doAnswer(delayer).when(mockProxy).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(1L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n \n // Queue up the maximum number of calls.\n int numToQueue = LIMIT_QUEUE_SIZE_BYTES / FAKE_DATA.length;\n for (int i = 1; i <= numToQueue; i++) {\n ch.sendEdits(1L, (long)i, 1, FAKE_DATA);\n }\n \n // The accounting should show the correct total number queued.\n assertEquals(LIMIT_QUEUE_SIZE_BYTES, ch.getQueuedEditsSize());\n \n // Trying to queue any more should fail.\n try {\n ch.sendEdits(1L, numToQueue + 1, 1, FAKE_DATA).get(1, TimeUnit.SECONDS);\n fail(\"Did not fail to queue more calls after queue was full\");\n } catch (ExecutionException ee) {\n if (!(ee.getCause() instanceof LoggerTooFarBehindException)) {\n throw ee;\n }\n }\n \n delayer.proceed();\n\n // After we allow it to proceeed, it should chug through the original queue\n GenericTestUtils.waitFor(new Supplier<Boolean>() {\n @Override\n public Boolean get() {\n return ch.getQueuedEditsSize() == 0;\n }\n }, 10, 1000);\n }", "private void _wait() {\n\t\tfor (int i = 1000; i > 0; i--)\n\t\t\t;\n\t}", "public Move startThreads() throws Exception {\n ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(4);\n ArrayList<Thread> threadBots = new ArrayList<>();\n\n for (Move move : moves) {\n board.doMove(move);\n Thread threadBot = new Thread(new Runnable() {\n @Override\n public void run() {\n return;\n }\n });\n board.undoMove();\n threadBots.add(threadBot);\n executor.execute(threadBot);\n }\n executor.shutdown();\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n\n //int return_index = maxMinIndex(threadBots, board.getSideToMove());\n if (executor.isTerminated()) {\n for (int i = 0; i < moves.size(); i++) {\n //evaluations.add(threadBots.get(i).return_value);\n }\n }\n\n double ret;\n if (board.getSideToMove() == Side.BLACK) {\n ret = Collections.min(evaluations); // min/max -> bot is black/white\n } else {\n ret = Collections.max(evaluations);\n }\n //System.out.println(ret);\n\n //System.out.println(threadBots.get(return_index).return_value);\n //double after = System.currentTimeMillis();\n //double durationMS = (after - before);\n //System.out.println(\"Time: \" + durationMS + \" ms\");\n //System.out.println(\"Bots possible moves: \" + moves);\n //return moves.get(return_index);\n\n //System.out.println(evaluations);\n //System.out.println(moves.get(evaluations.indexOf(ret)));\n return (moves.get(evaluations.indexOf(ret)));\n }", "public static void checkQueue(){\n if(Duel.getLobby().getQueue().size() >= 2){\n Duel.getGameManager().startingAGame();\n// for(Player player : Bukkit.getOnlinePlayers()){\n// if(Lobby.getQueue().get(0).equals(player.getUniqueId()) || Lobby.getQueue().get(1).equals(player.getUniqueId())){\n// Duel.getGameManager().startingAGame();\n// }\n// for(UUID uuid : Lobby.getQueue()){\n// Duel.getGameManager().startingAGame();\n// }\n }\n }", "@Override\n\tpublic void run() {\t\n\t\tint maxNum = (maxCustomerNumOnline > maxCustomerNumShop) ? maxCustomerNumOnline : maxCustomerNumShop;\n\t\t\n\t\tfor(int i = 0; i < maxNum; i++) {\n\t\t\t// every number of milliseconds, add customer to end of queue \n\t\t\ttry {\t\t\t\n\t\t\t\t// if online queue exists add to it \n\t\t\t\tif (i < maxCustomerNumOnline) {\n\t\t\t\t\tCustomerQueueOutput out = onlineQueue.addToQueue();\n\t\t\t\t\tCoffeeShop.customerList.put(out.getCustomer().getId(), out.getCustomer());\n\t\t\t\t\t\n\t\t\t\t\tlog.updateLog(\"[QueueHandler]: \"+ \"Queue Handler added customer \" + out.getCustomer().getName() + \n\t\t\t\t\t\t\t\" (ID: \" + out.getCustomer().getId() + \") to online queue -> updated size: \" \n\t\t\t\t\t\t\t+ out.getUpdatedSize());\n\t\t\t\t}\n\n\t\t\t\tif (i < maxCustomerNumShop) {\n\t\t\t\t\t// add to in-shop queue \n\t\t\t\t\tCustomerQueueOutput out = shopQueue.addToQueue();\n\t\t\t\t\tCoffeeShop.customerList.put(out.getCustomer().getId(), out.getCustomer());\n\t\t\t\t\t\n\t\t\t\t\tlog.updateLog(\"[QueueHandler]: \"+ \"Queue Handler added customer \" + out.getCustomer().getName() + \n\t\t\t\t\t\t\t\" (ID: \" + out.getCustomer().getId() + \") to in-shop queue -> updated size: \" \n\t\t\t\t\t\t\t+ out.getUpdatedSize());\n\t\t\t\t}\t\t\t\t\t\t\n\n\t\t\t\t// delay for visualization purposes \n\t\t\t\tThread.sleep(onlineQueue.getDelay());\n\t\t\t\t\n\t\t\t// catch exception for calling sleep() function\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlog.updateLog(\"[QueueHandler]: \"+ \"Interuption in queueHandler\");\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\t\t\n\t}", "@Override\npublic void run() {\n\n while(true){\n \n driveSimulation();\n\n waitSleep(5);\n }\n \n}", "@Override\n public void run() {\n while (isRun) {\n count--;\n handler.sendEmptyMessage(10);\n try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n }", "protected void block() {\n while (true) {\n if (System.currentTimeMillis() - lastMovement > 2000) {\n return;\n }\n }\n \n }", "private static void delay() throws InterruptedException {\n\t\tTimeUnit.MILLISECONDS.sleep((long) (minDelay + (long)(Math.random() * ((maxDelay - minDelay) + 1))));\n\t}", "public void run() {\r\n while(true) { // outer loop\r\n if(first) // we already have the queue CAS acquired\r\n first=false;\r\n else {\r\n if(!queue.acquire())\r\n return;\r\n }\r\n\r\n try {\r\n Message msg_to_deliver;\r\n while((msg_to_deliver=queue.remove()) != null) { // inner loop\r\n try {\r\n up_prot.up(new Event(Event.MSG, msg_to_deliver));\r\n }\r\n catch(Throwable t) {\r\n log.error(\"couldn't deliver message \" + msg_to_deliver, t);\r\n }\r\n }\r\n }\r\n finally {\r\n queue.release();\r\n }\r\n\r\n // although ConcurrentLinkedQueue.size() iterates through the list, this is not costly,\r\n // as at this point, the queue is almost always empty, or has only a few elements\r\n if(queue.size() == 0) // prevents a concurrent add() (which returned) to leave a dangling message in the queue\r\n break;\r\n }\r\n }", "private void waitForBuyersAction() throws InterruptedException\n {\n while(waiting)\n {\n Thread.sleep(100);\n }\n waiting = true;\n }", "@Override\n public void run() {\n ICBlock currentBlock = null;\n\n while (running) {\n try {\n currentBlock = mQueue.take();\n currentBlock.doAction();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n\n }\n\n\n }", "private void step ()\n {\n // a car arrives approximately every four minutes\n int chance = randGen.nextInt(CarWashApplication.CHANCE_INT);\n if (chance == 0)\n {\n waitingLine.enqueue(new Car(currentTime));\n numCars++;\n\n /** For printed output of each step */\n //System.out.println(currentTime);\n //waitingLine.toPrint();\n }\n\n // process the waiting cars\n if (bay.isEmpty() && !waitingLine.isEmpty())\n {\n bay.startWash();\n Car car = (Car) waitingLine.dequeue();\n waitTimeArray[arrayIndex] = currentTime - (car.arrivalTime());\n arrayIndex++;\n }\n\n if (!bay.isEmpty())\n bay.keepWashing();\n\n currentTime++;\n }", "public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }", "public void run() {\n\n\t\tQueueObject qO = null;\n\t\tQueueRUNNING = true;\n\t\tint iNext = -1;\n\t\t// if not RUNNING, then check queue\n\t\t// get next object\n\t\t// set to running\n\n\t\twhile (TRUE) {\n\n\t\t\tif (QueueRUNNING) {\n\t\t\t\t//date = new Date();\n\n\t\t\t\t// don't get next job until free in run queue, except for\n\t\t\t\t// standard jobs\n\t\t\t\tif (!bRunning)\n\t\t\t\t\tiNext = Queue.getNextJobToRun();\n\n\t\t\t\tif ((!bRunning) && (iNext != Globals.NOT_FOUND)) {\n\t\t\t\t\tqO = Queue.get(iNext);\n\n\t\t\t\t\tint id = qO.getID();\n\t\t\t\t\tqO.setStart(); // update the object\n\t\t\t\t\tQueue.set(iNext, qO); // update the object in the queue\n\n\t\t\t\t\tif (id == SITEMAP) {\n\t\t\t\t\t\tbRunning = true;\n\t\t\t\t\t\tsiteMap = new SiteMapThread(qO.getJobID());\n\t\t\t\t\t\tsiteMap.start();\n\t\t\t\t\t}\n//\t\t\t\t\tif (id == CHECK_NEW_PHOTOS) {\n//\t\t\t\t\t\tcheck = new CheckDirectoryStructure(qO.getJobID());\n//\t\t\t\t\t\tcheck.start();\n//\t\t\t\t\t}\n//\t\t\t\t\tif (id == RASTERIZE) {\n//\t\t\t\t\t\trasterize = new WatchRastQueue(qO.getJobID());\n//\t\t\t\t\t\trasterize.start();\n//\t\t\t\t\t}\n\n//\t\t\t\t\tif (id == XMLUPDATE) {\n//\t\t\t\t\t\txmlUpdate = new WatchXMLQueue(qO.getJobID());\n//\t\t\t\t\t\txmlUpdate.start();\n//\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLogging.info(this.getClass().getName(), \"Queue is not running.\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(10000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tLogging.error(e);\n\t\t\t}\n\n\t\t\tif (ABORT_ID != -100) {\n\t\t\t\tQueueObject qTemp = Queue.get(ABORT_ID);\n\t\t\t\tif (qTemp.getJobID() == ABORT_ID) {\n\t\t\t\t\tLogging.info(this.getClass().getName(), \"Aborting: \" + ABORT_ID);\n\t\t\t\t\tLogging.info(this.getClass().getName(), \"Type: \" + qO.getID());\n\t\t\t\t\tswitch (qTemp.getID()) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tsiteMap.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n//\t\t\t\t\t\tcheck.interrupt();\n//\t\t\t\t\t\tcheck.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n//\t\t\t\t\t\trasterize.interrupt();\n//\t\t\t\t\t\trasterize.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n//\t\t\t\t\t\txmlUpdate.interrupt();\n//\t\t\t\t\t\txmlUpdate.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tABORT_ID = -100; // reset ID\n\t\t\t}\n\n\t\t}\n\n\t}", "public void run() {\n while (this.beeHive.isActive()) {\n if (beeHive.hasResources()) {\n System.out.println(\"hasResources()\");\n queensChamber.summonDrone();\n try {\n Thread.sleep(MATE_TIME_MS);\n }\n catch( InterruptedException ex ) {\n System.out.println(\"Queen bee interrupted when sleeping!\");\n }\n int newBees = RandomBee.nextInt(MIN_NEW_BEES, MAX_NEW_BEES);\n int numCreated = 0;\n while (beeHive.hasResources() && (numCreated < newBees)) {\n int beeType = RandomBee.nextInt(1,5);\n Bee currentBee;\n if (beeType == 1) {\n currentBee = Bee.createBee(Role.WORKER, Worker.Resource.NECTAR, beeHive);\n } else if (beeType == 2) {\n currentBee = Bee.createBee(Role.WORKER, Worker.Resource.POLLEN, beeHive);\n } else {\n currentBee = Bee.createBee(Role.DRONE, Worker.Resource.NONE, beeHive);\n }\n beeHive.addBee(currentBee);\n numCreated++;\n beeHive.claimResources();\n }\n System.out.println(\"*Q* Queen birthed \" + numCreated + \" children\");\n }\n try {\n Thread.sleep(SLEEP_TIME_MS);\n }\n catch(InterruptedException ex) {\n System.out.println(\"Queen bee interrupted when sleeping!\");\n }\n }\n if (!this.beeHive.isActive()) {\n queensChamber.dismissDrone();\n }\n }", "void kickQueueProcessor() {\n\n long timeNow = this.tools.getTimestamp();\n this.lastKicked = timeNow;\n\n // ideally, we would run the queue at this time\n final long latestTimeToRun = timeNow + this.config.getProcessQueueIntervalShort();\n\n // only update the run time if we are bringing it forward not pushing it back\n this.runAgainAfterMs.getAndUpdate(previousTimeToRunNext ->\n (previousTimeToRunNext > latestTimeToRun) ? latestTimeToRun : previousTimeToRunNext);\n }", "public void moveDelay ( )\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.sleep( 1000 );\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static void loop() throws GameActionException {\n RobotCount.reset();\n MinerEffectiveness.reset();\n\n //Update enemy HQ ranges in mob level\n if(Clock.getRoundNum()%10 == 0) {\n enemyTowers = rc.senseEnemyTowerLocations();\n numberOfTowers = enemyTowers.length;\n if(numberOfTowers < 5 && !Map.isEnemyHQSplashRegionTurnedOff()) {\n Map.turnOffEnemyHQSplashRegion();\n }\n if(numberOfTowers < 2 && !Map.isEnemyHQBuffedRangeTurnedOff()) {\n Map.turnOffEnemyHQBuffedRange();\n }\n }\n \n // Code that runs in every robot (including buildings, excepting missiles)\n sharedLoopCode();\n \n updateEnemyInRange(52);//52 includes splashable region\n checkForEnemies();\n \n int rn = Clock.getRoundNum();\n \n // Launcher strategy\n if(rn == 80) {\n BuildOrder.add(RobotType.HELIPAD); \n } else if(rn == 220) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 280) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 350) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 410) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n } else if (rn == 500) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n } \n if (rn > 500 && rn%200==0) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n //rc.setIndicatorString(1, \"Distance squared between HQs is \" + distanceBetweenHQs);\n \n \n \n if(rn > 1000 && rn%100 == 0 && rc.getTeamOre() > 700) {\n int index = BuildOrder.size()-1;\n if(BuildOrder.isUnclaimedOrExpired(index)) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n }\n \n \n \n /**\n //Building strategy ---------------------------------------------------\n if(Clock.getRoundNum() == 140) {\n BuildOrder.add(RobotType.TECHNOLOGYINSTITUTE);\n BuildOrder.add(RobotType.TRAININGFIELD);\n }\n if(Clock.getRoundNum() == 225) {\n BuildOrder.add(RobotType.BARRACKS);\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n if(Clock.getRoundNum() == 550) {\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n }\n if(Clock.getRoundNum() == 800) {\n BuildOrder.add(RobotType.HELIPAD);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n //BuildOrder.printBuildOrder();\n }\n //---------------------------------------------------------------------\n **/\n \n //Spawn beavers\n if (hasFewBeavers()) { \n trySpawn(HQLocation.directionTo(enemyHQLocation), RobotType.BEAVER);\n }\n \n //Dispense supply\n Supply.dispense(suppliabilityMultiplier);\n \n //Debug\n //if(Clock.getRoundNum() == 700) Map.printRadio();\n //if(Clock.getRoundNum() == 1500) BuildOrder.print();\n\n }", "@Override public void run() {\r\n\t\t\ttry {\r\n\t\t\t\twhile (!stopped) {\r\n\t\t\t\t\tThread.sleep(delay);\r\n\t\t\t\t\tif (!stopped) {\r\n\t\t\t\t\t\tflush();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (final InterruptedException e) {\r\n\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t}\r\n\t\t}", "public void run() {\n\t\tlogger.info(\"***Started Email Robot***\");\n\n\t\twhile (true && !stopRunning) {\n\t\t\t//logger.debug(\"Cycling for new emails...\");\n\t\t\tif (!stopRunning) {\n\t\t\t\tsendEmails();\n\t\t\t\t\n\t\t\t\tif(stopWhenMessageListIsEmpty){\n\t\t\t\t\tif(messages.size() == 0){\n\t\t\t\t\t\tlogger.info(\"No more emails to send. Going to stop the thread...\");\n\t\t\t\t\t\tstopRunning = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlogger.info(\"Still have \"+messages.size()+\" emails in list. Going to cycle after \"+sleepSeconds * SECOND+\" milliseconds\");\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\tif (!stopRunning) {\n\t\t\t\t\tThread.sleep(sleepSeconds * SECOND);\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"***Email Robot stopped***\");\n\t}", "@Override\n public void run() {\n while (this.isAlive()) {\n try {\n this.semaphoreHashMap.get(\"lock\").acquire();\n this.guestNo = -1;\n this.bellhopGuestHashMap = null;\n this.semaphoreHashMap.get(\"bellhops\").release();\n this.helper.addToBellhopQueue(this);\n this.semaphoreHashMap.get(\"lock\").release();\n\n printStringToConsole(toStringId, \"is ready to help a guest\");\n\n this.mutex.acquire();\n\n printStringToConsole(toStringId, \"has obtained the bags of [Guest \", guestNo + \"\", \"]\");\n this.bellhopGuestHashMap.get(\"hasBags\").release();\n\n this.bellhopGuestHashMap.get(\"guestNeedsBags\").acquire();\n\n this.bellhopGuestHashMap.get(\"inRoom\").acquire();\n printStringToConsole(toStringId, \"has entered the room of [Guest \", guestNo + \"\", \"]\");\n\n printStringToConsole(toStringId, \"has given the bags to [Guest \", guestNo + \"\", \"]\");\n this.bellhopGuestHashMap.get(\"giveBags\").release();\n\n this.bellhopGuestHashMap.get(\"giveTip\").acquire();\n printStringToConsole(toStringId, \"has gotten their tip and leaves from [Guest \", guestNo + \"\", \"]\");\n\n this.bellhopGuestHashMap.get(\"gotTip\").release();\n\n printStringToConsole(toStringId, \"is ready to help a guest\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void run() {\n\t\t\t\twhile (queue.size() > 0) {\n\t\t\t\t\tJobQueue urlList = queue.poll();\n\t\t\t\t\tdoRequests(urlList);\n\t\t\t\t}\n\t\t\t}", "public void waitForAccess(PriorityQueue waitQueue) {\n Lib.assertTrue(Machine.interrupt().disabled());\n Lib.assertTrue(waitingQueue == null);\n\n time = Machine.timer().getTime();\n waitQueue.threadStates.add(this);\n waitingQueue = waitQueue;\n\n if(placement == 0)\n placement = placementInc++;\n\n update();\n }", "@Override\r\n\tpublic void run() {\n\t\tint i=0;\r\n\t\twhile(i<1000) {\r\n\t\t\tq.get();\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(bLinked &&!isExit()){\r\n\t\t\t\tLog.d(\"123\", \"set heart beat threadid:\"+Thread.currentThread().getId());\r\n\t\t\t\tjni.talkSetHeartBeat();\r\n\t\t\t\tif(jni.talkGetRegisterState()!=1 ){\r\n\t\t\t\t\tLog.e(\"123\", \"心跳停止了\");\r\n\t\t\t\t\tbLinked = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbLinked = true;\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(interval*1000);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!bLinked){\r\n\t\t\t\thandler.sendEmptyMessage(MSG_NOT_LINK);\r\n\t\t\t}\r\n\t\t\theartThread = null;\r\n\t\t\tsuper.run();\r\n\t\t}", "private void schedulerSleep() {\n\n\t\ttry {\n\n\t\t\tThread.sleep(timeSlice);\n\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t;\n\n\t}", "boolean awaitMessages(long timeout) throws InterruptedException;", "public void run() {\n\n RuleThread currntThrd;\n\t\tRuleQueue ruleQueue;\n \tRuleThread tempThrd;\n\t //\tRuleThread t;\n\t\tRuleQueue currRuleQueue;\n\n\t\tint ruleOperatingMode =0;\n\t\tint\ttempThrdPriority =0;\n\t\twhile(true){\n //if(ruleSchedulerDebug)\n\t\t\t // System.out.println(\"Looping in rulescheduler\");\n\n // When there is no rule at imm rule queue and process deferred rule\n\t\t\t// flag is false, then go sleep.\n\n if( deferredFlag == false && temporalRuleQueue.getHead() == null && immRuleQueue.getHead() == null){\n if(ruleSchedulerDebug) {\n\t\t\t\t\tSystem.out.println(\"There is no rule in any of these rule queues.\");\n System.out.println(\"Scheduler sleep\");\n }\n synchronized (this){\n\t\t\t\t\ttry{\n\t\t\t\t\t\twait();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(InterruptedException ie) {\n\t\t\t\t\t\tif(ruleSchedulerDebug)\n\t\t\t\t\t\t\tSystem.out.println(\"InterruptedException caught\");\n\t\t\t\t\t\tie.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(ruleSchedulerDebug)\n\t\t\t\t\tSystem.out.println(\"Scheduler awake\");\n }\n\n // Execute the rules in temporal rule queue\n if(temporalRuleQueue.getHead() != null){\n processTemporalRule() ;\n\n }\n\n // Finish executing all the deferred rules\n\n\t\t\tif( deferredFlag == true && immRuleQueue.getHead() == null){\n\n \t\t\t// transaction complete\n\t \t\t// reset the deferredFlag to be false when all the deferred rules are already executed\n\n\t\t\t\tdeferredFlag = false \t;\n\t\t\t\tif(deffRuleQueueOne.getHead() == null){\n\t\t\t\t\tif(ruleSchedulerDebug)\n\t\t\t\t\t\tSystem.out.println(\"All rules in rule queues are already executed.\");\n\t\t\t\t}\n\t\t\t}\n\n\n\n // Start executing a deferred rule.\n else if ( deferredFlag == true && immRuleQueue.getHead() != null){\n processRuleQueue(deffRuleQueueOne);\n\n\t\t\t}\n\n //****************************************************************\n\t\t\t// When there is a rule at imm rule queue and process deferred rule\n\t\t\t// \tflag is false, then trigger a rule.\n\n else if( immRuleQueue.getHead() != null && deferredFlag == false){\n processRuleQueue(immRuleQueue);\n }\n\t\t}\n\t}", "private void whileShouldRun(PrintWriter out, BufferedReader in) throws IOException, InterruptedException {\n\t\tLog.fine(secondsSinceLastLog());\n\t\twhile ((Nex.SHOULD_RUN || (emptyNow && !messageQueue.isEmpty())) && secondsSinceLastLog() < 180) {\n\t\t\tlogToServer(out, in);\n\t\t\t//\tcheckIfBanned(out, in);\n\t\t\tif (!messageQueue.isEmpty()) {\n\t\t\t\thandleMessageQueue(out, in);\n\t\t\t\tif(emptyNow) continue;\n\t\t\t}\n\t\t\tcheckStuck();\n\t\t\temptyNow = false;\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\t//Nex.SHOULD_RUN = false;\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile(isrun&&handler!=null){\n\t\t\ttry {\n\t\t\t\tMessage msg=handler.obtainMessage(timeupdate, new Date());\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\twhile (true) {\n\t synchronized(_taskQueue) {\n\t\twhile (_taskQueue.size() > 0) {\n\t\t Version v = (Version) _taskQueue.firstElement();\n\t\t _taskQueue.remove(0);\n\t\t executeRemoteTask(v);\n\t\t}\n\t }\n\t try {\n\t\tThread.sleep(_SLEEP_TIME);\n\t } catch (InterruptedException e) {\n\t\tlog(e.toString());\n\t }\n\t}\n }", "public void run() {\n\n try {\n startup();\n } catch (UnknownHostException e) {\n e.printStackTrace();\n currentPosition = destination;\n }\n\n while (currentPosition.longitude != destination.longitude && currentPosition.latitude != destination.latitude) {\n try {\n while ((routePositions.size() - 1) > nextRoutePositionIndex && currentPosition.getLongitude() != this.routePositions.get(nextRoutePositionIndex).getLongitude() && currentPosition.getLatitude() != this.routePositions.get(nextRoutePositionIndex).getLatitude()) {\n Thread.sleep(TIMEOUT);\n\n //diceBraking();\n properBraking();\n accelerate();\n calculateDirection(currentPosition, this.routePositions.get(nextRoutePositionIndex));\n currentPosition = drive(\n currentPosition.getLatitude(), currentPosition.getLongitude(),\n this.routePositions.get(nextRoutePositionIndex).getLatitude(), this.routePositions.get(nextRoutePositionIndex).getLongitude()\n );\n\n\n publishPosition();\n if (currentPosition.latitude == currentPosition.latitude && currentPosition.longitude == destination.longitude) {\n break;\n }\n System.out.println(\"id: \" + id + \" Pos: \" + currentPosition.latitude + \"|\" + currentPosition.longitude);\n }\n if (nextRoutePositionIndex < routePositions.size()) {\n nextRoutePositionIndex++;\n } else {\n break;\n }\n } catch (InterruptedException | MalformedURLException exc) {\n exc.printStackTrace();\n }\n\n }\n\n for (int i = 0; i < 100; i++) {\n System.out.println(\"FINISHED \" + id);\n }\n\n try {\n publishFinished();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "private void botLogic(){\n synchronized (lock){Collections.sort(playerList);}\n botTrading();\n botVoting();\n waitPrint();\n await();\n }", "@Override\r\n\tpublic void run() {\n\t\twhile(true) {\r\n\t\t\tfor(String data:queueData) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final void waitFor() {\r\n for (;;) {\r\n synchronized (this) {\r\n if (this.m_b)\r\n return;\r\n try {\r\n this.wait();\r\n } catch (Throwable tt) {\r\n tt.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "public synchronized void run() {\n\n boolean keepGoing = true;\n\n while (keepGoing) {\n\n try {\n sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n int count = 0;\n\n try {\n\n count = sInput.available();\n\n if (count > 0) {\n message = sInput.readUTF();\n }\n\n if (isWait) {\n synchronized (this) {\n try {\n wait();\n\n } catch (InterruptedException e) {\n System.out.println(\"Error in waiting\");\n e.printStackTrace();\n }\n }\n }\n\n } catch (IOException e) {\n display(username + \" Exception reading Streams: \" + e);\n e.printStackTrace();\n }\n\n if(count == 0){\n continue;\n }\n\n String[] splitMessage = message.split(\" \");\n\n if(message.equalsIgnoreCase(\"!LOGOUT\")){\n //display(username + \" disconnected with a LOGOUT message.\");\n gameManager.disconnected(this);\n //keepGoing = false;\n break;\n }else if(message.equalsIgnoreCase(\"!WhoIsIn\")){\n writeMsg(\"List of the users connected at \" + simpleDateFormat.format(new Date()) + \"\\n\");\n // send list of active clients\n for (int i = 0; i < clientThreads.size(); ++i) {\n Server.ClientThread ct = clientThreads.get(i);\n writeMsg((i + 1) + \") \" + ct.username + \" since \" + ct.date);\n }\n }else if(canTalk) {\n if (message.equalsIgnoreCase(\"!READY\") && !isLastMoment) {\n if(!isReady) {\n gameManager.ready();\n isReady = true;\n broadcast(BLUE + gameManager.getReadyToGo()\n + \" number of players are ready so far\" + RESET, getClientThreads());\n }else{\n writeMsg(RED + \"you said you are ready before!\" + RESET);\n }\n }else if (!waitingToGo && !isLastMoment) {\n if (message.length() > 0 && message.charAt(0) == '@') {\n Player curPlayer = gameManager.getPlayer(this);\n //String[] decodedMsg = message.split(\" \");\n if (curPlayer instanceof GodFather) {\n gameManager.godFatherShot(message.substring(1), this);\n } else if (curPlayer instanceof LectorDoctor) {\n gameManager.lectorHill(message.substring(1), this);\n } else if (curPlayer instanceof Doctor) {\n gameManager.doctorHill(message.substring(1), this);\n } else if (curPlayer instanceof Detective) {\n gameManager.detectiveAttempt(message.substring(1), this);\n } else if (curPlayer instanceof Professional) {\n gameManager.professionalShot(message.substring(1), this);\n } else if (curPlayer instanceof Psychologist) {\n gameManager.psychologistAttempt(message.substring(1), this);\n } else if (curPlayer instanceof Invulnerable) {\n if (message.substring(1).equalsIgnoreCase(\"!RESULT\")) {\n gameManager.invulnerableAttempt(this);\n }\n } else if (curPlayer instanceof Mayor) {\n if (message.substring(1).equalsIgnoreCase(\"!CANCEL\")) {\n gameManager.mayorAttempt(this);\n }\n }\n }\n else if (splitMessage[0].equalsIgnoreCase(\"!VOTE\")) {\n if (splitMessage[1].charAt(0) == '@') {\n gameManager.vote(splitMessage[1].substring(1), this);\n }\n } else {\n boolean confirmation = broadcast(username + \": \" + message, activeClients);\n if (!confirmation) {\n String msg = RED + notification + \"Sorry. No such user exists.\" + notification + RESET;\n writeMsg(msg);\n }\n }\n\n }\n }else if (splitMessage[0].equalsIgnoreCase(\"!VOTE\") && !isLastMoment && !waitingToGo) {\n if (splitMessage[1].charAt(0) == '@') {\n gameManager.vote(splitMessage[1].substring(1), this);\n }\n }else if (message.equalsIgnoreCase(\"!READY\") && !isLastMoment) {\n if(!isReady) {\n gameManager.ready();\n isReady = true;\n broadcast(BLUE + gameManager.getReadyToGo() + \" number of players are ready so far\"\n + RESET, getClientThreads());\n }else{\n writeMsg(\"you said you are ready before!\");\n }\n }\n\n }\n // if out of the loop then disconnected and remove from client list\n remove(id);\n close();\n }", "public void run() {\n\n while (!Thread.interrupted()) {\n while (randomRoomPlayers.size() > 1) {\n Player firstPlayer = randomRoomPlayers.poll();\n Player secondPlayer = randomRoomPlayers.poll();\n Thread newGameThread = new Thread(new BullCowGame(firstPlayer, secondPlayer, this));\n newGameThread.start();\n System.out.println(\"Game initiated by PlayersHolder.\");\n }\n synchronized (this) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n return;\n }\n }\n }\n }", "private void sendNewPackets() {\n\t\twhile(alive && (sendQueue.size() != 0)) {\n\t\t\tNetPacket send = sendQueue.peek();\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"(NetAPI) Sending a \" + send.getClass().getName() + \" packet\");\n\t\t\t\toos.writeObject(send);\n\t\t\t\toos.flush();\n\t\t\t\tsendQueue.poll();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"(NetAPI) Could not send packet: \" + e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void waitForNextTick() throws InterruptedException {\n Thread.sleep(timeoutPeriod);\n }", "@Override\n public void run() {\n while (queue.num < 100) {\n try {\n queue.producer();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void run() {\n\t if (isDone) {\r\n\t\ttimer.cancel();\r\n\t\treturn;\r\n\t }\r\n\t \r\n\t if (interestedList.size() == 0) {\r\n\t\treturn;\r\n\t }\r\n\t \r\n\t synchronized (interestedList) {\r\n\t\tint index = (int)(Math.random()*interestedList.size());\r\n\t\tif (ouNbr != 0 && interestedList.get(index) != ouNbr) {\r\n\t\t //System.out.println(\"Optimistically Unchoke \" + interestedList.get(index));\r\n\t\t Message.sendMsg(new UnChoke(), connmap.get(interestedList.get(index)).getOutputStream());\r\n\t\t \r\n\t\t if (ouNbr != 0 && !prefNbrs.contains(ouNbr)) {\r\n\t\t\t//System.out.println(\"Optimistically Choke \" + ouNbr);\r\n\t\t\tMessage.sendMsg(new Choke(), connmap.get(ouNbr).getOutputStream());\r\n\t\t }\r\n\t\t ouNbr = interestedList.get(index);\r\n\t\t log (\"Peer \" + pid + \" has the optimistically-unchoked neighbot \" + ouNbr);\r\n\t\t}\r\n\t }\r\n\t \r\n\t}", "@Override\n\t\t\tpublic void loopDone() {\n\t\t\t\t\n\t\t\t\tif (gamersArray.size()>0){\n\t\t\t\t\tattractAnim.stop();\n\t\t\t\t\t// need to call from main thread!\n\t\t\t\t\tmUIHandler.post(new Runnable(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tchangeState(State.WAIT_FOR_START);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void writeNextMessageInQueue() {\n // This should not happen in practice since this method is private and should only be called\n // for a non-empty queue.\n if (mMessageQueue.isEmpty()) {\n Log.e(TAG, \"Call to write next message in queue, but the message queue is empty.\");\n return;\n }\n\n if (mMessageQueue.size() == 1) {\n writeValueAndNotify(mMessageQueue.remove().toByteArray());\n return;\n }\n\n mHandler.post(mSendMessageWithTimeoutRunnable);\n }", "public void run() {\n int dead = 0;\n while(dead < bacteria.size()){\n dead = 0;\n Random rand = new Random();\n ArrayList<Microbe> children = new ArrayList();\n Iterator it = bacteria.iterator();\n for(Microbe bac:bacteria){\n if(bac.isAlive()){\n bac.search();\n }\n else{\n dead++;\n }\n if(bac.canBreed(time)){\n children.add(bac.breed());\n }\n \n }\n try {\n Thread.sleep(speed);\n //gui.upDateGUI();\n } catch (InterruptedException ex) {\n Logger.getLogger(RunSim.class.getName()).log(Level.SEVERE, null, ex);\n }\n Thread.yield();\n\n\n if(children.size() > 0){\n bacteria.addAll(children);\n }\n time++;\n gui.updateStats(time,bacteria.size()-dead,dead);\n\n }\n \n //}\n //gui.test();\n //gui.upDateGUI();\n }", "@Override\n\tpublic void execute() {\n\t\tif (!Variables.decreaseTask) {\n\t\t\tVariables.decreaseTask = true;\n\t\t} else {\n\t\t\tVariables.taskAmount--;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Killing npcs\");\n\t\t\n\t\tif (Variables.status != \"Completing task...\") {\n\t\tVariables.status = \"Completing task...\";\n\t\t}\n\t\t\n\t\tNpc[] slayerMonster = Npcs.getNearest(slayerMonsterFilter);\n\n\t\ttry {\n\t\tslayerMonster[0].interact(1);\n\t\t} catch (ArrayIndexOutOfBoundsException | NullPointerException e) {\n\t\t\t\n\t\t} \n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn !Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t}", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "private void workOnQueue() {\n }", "private void delayElevator() {\n try {\n Thread.sleep(MOVEMENT_DELAY);\n } catch (InterruptedException ex) {\n Logger.getLogger(Elevator.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static boolean testInsertWaitingProcessQueue() {\r\n\t\tWaitingProcessQueue queue = new WaitingProcessQueue();\r\n\t\tCustomProcess process1 = new CustomProcess(10);\r\n\t\tCustomProcess process2 = new CustomProcess(2);\r\n\t\tCustomProcess process3 = new CustomProcess(5);\r\n\t\tCustomProcess process4 = new CustomProcess(3);\r\n\t\tCustomProcess process5 = new CustomProcess(1);\r\n\t\tqueue.insert(process1);\r\n\t\tqueue.insert(process2);\r\n\t\tqueue.insert(process3);\r\n\t\tqueue.insert(process4);\r\n\t\tqueue.insert(process5);\r\n\r\n\t\tif (queue.size() != 5)\r\n\t\t\treturn false;\r\n\t\tif (queue.peekBest() != process5)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}", "public void testPollInExecutor() {\n final SynchronousQueue q = new SynchronousQueue();\n ExecutorService executor = Executors.newFixedThreadPool(2);\n executor.execute(new Runnable() {\n public void run() {\n threadAssertNull(q.poll());\n try {\n threadAssertTrue(null != q.poll(MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS));\n threadAssertTrue(q.isEmpty());\n }\n catch (InterruptedException e) {\n threadUnexpectedException();\n }\n }\n });\n\n executor.execute(new Runnable() {\n public void run() {\n try {\n Thread.sleep(SMALL_DELAY_MS);\n q.put(new Integer(1));\n }\n catch (InterruptedException e) {\n threadUnexpectedException();\n }\n }\n });\n\n joinPool(executor);\n }", "public void startWait() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (server.getNumberOfPlayers() > 0 && !server.gameStartFlag) {\n\t\t\t\t\tserver.runGame();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 120000);\n\t\t// 2min(2*60*1000)\n\t\tsendMessage(\"The game will start 2 minute late\");\n\t}", "@Override\n public void run() {\n while (isRun) {\n try {\n Thread.sleep(1000); // sleep 1000ms\n Message message = Message.obtain();\n message.what = 1;\n handler.sendMessage(message);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void esperarPorFatherThread() {\n\t\ttry {\n\t\t\tThread.sleep(50000);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\twait();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\tint detectDistanceFeedback = getDetectDistanceFeedback();\n\t\t\t\twhile (true) {\n\t\t\t\t\tSystemClock.sleep(50);\n\n\t\t\t\t\tdetectDistanceFeedback = getDetectDistanceFeedback();\n\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 2;\n\t\t\t\t\tmsg.obj = detectDistanceFeedback;\n\n\t\t\t\t\tif (detectDistanceFeedback != 2) {\n\t\t\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (count++ >= 1) {\n\t\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t\t\thandler.sendMessage(msg);\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\tLog.i(TAG, \"MDetectDistanceFeedback 333333\");\n\t\t\t}\n\n\t\t}", "private void sleep()\n {\n try {\n Thread.sleep(Driver.sleepTimeMs);\n }\n catch (InterruptedException ex)\n {\n\n }\n }", "private void scheduleNext() {\n lock.lock();\n try {\n active = tasks.poll();\n if (active != null) {\n executor.execute(active);\n terminating.signalAll();\n } else {\n //As soon as a SerialExecutor is empty, we remove it from the executors map.\n if (lock.isHeldByCurrentThread() && isEmpty() && this == serialExecutorMap.get(identifier)) {\n serialExecutorMap.remove(identifier);\n terminating.signalAll();\n if (state == State.SHUTDOWN && serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n }\n }\n } finally {\n lock.unlock();\n }\n }", "public void delayNext()\n {\n\tif (toDo.size() > 1)\n\t {\n\t\tTask t = toDo.get(0);\n\t\ttoDo.set(0, toDo.get(1));\n\t\ttoDo.set(1, t);\n\t }\n }", "public void run() {\n\t\tTestTool.log(mPort + \"[AutoSender] waiting...\");\n\t\twhile (mUserList.size() < 2) {\n\t\t\ttry {\n\t\t\t\tmClientEvent.trigger(EE.client_command_getListUser, null);\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tif (mUserList.size() >= 2) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) { e.printStackTrace(); }\n\t\t}\n\t\tTestTool.log(mPort + \"[AutoSender] ...okay\");\n\n\t\t\n\t\tint count = 0;\n\t\twhile (mIsRunning && count++ < 5) {\n\t\t\tJSONObject msg = autoCreateMessage(count);\n\t\t\tTestTool.log(mPort + \"[AutoSender: run] sending message:\", msg);\n\t\t\tmMessengerUser.addMessage(msg);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep((int) Math.random() * 1000);\n\t\t\t} catch (InterruptedException e) { e.printStackTrace(); }\n\t\t}\n\t}" ]
[ "0.61011523", "0.5952991", "0.5949108", "0.5939425", "0.5910478", "0.5847744", "0.58258355", "0.57716846", "0.5634896", "0.5601902", "0.5599961", "0.5511245", "0.55092883", "0.5503486", "0.55013186", "0.549807", "0.5490246", "0.5489978", "0.5453848", "0.5420462", "0.5418748", "0.53878725", "0.53799057", "0.5377075", "0.53694993", "0.536521", "0.53530574", "0.5330791", "0.5327127", "0.5322177", "0.53217274", "0.53167236", "0.53054315", "0.5302598", "0.5289685", "0.52778405", "0.52733576", "0.5272565", "0.5271249", "0.5252882", "0.5251859", "0.5243835", "0.52317685", "0.52279365", "0.52268195", "0.52168643", "0.5213865", "0.51994824", "0.5197208", "0.51954025", "0.5193961", "0.5179403", "0.5179218", "0.5170732", "0.5168343", "0.5165813", "0.5152054", "0.5143503", "0.51419634", "0.5128066", "0.51243323", "0.5122368", "0.5116198", "0.5110816", "0.51097363", "0.5107489", "0.5099365", "0.5089346", "0.50871396", "0.50870806", "0.5077286", "0.5074861", "0.50740176", "0.50701416", "0.50637263", "0.50572187", "0.5056747", "0.50552183", "0.5054128", "0.5047181", "0.50468296", "0.50354266", "0.5035287", "0.5034406", "0.5030121", "0.50288343", "0.502796", "0.50277007", "0.5026921", "0.5023845", "0.50178146", "0.50128335", "0.5008959", "0.5006231", "0.5003967", "0.50035685", "0.5002829", "0.49981433", "0.49840498", "0.49779254" ]
0.6431378
0
Recursively adds all subdirectories of a given base directory to the repository, and adds the base directory itself.
public void addDirectories( File base ) { if( base.isDirectory() ) { repository.add( base ); File[] files = base.listFiles(); for( int i = 0; i < files.length; i++ ) { addDirectories( files[i] ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static LinkedList<String> addAllSubDirs(File dir, LinkedList<String> list) {\n\t\tString [] dirListing = dir.list();\n\t\tfor (String subDirName : dirListing) {\n\t\t\tFile subdir = new File(dir.getPath() + System.getProperty(\"file.separator\") + subDirName);\n\t\t\tif (subdir.isDirectory()) {\n\t\t\t\tif (containsJavaFiles(subdir))\n\t\t\t\t\tlist.add(subdir.getPath());\n\t\t\t\tlist = addAllSubDirs(subdir, list);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "abstract void addNewSourceDirectory(final File targetDirectory);", "private void addPackageDirFiles(WebFile aDir, List aList)\n{\n boolean hasNonPkgFile = false;\n for(WebFile child : aDir.getFiles())\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, aList);\n else hasNonPkgFile = true;\n if(hasNonPkgFile || aDir.getFileCount()==0) aList.add(aDir);\n}", "public void addSubdirectory(Directory newdir) {\n\t\tgetSubdirectories().add(newdir);\n\t}", "private void registerAll(final Path start) throws IOException {\n\t\t// register directory and sub-directories\n\t\tFiles.walkFileTree(start, new SimpleFileVisitor<Path>() {\n\t\t\t@Override\n\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tregister(dir);\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t});\n\t}", "public void addRecursively(File aResourceFile) {\n\t\tif (!aResourceFile.exists()) {\n\t\t\tignoredReferences.put(aResourceFile.getPath(), \"does not exists\");\n\t\t\treturn;\n\t\t}\n\t\tif (!aResourceFile.isDirectory()) {\n\t\t\taddFile(aResourceFile);\n\t\t\treturn;\n\t\t}\n\t\tfor (File tempFile : aResourceFile.listFiles()) {\n\t\t\taddRecursively(tempFile);\n\t\t}\n\t}", "public void add(Directory subDir) {\n\t\tthis.content.add(subDir);\n\t\tif(subDir.getParent() != null) {\n\t\t\tsubDir.getParent().content.remove(subDir);\n\t\t}\n\t\tsubDir.setParent(this);\n\t}", "public final void addDirectory(String dir) {\n addDirectory(Paths.get(dir));\n }", "private static void buildDir (File dir) \n\t\tthrows Exception\n\t{\n\t\tFile[] contents = dir.listFiles();\n\t\tfor (int i = 0; i < contents.length; i++) {\n\t\t\tFile file = contents[i];\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tbuildDir(file);\n\t\t\t} else if (file.getName().endsWith(\".xml\")) {\n\t\t\t\tbuildFile(file);\n\t\t\t}\n\t\t}\n\t}", "public static void createImageDirs(File base) {\n String dirs[] = new String[]{\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\",\n \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"};\n for (String dir : dirs) {\n File subdir = new File(base, dir);\n if (!subdir.exists()) {\n subdir.mkdir();\n }\n }\n }", "public void mkdirP(String dirPath) {\n\n\t\t// check if you need to go anywhere further\n\t\tif (dirPath.lastIndexOf(\"/\") == 0) {\n\t\t\treturn;// done\n\t\t} else {\n\t\t\t// parse directories...\n\t\t\tArrayList<String> direcs = new ArrayList<>();\n\t\t\tString temp = dirPath;\n\t\t\tboolean cont = true;\n\t\t\ttemp = temp.substring(1);\n\t\t\twhile (temp.length() > 1 && cont) {\n\n\t\t\t\t// add the substring to the list of directories that need to be\n\t\t\t\t// checked and/or created\n\t\t\t\tdirecs.add(temp.substring(0, temp.indexOf(\"/\")));\n\t\t\t\t// if there are more \"/\"s left, repeat\n\t\t\t\tif (temp.contains(\"/\")) {\n\t\t\t\t\ttemp = temp.substring(temp.indexOf(\"/\") + 1);\n\t\t\t\t}\n\t\t\t\t// else break out of the loop\n\t\t\t\telse {\n\t\t\t\t\tcont = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do one last check to see if there are any extra characters left\n\t\t\tif (temp.length() > 0) {\n\t\t\t\t// there is still something left\n\t\t\t\tdirecs.add(temp);\n\t\t\t}\n\n\t\t\t// go through each directory, checking if it exists. if not, create\n\t\t\t// the directory and repeat.\n\t\t\tDirectoryObjects current = directory;\n\n\t\t\tfor (String p : direcs) {\n\n\t\t\t\tif (current.getDirectoryByName(p) != null) {\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t} else {\n\t\t\t\t\tcurrent.getSubdirectories().add(new DirectoryObjects(p));\n\t\t\t\t\tcurrent = current.getDirectoryByName(p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {\n String[] contents = dir .list();\n for ( int i = 0; i < contents .length; ++i ) {\n String name = contents[i];\n File file = new File( dir, name );\n if ( file .isDirectory() ) {\n addDirContents( output, file, prefix + name + '/', compress );\n }\n else {\n addFile( output, file, prefix, compress );\n }\n }\n }", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "private void resolveJarDirectory( final File directory, final boolean recursive, final Set<String> bag )\r\n throws IllegalArgumentException, ResolutionException {\r\n if ( !directory.exists() )\r\n throw new ResolutionException(\r\n \"Directory \\\"\" + directory + \"\\\" is referenced by \" + this.toString() + \" but does not exist.\" );\r\n if ( !directory.isDirectory() )\r\n throw new ResolutionException(\r\n \"Directory \\\"\" + directory + \"\\\" is referenced by \" + this.toString() + \" but not a directory.\" );\r\n\r\n for ( final File file : directory.listFiles( new FileFilter() {\r\n @Override\r\n public boolean accept( final File pathname ) {\r\n return ( recursive && pathname.isDirectory() ) || pathname.getName().toLowerCase().endsWith( \".jar\" );\r\n }\r\n } ) ) {\r\n if ( recursive && file.isDirectory() )\r\n resolveJarDirectory( file, recursive, bag );\r\n else\r\n bag.add( file.getAbsolutePath() );\r\n }\r\n }", "private void fillAllImagesUnderDirectory(File directory) throws IOException {\n // get the list of all files (including directories) in the directory of interest\n File[] fileArray = directory.listFiles();\n assert fileArray != null;\n\n for (File file : fileArray) {\n // if the file is an image, then add it\n if (isImage(file)) {\n ImageFile imageFile = new ImageFile(file.getAbsolutePath());\n // if the image is already saved, reuse it\n if (centralController.getImageFileController().hasImageFile(imageFile)) {\n allImagesUnderDirectory\n .add(centralController.getImageFileController().getImageFile(imageFile));\n } else if (imagesInDirectory.contains(imageFile)) {\n allImagesUnderDirectory.add(imagesInDirectory.get(imagesInDirectory.indexOf(imageFile)));\n } else {\n allImagesUnderDirectory.add(imageFile);\n }\n } else if (file.isDirectory()) {\n fillAllImagesUnderDirectory(file);\n }\n }\n }", "private static void findAllFilesRecurse(File root, ArrayList<File> files, boolean recurse) {\n\t\tFile[] rootContents = root.listFiles();\n\t\tif (rootContents == null) {\n\t\t\tfiles.add(root);\n\t\t} else {\n\t\t\tfor (File f : rootContents) {\n\t\t\t\t// if it is a file or do not go deeper\n\t\t\t\tif (f.isFile() || !recurse) {\n\t\t\t\t\tfiles.add(f);\n\t\t\t\t} else if (recurse) { // directory\n\t\t\t\t\tfindAllFilesRecurse(f, files, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addDirToList(File dir, List<File> list) {\n\t\tif(dir.exists() && dir.isDirectory()) {\n\t\t\tlist.add(dir);\n\t\t}\n\t}", "public void directorySearch(File dir, String target)\n\t{\n\t\tif(!(dir.isDirectory()))\n\t\t{\n\t\t\t//If file is not a directory, throw the exception.\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif(count == maxFiles)\n\t\t{\n\t\t\t//If count is equal to maxFiles, throw the exception.\n\t\t\t//If it doesn't then this will act as a base case to\n\t\t\t//the recursion. \n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//Put all the sub directories in an array. \n\t\t\tFile[] file = dir.listFiles();\n\t\t\t\n\t\t\t//Print out the path and the file directory list \n\t\t\tSystem.out.println(dir.getPath() + \": \" + dir.listFiles());\n\t\t\t\n\t\t\t//Go through each of the file length\n\t\t\tfor(int i = 0; i < file.length; i++)\n\t\t\t{\n\t\t\t\t//Get the file name \n\t\t\t\tSystem.out.println(\" -- \" + file[i].getName());\n\t\t\t\t\n\t\t\t\t//If the file name is the target, then add it to the \n\t\t\t\t//stack and return\n\t\t\t\tif(file[i].getName().equals(target))\n\t\t\t\t{\n\t\t\t\t\t//If the item inside the file is the target.\n\t\t\t\t\tcount++;\n\t\t\t\t\tfileList.add(file[i].getPath());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//If its a directory, then recurse.\n\t\t\t\tif(file[i].isDirectory())\n\t\t\t\t{\n\t\t\t\t\tdirectorySearch(file[i], target);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (NullPointerException e)\n\t\t{\n\t\t\t//If the File[] is null then catch this exception.\n\t\t\treturn;\n\t\t}\n\t}", "@Test\n public void testMkdirOneDirectoryRelativePathMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"directory1\", \"directory1/subDirectory1\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"A already exists or a path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n }", "@Test\n public void testMkdirMultipleDirectoriesRelativePathMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory1\", \"directory2\"};\n String[] path2 = {\"directory1/subDirectory1\", \"directory2/subDirectory2\"};\n try {\n myTree.mkdir(path1);\n myTree.mkdir(path2);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2/subDirectory2\"), true);\n }", "public void addDirectory(String name, IDirectory parent) {\r\n Directory newDir = new Directory(name, (Directory) parent);\r\n ((Directory) parent).addItem(newDir);\r\n }", "protected void modifyOnGithubRecursive(GHRepository repo, GHContent content,\n String branch, String img, String tag) throws IOException {\n if (content.isFile() && content.getDownloadUrl() != null) {\n modifyOnGithub(content, branch, img, tag, \"\");\n } else if(content.isDirectory()) {\n for (GHContent newContent : repo.getDirectoryContent(content.getPath(), branch)) {\n modifyOnGithubRecursive(repo, newContent, branch, img, tag);\n }\n } else {\n // The only other case is if we have a file, but content.getDownloadUrl() is null\n log.info(\"Skipping submodule {}\", content.getName());\n }\n }", "public void addDirectory(FileDiffDirectory directory) {\n \t\tthis.directories.add(directory);\n \t}", "private ArrayList<char[]> subdirectoriesToFiles(String inputDir, ArrayList<char[]> fullFileList) throws IOException {\n\t\tArrayList<char[]> currentList =\n\t\t\t\tnew ArrayList<char[]>(Arrays.asList(new File(inputDir).listFiles()));\n\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\t\n\t\t\telse if (file.isDirectory())\n\t\t\t\tsubdirectoriesToFiles(file.getPath(), fullFileList);\n\t\t\t\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}", "public final void addDirectory(Path dir) {\n\t\t// enable trace for registration\n this.trace = true;\n register(dir);\n }", "private static void recurseFiles(File file)\r\n throws IOException, FileNotFoundException\r\n {\r\n if (file.isDirectory()) {\r\n //Create an array with all of the files and subdirectories \r\n //of the current directory.\r\nString[] fileNames = file.list();\r\n if (fileNames != null) {\r\n //Recursively add each array entry to make sure that we get\r\n //subdirectories as well as normal files in the directory.\r\n for (int i=0; i<fileNames.length; i++){ \r\n \trecurseFiles(new File(file, fileNames[i]));\r\n }\r\n }\r\n }\r\n //Otherwise, a file so add it as an entry to the Zip file. \r\nelse {\r\n byte[] buf = new byte[1024];\r\n int len;\r\n //Create a new Zip entry with the file's name. \r\n\r\n\r\nZipEntry zipEntry = new ZipEntry(file.toString());\r\n //Create a buffered input stream out of the file \r\n\r\n\r\n//we're trying to add into the Zip archive. \r\n\r\n\r\nFileInputStream fin = new FileInputStream(file);\r\n BufferedInputStream in = new BufferedInputStream(fin);\r\n zos.putNextEntry(zipEntry);\r\n //Read bytes from the file and write into the Zip archive. \r\n\r\n\r\nwhile ((len = in.read(buf)) >= 0) {\r\n zos.write(buf, 0, len);\r\n }\r\n //Close the input stream. \r\n\r\n\r\n in.close();\r\n //Close this entry in the Zip stream. \r\n\r\n\r\n zos.closeEntry();\r\n }\r\n }", "private void addFolder(){\n }", "public void addDir(File dirObj, ZipOutputStream out) throws IOException {\n\t\t File[] files = dirObj.listFiles();\n\t\t byte[] tmpBuf = new byte[1024];\n\t\t for (int i = 0; i < files.length; i++) {\n\t\t if (files[i].isDirectory()) {\n\t\t addDir(files[i], out);\n\t\t continue;\n\t\t }\n\t \t FileInputStream in = new FileInputStream(files[i].getAbsolutePath());\n\t\t System.out.println(\" Adding: \" + files[i].getAbsolutePath());\n\t\t out.putNextEntry(new ZipEntry(files[i].getAbsolutePath()));\n\t\t int len;\n\t\t while ((len = in.read(tmpBuf)) > 0) { out.write(tmpBuf, 0, len); }\n\t\t out.closeEntry();\n\t\t in.close();\n\t\t }\n\t\t }", "private static void processRepository(File repo) {\n System.out.println(\"Processing repository: \" + repo);\n for (File fileOrDir : repo.listFiles()) {\n if (fileOrDir.isDirectory()) {\n processModule(fileOrDir);\n }\n }\n }", "public void addChild(DirectoryNode node) throws FullDirectoryException, NotADirectoryException {\n if(isFile)\n throw new NotADirectoryException(\"Error: This node is a file\");\n if(left != null && middle != null && right != null)\n throw new FullDirectoryException(\"This directory is full\");\n if(left == null)\n left = node;\n else if(middle == null)\n middle = node;\n else if(right == null)\n right = node;\n }", "@Override\n\tpublic void addRecurso(Recurso recurso) {\n\t\t\n\t}", "private static void createTree(TreeItem<FilePath> rootItem) throws IOException {\n\n try (DirectoryStream<Path> directoryStream = Files\n .newDirectoryStream(rootItem.getValue().getPath())) {\n\n for (Path path : directoryStream) {\n TreeItem<FilePath> newItem = new TreeItem<FilePath>(new FilePath(path));\n newItem.setExpanded(true);\n\n rootItem.getChildren().add(newItem);\n\n if (Files.isDirectory(path)) {\n createTree(newItem);\n }\n }\n } catch (AccessDeniedException ignored) {\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tPath resolve = target.resolve(source.relativize(dir));\n\t\t\t\tFile resolve_file = resolve.toFile();\n\n\t\t\t\tif (resolve_file.exists() == false) {\n\t\t\t\t\tFiles.createDirectory(resolve);\n\t\t\t\t} else {\n\t\t\t\t\t// delete old data in sub-directories\n\t\t\t\t\t// without deleting the directory\n\t\t\t\t\tArrays.asList(resolve_file.listFiles()).forEach(File::delete);\n\t\t\t\t}\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}", "private TreeItem<File> buildTree(model.Node node, TreeItem<File> parent) throws IOException {\n // set the root of the tree\n TreeItem<File> root = new TreeItem<>(node.getDir().getFile());\n // show all subdirectories and photos by default\n root.setExpanded(true);\n // set all photos under the directory as the child TreeItem of this directory\n for (model.Photo photo : node.getDir().getPhotos()) {\n root.getChildren().add(new TreeItem<>(photo.getFile()));\n if (!model.PhotoManager.getPhotos().contains(photo)) {\n model.PhotoManager.addPhoto(photo);\n }\n }\n // set all subdirectories of this directory as the child TreeItem\n for (Object child : node.getChildren()) {\n model.Node subDir = (model.Node) child;\n buildTree(subDir, root);\n }\n if (parent == null) {\n return root;\n } else {\n parent.getChildren().add(root);\n }\n return null;\n }", "private static void addDirectoryToLibraryPath(String dir) throws IOException {\n try {\n Field field = ClassLoader.class.getDeclaredField(\"usr_paths\");\n field.setAccessible(true);\n String[] paths = (String[]) field.get(null);\n for (String path: paths) {\n if (dir.equals(path)) {\n return;\n }\n }\n String[] tmp = new String[paths.length + 1];\n System.arraycopy(paths, 0, tmp, 0, paths.length);\n tmp[paths.length] = dir;\n field.set(null, tmp);\n } catch (IllegalAccessException e) {\n throw new IOException(\"Failed to get permissions to set library path.\");\n } catch (NoSuchFieldException e) {\n throw new IOException(\"Failed to get field handle to set library path.\");\n }\n }", "public void addAllRecursively(Collection<? extends File> someResourceFiles) {\n\t\tfor (File tempResourceFile : someResourceFiles) {\n\t\t\taddRecursively(tempResourceFile);\n\t\t}\n\t}", "@Override\n\tpublic boolean addModuleDirectory(String path)\n\t{\n\t\tpath = path.replace(\"~\", System.getProperty(\"user.home\"));\n\t\tSystem.out.println(\"Path: \" + path);\n\t\tFile newDir = new File(path);\n\n\t\tif (newDir.exists() && newDir.isDirectory()) {\n\t\t\tmoduleDirectories.add(newDir);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public void addChild(IDirectory child) {\n children.add(child);\n }", "public IStatus prepareRuntimeDirectory(IPath baseDir);", "@Test\n public void testMkdirMultipleDirectoriesRelativePathOneDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"directory1\", \"directory2\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"directory1 or directory2 already exists or the path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2\"), true);\n }", "public void addPath(File path) throws IllegalArgumentException {\r\n File[] PathFiles;\r\n if (path.isDirectory() == true) {\r\n \tPathFiles = path.listFiles();\r\n for (int i=0; i<PathFiles.length; i++) {\r\n \tFile currentfile = PathFiles[i];\r\n if (currentfile.isDirectory()) {\r\n \tdirectory_queue.enqueue(currentfile);\r\n \taddPath(currentfile);\r\n }\r\n }\r\n } else {\r\n throw new IllegalArgumentException(\"Can't resolve the directory path \" + path);\r\n }\r\n }", "private void getAllFiles(File dir, List<File> fileList) throws IOException {\r\n File[] files = dir.listFiles();\r\n if(files != null){\r\n for (File file : files) {\r\n // Do not add the directories that we need to skip\r\n if(!isDirectoryToSkip(file.getName())){\r\n fileList.add(file);\r\n if (file.isDirectory()) {\r\n getAllFiles(file, fileList);\r\n }\r\n }\r\n }\r\n }\r\n }", "private void addNodes(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\taddNodes(node.left); // walk trough left sub-tree\n\t\tthis.child.add(node);\n\t\taddNodes(node.right); // walk trough right sub-tree\n\t}", "public AddFileToZip recursive() {\n\t\t\tthis.recursive = true;\n\t\t\treturn this;\n\t\t}", "private static void rAddFilesToArray(File workingDirectory, ArrayList<File> result) {\n File[] fileList = workingDirectory.listFiles();\n if (fileList == null) return;\n for (File file : fileList) {\n String name = file.getName();\n int lastDotIndex = name.lastIndexOf('.');\n String ext = (lastDotIndex == -1) ? \"\" : name.substring(lastDotIndex + 1);\n if (file.isDirectory())\n rAddFilesToArray(file, result);\n if (!file.equals(remainderFile) && ext.equals(\"xml\")) {\n result.add(file);\n }\n }\n }", "public GlobFileSet recurse()\n\t\t{\n\t\tm_recurse = true;\n\t\treturn (this);\n\t\t}", "public void pushDirectory(Directory directory) {\r\n directoryStack.push(directory);\r\n }", "protected List <WebFile> getSourceDirChildFiles()\n{\n // Iterate over source dir and add child packages and files\n List children = new ArrayList();\n for(WebFile child : getFile().getFiles()) {\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, children);\n else children.add(child);\n }\n \n return children;\n}", "private DirectoryObjects getDirectory(String path, DirectoryObjects current) {\n\t\tif (path.lastIndexOf(\"/\") == 0) {\n\t\t\treturn current;// done\n\t\t} else {\n\t\t\t// parse directories...\n\t\t\tArrayList<String> direcs = new ArrayList<>();\n\t\t\tString temp = path;\n\t\t\tboolean cont = true;\n\t\t\ttemp = temp.substring(1);\n\t\t\twhile (temp.length() > 1 && cont) {\n\n\t\t\t\t// add the substring to the list of directories that need to be\n\t\t\t\t// checked and/or created\n\t\t\t\tdirecs.add(temp.substring(0, temp.indexOf(\"/\")));\n\t\t\t\t// if there are more \"/\"s left, repeat\n\t\t\t\tif (temp.contains(\"/\")) {\n\t\t\t\t\ttemp = temp.substring(temp.indexOf(\"/\") + 1);\n\t\t\t\t}\n\t\t\t\t// else break out of the loop\n\t\t\t\telse {\n\t\t\t\t\tcont = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do one last check to see if there are any extra characters left\n\t\t\tif (temp.length() > 0) {\n\t\t\t\t// there is still something left\n\t\t\t\tdirecs.add(temp);\n\t\t\t}\n\n\t\t\t// go through each directory, checking if it exists. if not, create\n\t\t\t// the directory and repeat.\n\t\t\tDirectoryObjects l = current;\n\n\t\t\tfor (String p : direcs) {\n\n\t\t\t\tif (l.getDirectoryByName(p) != null) {\n\t\t\t\t\tl = l.getDirectoryByName(p);\n\t\t\t\t} else {\n\t\t\t\t\t// instead of creating a new directory, we just throw an\n\t\t\t\t\t// exception\n\t\t\t\t\treturn l;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn l;\n\n\t\t}\n\n\t}", "public File createContainingDir(File basedir) {\n String dirname = FileUtils.toSafeFileName(_url.getHost()+\"_\"+_layerName);\n File dir = new File(basedir, dirname );\n \n for(int i=1; dir.exists(); i++){\n dir = new File(basedir, dirname+\"_\"+i);\n }\n return dir;\n }", "@Test\n public void testMkdirMultipleDirectoriesMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory1\", \"/directory2\"};\n String[] path2 = {\"directory1/subDirectory1\", \"/directory2/subDirectory2\"};\n try {\n myTree.mkdir(path1);\n myTree.mkdir(path2);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2/subDirectory2\"), true);\n }", "@Test\n public void testMkdirOneDirectoryRelativePathOneDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"directory1\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"directory1 already exists or the path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1\"), true);\n }", "private void fillImagesInDirectory() throws IOException {\n // get the list of all files (including directories) in the directory of interest\n File[] fileArray = directory.listFiles();\n assert fileArray != null;\n for (File file : fileArray) {\n // the file is an image, then add it\n if (isImage(file)) {\n ImageFile imageFile = new ImageFile(file.getAbsolutePath());\n // if the image is already saved, reuse it\n if (centralController.getImageFileController().hasImageFile(imageFile)) {\n imagesInDirectory.add(centralController.getImageFileController().getImageFile(imageFile));\n } else {\n imagesInDirectory.add(imageFile);\n }\n }\n }\n }", "@Override\n protected void createRootDir() {\n }", "private static void addDir(String s) throws IOException { This enables the java.library.path to be modified at runtime\n // From a Sun engineer at\n // http://forums.sun.com/thread.jspa?threadID=707176\n //\n try {\n Field field = ClassLoader.class.getDeclaredField(\"usr_paths\");\n\n field.setAccessible(true);\n String[] paths = (String[]) field.get(null);\n for (String path : paths) {\n if (s.equals(path)) {\n return;\n }\n }\n String[] tmp = new String[paths.length + 1];\n System.arraycopy(paths, 0, tmp, 0, paths.length);\n tmp[paths.length] = s;\n field.set(null, tmp);\n System.setProperty(\"java.library.path\", System.getProperty(\"java.library.path\")\n + File.pathSeparator + s);\n } catch (IllegalAccessException e) {\n throw new IOException(\"Failed to get permissions to set library path\");\n } catch (NoSuchFieldException e) {\n throw new IOException(\"Failed to get field handle to set library path\");\n }\n }", "private boolean addRecursive(T item, BinaryTreeNode current) {\n\n\t\tif (item.equals(current.data)) return false;\n\n\t\tif (item.compareTo(current.data) <= 0) { // item is smaller than or equal to current ** NOTE - remove '=' based on Piazza response\n\n\t\t\t// perform left handed operations\n\n\t\t\tif (current.left == null) {\n\t\t\t\tcurrent.left = new BinaryTreeNode(item,current);\n\t\t\t\tsize++;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif (!addRecursive(item, current.left)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\t// perform right handed operations\n\n\t\t\tif (current.right == null) {\n\t\t\t\tcurrent.right = new BinaryTreeNode(item,current);\n\t\t\t\tsize++;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif (!addRecursive(item, current.right)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void setDirInternal(File dir) {\n if (dir == null) {\n baseDir = null;\n return;\n }\n\n ReplicaDirInfo dirInfo = parseBaseDir(dir, getBlockId());\n this.hasSubdirs = dirInfo.hasSubidrs;\n\n synchronized (internedBaseDirs) {\n if (!internedBaseDirs.containsKey(dirInfo.baseDirPath)) {\n // Create a new String path of this file and make a brand new File object\n // to guarantee we drop the reference to the underlying char[] storage.\n File baseDir = new File(dirInfo.baseDirPath);\n internedBaseDirs.put(dirInfo.baseDirPath, baseDir);\n }\n this.baseDir = internedBaseDirs.get(dirInfo.baseDirPath);\n }\n }", "@Test\n public void testMkdirMultipleDirectoriesAbsolutePathMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"/directory1\", \"/directory2\"};\n String[] path2 = {\"/directory1/subDirectory1\", \"/directory2/subDirectory2\"};\n try {\n myTree.mkdir(path1);\n myTree.mkdir(path2);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2/subDirectory2\"), true);\n }", "private ArrayList<char[]> subdirectoriesToFiles(ArrayList<char[]> currentList, ArrayList<char[]> fullFileList) throws IOException {\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\telse if (file.isDirectory()){\n\t\t\t\t$.log(file.toString());\n\t\t\t\tsubdirectoriesToFiles(file.getAbsolutePath(), fullFileList);\n\t\t\t}\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}", "private void loadDirectoryUp() {\n\t\tString s = pathDirsList.remove(pathDirsList.size() - 1);\n\t\t// path modified to exclude present directory\n\t\tpath = new File(path.toString().substring(0,\n\t\t\t\tpath.toString().lastIndexOf(s)));\n\t\tfileList.clear();\n\t}", "public void add (K key) {\n\t\tthis.root = this.addRecursively(root,key);\n\t}", "public Path getRepositoryBaseDir();", "@Test\n public void testMkdirOneDirectoryAbsolutePathMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"/directory1\", \"/directory1/subDirectory1\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"A already exists or a path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n }", "@Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n // Create this directory in the target and make it our current target.\n Path newDirectory = this.currentTargetDirectory.resolve(dir.getFileName());\n boolean didCreate = newDirectory.toFile().mkdir();\n Assert.assertTrue(didCreate);\n logger.output(\"Created directory: \" + newDirectory);\n this.currentTargetDirectory = newDirectory;\n }\n return FileVisitResult.CONTINUE;\n }", "public static void createTestRepos(Path sourceDirectory) throws IOException {\n Path remoteRoot = Paths.get(\"/tmp/remotes/\");\n Files.createDirectories(remoteRoot);\n\n Files.list(sourceDirectory.resolve(\"configs/containers\"))\n .filter( file -> file.getFileName().toString().endsWith(\".cfg\") )\n .forEach( path -> {\n String containerName = path.getFileName().toString();\n Path containerRepoPath = remoteRoot.resolve(containerName.substring(0, containerName.lastIndexOf('.')));\n\n if (!Files.isDirectory(containerRepoPath.resolve(\".git\"))) {\n try {\n Files.createDirectories(containerRepoPath);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n try (Git ignored = initRepo(containerRepoPath)) {\n } catch (GitAPIException e) {\n throw new IllegalArgumentException(e);\n }\n }\n }\n );\n }", "private void enqueueFiles(File currentRoot){\n // stop condition\n if (currentRoot.listFiles().length == 0) return;\n // recursivly places all files in the queue\n for(File subDir : currentRoot.listFiles(File::isDirectory)){\n m_DirectoryQueue.enqueue(subDir);\n enqueueFiles(subDir);\n }\n }", "@Test\n public void testCdRelativePathOneDeepToMultiDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"directory2\");\n myTree.cd(\"directory3/directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }", "@Test\n public void testMkdirMultipleDirectoriesOneDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"directory1\", \"/directory2\", \"directory3\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"Directory 1 or 2 already exists or the path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2\"), true);\n assertEquals(myTree.hasDirectory(\"/directory3\"), true);\n }", "public void resetRepository() {\n repository.clear();\n addDirectories( directory );\n }", "@Override\n public boolean add(T parent, T child) {\n boolean result = false;\n if (this.root == null) {\n this.root = new Node<>(parent);\n this.root.add(new Node<>(child));\n result = true;\n this.modCount++;\n } else if (findBy(parent).isPresent()) {\n findBy(parent).get().add(new Node<>(child));\n result = true;\n this.modCount++;\n }\n return result;\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 }", "@Test\n public void testCdRelativePathMultiDeepToOneDeeper() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"/directory2/directory3\");\n myTree.cd(\"directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }", "void addFile(RebaseJavaFile jf)\n{\n if (file_nodes.contains(jf)) return;\n\n file_nodes.add(jf);\n jf.setRoot(this);\n}", "@Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n this.currentTargetDirectory = this.currentTargetDirectory.getParent();\n }\n return FileVisitResult.CONTINUE;\n }", "private static void zipSubFolder(ZipOutputStream out, File folder,\n\t\t\tint basePathLength) throws IOException {\n\n\t\tFile[] fileList = folder.listFiles();\n\t\tBufferedInputStream origin = null;\n\t\tfor (File file : fileList) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tzipSubFolder(out, file, basePathLength);\n\t\t\t} else {\n\t\t\t\tbyte data[] = new byte[BUFFER_SIZE];\n\t\t\t\tString unmodifiedFilePath = file.getPath();\n\t\t\t\tString relativePath = unmodifiedFilePath\n\t\t\t\t\t\t.substring(basePathLength);\n\t\t\t\tLog.i(\"ZIP SUBFOLDER\", \"Relative Path : \" + relativePath);\n\t\t\t\tFileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\t\t\t\torigin = new BufferedInputStream(fi, BUFFER_SIZE);\n\t\t\t\tZipEntry entry = new ZipEntry(relativePath);\n\t\t\t\tout.putNextEntry(entry);\n\t\t\t\tint count;\n\t\t\t\twhile ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n\t\t\t\t\tout.write(data, 0, count);\n\t\t\t\t}\n\t\t\t\torigin.close();\n\t\t\t}\n\t\t}\n\t}", "@Nonnull\n private static String mergePath(@Nonnull final String directory, @Nonnull final String name) {\n if (directory.endsWith(\"/\")) {\n return directory + name;\n }\n return directory + '/' + name;\n }", "public void pushToStack(Directory dir) {\n directoryStack.push(dir);\n }", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public void addToFiles(Path pathDir) {\n this.files.add(pathDir);\n }", "protected void loadExtensions()\n {\n // Load local extension from repository\n\n if (this.rootFolder.exists()) {\n FilenameFilter descriptorFilter = new FilenameFilter()\n {\n public boolean accept(File dir, String name)\n {\n return name.endsWith(\".xed\");\n }\n };\n\n for (File child : this.rootFolder.listFiles(descriptorFilter)) {\n if (!child.isDirectory()) {\n try {\n LocalExtension localExtension = loadDescriptor(child);\n\n repository.addLocalExtension(localExtension);\n } catch (Exception e) {\n LOGGER.warn(\"Failed to load extension from file [\" + child + \"] in local repository\", e);\n }\n }\n }\n } else {\n this.rootFolder.mkdirs();\n }\n }", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\tSystem.out.println(dir.toAbsolutePath());\n\t\tPath RelativizedPath = SourceRoot.relativize(dir);\n\t\tSystem.out.println(RelativizedPath.toAbsolutePath());\n\t\tPath ResolvedPath = TargetRoot.resolve(RelativizedPath);\n\t\tSystem.out.println(ResolvedPath.toAbsolutePath());\n\t\t\n\t\ttry {\n\t\t\tFiles.copy(dir,ResolvedPath,StandardCopyOption.REPLACE_EXISTING);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t}\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tFiles.deleteIfExists(dir);\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\t\n\t\treturn FileVisitResult.CONTINUE;\n\t}", "private void recurseOverFolder(final File folder) {\n File[] files = folder.listFiles();\n if (files == null) {\n return;\n }\n\n // Check each path and recurse if it's a folder, handle if it's a file\n for (final File fileEntry : files) {\n if (fileEntry.isDirectory()) {\n recurseOverFolder(fileEntry);\n } else {\n handleFile(fileEntry);\n }\n }\n }", "public void buildAllRepositories() {\n for (ServerRepository serverRepository : serverRepositories.values()) {\n buildRepository(serverRepository, false);\n }\n\n updateServerInfo();\n }", "public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}", "public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}", "public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}", "@Override\r\n protected void addPath(File path, int depth) throws SAXException {\r\n List<ZipEntry> contents = new ArrayList<ZipEntry>();\r\n if (depth > 0) {\r\n ZipFile zipfile = null;\r\n try {\r\n zipfile = new ZipFile(path, Charset.forName(\"UTF-8\"));\r\n Enumeration<? extends ZipEntry> entries = zipfile.entries();\r\n while (entries.hasMoreElements()) contents.add((ZipEntry)entries.nextElement());\r\n } catch (ZipException e) {\r\n throw new SAXException(e);\r\n } catch (IOException e) {\r\n throw new SAXException(e);\r\n } finally {\r\n if (zipfile != null) {\r\n try {\r\n zipfile.close();\r\n } catch (IOException e) {\r\n }\r\n }\r\n } // finally\r\n } // if depth > 0\r\n startNode(DIR_NODE_NAME, path);\r\n processZipEntries(contents, \"\", depth);\r\n endNode(DIR_NODE_NAME);\r\n }", "public void setBasedir(String baseD) throws BuildException {\n setBaseDir(new File(baseD));\n }", "private void addStyles(String dir, boolean recurse) {\n File dirF = new File(dir);\n if (dirF.isDirectory()) {\n File[] files = dirF.listFiles();\n for (File file : files) {\n // If the file looks like a style file, parse it:\n if (!file.isDirectory() && (file.getName().endsWith(StyleSelectDialog.STYLE_FILE_EXTENSION))) {\n addSingleFile(file);\n }\n // If the file is a directory, and we should recurse, do:\n else if (file.isDirectory() && recurse) {\n addStyles(file.getPath(), recurse);\n }\n }\n }\n else {\n // The file wasn't a directory, so we simply parse it:\n addSingleFile(dirF);\n }\n }", "@Override\n\tpublic void run() {\n\t\tif (!mainDir.isDirectory()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// inserisco il nome della cartella principale.\n\t\tproduceDirPath(mainDir.getName());\n\t\t\n\t\t// navigo ricorsivamente.\n\t\twalkDir(mainDir);\n\t}", "public void addNode(Node node){subNodes.add(node);}", "public File createSubDirectories(String directoryPath) {\n File myFilesDir = new File(this.assetFolderPath, directoryPath);\n\n if(!myFilesDir.isDirectory()) {\n myFilesDir.mkdirs();\n }\n return myFilesDir;\n }", "private void copyRootDirectory(WorkUnit workUnit) throws IOException, InterruptedException {\n\n MigrationHistory history = historyMgr.startStep(workUnit.migration, StepEnum.SVN_COPY_ROOT_FOLDER,\n (workUnit.commandManager.isFirstAttemptMigration() ? \"\" : Constants.REEXECUTION_SKIPPING) +\n \"Copying Root Folder\");\n\n if (workUnit.commandManager.isFirstAttemptMigration()) {\n\n String gitCommand = \"\";\n if (isWindows) {\n // /J Copy using unbuffered I/O. Recommended for very large files.\n gitCommand = format(\"Xcopy /E /I /H /Q %s %s_copy\", workUnit.root, workUnit.root);\n } else {\n // cp -a /source/. /dest/ (\"-a\" is recursive \".\" means files and folders including hidden)\n // root has no trailling / e.g. folder_12345\n gitCommand = format(\"cp -a %s %s_copy\", workUnit.root, workUnit.root);\n }\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n }", "private void createDirectories(BinaryReader reader, List<ISO9660Directory> directoryList,\n\t\t\tlong blockSize, TaskMonitor monitor) throws DuplicateNameException, Exception {\n\n\t\tfor (ISO9660Directory dir : directoryList) {\n\n\t\t\t//If the directory is a new level of directories\n\t\t\t//recurse down into the next level\n\t\t\tif (dir.isDirectoryFlagSet() && dir.getName() != null) {\n\t\t\t\tList<ISO9660Directory> dirs;\n\t\t\t\tdirs = createDirectoryList(reader, dir, blockSize, monitor);\n\t\t\t\tcreateDirectories(reader, dirs, blockSize, monitor);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public boolean containsDirectory(IDirectory child) {\n return children.contains(child);\n }", "private ArrayList<ISO9660Directory> createDirectoryList(BinaryReader reader,\n\t\t\tISO9660Directory parentDir, long blockSize, TaskMonitor monitor) throws IOException {\n\n\t\tArrayList<ISO9660Directory> directoryList = new ArrayList<>();\n\t\tISO9660Directory childDir = null;\n\t\tlong dirIndex;\n\t\tlong endIndex;\n\n\t\t//Get location from parent into child directory\n\t\tdirIndex = parentDir.getLocationOfExtentLE() * blockSize;\n\t\tendIndex = dirIndex + parentDir.getDataLengthLE();\n\n\t\t//while there is still more data in the current directory level\n\t\twhile (dirIndex < endIndex) {\n\t\t\treader.setPointerIndex(dirIndex);\n\n\t\t\t//If the next byte is not zero then create the directory\n\t\t\tif (reader.peekNextByte() != 0) {\n\t\t\t\tif (!lookedAtRoot) {\n\t\t\t\t\tchildDir = new ISO9660Directory(reader);\n\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\n\t\t\t\t}\n\n\t\t\t\t//Root level has already been looked at\n\t\t\t\telse {\n\t\t\t\t\tif (parentDir.getName() != null) {\n\t\t\t\t\t\tchildDir = new ISO9660Directory(reader, parentDir);\n\t\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Otherwise there is a gap in the data so keep looking forward\n\t\t\t//while still under the end index and create directory when data is\n\t\t\t//reached\n\t\t\telse {\n\t\t\t\treadWhileZero(reader, endIndex);\n\n\t\t\t\t//Create the data once the reader finds the next position\n\t\t\t\t//and not reached end index\n\t\t\t\tif (reader.getPointerIndex() < endIndex) {\n\t\t\t\t\tif (!lookedAtRoot) {\n\t\t\t\t\t\tchildDir = new ISO9660Directory(reader);\n\t\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\t\t\t\t\t\tdirIndex = childDir.getVolumeIndex();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (parentDir.getName() != null) {\n\t\t\t\t\t\t\tchildDir = new ISO9660Directory(reader, parentDir);\n\t\t\t\t\t\t\taddAndStoreDirectory(monitor, directoryList, childDir);\n\t\t\t\t\t\t\tdirIndex = childDir.getVolumeIndex();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tdirIndex += childDir.getDirectoryRecordLength();\n\t\t}\n\n\t\tlookedAtRoot = true;\n\t\treturn directoryList;\n\t}", "@Test\n public void testMkdirMultipleDirectoriesAbsolutePathOneDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"/directory1\", \"/directory2\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"directory1 or directory2 already exists or the path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2\"), true);\n }", "public String addDirectory(String dir)\n\t{\n\t\tString dirn= this.sysdir + File.separator + dir;\n\t\tFile f= new File(dirn);\n\t\tif( !f.exists() )\n\t\t\tf.mkdirs();\n\t\t\n\t\tsynchronized( syncFiles ) // get Intermediate-Data access for the key \n\t\t{\n\t\t\twhile( syncFileswait )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tsyncFiles.wait();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tsyncFileswait= true;\n\t\t\t\n\t\t\tfiles.put(dir, dirn);\n\t\t\t\n\t\t\tsyncFileswait= false;\n\t\t\tsyncFiles.notifyAll();\n\t\t}\n\t\t\n\t\treturn dirn;\n\t}" ]
[ "0.5978809", "0.53636336", "0.51620346", "0.51590216", "0.5153931", "0.5150124", "0.5102948", "0.5033414", "0.49772948", "0.49623522", "0.49374247", "0.49333584", "0.49330044", "0.49173653", "0.49146968", "0.48918557", "0.4890153", "0.4877059", "0.48677474", "0.48205864", "0.48119506", "0.47889513", "0.47871968", "0.4765031", "0.4764782", "0.47574833", "0.47560376", "0.47521454", "0.47479928", "0.4733318", "0.47090903", "0.4689442", "0.46713614", "0.46478575", "0.46287516", "0.46202457", "0.46182978", "0.46182808", "0.46050465", "0.45998028", "0.45983794", "0.4588362", "0.45597145", "0.45449877", "0.45440015", "0.45439926", "0.4536594", "0.4535411", "0.45075947", "0.45058605", "0.448419", "0.44656208", "0.4459128", "0.44586354", "0.44214875", "0.439576", "0.43946564", "0.4394095", "0.43790412", "0.43700317", "0.43680894", "0.43482417", "0.43326423", "0.43318647", "0.4327722", "0.4326622", "0.43062627", "0.42884627", "0.4281594", "0.4276796", "0.4275045", "0.42580897", "0.4250875", "0.4243755", "0.42420718", "0.42409354", "0.4238775", "0.42367193", "0.42242986", "0.4208373", "0.42070225", "0.42032912", "0.41999844", "0.41913617", "0.41873914", "0.41817546", "0.41817546", "0.41817546", "0.41587278", "0.41469643", "0.4143505", "0.41401792", "0.41285098", "0.41185427", "0.41164443", "0.41117716", "0.41112715", "0.41097492", "0.41029465", "0.4097414" ]
0.7799726
0
Name of the bot's class Create a new instance of ChildBot.
ChildBot( String className, String creator, Session bot ) { m_bot = bot; m_creator = creator; m_className = className; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "void spawnBot( String className, String messager ) {\n spawnBot( className, null, null, messager);\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "void spawnBot( String className, String login, String password, String messager ) {\n CoreData cdata = m_botAction.getCoreData();\n long currentTime;\n\n String rawClassName = className.toLowerCase();\n BotSettings botInfo = cdata.getBotConfig( rawClassName );\n\n if( botInfo == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"That bot type does not exist, or the CFG file for it is missing.\" );\n return;\n }\n\n Integer maxBots = botInfo.getInteger( \"Max Bots\" );\n Integer currentBotCount = m_botTypes.get( rawClassName );\n\n if( maxBots == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"The CFG file for that bot type is invalid. (MaxBots improperly defined)\" );\n return;\n }\n\n if( login == null && maxBots.intValue() == 0 ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Bots of this type are currently disabled on this hub. If you are running another hub, please try from it instead.\" );\n return;\n }\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( rawClassName, currentBotCount );\n }\n\n if( login == null && currentBotCount.intValue() >= maxBots.intValue() ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Maximum number of bots of this type (\" + maxBots + \") has been reached.\" );\n return;\n }\n\n String botName, botPassword;\n currentBotCount = new Integer( getFreeBotNumber( botInfo ) );\n\n if( login == null || password == null ) {\n botName = botInfo.getString( \"Name\" + currentBotCount );\n botPassword = botInfo.getString( \"Password\" + currentBotCount );\n } else {\n botName = login;\n botPassword = password;\n }\n\n Session childBot = null;\n\n try {\n // FIXME: KNOWN BUG - sometimes, even when it detects that a class is updated, the loader\n // will load the old copy/cached class. Perhaps Java itself is caching the class on occasion?\n if( m_loader.shouldReload() ) {\n System.out.println( \"Reinstantiating class loader; cached classes are not up to date.\" );\n resetRepository();\n m_loader = m_loader.reinstantiate();\n }\n\n Class<? extends SubspaceBot> roboClass = m_loader.loadClass( \"twcore.bots.\" + rawClassName + \".\" + rawClassName ).asSubclass(SubspaceBot.class);\n String altIP = botInfo.getString(\"AltIP\" + currentBotCount);\n int altPort = botInfo.getInt(\"AltPort\" + currentBotCount);\n String altSysop = botInfo.getString(\"AltSysop\" + currentBotCount);\n\n if(altIP != null && altSysop != null && altPort > 0)\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, altIP, altPort, altSysop, true);\n else\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, true);\n } catch( ClassNotFoundException cnfe ) {\n Tools.printLog( \"Class not found: \" + rawClassName + \".class. Reinstall this bot?\" );\n return;\n }\n\n currentTime = System.currentTimeMillis();\n\n if( m_lastSpawnTime + SPAWN_DELAY > currentTime ) {\n m_botAction.sendSmartPrivateMessage( messager, \"Subspace only allows a certain amount of logins in a short time frame. Please be patient while your bot waits to be spawned.\" );\n\n if( m_spawnQueue.isEmpty() == false ) {\n int size = m_spawnQueue.size();\n\n if( size > 1 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"There are currently \" + m_spawnQueue.size() + \" bots in front of yours.\" );\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"There is only one bot in front of yours.\" );\n }\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"You are the only person waiting in line. Your bot will log in shortly.\" );\n }\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" in queue to spawn bot of type \" + className );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader in queue to spawn bot of type \" + className );\n }\n\n String creator;\n\n if(messager != null) creator = messager;\n else creator = \"AutoLoader\";\n\n ChildBot newChildBot = new ChildBot( rawClassName, creator, childBot );\n addToBotCount( rawClassName, 1 );\n m_botStable.put( botName, newChildBot );\n m_spawnQueue.add( newChildBot );\n }", "public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public GameManager(List<String> botNames){\n\t\tdeck = new Deck();\n\t\ttable = new Table();\n\t\tplayers = new ArrayList<Bot>();\n\t\t\n\t\t//create player objects via reflection\n\t\tfor (String botName : botNames){\n\t\t\ttry {\n\t\t\t\tplayers.add(newInstance(botName));\n\t\t\t} catch (ClassNotFoundException | NoSuchMethodException\t| InstantiationException | \n\t\t\t\t\tIllegalAccessException| IllegalArgumentException | InvocationTargetException e) {\n\t\t\t\t\t\tSystem.err.println(\"No such bot class found: \" + botName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public static NPC createNPC(){\n\t\treturn new NPC();\n\t}", "public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}", "private void handleCreateCommand() throws IOException,\r\n ClassNotFoundException,\r\n InstantiationException,\r\n IllegalAccessException {\r\n final String className = (String) m_in.readObject();\r\n Class klass = Class.forName(className, false, m_loader);\r\n final Object instance = klass.newInstance();\r\n final String handle = RemoteProxy.wrapInstance(instance);\r\n m_out.writeObject(handle);\r\n m_out.flush();\r\n }", "Inheritance createInheritance();", "PlayerBean create(String name);", "NamedClass createNamedClass();", "public static void main(String[] args) {\n\n Parent parent = new Parent();\n parent.name=\"asdfasdfas\";\n\n Son son = new Son();\n\n\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "public ChildOfInheritance(String name) {\n\t\tsuper(name, 1);\n\t\t\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn \"new\";\n\t}", "NewClass1 createNewClass1();", "MiniBotXboxInputEventHandler(String _botName) {\n botName = _botName;\n }", "BotQueue( ThreadGroup group, BotAction botAction ) {\n super( group, \"BotQueue\" );\n repository = new Vector<File>();\n m_group = group;\n m_lastSpawnTime = 0;\n m_botAction = botAction;\n directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( \"Core Location\" ));\n\n int delay = m_botAction.getGeneralSettings().getInt( \"SpawnDelay\" );\n\n if( delay == 0 )\n SPAWN_DELAY = 20000;\n else\n SPAWN_DELAY = delay;\n\n if ( m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"localhost\") ||\n m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"127.0.0.1\"))\n SPAWN_DELAY = 100;\n\n resetRepository();\n\n m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() );\n m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() );\n m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() );\n\n m_botTypes.put( \"hubbot\", new Integer( 1 ));\n\n if( repository.size() == 0 ) {\n Tools.printLog( \"There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?\" );\n } else {\n System.out.println( \"Looking through \" + directory.getAbsolutePath()\n + \" for bots. \" + (repository.size() - 1) + \" child directories.\" );\n System.out.println();\n System.out.println(\"=== Loading bots ... ===\");\n }\n\n m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() );\n }", "protected ChildType() {/* intentionally empty block */}", "Instance createInstance();", "public static void main(String[] args) {\n Parents child = new Childs(100);\n }", "Class createClass();", "Parent() {\n\t System.out.println(\"i am from Parent Class\");\n\t }", "public String createChild(ChildUser c){\n return newUserCreator.newChild(c);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"class ChildClass\";\n\t}", "public DiagramCreation(String name,String type,String prNm,String childClName) {\n this(name,type,prNm,childClName,ElementTypes.COMMENT,\"\");\n }", "public CMObject newInstance();", "public static void main(String[] args) {\n\n\t\tGrandChildClass grandchild = new GrandChildClass();\n\t\t\n\t}", "DescribedClass createDescribedClass();", "private CommandBrocker() {}", "public abstract ManagedChannelBuilder<?> builderForTarget(String str);", "IClassBuilder getParent();", "Clase createClase();", "public InteractionClass( ObjectModel model, String name, InteractionClass parent )\n\t{\n\t\tthis.model = model;\n\t\tthis.name = name;\n\t\tthis.qualifiedName = null;\n\t\tthis.handle = null;\n\t\tthis.parent = parent;\n\t\tthis.children = new HashSet<>();\n\t\tthis.parameters = new HashMap<>();\n\t\t\n\t\t// add ourselves to the parent (unless we're the root, in which case we have no parent)\n\t\tif( parent != null )\n\t\t\tparent.addChild( this );\n\t}", "private CommandType(String name) {\n\t\t\n\t\tthis.name = name;\n\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public Command build() {\n switch (CommandType.fromString(commandName.getEscapedAndStrippedValue())) {\n case ASSIGN:\n return new AssignmentCommand(commandArgs);\n case CAT:\n return new CatCommand(commandArgs);\n case ECHO:\n return new EchoCommand(commandArgs);\n case WC:\n return new WcCommand(commandArgs);\n case PWD:\n return new PwdCommand(commandArgs);\n case GREP:\n return new GrepCommand(commandArgs);\n case EXIT:\n return new ExitCommand(commandArgs);\n default:\n return new OtherCommand(commandName, commandArgs);\n }\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public void createInstance(String className, String instanceName)\r\n\t{\r\n\t\t\r\n\t\tOntClass c = obtainOntClass(className);\r\n\t\t\r\n\t\tString longName;\r\n\t\tif(instanceName.contains(\"#\"))\r\n\t\t\tlongName = instanceName;\r\n\t\tif(instanceName.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(instanceName);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + instanceName;\r\n\t\t\r\n\t\tc.createIndividual(longName);\r\n\t}", "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "public Player2(){\n super();\n name=\"110\";\n }", "@Override\n public Animal newChild() {\n return new Fox(0);\n }", "public TargetClass() {\n super();\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "Command createCommandWith(CommandCreator creator);", "void printMsgC() {\n System.out.println(\"This is the child class\");\n }", "public PartOfSpeechTagger newPartOfSpeechTagger( String className )\r\n\t{\r\n\t\tPartOfSpeechTagger partOfSpeechTagger\t= null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tpartOfSpeechTagger\t=\r\n\t\t\t\t(PartOfSpeechTagger)Class.forName(\r\n\t\t\t\t\tclassName ).newInstance();\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\tString fixedClassName\t=\r\n\t\t\t\t(String)taggerClassMap.get( className );\r\n\r\n\t\t\tif ( fixedClassName != null )\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tpartOfSpeechTagger\t=\r\n\t\t\t\t\t\t(PartOfSpeechTagger)Class.forName(\r\n\t\t\t\t\t\t\tfixedClassName ).newInstance();\r\n\t\t\t\t}\r\n\t\t\t\tcatch ( Exception e2 )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\"Unable to create part of speech tagger of class \" +\r\n\t\t\t\t\t\tfixedClassName + \", using trigram tagger.\" );\r\n\r\n\t\t\t\t\tpartOfSpeechTagger\t= new TrigramTagger();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"Unable to create part of speech tagger of class \" +\r\n\t\t\t\t\tclassName + \", using trigram tagger.\" );\r\n\r\n\t\t\t\tpartOfSpeechTagger\t= new TrigramTagger();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn partOfSpeechTagger;\r\n\t}", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n\n .match(WhoToGreet.class, wtg -> {\n // -> uses the internal state of wtg and modify this internal state (this.greeting)\n this.greeting = \"Who to greet? -> \" + wtg.who;\n\n }).match(Greet.class, x -> {\n // -> send a message to another actor (thread)\n printerActor.tell(new Printer.Greeting(greeting), getSelf());\n\n }).build();\n }", "public void setBotName(String botName) {\n this.botName = botName;\n }", "SpawnController createSpawnController();", "Intent createNewIntent(Class cls);", "public static void main(String[] args) {\n\t\tChild Child = new Child();\r\n\t\tSystem.out.println(\" ex \");\r\n\t}", "DynamicInstance createDynamicInstance();", "public CommandHandler(String name, ICommand parent) {\r\n\t\tsuper(name, parent);\r\n\t\tsubCommands = new Hashtable<String, ICommand>();\r\n\t}", "public Cross(String owner){\r\n super(owner);\r\n }", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "public Subsystem1() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\nspeedController1 = new PWMVictorSPX(0);\naddChild(\"Speed Controller 1\",speedController1);\nspeedController1.setInverted(false);\n \nspeedController2 = new PWMVictorSPX(1);\naddChild(\"Speed Controller 2\",speedController2);\nspeedController2.setInverted(false);\n \nspeedController3 = new PWMVictorSPX(2);\naddChild(\"Speed Controller 3\",speedController3);\nspeedController3.setInverted(false);\n \nspeedController4 = new PWMVictorSPX(3);\naddChild(\"Speed Controller 4\",speedController4);\nspeedController4.setInverted(false);\n \nmecanumDrive1 = new MecanumDrive(speedController1, speedController2,\nspeedController3, speedController4);\naddChild(\"Mecanum Drive 1\",mecanumDrive1);\nmecanumDrive1.setSafetyEnabled(true);\nmecanumDrive1.setExpiration(0.1);\nmecanumDrive1.setMaxOutput(1.0);\n\n \n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\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 ChatbotAppController()\n\t{\n\t\tapplicationView = new ChatbotView(this);\n\t\tbaseFrame = new ChatbotFrame(this);\n\t\tmySillyChatbot = new Chatbot(\"Derf\");\n\t\tstartMessage = \"Welcome to the \" + mySillyChatbot.getName() + \" chatbot. What is your name?\";\n\t\tquitMessage = \"goodbye cruel user :(\";\n\t\tcontentMessages = \"That's really cool I love riding motorcycles too!\";\n\t}", "public static void main(String[] args) {\n ChildOfderived1 cd = new ChildOfderived1(10,20,30);\r\n }", "@SuppressWarnings(\"unchecked\")\n protected synchronized T newChild() {\n try {\n T t = ((Class<T>)getClass()).newInstance();\n t.isRootNode = false;\n \n if( ! isRootNode ) {\n if( children == null ) children = new ArrayList<T>();\n children.add( t );\n }\n \n return t;\n } catch( Exception ex ) {\n throw new RuntimeException(ex);\n }\n }", "protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }", "Command createCommand();", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "public ActorNPC() {\r\n }", "private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private void createAgent(Class<?> clazz, String name) {\r\n try {\r\n // Fill description of an agent to be created\r\n CreateAgent ca = new CreateAgent();\r\n ca.setAgentName(name);\r\n ca.setClassName(clazz.getCanonicalName());\r\n ca.setContainer(container);\r\n\r\n Action act = new Action(getAMS(), ca);\r\n ACLMessage req = new ACLMessage(ACLMessage.REQUEST);\r\n req.addReceiver(getAMS());\r\n req.setOntology(ontology.getName());\r\n req.setLanguage(FIPANames.ContentLanguage.FIPA_SL);\r\n req.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n getContentManager().fillContent(req, act);\r\n \r\n // AMS sends a response, \r\n addBehaviour(new AchieveREInitiator(this, req) {\r\n @Override\r\n protected void handleInform(ACLMessage inform) {\r\n logger.severe(\"Success\");\r\n }\r\n\r\n @Override\r\n protected void handleFailure(ACLMessage inform) {\r\n logger.severe(\"Failure\");\r\n }\r\n });\r\n } catch (CodecException | OntologyException e) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n PrintStream printer = new PrintStream(out);\r\n e.printStackTrace(printer);\r\n logger.severe(out.toString());\r\n }\r\n }", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tChild1 ch = new Child1();\n\t\t\n\t\tSystem.out.println(Inheritance.race); // static oldugundan kendi class adiyla cagirdik.\n\t\t\n\t\tSystem.out.println(ch.eyeColor);\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tch.sing(); // parenttan geldi. inheritance class yani\n\t\tch.code(); // child1 den geldi. \n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"parent:\\n\");\n\t\t\n\t\tInheritance parent = new Inheritance();\n\t\t\t\n\t\tSystem.out.println(parent.hairColor);\t\n\t\t\n\t\tSystem.out.println(parent.eyeColor);\n\t\t\n\t\tSystem.out.println(Inheritance.race); \n\n\t\tSystem.out.println();\n\t\t\n\t\tparent.sing();\n//\t\tparent.code(); // cocugun behaviorlarini method kullanamaz\n\t\t\n}", "public ChatRoomCreationMsgBehaviour( String name, String creatorPrimaryKey, boolean isBotChatRoom ) {\n super( name, creatorPrimaryKey );\n this.isBotChatRoom = isBotChatRoom;\n }", "public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}", "public Chat() {\n }", "public Chat(){ }", "Drone createDrone();", "private static Bat createBat(){\n try {\n UtilityMethods.print(\"Creating Big bat for you...!\"); \n BatGenerator batGenerator = new BatGenerator();\n BatBuilder bigBatBuilder = new BigBatBuilder();\n batGenerator.setBatBuilder(bigBatBuilder);\n batGenerator.constructBat(\n \"Bat\", \n \"Male\",\n 25,\n \"Scavenger\"\n );\n Bat bigBat = bigBatBuilder.getBat();\n UtilityMethods.print(\"\\n\"); \n bigBat.eat();\n UtilityMethods.print(\"\\n\"); \n bigBat.speak();\n UtilityMethods.print(\"\\n\"); \n bigBat.walk();\n UtilityMethods.print(\"\\n\"); \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }", "public Telefone() {\n\t}", "public static void createNPC() {\n //create the good npc\n BSChristiansen.setName(\"BS_Christiansen\");\n BSChristiansen.setCurrentRoom(jungle);\n BSChristiansen.setDescription(\"The survivor of the plane crash look to be some kind of veteran soldier, \"\n + \"\\nbut he is heavly injured on his right leg so he cant move \");\n BSChristiansen.addDialog(\"If you want to survive on this GOD forsaken island, you \\nmust first find food and shelter.\"\n + \"\\nYou can craft items to help you survive, if you \\nhave the right components.\");\n BSChristiansen.addDialog(\"To escape the island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n\n //create the bad npc\n josephSchnitzel.setName(\"Joseph_Schnitzel\");\n josephSchnitzel.setCurrentRoom(mountain);\n josephSchnitzel.setDescription(\"A lonely surviver with very filthy hair, and a wierd smell of weinerschnitzel.\");\n josephSchnitzel.addDialog(\"Heeelloooo there my freshlooking friend, I am Joseph\\nSchnitzel, if you scratch my back I might scratch your's.\" + \"\\n\" + \"Go fetch me some eggs, or I'll kill you\");\n josephSchnitzel.addDialog(\"Talks to himself\\nis that muppet still alive\");\n josephSchnitzel.addDialog(\"Talks to himself\\nHow long is he going to last\");\n josephSchnitzel.addDialog(\"Talks to himself\\nI wonder what those noises were ing the cave\");\n josephSchnitzel.addDialog(\"GET THE HELL OUT OF MY WAY!!!\");\n josephSchnitzel.setDamageValue(100);\n\n //create another npc\n mysteriousCrab.setName(\"Mysterious_Crab\");\n mysteriousCrab.setCurrentRoom(cave);\n mysteriousCrab.setDescription(\"A mysterious crab that you dont really get why can talk\");\n mysteriousCrab.addDialog(\"MUHAHAHA i'm the finest and most knowledgeable \\ncrab of them all mr.Crab and know this island\\nlike the back of my hand! oh i mean claw...\"\n + \"\\nA Random fact: \"\n + \"to escape this island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n }", "private Node addChild(Node parent, NodeTypes type, String name, String indexName) {\r\n Node child = null;\r\n child = neo.createNode();\r\n child.setProperty(INeoConstants.PROPERTY_TYPE_NAME, type.getId());\r\n // TODO refactor 2 property with same name!\r\n child.setProperty(INeoConstants.PROPERTY_NAME_NAME, name);\r\n child.setProperty(INeoConstants.PROPERTY_SECTOR_NAME, indexName);\r\n luceneInd.index(child, NeoUtils.getLuceneIndexKeyByProperty(getNetworkNode(), INeoConstants.PROPERTY_NAME_NAME, type),\r\n indexName);\r\n if (parent != null) {\r\n parent.createRelationshipTo(child, NetworkRelationshipTypes.CHILD);\r\n debug(\"Added '\" + name + \"' as child of '\" + parent.getProperty(INeoConstants.PROPERTY_NAME_NAME));\r\n }\r\n return child;\r\n }", "public static void main(String[] args) {\n Father child = new Children();\n child.tech();\n }", "private Button createNewGameButton() {\n Button newGameButton = new Button(Config.NEW_GAME_BUTTON);\n newGameButton.setTranslateY(10);\n newGameButton.setTranslateX(10);\n\n // TODO: move stuff like this to the CSS resources.\n DropShadow effect = new DropShadow();\n effect.setColor(Color.BLUE);\n newGameButton.setEffect(effect);\n\n return newGameButton;\n }", "protected RemoteFactory.Agent.Component<Msg, Ref> newAgent() {\n RemoteFactory.Agent<Msg, Ref> _implem = _createImplementationOfAgent();\n return _implem._newComponent(new RemoteFactory.Agent.Requires<Msg, Ref>() {},true);\n }", "private static PublishLogDataStrategy createNewStrategie(String className) {\n\n\t\tPublishLogDataStrategy request = null;\n\n\t\ttry {\n\t\t\tClass<?> cl = Class.forName(className);\n\t\t\tLOGGER.info(cl.toString() + \" instantiated\");\n\t\t\tif (cl.getSuperclass() == PublishLogDataStrategy.class) {\n\t\t\t\trequest = (PublishLogDataStrategy) cl.newInstance();\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tLOGGER.severe(\"ClassNotFound\");\n\t\t} catch (InstantiationException e) {\n\t\t\tLOGGER.severe(\"InstantiationException\");\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLOGGER.severe(\"IllegalAccessException\");\n\t\t}\n\n\t\treturn request;\n\t}", "protected JBuilderRenameClassRefactoring()\n\t{\n\t\tsuper();\n\t}", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n .match(PrinterActorProtocol.OnCommand.class, greeting -> {\n System.out.println(\"**--become(createNormalReceive())\");\n getContext().become(createNormalReceive());\n })\n .match(PrinterActorProtocol.StartSelfTestCommand.class, greeting -> {\n System.out.println(\"**--become(createSelfTestModeReceive()\");\n getContext().become(createSelfTestModeReceive());\n })\n\n\n .matchAny( obj -> System.out.println(\"PritnerActor Unknown message \" + obj.getClass()) )\n .build();\n }", "public static void main(String[] args) throws SQLException, IOException {\n EzClass ChatMessage = new EzClass(Ref.getNmsOrOld(\"network.chat.ChatMessage\", \"ChatMessage\"));\n ChatMessage.setConstructor(String.class);\n ChatMessage.newInstance(\"Testing\");\n Object chatMessageEz = ChatMessage.getInstance();\n\n //Java Original Reflection examples\n Class<?> clazz = Ref.getNmsOrOld(\"network.chat.ChatMessage\", \"ChatMessage\");\n if (clazz != null) {\n try {\n Constructor<?> constructor = clazz.getDeclaredConstructor(String.class);\n constructor.setAccessible(true);\n Object chatMessage = constructor.newInstance(\"Testing\");\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }", "public NewCommand(ApplicationData data) {\n super(\"NewCommand\");\n this.data = data;\n // configure log4j using resource URL APF-548\n DOMConfigurator.configure(getClass().getResource(\"/META-INF/log4j.xml\"));\n log = getLogger(NewCommand.class);\n\n }", "private SceneGraphObject createNodeFromSuper( String className ) {\n\tSceneGraphObject ret;\n\n String tmp = this.getClass().getName();\n String superClass = tmp.substring( tmp.indexOf(\"state\")+6, tmp.length()-5 );\n\n System.err.println(\"Unable to create node \"+className+\" attempting Java3D superclass \"+superClass );\n\n\ttry {\n Class state = Class.forName( superClass );\n\n\t ret = (SceneGraphObject)state.newInstance();\n\n\t} catch(ClassNotFoundException e) {\n\t throw new SGIORuntimeException( \"No Such Class \"+\n\t\t\t\t\t\tclassName );\n\t} catch( IllegalAccessException exce ) {\n\t throw new SGIORuntimeException( \"Broken State class for \"+\n\t\t\t\t\t\tclassName+\" - IllegalAccess\" );\n\t} catch( InstantiationException excep ) {\n\t throw new SGIORuntimeException( \"Unable to instantiate class \"+\n\t\t\t\t\t\tclassName );\n\t}\n\n return ret;\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\" Create the child class object \");\n\t\tAdvanceCalc obj = new AdvanceCalc();\n\t\tobj.add();\n\t\tobj.sub();\n\t\tobj.calculateSin();\n\t\tobj.calculateSin();\n\t\t\n\t\t// 2. Base class reference and child class object \n\t\t\n \n\t\tCalculator obj2 = new AdvanceCalc();\n\t\tobj2.add();\n\t\tobj2.sub();\n\t}", "private static void test3() {\n new Son();\n\n }", "Reproducible newInstance();", "public static void main(String args[]){\n\tClasschild T=new Classchild();\n\tClass1 c=new Class1();\n\tc.addition();\n\tc.subtraction();\n\tT.multiplication();\n\t\n}", "Klassenstufe createKlassenstufe();", "public Foret(){\n super(\"Foret\");\n }", "HxType createType(final String className);", "HelloWorld(String owner)\n {\n this.owner = owner;\n }", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public CreateHero() {\r\n\t\tinitComponents();\r\n\t}", "public Command() {\n }" ]
[ "0.62557507", "0.6027361", "0.59269065", "0.5656728", "0.5651155", "0.54066235", "0.5388692", "0.5305204", "0.52873135", "0.52604157", "0.5259407", "0.52564335", "0.5252159", "0.5212224", "0.51822674", "0.51807815", "0.51719046", "0.5163312", "0.5160215", "0.51305205", "0.5117944", "0.5055386", "0.50372946", "0.5030238", "0.5022137", "0.50181043", "0.5013791", "0.5010326", "0.5002552", "0.50014955", "0.4971456", "0.4962005", "0.49606323", "0.49572876", "0.49509412", "0.49483672", "0.49422494", "0.49266288", "0.49154687", "0.491162", "0.4905523", "0.49036267", "0.49004483", "0.48947075", "0.48851714", "0.48842582", "0.4877172", "0.4870832", "0.48679477", "0.48658487", "0.48644876", "0.48620382", "0.48530707", "0.48529968", "0.48397428", "0.48224497", "0.4818092", "0.47991174", "0.47936437", "0.47932836", "0.4790434", "0.4788908", "0.4787809", "0.4785974", "0.47799197", "0.47680628", "0.47653526", "0.4762293", "0.47620213", "0.47582856", "0.474815", "0.47404322", "0.4736866", "0.4731446", "0.4728772", "0.47281784", "0.47109714", "0.47075954", "0.4705569", "0.47017682", "0.47008616", "0.47005638", "0.46959177", "0.4695273", "0.46863693", "0.46856347", "0.46856096", "0.4680888", "0.4679709", "0.46769452", "0.4676178", "0.46690145", "0.46681532", "0.46667564", "0.4662556", "0.46592218", "0.4655276", "0.4654737", "0.4654359", "0.46521887" ]
0.74865055
0
Nova view utilizando o inflater e passando o layout da ListView
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_listas,container,false); postos = new ArrayList<>(); mLista = (ListView) view.findViewById(R.id.listViewPostos); adapterPosto = new AdapterPosto(getActivity(), postos); mLista.setAdapter(adapterPosto); firebase = ConfiguracaoFirebase.getFirebase().child("PostosAdicionados"); valueEventListenerPostos = new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { postos.clear(); for (DataSnapshot dados : dataSnapshot.getChildren()) { //sem ordenação por preço Posto postoNovo = dados.getValue(Posto.class); postos.add(postoNovo); } //Posto auxiliar para ajudar na ordenação. Posto auxPosto; //ordenação for (int i = 0; i<postos.size(); i++){ for (int j = i+1; j<postos.size();j++) { if(postos.get(j).getPrecoEtanol() < postos.get(i).getPrecoEtanol()){ auxPosto = postos.get(j); postos.set(j,postos.get(i)); postos.set(i,auxPosto); } } } adapterPosto.notifyDataSetChanged(); } @Override public void onCancelled(DatabaseError databaseError) { } }; return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tmParent = inflater.inflate(R.layout.layout_main, null);\n\t\tloading = (ProgressBar) mParent.findViewById(R.id.loading);\n\t\tlvListNew = (ListView) mParent.findViewById(R.id.lvListNews);\n\t\tlvListNew.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tItemNewFeed item = (ItemNewFeed) parent\n\t\t\t\t\t\t.getItemAtPosition(position);\n\t\t\t\tIntent intent = new Intent(getActivity(), DetailActivity.class);\n\t\t\t\tintent.putExtra(\"LINK\", item.getLink());\n\t\t\t\tintent.putExtra(\"TITLE\", item.getName());\n\t\t\t\tintent.putExtra(\"IMAGE\", item.getImage());\n\t\t\t\tintent.putExtra(\"DES\", item.getMessage());\n\t\t\t\tintent.putExtra(\"TITME\", item.getTime());\n\t\t\t\tintent.putExtra(\"POST_ID\", item.getPost_id());\n\t\t\t\tintent.putExtra(\"POS\", 2);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\treturn mParent;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.book_list, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.list_item, container, false);\n\n // Create a list of items\n final ArrayList<Item> items = new ArrayList<Item>();\n\n items.add(new Item(getResources().getString(R.string.about_1),getResources().getString(R.string.about_1_1),R.drawable.bydgoszcz_logo));\n items.add(new Item(getResources().getString(R.string.about_2),getResources().getString(R.string.about_2_1)));\n items.add(new Item(getResources().getString(R.string.about_3),getResources().getString(R.string.about_3_1)));\n items.add(new Item(getResources().getString(R.string.about_4),getResources().getString(R.string.about_4_1)));\n\n // Create an {@link ItemAdapter}, whose data source is a list of {@link Item}s.\n ItemAdapter adapter = new ItemAdapter(getActivity(), items, R.color.tan_background);\n\n // Find the {@link ListView} object in the view hierarchy of the {@link Activity}.\n ListView listView = (ListView) rootView.findViewById(R.id.list);\n\n listView.setAdapter(adapter);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.list_base, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n convertView = inflater.inflate(R.layout.fragment_homecircles, container, false);\n init();\n return convertView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n view = inflater.inflate(R.layout.layout_inventory_list, container, false);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_inquilinos, container, false);\n ListView listView= view.findViewById(R.id.listView);\n\n inquilinos_list.add(new Inquilino_item(\"37505068\",\"Martin\",\"colombo\",\"san martin 827\",\"2657601495\"));\n inquilinos_list.add( new Inquilino_item(\"34505068\",\"Valeria\",\"Veneciano\",\"muelleady 163 depto 30\",\"2657601495\"));\n ArrayAdapter<Inquilino_item> adapter = new InquilinoAdapter(getContext(),R.layout.inquilino_item,inquilinos_list,getLayoutInflater());\n listView.setAdapter(adapter);\n ((Principal) getActivity()).getSupportActionBar().setTitle(\"Inquilinos\");\n return view ;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_simplelistview_test, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_che_yuan_list, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail_list, container, false);\n\n getViews(view);\n\n setInfo();\n\n setListeners();\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\ttoDelete = new ArrayList<Item>();\n\n\t\tRelativeLayout layout = (RelativeLayout)inflater.inflate(getLayout(), container,\n\t\t\t\tfalse);\n\t\tListView listView = (ListView) layout.findViewById(android.R.id.list);\n\n\t\tImageButton addButton = (ImageButton) layout.findViewById(R.id.editAddButton);\n\t\tImageButton removeButton = (ImageButton) layout.findViewById(R.id.editRemoveButton);\n\n\t\taddButton.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t\t public void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t Intent intent = new Intent(getActivity(), com.iaco.testapp.EditActivity.class);\n\t\t\t\t\t\t\t\t\t\t\t startActivityForResult(intent, 1001);\n\n\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t);\n\n\t\tremoveButton.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Item item : toDelete) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tm_dao.delete(item);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\trefreshList();\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);\n\n\n\t\treturn layout;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.core_main_frag_list, container, false);\n return v;\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\tpublic View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n\t Bundle savedInstanceState) {\n\t\tView rootView = inflater.inflate(R.layout.fragment_info_listview, container, false);\n\t\tButterKnife.bind(this, rootView);\n\t\treturn rootView;\n\t}", "@Override\n public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle saveInstanceState ){\n View rootView = inflater.inflate(R.layout.activity_fragment_1,container,false);\n ListView listView = (ListView) rootView.findViewById(R.id.ListView);\n\n listView.setAdapter(new PuntosAdapter(getActivity(),PuntoProvide.GetPlanetas(),PuntoProvide.Descripcion()));\n listView.setOnItemClickListener(this);\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_news, container, false);\n progressBar = (ProgressBar)v.findViewById(R.id.progressBar);\n progressBar.setVisibility(View.INVISIBLE);\n list = (ListView)v.findViewById(R.id.listView);\n new parseMagic().execute();\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n\r\n\r\n View view = inflater.inflate(R.layout.fragment_deltar, container, false);\r\n deltarkursList = MinSideActivity.minekursList;\r\n DeltarListView = (ListView) view.findViewById(R.id.list_DeltarKurs);\r\n KursAdapter adapter = new KursAdapter(getContext(), deltarkursList);\r\n DeltarListView.setAdapter(adapter);\r\n\r\n return view;\r\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView layout = inflater.inflate(R.layout.fragment_assistant, container, false);\r\n\t\tlayout.findViewById(R.id.kaniu).setOnClickListener(this);\r\n\t\tlayout.findViewById(R.id.img_add).setOnClickListener(this);\r\n\t\tinitListView(layout);\r\n\t\treturn layout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n context = getActivity().getApplicationContext();\n\n View view = inflater.inflate(R.layout.fragment_custom, container, false);\n mImageLoader = ImageLoaderFactory.create(context);\n listView = (ListView)view.findViewById(R.id.customlist);\n mPtrFrame_Health = (PtrClassicFrameLayout) view.findViewById(R.id.customlist_frame);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }\n });\n listView.setDividerHeight(0);\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tView v = inflater.inflate(R.layout.layout_listview, null);\n\t\tlv = (ListView) v.findViewById(R.id.lv);\n\n\t\t// ColorDrawable color_divider = new ColorDrawable(R.color.transparent);\n\t\t// lv.setDivider(color_divider);\n\t\tlv.setDividerHeight(1);\n\n//\t\tArrayList<RowData_Program> datanya = new ArrayList<RowData_Program>();\n//\t\tdatanya.add(new RowData_Program(\"\", \"Beasiswa Fakultas Teknik\", \"Rp 17.000.000/~\", \"\", \"\",\n//\t\t\t\t\"Beasiswa untuk para mahasiswa berprestasi yang kurang mampu\",\n//\t\t\t\t\"http://128.199.176.5/UI/admin/files/original/55e6c977b6d8d.jpg\"));\n//\t\tdatanya.add(new RowData_Program(\"\", \"Perpustakaan Keliling\", \"Rp 3.000.000/Rp 800.000.000\", \"\", \"\",\n//\t\t\t\t\"Perpustakaan keliling untuk anak anak\",\n//\t\t\t\t\"http://128.199.176.5/UI/admin/files/original/55d5a3f122e4a.jpg\"));\n//\t\tdatanya.add(new RowData_Program(\"\", \"Pembangunan Bangunan Baru\", \"Rp 90.500.000/Rp 780.000.000\", \"\", \"\",\n//\t\t\t\t\"Bangunan baru untuk perkuliahan\", \"http://128.199.176.5/UI/admin/files/original/55d5a3e18ce07.png\"));\n//\n//\t\tadapter = new CustomAdapter_Program(getActivity(), 0, datanya);\n//\t\tlv.setAdapter(adapter);\n\n\n//\t\tnew AsyncTask_AllProgram().execute();\n\t\tnew AsyncTask_AllProgram().execute();\n\n\t\treturn v;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n this.inflater = inflater;\n rootView = inflater.inflate(R.layout.fragment_result_list, container, false);\n lview = (ListView) rootView.findViewById(R.id.listview);\n populateList();\n return rootView;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tapplication = (MyApplication) context.getApplicationContext();\r\n\t\tview = inflater.inflate(R.layout.myorder_fragment, null);\r\n\t\tlistView = (ListView) view.findViewById(R.id.lv_myOrder);\r\n\t\tmoreView = inflater.inflate(R.layout.my_order_listfootview, null);\r\n\t\tlistData = new ArrayList<String>();\r\n\t\tmoreView.setVisibility(View.GONE);\r\n\t\t\r\n\t\tprepareData(); // 准备数据\r\n\r\n\t\treturn view;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_favorite, container, false);\n listView=(ListView) view.findViewById(R.id.listview_favorite);\n adapter=new NewsAdapter(getActivity(), listView);\n listView.setAdapter(adapter);//空指针异常\n listView.setOnItemClickListener(itemListener);\n loadLoveNews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_newlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_list, container, false);\n initiate(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_list, container, false);\n listFilms = view.findViewById(R.id.listViewFilms);\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.main, container,false);\n\n\t\t//Update this view's content\n\t\tupdate();\n\n\t\t//Return this view to the adapter\n\t\treturn view;\n\t}", "TaskukirjaListAdapter(Context context) { mInflater = LayoutInflater.from(context); }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_main_list, container, false);\n\n // Set two pane mode\n mTwoPaneMode = (root.findViewById(R.id.detail_container) != null);\n // Initialize empty view\n mEmptyView = root.findViewById(R.id.recyclerView_empty);\n\n // Initialize recycler view\n itemList = root.findViewById(R.id.content_list);\n\n FloatingActionButton fab = (FloatingActionButton) root.findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent addIntent = new Intent(getActivity(), AddItemActivity.class);\n startActivity(addIntent);\n }\n });\n\n // Load available data from ShopenatorProvider\n getLoaderManager().initLoader(mListLoader, null, this);\n\n\n\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_traditional, container, false);\n\n ArrayList<TraditionalfoodClass> trad_food = new ArrayList<TraditionalfoodClass>();\n trad_food.add(new TraditionalfoodClass(\"Karahi\", \"1250 Rs\", R.drawable.karahi,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Biryani\", \"150 Rs\", R.drawable.biryani,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Malai Boti\", \"450 Rs\", R.drawable.malaiboti,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Seekh Kabab\", \"400 Rs\", R.drawable.kabab,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Tikka\", \"250 Rs\", R.drawable.tikka,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Sajji\", \"1550 Rs\", R.drawable.sajjione,\"0\"));\n\n TraditionalFoodAdapter tradfoodadapter = new TraditionalFoodAdapter(getActivity(),trad_food);\n\n ListView listView = (ListView) view.findViewById(R.id.listview_traditional);\n listView.setAdapter(tradfoodadapter);\n\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_basketbol_maclar, container, false);\r\n //final Teams team = (Teams) getArguments().getSerializable(\"team\");\r\n final BTeams team= (BTeams) getActivity().getIntent().getSerializableExtra(\"takim\");\r\n listView = view.findViewById(R.id.mac_listview);\r\n show(team);\r\n\r\n return view;\r\n\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.activity_class, container, false);\n lv = (ListView) view.findViewById(R.id.listView1);\n\n getAttendanceList(classId);\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot)\n //Inflate a new view hierarchy from the specified XML node\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_listar, container, false);\n ListView l = (ListView)view.findViewById(R.id.lista);\n //Agregar ListView\n SQLite sqlite;\n sqlite= new SQLite(getContext());\n sqlite.abrir();\n Cursor cursor = sqlite.getRegistro();\n ArrayList<String> reg = sqlite.getAnimal(cursor);\n\n ArrayAdapter<String> adaptador = new ArrayAdapter<String>(getContext(),android.R.layout.simple_list_item_1,reg);\n l.setAdapter(adaptador);\n\n return view;\n\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 rootView = inflater.inflate(R.layout.tour_item_list_view, container, false);\n\n // Create a list of tour items\n final ArrayList<TourItem> tourItems = new ArrayList<>();\n\n tourItems.add(new TourItem(R.drawable.botanic_gardens, getString(R.string.title_botanic_gardens),\n getString(R.string.description_botanic_gardens)));\n tourItems.add(new TourItem(R.drawable.hyde_park, getString(R.string.title_hyde_park),\n getString(R.string.description_hyde_park)));\n tourItems.add(new TourItem(R.drawable.luna_park, getString(R.string.title_luna_park),\n getString(R.string.description_luna_park)));\n tourItems.add(new TourItem(R.drawable.ocean_pool, getString(R.string.title_ocean_pool),\n getString(R.string.description_ocean_pool)));\n tourItems.add(new TourItem(R.drawable.taronga_zoo, getString(R.string.title_taronga_zoo),\n getString(R.string.description_taronga_zoo)));\n\n /*\n * See LandmarksFragment.java for detailed comments about code below\n * */\n TourItemsAdapter tourItemsAdapter = new TourItemsAdapter(getContext(), tourItems);\n ListView listView = (ListView) rootView.findViewById(R.id.list_view);\n listView.setAdapter(tourItemsAdapter);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.wearable_inset_list, container, false);\n\n mContainerId = container.getId();\n listView =\n (WearableListView) view.findViewById(R.id.wearable_list);\n listView.setGreedyTouchMode(true);\n listView.setClickListener(mClickListener);\n Toolbar mToolBar = (Toolbar)getActivity().findViewById(R.id.toolbar);\n toolBarTitle = (TextView)mToolBar.findViewById(R.id.title);\n checkOut = (TextView)mToolBar.findViewById(R.id.checkout);\n ImageView back_img = (ImageView)mToolBar.findViewById(R.id.back);\n back_img.setVisibility(View.VISIBLE);\n back_img.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(mContainerId, new CatalogListFragment()).addToBackStack(null).commit();\n }\n });\n populateOrderList(getActivity());\n return view;\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.fragment_food_list_item, parent, false);\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_listaneonodes, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_restraunts_list, container, false);\n //productList.setAdapter(new RestrauntAdapter());\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.parsable_list_fragment,\n\t\t\t\tcontainer, false);\n\n\t\tif (mAttractions == null)\n\t\t\tmAttractions = new ArrayList<Attraction>();\n\t\tArrayAdapter<Attraction> adapter = new ArrayAdapter<Attraction>(\n\t\t\t\tgetSherlockActivity(), android.R.layout.simple_list_item_1,\n\t\t\t\tmAttractions);\n\t\tsetListAdapter(adapter);\n\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.word_list, container, false);\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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_feed_json, container, false);\n mListView = (ListView) v.findViewById(R.id.listview);\n// mBlurredImage = (ImageView) v.findViewById(R.id.blurred_image);\n// mNormalImage = (ImageView) v.findViewById(R.id.normal_image);\n new FeedAsynTask().execute(\"http://codemobiles.com/adhoc/feed/youtube_feed.php\");\n\n return v;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.attractions_fragment_list, container, false);\n swipeRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipeAttractions);\n swipeRefreshLayout.setOnRefreshListener(this);\n listView = (ListView) v.findViewById(R.id.listview_attractions);\n init();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_down_load_manage, container, false);\n mListView = (ListView) view.findViewById(R.id.lv_download);\n tvEmpty = (RelativeLayout) view.findViewById(R.id.empty_offline);\n initView();\n getUpdateInfo();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_detail, container, false);\n ButterKnife.bind(this, view);\n return view;\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 view = inflater.inflate(R.layout.fragment_playlist, container, false);\n\n instView(view);\n return view;\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 return inflater.inflate(R.layout.fragment_product_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_liaotian, container, false);\n initView(view);\n initData();\n LiaoTianAdapter adapter = new LiaoTianAdapter(getActivity(),list);\n lv_liaotian.setAdapter(adapter);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.activity_click_product_layout, container, false);\n\n ivList=view.findViewById(R.id.iv_list);\n txtProductDescription=view.findViewById(R.id.txt_productDescription);\n txtShowOfeerPrice=view.findViewById(R.id.txt_showOfferPrice);\n txtShowPrice=view.findViewById(R.id.txt_showPrice);\n txtTitleName=view.findViewById(R.id.tv_list_name);\n edtEnterPinCode=view.findViewById(R.id.edt_enterPinCode);\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, \n\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_chat, null);\n\n\t\tinitViews(view);\n\t\ttvTitleName.setText(R.string.news);\n\n\t\tif(newsList == null) {\n\t\t\tnewsList = new ArrayList<HashMap<String, Object>>();\n\t\t}\n\t\tadapter = new ChatListViewAdapter(getActivity(), newsList);\n\t\tlvChat.setAdapter(adapter);\n\n\t\tlvChat.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n\t\t\t\tIntent intent;\n\t\t\t\tBundle bundle;\n\n\t\t\t\tintent = new Intent(getActivity(), HelpDetailsActivity.class);\n\t\t\t\tbundle = new Bundle();\n\t\t\t\tbundle.putString(\"flag\", \"news\");\n\t\t\t\tint no = newsList.size()-i-1;\n\t\t\t\tbundle.putString(\"postId\", newsList.get(no).get(\"postId\").toString());\n\t\t\t\tintent.putExtras(bundle);\n\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle saved) {\n ctx = getActivity();\n inflater = getActivity().getLayoutInflater();\n view = inflater.inflate(R.layout.fragment_category_list, container,\n false);\n setFields();\n // Bundle b = getArguments();\n company = SharedUtil.getCompany(ctx);\n administrator = SharedUtil.getAdministrator(ctx);\n getCategories();\n setList();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_list_view_slide_item, container, false);\n\n listView = (RadListView)rootView.findViewById(R.id.listView);\n\n if(savedInstanceState != null) {\n destination = savedInstanceState.getParcelable(\"currentAttraction\");\n }\n\n if(destination == null) {\n return rootView;\n }\n\n ListViewAdapter adapter = new ListViewAdapter(destination.attractions);\n listView.setAdapter(adapter);\n\n View headerView = inflater.inflate(R.layout.listview_slideitem_header, listView, false);\n\n titleView = (TextView)headerView.findViewById(R.id.title);\n titleView.setText(destination.title);\n titleView.setTextColor(destination.color);\n\n contentView = (TextView)headerView.findViewById(R.id.content);\n contentView.setText(destination.info);\n\n TextView attractionsView = (TextView)headerView.findViewById(R.id.attractions);\n attractionsView.setTextColor(destination.color);\n\n listView.setHeaderView(headerView);\n\n FloatingActionButton fab = (FloatingActionButton)rootView.findViewById(R.id.fab);\n fab.getBackground().setColorFilter(destination.color, PorterDuff.Mode.SRC_IN);\n fab.setRippleColor(destination.color);\n\n View line = rootView.findViewById(R.id.line);\n line.setBackgroundColor(destination.color);\n\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getActivity(), \"Enquiry sent.\", Toast.LENGTH_SHORT).show();\n }\n });\n\n image = (ImageView)rootView.findViewById(R.id.image);\n image.setImageResource(destination.src);\n\n CollapsingToolbarLayout collapsingToolbar = (CollapsingToolbarLayout) rootView.findViewById(R.id.collapsing_toolbar_layout);\n collapsingToolbar.setContentScrimColor(destination.color);\n\n Toolbar toolbar = (Toolbar) rootView.findViewById(R.id.toolbar);\n toolbar.setNavigationIcon(R.drawable.icon_arrow);\n toolbar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n getFragmentManager().popBackStack();\n }\n });\n\n return rootView;\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View initView() {\n View view = View.inflate(mContext, R.layout.tab_detail_pager, null);\n listview = (RefreshListView ) view.findViewById(R.id.listview);\n View topnewsView = View.inflate(mContext, R.layout.topnews, null);\n// 使用ButterKnife绑定XML文件\n //ButterKnife.bind(this, view);\n ButterKnife.bind(this, topnewsView);\n// 监听ViewPage页面的变化动态改变红点和标题\n viewpage.addOnPageChangeListener(new MyOnPageChangeListener());\n// 把顶部新闻模块以头的方式加载到ListView中\n// listview.addHeaderView(topnewsView);\n// ListView自定义方法\n listview.addTopNews(topnewsView);\n// 监听控件刷新\n listview.setOnRefreshListener(new MysetOnRefreshListener());\n// 设置单击监听\n listview.setOnItemClickListener(new MyOnItemClickListener());\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.folio_activity, container, false);\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n\n return inflater.inflate(R.layout.model_detail_layout, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_album_list, container, false);\n findViews(view);\n initUI();\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_yester, container, false);\r\n final utility.util ut = new utility.util();\r\n ut.populatelistview(0,view);\r\n ListView lv= (ListView) view.findViewById(R.id.listView);\r\n lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\r\n @Override\r\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\r\n ut.OnclickforListviews(view,-1);\r\n return false;\r\n }\r\n });\r\n return view;\r\n\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view= inflater.inflate(R.layout.fragment_lista, container, false);\n\n activity = getActivity();\n listView = (ListView) view.findViewById(R.id.listaprincipal);\n\t\t\n\t\tpDialog = new ProgressDialog(getContext());\n pDialog.setMessage(\"Carregando.. Aguarde...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\t\t\n buscaDados2();\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater,\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.contact_fans_list, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate(R.layout.poi_list, container, false);\n\n mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n poiListAdapter = new POIListAdapter(getActivity(), poiCursor);\n mRecyclerView.setAdapter(poiListAdapter);\n mRecyclerView.setHasFixedSize(false);\n\n return rootView;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView rootView = inflater.inflate(R.layout.notificationlist, container, false);\r\n\t\tconnectionClass = new ConnectionClass();\r\n\t\tnotiflist = (ListView) rootView.findViewById(R.id.notificationlist);\r\n\t\tnotiflist.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int position,\r\n\t\t\t\t\tlong arg3) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\taddNotifs();\r\n\t\treturn rootView;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_lista_de_entrenadores, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_summary, container, false);\n _listView = (ListView)view.findViewById(R.id.listview_summary_items);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mRootView = inflater.inflate(R.layout.fragment_list_edit, container, false);\n\n ListView itemList = (ListView) mRootView.findViewById(R.id.listItems);\n if (mSelectedList != null) {\n mListItems = DBHelper.getInstance(getActivity()).getItems(mSelectedList.getLocalDBKey());\n } else {\n mListItems = new ArrayList<ListItem>();\n }\n mAdapter = new ItemListEditAdapter(getActivity(), mListItems);\n itemList.setAdapter(mAdapter);\n registerForContextMenu(itemList);\n\n ImageButton btnAddList = (ImageButton) mRootView.findViewById(R.id.btnAddItem);\n btnAddList.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onButtonAddItemClick();\n }\n });\n\n return mRootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tasks_list, container, false);\n\n loadTasks();\n // createRV();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tips, container, false);\n mList = (ListView) view.findViewById(R.id.ltview1);\n faqList = new ArrayList<>();\n\n new LoadAllFaq().execute();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View vista =inflater.inflate(R.layout.fragment_lista, container, false);\n lista = (ListView) vista.findViewById(R.id.listview);\n AdministrarBaseDeDatos admindb = new AdministrarBaseDeDatos(getContext(), \"dbasignaturas\", null, 1);\n asignaturas= admindb.llenar_listView();\n adaptador = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,asignaturas);\n lista.setAdapter(adaptador);\n\n\n\n return vista;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tmSearch = getArguments().getString(\"search\");\n\t\tisCall = getArguments().getBoolean(\"iscall\");\n\n\t\tmView = inflater.inflate(R.layout.list_fragment, null);\n\t\tmProgressBar = (ProgressBar)mView.findViewById(R.id.progressBar);\n\t\tmListView = (ListView)mView.findViewById(R.id.listView);\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLog.i(\"TEST\",\"onItemClick\");\n\t\t\t\tIntent NextIntent = new Intent(mContext, ViewActivity.class);\n\t\t\t\tNextIntent.putExtra(\"data\", mData.get(position));\n\t\t\t\tstartActivity(NextIntent);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn mView;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_purchased_items, container, false);\n mItemListView = (ListView) view.findViewById(R.id.purchased_items_list);\n\n updateUI();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_queenb_embassy, container, false);\n\n\n //initialization of the list view (list of buttons)\n listview = v.findViewById(R.id.listview);\n\n for (int i = 0; i < names.length ; i++){\n ItemsModel itemsModel = new ItemsModel(names[i], ages[i], locations[i], images[i],\n phone_numbers[i], instagram_links[i], loved_about_queenb[i], recommendQueenb[i]); //todo try1+2\n listItem.add(itemsModel);\n }\n //required for handling the listView\n customAdapter = new CustomAdapter(listItem, getActivity());\n listview.setAdapter(customAdapter);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n\n View v = inflater.inflate(R.layout.fragment_news, container,\n false);\n\n\n\n artikels.add(new Artikel(\"1\", \"Codepolitan in action\", \"Rudi Hartono\"));\n artikels.add(new Artikel(\"2\", \"Ngecode yuk di codepolitan\", \"Rudi Hartono\"));\n\n recyclerView = (RecyclerView)v.findViewById(R.id.recyclerView);\n\n adapter = new ArtikelListAdapter(artikels, getContext());\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_trans, container, false);\n listView = view.findViewById(R.id.trans_list);\n view.findViewById(R.id.trans_insert).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n TransDialog transDialog = new TransDialog(getContext());\n transDialog.setFragment(TransFragment.this);\n transDialog.show();\n }\n });\n adapter = new TransAdapter(getContext());\n adapter.setTransFragment(this);\n listView.setAdapter(adapter);\n loadData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_lista_ejercicios, container, false);\n\n\n\n return view;\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.activity_list_view, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n // Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n // Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n return inflater.inflate(R.layout.fragment_travel_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_delivery_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_list, container, false);\n }", "@Override\n\t public View newView(Context context, Cursor cursor, ViewGroup parent) {\n\t final LayoutInflater inflater = LayoutInflater.from(context);\n\t final View view = inflater.inflate(R.layout.item_list,parent, false);\n\t return view;\n\t }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (view == null) {\n view = inflater.inflate(R.layout.fragment_show_list, container, false);\n }\n rv_list = view.findViewById(R.id.rv_list);\n rv_list.setLayoutManager(new LinearLayoutManager(getContext()));\n rv_list.addItemDecoration(new DividerItemDecoration(getContext(), LinearLayout.VERTICAL));\n rv_list.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n updateUI();\n observeMultiSelectStatus();\n deleteSelectedUsers();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_gallery, container, false);\n\n locationInfos.add(new LocationInfo(getString(R.string.arunachal), R.drawable.image_assam));\n locationInfos.add(new LocationInfo(getString(R.string.manipur), R.drawable.image_maghalaya));\n locationInfos.add(new LocationInfo(getString(R.string.nainital), R.drawable.image_nagaland));\n\n\n LocationInfoAdapter adapter = new LocationInfoAdapter(Objects.requireNonNull(getContext()),locationInfos);\n ListView listView = (ListView)view.findViewById(R.id.list);\n listView.setAdapter(adapter);\n\n\n\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.list_fragment, container, false);\r\n\t\tlist_view = (ListView) view.findViewById(R.id.list_view);\r\n\t\tadapter=new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, Data.items);\r\n\t\tlist_view.setAdapter(adapter);\r\n\t\tlist_view.setOnItemClickListener(this);\r\n\t\treturn view;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_puntos_de_venta, container, false);\n\n manager=new DataBaseManager(getActivity());\n lista=(ListView)view.findViewById(android.R.id.list);\n ednombre=(EditText) view.findViewById(R.id.e_nombre);\n\n String[] from = new String[]{manager.CN_NAME,manager.CN_LATITUD,manager.CN_LONGITUD};\n int[] to = new int[]{R.id.t_nombre,R.id.t_latitud,R.id.t_longitud};\n cursor = manager.cargarCursorSedes();\n adapter = new SimpleCursorAdapter(getActivity(),R.layout.items,cursor,from,to,0);\n lista.setAdapter(adapter);\n\n Button boton_buscar=(Button) view.findViewById(R.id.b_buscar);\n boton_buscar.setOnClickListener(this);\n Button boton_cargar=(Button) view.findViewById(R.id.b_cargar);\n boton_cargar.setOnClickListener(this);\n Button boton_almacenar=(Button) view.findViewById(R.id.b_almacenar);\n boton_almacenar.setOnClickListener(this);\n Button boton_eliminar=(Button) view.findViewById(R.id.b_eliminar);\n boton_eliminar.setOnClickListener(this);\n Button boton_actualizar=(Button) view.findViewById(R.id.b_actualizar);\n boton_actualizar.setOnClickListener(this);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_detail_jadwal_dokter, container, false);\n initView();\n tampilDataDetail();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_lcl_detail, container, false);\n ButterKnife.bind(this,view);\n initView();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v = inflater.inflate(R.layout.list_container,null);\r\n\t\tlistView = (ListView) v.findViewById(R.id.lv_main_fragment_container);\r\n\t\tlistView .setAdapter(adapter);\r\n\t\t\r\n\t\tadapter.notifyDataSetChanged();\r\n\t\treturn v;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.item_list, container, false);\n\n ArrayList<pojo> pojoArrayList = new ArrayList<pojo>();\n pojoArrayList.add(new pojo(getString(R.string.ams_central), R.drawable.train_one, R.drawable.gradient_splash, R.drawable.ic_map_, getString(R.string.train_one_location), R.drawable.ic_phone_solid, getString(R.string.train_one_phone)));\n pojoArrayList.add(new pojo(getString(R.string.ams_amstel), R.drawable.train_two, R.drawable.gradient_splash, R.drawable.ic_map_, getString(R.string.train_two_location), R.drawable.ic_phone_solid, getString(R.string.train_two_phone)));\n pojoArrayList.add(new pojo(getString(R.string.ams_bijlmer), R.drawable.train_three, R.drawable.gradient_splash, R.drawable.ic_map_, getString(R.string.train_two_location), R.drawable.ic_phone_solid, getString(R.string.train_two_phone)));\n\n HotelsAdapter adapter = new HotelsAdapter(getActivity(), pojoArrayList);\n ListView listViewItems = (ListView) rootView.findViewById(R.id.list);\n listViewItems.setAdapter(adapter);\n\n return rootView;\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View mview = inflater.inflate(R.layout.fragment_listofpeople,container,false);\n //init views\n\n\n initview(mview);\n //getting users list\n get_userslist();\n //initiliziting adapters\n loadadapterdatas();\n //set on click listeners\n onclickslisteners();\n return mview;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_shopping_list,container,false);\n\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_magazine_list_item, container, false);\r\n owner = (MainActivity)getActivity();\r\n\r\n LinearLayout ll = (LinearLayout)v.findViewById(R.id.magazine_list_linear);\r\n ll.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n dismiss();\r\n }\r\n });\r\n rv = (RecyclerView)v.findViewById(R.id.magazine_list_recyclerview);\r\n rv.setLayoutManager(new LinearLayoutManager(ForRoomApplication.getFRContext()));\r\n\r\n new AsyncTaskMagazineListJSONList().execute(MagazineFragment.viewpagerposition);\r\n\r\n return v;\r\n }" ]
[ "0.79295063", "0.7602295", "0.7555705", "0.7453868", "0.74265003", "0.73627394", "0.7352158", "0.73489285", "0.733862", "0.7333015", "0.7319927", "0.72970283", "0.7260804", "0.7260309", "0.72559035", "0.72452855", "0.72348773", "0.72238266", "0.72052485", "0.72023296", "0.72017324", "0.7193", "0.7179719", "0.7167039", "0.71601397", "0.71573967", "0.7150306", "0.71465176", "0.7133958", "0.712576", "0.7118541", "0.71065325", "0.7100904", "0.70986784", "0.7091112", "0.70909184", "0.7090212", "0.70748395", "0.707055", "0.7070235", "0.70650095", "0.70648646", "0.7058192", "0.7057591", "0.70567113", "0.7056374", "0.7055818", "0.7055078", "0.7051662", "0.70491433", "0.7041124", "0.70401627", "0.70384294", "0.70324993", "0.70318323", "0.70283103", "0.7025078", "0.70239604", "0.7023806", "0.7021591", "0.70157146", "0.7001387", "0.7000859", "0.7000606", "0.6997377", "0.6997078", "0.6995315", "0.69936466", "0.69890636", "0.698807", "0.698589", "0.6985641", "0.69855565", "0.6984341", "0.6984105", "0.69756806", "0.69741875", "0.69719106", "0.69715863", "0.69665", "0.6966141", "0.69659245", "0.69657093", "0.69616747", "0.69616747", "0.69599384", "0.6959837", "0.69528246", "0.69528246", "0.69504064", "0.69483155", "0.69444084", "0.69379485", "0.6935801", "0.69349504", "0.6933372", "0.6928335", "0.6926158", "0.6924005", "0.692266", "0.692118" ]
0.0
-1
in pascals triangle we actually calculate the combination of row and column of that particular position given that row and column starts from 0
public static void main (String[] args) { int numRows=5; for(int i=0;i<numRows;i++){ for(int j=0;j<i;j++){ System.out.print(combination(i,j)+","); } for(int j=i;j<=i;j++){ System.out.print(combination(i,j)); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<List<Integer>> pascalTriangle(int rows){\n\t\tList<List<Integer>> triangle = new ArrayList<>();\n\t\t\n\t\tif(rows<=0) {\n\t\t\treturn triangle;\n\t\t}\n\t\t\n\t\tList<Integer> firstRow = new ArrayList<>();\n\t\tfirstRow.add(1);\n\t\ttriangle.add(firstRow);\n\n\t\tfor(int i=1; i<rows;i++) {\n\t\t\tList<Integer> row = new ArrayList<>();\n\t\t\trow.add(1);//first element should always be 1\n\t\t\tList<Integer> previous = triangle.get(i-1);\n\t\t\tfor(int j = 1; j<i; j++) {\n\t\t\t\t// add the top and topLeft diagonal value\n\t\t\t\tint value = previous.get(j-1) + previous.get(j);\n\t\t\t\trow.add(value);\n\t\t\t}\n\t\t\trow.add(1);//last element should always be 1\n\t\t\ttriangle.add(row);\n\t\t}\n\t\treturn triangle;\n\t}", "public static void PascalTriangle(int rowCount)\n {\n int num, r;\n\n for (int lineNumber =0; lineNumber<=rowCount; lineNumber++){\n String outputLine = \"\";\n\n num = 1;\n r = lineNumber + 1;\n for (int space = rowCount - lineNumber; space > 0; space--) {\n System.out.print(\" \");\n }\n for(int count =0; count<=lineNumber;count++)\n {\n if (count > 0) {\n num = num * (r - count) / count;\n }\n System.out.print(num + \" \");\n }\n\n System.out.println(outputLine);\n }\n }", "public static void main(String[] args) {\n int[][] inp = new int[][] {\n {1,2,3},\n {5,6,7},\n {9,10,11}};\n \n int temp;\n \n\t for(int i = inp.length-1,j=0; i>=0 ; i--,j=0)\n {\n System.out.print(inp[i][j] + \" \");\n\t\t \n temp = i; // store old row where we started \n \n\t\t while(i+1 < inp.length && j+1 < inp[0].length)\n {\n System.out.print(inp[i+1][j+1] + \" \"); // keep print right diagonal\n i++;j++;\n }\n \n\t\t i = temp; // restore old row\n \n\t\t System.out.println();\n\t\t \n\t\t // special case - when we switch from processing row to processing column\n if(i == 0)\n {\n\t\t\t // now, column will go from 1 to inp[0].length-1\n\t\t\t \n for (int k = 1; k < inp[0].length; k++) {\n\n\t\t\t\t temp = k; // save old column\n \n\t\t\t\t System.out.print(inp[i][k] + \" \");\n\t\t\t\t \n\t\t\t\t // keep getting right diagonal\n while (i + 1 < inp.length && k + 1 < inp[0].length) {\n System.out.print(inp[i + 1][k + 1] + \" \");\n i++;\n k++;\n }\n \n\t\t\t\t k = temp;\n \n\t\t\t\t i = 0;\n \n\t\t\t\t System.out.println();\n\n }\n }\n }\n \n }", "public static void main(String[] args) {\nint n, num=1;\nScanner input = new Scanner(System.in);\nSystem.out.println(\"please enter the number of rows for the triangle :\");\nn = input.nextInt();\nSystem.out.println(\"floyd's triangle:\");\nfor(int i=1;i<=n;i++)\n{\nfor(int j=1;j<=i;j++)\t\n{\nSystem.out.print(num + \" \");\t\nnum++;\n}\nSystem.out.println();\n}\n\t\t\n\t}", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "public static void main(String[] args) {\n\t\tint row = 8;\r\n\t\tint [][]arr = new int[row][row];\t//8行8列\r\n\t\t\r\n\t\tfor(int i=0;i<row;i++){\t//外循环构造第一维数组\r\n\t\t\tfor(int j=0;j<=i;j++){\t//内循环构造第一维数组指向的第二维数组,每一行的列数和行数相等\r\n\t\t\t\t//第一列(j=0)和对角线列(j=i)的值都为1\r\n\t\t\t\tif(j==0 || j==i){\r\n\t\t\t\t\tarr[i][j] = 1;\r\n\t\t\t\t}\r\n\t\t\t\t//非第一列和对角线列的数组元素值,是其正上方的数(arr[i-1][j])和其左上角的数(arr[i-1][j-1])之和\r\n\t\t\t\telse{\r\n\t\t\t\t\tarr[i][j] = arr[i-1][j]+arr[i-1][j-1];\r\n\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\t//打印输出\r\n\t\tfor(int i=0;i<row;i++){\r\n\t\t\tfor(int j=0;j<=i;j++){\r\n\t\t\t\tSystem.out.print(arr[i][j]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "private int xyToOneD(int row, int col) {\n return ((row - 1) * grid.length) + (col - 1);\n }", "public static void main(String[] args) {\n // ***\n // *****\n // *******\n // *********\n // *******\n // *****\n // ***\n // *\n System.out.println(\"PROBLEM 1: \");\n int numOfLines = 9;\n int midLine = (numOfLines+1)/2;\n // upper part\n for (int i = 1; i <= midLine; i++){\n //space\n for (int s = 1; s<=(midLine-i); s++){\n System.out.print(\" \");\n }\n //star\n for (int j =1; j<=(i*2-1); j++){\n System.out.print(\"*\");\n }\n System.out.println();\n }\n //Lower part\n for(int i =1;i <=(midLine-1);i++) {\n\n\n //space\n for (int s = 1; s <= i; s++){\n System.out.print(\" \");\n }\n //star\n for (int j= 1; j<=(midLine-i)*2-1; j++){\n System.out.print(\"*\");\n }\n System.out.println();\n\n }\n\n\n// Problem 2\n// Given the number of rows, create a triangle with that many rows.\n// For example, if rows = 5 then\n// *\n// **\n// ***\n// ****\n// *****\n System.out.println(\"PROBLEM 2: \");\n\n System.out.println(\"Enter the number of line (odd numbers)\");\n Scanner input = new Scanner(System.in);\n int numberOfLines = input.nextInt();\n for (int i = 1; i <= numberOfLines; i++){\n //add stars\n for (int j =1; j<=i; j++){\n System.out.print(\"*\");\n }\n System.out.println();\n\n }\n\n // Problem 3\n // Using the celsius to fahrenheit conversion, product the following table\n // |Celsius|Fahrenheit|\n // | 0 | 32 |\n // | 1 | 33.8 |\n // | 2 | 35.6 |\n // | ... | ... |\n // | 30 | 86 |\n\n System.out.println(\"PROBLEM 3: \");\n\n int celsius = 0;\n double fahrenheit;\n System.out.println(\" | \"+\"celsius\"+\"|\"+\"fahrenheit\"+\"| \");\n\n while(celsius <=30 ) {\n fahrenheit = (9.0/5.0 * celsius) + 32;\n System.out.println(\" | \" + celsius + \" | \" + fahrenheit + \" | \");\n celsius++;\n }\n\n\n // Problem 4\n // Declare a variable x with any value. Determine if x is prime.\n //Dividing the number by 2 does gain us efficiency but how could we make it more efficient? Think about 25,\n // do you need to go up to 12.5? Could you stop at a lower number?\n System.out.println(\"PROBLEM 4: \");\n\n int remainder;\n boolean isPrime = true;\n int numberToCheck = 77;\n\n for (int i = 2; i <= numberToCheck /i; i++) {\n remainder = numberToCheck % i;\n\n\n if (remainder == 0) {\n\n isPrime = false;\n break;\n }\n }\n\n if (isPrime)\n System.out.println(numberToCheck + \" is a Prime numberToCheckber\");\n else\n System.out.println(numberToCheck + \" is not a Prime numberToCheckber\");\n\n\n // Problem 5\n // The Kalebnacci sequence begins with 2 and -1 as its first and second terms.\n // After these first two elements, each subsequent element is equal to twice the previous previous term minus\n // the previous term.\n // kaleb(0) = 2\n // kaleb(1) = -1\n // kaleb(n) = 2*kaleb(n-2) - kaleb(n-1)\n // Find the nth number in the sequence\n\n System.out.println(\"PROBLEM 5: \");\n\n int n = 8;\n int a = 2;\n int b = -1;\n int c;\n System.out.print(a + \" \" + b + \" \");\n for (int i =0; i<n;i++){\n c =2*a-b;\n System.out.print(c + \" \" );\n a=b;\n b=c;\n }\n\n }", "public void triangulo() {\n fill(0);\n stroke(255);\n strokeWeight(5);\n triangle(width/2, 50, height+100, 650, 350, 650);\n //(width/2, height-100, 350, 150, 900, 150);\n }", "public static void main(String[] args) {\nScanner s =new Scanner(System.in);\r\nint n=s.nextInt();\r\nfor(int i=n;i>=0;i--)\r\n{ int a=n;\r\n for(int j=n;j>=i;j--)\r\n {System.out.print(a+\" \");a--;}\r\n a=a+1;\r\n for(int k=1;k<=2*i-1;k++)\r\n {System.out.print(\" \"+\" \");}\r\n if(a!=0) {\r\n for(int l=n;l>=i;l--)\r\n {System.out.print(a+\" \");a++;}\r\n }\r\n else {for(int m=1;m<=n;m++)\r\n {System.out.print(m+\" \");}\r\n }\r\n System.out.print(\"\\n\");\r\n}\r\nfor(int x=1;x<=n;x++)\r\n{ int c=n;\r\n for(int y=n;y>=x;y--)\r\n {System.out.print(c+\" \");c--;}\r\n c=c+1;\r\n for(int z=1;z<=2*x-1;z++)\r\n {System.out.print(\" \"+\" \");}\r\n for(int p=x;p<=n;p++)\r\n {System.out.print(c+\" \");c++;}\r\n \r\n\t\r\nSystem.out.print(\"\\n\");\r\n\r\n\r\n}\r\n}", "private int getGoalValueForBlock(int row, int column) {\n \tif (row == dimension() - 1 && column == dimension() - 1) {\n \t\treturn 0;\n \t\t\n \t} else {\n \t\treturn (row * dimension()) + column + 1;\n \t}\n }", "static int[] permutationEquation(int[] p) {\n int[] ret = new int[p.length];\n HashMap<Integer,Integer> values = new HashMap<>();\n for(int i = 0; i < p.length; i++){\n values.put(p[i],i+1);\n }\n for(int i = 1; i <=p.length; i++){\n int index1 = values.get(i);\n int index2 = values.get(index1);\n ret[i-1] = index2;\n }\n return ret;\n }", "public static void main(String[] args) {\n\t\t \r\n\t\t System.out.println(\"How many rows you want in Floyd's Triangle?\");\r\n\t\t \r\n\t\t Scanner sc = new Scanner(System.in);\r\n\t\t \r\n\t\t int noOfRows = sc.nextInt();\r\n\t\t \r\n\t\t int value = 1;\r\n\t\t \r\n\t\t System.out.println(\"Floyd's Triangle : \");\r\n\t\t \r\n\t\t for (int i = 1; i <= noOfRows; i++) \r\n\t\t {\r\n\t\t for (int j = 1; j <= i; j++) \r\n\t\t {\r\n\t\t System.out.print(value+\"\\t\");\r\n\t\t \r\n\t\t value++;\r\n\t\t }\r\n\t\t \r\n\t\t System.out.println();\r\n\t\t }\r\n\t}", "public static void main ( String[] args )\n {\n int[][] grid = new int[][] {{9, 0, 2, 5, 0, 9, 0, 5, 8, 5},\n {4, 8, 1, 7, 0, 5, 3, 6, 2, 0},\n {7, 7, 5, 6, 0, 5, 6, 6, 4, 0},\n {5, 1, 6, 2, 2, 2, 0, 9, 1, 9},\n {0, 7, 8, 9, 0, 7, 4, 3, 8, 6},\n {1, 0, 5, 6, 3, 2, 9, 3, 5, 3},\n {5, 3, 1, 4, 9, 9, 1, 3, 4, 8},\n {5, 6, 9, 9, 7, 8, 7, 3, 9, 3},\n {1, 0, 4, 8, 3, 1, 0, 2, 1, 5},\n {1, 7, 3, 6, 3, 7, 8, 3, 3, 6}};\n int[] rowproduct= new int[10]; //{0,0,....,0}\n int[] colproduct= new int[10];\n for( int i = 0; i < 10; i++)\n {\n rowproduct[i] = 1;\n colproduct[i] = 1;\n }\n int rhp=0;\n int chp=0;\n int rp=0;\n int cp=0;\n int intersection = 0;\n for (int row=0; row < grid.length; row++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[row][col]!=0) // find product\n {\n rowproduct[row] *= grid[row][col];\n colproduct[col] *= grid[row][col];\n }//end if \n }\n }\n for(int i = 0 ;i < 10; i ++)\n {\n if(rowproduct[i]>rhp) //[rows] or [col] ?? row cuz we only compare when it has finished multiplying\n {\n rp=i;\n rhp = rowproduct[i];\n }\n if(colproduct[i]>chp)\n {\n cp=i;\n chp =colproduct[i];\n }\n }\n intersection = grid[rp][cp];\n System.out.println(\"--------------\");\n System.out.println(\"Number replaced = \"+ intersection + \"(Row \" + (rp+1)+\", Col \"+(cp+1) +\")\" );\n System.out.println(\"--------------\");\n for (int rows=0; rows < grid.length; rows++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[rows][col]==0) // locate all zeros\n {\n grid[rows][col]=intersection;\n }\n\n if (grid[rows][col]==intersection) // locate all num intersections \n {\n grid[rows][col]=0;\n }\n System.out.print(grid[rows][col] + \" \");\n }\n System.out.print(\"\\n\");\n }\n }", "public static void main(String[] args) {\n int i= 1; int j=1;\r\n\t\t/*for(i=1; i<=6; i++){\r\n\t\t\tfor(j=1; j<=6-i; j++){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t }\r\n\t\t\t for(j=1; j<=i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t } for(j=1; j<=6; j++){\r\n\t\t} System.out.print(\"*\");\r\n\t\t System.out.println();\r\n\t\t}\r\n\t\t*/\r\n\t\r\nfor(i=1; i<=7;i++){\r\n\tfor(j=1; j<=7-i; j++){\r\n\t\tSystem.out.println(\" \");\r\n\t}\r\n\tfor(j=1; j<=i; j++){\r\n\t\tSystem.out.print(\"*\");\r\n\t\r\n\t}\r\n}\r\n\r\n\t\t\r\n\t\t/*int num = 6;\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=num+1-i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tint num = 6;\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=num+6-i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/******* i=1 *=6\r\n\t\t***** i=2 *=5\r\n\t\t**** i=3 *=4\r\n\t\t*** i=4 *=3\r\n\t\t** i=5 *=2\r\n\t\t* i=6 *=1\r\n\t\t *=7 -i=6+1-i=num+1-i\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t/*\t****** i=1 * =6\r\n\t\t ***** i=2 * = 5\r\n\t\t ***\r\n\t\t **\r\n\t\t *\r\n\t\t\r\n\t*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=i-1; j++){\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[][] matrrix = new int[n][n];\n\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n matrrix[i][j] = scanner.nextInt();\n }\n }\n int mainDiagonal = 0, secondDiagonal = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (i == j) {\n mainDiagonal += matrrix[i][j];\n }\n if (Math.abs(i + j) == (n - 1)) {\n secondDiagonal += matrrix[i][j];\n }\n }\n }\n System.out.println(Math.abs(mainDiagonal - secondDiagonal));\n\n }", "private int getPath(int row, int col) {\n\tif (row > X || col > Y || row < 0 || col < 0) return 0;\n\tif (row == X && col == Y) return 1;\n\tif (grid[row][col] == -1) return 0;\n\n\tif (memo[row][col] != -1) return memo[row][col];\n\n\tint isPossible = getPath(row + y_dir[0], col + x_dir[0]);\n\tif (isPossible != 1) {\n\t isPossible = getPath(row + y_dir[1], col + x_dir[1]);\n\t}\n\n\tif (isPossible == 1) {\n\t path.add(new Point(row, col));\n\t}\n\t\n\treturn memo[row][col] = isPossible;\n }", "public int method3(int row) {\n return 0;\n }", "public static List<List<Integer>> calcYangHuisTriangle(int n) {\n if (n == 0) {\n return null;\n }\n List<List<Integer>> res = new LinkedList<>();\n // 定义List<>以添加数字\n List<Integer> temp = new LinkedList<>();\n temp.add(1);\n res.add(temp);\n for (int i = 1; i < n; i++) {\n List<Integer> temp2 = new LinkedList<>();\n temp2.add(1);\n for (int j = 1; j < i; j++) {\n // 只对非开头末尾遍历,分别为上一行前一列->(i-1,j-1)与上一行当前列(i-1,j)\n int sum = res.get(i - 1).get(j - 1) + res.get(i - 1).get(j);\n temp2.add(sum);\n }\n temp2.add(1);\n res.add(temp2);\n }\n return res;\n }", "private int[] diagnalUpward(List<Integer> resList, int rowIdx, int colIdx, int[][] matrix) {\n int row = matrix.length;\n int col = matrix[0].length;\n\n while ((rowIdx >= 0 && rowIdx < row) && (colIdx >= 0 && colIdx < col)) {\n resList.add(matrix[rowIdx][colIdx]);\n rowIdx--;\n colIdx++;\n }\n rowIdx++;\n colIdx--;\n // Compute new starting point: try to go right, if reaches the end then go down.\n if (colIdx == col - 1) return new int[]{rowIdx + 1, colIdx};\n return new int[]{rowIdx, colIdx + 1};\n }", "public static void main(String[] args) {\nint a1=0;\r\nint a2=1;\r\nint a3=a1+a2;\r\nfor(int row=1;row<=5;row++)\r\n{\r\n\tfor(int col=1;col<row;col++)\r\n\t{\r\n\t\tSystem.out.print(a3+\" \");\r\n\t\ta3=a1+a2;\t//0+1=1\t\t1+1=2 \r\n\t\ta1=a2;\t\t//0=1 1=1\t2=2\r\n\t\ta2=a3;\t\t//1=1 1=1\t1=1\r\n\t}\r\n\tSystem.out.println();\r\n}\r\n\t\r\n}", "static void TwoDimTrav(int[][] arr, int row, int col){\n\n int[] dr = new int[]{ -1, 1, 0, 0};\n int[] dc = new int[]{ 0, 0, 1, -1};\n\n for(int i = 0; i < 4; i++){\n int newRow = row + dr[i];\n int newCol = col + dc[i];\n\n if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n continue;\n\n // do your code here\n\n }\n\n // All Directions\n // North, South, East, West, NW NE SW SE\n // dr = [ -1, 1, 0, 0 -1, -1, 1, 1 ]\n // dc = [ 0, 0, 1, -1 -1, 1, 1, -1 ]\n\n// int[] dr = new int[]{ -1, 1, 0, 0, -1, -1, 1, 1};\n// int[] dc = new int[]{ 0, 0, 1, -1, -1, 1, -1, 1};\n//\n// for(int i = 0; i < 8; i++){\n// int newRow = row + dr[i];\n// int newCol = col + dc[i];\n//\n// if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n// continue;\n//\n// // do your code here\n//\n// }\n }", "public static int[] findDiagonalOrder(int[][] matrix){\n if( matrix == null || matrix.length == 0)\n return new int[0];\n int i = 0;\n int j =0;\n int k = 0;\n int size = matrix.length * matrix[0].length;\n int[] result = new int[size];\n boolean moveUp =true;\n while(k< size){\n\n if(moveUp){\n for(;i >=0 && j<= matrix[0].length-1;i--, j++){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving up there are two conditions\n// 1. only row moves beyod 0 th row and column is in range (check for both row and column)\n //2. both row and column moves out ( check for column only)\n //case 1\n if(i<0 && j <= matrix[0].length-1){\n i = 0; // reset row to 0 and move down\n moveUp = !moveUp;\n }\n //case 2\n if(j == matrix[0].length){\n i = i+2; // reset row\n j--; // reduce column and move down\n moveUp = !moveUp;\n }\n\n }\n else\n {\n // moving down increment row and decrement column\n for(;j>=0 && i <= matrix.length - 1; i++, j-- ){\n result[k] = matrix[i][j];\n k++;\n }\n // while moving down there are two cases\n // 1. column goes out but rows in order (we need to check both)\n // 2. both column and row goes out (we can only have row check)\n if(j < 0 && i<= matrix.length-1){\n j = 0;\n moveUp = !moveUp;\n }\n if( i == matrix.length){\n j = j+2;\n i--;\n moveUp = !moveUp;\n }\n\n }\n\n\n }\n return result;\n }", "public static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tSystem.out.println(\"rows?\");\n\tint r = s.nextInt();\n\tSystem.out.println(\"Col?\");\n\tint c = s.nextInt();\n\tint[][] arr = new int[r][c];\n\tfor (int i = 0; i < arr.length; i++) {\n\t\tfor (int j = 0; j < arr[0].length; j++) {\n\t\t\tarr[i][j] = 0x3f3f3f3f;\n\t\t}\n\t}\n\tfor (int i = 0; i < arr.length; i++) {\n\t\tarr[i][i] = 0;\n\t}\n\twhile(true)\n\t{\n\t\t//System.out.println(\"Vertex 1?\");\n\t\tint x = s.nextInt();\n\t\t//System.out.println(\"Vertex 2?\");\n\t\tint y = s.nextInt();\n\t\t//System.out.println(\"Distance?\");\n\t\tint d = s.nextInt();\n\t\t\n\t\tif (x == -1) {\n\t\t\tbreak;\n\t\t}\n\t\tarr[x][y] = d;\n\t\tarr[y][x] = d;\n\t}\n\tfor(int k = 0; k < arr.length;k++)\n\t{\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\tif(arr[i][k] + arr[k][j] < arr[i][j])\n\t\t\t\t{\n\t\t\t\t\tarr[i][j] = arr[i][k] + arr[k][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tSystem.out.println(arr[0][4]);\n\t\n}", "@Override\n\tpublic List<Cell> calcNeighbors(int row, int col) {\n\t\tList<Cell> neighborLocs = new ArrayList<>();\n\t\tint shift_constant = 1 - 2*((row+col) % 2);\n\t\tif(!includesDiagonals) {\n\t\t\tfor(int a = col - 1; a <= col + 1; a++) {\n\t\t\t\tif(a == col)\n\t\t\t\t\taddLocation(row + shift_constant,a,neighborLocs);\n\t\t\t\telse \n\t\t\t\t\taddLocation(row,a,neighborLocs);\n\t\t\t}\n\t\t\treturn neighborLocs;\n\t\t}\n\t\tfor(int b = col - 2; b <= col + 2; b++) {\n\t\t\tfor(int a = row; a != row + 2*shift_constant; a += shift_constant) {\n\t\t\t\tif(a == row && b == col)\n\t\t\t\t\tcontinue;\n\t\t\t\taddLocation(a,b,neighborLocs);\n\t\t\t}\n\t\t}\n\t\tfor(int b = col -1; b <= col + 1; b++) {\n\t\t\taddLocation(row - shift_constant,b,neighborLocs);\n\t\t}\n\t\treturn neighborLocs;\n\t}", "private int totalBeginning(int row, int col) { //function that determines number of moves\n int count = 0;\n for (int i = 0; i < OPTIONS.length; i += 2) {\n int newRow = row + OPTIONS[i];\n int newCol = col + OPTIONS[i + 1];\n if (newRow >= 0 && newRow < rows && newCol >= 0 && newCol < cols) {\n count++;\n }\n }\n return count;\n }", "public static int index(int row, int column) {\n\t\t// Looking across the top row, we can see the difference between the\n\t\t// values looks like 2, then 3, then 4, etc.\n\t\t// Likewise in each other row or column. That indicates clearly we are\n\t\t// dealing with quadratics in the input value.\n\n\t\t// If we assume a form\n\t\t// a * row ^ 2 + b * row + c * column ^ 2 + d * column + e * row *\n\t\t// column + f = index\n\t\t// and stick in the datapoints\n\n\t\t// (row, column, index)\n\t\t// (1, 1, 1)\n\t\t// (2, 1, 2)\n\t\t// (1, 2, 3)\n\t\t// (3, 1, 4)\n\t\t// (2, 2, 5)\n\t\t// (1, 3, 6)\n\n\t\t// we get the system of linear equations\n\n\t\t// a + b + c + d + e + f = 1\n\t\t// 2a + b + c + d + 2e + f = 2\n\t\t// a + b + 2c + d + 2e + f = 3\n\t\t// 9a + 3b + c + d + 3e + f = 4\n\t\t// 4a + 2b + 4c + 2d + 4e + f = 5\n\t\t// a + b + 9c + 3c + 3e + f = 6\n\n\t\t// We can define this as a matrix, and then take its reduced row echelon\n\t\t// form (using Wolfram Alpha) to find\n\n\t\t// a = 1/2\n\t\t// b = -3/2\n\t\t// c = 1/2\n\t\t// d = -1/2\n\t\t// e = 1\n\t\t// f = 1\n\n\t\t// We return that here (making sure to save our integer division until\n\t\t// the end).\n\t\treturn (row * row - 3 * row + column * column - column + 2 * row * column + 2) / 2;\n\t}", "@Test\n\tpublic void testCuatroEnRayaDiag2() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.min(i, 7);\n\t\t\tint sy = Math.min(13 - i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx - 4 >= 0)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx - l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx--;\n\t\t\t}\n\t\t}\n\t}", "public static int[][] task9_spiralGenerate(int n) {\n\t\tif (n <= 0) {\n\t\t\treturn new int[][] {};\n\t\t}\n\t\tint rLen = n;\n\t\tint cLen = n;\n\t\tint[][] matrix = new int[n][n];\n\t\tint leftB = 0, rightB = cLen - 1;\n\t\tint upperB = 0, lowerB = rLen - 1;\n\t\tint counter = 1;\n\t\twhile (true) {\n\t\t\tfor (int j = leftB; j <= rightB; j++) {\n\t\t\t\tmatrix[upperB][j] = counter++;\n\t\t\t}\n\t\t\tupperB++;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = upperB; i <= lowerB; i++) {\n\t\t\t\tmatrix[i][rightB] = counter++;\n\t\t\t}\n\t\t\trightB--;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int j = rightB; j >= leftB; j--) {\n\t\t\t\tmatrix[lowerB][j] = counter++;\n\t\t\t}\n\t\t\tlowerB--;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = lowerB; i >= upperB; i--) {\n\t\t\t\tmatrix[i][leftB] = counter++;\n\t\t\t}\n\t\t\tleftB++;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn matrix;\n\t }", "public int snapToGridVertically(int p)\r\n {\r\n return p;\r\n }", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }", "public double getAngle(int[][] tab) {\n\t\tdouble[] res= new double[4];int resi=0;\n\t\tint cmpt=0;\n\t\tint angle=0;\n\t\tfor (int i=0;i<tab.length;i++) {\n\t\t\tif (!(tab[i][0]==0) || !(tab[i][1]==0))\n\t\t\t\tcmpt++;\n\t\t}\n\t\t\n\t\tif (cmpt<=1) {\n\t\t\t return 0; //RIP CODE\n\t\t}\n\t\t\n\t\tfor (int i=1;i<tab.length && (!(tab[i][0]==0) || !(tab[i][1]==0));i++) {\n\t\t\tfor(int c=1;i<tab.length && (tab[c][0]!=0 || tab[c][1]!=0);i++)\n\t\t\t{\n\t\t\t\tint diffx=tab[i-1][0]-tab[i][0];\n\t\t\t\tint diffy=tab[i-1][1]-tab[i][1];\n\t\t\t\t\n\t\t\t\tdouble yb=tab[i][1];\n\t\t\t\tdouble xb=tab[i][0];\n\t\t\t\tdouble ya=tab[i-1][1];\n\t\t\t\tdouble xa=tab[i-1][0];\n\t\t\t\t\n\t\t\t\tdouble pointy,pointx;\n\t\t\t\tpointy=yb; \t\t\t\t\t\t\t//pointy/x = coord du 3e point de triangle rectangle\n\t\t\t\tpointx=xa;\t\t\t\t\n\t\t\t\t\n\t\t\t\tdouble dhypo=Math.sqrt(Math.pow(xb-xa,2)+Math.pow(yb-ya,2));\t//(yb-ya)/(xb-xa)\n\t\t\t\tdouble dadj=Math.sqrt(Math.pow(xb-pointx, 2)+Math.pow(yb-pointy, 2));\t//adjacent / rapport a xb,yb\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (dhypo<img.getWidth() && dhypo!=0) {\t\t//deux points selectionnees sont des diagonales\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\n\t\t\t\t\tif (retour>90/2)\n\t\t\t\t\t\tretour=180-90-retour;\n\t\t\t\t\t\n\t\t\t\t\tif((xa<xb && ya<yb )||( xb<xa && yb<ya))\t\t\t\t//point de droite plus haut que celui de gauche\n\t\t\t\t\t\treturn -retour;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn retour;\n\t\t\t\t}\n\t\t\t\t/*else {\t\t\t//deux points sont en diagonnale\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\t\t// ne marche pas \n\t\t\t\t\treturn (Math.abs(45-retour)/2);\n\t\t\t\t\t\n\t\t\t\t}*/\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\t\n\t\treturn 0;\n\t}", "private Cell get_bottom_left_diagnoal_cell(int row, int col) {\n return get_cell(++row, --col);\n }", "private int transformInput(int row, int col){\n\t\tif( row <= 0 || row > n\n\t\t\t\t|| col <=0 || col > n){\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\t\n\t\treturn (row-1)*n + col;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the rows\");\n\t\tint rowsnumber = sc.nextInt();\n\t\tint m = 1;\n\n\t\t// pyramid\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = rowsnumber; k >= i; k--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(m++ + \" \");\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\n\t\t// reverse pyramid\n\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = 0; k <= i; k++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < rowsnumber - i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// right angle\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t// left side right angle\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = 2 * (rowsnumber - i); k >= 0; k--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\n\t}", "private double triangleBase() {\n return cellWidth() / BASE_WIDTH;\n }", "public static void main(String args[]) {\n\n\t\tint i = 0, j = 0;\n\t\t// 'i' will be the number of rows you want to print\n\t\tfor(i = 0; i < 3; i++) {\n\t\t\tfor(j = 0; j < 5; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\n\t\tSystem.out.println(\"--------------------------------------\");\n\n\t\t// for getting same rows and columns; i &j will be same\n\t\tfor(i = 0; i < 3; i++) {\n\t\t\tfor(j = 0; j < 3; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\t\tSystem.out.println(\"--------------------------------------\");\n\n\t\t// Trick for building a triangular output like, use j <= i as the conditional\n\t\t/*\n\n\t\t\t*\n\t\t\t* *\n\t\t\t* * *\n\t\t\t* * * *\n\n\t\t*/\n\t\tfor(i = 0; i < 3; i++) {\n\t\t\tfor(j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\t\tSystem.out.println(\"--------------------------------------\");\n\n\t\t// Print numbers\n\t\t/* this combines printing row numbers 1,2,3 etc combined with above logic for triangular shape.\n\n\t\t\t1\n\t\t\t2 2\n\t\t\t3 3 3\n\n\t\t * */\n\t\tfor(i = 1; i <= 3; i++) {\n\t\t\tfor(j = 1; j <= i; j++) {\n\t\t\t\tSystem.out.print(i+ \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\t\t// combining other smaller tricks like for i+j, if odd number print x and\n\t\t// for even print y in a specific way can give rise to many such pattern problems\n\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Iput the number of rows \");\n\t\tint row = sc.nextInt();\n\t\tfor (int i=1;i<=row;i++) {\n\t\t\tfor (int j=row;j>=i;j--) {\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" *\");\n\t\t\t}\n\t\tSystem.out.println();\n\t\t\t}\n\t}\n\n}", "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }", "@Test\n\tpublic void testCuatroEnRayaDiag1() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.max(1, i-5);\n\t\t\tint sy = Math.min(i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx + 3 <= 7)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx + l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx++;\n\t\t\t}\n\t\t}\n\t}", "int main()\n {\n int tri[][] = {{1, 0, 0},\n {4, 8, 0},\n {1, 5, 3}};\n return 0;\n }", "public static void main(String[] args) {\nint i,space,rows,k=0;\n Scanner sc=new Scanner(System.in);\nSystem.out.print(\"Enter number of rows\");\nrows=sc.nextInt();\nfor(i=1;i<=rows;i++)\n{\n\tfor(space=1;space<=(rows-i);space++)\n\t{\n\t\tSystem.out.print(\" \");\n\t}\n\twhile(k !=(2*i-1))\n\t{\n\t\tSystem.out.print(\"* \");\n\t\tk++;\n\t}\n\tk=0;\n\tSystem.out.println();\n}\n\t}", "public static void main(String[] args) {\n\r\n\t\tfor(int i = 1; i <= 6; i++) {\r\n\t\t\tSystem.out.print(\"*\");\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\t\r\n\t\t\r\n\t\tfor(int j = 1; j <= 4; j++) {\r\n\t\t\tfor(int i = 1; i <= 6; i++) {\r\n\t\t\t\tSystem.out.print('*');\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/*\t\t\t\tj(行号)\t\tk(*的个数)\r\n\t\t*\t\t\t\t1\t\t\t1\r\n\t\t**\t\t\t\t2\t\t\t2\r\n\t\t***\t\t\t\t3\t\t\t3\r\n\t\t****\t\t\t4\t\t\t4\r\n\t\t*****\t\t\t5\t\t\t5\r\n\t\t*/\r\n\t\t\r\n\t\tfor (int j = 1; j <= 5;j++) {//控制行数\r\n\t\t\tfor(int k = 1; k <= j; k++) {//控制列数\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/*\t\t\t\tj(行号)\t\tk(*的个数)\t规律:j + k = 5 换句话说:k = 5 - j;\r\n\t\t****\t\t\t1\t\t\t4\r\n\t\t***\t\t\t\t2\t\t\t3\r\n\t\t**\t\t\t\t3\t\t\t2\r\n\t\t*\t\t\t\t4\t\t\t1\r\n\t\t*/\r\n\t\t\r\n\t\tfor (int j = 1; j <= 4;j++) {//控制行数\r\n\t\t\tfor(int k = 1; k <= 5 - j; k++) {//控制列数\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint high =5;\r\n\t\tint bottom = 3;\r\n\t\tdouble equiateraltriangle= (double)high * bottom /2;\r\n\t\t\r\n\t\tSystem.out.println(\"밑변이 3이고 높이가 5인 정삼각형의 넓이는\" + equiateraltriangle);\r\n\r\n\t}", "private int getRowPixelCoords(int row) {\r\n\t\treturn row * (HEX_HEIGHT - HEX_ANGLE_HEIGHT);\r\n\t}", "public int[][] generateMatrix(int n) {\n\t \n\t int matrix[][] = new int[n][n];\n\t int count = n * n +1;\n int topRow = 0;\n int bottomRow = n-1;\n int leftmostColumn = 0;\n int rightmostColumn = n -1;\n int added = 0;\n\t \n\t \n\t while(leftmostColumn <= rightmostColumn && topRow<= bottomRow && added <= count){\n \n \n \tif(added != count){\n for(int i = leftmostColumn; i <= rightmostColumn;i++){\n \t matrix[topRow][i] = added +1;\n // #arrList.add(matrix[topRow][i]);\n added = added+1;\n /* if(added == count)\n \tbreak;*/\n }\n topRow = topRow +1;\n \t}\n \n \n \tif(added != count){\t\n for(int j = topRow; j <= bottomRow;j++){\n //arrList.add(matrix[j][rightmostColumn]);\n \t matrix[j][rightmostColumn] = added+1;\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n rightmostColumn = rightmostColumn -1;\n \t} \n \t\n \t\n \tif(added != count){\t\n for(int k = rightmostColumn; k >= leftmostColumn; k--){\n \t matrix[bottomRow][k] = added +1;\n //arrList.add(matrix[bottomRow][k]);\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n bottomRow = bottomRow -1;\n \t}\n \t\n \t\n \tif(added != count){\t\n for(int l = bottomRow; l >= topRow ;l--){\n // arrList.add(matrix[l][leftmostColumn]);\n \t matrix[l][leftmostColumn] = added +1;\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n leftmostColumn = leftmostColumn +1;\n \t}\n \n }\n\t \n\t return matrix;\n \n}", "public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }", "public static void method1(int numRows) {\n List<List<Integer>> pt = new ArrayList<>();\n List<Integer> row, pre = null;\n for (int i = 0; i < numRows; ++i) {\n row = new ArrayList<>();\n for (int j = 0; j <= i; ++j) {\n if (j == 0 || j == i) {\n row.add(1);\n } else {\n row.add(pre.get(j - 1) + pre.get(j));\n }\n }\n pre = row;\n pt.add(row);\n }\n\n for (List<Integer> a : pt) {\n for (int i: a) {\n System.out.print(i + \" \");\n }\n System.out.println();\n }\n }", "public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\n }", "public static void main(String[] args) throws IOException{\n int N;\n System.out.println(\"Enter row: \");\n N = Integer.parseInt(new BufferedReader(new InputStreamReader(System.in)).readLine());\n int var =1;\n for(int row = 0; row < N; row++) {\n for(int col = 0; col < N; col++ ){\n System.out.print(var*var-1+\"\\t\");\n var++;\n }\n System.out.println();\n }//..outer for\n\n }", "@Override\n protected Double[] getCorners(){\n return new Double[]{\n //leftmost point\n getXPos(), getYPos(),\n //rightmost point\n getXPos() + getWidth(), getYPos(),\n //middle point\n getXPos() + getWidth() / 2, getYPos() + getHeight() * getThirdTriangleYPoint(pointUp)\n };\n }", "private int rowPos(int pos) {\r\n return pos / squareDimension;\r\n }", "public void number_0() {\n\t\tfor(int row=1;row<=7;row++) { \n\t\t\tif(row==1||row==7) { \n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tfor(int col=1;col<=3;col++) { \n\t\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\telse if(row==7) { \n\t\t\t\tfor(int col=1;col<=3;col++) { \n\t\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor(int col=1;col<=5;col++) { \n\t\t\t\t\tif(col==1||col==5) { \n\t\t\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t\t}\n\t\t\t\t\telse { \n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "public static void spiralTraversalAlternate(int[][] input){\n int k = 0;\n int l = 0;\n int m = input.length - 1;\n int n = input[0].length - 1;\n while(k <= m && l <= n){\n for(int j = l ; j <= n ; j++){\n System.out.print(input[k][j] + \" \");\n }\n k++;\n for(int i = k; i <= m ; i++){\n System.out.print(input[i][n] + \" \");\n }\n n--;\n if(k <= m){\n for(int j = n ; j >= l ; j--){\n System.out.print(input[m][j] + \" \");\n }\n m--;\n }\n if(l <= n){\n for(int i = m; i >= k; i--){\n System.out.print(input[i][l] + \" \");\n }\n l++;\n }\n }\n }", "public static void main(String[] args) {\n\t\tint length = 9;\n\t\tint counter = 1;\n\t\t\tfor ( int x = (length+1)/2; x<=length;x++){\n\t\t\t\tfor (int j = x-counter; j>=0; j--){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\tfor (int i =1;i<=counter;i++){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t\tcounter+=2;\n\t\t\t}\n\t\t\tcounter = length-2;\n\t\t\t\n\t\t\t// length = 9, counter is 7 , j = 1, i = 7, x=8\n\t\t\tfor ( int x = (length-1); x>=(length+1)/2; x--){\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tfor (int j = 1; j<=x-counter; j++){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tfor (int i =counter;i>=1;i--){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\tcounter-=2;\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "public static void generatetripletmatrix() {\n\t\tresultMatrix = new int[3][numNonZero];\n\n\t // Generating result matrix\n\t int k = 0;\n\t for (int ro = 0; ro < row; ro++) {\n\t for (int column = 0; column < 6; column++) {\n\t if (matrix[ro][column] != 0)\n\t {\n\t resultMatrix[0][k] = ro;\n\t resultMatrix[1][k] = column;\n\t resultMatrix[2][k] = matrix[ro][column];\n\t k++;\n\t }\n\t }\n\t }\n\t \n\t}", "public static void main(String[] args) {\n\t\tint num=5;\r\n\t\tint c=num*2-1;//5\r\n\t\tfor(int j=0 ; j< c ; j++){//j: 0, 1, 2,3 4\r\n\t\t\t\r\n\t\t\tif(j<num) {///j: 0, 1, 2\r\n\t\t\t\t// 1 ,2,3 : 0+1, 1+1, 2+1\r\n\t\t\t\tfor(int i=0; i<j+1 ; i++) {\r\n\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t}\r\n\t\t\t}else {//j: 3,4\r\n\t\t\t\t//2,1 : 5-3, 5-4\r\n\t\t\t\tfor(int i=0; i<c-j ; i++) {\r\n\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "@Test\n\tpublic void testSquareIndexToSequence(){\n\t\t\n\t\tRow row = TestUtils.buildRow(\"3,1,2,1|-...-.....-....-.....-.-\");\n\t\tRowDecomposition decomposition = row.getDecomposition();\n\t\t\n\t\tAssert.assertEquals(18, decomposition.getTotalLength());\n\t\tAssert.assertEquals(decomposition.getSequence(0), decomposition.getSequenceContaining(0));\n\t\tAssert.assertEquals(decomposition.getSequence(0), decomposition.getSequenceContaining(2));\n\t\tAssert.assertEquals(decomposition.getSequence(1), decomposition.getSequenceContaining(3));\n\t\tAssert.assertEquals(decomposition.getSequence(1), decomposition.getSequenceContaining(7));\n\t\tAssert.assertEquals(decomposition.getSequence(2), decomposition.getSequenceContaining(8));\n\t\tAssert.assertEquals(decomposition.getSequence(2), decomposition.getSequenceContaining(11));\n\t\tAssert.assertEquals(decomposition.getSequence(3), decomposition.getSequenceContaining(12));\n\t\tAssert.assertEquals(decomposition.getSequence(3), decomposition.getSequenceContaining(16));\n\t\tAssert.assertEquals(decomposition.getSequence(4), decomposition.getSequenceContaining(17));\n\t\t\n\t}", "public abstract double getDiagonal();", "private int xyTo1D(int row, int col)\n {\n validate(row, col);\n return (row-1) * gridSize + col-1;\n }", "public static void main(String[] args) {\n int[][] matrix = {{1,2}, {3,4}};\n // int[][] matrix = {{1,2}, {3,4}};\n// printMatrixDiagonal (matrix, matrix.length);\n int[] result = findDiagonalOrder (matrix);\n for ( int i:result ){\n System.out.println (i);\n }\n\n }", "private int rowColToIndex(int row, int col) {\n row = row - 1;\n col = col - 1;\n int index = row * side + col;\n if (index >= side*side || index < 0 || row < 0 || row >= side || col < 0 || col >= side)\n throw new IndexOutOfBoundsException();\n return index;\n }", "public int[][] generateMatrix(int n) {\n int[][] result = new int[n][n];\n int val = 1;\n int rowBegin = 0;\n int colBegin = 0;\n int rowEnd = n - 1;\n int colEnd = n - 1;\n while (rowBegin <= rowEnd && colBegin <= colEnd) {\n // travel right\n for (int j = colBegin; j <= colEnd; j++) {\n result[rowBegin][j] = val++;\n }\n rowBegin++;\n // travel down\n for (int i = rowBegin; i <= rowEnd; i++) {\n result[i][colEnd] = val++;\n }\n colEnd--;\n // travel left\n if (rowBegin <= rowEnd) {\n for (int j = colEnd; j >= colBegin; j--) {\n result[rowEnd][j] = val++;\n }\n }\n rowEnd--;\n // travel up\n if (colBegin <= colEnd) {\n for (int i = rowEnd; i >= rowBegin; i--) {\n result[i][colBegin] = val++;\n }\n }\n colBegin++;\n }\n return result;\n\n }", "public static void main(String[] args)\n throws IOException {\n\n\n\n for (int[] row : getMatrix(getLines(FILENAME), \"\\\\s+\")) {\n\n\n\n String grid = Arrays.toString(row);\n\n System.out.println(grid);\n\n int product = 0;\n int largest = 0;\n\n // check right\n for (int i = 0; i < 20; i++) {\n for (int j = 0; j < 17; j++) {\n// product = grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n // check down\n for (int i = 0; i < 17; i++) {\n for (int j = 0; j < 20; j++) {\n// product = grid[i][j] * grid[i + 1][j] * grid[i + 2][j] * grid[i + 3][j];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n // check diagonal right down\n for (int i = 0; i < 17; i++) {\n for (int j = 0; j < 17; j++) {\n// product = grid[i][j] * grid[i + 1][j + 1] * grid[i + 2][j + 2] * grid[i + 3][j + 3];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n // check diagonal right up\n for (int i = 0; i < 20; i++) {\n for (int j = 0; j < 17; j++) {\n// product = grid[i][j] * grid[i + 1][j - 1] * grid[i+ 2][j - 1] * grid[i + 3][j -3];\n if (product > largest) {\n largest = product;\n }\n }\n }\n\n System.out.println(product);\n\n }\n }", "private int ufindex(int row, int col) {\n return grid.length * (row - 1) + col - 1;\n }", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "private int getIndex(int row, int column) {\n \n int pos;\n \n pos = (row*getVariables().size()*4)+(column*4);\n return pos;\n}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "private int xyTo1D(final int row, final int col) {\n return (row - 1) * size + (col - 1);\n }", "private Cell get_top_left_diagnoal_cell(int row, int col) {\n return get_cell(--row, --col);\n }", "public static int getUnitDiagonal(int tx, int ty) {\n return (ty + tx + 2) / 3;\n }", "public static int[][] task10_spiralGenerate(int m, int n) {\n\t\tif (m <= 0) {\n\t\t\t// !!! only m <= 0, return a empty array\n\t\t\treturn new int[][] {};\n\t\t}\n\t\tint rLen = m;\n\t\tint cLen = n;\n\t\tint[][] matrix = new int[m][n];\n\t\tint leftB = 0, rightB = cLen - 1;\n\t\tint upperB = 0, lowerB = rLen - 1;\n\t\tint counter = 1;\n\t\twhile (true) {\n\t\t\tfor (int j = leftB; j <= rightB; j++) {\n\t\t\t\tmatrix[upperB][j] = counter++;\n\t\t\t}\n\t\t\tupperB++;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = upperB; i <= lowerB; i++) {\n\t\t\t\tmatrix[i][rightB] = counter++;\n\t\t\t}\n\t\t\trightB--;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int j = rightB; j >= leftB; j--) {\n\t\t\t\tmatrix[lowerB][j] = counter++;\n\t\t\t}\n\t\t\tlowerB--;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = lowerB; i >= upperB; i--) {\n\t\t\t\tmatrix[i][leftB] = counter++;\n\t\t\t}\n\t\t\tleftB++;\n\t\t\tif (leftB > rightB || upperB > lowerB) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn matrix;\n\t}", "public PointList calculateTrianglePoints(Rectangle r)\r\n\t{\r\n\t\tPointList points = new PointList(3);\r\n\t\t\r\n\t\tpoints.addPoint(new Point(r.x + (r.width-1) / 2, r.y));\r\n\t\tpoints.addPoint(new Point(r.x, r.y + r.height-1));\r\n\t\tpoints.addPoint(new Point(r.x + r.width-1, r.y + r.height-1));\r\n\r\n\t\treturn points;\r\n\t}", "public static long cross_hatched(long W, long H) {\r\n long sum = 0;\r\n \r\n // horizontals\r\n for (long w = 1L; w <= W; w++) {\r\n for (long h = 1L; h <= H; h++) {\r\n sum += (W - w + 1) * (H - h + 1);\r\n //System.out.println(\"hSuma (\" + w + \"x\" + h + \") = \" + ((W - w + 1) * (H - h + 1))); \r\n }\r\n }\r\n \r\n // Diagonals\r\n for (long n = 1L; n <= Math.min(W, H) * 2; n++) {\r\n for (long m = 1L; m <= n; m++) {\r\n double ancho_alto = (n + m) / 2.0;\r\n\r\n // Ancho diagonal impar\r\n if (n % 2 == 1) {\r\n // empieza en Y = 0\r\n double cabenx = Math.floor(W - 0.5 - ancho_alto + 1);\r\n double cabeny = Math.floor(H - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n } \r\n // empieza en Y = 0.5\r\n cabenx = Math.floor(W - ancho_alto + 1);\r\n cabeny = Math.floor(H - 0.5 - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n }\r\n }\r\n // Ancho diagonal par\r\n else {\r\n // Empieza en Y = 0\r\n double cabenx = Math.floor(W - ancho_alto + 1);\r\n double cabeny = Math.floor(H - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n } \r\n // Empieza en Y = 0.5\r\n cabenx = Math.floor(W - 0.5 - ancho_alto + 1);\r\n cabeny = Math.floor(H - 0.5 - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n } \r\n }\r\n }\r\n }\r\n // Diagonals squared\r\n System.out.println(\"Suma (\" + W + \"x\" + H + \") = \" + sum);\r\n return sum;\r\n }", "public void printPascal(int n) {\n coeffs = new int[n+1][];\n for(int i = 0; i <= n; i++){\n coeffs[i] = new int[i+1];\n for(int j = 0; j <= i; j++)\n binom(i, j);\n }\n\n if(!reverse){\n for(int x = 0; x < coeffs.length; x++) {\n for (int y = 0; y < coeffs[x].length; y++)\n System.out.print(coeffs[x][y] + \" \");\n System.out.println();\n }\n }else{\n for(int x = coeffs.length-1; x >= 0; x--) {\n for (int y = coeffs[x].length-1; y >= 0 ; y--)\n System.out.print(coeffs[x][y] + \" \");\n System.out.println();\n }\n }\n }", "private int goalEntry0ind(int r, int c) {\n if (r == N - 1 && c == N - 1) return 0;\n else return N * r + c + 1;\n }", "private static void solution() {\n for (int i = 0; i < n; i++) {\n Coord here = coords[i]; // start, end, dir, gen\n for (int j = 0; j < here.gen; j++) {\n // Rotate degree of 90.\n List<Pair> changed = rotate(here.coord, here.endPoint);\n boolean first = true;\n for(Pair p: changed){\n if(first) {\n here.endPoint = new Pair(p.x, p.y);\n first = false;\n }\n here.coord.add(new Pair(p.x, p.y));\n }\n }\n }\n // count the number of squares enclosing all angles with dragon curve\n for (int i = 0; i < n; i++) {\n for(Pair p: coords[i].coord)\n board[p.y][p.x] = true;\n }\n int cnt = 0;\n for (int i = 0; i < 100; i++)\n for (int j = 0; j < 100; j++)\n if(board[i][j] && board[i + 1][j] && board[i][j + 1] && board[i + 1][j + 1])\n cnt += 1;\n System.out.println(cnt);\n }", "public static void m11() {\r\n\tint size =4;\r\n\tfor(int i=size;i>=-size;i--) {\r\n\t\t\r\n\t\tfor(int j=1;j<=Math.abs(i);j++) {\r\n\t\t\t System.out.print(\" \");\r\n\t\t }\r\n\t\tchar ch = 'A';\r\n\t\tfor(int k =size;k>=Math.abs(i) ;k--) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\t System.out.println();\r\n\t}\r\n}", "private int getPosition(int row, int col) {\n\t\treturn (side * (row - 1)) + (col - 1);\n\t}", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "private static long sumOfDiagonalsInSquareSpiral(int m) {\n assert m % 2 == 1 : \"Square matrix must be of odd numbered size!\";\n long sum = 0;\n final List<Integer> coefficients = Lists.newArrayList(4, 3, 8, -9);\n final int denominator = 6;\n for (int coefficient : coefficients) {\n sum = sum * m + coefficient;\n }\n return sum / denominator;\n }", "public static void main(String[] args) {\t\t\r\n\t\tint row=8;\r\n\t\tint column=8;\t\t\r\n\t\tfor (int i=1; i<=row; i++) {\r\n\t\t\t\t\t\t\r\n\t\t\tfor (int j=1; i%2==1&&j<=column; j+=2) {\t\t\t\t\r\n\t\t \tSystem.out.print(\"B\");\r\n\t\t \tSystem.out.print(\"W\");\r\n\t\t\t}\t\r\n\t\t\tfor(int k=1;i%2==0 && k<=column; k+=2) {\r\n\t\t\t\tSystem.out.print(\"W\");\r\n\t\t\t\tSystem.out.print(\"B\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t/*!!!! BETTER !!!\r\n\t\t * \r\n\t\t * for(int i=1;i<=8;i++) {\r\n \r\n \t\t\t for(int j=1;j<=8;j++) {\r\n \t\t\t if ((i+j)%2!=0) {\r\n \t\t\t System.out.print(\"W \");\r\n \t\t\t }else {\r\n \t\t\t System.out.print(\"B \");\r\n \t\t }\r\n \t\t }\r\n \t \tSystem.out.println();\r\n\t\t }\r\n\r\n\t\t */\r\n\t}", "public static void main(String[] args) {\n boolean[][] board = new boolean[8][8];\n for(int i = 0; i < 8; i++) {\n for(int j = 0; j < 8; j++) {\n board [i][j] = false;\n }\n }\n int row = 3; //can be between -1 and 6 depending where you want first square (row - 2)\n int count = 1;\n int column = 1;\n int addedTrue = 0;\n \n while (count < 9) {\n for(int i = row + 1; i < 8; i++) { \n if(horizontal(board, i) && diagonal(board, column - 1, i)) {\n board[column - 1][i] = true;\n addedTrue++;\n break;\n } \n }\n if(addedTrue == 0) {\n column--;\n count--;\n for(int z = 0; z < 8; z++) {\n if(board[column - 1][z]) {\n row = z;\n board[column - 1][z] = false;\n }\n }\n }\n if(addedTrue == 1) {\n column++;\n count++;\n addedTrue = 0;\n row = -1;\n } \n /*printBoard(board);\n System.out.println(\"\\n\\n\");*/\n }\n printBoard(board);\n }", "public List<int[]> getCoords(Board lev){\n \tint[][] coords;\n \tColumn c = lev.getColumns().get(col);\n \tint[] p1 = c.getFrontPoint1();\n \tint[] p2 = c.getFrontPoint2();\n\n \tif (isPod && z < Board.BOARD_DEPTH) {\n \t\tint cx = p1[0] + (p2[0]-p1[0])/2;\n \t\tint cy = p1[1] + (p2[1]-p1[1])/2;\n\n \t\t// define outer and inner diamonds\n \t\tint[][] outer = new int[4][3];\n \t\tint[][] inner = new int[4][3];\n \t\touter[0][0] = cx;\n \t\touter[0][1] = cy - PODSIZE;\n \t\touter[0][2] = (int)z;\n \t\touter[1][0] = cx + PODSIZE;\n \t\touter[1][1] = cy;\n \t\touter[1][2] = (int) z;\n \t\touter[2][0] = cx;\n \t\touter[2][1] = cy + PODSIZE;\n \t\touter[2][2] = (int) z;\n \t\touter[3][0] = cx - PODSIZE;\n \t\touter[3][1] = cy;\n \t\touter[3][2] = (int) z;\n \t\tinner[0][0] = cx;\n \t\tinner[0][1] = cy - PODSIZE/3;\n \t\tinner[0][2] = (int) z;\n \t\tinner[1][0] = cx + PODSIZE/3;\n \t\tinner[1][1] = cy;\n \t\tinner[1][2] = (int) z;\n \t\tinner[2][0] = cx;\n \t\tinner[2][1] = cy + PODSIZE/3;\n \t\tinner[2][2] = (int) z;\n \t\tinner[3][0] = cx - PODSIZE/3;\n \t\tinner[3][1] = cy;\n \t\tinner[3][2] = (int) z;\n\n \t\t// define line path through those diamonds:\n \t\tcoords = new int[17][3];\n \t\tcoords[0] = outer[0];\n \t\tcoords[1] = outer[1];\n \t\tcoords[2] = inner[1];\n \t\tcoords[3] = inner [0];\n \t\tcoords[4] = outer[1];\n \t\tcoords[5] = outer[2];\n \t\tcoords[6] = inner[2];\n \t\tcoords[7] = inner[1];\n \t\tcoords[8] = outer[2];\n \t\tcoords[9] = outer[3];\n \t\tcoords[10]= inner[3];\n \t\tcoords[11]= inner[2];\n \t\tcoords[12]= outer[3];\n \t\tcoords[13]= outer[0];\n \t\tcoords[14]= inner[0];\n \t\tcoords[15]= inner[3];\n \t\tcoords[16]= outer[0];\n \t}\n \telse { \n \t\tcoords = new int[7][3];\n \t\tswitch (s) {\n \t\tcase STRAIGHT:\n \t\t\tcoords[0][0] = p1[0];\n \t\t\tcoords[0][1] = p1[1];\n \t\t\tcoords[0][2] = (int) (z-EXHEIGHT_H);\n \t\t\tcoords[1][0] = p2[0];\n \t\t\tcoords[1][1] = p2[1];\n \t\t\tcoords[1][2] = (int) (z+EXHEIGHT_H);\n \t\t\tcoords[2][0] = p2[0] - (p2[0]-p1[0])/3;\n \t\t\tcoords[2][1] = p2[1] - (p2[1]-p1[1])/3;\n \t\t\tcoords[2][2] = (int) z;\n \t\t\tcoords[3][0] = p2[0];\n \t\t\tcoords[3][1] = p2[1];\n \t\t\tcoords[3][2] = (int) (z-EXHEIGHT_H);\n \t\t\tcoords[4][0] = p1[0];\n \t\t\tcoords[4][1] = p1[1];\n \t\t\tcoords[4][2] = (int) (z+EXHEIGHT_H);\n \t\t\tcoords[5][0] = p1[0] + (p2[0]-p1[0])/3;\n \t\t\tcoords[5][1] = p1[1] + (p2[1]-p1[1])/3;\n \t\t\tcoords[5][2] = (int) z;\n \t\t\tcoords[6][0] = p1[0];\n \t\t\tcoords[6][1] = p1[1];\n \t\t\tcoords[6][2] = (int) (z-EXHEIGHT_H);\n \t\t\tbreak;\n\n \t\tcase JUMPRIGHT1:\n \t\tcase LANDRIGHT2:\n \t\t\tcoords[0][0] = p1[0] + (p2[0]-p1[0])/4;\n \t\t\tcoords[0][1] = p1[1] + (p2[1]-p1[1])/4;\n \t\t\tcoords[0][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[1][0] = p2[0] + (p2[0]-p1[0])/4;\n \t\t\tcoords[1][1] = p2[1] + (p2[1]-p1[1])/4;\n \t\t\tcoords[1][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[2][0] = p2[0] - (p2[0]-p1[0])/11;\n \t\t\tcoords[2][1] = p2[1] - (p2[1]-p1[1])/11;\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[3][0] = p2[0];\n \t\t\tcoords[3][1] = p2[1];\n \t\t\tcoords[3][2] = (int) z;\n \t\t\tcoords[4][0] = (int) (p1[0] + (p2[0]-p1[0])/2);\n \t\t\tcoords[4][1] = (int) (p1[1] + (p2[1]-p1[1])/2);\n \t\t\tcoords[4][2] = (int) (z+ EXHEIGHT_H*5);\n \t\t\tcoords[5][0] = (int) (p2[0] - (p2[0]-p1[0])/2.5);\n \t\t\tcoords[5][1] = (int) (p2[1] - (p2[1]-p1[1])/2.5);\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H *2.6);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n\n \t\tcase JUMPLEFT1:\n \t\tcase LANDLEFT2:\n \t\t\tcoords[0][0] = p1[0];\n \t\t\tcoords[0][1] = p1[1];\n \t\t\tcoords[0][2] = (int) z;\n \t\t\tcoords[1][0] = (int) (p1[0] + (p2[0]-p1[0])/2);\n \t\t\tcoords[1][1] = (int) (p1[1] + (p2[1]-p1[1])/2);\n \t\t\tcoords[1][2] = (int) (z+ EXHEIGHT_H*5);\n \t\t\tcoords[2][0] = (int) (p1[0] + (p2[0]-p1[0])/2.5);\n \t\t\tcoords[2][1] = (int) (p1[1] + (p2[1]-p1[1])/2.5);\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H *2.6);\n \t\t\tcoords[3][0] = p2[0] - (p2[0]-p1[0])/4;\n \t\t\tcoords[3][1] = p2[1] - (p2[1]-p1[1])/4;\n \t\t\tcoords[3][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[4][0] = p1[0] - (p2[0]-p1[0])/4;\n \t\t\tcoords[4][1] = p1[1] - (p2[1]-p1[1])/4;\n \t\t\tcoords[4][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[5][0] = p1[0] + (p2[0]-p1[0])/11;\n \t\t\tcoords[5][1] = p1[1] + (p2[1]-p1[1])/11;\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n\n \t\tcase JUMPLEFT2:\n \t\tcase LANDLEFT1:\n \t\t\tcoords[0][0] = p1[0];\n \t\t\tcoords[0][1] = p1[1];\n \t\t\tcoords[0][2] = (int) z;\n \t\t\tcoords[1][0] = (int) (p1[0] + (p2[0]-p1[0])/4.5);\n \t\t\tcoords[1][1] = (int) (p1[1] + (p2[1]-p1[1])/4.5);\n \t\t\tcoords[1][2] = (int) (z+ EXHEIGHT_H*8);\n \t\t\tcoords[2][0] = (int) (p1[0] + (p2[0]-p1[0])/4.5);\n \t\t\tcoords[2][1] = (int) (p1[1] + (p2[1]-p1[1])/4.5);\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H *4);\n \t\t\tcoords[3][0] = p2[0] - (p2[0]-p1[0])/2;\n \t\t\tcoords[3][1] = p2[1] - (p2[1]-p1[1])/2;\n \t\t\tcoords[3][2] = (int) (z+EXHEIGHT_H*4);\n \t\t\tcoords[4][0] = (int) (p1[0] - (p2[0]-p1[0])/3.5);\n \t\t\tcoords[4][1] = (int) (p1[1] - (p2[1]-p1[1])/3.5);\n \t\t\tcoords[4][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[5][0] = p1[0];// - (p2[0]-p1[0])/15;\n \t\t\tcoords[5][1] = p1[1];// - (p2[1]-p1[1])/15;\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n\n \t\tcase JUMPRIGHT2:\n \t\tcase LANDRIGHT1:\n \t\t\tcoords[0][0] = p2[0] - (p2[0]-p1[0])/2;\n \t\t\tcoords[0][1] = p2[1] - (p2[1]-p1[1])/2;\n \t\t\tcoords[0][2] = (int) (z+EXHEIGHT_H*4);\n \t\t\tcoords[1][0] = (int) (p2[0] + (p2[0]-p1[0])/3.5);\n \t\t\tcoords[1][1] = (int) (p2[1] + (p2[1]-p1[1])/3.5);\n \t\t\tcoords[1][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[2][0] = p2[0];// - (p2[0]-p1[0])/15;\n \t\t\tcoords[2][1] = p2[1];// - (p2[1]-p1[1])/15;\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[3][0] = p2[0];\n \t\t\tcoords[3][1] = p2[1];\n \t\t\tcoords[3][2] = (int) z;\n \t\t\tcoords[4][0] = (int) (p2[0] - (p2[0]-p1[0])/4.5);\n \t\t\tcoords[4][1] = (int) (p2[1] - (p2[1]-p1[1])/4.5);\n \t\t\tcoords[4][2] = (int) (z+ EXHEIGHT_H*8);\n \t\t\tcoords[5][0] = (int) (p2[0] - (p2[0]-p1[0])/4.5);\n \t\t\tcoords[5][1] = (int) (p2[1] - (p2[1]-p1[1])/4.5);\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H *4);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n \t\t}\n \t}\n\n \treturn Arrays.asList(coords);\n }", "static int hourglassSum(int[][] arr) {\n int answer = 0 ;\n\n// validatable vertexes\n// i = 1,2,3,4\n// j = 1,2,3,4\n\n int[] adjacentArrX = {-1, -1,-1,0, 1,1,1};\n int[] adjacentArrY = {-1, 0, 1, 0, -1, 0, 1};\n\n for (int i = 1; i < 5; i++) {\n for (int j = 1; j < 5; j++) {\n int nowValue = Integer.MIN_VALUE;\n for (int r = 0; r < adjacentArrX.length; r++) {\n nowValue += arr[i + adjacentArrX[r]][j + adjacentArrY[r]];\n }\n answer = Math.max(answer, nowValue);\n }\n }\n\n\n return answer;\n\n }", "public static int collatz(int n){\n if(n==1)return 1;\n if(n%2==0){\n return collatz(n/2) +1;\n }\n return collatz(3*n+1) +1;\n }", "int removeObstacle(int numRows, int numColumns, List<List<Integer>> lot)\r\n {\r\n \tint m = 0;\r\n \tint n = 0;\r\n \tfor(List<Integer> rowList: lot) {\r\n \t\tfor(Integer num: rowList) {\r\n \t\t\tif(num == 9 ) {\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tn++;\r\n \t\t}\r\n \t\tm++;\r\n \t}\r\n \t// to store min cells required to be \r\n // covered to reach a particular cell \r\n int dp[][] = new int[numRows][numColumns]; \r\n \r\n // initially no cells can be reached \r\n for (int i = 0; i < numRows; i++) \r\n for (int j = 0; j < numColumns; j++) \r\n dp[i][j] = Integer.MAX_VALUE; \r\n \r\n // base case \r\n dp[0][0] = 1; \r\n \r\n for (int i = 0; i < lot.size(); i++) {\r\n \tList<Integer> columnList = lot.get(i);\r\n for (int j = 0; j < columnList.size(); j++) { \r\n \r\n // dp[i][j] != INT_MAX denotes that cell \r\n // (i, j) can be reached from cell (0, 0) \r\n // and the other half of the condition \r\n // finds the cell on the right that can \r\n // be reached from (i, j) \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (j + columnList.get(j)) < numColumns && (dp[i][j] + 1) \r\n < dp[i][j + columnList.get(j)]\r\n \t\t && columnList.get(j) != 0) \r\n dp[i][j + columnList.get(j)] = dp[i][j] + 1; \r\n \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (i + columnList.get(j)) < numRows && (dp[i][j] + 1) \r\n < dp[i + columnList.get(j)][j] && columnList.get(j) != 0) \r\n dp[i + columnList.get(j)][j] = dp[i][j] + 1; \r\n } \r\n } \r\n \r\n if (dp[m - 1][n - 1] != Integer.MAX_VALUE) \r\n return dp[m - 1][n - 1]; \r\n \r\n return -1; \r\n }", "private int getIndex(int row, int col) {\n return (row - 1) * getSize() + col;\n }", "private int[][] getSquare(int row, int col) {\n int[][] square = new int[3][3];\n\n int rowStart = (row/3)*3;\n int colStart = (col/3)*3;\n\n for (int r = rowStart; r < rowStart + 3; r++) {\n for (int c = colStart; c < colStart + 3; c++) {\n square[r-rowStart][c-colStart] = numbers[r][c];\n }\n }\n\n return square;\n }", "public int getTriangleCount();", "RowCoordinates getRowCoordinates();", "private static void rotateMatrix(int[][] matrix) {\n\n\t\t// Assume: the elements are integer, and are unique values so that the result\n\t\t// can be tested for correctness.\n\t\t// Question: are the dimensions square? i.e. row and column count are the same?\n\t\t// Assume Yes.\n\t\t// Question: Which direction should the array be rotated - Assume clockwise\n\n\t\t// Iterate from counter min to max - 1\n\t\t// Copy top row first cell into a temp variable.\n\t\t// Copy each corner into the next corner. Use temp variable to fill the last\n\t\t// corner\n\t\t// Decrement counter and perform for next set of cells\n\t\t// Repeat for inner layers.\n\n\t\t// Bounding Co-ordinates: matrix[min][min], matrix[min, max], matrix[max, max],\n\t\t// matrix[max, min]\n\t\t// Initially: min = 0, max = N-1 (i.e. 0 based array positions)\n\t\t// pos = min\n\t\t// While pos < max\n\t\t// temp = matrix[min][pos]\n\t\t// matrix[min][pos] = matrix[max - pos + min][min]\n\t\t// matrix[max - pos + min][min] = matrix[max][max - pos + min]\n\t\t// matrix[max][max - pos + min] = matrix[pos][max]\n\t\t// matrix[pos][max] = temp\n\t\t// Increment pos\n\t\t// Increment min and decrement max\n\t\t// Break when min >= max\n\t\t// For even N, the last grid will be a 2 X 2 matrix, for odd N, the last grid\n\t\t// will be a single cell\n\n\t\t// T.C. N/2 iterations of the while loop (for even N)\n\t\t// T.C. = (N - 1) + (N-3) + .. 1\n\t\t// [first calls executes 5 for loops, each N-1 times. last call executes 2*2\n\t\t// matrix. i.e. N-1 = 1]\n\t\t// = (N-1 + N-3 + .. + 1) = (N-1 + N-3 + ... + N-(N-1))\n\t\t// = (N*N/2 - (1 + 3 + .. + N-1))\n\t\t// Sum of n even no.s = n(n+1)\n\t\t// Sum of n odd no.s = N(N+1)/2 - n(n+1). Where N = Max of odd no. + 1\n\t\t// T.C. = (N*N/2 - (N(N+1)/2 - N/2 * (N/2 + 1)))\n\t\t// = ( N*N/2 - (N*N/2 + N/2 - N*N/4 - N/2)) = (N*N/4)\n\t\t// T.C = O(N*N), this is the best possible T.C as each element needs to be\n\t\t// visited once.\n\t\t// S.C. O(1)\n\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tif (matrix.length != matrix[0].length)\n\t\t\tthrow new NotASquareMatrixException(\"Not a square matrix. Cannot be rotated in place.\");\n\n\t\tint min = 0;\n\t\tint max = matrix.length - 1;\n\t\tprint(matrix);\n\n\t\twhile (min < max) {\n\t\t\trotateCellsInALayer(matrix, min, max);\n\t\t\tprint(matrix);\n\t\t\tmin++;\n\t\t\tmax--;\n\t\t}\n\t}", "private int diagonalCount() {\n\t\treturn Math.abs(destRow-curRow) > Math.abs(destCol-curCol) ?\n\t\t\t Math.abs(destCol-curCol) : Math.abs(destRow-curRow);\n\t}", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "public void achoo(){\n for(int i = 0;i<12;i++){\n for(int j = 0;j<12;j++){\n System.out.print(\"\\t\"+(i+1)*(j+1));\n }\n System.out.print(\"\\n\");\n }\n }", "static public char[] backtrace(int list[][])\r\n\t{\r\n\t\tint i = h - 1;\r\n\t\tint j = w - 1;\r\n\t\tint diag,left, up;\r\n\t\t;\r\n\t\tint k = 0;\r\n\t\t// loops through entire table\r\n\t\twhile(i != 0 || j!=0)\r\n\t\t{\n\n // accounts for certain cases where either i or j equals zero before the other one\r\n\t\t\tif(i == 0)\n\t\t\t{\n // left is the only way to go\n\t\t\t diag = -1;\n\t\t\t left = list[i][j-1];\r\n\t\t\t up = -1;\n\t\t\t}\n else if(j == 0)\n \t\t\t{\n // up is the only way to go\n diag = -1;\n\t\t\t left = -1;\n\t\t\t up = list[i-1][j];\r\n\t\t\t}\n else\n {\t\n\t\t\t diag = list[i-1][j-1];\r\n\t\t\t left = list[i][j-1];\r\n\t\t\t up = list[i-1][j];\r\n\r\t\t\t}\n\t\t\t//checks left and up for gaps, otherwise checks up\r\n\t\t\tif(left == (list[i][j] -2))\r\n\t\t\t{\r\n\t\t\t\tdistance+=2; //gap penalty\n\t\t\t\tj = j -1; // stay on same row, move over a column\r\n\t\t\t\tindices[k] = 0;\n\t\t\t\tk++;\r\n\t\t\t}\n // checks up for gaps, otherwise checks diagonal\r\n\t\t\telse if(up == (list[i][j] -2))\r\n\t\t\t{\r\n\t\t\t\tdistance+=2;\n\t\t\t\ti = i -1;\n text3[j] = 0;\n indices[k] = text2[i];\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(list[i][j] != list[i-1][j-1]) //if the diagonal isn't equal, add mismatch penalty\n\t\t\t\t{\n\t\t\t\t\tdistance++;\n\t\t\t\t}\t\n\t\t\t\tindices[k] = text2[i];\r\n\t\t\t\ti = i -1;\r\n\t\t\t\tj = j -1;\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n //System.out.println(\"i: \" + i + \" j: \" + j + \" value: \" + indices[k-1]);\r\n\t\t}\r\n\t\treturn indices;\r\n\t}", "public static void main(String[] args) {\n\t\tint[] w = { 1, 4, 3 };\n\t\tint[] val = { 1500, 3000, 2000 };\n\t\tint m = 4;\n\t\tint n = val.length;\n\t\tint[][] v = new int[n + 1][m + 1];\n\t\tint[][] path = new int[n + 1][m + 1];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i][0] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v[0].length; i++) {\n\t\t\tv[0][i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tfor (int j = 0; j < v[i].length; j++) {\n\t\t\t\tSystem.out.print(v[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tfor (int i = 1; i < v.length; i++) {\n\t\t\tfor (int j = 1; j < v[i].length; j++) {\n\t\t\t\tif(w[i-1]>j) {\n\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t}else {\n\t\t\t\t\tif(v[i-1][j]<val[i-1]+v[i-1][j-w[i-1]]) {\n\t\t\t\t\t\tv[i][j]=val[i-1]+v[i-1][j-w[i-1]];\n\t\t\t\t\t\tpath[i][j]=1;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int[] i:v) {\n\t\t\tSystem.out.println(Arrays.toString(i));\n\t\t}\n\t}", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "protected abstract int[][] getPossiblePositions();", "static void spiral(int m,int n,int a[][])\n {\n int i;\n int k=0,l=0;\n \n while(k<m&&l<n)\n {\n for(i=l;i<n;i++)\n {\n System.out.print(a[k][i]);\n }\n k++;\n \n for(i=k;i<m;i++)\n {\n System.out.print(a[i][n-1]);\n }\n n--;\n \n if(k<m)\n {\n for(i=n-1;i>=l;i--)\n {\n }\n System.out.print(a[m-1][i]);\n }\n m--;\n \n if(l<n)\n {\n for(i=m-1;i>=k;i--)\n {\n System.out.print(a[i][l]);\n i++;\n }\n }\n }\n }" ]
[ "0.64430845", "0.61109823", "0.6053947", "0.58990496", "0.5838145", "0.5835229", "0.57468516", "0.5720281", "0.56146204", "0.5595268", "0.5591149", "0.5554373", "0.55370426", "0.5516098", "0.55032414", "0.5439339", "0.5439247", "0.54380757", "0.5432864", "0.5421607", "0.54183996", "0.53966534", "0.5376521", "0.5357919", "0.5340435", "0.5329258", "0.5322484", "0.5316962", "0.53101397", "0.53060156", "0.53054756", "0.52998906", "0.528711", "0.5286117", "0.52859575", "0.5284665", "0.52715534", "0.52652615", "0.5262046", "0.52573764", "0.52477014", "0.5245829", "0.52373147", "0.5231", "0.5223984", "0.5215649", "0.5214003", "0.5211487", "0.5206822", "0.5195712", "0.5195264", "0.5189556", "0.5186919", "0.5183513", "0.51764107", "0.5175877", "0.51632667", "0.51594716", "0.51585114", "0.5157447", "0.51438594", "0.51437813", "0.5116552", "0.51153624", "0.510086", "0.50999284", "0.5099394", "0.5098139", "0.50971174", "0.50895", "0.50853014", "0.5067564", "0.50662684", "0.50652033", "0.5063332", "0.50514895", "0.5042087", "0.50408596", "0.5038224", "0.503778", "0.5032017", "0.5029627", "0.50258017", "0.50202024", "0.5017048", "0.5015639", "0.5015034", "0.49971566", "0.49839574", "0.49781024", "0.4964617", "0.49645984", "0.49604475", "0.49556953", "0.49550414", "0.49542895", "0.4951515", "0.49489343", "0.4943144", "0.4942515", "0.49418893" ]
0.0
-1
for calculating combination we also require to find the factorial of the number
static int combination(int num1,int num2){ return (fact(num1)/(fact(num2)*fact(num1-num2))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static long combination(int n, int r) {\n if (r > n || n <= 0 || r <= 0) {\n throw new IllegalArgumentException(\"r must be smaller than n and both n and r must be positive ints\");\n }\n long result = 1;\n for (int i = r + 1; i <= n; i++) {\n result = result * i;\n }\n long nMinusRFactorial = factorial(n - r);\n result = result / nMinusRFactorial;\n// System.out.println(\"C(\" + n + \", \" + r + \") = \" + result);\n return result;\n }", "public static int combinationFactorial(int n, int k) {\n\t\treturn fact(n) / (fact(k) * fact(n - k));\n\t}", "public BigInteger calculateCombinations(long n, long r) {\n\t\treturn Factorial.factorial(n).divide(Factorial.factorial(r).multiply(Factorial.factorial(n-r)));\n\t}", "private static Long calculFactorial(Long number) {\n\t\tif (number > 1) {\n\t\t\treturn number * calculFactorial(number - 1);\n\t\t} else {\n\t\t\treturn 1L;\n\t\t}\n\t}", "int factorial(int n){\n return (n==1||n==0)?1: n*factorial(n-1);\n }", "public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\n }", "private static int factorial(int n) {\n if (n == 1 || n == 0)\n return 1;\n else\n return n * factorial(n - 1);\n }", "private static BigInteger getFactorial(int n) {\n BigInteger fact = BigInteger.ONE;\n for (int i = n; i > 1; i--) {\n fact = fact.multiply(new BigInteger(Integer.toString(i)));\n }\n return fact;\n }", "private long factorial(int i) {\n\t\t/*\n\t\t * if the number is greater than 1, then we continue\n\t\t * else we return our results\n\t\t */\n\t\tif(i > 1)\n\t\t\treturn factorial(i -1) * i;\n\t\treturn i;\n\t}", "private static long combinations(int n, int k) {\n\t\tif (k > n / 2) {\n\t\t\tk = n - k;\n\t\t}\n\n\t\tlong result = 1;\n\n\t\tfor (int i = 1, j = n - k + 1; i <= k; i++, j++) {\n\t\t\tresult = result * j / i;\n\t\t}\n\n\t\treturn result;\n\t}", "public int factorial(int num) \n {\n number = num;\n f=1;\n for(i=1; i<=number; i++)\n {\n f=f*i;\n }\n return f;\n }", "public static void combination(int n, int k) {\n\t\tSystem.out.print(n + \" choose \" + k + \" = \");\n\t\ttry {\n\t\t\tif (useFact)\n\t\t\t\tSystem.out.println(combinationFactorial(n, k));\n\t\t\telse\n\t\t\t\tSystem.out.println(combinationRecursive(n, k));\n\t\t} catch (ArithmeticException ex) {\n\t\t\tSystem.out.println(\"LOL!\");\n\t\t}\n\t}", "private static int get_number(int i, int j) { n n!\n// C = _____________\n// r (n-r)! * r!\n//\n return factorial(i)/(factorial(i-j)* factorial(j));\n }", "public long factorial(int num){\r\n long f=1;\r\n for(int i=1;i<=num;i++)\r\n f=f*i;\r\n \r\n if(num>=1) return f;\r\n else if(num==0)return 1;\r\n \r\n return 1;\r\n }", "private double factorial(int n) {\n if (n < 0 || n > 32) {\n return -1;\n }\n return factorials[n];\n }", "private static int factorial(int n) {\n if (n <= 0) {\n return 1;\n }\n\n return n * factorial(n - 1);\n }", "public static long factorial(long number){\n if (number == 0){\n return 1;\n } else {\n// return result;\n return number * factorial(number - 1);\n }\n }", "static int factorial(int n, int c, int d) \n { \n System.out.println(\"Parameter added: \" + c + d);\n int res = 1, i; \n for (i=2; i<=n; i++) \n res *= i; \n return res; \n }", "public static int factorialiterativa(int n){\n if(n>0){\r\n factorialrecursiva(n-1);//LLAMO A LA RECURSIVA\r\n }else {\r\n return 1;\r\n }\r\nreturn factorialrecursiva(n-1);\r\n }", "public static BigInteger calcuateFactorial(int x ){\n BigInteger res=new BigInteger(\"1\");\n for (int i=1;i<=x;i++){\n res=res.multiply(BigInteger.valueOf(i));\n }\n return res;\n\n }", "protected abstract void calculateNextFactor();", "public static String factorial(int n) {\n if(n<0)\n {\n return \"\"+0;\n }\n //int result = (n == 0) ? 1 : (n < 0) ? 0 : n * Integer.parseInt(factorial(n - 1));\n BigDecimal a = BigDecimal.ONE;\n BigDecimal b = BigDecimal.valueOf(n);\n\n while (b.compareTo(BigDecimal.ONE) == 1)\n {\n a = a.multiply(b);\n b = b.subtract(BigDecimal.ONE);\n }\n return \"\"+a;\n }", "public Integer factorial(Integer number){\n int result = 1;\n for (int i =1;i<=number;i++)\n {\n result *= i;\n }\n return result;\n }", "public void FactorialNumber() \r\n\t{\r\n\t\tint i,factNum=1,number;\r\n\t\tSystem.out.println(\"Enter a number\"); \r\n\t\tnumber=sc.nextInt(); //Read the number to calculate factorial\r\n\t\t\r\n\t\tfor(i=1;i<=number;i++)\r\n\t\t{\r\n\t\t\tfactNum = factNum*i;\r\n\t\t}\r\n\t\tSystem.out.println(+factNum);\r\n\t\t\r\n\t}", "public static long computeFactorial(int n) {\n if(n<0 || n > 15) throw new IllegalArgumentException(\"Invalid input. N must be >= 0 \");\n if(n==0 || n==1)\n return 1;\n //ddieu kien dung cua de quy \n //song sot den lenh cho nayf thi n chac chan roi vao 2.......15\n return n*computeFactorial(n-1); // n*(n-1)\n \n }", "private static int combinationRecursive(int n, int k) {\n\t\tif (k == 0 || n == k) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn (int)(n/(double)k) * combinationRecursive(n-1, k-1);\n\t\t}\n\t}", "public double findFactorial(double num) \r\n\t{ \r\n\t if (num == 0) \r\n\t return 1; \r\n\t return num * findFactorial(num - 1); \r\n\t}", "public Integer factorial(Integer number){\n int fact = 1;\n for (int i = number; i > 0; i--){\n fact *=i;\n }\n return fact;\n }", "static long factorialLoop(int n) {\r\n if (n == 0 || n == 1) {\r\n return 1;\r\n }\r\n int accum = 1;\r\n for(int i=n; i>0; i--) {\r\n accum *= i;\r\n }\r\n return accum;\r\n }", "public static BigInteger Combinations(BigInteger target, BigInteger total){\n if(target.equals(BigInteger.ZERO)){\n return BigInteger.ONE;\n }\n else if(total.equals(target)){\n return BigInteger.ONE;\n }else{\n return Combinations(target.subtract(BigInteger.ONE), \n total.subtract(BigInteger.ONE)).add(Combinations(target, total.subtract(BigInteger.ONE)));\n }\n }", "public long factorial(int n)\n\t{\n\t\tint product = 1;\n\n\t\tfor (int i = n; i >= 1; i--)\n\t\t{\n\t\t\tproduct *= i;\n\t\t}\n\n\t\treturn product;\n\t}", "public static long factorial(int n){\n long fact=1;\n for(int i=1;i<=n;i++){\n fact=(fact*i);\n }\n return fact;\n }", "public BigInteger calculatePermutations(long n, long k) {\n\t\treturn Factorial.factorial(n).divide(Factorial.factorial(n-k));\n\t}", "private static int factorial(int num) {\n /**\n * validation\n */\n if (num < 0) {\n throw new IllegalArgumentException(\"num is invalid\");\n }\n\n /**\n * base case\n */\n if (num == 0) {\n return 1;\n }\n\n /**\n * recursive case\n */\n\n return num * factorial(num - 1);\n }", "private static int iterrativeFactorial(int value) {\n int result = 1;\n for (int i = value; i > 0; i--) {\n result = result * i;\n }\n return result;\n }", "public static int factorial(int n){\n if(n <= 1){\n return 1;\n }\n else{\n return n*factorial(n-1);\n }\n }", "protected static int calcCombinations(int total, int selects){\n\t\t\n\t\tint combinations = 1; \n\t\tfor(int i=0; i<selects; i++)\n\t\t\tcombinations *= (total-i);\t\n\t\tfor(int i=1; i<=selects; i++)\n\t\t\tcombinations /= i; \n\t\treturn combinations ; \n\t}", "public int factorial(int n) {\n\t\tif(n<0 || n>Integer.MAX_VALUE)\n\t\t\treturn (int) Double.NaN;\n\t\t\n\t\tint fact=1; \n\t\tfor(int i=1;i<=n;i++){ \n\t\t fact=fact*i; \n\t\t} \n\t\treturn fact;\n\t}", "static int comb(int big, int smal) \n\t{ \n\t\treturn (int) ((long) fact[big] * invfact[smal] % mod \n\t\t\t\t* invfact[big - smal] % mod); \n\t}", "private static int fact(int n) {\n\t\tint prod = 1;\n\t\tfor (int i = 1; i <= n; prod *= i++)\n\t\t\t;\n\t\treturn prod;\n\t}", "public void addTotalNumberOfCombinations(int nr);", "public Factorial(int number) {\n\t\tthis.number = number;\n\t}", "public static double factorial(long n){\n\tdouble fac = 1;\n\tif(n <= 0) return fac;\n\tfor (int i=1; i<=n; i++) fac *= i;\n\treturn fac;\n }", "public static int factorial(int n) {\n int res = 0;\n if (n == 0) res = 1;\n if (n > 0) res = n*factorial(n-1);\n return res;\n }", "public static long factorial(int num)\n {\n if (num >= 1) {\n System.out.println(\"before num = \" + num);\n return factorial(num - 1) * num;\n\n }\n else\n return 1;\n }", "private double factorial(double x) {\r\n double fact=1;\r\n for (double i = x; i > 0; i=i-1) {\r\n fact = fact*i;\r\n }\r\n if(((int)x)!=x) {\r\n fact=fact*SQRTPI;\r\n }\r\n return fact;\r\n }", "public static BigInteger factorial(BigInteger num){\n if(num.equals(BigInteger.ZERO)){\n return BigInteger.ONE;\n }else{\n BigInteger nMin = factorial(num.subtract(BigInteger.ONE));\n return num.multiply(nMin);\n }\n }", "private static void jieCheng(int number){\n int result = 1;\n for (int i = 1; i < number; i++) {\n result = result * (i+1);\n }\n System.out.println(result);\n }", "static int count(int a, int b, int n) \n\t{ \n\t\t\n\t\t// function call to pre-calculate the \n\t\t// factorials and modInverse of factorials \n\t\tpregenFact(); \n\t\tpregenInverse(); \n\n\t\t// if a and b are same \n\t\tif (a == b) \n\t\t{ \n\t\t\treturn (check(a * n, a, b)); \n\t\t} \n\n\t\tint ans = 0; \n\t\tfor (int i = 0; i <= n; ++i) \n\t\t{ \n\t\t\tif (check(i * a + (n - i) * b, a, b) == 1) \n\t\t\t{ \n\t\t\t\tans = (ans + comb(n, i)) % mod; \n\t\t\t} \n\t\t} \n\t\treturn ans; \n\t}", "public void factorialNumber(int fact){\n int i = 1;\n long factorial = 1;\n while(i <= fact)\n {\n factorial *= i;\n i++;\n System.out.print(factorial+\" \");\n }\n System.out.println();\n System.out.printf(\"Factorial of %d = %d\", fact, factorial);\n }", "private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) {\n if (temp.size() == k) {\n\n if (currentSum == target)\n response.add(new ArrayList<>(temp));\n\n\n return;\n }\n\n if (i == candidates.length)\n return;\n\n\n //1. Our choices: We can choose a number from the list any number of times and all the numbers\n for (int s = i; s < candidates.length; s++) {\n\n //if this element is greater than target, then adding it to current sum make bigger than target\n //since,elements are sorted, then all the element after this element are > target\n if (candidates[s] > target)\n break;\n\n //Our constraints : We can't go beyond target, we can take more element than available in array\n if (currentSum + candidates[s] <= target) {\n currentSum += candidates[s];\n temp.add(candidates[s]);\n\n combinationSum3(candidates, k, s + 1, currentSum, target, response, temp);\n\n //backtrack\n temp.remove(temp.size() - 1);\n currentSum -= candidates[s];\n }\n }\n\n }", "public static double factorial(int fact) {\r\n\t\t\t\r\n\t\t\tdouble aux=1;\r\n\t\t\t\r\n\t\t\tfor(int i=2; i<=fact;i++) {\r\n\t\t\t\t\r\n\t\t\t\taux*=i;\r\n\t\t\t}\r\n\t\t\treturn aux;\r\n\t\t}", "static int fact(int n)\n\n {\n\n int res = 1;\n\n for (int i = 2; i <= n; i++)\n\n res = res * i;\n\n return res;\n\n }", "public static int factorial(int n) {\n\t\tif(n == 0 || n == 1) \n\t\t\treturn 1;\n\t\t\n\t\treturn n * factorial(n - 1);\n\t}", "public static int combinationCounter(int n) {\r\n int hasil = n * (n - 1) / 2;\r\n return hasil;\r\n }", "private void helper(String num, StringBuilder resBld, int s, long target, long factor, List<String> res) {\n int len = num.length(), preLen = resBld.length();\n // iterate over all possible ends of first number\n for(int i = s; i <= len - 2; i ++) {\n // Note: type: avoid leading zero in the expression\n if(i > s && num.charAt(s) == '0') break;\n long val = Long.parseLong(num.substring(s, i + 1));\n resBld.append(num.charAt(i));\n \n resBld.append('*');\n helper(num, resBld, i + 1, target, factor * val, res);\n resBld.deleteCharAt(resBld.length() - 1); \n\n // Note: '-' only takes effect on the first number, so we treat it as a -1 factor \n // to the first number\n resBld.append('-');\n helper(num, resBld, i + 1, target - factor * val, -1, res);\n resBld.deleteCharAt(resBld.length() - 1); \n \n resBld.append('+');\n helper(num, resBld, i + 1, target - factor * val, 1, res);\n resBld.deleteCharAt(resBld.length() - 1);\n }\n // NOTE: type: conservative ending\n // avoid s exceeds length of num in the following iterations\n resBld.append(num.charAt(len - 1));\n // avoid leading zero\n if((num.charAt(s) != '0' || s == len - 1) && factor * Long.parseLong(num.substring(s, len)) == target)\n res.add(resBld.toString());\n resBld.setLength(preLen);\n }", "static long factorialRecurse(int n) {\r\n if (n == 0 || n == 1) {\r\n return 1;\r\n }\r\n return factorialRecurse(n - 1) * n;\r\n }", "public static void main(String[] args) {\n int product = 1;\n int[] factors = new int[max]; //The position in the array represents the actual factor, the number at that position is the number of occurrences of that factor\n\n for (int i = 2; i < max + 1; i++) { //Checking divisibility by numbers 2-20 inclusive.\n int temp = i;\n for (int j = 2; j < max; j++) { //Checking to see if the number can be represented with current factors in the factors array\n int numOfFactor = factors[j]; //Don't want to change the actual value in the array so we make a copy\n\n while (temp % j == 0 && temp >= j) { //While j, the current factor in the array, is a factor of i and i is smaller than j then divide by j and increment its occurrence in the factors array\n if (numOfFactor > 0) //If j is in the array of factors \"use it\" and decrement the counter for it\n numOfFactor--;\n else //otherwise if the factor doesn't exist in the array add it by incrementing value at the position\n factors[j]++;\n temp /= j; //No matter what, if temp had a factor, it gets smaller\n }\n if (temp < j)\n break; //Don't bother checking the rest of the array since larger numbers can't go into a smaller one...\n }\n }\n\n for (int i = 2; i < max; i++) { //Find the product of all the factors\n if (factors[i] > 0) {\n for (int j = factors[i]; j > 0; j--) { //If there are factors at position j, multiply them!\n product *= i;\n }\n }\n }\n System.out.println(product);\n\n }", "public long getFactorial() \r\n\t// method body, part of method declaration after the method header\r\n\t{ \r\n\t\treturn factorial;\r\n\t}", "private int bruteForce(int num, int i, int j) {\n int totalDigits = 0;\n int n = num;\n while (n > 0) {\n n = n / 10;\n totalDigits++;\n }\n if (i > totalDigits || j > totalDigits) return num;\n\n int ans = 0;\n int count = 0;\n int factor = 1;\n int iFactor = 1;\n int jFactor = 1;\n int iDigit = 0;\n int jDigit = 0;\n while (num > 0) {\n int digit = num % 10;\n count++;\n if (totalDigits - count + 1 == j) {\n jDigit = digit;\n jFactor = factor;\n } else if (totalDigits - count + 1 == i) {\n iDigit = digit;\n iFactor = factor;\n } else {\n ans += digit * factor;\n }\n factor *= 10;\n num = num / 10;\n }\n ans += iDigit * jFactor;\n ans += jDigit * iFactor;\n\n return ans;\n }", "public static void main(String[] args) {\n TargetSumCombination obj = new TargetSumCombination();\n int nums[] = {1,1,1};\n int res[] = new int[nums.length];\n obj.giveCombinations(nums, res, 0);\n System.out.println(\"-----------------\");\n obj.giveCombinations1(nums, res, 0);\n }", "public static long factorial(long n) {\n if (n==1)\n return n;\n else\n return (n*factorial(n-1));\n }", "public static long factorial(int num){\n\n if(num < 0){\n throw new UnsupportedOperationException(Util.NEGATIVE_MESSAGE);\n }\n long result = 1;\n\n if(num == 0)\n return result;\n\n else{\n while(num > 0){\n result = result * num ;\n num --;\n }\n }\n\n return result;\n }", "public static long factorialUsingRecursion (int num){\n\n if(num < 0){\n throw new UnsupportedOperationException(Util.NEGATIVE_MESSAGE);\n }\n\n if(num == 0)\n return 1;\n\n return num*factorialUsingRecursion(num-1);\n\n }", "private int calc(int x, int n, int i, int sum) {\n int ways = 0;\n\n // Calling power of 'i' raised to 'n'\n int p = (int) Math.pow(i, n);\n while (p + sum < x) {\n // Recursively check all greater values of i\n ways += calc(x, n, i + 1,\n p + sum);\n i++;\n p = (int) Math.pow(i, n);\n }\n\n // If sum of powers is equal to x\n // then increase the value of result.\n if (p + sum == x)\n ways++;\n\n // Return the final result\n return ways;\n }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "public static int factorial(int n) \n\t{\n\t\t\n\t\tif(n<=1) \n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\treturn n*factorial(n-1);\n\t}", "public static Inatnum factorial(int n) throws Exception{\n Inatnum res = new zeronatnum().succ(); // we need to initialize res which is set as a nonzero natural number\n Inatnum dis = new zeronatnum(); for(int i=n;i>=1;i--) {dis=dis.succ();} // dis is initialized as a new non zero natural number and \n Inatnum res1 = res; Inatnum dis1 = dis; //new versions of res and dis are initiated\n while(dis1.getVal()>0) { \n res1 = res1.multiply(dis1); dis1=dis1.pred();\n }Inatnum newone = new zeronatnum(); \n while(newone.getVal()!= res1.getVal()) {\n newone = newone.succ(); // initiated newone which is the successor of newone\n }return newone; // returns newone once the loop ends\n }", "public List<List<Integer>> combinationSum3(int k, int n) {\n List<List<Integer>> res = new ArrayList<>();\n int min = 0, max = 0;\n for (int i = 1; i <= k; i++) {\n min += i;\n max += (10 - i);\n }\n if (n > max || n < min) return res;\n List<Integer> list = new ArrayList<>();\n dfs(k, n, res, list, 1);\n return res;\n }", "static BigInteger fact(int n)\n {\n BigInteger res = BigInteger.ONE;\n for (int i = 2; i <= n; i++)\n res = res.multiply(BigInteger.valueOf(i));\n return res;\n }", "public static void m5(String[] args) {\n int number = 6;\r\n int fact = 1;\r\n for(int i = 1; i <= number; i++)\r\n {\r\n fact = fact * i;\r\n System.out.println(\"n=\"+fact);\r\n main2.gen(fact);\r\n \r\n }\r\n System.out.println(\"Factorial of \"+number+\" is: \"+fact);\r\n }", "public static void main(String [] args){\n int q ;\n int a;\n int b;\n int n;\n int i =0;\n int sum;\n \n \n Scanner input = new Scanner (System.in);\n \n q = input.nextInt();\n while (i < q ){\n a = input.nextInt();\n b = input.nextInt();\n n = input.nextInt();\n sum = (int) (a + b*Math.pow(2, 0));\n for (int j =0 ; j <= (n-1) ; j++){\n sum = (int) (sum + b*Math.pow(2, j+1));\n System.out.print(sum + \" \");\n }\n \n i++; \n }\n }", "public String run() {\r\n\t// divisorSum[n] is the sum of all the proper divisors of n\r\n int divisorSum[]= new int[LIMIT+1];\r\n for(int i=1;i<=LIMIT;i++)\r\n {\r\n for(int j=i+i;j<=LIMIT;j+=i)\r\n divisorSum[j]+=i;\r\n }\r\n // Analyze the amicable chain length for each number in ascending order\r\n int maxChainLen=0;\r\n int minChainElem=-1;\r\n for(int i=0;i<=LIMIT;i++){\r\n Set<Integer> visited=new HashSet<>();\r\n for(int count=1,cur=i;;count++){\r\n visited.add(cur);\r\n int next=divisorSum[cur];\r\n if(next==i)\r\n {\r\n if(count>maxChainLen){\r\n minChainElem=i;\r\n maxChainLen=count;\r\n \r\n }\r\n break;\r\n }\r\n // Exceeds limit or not a chain (a rho shape instead)\r\n else if(next>LIMIT || visited.contains(next))\r\n break;\r\n else\r\n cur=next;\r\n }\r\n }\r\n return Integer.toString(minChainElem);\r\n }", "public static void extraLongFactorials(int n) {\r\n BigInteger fact = BigInteger.valueOf(1);\r\n for (int i = 1; i <= n; i++) {\r\n fact = fact.multiply(BigInteger.valueOf(i));\r\n }\r\n System.out.println(fact);\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"enter a number: \");\n\t\t\n\t\tint n = 10; //scan.nextInt();\n\t\tint fact=1;\n\t\tint i=1;\n\t\twhile(i<=n) {\n\t\t\t\n\t\t\tfact = fact*i;\n\t\t\ti++;\n\t\t}\n\t\t\t\tSystem.out.println(\"factorial of \"+n+ \" is: \"+fact);\n\t\t\n\t\t//method2\n\t\tint fact1=1;\n\t\t\n\t\tfor(int k=1;k<=n;k++) {\n\t\t\tfact1 = fact1*k;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"factorial of \"+n+ \" is: \"+fact1);\n\t}", "public String calculateFactorial(int number) throws OutOfRangeException{\n\t\tif(number < 1)\r\n\t\t\tthrow new OutOfRangeException(\"Number cannot be less than 1\");\r\n\t\tif(number > 1000)\r\n\t\t\tthrow new OutOfRangeException(\"Number cannot be greater than 1000\");\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t//If the number is less than 20, we can use long variable to store the result \r\n\t\tif(number < 20) {\r\n\t\t\t\r\n\t\t\tlong factorial = 1;\r\n\t\t for(int i = number; i >= 1; i--)\r\n\t\t \tfactorial = factorial * i;\r\n\t\t String factorialToString = Long.toString(factorial);\r\n\t\t \t \r\n\t\t \treturn factorialToString;\r\n\t\t}\r\n\t\t\r\n\t\t//If the number is greater than 20 then Arrays will be used for calculation\r\n\t\t//The calculated result will be converted to a String value before returning\r\n\t\t//TO further extend the number range linked list can be used instead of an array.\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tint numberArray[] = new int[10000]; \r\n\t\t\tnumberArray[0] = 1; \r\n\t int numberArraySize = 1; \r\n\r\n\t for (int i = 2; i <= number; i++) {\r\n\t \tint carry = 0; \r\n\t for (int j = 0; j < numberArraySize; j++) { \r\n\t int prod = numberArray[j] * i + carry; \r\n\t numberArray[j] = prod % 10;\r\n\t carry = prod/10; \r\n\t } \r\n\t \r\n\t while (carry!=0) { \t\r\n\t \tnumberArray[numberArraySize] = carry % 10; \r\n\t carry = carry / 10; \r\n\t numberArraySize++; \r\n\t } \r\n\t }\r\n\t \r\n\t String factorialToString = \"\";\r\n\t for (int i = numberArraySize - 1; i >= 0; i--) \r\n\t \tfactorialToString += numberArray[i]; \r\n\t \r\n\t return factorialToString;\r\n\t\t}\r\n }", "int catalan(int n) { \n int res = 0; \n \n // Base case \n if (n <= 1) { \n return 1; \n } \n for (int i = 0; i < n; i++) { \n res += catalan(i) * catalan(n - i - 1); \n } \n return res; \n }", "@Test\r\n\tpublic void test01_fact() {\r\n\t\tRecursiveMethods rm = new RecursiveMethods();\r\n\t\tassertEquals(1, rm.factorial(0));\r\n\t\tassertEquals(1, rm.factorial(1));\r\n\t\tassertEquals(2, rm.factorial(2));\r\n\t\tassertEquals(6, rm.factorial(3));\r\n\t\tassertEquals(24, rm.factorial(4));\r\n\t\tassertEquals(120, rm.factorial(5));\r\n\t}", "public static double factorial(double n) {\r\n if (n <= 1)\r\n return 1;\r\n else\r\n return n * factorial(n - 1);\r\n }", "void sumProd(int n) {\n\t\tdouble sum = 0.0;//C1\n\t\tdouble prod = 1.0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\t{ if (i%2 == 0) sum += i;\n\t\t\tprod = prod * i;\n\t\t\tUtil.foo(sum, prod); }}", "public double faktorial(double num){\n if (num<0) {\n System.out.println(\"bilangan tidak benar\");\n return 0;\n }\n if(num==0||num==1)return 1;\n return perkalian(num, faktorial(num-1));\n }", "private void getCombination(Set<Integer> set, int n, int r)\n {\n // A temporary array to store all combination\n // one by one\n int data[] = new int[r];\n\n // Print all combination using temprary\n // array 'data[]\n Integer[] setArray = new Integer[set.size()];\n set.toArray(setArray);\n\n combinationUtil(setArray, n, r, 0, data, 0);\n //System.out.println();\n }", "private static int calculate(int limit) {\n\t\tPrimeGenerator primeGenerator = new PrimeGenerator((int) Math.floor(Math.sqrt(limit)) + 10);\n\n\t\t// BitSet is used to set a given number/index if it can be produced as p1^2 + p2^3 + p4^4\n\t\t// because there are numbers that can be produced more than once\n\t\tBitSet numbers = new BitSet(limit);\n\t\tnumbers.set(0, limit, false);\n\n\t\tList<Integer> list = primeGenerator.getPrimeList();\n\n\t\tfor (int a : list) {\n\t\t\tint powera = a * a;\n\t\t\tsearchB: for (int b : list) {\n\t\t\t\tint powerb = b * b * b;\n\t\t\t\tif (powera + powerb > limit) {\n\t\t\t\t\tbreak searchB;\n\t\t\t\t}\n\n\t\t\t\tsearchC: for (int c : list) {\n\t\t\t\t\tint powerc = c * c * c * c;\n\t\t\t\t\tint sum = powera + powerb + powerc;\n\t\t\t\t\tif (sum > limit) {\n\t\t\t\t\t\tbreak searchC;\n\t\t\t\t\t}\n\t\t\t\t\t// Set the index - the number is passed\n\t\t\t\t\tnumbers.set(sum);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set the number of set bit - the solution\n\t\treturn numbers.cardinality();\n\t}", "private int run() {\r\n int[] num = new int[13];\r\n boolean IsRun = false;\r\n int count = 0, index=0, combination=1;\r\n for (String aCard : Card) {\r\n switch (aCard.substring(0, 1)) {\r\n case \"A\":\r\n num[0]++;\r\n continue;\r\n case \"2\":\r\n num[1]++;\r\n continue;\r\n case \"3\":\r\n num[2]++;\r\n continue;\r\n case \"4\":\r\n num[3]++;\r\n continue;\r\n case \"5\":\r\n num[4]++;\r\n continue;\r\n case \"6\":\r\n num[5]++;\r\n continue;\r\n case \"7\":\r\n num[6]++;\r\n continue;\r\n case \"8\":\r\n num[7]++;\r\n continue;\r\n case \"9\":\r\n num[8]++;\r\n continue;\r\n case \"T\":\r\n num[9]++;\r\n continue;\r\n case \"J\":\r\n num[10]++;\r\n continue;\r\n case \"Q\":\r\n num[11]++;\r\n continue;\r\n case \"K\":\r\n num[12]++;\r\n }\r\n }\r\n\r\n for (int i = 1; i < 14; i++) {\r\n if (num[i-1]!=0){\r\n count++;\r\n index=i-1;\r\n }\r\n if (count>=3){\r\n IsRun=true;\r\n }\r\n if (i<13) {\r\n if (num[i] == 0 && IsRun) { //if there is a run already, break the recursion if the next num doesn't exist.\r\n break;\r\n }\r\n if (num[i] == 0 && !IsRun) {\r\n count = 0;\r\n index = 0;\r\n }\r\n }\r\n }\r\n\r\n if (IsRun){\r\n for (int i = index-count+1; i < index+1; i++) {\r\n combination*=num[i];\r\n }\r\n return combination*count;\r\n }\r\n return 0;\r\n }", "int catalanDP(int n) {\n int[] catalan = new int[n+1]; \n \n // Initialize first two values in table \n catalan[0] = catalan[1] = 1; \n\n // Fill entries in catalan[] using recursive formula \n for (int i=2; i<=n; i++) { \n catalan[i] = 0; \n for (int j=0; j<i; j++) \n catalan[i] += catalan[j] * catalan[i-j-1]; \n } \n \n // Return last entry \n return catalan[n]; \n }", "@Override\n public int generateNumber(int n) {\n if (n == 0) {\n return 0;\n } else if (n == 1) {\n return 1;\n } else {\n // We need the following nums to do the calculation by themselves\n int num1 = 0;\n int num2 = 1;\n int num3 = 0;\n // Starting from i = 1 is because we have done the first two in num1 and num2\n for (int i = 1; i < n; i++) {\n num3 = num1 + num2;\n num1 = num2;\n num2 = num3;\n }\n return num3;\n }\n }", "public static int getProduct(int b, int n1, int n2){\n int r1=0,pow=1,res1=0,res=0,carry=0,sum=0;\n while(n1 !=0)\n {\n r1=n1%10;\n n1/=10;\n res1=multiply(r1,n2,b,pow);\n res=SumAnybase(res1,res,b);\n pow=pow*10;\n }\n return res;\n }", "public void combineTwo(int n, int k) {\n // init first combination\n LinkedList<Integer> nums = new LinkedList<Integer>();\n for(int i = 1; i < k + 1; ++i)\n nums.add(i);\n nums.add(n + 1); //add as a sentinel\n\n List<List<Integer>> output = new ArrayList<>();\n int j = 0;\n //the while loop breaks when you have processed the first k combinations\n while (j < k) {\n // add current combination\n output.add(new LinkedList(nums.subList(0, k)));\n //\n // if nums[j] + 1 == nums[j + 1] increase nums[j] by one\n // the loop breaks when nums[j] + 1 != nums[j + 1]\n j = 0;\n while ((j < k) && (nums.get(j + 1) == nums.get(j) + 1))\n nums.set(j, j++ + 1);\n nums.set(j, nums.get(j) + 1); //increment the number at jth index\n }\n this.possibleCombinations = output;\n }", "public static int factorial(int n) {\n //Base case\n /* Strictly, checking if n < 1 is enough, however\n ** checking for 1 as well saves a recursion.\n */\n if(n <= 1)\n return 1;\n return n * factorial(n - 1);\n }", "public static double factorial(double n) {\n if (n > 1) {\n return n * factorial(n - 1);\n } else {\n return 1;\n }\n }", "int main()\n{\n int i,j,n,a=0,b=1,c;\n cin>>n;\n for(i=3;i<=n;i++)\n {\n c=a+b;\n a=b;\n b=c;\n }\n cout<<c;\n}", "public String solve(long n, long a, long b, long c, long d, long x0, long y0, long m)\n {\n long[] count = new long[9];\n long x = x0;\n long y = y0;\n for (long t = 0; t < n; t++)\n {\n// System.out.println(x + \", \" + y);\n int i = (int) (x % 3) * 3 + (int) (y % 3);\n count[i]++;\n x = (a * x + b) % m;\n y = (c * y + d) % m;\n }\n\n long totalCount = 0;\n for (int i1 = 0; i1 < 9; i1++)\n {\n long count1 = count[i1];\n if (count1 == 0)\n {\n continue;\n }\n count[i1]--;\n for (int i2 = i1; i2 < 9; i2++)\n {\n long count2 = count[i2];\n if (count2 == 0)\n {\n continue;\n }\n count[i2]--;\n int x1 = i1 / 3;\n int y1 = i1 % 3;\n int x2 = i2 / 3;\n int y2 = i2 % 3;\n int x3 = (3 - (x1 + x2) % 3) % 3;\n int y3 = (3 - (y1 + y2) % 3) % 3;\n int i3 = (x3 % 3) * 3 + (y3 % 3);\n long count3 = count[i3];\n if (i3 >= i2 && count3 > 0)\n {\n // either i1==i2==i3 OR i1!=i2!=i3; you can never have only two i's the same.\n if (i1 == i2 && i2 == i3)\n {\n totalCount += calcCombinations(count1);//the first count value is the genuine count for that x,y coordinate.\n }\n else\n {\n totalCount += count1 * count2 * count3;\n }\n }\n count[i2]++;\n }\n count[i1]++;\n }\n\n return String.valueOf(totalCount);\n }", "public static String factorial(int n) {\n if (n < 0)\n return \"0\";\n else if (n == 0)\n return \"1\";\n else {\n //см. import java.math.BigDecimal\n //Начальное значение fac = 1!\n BigDecimal fac = BigDecimal.valueOf(1);\n //далее через цикл вычисляем fac = n!\n for (; n > 1 ; n--)\n fac = fac.multiply(BigDecimal.valueOf(n));\n\n //преобразуем в строку и вовзвращаем\n return fac.toString();\n }\n }", "public static BigInteger factorial(BigInteger num) {\n\t\tif(num.equals(new BigInteger(\"1\"))) {\n\t\t\treturn new BigInteger(\"1\");\n\t\t}\n\t\telse {\n\t\t\treturn num.multiply(factorial(\n\t\t\t\t\tnum.subtract(new BigInteger(\"1\"))));\n\t\t}\n\t}", "public static void main(String args[]) {\n\t\tBigDecimal start = new BigDecimal(\"2658455991569831744654692615953842176\");\n//\t\tBigDecimal start = new BigDecimal(\"8128\");\n//\t\tBigDecimal dd = start.divide(next, 0);\n//\t\tSystem.out.println(dd);\n\t\t\n\t\tList<BigDecimal> fs = new PerfectNumber().factor2(start, 10, null);\n\t\tBigDecimal multiply = new BigDecimal(1);\n\t\tBigDecimal sum = new BigDecimal(0);\n\t\tfor (BigDecimal d : fs) {\n\t\t\tSystem.out.println(d);\n\t\t\tmultiply = multiply.multiply(d);\n\t\t\tsum = sum.add(d);\n\t\t}\n\t\tSystem.out.println(\"sum = \" + sum);\n\t\tSystem.out.println(\"multiply = \" + multiply);\n\t}", "public static BigInteger factorial(int value) {\n BigInteger res = BigInteger.ONE;\n for(int i = 2; i <= value; i++) {\n res = res.multiply(BigInteger.valueOf(i));\n }\n return res;\n }", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }", "int fact(int n) {\n if (n <= 1)\n return 1;\n else\n return n * fact(n-1);\n}", "public static void main(String[] args) {\n int fact = 1; //Starting factorial\n for(int i = 1; i <= maxFactorial;i++) //Iterates over all desired factorials\n {\n fact = fact * (i); //Takes previous ( and starting) factorial and multiplies by current increment\n System.out.println(\"Factorial of \" + i + \" is \" +fact); //Prints output of each factorial\n }\n }", "private void initializeFactorials() {\n //Lets fill up to 33!\n factorials = new double[33];\n factorials[0] = 1.0;\n factorials[1] = 1.0;\n factorials[2] = 2.0;\n factorials[3] = 6.0;\n factorials[4] = 24.0;\n factorials[5] = 120.0;\n factorials[6] = 720.0;\n factorials[7] = 5040.0;\n factorials[8] = 40320.0;\n factorials[9] = 362880.0;\n factorials[10] = 3628800.0;\n factorials[11] = 39916800.0;\n factorials[12] = 479001600.0;\n factorials[13] = 6227020800.0;\n factorials[14] = 87178291200.0;\n factorials[15] = 1307674368000.0;\n factorials[16] = 20922789888000.0;\n factorials[17] = 355687428096000.0;\n factorials[18] = 6402373705728000.0;\n factorials[19] = 121645100408832000.0;\n factorials[20] = 2432902008176640000.0;\n factorials[21] = 51090942171709440000.0;\n factorials[22] = 1124000727777607680000.0;\n factorials[23] = 25852016738884976640000.0;\n factorials[24] = 620448401733239439360000.0;\n factorials[25] = 15511210043330985984000000.0;\n factorials[26] = 403291461126605635584000000.0;\n factorials[27] = 10888869450418352160768000000.0;\n factorials[28] = 304888344611713860501504000000.0;\n factorials[29] = 8841761993739701954543616000000.0;\n factorials[30] = 265252859812191058636308480000000.0;\n factorials[31] = 8222838654177922817725562880000000.0;\n factorials[32] = 263130836933693530167218012160000000.0;\n\n }" ]
[ "0.71773446", "0.7112603", "0.66488916", "0.66196054", "0.6559582", "0.6555226", "0.65267646", "0.6502151", "0.6496097", "0.64819866", "0.64625573", "0.6438988", "0.64336574", "0.6429415", "0.6422822", "0.6419243", "0.64184946", "0.6413616", "0.64073026", "0.6403782", "0.63883245", "0.6368954", "0.63336235", "0.63122576", "0.6306315", "0.6302572", "0.6264735", "0.62646085", "0.6258041", "0.6219578", "0.62152594", "0.62069887", "0.61508524", "0.6150079", "0.6149931", "0.61448365", "0.6140789", "0.6110786", "0.61091", "0.6086768", "0.6072468", "0.6071977", "0.6038635", "0.6022615", "0.602192", "0.6016002", "0.6010956", "0.5977452", "0.59762686", "0.59760725", "0.59663314", "0.59513736", "0.5944365", "0.5933066", "0.59287065", "0.59262687", "0.59086514", "0.5908319", "0.5904408", "0.58854914", "0.5884186", "0.58565664", "0.5848993", "0.5838332", "0.58336014", "0.5827472", "0.5825368", "0.58021504", "0.5786928", "0.5784002", "0.5770366", "0.57670134", "0.57575893", "0.5752082", "0.5746907", "0.5732587", "0.5722224", "0.5705993", "0.57023233", "0.5699373", "0.5692625", "0.5688896", "0.56876165", "0.5672218", "0.56697416", "0.5665586", "0.5662881", "0.56614923", "0.56611645", "0.565648", "0.56517446", "0.5638989", "0.56318575", "0.5628088", "0.5626715", "0.56250465", "0.5621401", "0.56187224", "0.56152385", "0.5612932" ]
0.7447205
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof AreaCiudad)) { return false; } AreaCiudad other = (AreaCiudad) object; if ((this.areaciudadPK == null && other.areaciudadPK != null) || (this.areaciudadPK != null && !this.areaciudadPK.equals(other.areaciudadPK))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
to retrieve list of task working on a project
public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Task> getTaskdetails();", "TaskList getList();", "List<Task> getAllTasks();", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public List<TaskDescription> getActiveTasks();", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "Set<Task> getAllTasks();", "java.util.List<String>\n getTaskIdList();", "public Collection<Task> getTasksProject(String projectName) {\n\t\tCollection<Task> tasks = new ArrayList<Task>();\n\t\tfor(Task item : m_Tasks){\n\t\t\tif(item.project.equals(projectName)) tasks.add(item);\n\t\t}\n\t\tif(tasks.size() == 0) return null;\n\t\treturn tasks;\n\t}", "@OneToMany(mappedBy=\"project\", fetch=FetchType.EAGER)\n\t@Fetch(FetchMode.SUBSELECT)\n\t@JsonIgnore\n\tpublic List<Task> getTasks() {\n\t\treturn this.tasks;\n\t}", "ObservableList<Task> getTaskList();", "public List<Project> getAllProjects();", "public List<String> getWorkingProject(String id, String string) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tString query=null;\n\t\tjdbc JDBC=new jdbc();\n\t\t\n\t\tif(string.equals(\"projects\"))\n\t\t query=\"select P_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"startdate\"))\n\t\t query=\"select startDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"duedate\"))\n\t\t query=\"select DueDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"supervisor\"))\n\t\t query=\"select emp_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\ttry {\n\t\t\tSystem.out.println(query);\n\t\t\tResultSet rs=JDBC.stat.executeQuery(query);\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tlist.add(rs.getString(1));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public List<Task> listTasks(String extra);", "@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}", "public abstract List<ProjectBean> getProjectList();", "public List<WTask> getTaskList(){return taskList;}", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "@GetMapping(\"/getsubtasks/{projectId}/{taskId}\")\n\tpublic List<Subtask> getAllSubtasksProj(@PathVariable (value = \"projectId\") Long projectId, @PathVariable (value = \"taskId\") Long taskId)\n\t{\n\t\tSystem.out.println(\"yes\");\n\t\treturn this.integrationClient.getAllSubtasksProj(projectId, taskId);\n\t}", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }", "void getAllProjectList(int id);", "List<Work> getAllWorks();", "public List<Task> getToDoList()\r\n {\r\n return toDoList;\r\n }", "ObservableList<Task> getCurrentUserTaskList();", "List<Workflow> findByIdTask( int nIdTask );", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "public abstract SystemTask getTask(Project project);", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public void listTasks() {\n try {\n File file = new File(filePath);\n Scanner sc = new Scanner(file);\n Ui.viewTasks();\n while (sc.hasNextLine()) {\n System.out.println(sc.nextLine());\n }\n } catch (FileNotFoundException e) {\n Ui.printFileNotFound();\n }\n }", "public List<TempWTask> getTaskList(){return taskList;}", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "public String getTasks() {\n StringJoiner result = new StringJoiner(\"\\n\");\n for (int i = 0; i < tasks.size(); i++) {\n Task t = tasks.get(i);\n result.add(String.format(\"%d.%s\", i + 1, t));\n }\n\n return result.toString();\n }", "Set<Task> getDependentTasks();", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public void listAllTasks() {\n System.out.println(LINEBAR);\n if (tasks.taskIndex == 0) {\n ui.printNoItemInList();\n System.out.println(LINEBAR);\n return;\n }\n\n int taskNumber = 1;\n for (Task t : tasks.TaskList) {\n System.out.println(taskNumber + \". \" + t);\n taskNumber++;\n }\n System.out.println(LINEBAR);\n }", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "public List<File> getTasks() {\n return tasks;\n }", "WorkingTask getWorkingTask();", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();", "public ArrayList<Task> list() {\r\n return tasks;\r\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public ArrayList<Task> getTaskList() {\n return tasks;\n }", "public ArrayList<Task> getList() {\n return tasks;\n }", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "private List<SubTask> getSubTasks(TaskDTO taskDTO) {\n List<SubTask> subTasks = new ArrayList<>();\n if (taskDTO.getSubTasksDto() == null) return subTasks;\n for (SubTaskDTO s: taskDTO.getSubTasksDto()) {\n SubTask subTask = new SubTask();\n subTask.setId(s.getId());\n subTask.setSubTitle(s.getSubTitle());\n subTask.setSubDescription(s.getSubDescription());\n subTasks.add(subTask);\n }\n return subTasks;\n }", "public List<Task> getTasks() {\n return this.tasks;\n }", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "private List<Task> tasks2Present(){\n List<Task> tasks = this.taskRepository.findAll();\n// de taken verwijderen waar user eerder op reageerde\n tasks2React(tasks);\n// taken op alfabetische volgorde zetten\n sortTasks(tasks);\n// opgeschoonde lijst aan handler geven\n return tasks;\n }", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "@RequestMapping(value=\"/tasks\", method = RequestMethod.GET)\npublic @ResponseBody List<Task> tasks(){\n\treturn (List<Task>) taskrepository.findAll();\n}", "public List<Issue> getUserProjectActiveIssue(User user, Project project);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "List<Project> getProjectsWithChanges(List<Project> projects);", "public ArrayList<Task> getVisibleTasks() {\n ArrayList<Task> visibleTasks = new ArrayList<>();\n forAllTasks(new Consumer(visibleTasks) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$TaskStackContainers$rQnI0Y8R9ptQ09cGHwbCHDiG2FY */\n private final /* synthetic */ ArrayList f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.TaskStackContainers.lambda$getVisibleTasks$0(this.f$0, (Task) obj);\n }\n });\n return visibleTasks;\n }", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "@Override\n\tpublic List<TaskKeeper> getList() {\n\t\treturn (List<TaskKeeper>) taskKeeperRepositories.findAll();\n\t}", "public abstract List<Container> getContainers(TaskType t);", "@GetMapping(value = \"/getProjectDetails/ongoing\")\n\tpublic List<Project> getOngoingProjects()\n\t{\n\t\treturn integrationClient.getOngoingProjects();\n\t}", "public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}", "public ArrayList<Task> getTaskList() {\n\t\treturn tasks;\n\t}", "public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }", "public static List<Task> findAllRunningTasks() {\r\n List<Task> outTasks = new ArrayList<Task>();\r\n List<ITask> iTasks = findAllTasks(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n\r\n for (ITask iTask : iTasks) {\r\n outTasks.add(convertITaskToTask(iTask));\r\n }\r\n return outTasks;\r\n }", "private static Task[] createTaskList() {\n\t\t\n\t Task evalTask = new EvaluationTask();\n\t Task tamperTask = new TamperTask();\n\t Task newDocTask = new NewDocumentTask();\n\t Task reportTask = new AssignmentReportTask();\n\n\t Task[] taskList = {evalTask, tamperTask, newDocTask, reportTask};\n\n\t return taskList;\n\t}", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public List<Item> getActiveTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item where status = 0\").list();\n session.close();\n return list;\n }", "List<WorkingSchedule> getAll();", "List <ProjectAssignment> findAssignmentsByProject (int projectId);", "public CommandResult execute() {\n String message = tasks.listTasks(keyWord);\n return new CommandResult(message);\n }", "public int getTasks() {\r\n return tasks;\r\n }", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}" ]
[ "0.7649699", "0.7470262", "0.7335929", "0.73258513", "0.73258513", "0.73186", "0.7274052", "0.725192", "0.7235154", "0.7100048", "0.6975644", "0.694558", "0.69365215", "0.693612", "0.689695", "0.68938243", "0.68925625", "0.6809896", "0.68085444", "0.68033504", "0.6802152", "0.6774567", "0.6769816", "0.6764855", "0.6758535", "0.6745169", "0.6745153", "0.6739612", "0.6699448", "0.6658821", "0.6657068", "0.6654504", "0.6628792", "0.65990174", "0.6592814", "0.65830266", "0.6580209", "0.6556936", "0.6539189", "0.6533846", "0.6524565", "0.6518546", "0.65167683", "0.6493874", "0.6491244", "0.64904904", "0.64711374", "0.6455696", "0.6449674", "0.64074254", "0.6406536", "0.6394809", "0.6394065", "0.6378246", "0.6328845", "0.63238186", "0.63219357", "0.6320654", "0.63041466", "0.6290248", "0.62751925", "0.6274162", "0.6274162", "0.6274162", "0.6274099", "0.62647456", "0.62620103", "0.62573576", "0.6255908", "0.62553173", "0.6253", "0.624778", "0.6241783", "0.6238284", "0.6231519", "0.6228187", "0.62208676", "0.62171793", "0.6209927", "0.62001413", "0.6186058", "0.6166468", "0.6163896", "0.6151105", "0.61482036", "0.6141874", "0.6133748", "0.61294353", "0.6128071", "0.6122995", "0.61171186", "0.6116017", "0.6111848", "0.610726", "0.6106618", "0.610325", "0.6099251", "0.60950375", "0.60860777", "0.6081929" ]
0.7742111
0
retrieve last TaskId of project by retrieving last Created Task Of Project
public String retrieveLastTaskIdOfProject(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getLatestTaskId() {\n\n int id = 0;\n try {\n List<Task> list = Task.listAll(Task.class);\n int size = list.size();\n Task task = list.get(size - 1);\n id = task.getTaskId();\n\n } catch (Exception e) {\n id=0;\n }\n return id;\n\n }", "public int getMaxIdTask()\n {\n SQLiteDatabase db = this.getReadableDatabase();\n \n String query = \"SELECT MAX(id) AS max_id FROM \" + TASK_TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n int id = 0; \n if (cursor.moveToFirst())\n {\n do\n { \n id = cursor.getInt(0); \n } while(cursor.moveToNext()); \n }\n \n return id;\n }", "Object getTaskId();", "String getTaskId();", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "java.lang.String getProjectId();", "public Task getTask(Integer tid);", "public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }", "int getReprojectedEtoId(String project, DataDate date) throws SQLException;", "@Override\n\tpublic StudyTaskInfo getLastInfoByLogId(Integer studyLogId)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\tstDao = (StudyTaskDao) DaoFactory.instance(null).getDao(Constants.DAO_STUDY_TASK_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn stDao.getLastInfoByLogId(sess, studyLogId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"获取最后一次的任务记录列表时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "int getReprojectedTrmmId(String project, DataDate date) throws SQLException;", "Task selectByPrimaryKey(String taskid);", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "private long getInsertedTaskId(long userId, LocalDateTime creationTime) throws SQLException, DaoException {\n PreparedStatement preparedStatement = selectInsertedTaskPreparedStatement;\n preparedStatement.setLong(1, userId);\n preparedStatement.setString(2, creationTime.toString());\n\n ResultSet resultSet = preparedStatement.executeQuery();\n if (!resultSet.next()) {\n throw new DaoException(\"Can't retrieve inserted task. Update failed\");\n }\n\n return resultSet.getLong(\"id\");\n }", "String getTaskId(int index);", "_task selectByPrimaryKey(Integer taskid);", "public int getNewProjectUniqueId() {\r\n\t\treturn lastProjectUniqueID +1;\r\n\t}", "public int getTaskId() {\n return taskId;\n }", "public abstract SystemTask getTask(Project project);", "public TaskOccurrence getLastAppendedOccurrence(ReadOnlyTask task) {\n int listLen = task.getTaskDateComponent().size();\n TaskOccurrence toReturn = task.getTaskDateComponent().get(listLen - INDEX_OFFSET);\n toReturn.setTaskReferrence((Task) task);\n return toReturn;\n }", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public int getTaskId() {\n return mTaskId;\n }", "public Task getTask() {\n Long __key = this.TaskId;\n if (task__resolvedKey == null || !task__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n TaskDao targetDao = daoSession.getTaskDao();\n Task taskNew = targetDao.load(__key);\n synchronized (this) {\n task = taskNew;\n \ttask__resolvedKey = __key;\n }\n }\n return task;\n }", "public Integer getProjectID() { return projectID; }", "@Nullable\n public Task getTask(int id) {\n Task output = null;\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return null;\n\n // run the query to get the matching task\n Cursor rawTask = db.rawQuery(\"SELECT * FROM Tasks WHERE id = ? ORDER BY due_date ASC;\", new String[]{String.valueOf(id)});\n\n // move the cursor to the first result, if one exists\n if (rawTask.moveToFirst()) {\n // convert the cursor to a task and assign it to our output\n output = new Task(rawTask);\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTask.close();\n db.close();\n\n // return the (possibly null) output\n return output;\n }", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "List<Workflow> findByIdTask( int nIdTask );", "public int getTaskID() {\n\t\treturn taskID;\n\t}", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef retrieve(Long task_id) {\n return TaskDefIntegrationService.find(task_id);\n }", "public java.lang.Object getTaskID() {\n return taskID;\n }", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "public int getCustTask()\n\t{\n\t\treturn task;\n\t}", "public Integer getTaskId() {\n return taskId;\n }", "public Integer getTaskId() {\n return taskId;\n }", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public JSONObject getLastProjectCommitRecord(int pgId) {\n String sql = \"SELECT * from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE pgId = ?));\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }", "public Task getTask(Long row_num) {\n List<Task> taskList = new ArrayList<Task>();\n Task result = new Task();\n Integer r = row_num.intValue();\n taskList = getAllTasks();\n result = taskList.get(r);\n return result;\n }", "int getTask() {\n return task;\n }", "public Project getProject(Long projectId);", "protected String getTaskId() {\n\t\tDisplay.debug(\"getTaskId() devuelve %s\", taskId);\n\t\treturn taskId;\n\t}", "public Integer getTaskId() {\n\t\treturn this.taskId;\n\t}", "public String getTargetTaskID() {\n\t\treturn this.targetTaskId;\n\t}", "public int getProjectID() {\n return projectID;\n }", "int getReprojectedModisId(String project, DataDate date) throws SQLException;", "public String getTaskId() {\n return this.taskId;\n }", "public String getOrginTaskID() {\n\t\treturn orginTaskID;\n\t}", "public String getTaskId(){\r\n\t\treturn this.taskId;\r\n\t}", "public Task getTask(int index) {\n return taskList.get(index - 1);\n }", "public long getProjectId() {\r\n return projectId;\r\n }", "public CachedTask getLastCachedTask() {\n return cachedTasks.pop();\n }", "@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}", "@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }", "net.zyuiop.ovhapi.api.objects.license.Task getServiceNameTasksTaskId(java.lang.String serviceName, long taskId) throws java.io.IOException;", "public TaskDetails getSpecificTask (int position){\n return taskList.get(position);\n }", "public int getProjectId()\r\n\t{\r\n\t\treturn projectId;\r\n\t}", "@Override\r\n\tpublic ExecuteTask get(int memberId,int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_member_id = ? AND er_task_id = ?\";\r\n\t\treturn get(sql,memberId,taskId);\r\n\t}", "public String getTaskId(int index) {\n return taskId_.get(index);\n }", "public synchronized String getLastPostId() {\n try {\n this.connect();\n Post lastPost = linkedin.groupOperations().getGroupDetails(groupId).getPosts().getPosts().get(0);\n return lastPost.getId();\n } catch (Exception e) {\n log.debug(\"An exception occured when reading id of the last inserted post from group: \" + groupId);\n }\n return null;\n }", "TbCrmTask selectByPrimaryKey(Long id);", "public TaskSummary getTask(Long taskId){\n TaskServiceSession taskSession = null;\n try {\n taskSession = jtaTaskService.createSession();\n Task taskObj = taskSession.getTask(taskId);\n TaskSummary tSummary = new TaskSummary();\n tSummary.setActivationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setActualOwner(taskObj.getTaskData().getActualOwner());\n tSummary.setCreatedBy(taskObj.getTaskData().getCreatedBy());\n tSummary.setCreatedOn(taskObj.getTaskData().getCreatedOn());\n tSummary.setDescription(taskObj.getDescriptions().get(0).getText());\n tSummary.setExpirationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setId(taskObj.getId());\n tSummary.setName(taskObj.getNames().get(0).getText());\n tSummary.setPriority(taskObj.getPriority());\n tSummary.setProcessId(taskObj.getTaskData().getProcessId());\n tSummary.setProcessInstanceId(taskObj.getTaskData().getProcessInstanceId());\n tSummary.setStatus(taskObj.getTaskData().getStatus());\n tSummary.setSubject(taskObj.getSubjects().get(0).getText());\n return tSummary;\n }catch(RuntimeException x) {\n throw x;\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "@ApiModelProperty(\n example = \"00000000-0000-0000-0000-000000000000\",\n value =\n \"Identifier of the project, that the task (which the time entry is logged against)\"\n + \" belongs to.\")\n /**\n * Identifier of the project, that the task (which the time entry is logged against) belongs to.\n *\n * @return projectId UUID\n */\n public UUID getProjectId() {\n return projectId;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public static String GetLastOpenedProject() {\n\t\tString lastOpenedProjectPath = \"\";\n\t\tif (applicationSettingsFile != null) {\n\t\t\t// Get all \"files\"\n\t\t\tNodeList lastProject = applicationSettingsFile.getDocumentElement().getElementsByTagName(\"lastProject\");\n\t\t\t// Handle result\n\t\t\tif (lastProject.getLength() > 0) {\n\t\t\t\tlastOpenedProjectPath = Utilities.getXmlNodeAttribute(lastProject.item(0), \"value\");\n\t\t\t}\n\t\t}\n\t\treturn lastOpenedProjectPath;\n\t}", "public Integer getProjectId() {\n return projectId;\n }", "public String getTaskId(int index) {\n return taskId_.get(index);\n }", "public String getTaskId() {\n return taskId;\n }", "public String getTaskId() {\n return taskId;\n }", "private Task getTask(Integer identifier) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(identifier)) {\n return nextTask;\n }\n }\n\n return null;\n }", "public Task getTask(int taskNumber) {\n assert taskNumber <= getNumTasks() && taskNumber > 0 : \"Task number should be valid\";\n return tasks.get(taskNumber - 1);\n }", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "@Override\n public String toString() {\n return \"Task no \"+id ;\n }", "public ArrayList<String> findTaskID(String title) {\n DataManager.getTasks getTask = new DataManager.getTasks(getActivity());\n ArrayList<String> queryList = new ArrayList<>();\n ArrayList<Task> taskList = new ArrayList<>();\n\n // Fetch the task from the server with a given title\n queryList.clear();\n queryList.add(\"or\");\n queryList.add(\"title\");\n queryList.add(title);\n\n try {\n getTask.execute(queryList);\n taskList = getTask.get();\n }\n catch (Exception e) {\n Log.e(\"Task ID Error\", \"Error getting Task ID from server\");\n e.printStackTrace();;\n assertTrue(Boolean.FALSE);\n }\n\n // If we got a task back, return it's ID to the caller, else report the error\n if (!taskList.isEmpty()) {\n queryList.clear();\n queryList.add(taskList.get(0).getID());\n }\n\n return queryList;\n }", "int getEtaId(String project, DataDate date) throws SQLException;", "com.google.protobuf.ByteString\n getTaskIdBytes();", "public int getTaskIndex() {\n return (Integer) commandData.get(CommandProperties.TASK_ID);\n }", "private String getTaskName() {\n \n \t\treturn this.environment.getTaskName() + \" (\" + (this.environment.getIndexInSubtaskGroup() + 1) + \"/\"\n \t\t\t+ this.environment.getCurrentNumberOfSubtasks() + \")\";\n \t}", "public static ITask findTaskById(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n ITask t = null;\r\n try {\r\n TaskQuery query = TaskQuery.create().where().taskId().isEqual(taskId);\r\n t = Ivy.wf().getGlobalContext().getTaskQueryExecutor().getResults(query).get(0);\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return t;\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "public Number getProjectId() {\n return (Number) getAttributeInternal(PROJECTID);\n }", "@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}", "public String getTask(int position) {\n HashMap<String, String> map = list.get(position);\n return map.get(TASK_COLUMN);\n }", "public static ITask findWorkOnTaskById(long taskId) {\r\n Ivy ivy = Ivy.getInstance();\r\n IPropertyFilter<TaskProperty> taskFilter =\r\n ivy.session.getWorkflowContext().createTaskPropertyFilter(TaskProperty.ID, RelationalOperator.EQUAL, taskId);\r\n IQueryResult<ITask> queryResult =\r\n ivy.session.findWorkTasks(taskFilter, null, 0, 1, true,\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED));\r\n List<ITask> tasks = queryResult.getResultList();\r\n if (tasks != null && tasks.size() > 0) {\r\n return tasks.get(0);\r\n }\r\n return null;\r\n }", "public Integer getProjectId() {\n return projectId;\n }", "public Integer getProjectId() {\n return projectId;\n }", "public Task getTask(int index) {\n return records.get(index);\n }", "List<Task> getTaskdetails();", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "public long getDirectProjectId() {\r\n return directProjectId;\r\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "Project selectByPrimaryKey(Long id);", "void getProjectByID(Integer projectID, AsyncCallback<Project> callback);", "Task getAggregatedTask();", "private synchronized Task taskGet() {\n\t\treturn this.taskList.remove();\n\t}", "public Long getProjectId() {\n return projectId;\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "public java.lang.String getTaskId() {\n return taskId;\n }", "@Transient\n @JsonProperty(\"project\")\n public Long getProjectId() {\n if (project == null) {\n return 0L;\n } else {\n return project.getId();\n }\n }", "protected Integer getIdProject() {\n\n return (Integer) getExtraData().get(ProcessListener.EXTRA_DATA_IDPROJECT);\n }" ]
[ "0.70781183", "0.66442746", "0.65028906", "0.6353877", "0.63534135", "0.63471997", "0.63441855", "0.63149923", "0.61697596", "0.61537826", "0.6153234", "0.612132", "0.6079509", "0.60182184", "0.60047966", "0.5999905", "0.5996039", "0.5987078", "0.59753615", "0.5937658", "0.5929717", "0.5912669", "0.5909764", "0.5895801", "0.5870776", "0.5867055", "0.58599705", "0.5844225", "0.5839967", "0.58252406", "0.5817493", "0.5815521", "0.57941794", "0.5784391", "0.5778519", "0.5778519", "0.5774007", "0.57492024", "0.57318556", "0.57254755", "0.5720851", "0.5709599", "0.56996274", "0.56933635", "0.5690789", "0.5671359", "0.5658953", "0.56579274", "0.56216735", "0.5613847", "0.5607535", "0.5600608", "0.55879843", "0.5587149", "0.5585276", "0.5583043", "0.55819255", "0.5562436", "0.55319744", "0.55298704", "0.552659", "0.5525187", "0.5513242", "0.55122864", "0.55056876", "0.55005443", "0.547739", "0.5473625", "0.5473625", "0.54728734", "0.54669917", "0.5461158", "0.5452994", "0.5452068", "0.5448544", "0.54465014", "0.5443626", "0.54434264", "0.5442718", "0.5436681", "0.54276896", "0.5419", "0.5413295", "0.5406622", "0.5406622", "0.5402346", "0.53970504", "0.53940773", "0.5393181", "0.5392578", "0.5392578", "0.5392338", "0.5379877", "0.5370031", "0.5353893", "0.535186", "0.53483504", "0.53483504", "0.5343126", "0.5338732" ]
0.79903084
0
retrieveTaskByUserId method returns instance of class TaskMaster by searching Id
public List<TaskMaster> retrieveAllTaskByUserId(Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public Task getTask(Integer tid);", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "public List<Task> getAllTasksForUser(long userId);", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "Task selectByPrimaryKey(String taskid);", "public static ITask findTaskById(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n ITask t = null;\r\n try {\r\n TaskQuery query = TaskQuery.create().where().taskId().isEqual(taskId);\r\n t = Ivy.wf().getGlobalContext().getTaskQueryExecutor().getResults(query).get(0);\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return t;\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "@Nullable\n public Task getTask(int id) {\n Task output = null;\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return null;\n\n // run the query to get the matching task\n Cursor rawTask = db.rawQuery(\"SELECT * FROM Tasks WHERE id = ? ORDER BY due_date ASC;\", new String[]{String.valueOf(id)});\n\n // move the cursor to the first result, if one exists\n if (rawTask.moveToFirst()) {\n // convert the cursor to a task and assign it to our output\n output = new Task(rawTask);\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTask.close();\n db.close();\n\n // return the (possibly null) output\n return output;\n }", "public static List<Task> findByUser(String userID){\n return null;\n }", "@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "@Override\n public Optional<Task> getTaskById(UUID id)\n {\n return null;\n }", "public Task getTask() {\n Long __key = this.TaskId;\n if (task__resolvedKey == null || !task__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n TaskDao targetDao = daoSession.getTaskDao();\n Task taskNew = targetDao.load(__key);\n synchronized (this) {\n task = taskNew;\n \ttask__resolvedKey = __key;\n }\n }\n return task;\n }", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "private Task getTask(Integer identifier) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(identifier)) {\n return nextTask;\n }\n }\n\n return null;\n }", "public Task getTaskById(Long id ) {\n\t\treturn taskRepo.getOne(id);\n\t}", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);", "public static Task fetchByPrimaryKey(long taskId) {\n\t\treturn getPersistence().fetchByPrimaryKey(taskId);\n\t}", "_task selectByPrimaryKey(Integer taskid);", "public User getUser(Long id) throws ToDoListException;", "@Override\n\tpublic Teatask getById(int taskid)\n\t{\n\t\treturn teataskMapper.getById(taskid);\n\t}", "TbCrmTask selectByPrimaryKey(Long id);", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "List<Workflow> findByIdTask( int nIdTask );", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "User selectByPrimaryKey(Long userId);", "public java.util.List<Todo> findByUserId(long userId);", "@Override\n public TaskInstance getByTaskInstanceId(Integer taskInstanceId) {\n TaskInstance taskInstance = taskInstanceCache.get(taskInstanceId);\n if (taskInstance == null){\n taskInstance = processService.findTaskInstanceById(taskInstanceId);\n taskInstanceCache.put(taskInstanceId,taskInstance);\n }\n return taskInstance;\n }", "public Cursor fetchUserTaskByUserIdTaskId(long taskid,long userid) throws SQLException {\r\n\r\n\t\t Cursor mCursor =\r\n\r\n\t\t database.query(true,MySQLHelper.TABLE_USER_TASK , allColumns, MySQLHelper.COLUMN_USERTASKTASKFID + \"=\" + taskid\r\n\t\t \t\t+ \" AND \" + MySQLHelper.COLUMN_USERTASKUSERFID + \"=\" + userid , null,\r\n\t\t null, null, null, null);\r\n\t\t if (mCursor != null) {\r\n\t\t mCursor.moveToFirst();\r\n\t\t }\r\n\t\t return mCursor;\r\n\r\n\t\t }", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "@Override\r\n\tpublic void getById(String userId) {\n\t\t\r\n\t}", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "Userinfo selectByPrimaryKey(String userId);", "public static ITask findTaskUserHasPermissionToSee(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n try {\r\n TaskQuery taskQuery1 = TaskQuery.create().where().taskId().isEqual(taskId);\r\n TaskQuery taskQuery2 = TaskQuery.create().where().currentUserIsInvolved();\r\n IUser user = Ivy.session().getSessionUser();\r\n if (user == null) {\r\n return null;\r\n }\r\n for (IRole role : user.getRoles()) {\r\n taskQuery2 = taskQuery2.where().or().roleIsInvolved(role);\r\n }\r\n return Ivy.wf().getTaskQueryExecutor().getFirstResult(taskQuery1.where().and(taskQuery2));\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "TrackerTasks getTrackerTasks(final Integer id);", "Object getTaskId();", "public Task getTask(final int id) {\n return tasks.get(id);\n }", "@Override\r\n\tpublic ExecuteTask get(int memberId,int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_member_id = ? AND er_task_id = ?\";\r\n\t\treturn get(sql,memberId,taskId);\r\n\t}", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "public User getUser(Long userId);", "public User getUserById(Long userId);", "public static ITask findWorkOnTaskById(long taskId) {\r\n Ivy ivy = Ivy.getInstance();\r\n IPropertyFilter<TaskProperty> taskFilter =\r\n ivy.session.getWorkflowContext().createTaskPropertyFilter(TaskProperty.ID, RelationalOperator.EQUAL, taskId);\r\n IQueryResult<ITask> queryResult =\r\n ivy.session.findWorkTasks(taskFilter, null, 0, 1, true,\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED));\r\n List<ITask> tasks = queryResult.getResultList();\r\n if (tasks != null && tasks.size() > 0) {\r\n return tasks.get(0);\r\n }\r\n return null;\r\n }", "public Task getTask(Long row_num) {\n List<Task> taskList = new ArrayList<Task>();\n Task result = new Task();\n Integer r = row_num.intValue();\n taskList = getAllTasks();\n result = taskList.get(r);\n return result;\n }", "public TaskDetails getSpecificTask (int position){\n return taskList.get(position);\n }", "TrackerTasks loadTrackerTasks(final Integer id);", "User getUser(String userId);", "BaseUser selectByPrimaryKey(String userId);", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public User getUserById(int userId) {\n return this.userDao.selectByPrimaryKey(userId); \r\n }", "T getById(Long id);", "SysUser selectByPrimaryKey(Long userId);", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "@Override\n\tpublic DetailedTask selectTask(int id) throws SQLException, ClassNotFoundException\n\t{\n\t\t DetailedTask returnValue = null;\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectTask)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task WHERE id=\"+id+\";\" );\n\t rs.next();\n\n\t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t returnValue = new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class),\n\t \t\t rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\"));\n\t \n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t return returnValue;\n\t}", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "public Todo fetchByPrimaryKey(long todoId);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef retrieve(Long task_id) {\n return TaskDefIntegrationService.find(task_id);\n }", "@Override\n public User getUser(String userId){\n return userDAO.getUser(userId);\n }", "public User getRegUserFromId(int userId){\n for (int i = 0; i < regUsers.size(); i++){\n if (regUsers.get(i).getUserId() == userId){\n return regUsers.get(i);\n }\n }\n\n return null;\n }", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public List<TaskMaster> retrieveTaskByMilestoneId(Long milestoneId);", "@RequestMapping(value = \"/tasks/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<TaskDTO> getTask(@PathVariable Long id) {\n log.debug(\"REST request to get Task : {}\", id);\n TaskDTO taskDTO = taskService.findOne(id);\n return Optional.ofNullable(taskDTO)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "User findUser(String userId);", "@Override\r\n\tpublic User1 getById(int userId) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\treturn (User1) session.get(User1.class, userId);\r\n\t}", "public User getUserFromId(int userId){\n for (int i = 0; i < regUsers.size(); i++){\n if (regUsers.get(i).getUserId() == userId){\n return regUsers.get(i);\n }\n }\n\n for (int i = 0; i < adminUsers.size(); i++){\n if (adminUsers.get(i).getUserId() == userId){\n return adminUsers.get(i);\n }\n }\n return null;\n }", "public Task getTaskById(int id) {\n\t\t\n\t\tfor(Task task: tasks) {\n\t\t\tif(task.getId()==id)\n\t\t\t\treturn task;\n\t\t}\n\t\t\t\n\t\tthrow new NoSuchElementException(\"Invalid Id:\"+id);\n\t}", "User selectByPrimaryKey(String id);", "User getUser(Long id);", "User selectByPrimaryKey(Long id);", "@Override\r\n\tpublic UsersSearch getUserSearchRecordById(long userId) {\n\t\treturn usersSearchDAO.getUserSearchRecordById(userId);\r\n\t}", "RegsatUser selectByPrimaryKey(Long userId);", "User get(Key id);", "T get(PK id);", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "T getById(PK id);", "@Override\n\tpublic User findById(int userid) {\n\t\tSystem.out.println(\"Inside findOne of UserService\");\n\t\tOptional<User> user = userdao.findById(userid);\n//\t\treturn dao.findById(id);\n\t\treturn user.get();\n\t}", "public TaskSummary getTask(Long taskId){\n TaskServiceSession taskSession = null;\n try {\n taskSession = jtaTaskService.createSession();\n Task taskObj = taskSession.getTask(taskId);\n TaskSummary tSummary = new TaskSummary();\n tSummary.setActivationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setActualOwner(taskObj.getTaskData().getActualOwner());\n tSummary.setCreatedBy(taskObj.getTaskData().getCreatedBy());\n tSummary.setCreatedOn(taskObj.getTaskData().getCreatedOn());\n tSummary.setDescription(taskObj.getDescriptions().get(0).getText());\n tSummary.setExpirationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setId(taskObj.getId());\n tSummary.setName(taskObj.getNames().get(0).getText());\n tSummary.setPriority(taskObj.getPriority());\n tSummary.setProcessId(taskObj.getTaskData().getProcessId());\n tSummary.setProcessInstanceId(taskObj.getTaskData().getProcessInstanceId());\n tSummary.setStatus(taskObj.getTaskData().getStatus());\n tSummary.setSubject(taskObj.getSubjects().get(0).getText());\n return tSummary;\n }catch(RuntimeException x) {\n throw x;\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "E getExistingById(IApplicationUser user, ID id);", "@GetMapping(\"/tasks/{id}\")\n public ResponseEntity<Task> getTaskById(@PathVariable Long id){\n Task task = taskRepository.findById(id)\n .orElseThrow(() -> new ResourceNotFoundException(\"Task not found with Id of \" + id));\n return ResponseEntity.ok(task);\n }", "T getById(int id);", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "@Repository\npublic interface TaskRepository extends JpaRepository<Tasks,Integer>\n{\n Tasks findByUid(int uid);\n}", "User get(int userId) throws UserNotFoundException, SQLException;", "public UserEntity findByPrimaryKey(String userId) throws FinderException;", "@Override\r\n\tpublic List<ExecuteTask> getByMember(int memberId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ?\";\r\n\t\treturn getForList(sql,memberId);\r\n\t}", "UserActivity findUserActivityByUserId(int userId) throws DataNotFoundException;", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "User selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic UserMain findId(String id) {\n\t\treturn (UserMain) usermaindao.findbyId(id).get(0);\r\n\t}", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "public User findById(int userId);", "public MobileTaskAssignment getByOrder(String orderId) {\r\n\t\treturn (MobileTaskAssignment) sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.orderId = :orderId\")\r\n\t\t\t\t\t.setString(\"orderId\", orderId)\r\n\t\t\t\t\t.uniqueResult();\r\n\t}", "WbUser selectByPrimaryKey(Integer userId);" ]
[ "0.73205423", "0.7046871", "0.7004654", "0.68384343", "0.6811953", "0.6774464", "0.6714313", "0.67076766", "0.6606194", "0.6566857", "0.6558633", "0.65033144", "0.6464087", "0.6442999", "0.6433979", "0.6431357", "0.64184463", "0.6398524", "0.63661885", "0.6350579", "0.63106066", "0.63003355", "0.6285237", "0.6273987", "0.62684923", "0.62547845", "0.6239246", "0.62229365", "0.61599225", "0.61541855", "0.61471176", "0.6144457", "0.6136914", "0.6130218", "0.6127877", "0.60920334", "0.6088054", "0.60792595", "0.60587513", "0.6050248", "0.60487497", "0.60431737", "0.6003477", "0.59972525", "0.59579843", "0.5950088", "0.59451", "0.5941864", "0.5929913", "0.5918544", "0.59147036", "0.5905211", "0.5901992", "0.5901165", "0.5887519", "0.58840436", "0.58781993", "0.5873877", "0.5869287", "0.5863283", "0.58614534", "0.5856879", "0.584408", "0.5839763", "0.5828598", "0.5826013", "0.58188874", "0.58099616", "0.5807486", "0.57999915", "0.57966554", "0.579039", "0.57861656", "0.57619184", "0.57604295", "0.5748176", "0.5745419", "0.5744626", "0.5743211", "0.57428944", "0.5734943", "0.57331234", "0.571576", "0.57129496", "0.571202", "0.5700634", "0.56840235", "0.56816906", "0.5677959", "0.56726074", "0.56719524", "0.56719524", "0.56719524", "0.56719524", "0.56719524", "0.56709063", "0.56594324", "0.5630713", "0.5628569", "0.56271887" ]
0.7571379
0
retrieveAllTaskByUserIdAndProjectId method returns instance of class TaskMaster by searching userId & projectId
public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public List<Task> getAllTasksForUser(long userId);", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "List<Task> getAllTasks();", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "public static List<Task> findByUser(String userID){\n return null;\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "Set<Task> getAllTasks();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveTaskByMilestoneId(Long milestoneId);", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "Task selectByPrimaryKey(String taskid);", "List<Task> getTaskdetails();", "List<Workflow> findByIdTask( int nIdTask );", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public java.util.List<Todo> findByUserId(long userId);", "@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "@Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "UserOperateProject selectByPrimaryKey(String userOperateProjectId);", "void getAllProjectList(int id, UserType userType);", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "ObservableList<Task> getCurrentUserTaskList();", "public static Recordset findtasks(final TaskQuery taskQuery) {\r\n try {\r\n return ServerFactory.getServer().getSecurityManager().executeAsSystem(new Callable<Recordset>() {\r\n public Recordset call() throws Exception {\r\n return Ivy.wf().getTaskQueryExecutor().getRecordset(taskQuery);\r\n }\r\n });\r\n\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return null;\r\n }", "TrackerTasks getTrackerTasks(final Integer id);", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "_task selectByPrimaryKey(Integer taskid);", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "@GetMapping(\"/getsubtasks/{projectId}/{taskId}\")\n\tpublic List<Subtask> getAllSubtasksProj(@PathVariable (value = \"projectId\") Long projectId, @PathVariable (value = \"taskId\") Long taskId)\n\t{\n\t\tSystem.out.println(\"yes\");\n\t\treturn this.integrationClient.getAllSubtasksProj(projectId, taskId);\n\t}", "TaskList getList();", "@GET(\"pomodorotasks/todo\")\n Call<List<PomodoroTask>> pomodorotasksTodoGet(\n @Query(\"user\") String user\n );", "public Task getTask(Integer tid);", "public java.util.List<Todo> findByUserIdGroupId(long userId, long groupId);", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "@Repository\npublic interface TaskRepository extends JpaRepository<Tasks,Integer>\n{\n Tasks findByUid(int uid);\n}", "void getAllProjectList(int id);", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public Map<String, Object> queryTaskGroupById(User loginUser, Integer id) {\n Map<String, Object> result = new HashMap<>();\n if (isNotAdmin(loginUser, result)) {\n return result;\n }\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n result.put(Constants.DATA_LIST, taskGroup);\n putMsg(result, Status.SUCCESS);\n return result;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMember(int memberId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ?\";\r\n\t\treturn getForList(sql,memberId);\r\n\t}", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "TbCrmTask selectByPrimaryKey(Long id);", "public java.util.List<Todo> findByUserId(long userId, int start, int end);", "public List<Project> findProjectByEmpId(String employeeId) {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT P.`PROJECT_ID`,PROJECT_NAME,MANAGER_ID FROM TA_PROJECTS P JOIN TA_EMPLOYEE_PROJECT E ON E.`PROJECT_ID` = P.`PROJECT_ID`\"\r\n\t\t\t\t+ \" WHERE EMPLOYEE_ID='\" + employeeId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "List<Project> findProjectsOfAccount(String username);", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public List<String> finddetails(long id ) {\n id=id-1;\n Log.d(SimpleTodoActivity.APP_TAG, \"findspecific triggered with ID----->\"+id);\n List<String> tasks = new ArrayList<String>();\n\n try{\n String query = \"SELECT * FROM \"+TABLE_NAME+\" WHERE id=\" + id +\";\";\n\n Cursor c = storage.rawQuery(query, null);\n if (c.moveToFirst()){\n do{\n String title = c.getString(c.getColumnIndex(KEY_TITLE));\n String description = c.getString(c.getColumnIndex(KEY_DESCRIPTION));\n String priority=c.getString(c.getColumnIndex(KEY_PRIORITY));\n String task_date=c.getString(c.getColumnIndex(KEY_TASKDATE));\n String task_group=c.getString(c.getColumnIndex(KEY_GROUP_NAME));\n tasks.add(title);\n tasks.add(description);\n tasks.add(priority);\n tasks.add(task_group);\n tasks.add(task_date);\n }while(c.moveToNext());\n }\n c.close();\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n\n return tasks;\n }", "public interface TaskListRepository extends JpaRepository<TaskList, Long> {\n TaskList findByUserName(String userName);\n}", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@Nullable\n public Task getTask(int id) {\n Task output = null;\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return null;\n\n // run the query to get the matching task\n Cursor rawTask = db.rawQuery(\"SELECT * FROM Tasks WHERE id = ? ORDER BY due_date ASC;\", new String[]{String.valueOf(id)});\n\n // move the cursor to the first result, if one exists\n if (rawTask.moveToFirst()) {\n // convert the cursor to a task and assign it to our output\n output = new Task(rawTask);\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTask.close();\n db.close();\n\n // return the (possibly null) output\n return output;\n }", "public Project getProject(Long projectId);", "public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}", "@Test\n public void testGetMyTasks_ByOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n\n List<Task> results = services.getMyTasks(\"user1\", TaskTypes.ALL,\n GenericHumanRole.ACTUAL_OWNER, null,\n new ArrayList<Status>(), null, null, null, null, 0);\n\n Assert.assertEquals(1, results.size());\n\n Task taskToCheck = results.get(0);\n\n Assert.assertEquals(t.getActualOwner(), taskToCheck.getActualOwner());\n Assert.assertEquals(Task.Status.RESERVED, taskToCheck.getStatus());\n }", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "public List<Task> getpublishTask(Integer uid);", "List<TbCrmTask> selectAll();", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "@Override\n\t\tprotected List<ProjectModel> doInBackground(Void... params) {\n\t\t\tLog.i(\"LOGGER\", \"Starting...doInBackground loadList\");\n\t\t\tList<ProjectModel> projectsList = searchController.searchIntoXML();\n\t\t\treturn projectsList;\n\t\t}", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignmentDTO> getByUserDTO(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\"select mob.taskId as taskId, mob.orderId as orderId, mob.orderDate as orderDate, mob.customerId as customerId, \" +\r\n\t\t\t\t\t\t\"mob.customerName as customerName, mob.customerAddress as customerAddress, \" +\r\n\t\t\t\t\t\t\"mob.customerPhone as customerPhone, mob.customerZipcode as customerZipcode, mob.customerSubZipcode as customerSubZipcode, \" +\r\n\t\t\t\t\t\t\"mob.customerRt as customerRt, mob.customerRw as customerRw, mob.priority as priority, \" +\r\n\t\t\t\t\t\t\"mob.notes as notes, mob.verifyBy as verifyBy, mob.verifyDate as verifyDate, \" +\r\n\t\t\t\t\t\t\"mob.assignmentDate as assignmentDate, mob.retrieveDate as retrieveDate, mob.submitDate as submitDate, \" +\r\n\t\t\t\t\t\t\"mob.finalizationDate as finalizationDate, mob.receiveDate as receiveDate, mob.assignmentStatus as assignmentStatus, \" +\r\n\t\t\t\t\t\t\"mob.user.userId as userId, mob.user.userCode as userCode, mob.user.userName as userName, \" +\r\n\t\t\t\t\t\t\"mob.office.officeId as officeId, mob.office.officeCode as officeCode, mob.office.officeName as officeName, \" +\r\n\t\t\t\t\t\t\"mob.office.company.coyId as coyId, mob.office.company.coyCode as coyCode, mob.office.company.coyName as coyName, \" +\r\n\t\t\t\t\t\t\"mob.product.productId as productId, mob.product.productCode as productCode, mob.product.productName as productName, \" +\r\n\t\t\t\t\t\t\"mob.product.template.tempId as tempId, mob.product.template.tempLabel as tempLabel, \" +\r\n\t\t\t\t\t\t\"mob.taskStatus.taskStatusId as taskStatusId, mob.taskStatus.taskStatusCode as taskStatusCode, mob.taskStatus.taskStatusName as taskStatusName \" +\r\n\t\t\t\t\t\t\"from \" + domainClass.getName() + \" mob \" +\r\n\t\t\t\t\t\t\"where mob.user.userId = :userId \" +\r\n\t\t\t\t\t\t\t\"and mob.taskStatus.taskStatusCode in ('ASSG','RETR')\")\r\n\t\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t\t.setResultTransformer(Transformers.aliasToBean(MobileTaskAssignmentDTO.class))\r\n\t\t\t\t\t\t.list();\r\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByType(String taskType) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_type = ?)\";\r\n\t\treturn getForList(sql,taskType);\r\n\t}", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "public Task getTask(Long row_num) {\n List<Task> taskList = new ArrayList<Task>();\n Task result = new Task();\n Integer r = row_num.intValue();\n taskList = getAllTasks();\n result = taskList.get(r);\n return result;\n }", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "public java.util.List<Todo> findByGroupId(long groupId);", "@Query(\"SELECT id FROM Projects t WHERE t.ownerId =:ownerId\")\n @Transactional(readOnly = true)\n Iterable<Integer> findProjectID(@Param(\"ownerId\")Integer userID);" ]
[ "0.84074396", "0.82969666", "0.797375", "0.76408446", "0.763854", "0.7244465", "0.71198535", "0.7019674", "0.69594467", "0.6890141", "0.6846381", "0.65781444", "0.65777826", "0.649058", "0.6474553", "0.6459946", "0.6417506", "0.6401906", "0.63193566", "0.63117445", "0.63004106", "0.62964326", "0.62958527", "0.62062776", "0.6195844", "0.6195593", "0.61826885", "0.6166118", "0.6140485", "0.6135438", "0.61230373", "0.6102595", "0.60775054", "0.60506016", "0.6045342", "0.60361767", "0.60342926", "0.60256416", "0.6020695", "0.6014426", "0.60111743", "0.596217", "0.59471303", "0.5940025", "0.5921227", "0.59057003", "0.589617", "0.5880824", "0.58728635", "0.585353", "0.5852156", "0.58436245", "0.583829", "0.5825054", "0.5824918", "0.5790383", "0.57888836", "0.5769161", "0.57605463", "0.5756035", "0.5731726", "0.57234293", "0.571798", "0.57016504", "0.5695313", "0.5680055", "0.5659962", "0.5653512", "0.56472474", "0.56439054", "0.56437445", "0.5638253", "0.5636954", "0.5634521", "0.5632076", "0.56317616", "0.5630397", "0.5620136", "0.561528", "0.5614456", "0.56076217", "0.5606763", "0.5597872", "0.55913126", "0.5570851", "0.5570363", "0.5567691", "0.55616456", "0.5560343", "0.55532384", "0.55525863", "0.5551985", "0.5550899", "0.55506426", "0.554793", "0.55468845", "0.55424553", "0.55405986", "0.55289847", "0.55232954" ]
0.83780825
1
retrieveTasksForSpecificDaysById methods retrieves all the task for the user and particular project
public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "public List<Task> getAllTasksForUser(long userId);", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "TrackerTasks getTrackerTasks(final Integer id);", "List<Workflow> findByIdTask( int nIdTask );", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "TrackerTasks loadTrackerTasks(final Integer id);", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "Task selectByPrimaryKey(String taskid);", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "List<Task> getAllTasks();", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "@RequestMapping(value = \"/tasks/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<TaskDTO> getTask(@PathVariable Long id) {\n log.debug(\"REST request to get Task : {}\", id);\n TaskDTO taskDTO = taskService.findOne(id);\n return Optional.ofNullable(taskDTO)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "Set<Task> getAllTasks();", "public static List<Task> findByUser(String userID){\n return null;\n }", "@GetMapping(\"/tasks/{id}\")\n public ResponseEntity<Task> getTaskById(@PathVariable Long id){\n Task task = taskRepository.findById(id)\n .orElseThrow(() -> new ResourceNotFoundException(\"Task not found with Id of \" + id));\n return ResponseEntity.ok(task);\n }", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "void getAllProjectList(int id, UserType userType);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public Task getTaskById(int id) {\n\t\t\n\t\tfor(Task task: tasks) {\n\t\t\tif(task.getId()==id)\n\t\t\t\treturn task;\n\t\t}\n\t\t\t\n\t\tthrow new NoSuchElementException(\"Invalid Id:\"+id);\n\t}", "@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}", "List<Task> getTaskdetails();", "void getAllProjectList(int id);", "@Override\n\tpublic Teatask getById(int taskid)\n\t{\n\t\treturn teataskMapper.getById(taskid);\n\t}", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public static Recordset findtasks(final TaskQuery taskQuery) {\r\n try {\r\n return ServerFactory.getServer().getSecurityManager().executeAsSystem(new Callable<Recordset>() {\r\n public Recordset call() throws Exception {\r\n return Ivy.wf().getTaskQueryExecutor().getRecordset(taskQuery);\r\n }\r\n });\r\n\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return null;\r\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public List<Task> getTasks(String category, String keyword, Boolean isApproved, Integer olderThan) {\n if ((category == null || category.equals(\"None\")) && keyword == null) return taskRepository.findAllByIsApproved(isApproved, PageRequest.of(olderThan, 20));\n else if (category != null && keyword == null) return taskRepository.findAllByCategoryCategoryAndIsApproved(category, isApproved, PageRequest.of(olderThan, 20));\n else if (category == null || category.equals(\"None\")) return taskRepository.findAllByQuestionAndIsApproved(keyword, isApproved, PageRequest.of(olderThan, 20));\n return taskRepository.findAllByTitleAndCategoryAndIsApproved(keyword, category, isApproved, PageRequest.of(olderThan, 20));\n }", "@Query(\"SELECT d FROM Day d WHERE user_id = ?1\")\n List<Day> getByUserID(Integer id);", "_task selectByPrimaryKey(Integer taskid);", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "net.zyuiop.ovhapi.api.objects.license.Task getServiceNameTasksTaskId(java.lang.String serviceName, long taskId) throws java.io.IOException;", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "public List<String> finddetails(long id ) {\n id=id-1;\n Log.d(SimpleTodoActivity.APP_TAG, \"findspecific triggered with ID----->\"+id);\n List<String> tasks = new ArrayList<String>();\n\n try{\n String query = \"SELECT * FROM \"+TABLE_NAME+\" WHERE id=\" + id +\";\";\n\n Cursor c = storage.rawQuery(query, null);\n if (c.moveToFirst()){\n do{\n String title = c.getString(c.getColumnIndex(KEY_TITLE));\n String description = c.getString(c.getColumnIndex(KEY_DESCRIPTION));\n String priority=c.getString(c.getColumnIndex(KEY_PRIORITY));\n String task_date=c.getString(c.getColumnIndex(KEY_TASKDATE));\n String task_group=c.getString(c.getColumnIndex(KEY_GROUP_NAME));\n tasks.add(title);\n tasks.add(description);\n tasks.add(priority);\n tasks.add(task_group);\n tasks.add(task_date);\n }while(c.moveToNext());\n }\n c.close();\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n\n return tasks;\n }", "@Override\n\tpublic DetailedTask selectTask(int id) throws SQLException, ClassNotFoundException\n\t{\n\t\t DetailedTask returnValue = null;\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectTask)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task WHERE id=\"+id+\";\" );\n\t rs.next();\n\n\t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t returnValue = new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class),\n\t \t\t rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\"));\n\t \n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t return returnValue;\n\t}", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "@Override\n public Map<String, Object> queryTaskGroupById(User loginUser, Integer id) {\n Map<String, Object> result = new HashMap<>();\n if (isNotAdmin(loginUser, result)) {\n return result;\n }\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n result.put(Constants.DATA_LIST, taskGroup);\n putMsg(result, Status.SUCCESS);\n return result;\n }", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "@Nullable\n public Task getTask(int id) {\n Task output = null;\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return null;\n\n // run the query to get the matching task\n Cursor rawTask = db.rawQuery(\"SELECT * FROM Tasks WHERE id = ? ORDER BY due_date ASC;\", new String[]{String.valueOf(id)});\n\n // move the cursor to the first result, if one exists\n if (rawTask.moveToFirst()) {\n // convert the cursor to a task and assign it to our output\n output = new Task(rawTask);\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTask.close();\n db.close();\n\n // return the (possibly null) output\n return output;\n }", "public Task getTask(final int id) {\n return tasks.get(id);\n }", "@Override\n\tpublic List<Calendar> getEventsByProjectId(int id) {\n\t\treturn projectDao.getEventsByProjectId(id);\n\t}", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "public Task getTask(Integer tid);", "@GetMapping(\"/vehicle-tasks/{id}\")\n @Timed\n @Secured(AuthoritiesConstants.ADMIN)\n public ResponseEntity<VehicleTask> getVehicleTask(@PathVariable Long id) {\n log.debug(\"REST request to get VehicleTask : {}\", id);\n VehicleTask vehicleTask = vehicleTaskService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(vehicleTask));\n }", "List<Task> selectByExample(TaskExample example) throws DataAccessException;", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef retrieve(Long task_id) {\n return TaskDefIntegrationService.find(task_id);\n }", "public static List getTasksForRating(long wfId)\n throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getTaskManager().getTasksForRating(wfId);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "@GetMapping(\"/getsubtasks/{projectId}/{taskId}\")\n\tpublic List<Subtask> getAllSubtasksProj(@PathVariable (value = \"projectId\") Long projectId, @PathVariable (value = \"taskId\") Long taskId)\n\t{\n\t\tSystem.out.println(\"yes\");\n\t\treturn this.integrationClient.getAllSubtasksProj(projectId, taskId);\n\t}", "public Task getTaskById(Long id ) {\n\t\treturn taskRepo.getOne(id);\n\t}", "@Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);", "public List<Task> listTasks(String extra);", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "@GET\n @Deprecated\n @Path(\"/jobs/days/{from_days}/{to_days}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobByIdDays(@PathParam(\"from_days\") int fdays, @PathParam(\"to_days\") int tdays) {\n if ((tdays != 0)&& (tdays < fdays)) {\n return Response.status(404).entity(\"Invalid parameters\").build();\n }\n List<LGJob> jobs = Utils.getJobManager().getAllByDays(fdays, tdays);\n if (Utils.getLemongraph().client == null) {\n return Response.status(404).entity(\"Not found\").build();\n }\n JSONObject ob = new JSONObject();\n for (LGJob job : jobs) {\n ob.put(job.getJobId(),job.toJson());\n }\n return Response.status(200).entity(ob.toString()).build();\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "@Override\n\tpublic List<StudyTaskInfo> listTaskInfoByOpt(Integer sLogId, String taskName)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\tstDao = (StudyTaskDao) DaoFactory.instance(null).getDao(Constants.DAO_STUDY_TASK_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn stDao.findInfoByOpt(sess, sLogId, taskName);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"根据学习记录编号、学习任务获取学习任务记录列表时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }", "@RequestMapping(value = \"/tasks\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n @Transactional\n public ResponseEntity<List<TaskDTO>> getAllTasks(Pageable pageable)\n throws URISyntaxException {\n log.debug(\"REST request to get a page of Tasks\");\n Page<Task> page = taskService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tasks\");\n return new ResponseEntity<>(taskMapper.tasksToTaskDTOs(page.getContent()), headers, HttpStatus.OK);\n }", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "@GetMapping(\"/my_projects/{id}\")\n public ResponseEntity<ProjectDtoExtendedForUser> getMyProjectById(@PathVariable long id){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n ProjectDtoExtendedForUser projectDtoExtendedForUser = new ProjectDtoExtendedForUser();\n\n Project project = projectService.findById(id).get();\n\n UsersOnProjects usersOnProjects = usersOnProjectsService.findByUsersOnProjectsPK(new UsersOnProjectsPK(currentUser, project));\n\n projectDtoExtendedForUser.setId(project.getId());\n projectDtoExtendedForUser.setName(project.getName());\n projectDtoExtendedForUser.setCompany_name(project.getCompany().getName());\n projectDtoExtendedForUser.setCEO_username(project.getCompany().getCEO().getUsername());\n projectDtoExtendedForUser.setCEO_email(project.getCompany().getCEO().getEmail());\n projectDtoExtendedForUser.setStart_date(project.getStart_date());\n projectDtoExtendedForUser.setStatus(project.getStatus());\n projectDtoExtendedForUser.setPosition(usersOnProjects.getPosition().getName());\n projectDtoExtendedForUser.setBase_salary(usersOnProjects.getBase_salary());\n projectDtoExtendedForUser.setRate(usersOnProjects.getRate());\n projectDtoExtendedForUser.setWeek_work_time(usersOnProjects.getWeek_work_time());\n\n return ResponseEntity.ok(projectDtoExtendedForUser);\n }", "@Override\r\n\tpublic List<ExecuteTask> getByOrgByTime(int organizationId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?)\"\r\n\t\t\t\t+ \" AND task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,organizationId,organizationId,time1,time2);\r\n\t}", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "public User getUser(Long id) throws ToDoListException;", "public void fetchTasks() {\n tasksTotales.clear();\n for (String taskId : taskList) {\n databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class);\n tasksTotales.add(taskTemp);\n taskAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "public Cursor fetchUserTaskByUserIdTaskId(long taskid,long userid) throws SQLException {\r\n\r\n\t\t Cursor mCursor =\r\n\r\n\t\t database.query(true,MySQLHelper.TABLE_USER_TASK , allColumns, MySQLHelper.COLUMN_USERTASKTASKFID + \"=\" + taskid\r\n\t\t \t\t+ \" AND \" + MySQLHelper.COLUMN_USERTASKUSERFID + \"=\" + userid , null,\r\n\t\t null, null, null, null);\r\n\t\t if (mCursor != null) {\r\n\t\t mCursor.moveToFirst();\r\n\t\t }\r\n\t\t return mCursor;\r\n\r\n\t\t }", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "@Override\n public String getTask(String id) {\n JSONObject response = new JSONObject();\n try {\n ITaskInstance task = dataAccessTosca.getTaskInstance(id);\n if (task != null) {\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(id);\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n\n return response.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static List<TaskTimeElement> findAllByTaskDate(String taskDate) {\r\n String sql = null;\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAllByTaskDate\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT \" +\r\n \"ID\" +\r\n \",DURATION\" +\r\n \",TASKNAME\" +\r\n \",USERNAME\" +\r\n \" FROM TaskTimeElement\" +\r\n \" WHERE TASKDATE=\" + \r\n \"'\" + DatabaseBase.encodeToSql(taskDate) + \"'\" +\r\n \" AND ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object = null;\r\n while (rs.next()) {\r\n object = new TaskTimeElement();\r\n object.setTaskDate(taskDate);\r\n object.setEnabled(true);\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n ret.add(object);\r\n }\r\n } catch (SQLException sqle) {\r\n Trace.error(\"sql = \" + sql, sqle);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "TrackerProjects loadTrackerProjects(final Integer id);", "@Override\n public Optional<Task> getTaskById(UUID id)\n {\n return null;\n }", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;" ]
[ "0.70937717", "0.6857931", "0.6610801", "0.64355415", "0.642538", "0.64226085", "0.64162475", "0.6390842", "0.61584157", "0.61488754", "0.6116817", "0.611411", "0.61093676", "0.599193", "0.597025", "0.59051496", "0.5880977", "0.5872341", "0.5872164", "0.5799405", "0.5764897", "0.5762879", "0.5722523", "0.57043785", "0.56990194", "0.56759375", "0.5673381", "0.5660615", "0.5654926", "0.55965793", "0.5593473", "0.5578248", "0.5530748", "0.5523367", "0.5514064", "0.5490187", "0.5487367", "0.5475062", "0.5461231", "0.5458069", "0.5457041", "0.5452541", "0.5450323", "0.5449573", "0.5447138", "0.5420071", "0.5404626", "0.5398931", "0.53953415", "0.5349417", "0.53375417", "0.53086543", "0.529974", "0.5299408", "0.52919436", "0.5283288", "0.52769166", "0.5265262", "0.5263479", "0.5257194", "0.52558273", "0.5254038", "0.52457565", "0.52427685", "0.52383655", "0.5237182", "0.5230108", "0.52194643", "0.5217716", "0.5217244", "0.5213959", "0.52043205", "0.5196064", "0.5194554", "0.51759714", "0.51647156", "0.5163546", "0.51440156", "0.5139778", "0.5129595", "0.51008135", "0.50993246", "0.50907874", "0.508287", "0.5074621", "0.5072556", "0.5069417", "0.5061645", "0.5055154", "0.50483507", "0.5040077", "0.50318587", "0.50080943", "0.5003614", "0.50028485", "0.500011", "0.49995634", "0.49849716", "0.49741095", "0.49721253" ]
0.75099736
0
retrieveIncompleteTask method returns all the incomplete task of the user
public List<TaskMaster> retrieveIncompleteTask(Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Task> getIncompleteTasks() {\n ArrayList<Task> output = new ArrayList<>();\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return output;\n\n // run the query to get all incomplete tasks\n Cursor rawTasks = db.rawQuery(\"SELECT * FROM Tasks WHERE is_complete = 0 ORDER BY due_date ASC;\", null);\n\n // move the cursor to the first result (or skip this section if there are no results)\n if (rawTasks.moveToFirst()) {\n // iterate through results\n do {\n // convert the cursor version of the task to a real Task object and add it to output\n output.add(new Task(rawTasks));\n } while (rawTasks.moveToNext());\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTasks.close();\n db.close();\n\n // return the (possibly empty) list\n return output;\n\n }", "public List<Task> getAllTasksForUser(long userId);", "List<Task> getAllTasks();", "public Set<Task> getUnfinishedTasks(){\r\n return unfinished;\r\n }", "private void getTasks(){\n\n currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n if(currentFirebaseUser !=null){\n Log.e(\"Us\", \"onComplete: good\");\n } else {\n Log.e(\"Us\", \"onComplete: null\");\n }\n\n\n mDatabaseReference.child(currentFirebaseUser.getUid())\n .addValueEventListener(new ValueEventListener() {\n //если данные в БД меняются\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (mTasks.size() > 0) {\n mTasks.clear();\n }\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n Task task = postSnapshot.getValue(Task.class);\n mTasks.add(task);\n if (mTasks.size()>2){\n\n }\n }\n setAdapter(taskId);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "List<Task> getTaskdetails();", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "@SuppressWarnings(\"unchecked\")\n public List<Item> getActiveTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item where status = 0\").list();\n session.close();\n return list;\n }", "Set<Task> getAllTasks();", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public List<TaskDescription> getActiveTasks();", "ObservableList<Task> getCurrentUserTaskList();", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public static List<Task> findByUser(String userID){\n return null;\n }", "ObservableList<Task> getUnfilteredTaskList();", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "@Override\n\tpublic TaskBank getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "@Override\n\tpublic TaskInsurance getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "@Override\n\tpublic TaskInsurance getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "TaskList getList();", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "List<ExceptionAndTasks> getFailedTasksAndExceptions();", "public ArrayList<Task> listNotStarted() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 0) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "public List<Task> listTasks(String extra);", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@Test\n void displayIncompleteTasks() {\n }", "private List<Task> tasks2Present(){\n List<Task> tasks = this.taskRepository.findAll();\n// de taken verwijderen waar user eerder op reageerde\n tasks2React(tasks);\n// taken op alfabetische volgorde zetten\n sortTasks(tasks);\n// opgeschoonde lijst aan handler geven\n return tasks;\n }", "public List<InProgress> findAllInProgress() {\n try {\n return jdbcTemplate.query(\"SELECT id, task_details, finish_date,difficulty,priority FROM in_progress\",\n (rs, rowNum) -> new InProgress(rs.getLong(\"id\"), rs.getString(\"task_details\")\n ,rs.getDate(\"finish_date\"), rs.getString(\"difficulty\"),\n rs.getString(\"priority\") ));\n } catch (Exception e) {\n return new ArrayList<InProgress>();\n }\n }", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Test\n public void deleteCompletedTasksAndGettingTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n //When deleting completed tasks\n mDatabase.taskDao().deleteCompletedTasks();\n\n //When getting the tasks\n List<Task> tasks = mDatabase.taskDao().getTasks();\n // The list is empty\n assertThat(tasks.size(), is(0));\n }", "private List<ToDoItem> refreshItemsFromMobileServiceTable() throws ExecutionException, InterruptedException {\n //List list = mToDoTable.where ( ).field (\"complete\").eq(val(false)).execute().get();\n return mToDoTable.where ().field (\"userId\").eq (val (userId)).and(mToDoTable.where ( ).field (\"complete\").eq(val(false))).execute().get();\n }", "public ArrayList<Task> listConcluded() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 100) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "public TaskBookBuilder addUnfinishedEventTasks() {\n final Iterable<EventTask> taskList = (new TypicalEventTasks()).getEventTasks();\n final List<EventTask> toAdd = new ArrayList<EventTask>();\n TaskUnfinishedPredicate predicate = new TaskUnfinishedPredicate(referenceDateTime);\n for (EventTask eventTask : taskList) {\n if (predicate.test(eventTask)) {\n toAdd.add(eventTask);\n }\n }\n return addEventTasks(toAdd);\n }", "public ArrayList<User> getPending(User main){\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n\n ArrayList<User> userList = new ArrayList<>();\n\n try {\n String getQuery = String.format(\n \"SELECT * FROM User u \" +\n \"WHERE u.userID != '%s' AND u.userID IN \" +\n \" (SELECT userID FROM User_has_Friends uhf WHERE uhf.frienduserID == '%s' AND uhf.pending == 1)\"\n , main.getId(), main.getId());\n\n Cursor cursor = db.rawQuery(getQuery, null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n User user = new User(cursor.getInt(0), cursor.getString(4), cursor.getString(3), cursor.getString(5));\n user.lastname = cursor.getString(2);\n user.firstname = cursor.getString(1);\n user.address = cursor.getString(6);\n user.color = cursor.getString(7);\n user.shoeSize = cursor.getInt(8);\n user.trouserSize = cursor.getString(9);\n user.tshirtSize = cursor.getString(10);\n user.privacy = cursor.getInt(11);\n\n userList.add(user);\n cursor.moveToNext();\n }\n }\n db.setTransactionSuccessful();\n return userList;\n } catch (Exception e) {\n Log.d(\"SQL\", e.getMessage());\n return null;\n } finally {\n db.endTransaction();\n }\n }", "@Test(priority = 1, dependsOnMethods = { \"testAttachFileWithNegativeCase\" },\n description = \"podio {incompleteTask} integration test with mandatory parameters.\")\n public void testIncompleteTaskWithMandatoryParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:incompleteTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_incompleteTask_mandatory.json\");\n \n String apiEndPoint = apiUrl + \"/task/\" + connectorProperties.getProperty(\"taskId\");\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getHttpStatusCode(), 204);\n Assert.assertEquals(apiRestResponse.getBody().getString(\"status\"), \"active\");\n }", "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "@Override\n\tpublic TaskMobile getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "public static List<TaskTimeElement> findAll() {\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n String sql = null;\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAll\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT ID\" +\r\n \",DURATION\" + \r\n \",TASKDATE\" + \r\n \",TASKNAME\" + \r\n \",USERNAME\" +\r\n \" FROM TASKTIMEELEMENT\" +\r\n \" WHERE ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKDATE,TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object;\r\n while(rs.next()) {\r\n object = new TaskTimeElement();\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskDate(rs.getString(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n object.setEnabled(true);\r\n ret.add(object);\r\n }\r\n }\r\n catch (SQLException e) {\r\n Trace.error(\"sql=\" + sql, e);\r\n ret = null;\r\n }\r\n catch (Exception ex) {\r\n Trace.error(\"Exception\", ex);\r\n ret = null;\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }", "public void showAllTask(View v){\n Cursor res = taskManager.showAllTask();\n if(res.getCount()==0){\n //Toast.makeText(this,\"No Data Available\",Toast.LENGTH_LONG).show();\n showTaskMessage(\"Error\",\"No Data Found\");\n return;\n }else{\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"taskId : \"+res.getString(0)+\"\\n\");\n buffer.append(\"taskName : \"+res.getString(1)+\"\\n\");\n buffer.append(\"taskDescription : \"+res.getString(2)+\"\\n\");\n }\n showTaskMessage(\"Data\",buffer.toString());\n }\n }", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "@Override\n\tpublic TaskHousing getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "@Override\n\tpublic TaskHousing getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "@Override\n\tpublic TaskHousing getAllDataDone(String taskId) {\n\t\treturn null;\n\t}", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "public boolean isIncomplete()\n {\n\treturn toDo.size() > 0;\n }", "ObservableList<Task> getTaskList();", "public Cursor getAllTasks()\n {\n Cursor mCursor = db.query(DATABASE_TABLE, new String[]{KEY_ROWID,\n KEY_TASK_SMALLBLIND,\n KEY_TASK_BUTTON,\n KEY_TASK_CUTOFF,\n KEY_TASK_HIJACK,\n KEY_TASK_LOJACK,\n KEY_TASK_UTG2,\n KEY_TASK_UTG1,\n KEY_TASK_UTG},null,null,null,null,null);\n\n\n return mCursor;\n }", "public void fetchTasks() {\n tasksTotales.clear();\n for (String taskId : taskList) {\n databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class);\n tasksTotales.add(taskTemp);\n taskAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "@Test(dependsOnMethods = { \"testIncompleteTaskWithNegativeCase\" },\n description = \"podio {listTasks} integration test with optional parameters.\")\n public void testListTaskskWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:listTasks\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_listTasks_optional.json\");\n \n String esbResponseArrayString = esbRestResponse.getBody().getString(\"output\");\n JSONArray esbResponseArray = new JSONArray(esbResponseArrayString);\n JSONObject esbObject = esbResponseArray.getJSONObject(0).getJSONObject(\"responsible\");\n \n String apiEndPoint =\n apiUrl + \"/task?grouping=created_by&created_by=user:\"\n + connectorProperties.getProperty(\"userId\");\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n String apiResponseArrayString = apiRestResponse.getBody().getString(\"output\");\n JSONArray apiResponseArray = new JSONArray(apiResponseArrayString);\n JSONObject apiObject = apiResponseArray.getJSONObject(0).getJSONObject(\"responsible\");\n \n Assert.assertEquals(esbResponseArray.length(), apiResponseArray.length());\n Assert.assertEquals(esbObject.getString(\"user_id\"), apiObject.getString(\"user_id\"));\n Assert.assertEquals(esbObject.getString(\"profile_id\"), apiObject.getString(\"profile_id\"));\n }", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "public List<EmailAddressTable> doInBackground(Void... voidArr) {\n List<EmailAddressTable> b2 = g.p(RemoveExpiredEmailsService.this.f13022c).b();\n e.D(b2);\n for (EmailAddressTable next : b2) {\n String d2 = RemoveExpiredEmailsService.g;\n m.b(d2, \"email sorted \" + next.getFullEmailAddress() + \" expired at \" + new Date(next.getEndTime().longValue()).toString());\n }\n String d3 = RemoveExpiredEmailsService.g;\n m.b(d3, \"emailAddressListExpired size before \" + b2.size());\n List<EmailAddressTable> y = e.y(RemoveExpiredEmailsService.this, b2);\n for (EmailAddressTable next2 : y) {\n String d4 = RemoveExpiredEmailsService.g;\n m.b(d4, \"emails to delete \" + next2.getFullEmailAddress() + \" expired at \" + new Date(next2.getEndTime().longValue()).toString());\n }\n String d5 = RemoveExpiredEmailsService.g;\n m.b(d5, \"emailAddressListExpired size to delete \" + y.size());\n return y;\n }", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "ObservableList<Task> getFilteredTaskList();", "public TaskBookBuilder addUnfinishedTasks() {\n addUnfinishedFloatingTasks();\n addUnfinishedDeadlineTasks();\n addUnfinishedEventTasks();\n return this;\n }", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "void completeTask(String userId, List<TaskSummary> taskList, Map<String, Object> results);", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public TaskBookBuilder addUnfinishedFloatingTasks() {\n final List<FloatingTask> taskList = (new TypicalFloatingTasks()).getFloatingTasks();\n final List<FloatingTask> toAdd = new ArrayList<FloatingTask>();\n final TaskUnfinishedPredicate predicate = new TaskUnfinishedPredicate(referenceDateTime);\n for (FloatingTask floatingTask : taskList) {\n if (predicate.test(floatingTask)) {\n toAdd.add(floatingTask);\n }\n }\n return addFloatingTasks(toAdd);\n }", "public List<Task> getpublishTask(Integer uid);", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "List<Transfer> searchTransfersAwaitingAuthorization(TransfersAwaitingAuthorizationQuery query);", "@Test\n public void testGetMyTasks_ByOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n\n List<Task> results = services.getMyTasks(\"user1\", TaskTypes.ALL,\n GenericHumanRole.ACTUAL_OWNER, null,\n new ArrayList<Status>(), null, null, null, null, 0);\n\n Assert.assertEquals(1, results.size());\n\n Task taskToCheck = results.get(0);\n\n Assert.assertEquals(t.getActualOwner(), taskToCheck.getActualOwner());\n Assert.assertEquals(Task.Status.RESERVED, taskToCheck.getStatus());\n }", "@Test(priority = 1, dependsOnMethods = { \"testAttachFileWithMandatoryParameters\" },\n description = \"podio {incompleteTask} integration test with negative case.\")\n public void testIncompleteTaskWithNegativeCase() throws IOException, JSONException, InterruptedException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:incompleteTask\");\n \n Thread.sleep(timeOut);\n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_incompleteTask_negative.json\");\n \n String apiEndPoint = apiUrl + \"/task/Invalid/incomplete\";\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"POST\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"error\"), apiRestResponse.getBody().getString(\"error\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"error_description\"), apiRestResponse.getBody()\n .getString(\"error_description\"));\n }", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "public List<TempWTask> getTaskList(){return taskList;}", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public Map<String, TaskBean> getUpdatedTasksList(String _operation, String _idUser) {\r\n\r\n\t\tString METHOD = \"getModifiedTasksList\";\r\n\r\n\t\tMap<String, TaskBean> tasksBean = new HashMap<String, TaskBean>();\r\n\r\n\t\t// on retourne les donnees sous la forme JSON (JavaScript Object Notation)\r\n\t\tString messageErreur = null;\r\n\t\tint code_erreur = 0;\r\n\r\n\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : operation : \" + _operation ); \r\n\t\tif (_operation == null){\r\n\t\t\tmessageErreur = \"undefined operation\";\r\n\t\t\tcode_erreur = 531;\r\n\t\t} else {\r\n\t\t\tif (!_operation.equalsIgnoreCase(Sps2GeneralConstants.SPS_GET_UPDATED_TASKS_LIST)){\r\n\t\t\t\tmessageErreur = \"bad operation\";\r\n\t\t\t\tcode_erreur = 534;\r\n\t\t\t}\r\n\t\t\tif (_idUser == null) {\r\n\t\t\t\tmessageErreur = \"undefined idUser\";\r\n\t\t\t\tcode_erreur = 535;\r\n\t\t\t}\r\n\t\t} // if (operation == null){\r\n\r\n\t\t// redirection vers la page d'erreur, \"action inconnue\"\r\n\t\tif (messageErreur != null ) {\r\n\t\t\t// retourne le message d'erreur\r\n\t\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : pb : \" + messageErreur); \r\n\t\t\tTaskBean taskBean = new TaskBean();\r\n\t\t\ttaskBean.getError().setMessage(\"error : \" + messageErreur);\r\n\t\t\ttaskBean.getError().setCode(code_erreur);\r\n\t\t\ttasksBean.put(\"0\", taskBean);\r\n\r\n\t\t\treturn tasksBean;\r\n\t\t} // if (messageErreur != null ) {\r\n\r\n\t\ttry {\r\n\t\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : \" + METHOD + \" : _idUser : \" + _idUser); \r\n\r\n\t\t\tFacadeTasks facadeTasks = new FacadeTasks();\r\n\t\t\ttasksBean = facadeTasks.getUpdatedTasksList(_idUser);\r\n\r\n\t\t\tlog.debug(\"\\n\" + INFOS_CLASSE + \" : tasksBean size : \" + tasksBean.size()); \r\n\r\n\t\t\tList<String> cles = new ArrayList<String>(tasksBean.keySet());\r\n\t\t\tCollections.sort(cles, new CreationDatesComparator(tasksBean));\r\n\r\n\t\t\t// reconstitution du tableau en fonction de la liste des cles triees\r\n\t\t\tMap<String, TaskBean> sortedTasks = \r\n\t\t\t\tnew HashMap<String, TaskBean>();\r\n\r\n\t\t\tfor(String id : cles){\r\n\t\t\t\tTaskBean taskBean = tasksBean.get(id);\r\n\t\t\t\tsortedTasks.put(id, taskBean);\r\n\t\t\t} // for\r\n\t\t\treturn sortedTasks;\r\n\t\t} catch (FacadeSps2Exception exception) {\r\n\t\t\tlog.info(\"\\n\" + INFOS_CLASSE + \" : getTasksList : FacadeSps2Exception : \" + exception.getMessage());\r\n\t\t\treturn tasksBean;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tTaskBean taskBean = new TaskBean();\r\n\t\t\ttaskBean.getError().setMessage(\"Exception : \" + exception.getMessage());\r\n\t\t\ttaskBean.getError().setCode(FacadeSps2Exception.SPS_EXCEPTION);\r\n\t\t\ttasksBean.put(\"0\", taskBean);\r\n\t\t\treturn tasksBean;\r\n\t\t} // try { \t\t\r\n\r\n\t}", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "public TaskBookBuilder addUnfinishedDeadlineTasks() {\n final Iterable<DeadlineTask> taskList = (new TypicalDeadlineTasks()).getDeadlineTasks();\n final List<DeadlineTask> toAdd = new ArrayList<DeadlineTask>();\n TaskUnfinishedPredicate predicate = new TaskUnfinishedPredicate(referenceDateTime);\n for (DeadlineTask deadlineTask : taskList) {\n if (predicate.test(deadlineTask)) {\n toAdd.add(deadlineTask);\n }\n }\n return addDeadlineTasks(toAdd);\n }" ]
[ "0.72339875", "0.6621472", "0.6452763", "0.64191896", "0.63865453", "0.63411295", "0.6243377", "0.62379694", "0.6192875", "0.6184665", "0.61610985", "0.60869294", "0.6059068", "0.6059068", "0.59633833", "0.59487426", "0.59263134", "0.5924401", "0.5911489", "0.5909581", "0.5893612", "0.58863467", "0.58377194", "0.5823396", "0.58226526", "0.5821885", "0.5821415", "0.5821415", "0.5820513", "0.5818387", "0.58107084", "0.5810305", "0.5791583", "0.5787411", "0.5780988", "0.5747665", "0.5745372", "0.5732819", "0.5730991", "0.5727926", "0.5712501", "0.57086784", "0.57062835", "0.5703085", "0.5685738", "0.5671528", "0.56639796", "0.56620353", "0.56563854", "0.565104", "0.5641224", "0.56353045", "0.5629983", "0.5607127", "0.56034124", "0.5589906", "0.55826", "0.55701554", "0.55632126", "0.55629325", "0.5549804", "0.5543973", "0.5543791", "0.5533895", "0.5518699", "0.551763", "0.551763", "0.551763", "0.5475709", "0.54681265", "0.54589146", "0.54561454", "0.54541934", "0.54473615", "0.5446133", "0.5437469", "0.542854", "0.54201907", "0.5413478", "0.54086894", "0.54028624", "0.53995645", "0.5389679", "0.53839266", "0.5381204", "0.5365511", "0.53614444", "0.5352954", "0.5349944", "0.5348277", "0.53456104", "0.5341967", "0.5338724", "0.5334204", "0.53260076", "0.5324154", "0.531829", "0.53105146", "0.53043896", "0.53038406" ]
0.8137548
0
to retrieve all task of specified days from task master table table
public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "Set<Task> getAllTasks();", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "List<Task> getAllTasks();", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "public static List<TaskTimeElement> findAllByTaskDate(String taskDate) {\r\n String sql = null;\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAllByTaskDate\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT \" +\r\n \"ID\" +\r\n \",DURATION\" +\r\n \",TASKNAME\" +\r\n \",USERNAME\" +\r\n \" FROM TaskTimeElement\" +\r\n \" WHERE TASKDATE=\" + \r\n \"'\" + DatabaseBase.encodeToSql(taskDate) + \"'\" +\r\n \" AND ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object = null;\r\n while (rs.next()) {\r\n object = new TaskTimeElement();\r\n object.setTaskDate(taskDate);\r\n object.setEnabled(true);\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n ret.add(object);\r\n }\r\n } catch (SQLException sqle) {\r\n Trace.error(\"sql = \" + sql, sqle);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public List<Task> getTaskForToday(String owner) {\n\n\t\tList<Task> tasksEOD = null;\n\t\tif (owner.equals(TVSchedulerConstants.CESAR)) {\n\t\t\ttasksEOD = getCesarTasksExpiringToday();\n\t\t} else if (owner.equals(TVSchedulerConstants.HOME)) {\n\t\t\ttasksEOD = getHomeTasksExpiringToday();\n\t\t}\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByOwnerAndExpireAtTheEndOfTheDayAndCompletionDateAfter(owner, false, calendar.getTime());\n\t\tList<Task> tasks = tasksEOD;\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\ttasksPermanentTasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDayAndDone(date, owner, false,\n\t\t\t\ttrue);\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\treturn tasks;\n\t}", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "@Override\n public List<Event> searchByDay(Date day) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.dateBegin = :day \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"day\", day);\n\n return query.getResultList()\n .parallelStream()\n .map(EventAdapter::getEvent)\n .collect(Collectors.toList());\n }", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public List<Task> getAllTasksForUser(long userId);", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "List<Task> getTaskdetails();", "public void fetchTasks() {\n tasksTotales.clear();\n for (String taskId : taskList) {\n databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class);\n tasksTotales.add(taskTemp);\n taskAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "List<Day> getDays(String userName);", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "AoD5e466WorkingDay selectByPrimaryKey(Integer id);", "public static List<TaskTimeElement> findAll() {\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n String sql = null;\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAll\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT ID\" +\r\n \",DURATION\" + \r\n \",TASKDATE\" + \r\n \",TASKNAME\" + \r\n \",USERNAME\" +\r\n \" FROM TASKTIMEELEMENT\" +\r\n \" WHERE ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKDATE,TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object;\r\n while(rs.next()) {\r\n object = new TaskTimeElement();\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskDate(rs.getString(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n object.setEnabled(true);\r\n ret.add(object);\r\n }\r\n }\r\n catch (SQLException e) {\r\n Trace.error(\"sql=\" + sql, e);\r\n ret = null;\r\n }\r\n catch (Exception ex) {\r\n Trace.error(\"Exception\", ex);\r\n ret = null;\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "@Query(\"SELECT * FROM \" + TABLE)\n List<Task> getAllSync();", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "List<Task> selectByExample(TaskExample example) throws DataAccessException;", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "List<Workflow> findByIdTask( int nIdTask );", "List<Day> findDaysByPerson(Long person);", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "public List<Task> listTasks(String extra);", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "@Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);", "List<WorkingSchedule> getAll();", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "@Override\r\n public Map<Integer, Map<Integer, Map<Integer, List<Schedule>>>> calendarOrderTasks() {\r\n List<Schedule> tasks = scheduleRepository.getAllScheduledTasks();\r\n Map<Integer, Map<Integer, Map<Integer, List<Schedule>>>> dateMap = new HashMap<>();\r\n \r\n for (Schedule task : tasks) {\r\n List<Schedule> daySchedule = new ArrayList<>();\r\n String[] timestamp = task.getTimestamp().split(\" \");\r\n String date = timestamp[0];\r\n String[] dateArr = date.split(\"-\");\r\n Integer year = Integer.valueOf(dateArr[0]);\r\n Integer month = Integer.valueOf(dateArr[1]);\r\n Integer day = Integer.valueOf(dateArr[2]);\r\n System.out.println(\"Date arr -> Year: \" + year + \" Month: \" + month + \" Day: \" + day);\r\n \r\n if(dateMap.get(year) == null){\r\n Map<Integer, Map<Integer, List<Schedule>>> monthMap = new HashMap<>();\r\n dateMap.put(year, monthMap);\r\n } \r\n if(dateMap.get(year).get(month) == null){\r\n Map<Integer, List<Schedule>> dayMap = new HashMap<>();\r\n dateMap.get(year).put(month, dayMap);\r\n } \r\n if(dateMap.get(year).get(month).get(day) == null){\r\n List<Schedule> dayTasks = new ArrayList<>();\r\n dateMap.get(year).get(month).put(day, dayTasks);\r\n }\r\n \r\n dateMap.get(year).get(month).get(day).add(task);\r\n }\r\n return dateMap;\r\n }", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "Task selectByPrimaryKey(String taskid);", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public ArrayList<TaskItem> getAllTasksByStatus(int status)\n {\n ArrayList<TaskItem> allTasksList = new ArrayList<>();\n\n //String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + KEY_STATUS + \" = 0\" + \" ORDER BY \" + KEY_CATEGORY + \" DESC\";\n String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + TASK_STATUS + \" = \" + \"'\" + status + \"'\" + \" ORDER BY \" + TASK_DATE + \" DESC, \" + TASK_ID + \" DESC, \" + TASK_CATEGORY + \" DESC\";\n\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor allTasksCursor = db.rawQuery(allTasks, null);\n\n if(allTasksCursor.moveToFirst())\n {\n do {\n\n allTasksList.add(\n TaskItem.createTask(allTasksCursor.getString(1),\n allTasksCursor.getString(2),\n Integer.parseInt(allTasksCursor.getString(3)),\n Integer.parseInt(allTasksCursor.getString(0)),\n allTasksCursor.getString(4),\n allTasksCursor.getString(5)));\n }\n while (allTasksCursor.moveToNext());\n }\n\n allTasksCursor.close();\n db.close();\n\n return allTasksList;\n }", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "@Test\n public void testQuery() throws Exception {\n\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // There should be 4 rows\n MxAssert.assertEquals( \"Number of retrieved rows\", 4, iDataSet.getRowCount() );\n\n // assigned task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assign task with deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 102 ), \"ASSIGNEDTASK102\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // loose task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n iDataSet.next();\n testRow( new TaskKey( 4650, 500 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n }", "protected void runEachDay() {\n \n }", "_task selectByPrimaryKey(Integer taskid);", "public Cursor getAllTasks()\n {\n Cursor mCursor = db.query(DATABASE_TABLE, new String[]{KEY_ROWID,\n KEY_TASK_SMALLBLIND,\n KEY_TASK_BUTTON,\n KEY_TASK_CUTOFF,\n KEY_TASK_HIJACK,\n KEY_TASK_LOJACK,\n KEY_TASK_UTG2,\n KEY_TASK_UTG1,\n KEY_TASK_UTG},null,null,null,null,null);\n\n\n return mCursor;\n }", "@Query(\"SELECT d FROM Day d WHERE date = ?1\")\n List<Day> getByDate(Date date);", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "@Query(\"SELECT d FROM Day d WHERE user_id = ?1\")\n List<Day> getByUserID(Integer id);", "UvStatDay selectByPrimaryKey(Long id);", "public java.util.List<Todo> findByTodoDateTime(Date todoDateTime);", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "@GetMapping(\"/day-times\")\n @Timed\n public List<DayTime> getAllDayTimes() {\n log.debug(\"REST request to get all DayTimes\");\n List<DayTime> dayTimes = dayTimeRepository.findAll();\n return dayTimes;\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "public abstract ArrayList<ScheduleTime> getScheduleForDay(int day, int month, int year);", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public static boolean loadTasks(ObservableList<Task> taskList) {\n taskList.clear();\n try{\n String query = \"SELECT * FROM TASK WHERE date=\\'\" + Calendar.selectedDay.getDate() + \"\\'\"; // Setup query for task\n ResultSet results = DatabaseHandler.executeQuery(query); // Setup ResultSet for query\n\n while(results.next()){ // Go through all task found of the selected day\n String name = results.getString(\"name\"); // store values of task\n String color = results.getString(\"colour\");\n Boolean complete = results.getBoolean(\"isComplete\");\n String date = results.getString(\"date\");\n\n taskList.add(new Task(LocalDate.parse(date), name, Color.web(color), complete)); //store task into list\n }\n return true;\n } catch (SQLException e) { // If task couldn't be loaded\n e.printStackTrace(); // Create alert for failing to load\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to load tasks.\");\n alert.showAndWait();\n }\n return false;\n }", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "Set<StandbyTask> getStandbyTasks();", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "List<TbCrmTask> selectAll();", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "@GET\n @Path(\"/jobs/days/full/{from_days}/{to_days}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobByIdDaysFull(@PathParam(\"from_days\") int fdays, @PathParam(\"to_days\") int tdays) {\n List<LGJob> jobs = Utils.getJobManager().getAllByDays(fdays, tdays);\n if (Utils.getLemongraph().client == null) {\n return Response.status(404).entity(\"Not found\").build();\n }\n JSONObject ob = new JSONObject();\n for (LGJob job : jobs) {\n JSONObject tmpJob = new JSONObject();\n tmpJob.put(\"job\",job.toJson());\n\n JSONArray tasks = job.getTaskList();\n tmpJob.put(\"tasks\",tasks);\n\n List<LGJobError> errors = job.getJobErrors();\n JSONArray errorsJson = new JSONArray();\n for (LGJobError je : errors) {\n errorsJson.put(je);\n }\n tmpJob.put(\"errors\",errorsJson);\n\n List<LGJobHistory> history = job.getJobHistory();\n JSONArray historyJson = new JSONArray();\n for (LGJobHistory jh : history) {\n historyJson.put(jh.toJson());\n }\n tmpJob.put(\"history\",historyJson);\n\n ob.put(job.getJobId(),tmpJob);\n }\n return Response.status(200).entity(ob.toString()).build();\n }", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "Task getAggregatedTask();", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "@GET\n @Deprecated\n @Path(\"/jobs/days/{from_days}/{to_days}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobByIdDays(@PathParam(\"from_days\") int fdays, @PathParam(\"to_days\") int tdays) {\n if ((tdays != 0)&& (tdays < fdays)) {\n return Response.status(404).entity(\"Invalid parameters\").build();\n }\n List<LGJob> jobs = Utils.getJobManager().getAllByDays(fdays, tdays);\n if (Utils.getLemongraph().client == null) {\n return Response.status(404).entity(\"Not found\").build();\n }\n JSONObject ob = new JSONObject();\n for (LGJob job : jobs) {\n ob.put(job.getJobId(),job.toJson());\n }\n return Response.status(200).entity(ob.toString()).build();\n }", "@Override\n\tpublic List<DataTaxTask> getSumDataList(DataTaxTask entity) {\n\t\treturn taxTaskDao.getSumDataList(entity);\n\t}", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "public WorkDay(String date) {\n\n\t\tthis.numOfTasks = 99;\n\t\ttasks = new ArrayList<Task>();\n\t\tthis.date = date;\n\n\t}", "public void getDaysEvents(int userid, int day, int month, int year) {\r\n\t\t// Populate DaysEventsListIDs, DaysEventsListStartHour, DaysEventsListStopHour, DaysEventsListStartMin, DaysEventsListStopMin, DaysEventsListTitles\r\n\t\teventList.clear();\r\n\t\tEventList myEvent = new EventList();\r\n\t\ttry {\r\n\t\t Statement statement = connection.createStatement();\r\n\t\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t\t ResultSet rs = statement.executeQuery(\r\n\t\t \t\t \"select id, starthour, startmin, stophour, stopmin, title, details from events where userid = \" + userid\r\n\t\t \t\t + \" and day = \" + day\r\n\t\t \t\t + \" and month = \" + month\r\n\t\t \t\t + \" and year = \" + year\r\n\t\t \t\t + \" order by starthour, startmin\");\r\n\t\t while(rs.next())\r\n\t\t {\r\n\t\t \tmyEvent = new EventList();\r\n\t\t // read the result set\r\n\t\t \tmyEvent.eid = rs.getInt(\"id\");\r\n\t\t \tmyEvent.starthour = rs.getInt(\"starthour\");\r\n\t\t \tmyEvent.startmin = rs.getInt(\"startmin\");\r\n\t\t \tmyEvent.stophour = rs.getInt(\"stophour\");\r\n\t\t \tmyEvent.stopmin = rs.getInt(\"stopmin\");\r\n\t\t \tmyEvent.title = rs.getString(\"title\");\r\n\t\t \tmyEvent.details = rs.getString(\"details\");\r\n\t\t \teventList.add(myEvent);\r\n\t\t }\r\n\t\t\t}\r\n\t\t catch(SQLException e)\r\n\t\t {\r\n\t\t // if the error message is \"out of memory\", \r\n\t\t // it probably means no database file is found\r\n\t\t System.err.println(e.getMessage());\r\n\t\t \r\n\t\t }\r\n\t\t\r\n\t\t//Query DB to get those details.\r\n\t}", "@Query(\"SELECT * FROM \" + TABLE)\n LiveData<List<Task>> getAll();", "List<AoD5e466WorkingDay> selectByExample(AoD5e466WorkingDayExample example);", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "TrackerTasks getTrackerTasks(final Integer id);", "private List<SubTask> getSubTasks(TaskDTO taskDTO) {\n List<SubTask> subTasks = new ArrayList<>();\n if (taskDTO.getSubTasksDto() == null) return subTasks;\n for (SubTaskDTO s: taskDTO.getSubTasksDto()) {\n SubTask subTask = new SubTask();\n subTask.setId(s.getId());\n subTask.setSubTitle(s.getSubTitle());\n subTask.setSubDescription(s.getSubDescription());\n subTasks.add(subTask);\n }\n return subTasks;\n }", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "public static Iterable<Task> incoming(Iterable<Task> tasks, Date from, Date to) throws Exception {\n ArrayTaskList incomingList = new ArrayTaskList();\n for (Task task : tasks)\n try {\n if (task.nextTimeAfter(from).before(to) || task.nextTimeAfter(from).equals(to))\n incomingList.add(task);\n } catch (NullPointerException e) {\n }\n return incomingList;\n }", "public static ArrayList<Date> events(Task task, Date start, Date end){\n ArrayList<Date> dates = new ArrayList<>();\n for (Date i = task.nextTimeAfter(start); !end.before(i); i = task.nextTimeAfter(i))\n dates.add(i);\n return dates;\n }" ]
[ "0.68190867", "0.6790231", "0.66197705", "0.6488749", "0.6361178", "0.6357443", "0.63002735", "0.62842196", "0.62514395", "0.6243313", "0.6047271", "0.59670526", "0.59509456", "0.594454", "0.59064126", "0.5887825", "0.5881141", "0.5865986", "0.5845988", "0.5830262", "0.5816682", "0.5792604", "0.57478684", "0.5741923", "0.5728159", "0.57226044", "0.57091707", "0.5688745", "0.5654701", "0.5645165", "0.5632799", "0.5630949", "0.5615033", "0.5613718", "0.55980945", "0.55980086", "0.5591514", "0.5573538", "0.5559755", "0.54959714", "0.54876125", "0.5485832", "0.54813015", "0.5480303", "0.5479362", "0.5462807", "0.5461417", "0.5455245", "0.54551876", "0.5443068", "0.54421324", "0.54329926", "0.54324883", "0.54235244", "0.54148966", "0.5404128", "0.5396167", "0.53954655", "0.5375995", "0.53686005", "0.5367716", "0.53668684", "0.53558236", "0.53553396", "0.53541887", "0.5353961", "0.53444326", "0.533438", "0.53292555", "0.5327508", "0.530376", "0.52815336", "0.5277591", "0.5275152", "0.5271693", "0.52708954", "0.5269258", "0.52688223", "0.52648807", "0.5263428", "0.5258604", "0.5254528", "0.52527475", "0.52515256", "0.5251089", "0.5247434", "0.5235302", "0.51996386", "0.519747", "0.5196597", "0.51844954", "0.5183656", "0.5179424", "0.5173681", "0.5166256", "0.5162294", "0.51580024", "0.5152452", "0.5143239", "0.5143048" ]
0.67217135
2
retrieve list of Tasks of particular user between start time and end time
public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getAllTasksForUser(long userId);", "public java.util.List<Todo> findByUserId(long userId, int start, int end);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public static List<Task> findByUser(String userID){\n return null;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByTime(int memberId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,memberId,time1,time2);\r\n\t}", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "@Override\n public List<ScheduledInterview> getScheduledInterviewsInRangeForUser(\n String userId, Instant minTime, Instant maxTime) {\n TimeRange range = new TimeRange(minTime, maxTime);\n List<ScheduledInterview> scheduledInterviews = getForPerson(userId);\n List<ScheduledInterview> scheduledInterviewsInRange = new ArrayList<ScheduledInterview>();\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (range.contains(scheduledInterview.when())) {\n scheduledInterviewsInRange.add(scheduledInterview);\n }\n }\n return scheduledInterviewsInRange;\n }", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "List<Task> getTaskdetails();", "public List<Login> getUsers(Date startDate, Date endDate);", "ObservableList<Task> getCurrentUserTaskList();", "List<Task> getAllTasks();", "public TaskList incoming(Date from, Date to) {\n ArrayTaskList incomingTasks = new ArrayTaskList();\n for (int i = 0; i < size(); i++) {\n if (getTask(i).nextTimeAfter(from) != null && getTask(i).nextTimeAfter(from).compareTo(to) <= 0) {\n incomingTasks.add(getTask(i));\n }\n }\n return incomingTasks;\n }", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "@Override\r\n\tpublic List<ExecuteTask> getByTypeByTime(String taskType, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id IN(SELECT task_id FROM task WHERE task_type = ? AND \"\r\n\t\t\t\t+ \" task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,taskType,time1,time2);\r\n\t}", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public static ArrayList<Date> events(Task task, Date start, Date end){\n ArrayList<Date> dates = new ArrayList<>();\n for (Date i = task.nextTimeAfter(start); !end.before(i); i = task.nextTimeAfter(i))\n dates.add(i);\n return dates;\n }", "@RequestMapping(\"/getUserConsume\")\n public List<UserConsume> getUserConsume(@RequestParam(\"start\")String start,\n @RequestParam(\"end\")String end) {\n Timestamp time1 = Timestamp.valueOf(start);\n Timestamp time2 = Timestamp.valueOf(end);\n\n return orderService.getUserConsume(time1, time2);\n }", "public java.util.List<Todo> filterFindByUserIdGroupId(\n\t\tlong userId, long groupId, int start, int end);", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "TaskList getList();", "public List<Task> listTasks(String extra);", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public java.util.List<Todo> filterFindByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end);", "Set<Task> getAllTasks();", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "public static List<TaskTimeElement> findAll() {\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n String sql = null;\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAll\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT ID\" +\r\n \",DURATION\" + \r\n \",TASKDATE\" + \r\n \",TASKNAME\" + \r\n \",USERNAME\" +\r\n \" FROM TASKTIMEELEMENT\" +\r\n \" WHERE ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKDATE,TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object;\r\n while(rs.next()) {\r\n object = new TaskTimeElement();\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskDate(rs.getString(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n object.setEnabled(true);\r\n ret.add(object);\r\n }\r\n }\r\n catch (SQLException e) {\r\n Trace.error(\"sql=\" + sql, e);\r\n ret = null;\r\n }\r\n catch (Exception ex) {\r\n Trace.error(\"Exception\", ex);\r\n ret = null;\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByTypeByTime(int memberId, String taskType, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_type = ? AND \"\r\n\t\t\t\t+ \" task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,memberId,taskType,time1,time2);\r\n\t}", "public static Iterable<Task> incoming(Iterable<Task> tasks, Date from, Date to) throws Exception {\n ArrayTaskList incomingList = new ArrayTaskList();\n for (Task task : tasks)\n try {\n if (task.nextTimeAfter(from).before(to) || task.nextTimeAfter(from).equals(to))\n incomingList.add(task);\n } catch (NullPointerException e) {\n }\n return incomingList;\n }", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "public java.util.List<Todo> findByUserIdGroupId(\n\t\tlong userId, long groupId, int start, int end);", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByOrgByTime(int organizationId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?)\"\r\n\t\t\t\t+ \" AND task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,organizationId,organizationId,time1,time2);\r\n\t}", "public java.util.List<DataEntry> findByUserId(\n\t\tlong userId, int start, int end);", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }", "public java.util.List<Todo> findAll(int start, int end);", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "public List<TaskDescription> getActiveTasks();", "public java.util.List<Todo> findByUserId(\n\t\tlong userId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "@GET(\"pomodorotasks/activity\")\n Call<List<PomodoroTask>> pomodorotasksActivityGet(\n @Query(\"user\") String user\n );", "public java.util.List<Todo> findByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end);", "public java.util.List<Todo> findByU_S(\n\t\tlong userId, int status, int start, int end);", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public java.util.List<Todo> findByTodoId(long todoId, int start, int end);", "private void getTasks(){\n\n currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n if(currentFirebaseUser !=null){\n Log.e(\"Us\", \"onComplete: good\");\n } else {\n Log.e(\"Us\", \"onComplete: null\");\n }\n\n\n mDatabaseReference.child(currentFirebaseUser.getUid())\n .addValueEventListener(new ValueEventListener() {\n //если данные в БД меняются\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (mTasks.size() > 0) {\n mTasks.clear();\n }\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n Task task = postSnapshot.getValue(Task.class);\n mTasks.add(task);\n if (mTasks.size()>2){\n\n }\n }\n setAdapter(taskId);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public java.util.List<Todo> findByTodoDateTime(\n\t\tDate todoDateTime, int start, int end);", "ObservableList<Task> getFilteredTaskList();", "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }", "void nominateTask(String userId, List<String> userList, Long taskId);", "public java.util.List<Todo> filterFindByG_U_S(\n\t\tlong groupId, long userId, int[] statuses, int start, int end);", "public Map<Long, Collection<TaskShortInfo>> findAllPendingTasksForUserAndTeamMembers(User user) {\n return taskRepository.findAllPendingTasksForUserAndTeamMembers(user.getId(), user.getRolesName());\n }", "public static List<ITask> findTaskOfSessionUser(int startIndex, int pageSize, String sortField, SortOrder sortOrder,\r\n boolean isHistory, IPropertyFilter<TaskProperty> taskFilter) {\r\n Ivy ivy = Ivy.getInstance();\r\n IQueryResult<ITask> queryResult;\r\n\r\n List<PropertyOrder<TaskProperty>> taskPropertyOrder =\r\n PropertyOrder.create(getTaskProperty(sortField), getTaskDirection(sortOrder));\r\n if (isHistory) {\r\n queryResult = ivy.session.findWorkedOnTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true);\r\n } else {\r\n\r\n queryResult =\r\n ivy.session.findWorkTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true,\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED));\r\n }\r\n\r\n List<ITask> tasks = queryResult.getResultList();\r\n return tasks;\r\n }", "ObservableList<Task> getTaskList();", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "@Override\n public List<UserQuery> getQueries(LocalDateTime rangeStart, LocalDateTime rangeEnd) {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(UserQuery.class));\n return handle.createQuery(UserQuery.getExtractQuery(rangeStart, rangeEnd))\n .mapTo(UserQuery.class)\n .list();\n });\n }", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "public List<Task> getpublishTask(Integer uid);", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public static List<TaskTimeElement> findAllByTaskDate(String taskDate) {\r\n String sql = null;\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAllByTaskDate\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT \" +\r\n \"ID\" +\r\n \",DURATION\" +\r\n \",TASKNAME\" +\r\n \",USERNAME\" +\r\n \" FROM TaskTimeElement\" +\r\n \" WHERE TASKDATE=\" + \r\n \"'\" + DatabaseBase.encodeToSql(taskDate) + \"'\" +\r\n \" AND ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object = null;\r\n while (rs.next()) {\r\n object = new TaskTimeElement();\r\n object.setTaskDate(taskDate);\r\n object.setEnabled(true);\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n ret.add(object);\r\n }\r\n } catch (SQLException sqle) {\r\n Trace.error(\"sql = \" + sql, sqle);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "public java.util.List<Todo> findByUuid(String uuid, int start, int end);", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "@GET(\"pomodorotasks/todo\")\n Call<List<PomodoroTask>> pomodorotasksTodoGet(\n @Query(\"user\") String user\n );", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "public TaskList() {\n this.USER_TASKS = new ArrayList<>();\n }", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "@Override\r\n\tpublic List<ExecuteTask> getByOrgByTypeByTime(int organizationId, String taskType, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?) AND \"\r\n\t\t\t\t+ \"task_type = ? AND task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,organizationId,organizationId,taskType,time1,time2);\r\n\t}", "@Override\n public List<Revenue> revenuesForTime(long startTime, long endTime) {\n List<Revenue> revenues = revenueRepository.findAll();\n List<Revenue> foundRevenues = new ArrayList<>();\n for(Revenue revenue : revenues){\n if(revenue.getTimestamp() == startTime || revenue.getTimestamp() == endTime){\n foundRevenues.add(revenue);\n continue;\n }\n if(revenue.getTimestamp() > startTime && revenue.getTimestamp() < endTime ){\n foundRevenues.add(revenue);\n }\n }\n return foundRevenues;\n }", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "public List<String> retrieveByDate(List<String> jobId, String userId,\n Calendar startDate, Calendar endDate) throws DatabaseException, IllegalArgumentException;", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public java.util.List<Todo> filterFindByUserIdGroupId(\n\t\tlong userId, long groupId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "public static List<Task> findByByUserIdAndFinished(long userId,\n\t\tboolean finished) {\n\t\treturn getPersistence().findByByUserIdAndFinished(userId, finished);\n\t}", "void claimTask(String userId, List<TaskSummary> taskList);", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "void completeTask(String userId, List<TaskSummary> taskList, Map<String, Object> results);", "public List<Timetable> getListSearch(String from, String to) throws Exception;", "public java.util.List<Todo> filterFindByG_U_S(\n\t\tlong groupId, long userId, int status, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }" ]
[ "0.7201053", "0.7088928", "0.6927336", "0.68297255", "0.671386", "0.6656387", "0.65443057", "0.6531413", "0.6525823", "0.6514194", "0.6504742", "0.6493541", "0.6465116", "0.64532506", "0.64202946", "0.641097", "0.63906544", "0.63782924", "0.63284135", "0.6279613", "0.6262851", "0.6255391", "0.61942005", "0.6185542", "0.6179703", "0.61601335", "0.61389947", "0.61374146", "0.6127804", "0.6127804", "0.6112788", "0.60810393", "0.607352", "0.60711646", "0.6068435", "0.60683066", "0.60661924", "0.6056751", "0.6055942", "0.6052923", "0.6027913", "0.60254705", "0.59972876", "0.5981109", "0.5980167", "0.5972365", "0.59587413", "0.59580505", "0.5957364", "0.59498554", "0.5948033", "0.5936762", "0.59367335", "0.5925338", "0.5921992", "0.59177345", "0.59120655", "0.58921826", "0.5880651", "0.58623827", "0.5815802", "0.577309", "0.576435", "0.57642263", "0.5757732", "0.57521105", "0.5747849", "0.5735712", "0.5725677", "0.57164663", "0.5716194", "0.5710879", "0.569583", "0.56895673", "0.5688734", "0.56736225", "0.56704074", "0.5664551", "0.5663543", "0.5639541", "0.56375664", "0.56189096", "0.56034803", "0.5601077", "0.5592032", "0.5587091", "0.5581845", "0.5574406", "0.5572094", "0.5560626", "0.55552375", "0.55551124", "0.55524886", "0.55413127", "0.5539691", "0.5519737", "0.5518098", "0.5515475", "0.5513454", "0.55080855" ]
0.7865901
0
retrieveTaskByProjectId method returns all the resources related with projectID
public List<TaskMaster> retrieveTaskByProjectId(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "@GetMapping(\"/getsubtasks/{projectId}/{taskId}\")\n\tpublic List<Subtask> getAllSubtasksProj(@PathVariable (value = \"projectId\") Long projectId, @PathVariable (value = \"taskId\") Long taskId)\n\t{\n\t\tSystem.out.println(\"yes\");\n\t\treturn this.integrationClient.getAllSubtasksProj(projectId, taskId);\n\t}", "void getAllProjectList(int id);", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "Project getById(Long id);", "Task selectByPrimaryKey(String taskid);", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public Collection<Task> getTasksProject(String projectName) {\n\t\tCollection<Task> tasks = new ArrayList<Task>();\n\t\tfor(Task item : m_Tasks){\n\t\t\tif(item.project.equals(projectName)) tasks.add(item);\n\t\t}\n\t\tif(tasks.size() == 0) return null;\n\t\treturn tasks;\n\t}", "TrackerProjects getTrackerProjects(final Integer id);", "Project findProjectById(String projectId);", "List<Task> getAllTasks();", "List<Task> getTaskdetails();", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "Project findProjectById(Long projectId);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef retrieve(Long task_id) {\n return TaskDefIntegrationService.find(task_id);\n }", "public List<Project> getAllProjects();", "@OneToMany(mappedBy=\"project\", fetch=FetchType.EAGER)\n\t@Fetch(FetchMode.SUBSELECT)\n\t@JsonIgnore\n\tpublic List<Task> getTasks() {\n\t\treturn this.tasks;\n\t}", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "TrackerProjects loadTrackerProjects(final Integer id);", "public Project getProject(Long projectId);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@GET\n\t@Path(\"getParticularProject/{projectId}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getParticularProject(\n\t\t\t@PathParam(\"projectId\") Integer projectId) throws Exception {\n\n\t\tProjectTO projectTO = null;\n\n\t\ttry {\n\t\t\tHashMap<String, Object> queryMap = new HashMap<String, Object>();\n\t\t\tqueryMap.put(\"projectId\", projectId);\n\n\t\t\tProjectMaster project = (ProjectMaster) GenericDaoSingleton\n\t\t\t\t\t.getGenericDao().findUniqueByQuery(\n\t\t\t\t\t\t\tConstantQueries.GET_PARTICULAR_PROJECT_BY_ID,\n\t\t\t\t\t\t\tqueryMap);\n\n\t\t\tif (project == null) {\n\t\t\t\tSystem.out.println(\"Project not found\");\n\t\t\t\tprojectTO = null;\n\t\t\t\treturn Response.status(Response.Status.NOT_FOUND)\n\t\t\t\t\t\t.entity(projectTO).build();\n\t\t\t}\n\n\t\t\tprojectTO = new ProjectTO();\n\t\t\t// projectMaster = (Object[]) projectList.get(i);\n\t\t\tprojectTO.setProject_id(project.getProject_id());\n\t\t\tprojectTO.setProject_name(project.getProject_name());\n\t\t\tprojectTO.setProject_status(project.getProject_status());\n\t\t\tprojectTO.setProject_creation_date(project\n\t\t\t\t\t.getProject_creation_date());\n\t\t\tprojectTO.setAccount_id(project.getAccountMaster().getAccount_id());\n\n\t\t\treturn Response.status(Response.Status.OK).entity(projectTO)\n\t\t\t\t\t.build();\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t\tprojectTO = null;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Error while getting Projects in Project Config service\");\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR)\n\t\t\t\t\t.entity(projectTO).build();\n\t\t}\n\n\t}", "List<Workflow> findByIdTask( int nIdTask );", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "java.lang.String getProjectId();", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "List <ProjectAssignment> findAssignmentsByProject (int projectId);", "@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }", "@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}", "public Object getProjectResources(Integer projectId) {\n\t\treturn null;\n\t}", "public List<Task> getAllTasksForUser(long userId);", "Set<Task> getAllTasks();", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "public Projects findByProjectID(int proj_id){\n\t\tString sql = \"select * from projects where proj_id = \"+proj_id;\n\t\treturn getJdbcTemplate().queryForObject(sql, new BeanPropertyRowMapper<Projects>(Projects.class));\n\t}", "@RequestMapping(value = \"/tasks/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<TaskDTO> getTask(@PathVariable Long id) {\n log.debug(\"REST request to get Task : {}\", id);\n TaskDTO taskDTO = taskService.findOne(id);\n return Optional.ofNullable(taskDTO)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}", "public static Task fetchByPrimaryKey(long taskId) {\n\t\treturn getPersistence().fetchByPrimaryKey(taskId);\n\t}", "public List<Testcasemodel> gettestcasebyprojectid(String projectid) {\n\t\treturn mongorepo.findByProjectid(projectid);\n\t}", "public String retrieveLastTaskIdOfProject(Long projectId);", "@GetMapping(value = \"/getProjectDetails/mongodb/{theId}\")\n\tpublic List<ProjectDescStake> getProjectByIdMongo(@PathVariable (value =\"theId\") Long theId)\n\t{\n\t\treturn this.integrationClient.findProjectByIdMongo(theId);\n\t}", "TrackerTasks getTrackerTasks(final Integer id);", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "Project selectByPrimaryKey(Long id);", "_task selectByPrimaryKey(Integer taskid);", "@GET(\"projects/session/{session_id}\")\n Call<ResponseBody> getAllProjects(@Path(\"session_id\") int id);", "public List<Project> getAllProject(boolean isDeleted) throws EmployeeManagementException;", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}", "@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}", "@ApiModelProperty(\n example = \"00000000-0000-0000-0000-000000000000\",\n value =\n \"Identifier of the project, that the task (which the time entry is logged against)\"\n + \" belongs to.\")\n /**\n * Identifier of the project, that the task (which the time entry is logged against) belongs to.\n *\n * @return projectId UUID\n */\n public UUID getProjectId() {\n return projectId;\n }", "public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "public Project findProjectById(String projectId) {\n\t\tProject project = null;\r\n\t\tString query = \"SELECT FROM TA_PROJECTS WHERE PROJECT_ID='\" + projectId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t}\r\n\t\treturn project;\r\n\t}", "@Override\n\tpublic Teatask getById(int taskid)\n\t{\n\t\treturn teataskMapper.getById(taskid);\n\t}", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "@Override\n\tpublic List<Calendar> getEventsByProjectId(int id) {\n\t\treturn projectDao.getEventsByProjectId(id);\n\t}", "public String getProjectId() {\n return projectId;\n }", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public String getProjectId() {\r\n return projectId;\r\n }", "void getAllProjectList(int id, UserType userType);", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "@GetMapping(\"/projects/{projectName:\" + Constants.ENTITY_ID_REGEX + \"}\")\n @Timed\n public ResponseEntity<ProjectDTO> getProject(@PathVariable String projectName)\n throws NotAuthorizedException {\n checkPermission(token, PROJECT_READ);\n log.debug(\"REST request to get Project : {}\", projectName);\n ProjectDTO projectDto = projectService.findOneByName(projectName);\n checkPermissionOnOrganizationAndProject(token, PROJECT_READ,\n projectDto.getOrganization().getName(), projectDto.getProjectName());\n return ResponseEntity.ok(projectDto);\n }", "public Integer getProjectId() {\n return projectId;\n }", "@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}", "@GetMapping(\"/project\")\n public Object doGet(){\n return service.getAllProjects();\n }", "public Long getProjectId() {\n return projectId;\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "public Task getTask(final int id) {\n return tasks.get(id);\n }", "public List<Project> findProjectByEmpId(String employeeId) {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT P.`PROJECT_ID`,PROJECT_NAME,MANAGER_ID FROM TA_PROJECTS P JOIN TA_EMPLOYEE_PROJECT E ON E.`PROJECT_ID` = P.`PROJECT_ID`\"\r\n\t\t\t\t+ \" WHERE EMPLOYEE_ID='\" + employeeId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "@Transactional(readOnly = true)\r\n public DirectProjectCPConfig get(long directProjectId) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".get(long directProjectId)\";\r\n\r\n return getEntity(signature, DirectProjectCPConfig.class, directProjectId, \"directProjectId\");\r\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public void Found_project_from_DATABASE(int id){\n print_pro();\n// return project;\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}", "@GetMapping(\"/tasks/{id}\")\n public ResponseEntity<Task> getTaskById(@PathVariable Long id){\n Task task = taskRepository.findById(id)\n .orElseThrow(() -> new ResourceNotFoundException(\"Task not found with Id of \" + id));\n return ResponseEntity.ok(task);\n }", "public Project getProjectRelatedByProjectId() throws TorqueException\n {\n if (aProjectRelatedByProjectId == null && (this.projectId != 0))\n {\n aProjectRelatedByProjectId = ProjectPeer.retrieveByPK(SimpleKey.keyFor(this.projectId));\n \n /* The following can be used instead of the line above to\n guarantee the related object contains a reference\n to this object, but this level of coupling\n may be undesirable in many circumstances.\n As it can lead to a db query with many results that may\n never be used.\n Project obj = ProjectPeer.retrieveByPK(this.projectId);\n obj.addNewslettersRelatedByProjectId(this);\n */\n }\n return aProjectRelatedByProjectId;\n }", "public Integer getProjectId() {\n return projectId;\n }", "public Integer getProjectId() {\n return projectId;\n }", "public Task getTask(int index) {\n return records.get(index);\n }", "public Meeting[] getAllMeetingsForProject(int projectId)\n throws Exception\n {\n Connection connection = null;\n Vector meetings = new Vector();\n \n try\n {\n connection = ConnectionManager.getConnection();\n PreparedStatement pstmt = connection.prepareStatement(\"select id from meetings where project_id=?\", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n pstmt.setInt(1, projectId);\n \n ResultSet rs = pstmt.executeQuery();\n while(rs.next())\n {\n Meeting meeting = getMeeting(rs.getInt(1));//event, rs.getInt(1));\n if(meeting != null)\n meetings.add(meeting);\n }\n \n rs.close();\n pstmt.close();\n }\n catch(SQLException se)\n {\n se.printStackTrace();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n if(connection != null)\n {\n connection.close();\n }\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n return (Meeting[])meetings.toArray(new Meeting[meetings.size()]);\n }", "public Task getTask(Integer tid);", "public Project getProject(int projectId) throws EmployeeManagementException;", "@GetMapping(\"\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic List<Project> getProjects()\n\t{\n\t\treturn projectService.findAll();\n\t}", "@Transactional(readOnly = true) \n public Page<TaskProject> findAll(Pageable pageable) {\n log.debug(\"Request to get all TaskProjects\");\n Page<TaskProject> result = taskProjectRepository.findAll(pageable);\n return result;\n }", "TaskList getList();", "ProjectDTO findProjectById(Long id);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public void setProjectId(Integer projectId) {\n this.projectId = projectId;\n }" ]
[ "0.77645767", "0.76359016", "0.74228907", "0.7420023", "0.6807943", "0.6761012", "0.66521055", "0.6613317", "0.6521949", "0.64918953", "0.6279984", "0.61802846", "0.6143644", "0.614149", "0.6123777", "0.611924", "0.6114541", "0.61054903", "0.6038369", "0.6037825", "0.60313195", "0.6029662", "0.60210115", "0.6020148", "0.6010186", "0.59979147", "0.59545135", "0.5952607", "0.5945368", "0.5941542", "0.591316", "0.59087104", "0.59066415", "0.58952343", "0.58739704", "0.5812149", "0.5796487", "0.5788457", "0.57818234", "0.57781786", "0.57643604", "0.57615656", "0.575313", "0.5738561", "0.57300496", "0.57198936", "0.5718126", "0.5662266", "0.5662174", "0.5653276", "0.5648796", "0.5642992", "0.56155807", "0.56034034", "0.56017536", "0.5600166", "0.55959576", "0.5593878", "0.5588353", "0.55871546", "0.5583287", "0.5582206", "0.557744", "0.55723953", "0.5550548", "0.5545623", "0.5539726", "0.5536829", "0.5528148", "0.55196697", "0.55189556", "0.55065244", "0.5505186", "0.5488667", "0.548844", "0.5476439", "0.5476011", "0.54746014", "0.5471359", "0.5469166", "0.5467693", "0.54672605", "0.5463423", "0.54625905", "0.5457481", "0.5456214", "0.5449687", "0.5445999", "0.54458797", "0.54458797", "0.5436551", "0.5428279", "0.5411225", "0.54089105", "0.54028755", "0.53982013", "0.5395659", "0.53835076", "0.5377456", "0.53754914" ]
0.79025596
0
retrieveTaskByMilestoneId method returns all the task related with milestoneID
public List<TaskMaster> retrieveTaskByMilestoneId(Long milestoneId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "TrackerTasks getTrackerTasks(final Integer id);", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "TrackerTasks loadTrackerTasks(final Integer id);", "List<Workflow> findByIdTask( int nIdTask );", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef retrieve(Long task_id) {\n return TaskDefIntegrationService.find(task_id);\n }", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "@RequestMapping(value = \"/tasks/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<TaskDTO> getTask(@PathVariable Long id) {\n log.debug(\"REST request to get Task : {}\", id);\n TaskDTO taskDTO = taskService.findOne(id);\n return Optional.ofNullable(taskDTO)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);", "public Task getTaskById(Long id ) {\n\t\treturn taskRepo.getOne(id);\n\t}", "@Nullable\n public Task getTask(int id) {\n Task output = null;\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return null;\n\n // run the query to get the matching task\n Cursor rawTask = db.rawQuery(\"SELECT * FROM Tasks WHERE id = ? ORDER BY due_date ASC;\", new String[]{String.valueOf(id)});\n\n // move the cursor to the first result, if one exists\n if (rawTask.moveToFirst()) {\n // convert the cursor to a task and assign it to our output\n output = new Task(rawTask);\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTask.close();\n db.close();\n\n // return the (possibly null) output\n return output;\n }", "TrackerProjects loadTrackerProjects(final Integer id);", "public Task getTask(final int id) {\n return tasks.get(id);\n }", "@GetMapping(\"/tasks/{id}\")\n public ResponseEntity<Task> getTaskById(@PathVariable Long id){\n Task task = taskRepository.findById(id)\n .orElseThrow(() -> new ResourceNotFoundException(\"Task not found with Id of \" + id));\n return ResponseEntity.ok(task);\n }", "@Override\n\tpublic Teatask getById(int taskid)\n\t{\n\t\treturn teataskMapper.getById(taskid);\n\t}", "TrackerProjects getTrackerProjects(final Integer id);", "Task selectByPrimaryKey(String taskid);", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "@Override\n public String getTask(String id) {\n JSONObject response = new JSONObject();\n try {\n ITaskInstance task = dataAccessTosca.getTaskInstance(id);\n if (task != null) {\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(id);\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n\n return response.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "@Override\n public Optional<Task> getTaskById(UUID id)\n {\n return null;\n }", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "List<Task> getTaskdetails();", "@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@Override\n\tpublic DetailedTask selectTask(int id) throws SQLException, ClassNotFoundException\n\t{\n\t\t DetailedTask returnValue = null;\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectTask)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task WHERE id=\"+id+\";\" );\n\t rs.next();\n\n\t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t returnValue = new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class),\n\t \t\t rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\"));\n\t \n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t return returnValue;\n\t}", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<String> finddetails(long id ) {\n id=id-1;\n Log.d(SimpleTodoActivity.APP_TAG, \"findspecific triggered with ID----->\"+id);\n List<String> tasks = new ArrayList<String>();\n\n try{\n String query = \"SELECT * FROM \"+TABLE_NAME+\" WHERE id=\" + id +\";\";\n\n Cursor c = storage.rawQuery(query, null);\n if (c.moveToFirst()){\n do{\n String title = c.getString(c.getColumnIndex(KEY_TITLE));\n String description = c.getString(c.getColumnIndex(KEY_DESCRIPTION));\n String priority=c.getString(c.getColumnIndex(KEY_PRIORITY));\n String task_date=c.getString(c.getColumnIndex(KEY_TASKDATE));\n String task_group=c.getString(c.getColumnIndex(KEY_GROUP_NAME));\n tasks.add(title);\n tasks.add(description);\n tasks.add(priority);\n tasks.add(task_group);\n tasks.add(task_date);\n }while(c.moveToNext());\n }\n c.close();\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n\n return tasks;\n }", "public Task getTaskById(int id) {\n\t\t\n\t\tfor(Task task: tasks) {\n\t\t\tif(task.getId()==id)\n\t\t\t\treturn task;\n\t\t}\n\t\t\t\n\t\tthrow new NoSuchElementException(\"Invalid Id:\"+id);\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }", "@GetMapping(\"/vehicle-tasks/{id}\")\n @Timed\n @Secured(AuthoritiesConstants.ADMIN)\n public ResponseEntity<VehicleTask> getVehicleTask(@PathVariable Long id) {\n log.debug(\"REST request to get VehicleTask : {}\", id);\n VehicleTask vehicleTask = vehicleTaskService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(vehicleTask));\n }", "@Override\r\n\tpublic ExecuteTask get(int memberId,int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_member_id = ? AND er_task_id = ?\";\r\n\t\treturn get(sql,memberId,taskId);\r\n\t}", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "public static Task fetchByPrimaryKey(long taskId) {\n\t\treturn getPersistence().fetchByPrimaryKey(taskId);\n\t}", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "TrackerReminders loadTrackerReminders(final Integer id);", "Object getTaskId();", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public Task getTask(Integer tid);", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "_task selectByPrimaryKey(Integer taskid);", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public String getMilestoneId()\n {\n String milestoneId;\n //---------------------\n milestoneId = \"ninguna\";\n\n\n if(\n (!Blackboard.firstMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n {\n milestoneId = \"primeraMilestone\";\n }//end if\n\n if(\n (!Blackboard.secondMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8)\n )\n {\n milestoneId = \"segundaMilestone\";\n }//end if\n\n if(\n (!Blackboard.thirdMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n {\n milestoneId = \"terceraMilestone\";\n }//end if\n\n if(\n (!Blackboard.finalMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][0] == 13) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n )\n {\n milestoneId = \"finalMilestone\";\n }//end if\n\n return milestoneId;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMember(int memberId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ?\";\r\n\t\treturn getForList(sql,memberId);\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public List<UserPlanTask> UserPlanTaskEdit(long task_id) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n\r\n List<UserPlanTask> EditTask = null;\r\n try {\r\n EditTask = session.createQuery(\"from UserPlanTask where taskId='\" + task_id + \"'\").list();\r\n } catch (HibernateException HE) {\r\n System.out.println(HE);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return EditTask;\r\n }", "Project getById(Long id);", "public static List<Task> findByUser(String userID){\n return null;\n }", "private Task getTask(Integer identifier) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(identifier)) {\n return nextTask;\n }\n }\n\n return null;\n }", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "Set<Task> getAllTasks();", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public List<Task> getAllTasksForUser(long userId);", "public ProcessStep getProcessStepById(int processstepid) {\n\t\tthis.em = EMF.createEntityManager();\r\n\t\t\r\n\t\tList<ProcessStep> content = new ArrayList<ProcessStep>();\r\n\t\tQuery query = em.createQuery(Constants.PROCESSSTEP_ID);\r\n\t\tquery.setParameter(\"processstepid\", processstepid);\r\n\t\tcontent = query.getResultList();\r\n\t\tSystem.out.println(content.get(0));\r\n\t\treturn content.get(0);\r\n\r\n\t}", "public Mission getMissionById(Long id) throws IllegalArgumentException;", "String getTaskId();", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<TaskSummary> getTasksByProcessInstance(Long processInstanceId, Status taskStatus) {\n TaskServiceSession taskSession = null;\n try {\n StringBuilder qBuilder = new StringBuilder(\"select new org.jbpm.task.query.TaskSummary(t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) \");\n qBuilder.append(\"from Task t \");\n qBuilder.append(\"left join t.taskData.createdBy \");\n qBuilder.append(\"left join t.taskData.actualOwner \");\n qBuilder.append(\"left join t.subjects as subject \");\n qBuilder.append(\"left join t.descriptions as description \");\n qBuilder.append(\"left join t.names as name \");\n qBuilder.append(\"where t.taskData.processInstanceId = \");\n qBuilder.append(processInstanceId);\n if(taskStatus != null) {\n qBuilder.append(\" and t.taskData.status = '\");\n qBuilder.append(taskStatus.name());\n qBuilder.append(\"'\");\n }\n taskSession = taskService.createSession();\n uTrnx.begin();\n List<TaskSummary> taskSummaryList = (List<TaskSummary>)taskSession.query(qBuilder.toString(), 10, 0);\n uTrnx.commit();\n return taskSummaryList;\n }catch(Exception x) {\n throw new RuntimeException(x);\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "TrackerAssigned loadTrackerAssigned(final Integer id);", "@Override\n public Map<String, Object> queryTaskGroupById(User loginUser, Integer id) {\n Map<String, Object> result = new HashMap<>();\n if (isNotAdmin(loginUser, result)) {\n return result;\n }\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n result.put(Constants.DATA_LIST, taskGroup);\n putMsg(result, Status.SUCCESS);\n return result;\n }", "public Todo retrieveTodos(int id) {\n\t\tfor (Todo todo : todos) {\n\t\t\tif (todo.getId() == id) {\n\t\t\t\treturn todo;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "List <ProjectAssignment> findAssignmentsForEmployee (int employeeId);", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "List<Task> getAllTasks();", "public Todo fetchByPrimaryKey(long todoId);", "void getAllProjectList(int id);", "@Override\n public String toString() {\n return \"Task no \"+id ;\n }", "public TaskDetails getSpecificTask (int position){\n return taskList.get(position);\n }", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<Project> findProjectByEmpId(String employeeId) {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT P.`PROJECT_ID`,PROJECT_NAME,MANAGER_ID FROM TA_PROJECTS P JOIN TA_EMPLOYEE_PROJECT E ON E.`PROJECT_ID` = P.`PROJECT_ID`\"\r\n\t\t\t\t+ \" WHERE EMPLOYEE_ID='\" + employeeId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "@Transactional(readOnly=true)\n\tpublic List<Film> getFilmInfoAboveId(int id) {\n\t\tList<Film> films = filmRepository.findByFilmIdGreaterThan(id);\n\t\t\n\t\tfor(Film film : films) {\n\t\t\t// call the getter to load the data to cache\n\t\t\tfor(FilmActor actor : film.getFilmActors()) {\n\t\t\t\t// do nothing here\n\t \t}\n\t\t}\n\t\n\t\treturn films;\n\t}", "TbCrmTask selectByPrimaryKey(Long id);", "public MobileTaskAssignmentDTO getByIdDTO(int taskId) {\r\n\t\treturn (MobileTaskAssignmentDTO) sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\"select mob.taskId as taskId, mob.orderId as orderId, mob.orderDate as orderDate, mob.customerId as customerId, \" +\r\n\t\t\t\t\t\t\"mob.customerName as customerName, mob.customerAddress as customerAddress, \" +\r\n\t\t\t\t\t\t\"mob.customerPhone as customerPhone, mob.customerZipcode as customerZipcode, mob.customerSubZipcode as customerSubZipcode, \" +\r\n\t\t\t\t\t\t\"mob.customerRt as customerRt, mob.customerRw as customerRw, mob.priority as priority, \" +\r\n\t\t\t\t\t\t\"mob.notes as notes, mob.verifyBy as verifyBy, mob.verifyDate as verifyDate, \" +\r\n\t\t\t\t\t\t\"mob.assignmentDate as assignmentDate, mob.retrieveDate as retrieveDate, mob.submitDate as submitDate, \" +\r\n\t\t\t\t\t\t\"mob.finalizationDate as finalizationDate, mob.receiveDate as receiveDate, mob.assignmentStatus as assignmentStatus, \" +\r\n\t\t\t\t\t\t\"mob.user.userId as userId, mob.user.userCode as userCode, mob.user.userName as userName, \" +\r\n\t\t\t\t\t\t\"mob.office.officeId as officeId, mob.office.officeCode as officeCode, mob.office.officeName as officeName, \" +\r\n\t\t\t\t\t\t\"mob.office.company.coyId as coyId, mob.office.company.coyCode as coyCode, mob.office.company.coyName as coyName, \" +\r\n\t\t\t\t\t\t\"mob.product.productId as productId, mob.product.productCode as productCode, mob.product.productName as productName, \" +\r\n\t\t\t\t\t\t\"mob.product.template.tempId as tempId, mob.product.template.tempLabel as tempLabel, \" +\r\n\t\t\t\t\t\t\"mob.taskStatus.taskStatusId as taskStatusId, mob.taskStatus.taskStatusCode as taskStatusCode, mob.taskStatus.taskStatusName as taskStatusName \" +\r\n\t\t\t\t\t\t\"from \" + domainClass.getName() + \" mob \" +\r\n\t\t\t\t\t\t\"where mob.taskId = :taskId\")\r\n\t\t\t\t\t\t.setInteger(\"taskId\", taskId)\r\n\t\t\t\t\t\t.setResultTransformer(Transformers.aliasToBean(MobileTaskAssignmentDTO.class))\r\n\t\t\t\t\t\t.uniqueResult();\r\n\t}", "public List<String> getWorkingProject(String id, String string) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tString query=null;\n\t\tjdbc JDBC=new jdbc();\n\t\t\n\t\tif(string.equals(\"projects\"))\n\t\t query=\"select P_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"startdate\"))\n\t\t query=\"select startDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"duedate\"))\n\t\t query=\"select DueDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"supervisor\"))\n\t\t query=\"select emp_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\ttry {\n\t\t\tSystem.out.println(query);\n\t\t\tResultSet rs=JDBC.stat.executeQuery(query);\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tlist.add(rs.getString(1));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "TrackerAssigned getTrackerAssigned(final Integer id);", "List <ProjectAssignment> findAssignmentsByProject (int projectId);", "public TaskSummary getTask(Long taskId){\n TaskServiceSession taskSession = null;\n try {\n taskSession = jtaTaskService.createSession();\n Task taskObj = taskSession.getTask(taskId);\n TaskSummary tSummary = new TaskSummary();\n tSummary.setActivationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setActualOwner(taskObj.getTaskData().getActualOwner());\n tSummary.setCreatedBy(taskObj.getTaskData().getCreatedBy());\n tSummary.setCreatedOn(taskObj.getTaskData().getCreatedOn());\n tSummary.setDescription(taskObj.getDescriptions().get(0).getText());\n tSummary.setExpirationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setId(taskObj.getId());\n tSummary.setName(taskObj.getNames().get(0).getText());\n tSummary.setPriority(taskObj.getPriority());\n tSummary.setProcessId(taskObj.getTaskData().getProcessId());\n tSummary.setProcessInstanceId(taskObj.getTaskData().getProcessInstanceId());\n tSummary.setStatus(taskObj.getTaskData().getStatus());\n tSummary.setSubject(taskObj.getSubjects().get(0).getText());\n return tSummary;\n }catch(RuntimeException x) {\n throw x;\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }", "public Project getProjectDetails(String id) {\n\t\tProject pro;\n\t\tObject name = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet res = null;\n\t\tpro = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcon = DBUtility.getConnection();\n\t\t\t\tString sql = \"select * from project_master where project_id='\"\n\t\t\t\t\t\t+ id + \"'\";\n\t\t\t\tst = con.prepareStatement(sql);\n\t\t\t\tres = st.executeQuery(sql);\n\t\t\t\tif (res.next()) {\n\t\t\t\t\tpro = new Project();\n\t\t\t\t\tpro.setPro_name(res.getString(\"project_name\"));\n\t\t\t\t\tpro.setSite_addr(res.getString(\"project_location\"));\n\t\t\t\t\tpro.setC_name(res.getString(\"client_name\"));\n\t\t\t\t\tpro.setDate(res.getString(\"project_date\"));\n\t\t\t\t\tpro.setSite_details(res.getString(\"project_details\"));\n\t\t\t\t\tpro.setSite_no_floors(res.getString(\"project_no_floor\"));\n\t\t\t\t\tpro.setSite_no_units(res.getString(\"project_no_unit\"));\n\t\t\t\t\tpro.setGar_name(res.getString(\"gar_name\"));\n\t\t\t\t\tpro.setGar_rel(res.getString(\"gar_rel\"));\n\t\t\t\t\tpro.setMunicipality(res.getString(\"municipality\"));\n\t\t\t\t\tpro.setWord_no(res.getString(\"word_no\"));\n\t\t\t\t\tpro.setPro_typ(res.getString(\"project_type\"));\n\t\t\t\t\tpro.setContact1(res.getString(\"Contact1\"));\n\t\t\t\t\tpro.setContact2(res.getString(\"Contact2\"));\n\t\t\t\t\tpro.setEmail1(res.getString(\"Email1\"));\n\t\t\t\t\tpro.setEmail2(res.getString(\"Email2\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException s) {\n\t\t\t\ts.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t\treturn null;\n\t\t\t} catch (NamingException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t\t}\n\t\t} finally {\n\t\t\tDBUtility.closeConnection(con, st, res);\n\t\t}\n\t\treturn pro;\n\t}", "@Override\n public Optional<Seq> getbyid(int id) {\n \tConnection conn = null;\n \tPreparedStatement pstmt=null;\n \tResultSet rs;\n \tSeq seq=null;\n ProcessesDAO pdao = new ProcessesDAO();\n \ttry {\n \t\tString url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n \t\tconn = DriverManager.getConnection(url);\n\t \tpstmt = conn.prepareStatement(\n\t \t \"select * from seq where id =?\");\n\t \t \n\t \tpstmt.setInt(1,id); \n\t\n\t \trs = pstmt.executeQuery();\n\t \twhile (rs.next()) {\n\t \t\tseq = new Seq(rs.getInt(\"id\"), pdao.getbyidentifier(rs.getString(\"identifier\")), rs.getInt(\"seq_number\"));\n\t \t}\n\t \trs.close(); \n\t \tpstmt.close();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n \ttry {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n\n }\n return Optional.of(seq);\n }", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "@Override\r\n\tpublic Log get(int id) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tLog log = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetById);\r\n\t\t\tps.setInt(1, id);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tlog = generate(rs);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn log;\r\n\t}", "@GetMapping(value=\"/getAllsubtasks/{empId}\")\n\tpublic List<Subtask> getAllsubtask(@PathVariable (value = \"empId\") Long empId)\n\t{\n\t\treturn this.integrationClient.getAllSubtasks(empId);\n\t}", "public ToDo getToDo(String id) {\n return Arrays.stream(allTodos).filter(x -> x._id.equals(id)).findFirst().orElse(null);\n }", "@GetMapping(value=\"/{taskId}\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic TaskDTO getTask(@PathVariable(\"taskId\") Integer taskId)\n\t{\n\t\treturn taskService.getTaskDTO(taskId);\n\t}", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public ToDoList getItem(int key_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_NAME, new String[]{KEY_ID,\n TITLE, DETAILS}, KEY_ID + \"=?\",\n new String[]{String.valueOf(key_id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n ToDoList itemFound = new ToDoList(cursor.getString(1), cursor.getString(2), cursor.getInt(0));\n return itemFound;\n }", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "TrackerReminders getTrackerReminders(final Integer id);", "@Override\n public Movie getFromId (Integer id) {return this.movies.get(id);}", "TrackerListTasktype loadTrackerListTasktype(final Integer id);" ]
[ "0.63683593", "0.61399275", "0.6051558", "0.5995317", "0.5990614", "0.59215534", "0.5824003", "0.58159304", "0.5771775", "0.5738684", "0.5734139", "0.56652844", "0.56585175", "0.56010807", "0.55702776", "0.5560782", "0.5511116", "0.55028796", "0.5479841", "0.5462816", "0.5449984", "0.5430543", "0.54264295", "0.5421923", "0.54131263", "0.53719324", "0.53685826", "0.5361956", "0.53410643", "0.53240186", "0.5256035", "0.5239137", "0.52241963", "0.5221775", "0.5202549", "0.5120732", "0.51153237", "0.5114147", "0.5101229", "0.50935006", "0.50797135", "0.5051971", "0.50374043", "0.5035697", "0.5016705", "0.50064385", "0.49995157", "0.499694", "0.4975098", "0.496184", "0.49612886", "0.49475086", "0.49340323", "0.4927477", "0.49231258", "0.4913394", "0.49066916", "0.48969615", "0.48759654", "0.48727587", "0.48720333", "0.48717973", "0.48691607", "0.48472548", "0.4845274", "0.4841827", "0.48338774", "0.4830521", "0.48233977", "0.4812506", "0.48102686", "0.47979286", "0.47970045", "0.4791392", "0.47603264", "0.47531906", "0.47454473", "0.4737483", "0.47342896", "0.4729774", "0.47278357", "0.47221887", "0.47162238", "0.47129312", "0.47117868", "0.46988693", "0.46867394", "0.46848422", "0.46847764", "0.46841696", "0.4680536", "0.4677311", "0.4672811", "0.4667261", "0.4665549", "0.46514127", "0.46442896", "0.4638285", "0.46375206", "0.46349627" ]
0.82982063
0
Get list of completed task by project ID
public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "List<Task> getTaskdetails();", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "List<Task> getAllTasks();", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}", "void getAllProjectList(int id);", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "java.util.List<String>\n getTaskIdList();", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "TrackerTasks getTrackerTasks(final Integer id);", "TaskList getList();", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "@GetMapping(\"/getsubtasks/{projectId}/{taskId}\")\n\tpublic List<Subtask> getAllSubtasksProj(@PathVariable (value = \"projectId\") Long projectId, @PathVariable (value = \"taskId\") Long taskId)\n\t{\n\t\tSystem.out.println(\"yes\");\n\t\treturn this.integrationClient.getAllSubtasksProj(projectId, taskId);\n\t}", "public List<TaskDescription> getActiveTasks();", "Set<Task> getAllTasks();", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "@OneToMany(mappedBy=\"project\", fetch=FetchType.EAGER)\n\t@Fetch(FetchMode.SUBSELECT)\n\t@JsonIgnore\n\tpublic List<Task> getTasks() {\n\t\treturn this.tasks;\n\t}", "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();", "public List<Task> listTasks(String extra);", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "public List<Task> getAllTasksForUser(long userId);", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "ObservableList<Task> getTaskList();", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "public String retrieveLastTaskIdOfProject(Long projectId);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "Object getTaskId();", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "String getTaskId();", "List<Workflow> findByIdTask( int nIdTask );", "public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }", "net.zyuiop.ovhapi.api.objects.license.Task getServiceNameTasksTaskId(java.lang.String serviceName, long taskId) throws java.io.IOException;", "public Collection<Task> getTasksProject(String projectName) {\n\t\tCollection<Task> tasks = new ArrayList<Task>();\n\t\tfor(Task item : m_Tasks){\n\t\t\tif(item.project.equals(projectName)) tasks.add(item);\n\t\t}\n\t\tif(tasks.size() == 0) return null;\n\t\treturn tasks;\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "TrackerTasks loadTrackerTasks(final Integer id);", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "@Override\n public String getTask(String id) {\n JSONObject response = new JSONObject();\n try {\n ITaskInstance task = dataAccessTosca.getTaskInstance(id);\n if (task != null) {\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(id);\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n\n return response.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "void completeTask(String userId, List<TaskSummary> taskList, Map<String, Object> results);", "Set<Task> getDependentTasks();", "public List<String> getWorkingProject(String id, String string) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tString query=null;\n\t\tjdbc JDBC=new jdbc();\n\t\t\n\t\tif(string.equals(\"projects\"))\n\t\t query=\"select P_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"startdate\"))\n\t\t query=\"select startDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"duedate\"))\n\t\t query=\"select DueDate from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\telse if(string.equals(\"supervisor\"))\n\t\t query=\"select emp_id from Team where emp_id1=\"+id+\" OR emp_id2=\"+id+\" OR emp_id2=\"+id;\n\t\ttry {\n\t\t\tSystem.out.println(query);\n\t\t\tResultSet rs=JDBC.stat.executeQuery(query);\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tlist.add(rs.getString(1));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public List<Task> getTasks() {\n return this.tasks;\n }", "public List<TaskMaster> retrieveTaskByMilestoneId(Long milestoneId);", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public List<Task> getToDoList()\r\n {\r\n return toDoList;\r\n }", "public ArrayList<Task> getList() {\n return tasks;\n }", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "String getTaskId(int index);", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "public Task getTask(final int id) {\n return tasks.get(id);\n }", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "@Path(\"/{id:[0-9][0-9]*}/tags\")\n public TagResource listTasks(@PathParam(\"id\") Long id) {\n return tags;\n }", "@GET\n @Path(\"/job/{id}/tasks\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobTasks(@PathParam(\"id\") String jobId) {\n LGJob lg = Utils.getJobManager().getJob(jobId);\n if (null == lg) {\n return Response.status(404).entity(\"Not found\").build();\n }\n JSONObject result = new JSONObject();\n result.put(\"tasks\",getTasksHelper(lg));\n return Response.status(200).entity(result.toString(1)).build();\n }", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "public ArrayList<Task> getTaskList() {\n return tasks;\n }", "TrackerProjects getTrackerProjects(final Integer id);", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public ArrayList<Task> listConcluded() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 100) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "public void listAllTasks() {\n System.out.println(LINEBAR);\n if (tasks.taskIndex == 0) {\n ui.printNoItemInList();\n System.out.println(LINEBAR);\n return;\n }\n\n int taskNumber = 1;\n for (Task t : tasks.TaskList) {\n System.out.println(taskNumber + \". \" + t);\n taskNumber++;\n }\n System.out.println(LINEBAR);\n }", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "public List<File> getTasks() {\n return tasks;\n }", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public CommandResult execute() {\n String message = tasks.listTasks(keyWord);\n return new CommandResult(message);\n }", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public List<TaskItem> zGetTasks(TaskStatus status) throws HarnessException {\n\n\t\tList<TaskItem> items = null;\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\t\t\tString tasklocator = rowLocator + \"/div[\" + i + \"]\";\n\n\t\t\tString id = this.sGetAttribute(\"xpath=(\" + tasklocator + \")@id\");\n\t\t\tif (Locators._newTaskBannerId.equals(id)) {\n\t\t\t\t// Skip the \"Add New Task\" row\n\t\t\t\tcontinue;\n\t\t\t} else if (Locators._upComingTaskListHdr.equals(id)) {\n\t\t\t\t// Found a status separator\n\n\t\t\t\tString text = this.sGetText(tasklocator);\n\t\t\t\tif ((\"Past Due\".equals(text)) && (status == TaskStatus.PastDue)) {\n\n\t\t\t\t\titems = new ArrayList<TaskItem>();\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if ((\"Upcoming\".equals(text))\n\t\t\t\t\t\t&& (status == TaskStatus.Upcoming)) {\n\n\t\t\t\t\titems = new ArrayList<TaskItem>();\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if ((\"No Due Date\".equals(text))\n\t\t\t\t\t\t&& (status == TaskStatus.NoDueDate)) {\n\n\t\t\t\t\titems = new ArrayList<TaskItem>();\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\t// If a list already exists, then we've just completed it\n\t\t\t\tif (items != null)\n\t\t\t\t\treturn (items);\n\n\t\t\t} else if (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\t// If the list is initialized, then we are in the correct list\n\t\t\t\t// section\n\t\t\t\tif (items == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\t// TODO: extract the info from the GUI\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t} else {\n\t\t\t\tlogger.warn(\"Unknown task row ID: \" + id);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// If items is still null, then we didn't find any matching tasks\n\t\t// Just return an empty list\n\t\tif (items == null)\n\t\t\titems = new ArrayList<TaskItem>();\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "@RequestMapping(value=\"/tasks\", method = RequestMethod.GET)\npublic @ResponseBody List<Task> tasks(){\n\treturn (List<Task>) taskrepository.findAll();\n}", "public ArrayList<Task> list() {\r\n return tasks;\r\n }", "ObservableList<Task> getCurrentUserTaskList();", "@Override\n public String getAllTaskTaskType(String typeId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByTaskType(typeId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "private List<SubTask> getSubTasks(TaskDTO taskDTO) {\n List<SubTask> subTasks = new ArrayList<>();\n if (taskDTO.getSubTasksDto() == null) return subTasks;\n for (SubTaskDTO s: taskDTO.getSubTasksDto()) {\n SubTask subTask = new SubTask();\n subTask.setId(s.getId());\n subTask.setSubTitle(s.getSubTitle());\n subTask.setSubDescription(s.getSubDescription());\n subTasks.add(subTask);\n }\n return subTasks;\n }", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }" ]
[ "0.7490729", "0.7317119", "0.7251683", "0.70638585", "0.6948115", "0.68786216", "0.6854256", "0.68396163", "0.6788411", "0.677663", "0.67671645", "0.67527103", "0.6655775", "0.6655775", "0.6644623", "0.662484", "0.6622233", "0.659854", "0.6581641", "0.644719", "0.64387697", "0.64367765", "0.64322865", "0.64201987", "0.6419947", "0.6407935", "0.63861483", "0.6379008", "0.6374448", "0.6343553", "0.634081", "0.63061535", "0.630384", "0.6294181", "0.6255745", "0.62295115", "0.621099", "0.6209887", "0.61403793", "0.6108633", "0.6077378", "0.6073717", "0.60683143", "0.606405", "0.60543215", "0.6050125", "0.6031033", "0.60299706", "0.6023413", "0.6022339", "0.59991485", "0.5995437", "0.5990218", "0.59894574", "0.598242", "0.5975576", "0.5969717", "0.596016", "0.59592736", "0.59500426", "0.5944257", "0.59427965", "0.5936682", "0.5936682", "0.5936682", "0.59359485", "0.5933937", "0.5922817", "0.5911128", "0.59105587", "0.5910052", "0.59097093", "0.5906509", "0.59057915", "0.58950937", "0.58803886", "0.587741", "0.5876956", "0.58762324", "0.5871168", "0.58703446", "0.5866005", "0.5854218", "0.5839734", "0.58358306", "0.5829492", "0.58257437", "0.58184403", "0.581349", "0.5813416", "0.58032614", "0.57987875", "0.5797374", "0.5795005", "0.57897425", "0.5787988", "0.57862806", "0.57695544", "0.5760371", "0.57513547" ]
0.83716
0
to retrieve all task of specified days from task master table and project of user table
public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "public List<Task> getAllTasksForUser(long userId);", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "List<Task> getAllTasks();", "Set<Task> getAllTasks();", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public static List<TaskTimeElement> findAllByTaskDate(String taskDate) {\r\n String sql = null;\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAllByTaskDate\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT \" +\r\n \"ID\" +\r\n \",DURATION\" +\r\n \",TASKNAME\" +\r\n \",USERNAME\" +\r\n \" FROM TaskTimeElement\" +\r\n \" WHERE TASKDATE=\" + \r\n \"'\" + DatabaseBase.encodeToSql(taskDate) + \"'\" +\r\n \" AND ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object = null;\r\n while (rs.next()) {\r\n object = new TaskTimeElement();\r\n object.setTaskDate(taskDate);\r\n object.setEnabled(true);\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n ret.add(object);\r\n }\r\n } catch (SQLException sqle) {\r\n Trace.error(\"sql = \" + sql, sqle);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "@Query(\"select u from User u where u.role = 'EMPLOYEE' order by u.hireDay desc\")\n List<Task> getLatestHiredEmployees(Pageable pageable);", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "public List<Task> getTaskForToday(String owner) {\n\n\t\tList<Task> tasksEOD = null;\n\t\tif (owner.equals(TVSchedulerConstants.CESAR)) {\n\t\t\ttasksEOD = getCesarTasksExpiringToday();\n\t\t} else if (owner.equals(TVSchedulerConstants.HOME)) {\n\t\t\ttasksEOD = getHomeTasksExpiringToday();\n\t\t}\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByOwnerAndExpireAtTheEndOfTheDayAndCompletionDateAfter(owner, false, calendar.getTime());\n\t\tList<Task> tasks = tasksEOD;\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\ttasksPermanentTasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDayAndDone(date, owner, false,\n\t\t\t\ttrue);\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\treturn tasks;\n\t}", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "List<Task> getTaskdetails();", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "private boolean checkProjectTaskDates(Project pr)\n\t{\n\t\tfor(Task ts:taskManager.get(\"toInsert\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t}\n\t\tfor(Task ts:taskManager.get(\"toEdit\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\tArrayList<Task> tasks=null;\n\t\ttry \n\t\t{\n\t\t\ttasks=db.selectTaskforProjID(project.getProjectID());\n\t\t}\n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tErrorWindow wind = new ErrorWindow(e); \n\t\t\tUI.getCurrent().addWindow(wind);\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(Task ts:tasks)\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public static List<TaskTimeElement> findAll() {\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n String sql = null;\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAll\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT ID\" +\r\n \",DURATION\" + \r\n \",TASKDATE\" + \r\n \",TASKNAME\" + \r\n \",USERNAME\" +\r\n \" FROM TASKTIMEELEMENT\" +\r\n \" WHERE ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKDATE,TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object;\r\n while(rs.next()) {\r\n object = new TaskTimeElement();\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskDate(rs.getString(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n object.setEnabled(true);\r\n ret.add(object);\r\n }\r\n }\r\n catch (SQLException e) {\r\n Trace.error(\"sql=\" + sql, e);\r\n ret = null;\r\n }\r\n catch (Exception ex) {\r\n Trace.error(\"Exception\", ex);\r\n ret = null;\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "public static String getTeamTaskDue(Integer pmid) {\n Session session = ConnectionFactory.getInstance().getSession();\n String result = \"\";\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd \");\n Date date = new Date();\n String ndt = dateFormat.format(date);\n try {\n PreparedStatement st = session.connection().prepareStatement(\"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN lintask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN dtptask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN engtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN othtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active'\");\n\n ResultSet rs = st.executeQuery();\n \n Integer count=1;\n while (rs.next()) {\n if(count==1) result = \"<fieldset><legend>Due Tasks</legend><div align='center'><table class='tableHighlight' width='90%' align='center' ><tr><td>&nbsp;</td></tr>\";\n// //System.out.println(\"AAAAAANNNNNAAAAAA\" + rs.getString(\"sLang\"));\n// //System.out.println(\"ddddddddddddddddd\" + rs.getString(\"taskname\"));\n// //System.out.println(\"qqqqqqqqqqqqqqqqq\" + rs.getString(\"tLang\"));\n String resource = \"\";\n if (rs.getString(\"firstName\").equals(\"\")) {\n resource = rs.getString(\"companyname\");\n } else {\n resource = rs.getString(\"firstName\") + \" \" + rs.getString(\"lastName\");\n }\n result += \"<tr>\";\n result += \"<td class=tableHeadingData><center>\"+count++ +\": \" + rs.getString(\"taskname\") + \" ( \" + rs.getString(\"sLang\") + \" - \" + rs.getString(\"tLang\") + \") of Project Number -<b><u>\" + rs.getInt(\"number\") +rs.getString(\"company_code\")+ \"</u></b>, <br> is due for <b>\" + resource + \"</b></center></td>\";\n\n result += \"</tr><tr><td>&nbsp;</td></tr>\";\n\n }\n if (count > 1) {\n result += \"</table></div></fieldset>\";\n }\n st.close();\n } catch (Exception e) {\n //System.out.println(\"errrrrrrrrrrrrrror\" + e.getMessage());\n } finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n //System.out.println(\"Hibernate Exception:\" + e);\n throw new RuntimeException(e);\n }\n\n }\n }\n return result;\n\n }", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "private void getTasks(){\n\n currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n if(currentFirebaseUser !=null){\n Log.e(\"Us\", \"onComplete: good\");\n } else {\n Log.e(\"Us\", \"onComplete: null\");\n }\n\n\n mDatabaseReference.child(currentFirebaseUser.getUid())\n .addValueEventListener(new ValueEventListener() {\n //если данные в БД меняются\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (mTasks.size() > 0) {\n mTasks.clear();\n }\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n Task task = postSnapshot.getValue(Task.class);\n mTasks.add(task);\n if (mTasks.size()>2){\n\n }\n }\n setAdapter(taskId);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public static List<Task> findByUser(String userID){\n return null;\n }", "public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "public void fetchTasks() {\n tasksTotales.clear();\n for (String taskId : taskList) {\n databaseTaskReference.child(taskId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n com.ijzepeda.armet.model.Task taskTemp = dataSnapshot.getValue(com.ijzepeda.armet.model.Task.class);\n tasksTotales.add(taskTemp);\n taskAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "@Override\r\n public Map<Integer, Map<Integer, Map<Integer, List<Schedule>>>> calendarOrderTasks() {\r\n List<Schedule> tasks = scheduleRepository.getAllScheduledTasks();\r\n Map<Integer, Map<Integer, Map<Integer, List<Schedule>>>> dateMap = new HashMap<>();\r\n \r\n for (Schedule task : tasks) {\r\n List<Schedule> daySchedule = new ArrayList<>();\r\n String[] timestamp = task.getTimestamp().split(\" \");\r\n String date = timestamp[0];\r\n String[] dateArr = date.split(\"-\");\r\n Integer year = Integer.valueOf(dateArr[0]);\r\n Integer month = Integer.valueOf(dateArr[1]);\r\n Integer day = Integer.valueOf(dateArr[2]);\r\n System.out.println(\"Date arr -> Year: \" + year + \" Month: \" + month + \" Day: \" + day);\r\n \r\n if(dateMap.get(year) == null){\r\n Map<Integer, Map<Integer, List<Schedule>>> monthMap = new HashMap<>();\r\n dateMap.put(year, monthMap);\r\n } \r\n if(dateMap.get(year).get(month) == null){\r\n Map<Integer, List<Schedule>> dayMap = new HashMap<>();\r\n dateMap.get(year).put(month, dayMap);\r\n } \r\n if(dateMap.get(year).get(month).get(day) == null){\r\n List<Schedule> dayTasks = new ArrayList<>();\r\n dateMap.get(year).get(month).put(day, dayTasks);\r\n }\r\n \r\n dateMap.get(year).get(month).get(day).add(task);\r\n }\r\n return dateMap;\r\n }", "List<Workflow> findByIdTask( int nIdTask );", "ObservableList<Task> getCurrentUserTaskList();", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "@Query(\"SELECT d FROM Day d WHERE user_id = ?1\")\n List<Day> getByUserID(Integer id);", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "@Query(\"SELECT * FROM \" + TABLE)\n List<Task> getAllSync();", "public java.util.List<Todo> findByTodoDateTime(Date todoDateTime);", "Task selectByPrimaryKey(String taskid);", "public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}", "List<Task> selectByExample(TaskExample example) throws DataAccessException;", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "@Test\n public void testQuery() throws Exception {\n\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // There should be 4 rows\n MxAssert.assertEquals( \"Number of retrieved rows\", 4, iDataSet.getRowCount() );\n\n // assigned task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assign task with deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 102 ), \"ASSIGNEDTASK102\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // loose task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n iDataSet.next();\n testRow( new TaskKey( 4650, 500 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n }", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "_task selectByPrimaryKey(Integer taskid);", "List<Day> getDays(String userName);", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "Task getAggregatedTask();", "public static Recordset findtasks(final TaskQuery taskQuery) {\r\n try {\r\n return ServerFactory.getServer().getSecurityManager().executeAsSystem(new Callable<Recordset>() {\r\n public Recordset call() throws Exception {\r\n return Ivy.wf().getTaskQueryExecutor().getRecordset(taskQuery);\r\n }\r\n });\r\n\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return null;\r\n }", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByTime(int memberId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,memberId,time1,time2);\r\n\t}", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "public List<TaskMaster> retrieveTaskByMilestoneId(Long milestoneId);", "List<WorkingSchedule> getAll();", "public List<Task> listTasks(String extra);", "public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "@Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "public ArrayList<Subtask> getSubtaskList(int project_id) {\n ArrayList<Subtask> subtasks = new ArrayList();\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT * FROM subtask WHERE project_id = ?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, project_id);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n String task_name = rs.getString(\"task_name\");\n subtasks.add(new Subtask(id, task_name));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return subtasks;\n }", "public Cursor getAllTasks()\n {\n Cursor mCursor = db.query(DATABASE_TABLE, new String[]{KEY_ROWID,\n KEY_TASK_SMALLBLIND,\n KEY_TASK_BUTTON,\n KEY_TASK_CUTOFF,\n KEY_TASK_HIJACK,\n KEY_TASK_LOJACK,\n KEY_TASK_UTG2,\n KEY_TASK_UTG1,\n KEY_TASK_UTG},null,null,null,null,null);\n\n\n return mCursor;\n }", "AoD5e466WorkingDay selectByPrimaryKey(Integer id);", "public void getUsersByDays() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService.getUsersByDays();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "public Project(String name, String nick, Calendar startDate, int duration, Teacher mainTeacher, ArrayList<Teacher> teachers, ArrayList<Scholar> scholars, ArrayList<Task> tasks) {\n Calendar endDate = (Calendar) startDate.clone();\n endDate.add(Calendar.MONTH, duration);\n this.name = name;\n this.nick = nick;\n this.startDate = startDate;\n this.estimatedEnd = endDate;\n this.mainTeacher = mainTeacher;\n this.teachers = teachers;\n this.scholars = scholars;\n this.tasks = tasks;\n this.finished = false;\n this.endDate = null;\n }", "@Test\n public void testGetMyTasks_ByOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n\n List<Task> results = services.getMyTasks(\"user1\", TaskTypes.ALL,\n GenericHumanRole.ACTUAL_OWNER, null,\n new ArrayList<Status>(), null, null, null, null, 0);\n\n Assert.assertEquals(1, results.size());\n\n Task taskToCheck = results.get(0);\n\n Assert.assertEquals(t.getActualOwner(), taskToCheck.getActualOwner());\n Assert.assertEquals(Task.Status.RESERVED, taskToCheck.getStatus());\n }", "@Query(value = \"SELECT * FROM fish_time_record WHERE checkin_time > CURRENT_DATE AND checkin_time < CURRENT_DATE + 1 AND user_id = :userId ORDER BY id LIMIT 1\", nativeQuery = true)\n TblFishTimeRecord findTodayByUserId(@Param(\"userId\") String userId);", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "@Override\r\n\tpublic List<ExecuteTask> getByOrgByTime(int organizationId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?)\"\r\n\t\t\t\t+ \" AND task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,organizationId,organizationId,time1,time2);\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignmentDTO> getByUserDTO(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\"select mob.taskId as taskId, mob.orderId as orderId, mob.orderDate as orderDate, mob.customerId as customerId, \" +\r\n\t\t\t\t\t\t\"mob.customerName as customerName, mob.customerAddress as customerAddress, \" +\r\n\t\t\t\t\t\t\"mob.customerPhone as customerPhone, mob.customerZipcode as customerZipcode, mob.customerSubZipcode as customerSubZipcode, \" +\r\n\t\t\t\t\t\t\"mob.customerRt as customerRt, mob.customerRw as customerRw, mob.priority as priority, \" +\r\n\t\t\t\t\t\t\"mob.notes as notes, mob.verifyBy as verifyBy, mob.verifyDate as verifyDate, \" +\r\n\t\t\t\t\t\t\"mob.assignmentDate as assignmentDate, mob.retrieveDate as retrieveDate, mob.submitDate as submitDate, \" +\r\n\t\t\t\t\t\t\"mob.finalizationDate as finalizationDate, mob.receiveDate as receiveDate, mob.assignmentStatus as assignmentStatus, \" +\r\n\t\t\t\t\t\t\"mob.user.userId as userId, mob.user.userCode as userCode, mob.user.userName as userName, \" +\r\n\t\t\t\t\t\t\"mob.office.officeId as officeId, mob.office.officeCode as officeCode, mob.office.officeName as officeName, \" +\r\n\t\t\t\t\t\t\"mob.office.company.coyId as coyId, mob.office.company.coyCode as coyCode, mob.office.company.coyName as coyName, \" +\r\n\t\t\t\t\t\t\"mob.product.productId as productId, mob.product.productCode as productCode, mob.product.productName as productName, \" +\r\n\t\t\t\t\t\t\"mob.product.template.tempId as tempId, mob.product.template.tempLabel as tempLabel, \" +\r\n\t\t\t\t\t\t\"mob.taskStatus.taskStatusId as taskStatusId, mob.taskStatus.taskStatusCode as taskStatusCode, mob.taskStatus.taskStatusName as taskStatusName \" +\r\n\t\t\t\t\t\t\"from \" + domainClass.getName() + \" mob \" +\r\n\t\t\t\t\t\t\"where mob.user.userId = :userId \" +\r\n\t\t\t\t\t\t\t\"and mob.taskStatus.taskStatusCode in ('ASSG','RETR')\")\r\n\t\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t\t.setResultTransformer(Transformers.aliasToBean(MobileTaskAssignmentDTO.class))\r\n\t\t\t\t\t\t.list();\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "private List<Task> tasks2Present(){\n List<Task> tasks = this.taskRepository.findAll();\n// de taken verwijderen waar user eerder op reageerde\n tasks2React(tasks);\n// taken op alfabetische volgorde zetten\n sortTasks(tasks);\n// opgeschoonde lijst aan handler geven\n return tasks;\n }" ]
[ "0.75224483", "0.73782754", "0.7335051", "0.6782587", "0.67105573", "0.65517014", "0.6547504", "0.65076315", "0.64112663", "0.63874197", "0.6341565", "0.6314369", "0.6275993", "0.62729144", "0.61290205", "0.61002135", "0.6081623", "0.6074191", "0.6036488", "0.6023076", "0.5885998", "0.58721983", "0.5835185", "0.57967454", "0.5783507", "0.57693976", "0.5738193", "0.5699663", "0.5697781", "0.56773037", "0.56639487", "0.56589687", "0.56322074", "0.56321985", "0.5626444", "0.5623967", "0.5610979", "0.5583846", "0.5571124", "0.5563917", "0.5563067", "0.55481154", "0.55389047", "0.5529144", "0.5527787", "0.55177975", "0.5509637", "0.5509111", "0.5495584", "0.54828364", "0.5457597", "0.54437894", "0.5440989", "0.5432766", "0.54312456", "0.5427447", "0.5425644", "0.5422501", "0.54218173", "0.5418334", "0.5410596", "0.5388585", "0.53877896", "0.53833485", "0.53775215", "0.5375471", "0.53746736", "0.53521067", "0.5333744", "0.532567", "0.5325323", "0.53250164", "0.53223944", "0.53203857", "0.5316071", "0.5314789", "0.53068763", "0.52911013", "0.5279306", "0.5261496", "0.5254041", "0.5242662", "0.5242102", "0.5240615", "0.5237185", "0.52315086", "0.5229437", "0.5229287", "0.52238774", "0.5211209", "0.5210774", "0.5208002", "0.52070725", "0.52059656", "0.5205657", "0.52050114", "0.5189565", "0.5183016", "0.5172392", "0.51710325" ]
0.712795
3
retrieveAllTaskOfCurrentUserByDates retrieve all task detail of current user between dates
public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getAllTasksForUser(long userId);", "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "public List<Login> getUsers(Date startDate, Date endDate);", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public static List<Task> findByUser(String userID){\n return null;\n }", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);", "ObservableList<Task> getCurrentUserTaskList();", "public static Task<DocumentSnapshot> getUserDates(String userId) {\n Log.d(Const.TAG, \"getUserDatesForCal: \" + Thread.currentThread().getId());\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .get();\n }", "public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);", "@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }", "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }", "public static List<Task> findByByUserId(long userId) {\n\t\treturn getPersistence().findByByUserId(userId);\n\t}", "public List<TaskMaster> retrieveIncompleteTask(Long userId);", "public static List<TaskTimeElement> findAllByTaskDate(String taskDate) {\r\n String sql = null;\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAllByTaskDate\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT \" +\r\n \"ID\" +\r\n \",DURATION\" +\r\n \",TASKNAME\" +\r\n \",USERNAME\" +\r\n \" FROM TaskTimeElement\" +\r\n \" WHERE TASKDATE=\" + \r\n \"'\" + DatabaseBase.encodeToSql(taskDate) + \"'\" +\r\n \" AND ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object = null;\r\n while (rs.next()) {\r\n object = new TaskTimeElement();\r\n object.setTaskDate(taskDate);\r\n object.setEnabled(true);\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n ret.add(object);\r\n }\r\n } catch (SQLException sqle) {\r\n Trace.error(\"sql = \" + sql, sqle);\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "@GetMapping(\"/users/{name}/tasks\")\n public List<Task> getTaskByAssignee(@PathVariable String name){\n List<Task> allTask = taskRepository.findByAssignee(name);\n return allTask;\n }", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "public java.util.List<Todo> findByUserId(long userId, int start, int end);", "public List<String> retrieveByDate(List<String> jobId, String userId,\n Calendar startDate, Calendar endDate) throws DatabaseException, IllegalArgumentException;", "@RequestMapping(value = \"/user/from/{userId}\", method = RequestMethod.GET)\n public Iterable<Task> getAllAssignedByMe(@PathVariable Long userId,\n @RequestParam Integer month,\n @RequestParam Integer year,\n @RequestParam(value = \"page\", defaultValue = \"0\") Integer page) throws Exception {\n if (userId == null || month == null || year == null) {\n throw new EntityNotFoundException(\"Invalid data found!\");\n }\n\n return taskService.readAllAssignedByUser(userId, month, year, page);\n }", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "List<Task> getTaskdetails();", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDay(date,\n\t\t\t\tTVSchedulerConstants.CESAR, true);\n\t\tif (tasks.size() == 0) {\n\t\t\tTask task;\n\t\t\tswitch (dayOfWeek) {\n\t\t\tcase Calendar.SATURDAY:\n\t\t\t\ttask = new Task(\"Mettre la table\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Faire le piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"jeu de Société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.SUNDAY:\n\t\t\t\ttask = new Task(\"Faire du sport (piscine/footing)\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Sortir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jouer tout seul\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Lecture\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Jeu de société\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"S'habiller\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.MONDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.TUESDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.WEDNESDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Aider à faire le ménage\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.THURSDAY:\n\t\t\t\ttask = new Task(\"Piano\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\ttask = new Task(\"Devoir\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\tcase Calendar.FRIDAY:\n\t\t\t\ttask = new Task(\"Solfège\", false, date, TVSchedulerConstants.CESAR, true);\n\t\t\t\ttaskRepository.save(task);\n\t\t\t\ttasks.add(task);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn tasks;\n\t}", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignment> getByUser(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.user.userId = :userId\")\r\n\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t.list();\r\n\t}", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "public List<Task> getTaskForToday(String owner) {\n\n\t\tList<Task> tasksEOD = null;\n\t\tif (owner.equals(TVSchedulerConstants.CESAR)) {\n\t\t\ttasksEOD = getCesarTasksExpiringToday();\n\t\t} else if (owner.equals(TVSchedulerConstants.HOME)) {\n\t\t\ttasksEOD = getHomeTasksExpiringToday();\n\t\t}\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByOwnerAndExpireAtTheEndOfTheDayAndCompletionDateAfter(owner, false, calendar.getTime());\n\t\tList<Task> tasks = tasksEOD;\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\ttasksPermanentTasks = taskRepository.getTaskByDateAndOwnerAndExpireAtTheEndOfTheDayAndDone(date, owner, false,\n\t\t\t\ttrue);\n\t\ttasks.addAll(tasksPermanentTasks);\n\t\treturn tasks;\n\t}", "@Query(value = \"SELECT * FROM fish_time_record WHERE checkin_time > CURRENT_DATE AND checkin_time < CURRENT_DATE + 1 AND user_id = :userId ORDER BY id LIMIT 1\", nativeQuery = true)\n TblFishTimeRecord findTodayByUserId(@Param(\"userId\") String userId);", "List<Task> getAllTasks();", "@Query(\"select u from User u where u.role = 'EMPLOYEE' order by u.hireDay desc\")\n List<Task> getLatestHiredEmployees(Pageable pageable);", "private void getTasks(){\n\n currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();\n if(currentFirebaseUser !=null){\n Log.e(\"Us\", \"onComplete: good\");\n } else {\n Log.e(\"Us\", \"onComplete: null\");\n }\n\n\n mDatabaseReference.child(currentFirebaseUser.getUid())\n .addValueEventListener(new ValueEventListener() {\n //если данные в БД меняются\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (mTasks.size() > 0) {\n mTasks.clear();\n }\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n Task task = postSnapshot.getValue(Task.class);\n mTasks.add(task);\n if (mTasks.size()>2){\n\n }\n }\n setAdapter(taskId);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "@Override\n public ResponseEntity<GenericResponseDTO> getTasks(String idUser) {\n List<TaskEntity> tasksEntity = new ArrayList<>();\n try{\n tasksEntity = taskRepository.findAllByIdUser(idUser);\n if(!tasksEntity.isEmpty()){\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tareas encontradas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else {\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"No se encontraron Tareas\")\n .objectResponse(tasksEntity)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la actualizacion de la fecha \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error consultando la persona: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }", "public void getUsersByDays() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService.getUsersByDays();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }", "@RequestMapping(value = \"/user/from/list/{userId}\", method = RequestMethod.GET)\n public List<TaskResponseDTO> getAllAssignedByMe(@PathVariable Long userId,\n @RequestParam Integer month,\n @RequestParam Integer year) throws Exception {\n if (userId == null || month == null || year == null) {\n throw new EntityNotFoundException(\"Invalid data found!\");\n }\n\n return taskService.readAllAssignedByUser(userId, month, year);\n }", "@Override\n\tpublic List<AppointmentDto> getAppointmentByUserIdForADate(int userId, Date date) {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(FETCH_BY_USERID_ON_PARTICULAR_DATE, (rs, rownnum)->{\n\t\t\t\treturn new AppointmentDto(rs.getInt(\"appointmentId\"), rs.getTime(\"startTime\"), rs.getTime(\"endTime\"), rs.getDate(\"date\"), rs.getInt(\"physicianId\"), rs.getInt(\"userId\"), rs.getInt(\"productId\"), rs.getString(\"confirmationStatus\"), rs.getString(\"zip\"),rs.getString(\"cancellationReason\"), rs.getString(\"additionalNotes\"), rs.getBoolean(\"hasMeetingUpdate\"),rs.getBoolean(\"hasMeetingExperienceFromSR\"),rs.getBoolean(\"hasMeetingExperienceFromPH\"), rs.getBoolean(\"hasPitch\"));\n\t\t\t}, userId, date );\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tSessionManager session = new SessionManager(getBaseContext());\n\t\t\tString user = session.GetUserIdFromSharedPreferences();\n\n\t\t\taJSONObject = new JSONObject();\n\n\t\t\tRestAPI api = new RestAPI();\n\n\t\t\ttry {\n\t\t\t\taJSONObject = api.ReportinDateRange(user, dateFrom, dateTo);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "@Override\n @Transactional\n public List<CalendarEntry> getActivitiesByPersonAndDay(final Long personId, final LocalDateTime date) {\n return getCalendarEntryRepository().getByPersonIdAndDateFromBetweenOrPersonIdAndDateToBetweenOrderByDateToAsc(\n personId, date, date.plusDays(1), personId, date, date.plusDays(1));\n }", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "@GET(\"pomodorotasks\")\n Call<List<PomodoroTask>> pomodorotasksGet(\n @Query(\"user\") String user\n );", "@GET(\"pomodorotasks/activity\")\n Call<List<PomodoroTask>> pomodorotasksActivityGet(\n @Query(\"user\") String user\n );", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "public Cursor fetchUserTaskByUserIdTaskId(long taskid,long userid) throws SQLException {\r\n\r\n\t\t Cursor mCursor =\r\n\r\n\t\t database.query(true,MySQLHelper.TABLE_USER_TASK , allColumns, MySQLHelper.COLUMN_USERTASKTASKFID + \"=\" + taskid\r\n\t\t \t\t+ \" AND \" + MySQLHelper.COLUMN_USERTASKUSERFID + \"=\" + userid , null,\r\n\t\t null, null, null, null);\r\n\t\t if (mCursor != null) {\r\n\t\t mCursor.moveToFirst();\r\n\t\t }\r\n\t\t return mCursor;\r\n\r\n\t\t }", "void nominateTask(String userId, List<String> userList, Long taskId);", "public void printTaskByDate(String date)\n {\n tasks.stream()\n .filter(task -> task.getDate().equals(date))\n .map(task -> task.getDetails())\n .forEach(details -> System.out.println(details)); \n }", "Set<Task> getAllTasks();", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<MobileTaskAssignmentDTO> getByUserDTO(int userId) {\r\n\t\treturn sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\"select mob.taskId as taskId, mob.orderId as orderId, mob.orderDate as orderDate, mob.customerId as customerId, \" +\r\n\t\t\t\t\t\t\"mob.customerName as customerName, mob.customerAddress as customerAddress, \" +\r\n\t\t\t\t\t\t\"mob.customerPhone as customerPhone, mob.customerZipcode as customerZipcode, mob.customerSubZipcode as customerSubZipcode, \" +\r\n\t\t\t\t\t\t\"mob.customerRt as customerRt, mob.customerRw as customerRw, mob.priority as priority, \" +\r\n\t\t\t\t\t\t\"mob.notes as notes, mob.verifyBy as verifyBy, mob.verifyDate as verifyDate, \" +\r\n\t\t\t\t\t\t\"mob.assignmentDate as assignmentDate, mob.retrieveDate as retrieveDate, mob.submitDate as submitDate, \" +\r\n\t\t\t\t\t\t\"mob.finalizationDate as finalizationDate, mob.receiveDate as receiveDate, mob.assignmentStatus as assignmentStatus, \" +\r\n\t\t\t\t\t\t\"mob.user.userId as userId, mob.user.userCode as userCode, mob.user.userName as userName, \" +\r\n\t\t\t\t\t\t\"mob.office.officeId as officeId, mob.office.officeCode as officeCode, mob.office.officeName as officeName, \" +\r\n\t\t\t\t\t\t\"mob.office.company.coyId as coyId, mob.office.company.coyCode as coyCode, mob.office.company.coyName as coyName, \" +\r\n\t\t\t\t\t\t\"mob.product.productId as productId, mob.product.productCode as productCode, mob.product.productName as productName, \" +\r\n\t\t\t\t\t\t\"mob.product.template.tempId as tempId, mob.product.template.tempLabel as tempLabel, \" +\r\n\t\t\t\t\t\t\"mob.taskStatus.taskStatusId as taskStatusId, mob.taskStatus.taskStatusCode as taskStatusCode, mob.taskStatus.taskStatusName as taskStatusName \" +\r\n\t\t\t\t\t\t\"from \" + domainClass.getName() + \" mob \" +\r\n\t\t\t\t\t\t\"where mob.user.userId = :userId \" +\r\n\t\t\t\t\t\t\t\"and mob.taskStatus.taskStatusCode in ('ASSG','RETR')\")\r\n\t\t\t\t\t\t.setInteger(\"userId\", userId)\r\n\t\t\t\t\t\t.setResultTransformer(Transformers.aliasToBean(MobileTaskAssignmentDTO.class))\r\n\t\t\t\t\t\t.list();\r\n\t}", "public List<ConsultationReservation> getConsultationReservationsByUserToday(InternalUser user) throws SQLException{\n\t\t\n\t\treturn super.manager.getConsultationReservationByUser(user, LocalDate.now(), true, false);\n\t}", "public void activeDates(int userid, int month, int year) {\r\n\t\t// Empty active dates list.\r\n\t\tactiveDatesList.clear();\r\n\t\t// Populate activeDatesList\r\n\t\ttry {\r\n\t\t Statement statement = connection.createStatement();\r\n\t\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t\t ResultSet rs = statement.executeQuery(\r\n\t\t \t\t \"select * from events where userid = \" + userid\r\n\t\t \t\t + \" and month = \" + month\r\n\t\t \t\t + \" and year = \" + year);\r\n\t\t while(rs.next())\r\n\t\t {\r\n\t\t // read the result set\r\n\t\t \tactiveDatesList.add(rs.getInt(\"day\"));\r\n\t\t }\r\n\t\t\t}\r\n\t\t catch(SQLException e)\r\n\t\t {\r\n\t\t // if the error message is \"out of memory\", \r\n\t\t // it probably means no database file is found\r\n\t\t System.err.println(e.getMessage());\r\n\t\t \r\n\t\t }\r\n\t}", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ActivityRepository extends JpaRepository<Activity,Long> {\n\n @Query(\"select activity from Activity activity where activity.user.login = ?#{principal.username}\")\n Page<Activity> findByUserIsCurrentUser(Pageable pageable)\n ;\n @Query(\"select activity from Activity activity where activity.user.login = ?#{principal.username}\")\n List<Activity> findByUserIsCurrentUserDateBetween(LocalDate fromDate, LocalDate toDate);\n\n //List<Activity> findAllDateBetween(LocalDate fromDate, LocalDate toDate);\n}", "public ArrayList <User> getuserList1(){\n \n ArrayList<User> userList = new ArrayList<User>();\n Connection con = DBconnect.connectdb();\n \n Statement st;\n ResultSet rs;\n \n try {\n \n SimpleDateFormat dfomat = new SimpleDateFormat(\"yyyy-MM-dd\");\n LocalDate date1 = LocalDate.now().minusDays(1);\n date=date1.toString();\n String query = \"SELECT Date,Total_Amount,Discount FROM Selling where Date='\"+date1+\"' \";\n \n \n \n st = con.createStatement();\n rs= st.executeQuery(query);\n User user;\n while(rs.next()){\n user = new User(rs.getDate(\"Date\"),rs.getFloat(\"Total_Amount\"),rs.getFloat(\"Discount\"));\n userList.add(user);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return userList;\n \n \n }", "@Override\n public List<Activity> getActivities(int userId) throws SQLException {\n ArrayList<Activity> foundActivities = new ArrayList<>();\n\n try (Connection connection = dataSource.getConnection()) {\n String findActivitiesQuery = \"SELECT * FROM ACTIVITY WHERE USERID = ?\";\n statement = connection.prepareStatement(findActivitiesQuery);\n statement.setInt(1, userId);\n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n foundActivities.add(extractActivity(resultSet));\n }\n } catch (SQLException exception) {\n throw exception;\n } finally {\n close(statement, resultSet);\n }\n return foundActivities;\n }", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<String> getEligibleForAutoApproval(Date todayAtMidnight);", "List<UserPosition> getUserPositionByIdUserAndDate(Long id_user, Date date);", "Set<TimeJournalBean> findUserActivityByDate(Date date, Employee employee);", "public List<UserAttendance> getDayAttendance(Date[] dates, SysUser sysUser) {\n return findByQuery(\"from UserAttendance where (checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=?) and user.id=? and type is not null order by checkdate, noon\",\n dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6], sysUser.getId());\n }", "private static String getAvailableResources(Date p_baseDate,\n Date p_estimatedCompletionDate, long p_duration, String[] p_userIds)\n throws Exception\n {\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < p_userIds.length; i++)\n {\n UserFluxCalendar cal = ServerProxy.getCalendarManager()\n .findUserCalendarByOwner(p_userIds[i]);\n Date dt = ServerProxy.getEventScheduler().determineDate(p_baseDate,\n cal, p_duration);\n if (dt.compareTo(p_estimatedCompletionDate) > 0)\n {\n continue;\n }\n\n if (sb.length() > 0)\n {\n sb.append(\",\");\n }\n sb.append(p_userIds[i]);\n }\n return sb.length() > 0 ? sb.toString() : null;\n }", "public List<Transaction> listAllTransactionsByUserId( int userId){\n\t\t\n\t\t//String queryStr = \"SELECT trans FROM Transaction trans JOIN FETCH trans.\"\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t\t\n\t}", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "@GET(\"pomodorotasks/todo\")\n Call<List<PomodoroTask>> pomodorotasksTodoGet(\n @Query(\"user\") String user\n );", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "List<UserPosition> getUserPositionByIdTravelAndDate(Long id_travel, Date date);", "@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }", "public List<AttendanceRecord> getMyAttendance(SystemAccount user, int month, int year){\n Calendar cal = Calendar.getInstance();\n List<AttendanceRecord> returnList = new ArrayList<>();\n\n for(AttendanceRecord ar:arDao.findAll()){\n cal.setTime(ar.getDate());\n\n if( (cal.get(Calendar.MONTH)+1)==month && cal.get(Calendar.YEAR)==year && ar.getStaff().getStaffId().equalsIgnoreCase(user.getStaff().getStaffId()) ){\n returnList.add(ar);\n }\n }\n\n return returnList;\n }", "public List<Date> determineTaskDateTime(String userCommand) {\n\t\tif (userCommand == null || userCommand.equals(\"\")) {\n\t\t\tlogger.log(Level.WARNING, Global.MESSAGE_ILLEGAL_ARGUMENTS);\n\t\t\treturn null;\n\t\t}\n\n\t\tString userCommandWithoutIndex = removeIndex(userCommand);\n\t\tString userCommandWithoutCommandType = removeCommandType(userCommandWithoutIndex);\n\t\tString userCommandWithoutTaskNameAndCommandType = removeTaskName(userCommandWithoutCommandType);\n\t\tList<Date> dateTimes;\n\n\t\ttry {\n\t\t\tdateTimes = getDateTimes(userCommandWithoutTaskNameAndCommandType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.INFO, MESSAGE_NO_DATETIMES);\n\t\t\treturn null;\n\t\t}\n\t\tdateTimes = checkOrderOfDateTimes(dateTimes);\n\t\treturn dateTimes;\n\t}", "public ArrayList<PomoDaily> getDaily(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_DAILY;\r\n String data = server.get(url, parameters);\r\n ArrayList<PomoDaily> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] dailies = data.split(\";\");\r\n for (String d : dailies) {\r\n String[] attributes = d.split(\"&\");\r\n String id = attributes[0];\r\n String date = attributes[1];\r\n int plan = Integer.parseInt(attributes[2]);\r\n list.add(new PomoDaily(id, date, plan, userId));\r\n }\r\n return list;\r\n }", "public List<Task> getpublishTask(Integer uid);", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByTime(int memberId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,memberId,time1,time2);\r\n\t}", "public void getUsersByMonth() throws IOException, SystemException {\n\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByMonth();\n LOGGER.info(\"userLIst Recievecd:\" + usersList);\n shootReminderMails(usersList);\n\n }", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "public java.util.List<DataEntry> findByUserId(\n\t\tlong userId, int start, int end);", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "private static String getFastestResources(Date p_baseDate, long p_duration,\n String[] p_userIds) throws Exception\n {\n Date bestDate = null;\n StringBuilder sb = null;\n\n // loop thru users and compute estimated completion date for each\n for (int i = 0; i < p_userIds.length; i++)\n {\n UserFluxCalendar cal = ServerProxy.getCalendarManager()\n .findUserCalendarByOwner(p_userIds[i]);\n Date dt = ServerProxy.getEventScheduler().determineDate(p_baseDate,\n cal, p_duration);\n\n if (bestDate == null || dt.before(bestDate))\n {\n bestDate = dt;\n sb = new StringBuilder();\n sb.append(p_userIds[i]);\n }\n else if (dt.equals(bestDate))\n {\n // add the user to list\n sb.append(\",\");\n sb.append(p_userIds[i]);\n }\n }\n\n return sb.toString();\n }", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DailyReservationRepository extends JpaRepository<DailyReservation, Long> {\n\n @Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.user.login = ?#{principal.username}\")\n List<DailyReservation> findByUserIsCurrentUser();\n\n List<DailyReservation> findAllByDateIsBetween(LocalDate startDate, LocalDate endDate);\n // findAllByDateGreaterThanEqualStartDateAndDateLessThanEqualEndDate(LocalDate startDate, LocalDate endDate);\n //findAllByStartDateGreaterThanEqualAndEndDateLessThanEqual\n\n @Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );\n\n}", "public static Task<QuerySnapshot> getTripSummaries(String userId) {\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .collection(Const.USER_TRIPS_COLLECTION)\n .get();\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public java.util.List<Todo> findByTodoDateTime(Date todoDateTime);", "public static ITask findTaskUserHasPermissionToSee(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n try {\r\n TaskQuery taskQuery1 = TaskQuery.create().where().taskId().isEqual(taskId);\r\n TaskQuery taskQuery2 = TaskQuery.create().where().currentUserIsInvolved();\r\n IUser user = Ivy.session().getSessionUser();\r\n if (user == null) {\r\n return null;\r\n }\r\n for (IRole role : user.getRoles()) {\r\n taskQuery2 = taskQuery2.where().or().roleIsInvolved(role);\r\n }\r\n return Ivy.wf().getTaskQueryExecutor().getFirstResult(taskQuery1.where().and(taskQuery2));\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "private void getRecords(LocalDate startDate, LocalDate endDate) {\n foods = new ArrayList<>();\n FoodRecordDao dao = new FoodRecordDao();\n try {\n foods = dao.getFoodRecords(LocalDate.now(), LocalDate.now(), \"\");\n } catch (DaoException ex) {\n Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "@Override\n public List<Task> getCurrentTaskInstances(List<String> actors,\n CoreSession coreSession) throws ClientException {\n if (actors == null || actors.isEmpty()) {\n return new ArrayList<Task>();\n }\n String userNames = TaskQueryConstant.formatStringList(actors);\n String query = String.format(\n TaskQueryConstant.GET_TASKS_FOR_ACTORS_QUERY, userNames);\n DocumentModelList taskDocuments = coreSession.query(query);\n return wrapDocModelInTask(taskDocuments);\n }", "public List<Events> getMostUpcomingUserEvents(long userId);", "public static List<DiagramTask> getAllrecords()\r\n {\r\n List<DiagramTask> tasks = new ArrayList();\r\n \r\n try\r\n {\r\n tasks = TASK_DAO.retrieveTask();\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return tasks;\r\n }", "List<UserPosition> getUserPositionByIdUser(Long id_user, Date date);" ]
[ "0.698293", "0.69817257", "0.6959681", "0.68481266", "0.6801613", "0.6677438", "0.6376401", "0.63482964", "0.6322628", "0.630132", "0.62289876", "0.6222927", "0.61513287", "0.60897094", "0.6044493", "0.60248315", "0.6022202", "0.59828746", "0.5980501", "0.595341", "0.59444326", "0.5936744", "0.58671033", "0.5855931", "0.58487064", "0.58462024", "0.58460677", "0.5841071", "0.58365107", "0.58100307", "0.58060974", "0.5788565", "0.5770805", "0.5761835", "0.5759115", "0.5689659", "0.5660767", "0.5654166", "0.5644235", "0.5644046", "0.56221324", "0.55879515", "0.55816615", "0.55630493", "0.55570346", "0.5550048", "0.5538775", "0.5534104", "0.5501669", "0.5497527", "0.5471515", "0.54628664", "0.54525155", "0.5451865", "0.5437682", "0.54282296", "0.5394307", "0.5387542", "0.53803664", "0.5371038", "0.53670126", "0.5365539", "0.53611064", "0.5347643", "0.5332602", "0.5326984", "0.53163314", "0.5302024", "0.5274861", "0.5265107", "0.5262852", "0.52514184", "0.52472025", "0.52422005", "0.52353716", "0.52341396", "0.5231094", "0.52296066", "0.5226894", "0.5223686", "0.5219359", "0.52070266", "0.520169", "0.51916575", "0.51844", "0.5183136", "0.5179244", "0.51785415", "0.5175913", "0.51635385", "0.51601756", "0.5156804", "0.51518977", "0.5150991", "0.51428425", "0.51428425", "0.51408356", "0.51388717", "0.5130084", "0.5126961" ]
0.74681425
0
retrieve all task with given filters
public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ObservableList<Task> getFilteredTaskList();", "List<Receta> getAll(String filter);", "Set<Task> getAllTasks();", "List<Task> getAllTasks();", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "ObservableList<Task> getUnfilteredTaskList();", "public List<Task> listTasks(String extra);", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "List<Task> getTaskdetails();", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<Task> getAllTasksForUser(long userId);", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }", "TaskList getList();", "@Override\r\n\tpublic List<ExecuteTask> getByTime(String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,time1,time2);\r\n\t}", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "private List<Callable<Map<String, S3ObjectSummary>>> createFetchContextTasks(@NonNull ConfigQuery query) {\n return interpolateVarStrings(getPaths(), query).stream()\n .flatMap(this::restrictS3Path)\n .distinct()\n .map(s3Url -> (Callable<Map<String, S3ObjectSummary>>) () -> fetchSummary(s3Url))\n .collect(Collectors.toList());\n }", "public static List<ITask> findAllTasks(final int startIndex, final int pageSize, final String sortField,\r\n final SortOrder sortOrder, final boolean isHistory, final IPropertyFilter<TaskProperty> taskFilter) {\r\n List<ITask> outTasks = Collections.emptyList();\r\n Ivy ivy = Ivy.getInstance();\r\n IQueryResult<ITask> queryResult;\r\n\r\n List<PropertyOrder<TaskProperty>> taskPropertyOrder =\r\n PropertyOrder.create(ch.ivy.addon.portalkit.util.TaskUtils.getTaskProperty(sortField),\r\n ch.ivy.addon.portalkit.util.TaskUtils.getTaskDirection(sortOrder));\r\n if (isHistory) {\r\n queryResult = ivy.session.findWorkedOnTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true);\r\n } else {\r\n if (checkReadAllTasksPermission()) {\r\n IPropertyFilter<TaskProperty> filter =\r\n Ivy.wf().createTaskPropertyFilter(TaskProperty.STATE, RelationalOperator.EQUAL,\r\n TaskState.SUSPENDED.intValue());\r\n filter = filter.or(TaskProperty.STATE, RelationalOperator.EQUAL, TaskState.RESUMED.intValue());\r\n filter = filter.or(TaskProperty.STATE, RelationalOperator.EQUAL, TaskState.PARKED.intValue());\r\n filter = filter.or(TaskProperty.STATE, RelationalOperator.EQUAL, TaskState.DELAYED.intValue());\r\n queryResult = Ivy.wf().findTasks(filter, taskPropertyOrder, startIndex, pageSize, true);\r\n outTasks = queryResult.getResultList();\r\n }\r\n }\r\n\r\n return outTasks;\r\n\r\n }", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "@GetMapping(\"/tickets\")\n @Timed\n public List<Ticket> getAllTickets(@RequestParam(required = false) String filter) {\n if (\"airportreview-is-null\".equals(filter)) {\n log.debug(\"REST request to get all Tickets where airportReview is null\");\n return StreamSupport\n .stream(ticketRepository.findAll().spliterator(), false)\n .filter(ticket -> ticket.getAirportReview() == null)\n .collect(Collectors.toList());\n }\n if (\"flightreview-is-null\".equals(filter)) {\n log.debug(\"REST request to get all Tickets where flightReview is null\");\n return StreamSupport\n .stream(ticketRepository.findAll().spliterator(), false)\n .filter(ticket -> ticket.getFlightReview() == null)\n .collect(Collectors.toList());\n }\n log.debug(\"REST request to get all Tickets\");\n return ticketRepository.findAll();\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public abstract List<Course> getByFilter(HashMap<String, String> filter);", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}", "List<Task> selectByExample(TaskExample example) throws DataAccessException;", "public List<PlantDTO> fetchPlants(String filter);", "public ArrayList<TaskItem> getAllTasksByStatus(int status)\n {\n ArrayList<TaskItem> allTasksList = new ArrayList<>();\n\n //String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + KEY_STATUS + \" = 0\" + \" ORDER BY \" + KEY_CATEGORY + \" DESC\";\n String allTasks = \"SELECT * FROM \" + TABLE_TASKS + \" WHERE \" + TASK_STATUS + \" = \" + \"'\" + status + \"'\" + \" ORDER BY \" + TASK_DATE + \" DESC, \" + TASK_ID + \" DESC, \" + TASK_CATEGORY + \" DESC\";\n\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor allTasksCursor = db.rawQuery(allTasks, null);\n\n if(allTasksCursor.moveToFirst())\n {\n do {\n\n allTasksList.add(\n TaskItem.createTask(allTasksCursor.getString(1),\n allTasksCursor.getString(2),\n Integer.parseInt(allTasksCursor.getString(3)),\n Integer.parseInt(allTasksCursor.getString(0)),\n allTasksCursor.getString(4),\n allTasksCursor.getString(5)));\n }\n while (allTasksCursor.moveToNext());\n }\n\n allTasksCursor.close();\n db.close();\n\n return allTasksList;\n }", "public List<TaskDescription> getActiveTasks();", "List<Workflow> findByIdTask( int nIdTask );", "ResponseEntity<List<Type>> findTaskTypes();", "public abstract List<Container> getContainers(TaskType t);", "@Override\r\n\tpublic List<ExecuteTask> getByTypeByTime(String taskType, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id IN(SELECT task_id FROM task WHERE task_type = ? AND \"\r\n\t\t\t\t+ \" task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,taskType,time1,time2);\r\n\t}", "public List<Task> getAllTasksForUserAndGroup(long userId, String groupId);", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByType(String taskType) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_type = ?)\";\r\n\t\treturn getForList(sql,taskType);\r\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);", "public static List<Task> getTaskFromDb() {\n List<Task> taskList = new ArrayList<>();\n try {\n // taskList = Task.listAll(Task.class);\n taskList= Select.from(Task.class).orderBy(\"due_date Desc\").where(\"status=?\", new String[] {\"0\"}).list();\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n return taskList;\n\n }", "public void findTasks(ArrayList<Task> tasks, String keywords) {\n ArrayList<Task> filteredTasks;\n filteredTasks = (ArrayList<Task>) tasks.stream()\n .filter((t) -> t.getTask().contains(keywords))\n .collect(Collectors.toList());\n if (filteredTasks.size() == 0) {\n System.out.println(\"OOPS!!! We can't find anything that contains the description.\");\n } else {\n System.out.println(\"Here's what we have found: \");\n printList(filteredTasks);\n }\n }", "ResponseEntity<List<Status>> findTaskStatuses();", "List<List<String>> getFilters(String resource);", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public java.util.List<Todo> filterFindByG_S(long groupId, int[] statuses);", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "List<Transfer> searchTransfersAwaitingAuthorization(TransfersAwaitingAuthorizationQuery query);", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Tag> listAll(@Context UriInfo uriInfo) {\n Long taskId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(3).getPath())\n :null);\n\n List<Tag> result ;\n\n if (taskId != null) {\n result = em.createQuery(\"SELECT t FROM Tag t INNER JOIN t.tasks p WHERE p.id = :taskId\", Tag.class)\n .setParameter(\"taskId\",taskId)\n .getResultList();\n } else {\n result = em.createQuery(\"SELECT t FROM Tag t\", Tag.class).getResultList();\n }\n return result;\n }", "public static Recordset findtasks(final TaskQuery taskQuery) {\r\n try {\r\n return ServerFactory.getServer().getSecurityManager().executeAsSystem(new Callable<Recordset>() {\r\n public Recordset call() throws Exception {\r\n return Ivy.wf().getTaskQueryExecutor().getRecordset(taskQuery);\r\n }\r\n });\r\n\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return null;\r\n }", "List<TransportEntity> getAllEntityOfQuery();", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "public List<ViewXwZqkh> Query(String filters, String orders, Object... values);", "public ArrayList<Task> getVisibleTasks() {\n ArrayList<Task> visibleTasks = new ArrayList<>();\n forAllTasks(new Consumer(visibleTasks) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$TaskStackContainers$rQnI0Y8R9ptQ09cGHwbCHDiG2FY */\n private final /* synthetic */ ArrayList f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.TaskStackContainers.lambda$getVisibleTasks$0(this.f$0, (Task) obj);\n }\n });\n return visibleTasks;\n }", "public List<Cuenta> buscarCuentasList(Map filtro);", "List<TbCrmTask> selectAll();", "private void applyFilters() {\n Task task = new Task() {\n @Override\n public Object call() {\n long start = System.currentTimeMillis();\n System.out.println(\"Applying filters! \" + filterList.size());\n filteredRowItemList = fullCustomerRowItemList;\n for (CustomerListFilter eachFilter : filterList) {\n eachFilter.setCustomerList(filteredRowItemList);\n filteredRowItemList = eachFilter.run();\n }\n System.out.println(\"Filtering took : \" + (System.currentTimeMillis() - start) + \" ms\");\n searchResultsTable.setItems(filteredRowItemList);\n customerCountStatus.setText(Integer.toString(filteredRowItemList.size()));\n return null;\n }\n };\n task.run();\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "public java.util.List<Todo> filterFindByG_S(\n\t\tlong groupId, int status, int start, int end);", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "public void execute(TaskList tasks, Storage storage, Ui ui) {\n ArrayList<Task> results = (ArrayList<Task>) tasks.getTasks().stream()\n .filter(t -> t.getTask().contains(query))\n .collect(Collectors.toList());\n ui.showSearchResults(results);\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "Collection<T> doFilter(RepositoryFilterContext context);", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "public List<Contest> searchContests(Filter filter) throws ContestManagementException {\r\n if (error) {\r\n throw new ContestManagementException(\"error\");\r\n }\r\n\r\n StudioFileType fileType = new StudioFileType();\r\n fileType.setDescription(\"PS\");\r\n fileType.setExtension(\".ps\");\r\n fileType.setImageFile(false);\r\n fileType.setStudioFileType(34);\r\n\r\n ContestChannel channel = new ContestChannel();\r\n channel.setContestChannelId(new Long(2));\r\n channel.setDescription(\"This is a channel\");\r\n\r\n ContestStatus contestStatus = new ContestStatus();\r\n contestStatus.setContestStatusId(new Long(24));\r\n contestStatus.setDescription(\"This is a status\");\r\n contestStatus.setName(\"name\");\r\n\r\n ContestType contestType = new ContestType();\r\n contestType.setContestType(new Long(234));\r\n contestType.setDescription(\"this is a contest type\");\r\n\r\n Contest contest = new Contest();\r\n contest.setContestChannel(channel);\r\n contest.setContestId(new Long(24));\r\n contest.setContestType(contestType);\r\n contest.setCreatedUser(new Long(34654));\r\n contest.setEndDate(new Date());\r\n contest.setStatus(contestStatus);\r\n contest.setStartDate(new Date());\r\n\r\n Set<StudioFileType> fileTypes = new HashSet<StudioFileType>();\r\n fileTypes.add(fileType);\r\n contest.setFileTypes(fileTypes);\r\n \r\n if (invalid) {\r\n contestStatus.setContestStatusId(new Long(-1));\r\n }\r\n\r\n return Arrays.asList(new Contest[] { contest });\r\n }", "ObservableList<Task> getTaskList();", "public java.util.List<Todo> filterFindByG_S(long groupId, int status);", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public TaskList find(String[] keywords) {\n TaskList viewToReturn = new TaskList();\n Set<Task> taskSet = new HashSet<>();\n\n for (Task task : tasks) {\n for (String keyword : keywords) {\n if (task.getTaskDescription().contains(keyword) && !taskSet.contains(task)) {\n taskSet.add(task);\n viewToReturn.add(task);\n }\n }\n }\n\n return viewToReturn;\n }", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "public java.util.List<Todo> filterFindByGroupId(long groupId);", "public CommandResult execute(TaskList tasks) {\n TaskList filteredTasks = new TaskList();\n for (int i = 0; i < tasks.size(); i++) {\n if (tasks.get(i).getDescription().toLowerCase().contains(keyword.toLowerCase())) {\n filteredTasks.add(tasks.get(i));\n }\n }\n return new CommandResult(FIND_MESSAGE, filteredTasks);\n }", "void updateFilteredTaskList(Set<String> keywords);", "public java.util.List<Todo> filterFindByG_UT_ST(\n\t\tlong groupId, String urlTitle, int status, int start, int end);", "Map<String, String> getFilters();", "public IndexedList<Task> search(TaskStatus status) {\n\t\tLinkedList<Task> result=new LinkedList<Task>();\n\t\tfor(Task task : tasks) {\n\t\t\tif(task.getStatus()==status)\n\t\t\t\tresult.add(task);\n\t\t}\n\t\treturn result;\n\t}", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "@Transactional(Transactional.TxType.REQUIRES_NEW)\n public List<TaskDef> retrieveAll(Long task_process_id) {\n return TaskDefIntegrationService.list(task_process_id);\n }", "Set<Task> getDependentTasks();", "public ToDo[] listTodos(Map<String, String[]> queryParams) {\n ToDo[] filteredtodos = allTodos;\n\n // Filter status if defined\n if (queryParams.containsKey(\"status\")) {\n String targetStatus = queryParams.get(\"status\")[0];\n filteredtodos = filterTodosByStatus(filteredtodos, targetStatus);\n }\n\n if (queryParams.containsKey(\"contains\")) {\n String targetBody = queryParams.get(\"contains\")[0];\n filteredtodos = filterTodosByBody(filteredtodos, targetBody);\n }\n\n if (queryParams.containsKey(\"limit\")) {\n int targetLimit = Integer.parseInt(queryParams.get(\"limit\")[0]);\n filteredtodos = limitTodos(filteredtodos, targetLimit);\n }\n\n if (queryParams.containsKey(\"owner\")) {\n String targetOwner = queryParams.get(\"owner\")[0];\n filteredtodos = filterTodosByOwner(filteredtodos, targetOwner);\n }\n\n if (queryParams.containsKey(\"category\")) {\n String targetCategory = queryParams.get(\"category\")[0];\n filteredtodos = filterTodosByCategory(filteredtodos, targetCategory);\n }\n return filteredtodos;\n\n }", "private List<SubTask> getSubTasks(TaskDTO taskDTO) {\n List<SubTask> subTasks = new ArrayList<>();\n if (taskDTO.getSubTasksDto() == null) return subTasks;\n for (SubTaskDTO s: taskDTO.getSubTasksDto()) {\n SubTask subTask = new SubTask();\n subTask.setId(s.getId());\n subTask.setSubTitle(s.getSubTitle());\n subTask.setSubDescription(s.getSubDescription());\n subTasks.add(subTask);\n }\n return subTasks;\n }", "@Override\n\tpublic List findAll()\n\t{\n\t\treturn teataskMapper.findAll();\n\t}", "private List<? extends ICommonTask> extractAllTasks(List<? extends ICommonTask> tasks) {\n List<ICommonTask> res = new ArrayList<>();\n if (tasks != null && !tasks.isEmpty()) {\n for (ICommonTask task : tasks) {\n res.add(task);\n if (task instanceof ISubTask) {\n ISubTask subTask = (ISubTask) task;\n List<? extends ICommonTask> nextTasks = getTaskManagerConfiguration().getTaskManagerReader().findNextTasksBySubTask(subTask, false);\n res.addAll(extractAllTasks(nextTasks));\n }\n }\n }\n return res;\n }", "public TaskList matchTasks(String match) {\n TaskList output = new TaskList();\n try {\n for (int f = 0; f < this.getSize(); f++) {\n Task selectedTask = this.getSingleTask(f);\n if (selectedTask.toString().contains(match)) {\n output.addTask(selectedTask);\n }\n }\n } catch (DukeException e) {\n return new TaskList();\n }\n\n return output;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByTime(int memberId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,memberId,time1,time2);\r\n\t}", "public static List<ITask> findTaskOfSessionUser(int startIndex, int pageSize, String sortField, SortOrder sortOrder,\r\n boolean isHistory, IPropertyFilter<TaskProperty> taskFilter) {\r\n Ivy ivy = Ivy.getInstance();\r\n IQueryResult<ITask> queryResult;\r\n\r\n List<PropertyOrder<TaskProperty>> taskPropertyOrder =\r\n PropertyOrder.create(getTaskProperty(sortField), getTaskDirection(sortOrder));\r\n if (isHistory) {\r\n queryResult = ivy.session.findWorkedOnTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true);\r\n } else {\r\n\r\n queryResult =\r\n ivy.session.findWorkTasks(taskFilter, taskPropertyOrder, startIndex, pageSize, true,\r\n EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED, TaskState.PARKED));\r\n }\r\n\r\n List<ITask> tasks = queryResult.getResultList();\r\n return tasks;\r\n }", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "public static List<TaskTimeElement> findAll() {\r\n List<TaskTimeElement> ret = new ArrayList<TaskTimeElement>();\r\n String sql = null;\r\n Statement theStatement = null;\r\n Connection theConnection = null;\r\n ResultSet rs = null;\r\n\r\n try {\r\n theConnection = AdminConnectionManager.getConnection(ME + \".findAll\");\r\n theStatement = theConnection.createStatement();\r\n sql = \"SELECT ID\" +\r\n \",DURATION\" + \r\n \",TASKDATE\" + \r\n \",TASKNAME\" + \r\n \",USERNAME\" +\r\n \" FROM TASKTIMEELEMENT\" +\r\n \" WHERE ENABLED IS TRUE\" +\r\n (userName == null\r\n ? \"\"\r\n : (\" AND USERNAME='\" + DatabaseBase.encodeToSql(userName) + \"'\")) +\r\n \" ORDER BY TASKDATE,TASKNAME\";\r\n rs = theStatement.executeQuery(sql);\r\n TaskTimeElement object;\r\n while(rs.next()) {\r\n object = new TaskTimeElement();\r\n int i = 1;\r\n object.setId(rs.getLong(i++));\r\n object.setDuration(rs.getDouble(i++));\r\n object.setTaskDate(rs.getString(i++));\r\n object.setTaskName(rs.getString(i++));\r\n object.setUserName(rs.getString(i++));\r\n object.setEnabled(true);\r\n ret.add(object);\r\n }\r\n }\r\n catch (SQLException e) {\r\n Trace.error(\"sql=\" + sql, e);\r\n ret = null;\r\n }\r\n catch (Exception ex) {\r\n Trace.error(\"Exception\", ex);\r\n ret = null;\r\n }\r\n finally {\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theStatement != null) {\r\n try {\r\n theStatement.close();\r\n }\r\n catch (SQLException e) {}\r\n }\r\n if (theConnection != null)\r\n AdminConnectionManager.releaseConnection(theConnection);\r\n }\r\n return ret;\r\n }", "@Override\r\n\tpublic List<ExecuteTask> getByOrgByTime(int organizationId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?)\"\r\n\t\t\t\t+ \" AND task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,organizationId,organizationId,time1,time2);\r\n\t}", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "@GetMapping(\"/bytaskid/{id}\")\r\n public List<TaskStatus> getByTaskId(@PathVariable(value = \"id\") Long id) {\r\n\r\n List<TaskStatus> tsk = dao.findByTaskID(id);\r\n return tsk;\r\n\r\n }", "@GET(\"pomodorotasks/all\")\n Call<List<PomodoroTask>> pomodorotasksAllGet(\n @Query(\"user\") String user\n );", "@GetMapping(\"/items\")\n public List<Items> getAllItems(@RequestParam(required = false) String filter) {\n if (\"reviewreveals-is-null\".equals(filter)) {\n log.debug(\"REST request to get all Itemss where reviewReveals is null\");\n return StreamSupport\n .stream(itemsRepository.findAll().spliterator(), false)\n .filter(items -> items.getReviewReveals() == null)\n .collect(Collectors.toList());\n }\n log.debug(\"REST request to get all Items\");\n return itemsRepository.findAll();\n }" ]
[ "0.7054477", "0.6528511", "0.6508814", "0.6499546", "0.63971585", "0.63859206", "0.635034", "0.6310932", "0.63025093", "0.6081692", "0.60712475", "0.58995104", "0.58878374", "0.5883565", "0.5800688", "0.5769802", "0.5769802", "0.5764919", "0.5749727", "0.5738555", "0.57253593", "0.57108945", "0.5694724", "0.56757075", "0.56684977", "0.56670904", "0.56615907", "0.5656455", "0.5650563", "0.56295174", "0.5619268", "0.5615261", "0.56151277", "0.56135505", "0.56123054", "0.55992407", "0.5592977", "0.5590813", "0.5576033", "0.5562012", "0.55584025", "0.554189", "0.5537023", "0.5527232", "0.55257314", "0.55158025", "0.550703", "0.54960656", "0.5490602", "0.5483768", "0.54825646", "0.54756325", "0.546346", "0.5459951", "0.54374766", "0.54360145", "0.54322016", "0.54244673", "0.5410492", "0.54055905", "0.54005307", "0.54001474", "0.5395713", "0.53953415", "0.53939116", "0.53912836", "0.5389713", "0.53832805", "0.53775394", "0.53745186", "0.53648055", "0.53642666", "0.5349627", "0.5346473", "0.5342378", "0.53423", "0.53410566", "0.5340789", "0.5339528", "0.5338541", "0.53374934", "0.53310186", "0.5318298", "0.53037566", "0.5297165", "0.5296219", "0.52950394", "0.52942425", "0.5264231", "0.52502733", "0.52473104", "0.52459735", "0.52446765", "0.5230773", "0.52306384", "0.5230165", "0.5229805", "0.52198297", "0.5219255", "0.5216592" ]
0.66585445
1
Return a counts object, or null if no counts are available
Counts getCounts(VcfRecord record, int sampleNumber) { assert mHeader != null; // i.e. checkHeader method must be called before this if (sampleNumber >= mSampleToAntecedents.size()) { return null; // No such sample } final List<Integer> antecedents = mSampleToAntecedents.get(sampleNumber); if (antecedents.isEmpty()) { return null; // Not a derived or child sample } final Integer ss = record.getSampleInteger(sampleNumber, FORMAT_SOMATIC_STATUS); if (ss != null) { if (ss != 2) { return null; // Not a somatic call } } else { // Might be a family de novo type call final String deNovoStatus = record.getSampleString(sampleNumber, FORMAT_DENOVO); if (!"Y".equals(deNovoStatus)) { return null; // Not a de novo } } final int[] originalAd = ad(record, antecedents); final int[] derivedAd = ad(record, sampleNumber); final long oSum = ArrayUtils.sum(originalAd); final long dSum = ArrayUtils.sum(derivedAd); if (oSum == 0 || dSum == 0) { return null; } final boolean[] originalAlleles = alleles(record, antecedents); final boolean[] derivedAlleles = alleles(record, sampleNumber); assert originalAlleles.length == originalAd.length && originalAlleles.length == derivedAlleles.length && originalAlleles.length == derivedAd.length; final double invOriginalAdSum = 1.0 / oSum; final double invDerivedAdSum = 1.0 / dSum; int derivedContraryCount = 0; double derivedContraryFraction = 0.0; int origContraryCount = 0; double origContraryFraction = 0.0; for (int k = 0; k < originalAlleles.length; ++k) { if (originalAlleles[k] && !derivedAlleles[k]) { derivedContraryCount += derivedAd[k]; derivedContraryFraction += derivedAd[k] * invDerivedAdSum; } else if (!originalAlleles[k] && derivedAlleles[k]) { origContraryCount += originalAd[k]; origContraryFraction += originalAd[k] * invOriginalAdSum; } } return new Counts(origContraryCount, derivedContraryCount, origContraryFraction, derivedContraryFraction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.a9.spec.opensearch.x11.QueryType.Count xgetCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Count target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Count)get_store().find_attribute_user(COUNT$8);\n return target;\n }\n }", "public int getCount()\r\n {\r\n return counts.peekFirst();\r\n }", "public long getCount() {\n return count.get();\n }", "@Override\n\tpublic Long count() {\n\t\treturn null;\n\t}", "public Integer getCounts() {\n return counts;\n }", "public int get_count();", "@Override\r\n\tpublic Long getTotalCount() {\n\t\treturn null;\r\n\t}", "List<Object> getCountList();", "Long getAllCount();", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "public java.math.BigInteger getCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COUNT$8);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }", "long getCount();", "long getCount();", "public Integer getCount(T key) {\n\t\tMutInt val = counts.get(key);\n\t\tif (val == null) {return null;}\n\t\treturn val.get();\n\t}", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public long count() { return count.get(); }", "public Long getCount() {\n return count;\n }", "Integer count();", "Integer count();", "public Integer countAll() {\n\t\treturn null;\n\t}", "public Integer getCount() {\n return count;\n }", "public Long getCount() {\r\n return count;\r\n }", "public Map<String, Integer> getCounts() {\n\t\treturn Collections.unmodifiableMap(counts);\n\t}", "int getTotalCount();", "public int count();", "public int count();", "public int count();", "public int count();", "@Override\n\tpublic String count() throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String count() throws Exception {\n\t\treturn null;\n\t}", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Long getCount() {\n return this.Count;\n }", "@GetMapping(path = \"/count\")\r\n\tpublic ResponseEntity<Long> getCount() {\r\n\t\tLong count = this.bl.getCount();\r\n\t\treturn ResponseEntity.status(HttpStatus.OK).body(count);\r\n\t}", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public long getCount() {\n return counter.get();\n }", "public long count() ;", "public synchronized int getCount () {\n int c = count;\n count = 0;\n return c;\n }", "default long count() {\n\t\treturn select(Wildcard.count).fetchCount();\n\t}", "public Integer getCount() {\n\t\treturn count;\n\t}", "public Integer getCount() {\n\t\treturn count;\n\t}", "Long count();", "Long count();", "Long count();", "Long count();", "Long count();", "public long getCount()\n\t{\n\t\treturn count;\n\t}", "public Integer getCount() {\n return this.count;\n }", "public long getCount() {\r\n return count;\r\n }", "public int getCount();", "public int getCount();", "public int getCount();", "public long getCount() {\n return count;\n }", "public long getCount() {\n return count;\n }", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "io.dstore.values.IntegerValue getCounter();", "public Integer getDocumentCount() {\n return null;\n }", "public long getCount() {\n return count_;\n }", "int getInCount();", "public static Enumeration getUseCounts() \n {\n return frequency.elements();\n }", "@Override\n public long count();", "int getMetricsCount();", "public synchronized int getCount()\n\t{\n\t\treturn count;\n\t}", "int getDetailsCount();", "int getDetailsCount();", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public long getCount() {\n return count_;\n }", "int getCachedCount();", "public Flowable<Integer> counts() {\n return createFlowable(b.updateBuilder, db) //\n .flatMap(Tx.flattenToValuesOnly());\n }", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic Long getCount() throws SQLException {\n\t\treturn null;\r\n\t}", "public abstract int getCount();", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}", "public long getCount() {\n return getCount(new BasicDBObject(), new DBCollectionCountOptions());\n }", "public Integer countAll();", "public Long getElementCount();", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "public static int performanceCountGet() { return 0; }" ]
[ "0.6709326", "0.6583569", "0.6575623", "0.6570153", "0.64949125", "0.6479434", "0.64122367", "0.63744056", "0.63571334", "0.6340839", "0.6308285", "0.62536776", "0.62536776", "0.62393564", "0.6239355", "0.6239355", "0.6239355", "0.6225161", "0.6209371", "0.6182043", "0.6182043", "0.6166677", "0.6114182", "0.61113083", "0.608885", "0.6084872", "0.60727125", "0.60727125", "0.60727125", "0.60727125", "0.60596853", "0.60596853", "0.6054208", "0.6054208", "0.6054208", "0.6054208", "0.6054208", "0.6054208", "0.60405815", "0.6011782", "0.6009007", "0.6004799", "0.5989548", "0.59859246", "0.5977405", "0.59718597", "0.59718597", "0.5963352", "0.5963352", "0.5963352", "0.5963352", "0.5963352", "0.5936804", "0.5932265", "0.59297657", "0.59284586", "0.59284586", "0.59284586", "0.59253323", "0.59253323", "0.592142", "0.592142", "0.592142", "0.592142", "0.592142", "0.592142", "0.5912106", "0.5897852", "0.5897402", "0.58902293", "0.58672947", "0.5847415", "0.5824159", "0.5821201", "0.5819803", "0.5819803", "0.5816504", "0.5816504", "0.5816504", "0.58161205", "0.5802199", "0.57821244", "0.5770153", "0.5770153", "0.5767878", "0.5760787", "0.57301766", "0.57295156", "0.5728559", "0.5721802", "0.5711646", "0.5701703", "0.5692613", "0.5692613", "0.5692613", "0.5692613", "0.5692613", "0.5692613", "0.5692613", "0.5692613", "0.5678721" ]
0.0
-1
Performs the actual test.
@Test public void test() { Configuration.getInstance().setDeductIncomeTax(false); String symbol = "TST"; Stock stock = new Stock(symbol, "Test Stock"); stock.setPrice(10.00); stock.setDivRate(1.00); // Initial (empty) position. Position position = new Position(stock); Assert.assertEquals(0, position.getNoOfShares()); Assert.assertEquals(0.00, position.getCurrentCost(), DELTA); Assert.assertEquals(0.00, position.getCurrentValue(), DELTA); Assert.assertEquals(0.00, position.getCurrentResult(), DELTA); Assert.assertEquals(0.00, position.getTotalCost(), DELTA); Assert.assertEquals(0.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(0.00, position.getYieldOnCost(), DELTA); Assert.assertEquals(0.00, position.getTotalIncome(), DELTA); Assert.assertEquals(0.00, position.getTotalReturn(), DELTA); Assert.assertEquals(0.00, position.getTotalReturnPercentage(), DELTA); // BUY 100 @ $20 ($5 costs) stock.setPrice(20.00); position.addTransaction(TestUtil.createTransaction(1, 1L, TransactionType.BUY, symbol, 100, 20.00, 5.00)); Assert.assertEquals(100, position.getNoOfShares()); Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA); Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-5.00, position.getCurrentResult(), DELTA); Assert.assertEquals(2005.00, position.getTotalCost(), DELTA); Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA); Assert.assertEquals(0.00, position.getTotalIncome(), DELTA); Assert.assertEquals(-5.00, position.getTotalReturn(), DELTA); Assert.assertEquals(-0.25, position.getTotalReturnPercentage(), DELTA); // DIVIDEND 100 @ $1.00 position.addTransaction(TestUtil.createTransaction(2, 2L, TransactionType.DIVIDEND, symbol, 100, 1.00, 0.00)); Assert.assertEquals(100, position.getNoOfShares()); Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA); Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-5.00, position.getCurrentResult(), DELTA); Assert.assertEquals(2005.00, position.getTotalCost(), DELTA); Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+95.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+4.74, position.getTotalReturnPercentage(), DELTA); // Price drops to $10 stock.setPrice(10.00); Assert.assertEquals(100, position.getNoOfShares()); Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA); Assert.assertEquals(1000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-1005.00, position.getCurrentResult(), DELTA); Assert.assertEquals(-50.12, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(2005.00, position.getTotalCost(), DELTA); Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(-905.00, position.getTotalReturn(), DELTA); Assert.assertEquals(-45.14, position.getTotalReturnPercentage(), DELTA); // BUY another 100 @ $10 ($5 costs) position.addTransaction(TestUtil.createTransaction(3, 3L, TransactionType.BUY, symbol, 100, 10.00, 5.00)); Assert.assertEquals(200, position.getNoOfShares()); Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA); Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-1010.00, position.getCurrentResult(), DELTA); Assert.assertEquals(-33.55, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3010.00, position.getTotalCost(), DELTA); Assert.assertEquals(200.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(6.64, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(-910.00, position.getTotalReturn(), DELTA); Assert.assertEquals(-30.23, position.getTotalReturnPercentage(), DELTA); // Price raises to $20 again stock.setPrice(20.00); Assert.assertEquals(200, position.getNoOfShares()); Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA); Assert.assertEquals(4000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(+990.00, position.getCurrentResult(), DELTA); Assert.assertEquals(+32.89, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3010.00, position.getTotalCost(), DELTA); Assert.assertEquals(200.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(6.64, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+1090.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+36.21, position.getTotalReturnPercentage(), DELTA); // DIVIDEND 200 @ $1.25 stock.setDivRate(1.25); position.addTransaction(TestUtil.createTransaction(4, 4L, TransactionType.DIVIDEND, symbol, 200, 1.25, 0.00)); Assert.assertEquals(200, position.getNoOfShares()); Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA); Assert.assertEquals(4000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(+990.00, position.getCurrentResult(), DELTA); Assert.assertEquals(+32.89, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3010.00, position.getTotalCost(), DELTA); Assert.assertEquals(250.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(8.31, position.getYieldOnCost(), DELTA); Assert.assertEquals(350.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+1340.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+44.52, position.getTotalReturnPercentage(), DELTA); // SELL 200 @ $20 ($10 costs) position.addTransaction(TestUtil.createTransaction(5, 5L, TransactionType.SELL, symbol, 200, 20.00, 10.00)); Assert.assertEquals(0, position.getNoOfShares()); Assert.assertEquals(0.00, position.getCurrentCost(), DELTA); Assert.assertEquals(0.00, position.getCurrentValue(), DELTA); Assert.assertEquals(0.00, position.getCurrentResult(), DELTA); Assert.assertEquals(0.00, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3020.00, position.getTotalCost(), DELTA); Assert.assertEquals(0.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(0.00, position.getYieldOnCost(), DELTA); Assert.assertEquals(350.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+1330.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+44.04, position.getTotalReturnPercentage(), DELTA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runTest() {\n\t\trunTest(getIterations());\n\t}", "@Override\n public void runTest() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void run() {\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }", "private void test() {\n\n\t}", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "public void testExecute() {\n\t\taes.execute();\n\t\t\n\t\tassertTrue(a.wasStopPollingMessagesCalled);\n\t\tassertTrue(osm.wasWriteCalled);\n\t}", "@Override\n\tpublic void runTest() throws Throwable {}", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "@Test\n public void shouldProcessData() throws Exception {\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "public void test() {\n\tassertTrue(true);\n\t}", "@Test\n public void testRun_Complex_Execution() {\n // TODO: TBD - Exactly as done in Javascript\n }", "public void test() {\n\t}", "@Test\r\n\tpublic void executionTest() throws Exception {\n\t\tOperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();\r\n\t\toperEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);\r\n\t\toperEnvDistStatusObj.setDistributionId(asdcDistributionId);\r\n\t\toperEnvDistStatusObj.setOperationalEnvId( operationalEnvironmentId);\r\n\t\toperEnvDistStatusObj.setDistributionIdStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());\r\n\t\toperEnvDistStatusObj.setRequestId(requestId);\r\n\t\t\r\n\t\t// ServiceModelStatus - getOperationalEnvServiceModelStatus\r\n\t\tOperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();\r\n\t\toperEnvServiceModelStatusObj.setRequestId(requestId);\r\n\t\toperEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);\r\n\t\toperEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());\r\n\t\toperEnvServiceModelStatusObj.setRecoveryAction(recoveryAction);\r\n\t\toperEnvServiceModelStatusObj.setRetryCount(retryCount);\r\n\t\toperEnvServiceModelStatusObj.setWorkloadContext(workloadContext);\r\n\t\toperEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);\r\n\t\tList<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();\r\n\t\tqueryServiceModelResponseList.add(operEnvServiceModelStatusObj);\r\n\t\t\r\n\t\t// prepare distribution obj\r\n\t\tDistribution distribution = new Distribution();\r\n\t\tdistribution.setStatus(Status.DISTRIBUTION_COMPLETE_OK);\r\n\t\trequest.setDistribution(distribution);\r\n\t\trequest.setDistributionId(asdcDistributionId);\r\n\t\t\r\n\t\t// prepare asdc return data\r\n\t\tString jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);\r\n\t\r\n\t\tJSONObject jsonObject = new JSONObject();\r\n\t\tjsonObject.put(\"statusCode\", \"202\");\r\n\t\tjsonObject.put(\"message\", \"Success\");\r\n\t\tjsonObject.put(\"distributionId\", asdcDistributionId);\r\n\t\t\r\n\t\t// Mockito mock\r\n\t\tOperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);\r\n\t\tOperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);\r\n\t\tRequestsDBHelper dbUtils = mock(RequestsDBHelper.class);\r\n\t\tAsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);\r\n\t\tRESTConfig configMock = Mockito.mock(RESTConfig.class);\r\n\t\tRESTClient clientMock = Mockito.mock(RESTClient.class);\r\n\t\tAPIResponse apiResponseMock = Mockito.mock(APIResponse.class);\t\t\r\n\t\r\n\t\tMockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);\r\n\t\tMockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);\r\n\t\tMockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);\t\t\r\n\t\tMockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);\t\t\r\n\t\t\r\n\t\tMockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);\r\n\t\tMockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);\t\t\r\n\t\tMockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);\t\t\r\n\t\t\r\n\t\tint row = 1;\r\n\t\tMockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);\r\n\t\tMockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);\r\n\t\t\r\n\t\tdoNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));\r\n\t\t\r\n\t\trequest.setOperationalEnvironmentId(operationalEnvironmentId);\r\n\t\tActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);\r\n\t\tActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);\r\n\t\tactivateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);\r\n\t\tactivateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);\r\n\t\tactivateVnfStatusMock.setRequestsDBHelper(dbUtils);\t\t\r\n\t\tactivateVnfStatusMock.setAsdcClientHelper(asdcClientHelperMock);\r\n\r\n\t\tactivateVnfStatusMock.execute();\t\t\r\n\t\t\r\n\t\tverify(distributionDb, times(1)).updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId);\r\n\t\tverify(serviceModelDb, times(1)).updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0);\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "@Test\n\tpublic void test() {\n\t\tTestUtil.testEquals(new Object[][]{\n\t\t\t\t{4, 2, 7, 1, 3},\n\t\t\t\t{3, 3, 5, 2, 1},\n\t\t\t\t{15, 2, 4, 8, 2}\n\t\t});\n\t}", "@Test\r\n\tpublic void testSanity() {\n\t}", "public void testCheck()\r\n {\n DataUtil.check(9, \"This is a test!\");\r\n }", "@Test\n\tpublic void Cases_23275_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Go to Active tasks dashlet\n\t\t// TODO: VOOD-960 - Dashlet selection \n\t\tnew VoodooControl(\"span\", \"css\", \".row-fluid > li div span a span\").click();\n\t\tnew VoodooControl(\"a\", \"css\", \"[data-dashletaction='createRecord']\").click();\n\t\tsugar().tasks.createDrawer.getEditField(\"subject\").set(testName);\n\t\tsugar().tasks.createDrawer.save();\n\t\tif(sugar().alerts.getSuccess().queryVisible()) {\n\t\t\tsugar().alerts.getSuccess().closeAlert();\n\t\t}\n\n\t\t// refresh the Dashlet\n\t\tnew VoodooControl(\"a\", \"css\", \".dashboard-pane ul > li > ul > li .btn-group [title='Configure']\").click();\n\t\tnew VoodooControl(\"a\", \"css\", \"li > div li div [data-dashletaction='refreshClicked']\").click();\n\t\tVoodooUtils.waitForReady();\n\n\t\t// Verify task is in Active-Task Dashlet (i.e in TODO tab, if we have no related date for that record)\n\t\tnew VoodooControl(\"div\", \"css\", \"div[data-voodoo-name='active-tasks'] .dashlet-unordered-list .dashlet-tabs-row div.dashlet-tab:nth-of-type(3)\").click();\n\t\tnew VoodooControl(\"div\", \"css\", \"div.tab-pane.active p a:nth-of-type(2)\").assertEquals(testName, true);\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "protected abstract TestResult runTestImpl() throws Exception;", "@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}", "@Override\n protected void executeTest() {\n ClientConnection<Event> harry = register(0, \"Harry\", this.monstertype, \"Active\", 1, 0);\n ClientConnection<Event> statist23 = register(1, \"Statist23\", CreatureType.KOBOLD, \"Passive\", 0, 0);\n\n assertRegisterEvent(harry.nextEvent(), 1, \"Statist23\", CreatureType.KOBOLD, \"Passive\", 0, 0);\n assertRegisterEvent(statist23.nextEvent(), 0, \"Harry\", this.monstertype, \"Active\", 1, 0);\n\n // round 1 begins\n assertRoundBegin(assertAndMerge(harry, statist23), 1);\n\n for (int i = 0; i < this.stepsBeforeTurn; i++) {\n assertActNow(assertAndMerge(harry, statist23), 0);\n harry.sendMove(Direction.EAST);\n assertMoved(assertAndMerge(harry, statist23), 0, Direction.EAST);\n }\n assertActNow(assertAndMerge(harry, statist23), 0);\n harry.sendMove(this.lastDirection);\n assertKicked(assertAndMerge(harry, statist23), 0);\n\n assertActNow(assertAndMerge(harry, statist23), 1);\n statist23.sendDoneActing();\n assertDoneActing(assertAndMerge(harry, statist23), 1);\n\n assertRoundEnd(assertAndMerge(harry, statist23), 1, 0);\n assertWinner(assertAndMerge(harry, statist23), \"Passive\");\n }", "public boolean test() throws Exception {\n throw new Exception(\"Test funcationality not yet implemented: unclear API\");\n }", "@Test\n\tpublic void check() {\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Unit Test Begins\");\n\t\t\t// Generate Random Log file\n\t\t\tUnitTestLogGenerator.generateRandomLogs();\n\t\t\t// Generate Cmd String\n\t\t\tString cmd = ClientClass.generateCommand(IpAddress, \"seth\", \"v\",\n\t\t\t\t\ttrue);\n\t\t\t// Run Local Grep;\n\t\t\tlocalGrep(cmd);\n\t\t\t// Connecting to Server\n\t\t\tConnectorService connectorService = new ConnectorService();\n\t\t\tconnectorService.connect(IpAddress, cmd);\n\t\t\tInputStream FirstFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/localoutput_unitTest.txt\");\n\t\t\tInputStream SecondFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/output_main.txt\");\n\t\t\tSystem.out.println(\"Comparing the two outputs...\");\n\t\t\tboolean result = fileComparison(FirstFileStream, SecondFileStream);\n\t\t\tAssert.assertTrue(result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\r\n\tpublic void testOrderPerform() {\n\t}", "public void execute() {\n TestOrchestratorContext context = factory.createContext(this);\n\n PipelinesManager pipelinesManager = context.getPipelinesManager();\n ReportsManager reportsManager = context.getReportsManager();\n TestDetectionOrchestrator testDetectionOrchestrator = context.getTestDetectionOrchestrator();\n TestPipelineSplitOrchestrator pipelineSplitOrchestrator = context.getPipelineSplitOrchestrator();\n\n pipelinesManager.initialize(testTask.getPipelineConfigs());\n reportsManager.start(testTask.getReportConfigs(), testTask.getTestFramework());\n pipelineSplitOrchestrator.start(pipelinesManager);\n\n testDetectionOrchestrator.startDetection();\n testDetectionOrchestrator.waitForDetectionEnd();\n LOGGER.debug(\"test - detection - ended\");\n\n pipelineSplitOrchestrator.waitForPipelineSplittingEnded();\n pipelinesManager.pipelineSplittingEnded();\n LOGGER.debug(\"test - pipeline splitting - ended\");\n\n pipelinesManager.waitForExecutionEnd();\n reportsManager.waitForReportEnd();\n\n LOGGER.debug(\"test - execution - ended\");\n }", "public void run() {\n RandomizedContext current = RandomizedContext.current();\n try {\n current.push(c.randomness);\n runSingleTest(notifier, c);\n } catch (Throwable t) {\n Rethrow.rethrow(augmentStackTrace(t)); \n } finally {\n current.pop();\n }\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Override\r\n public void runTests() {\r\n getTemperature();\r\n }", "@Test\n public void accuseSuccesTest() throws Exception {\n }", "public TestResult run() {\n TestResult result= createResult();\n run(result);\n return result;\n }", "public void runTest() throws Exception {\n testCreateAndLoadLaptop();\n }", "protected void test(TestRunnable r) throws Exception {\n generateCorrectClassFiles();\n\n runTest(r);\n }", "@Test\r\n public void test_performLogic_Accuracy3() throws Exception {\r\n instance.performLogic(new ArrayList<UploadedDocument>());\r\n }", "@Test\r\n public void test_performLogic_Accuracy4() throws Exception {\r\n UploadedDocument doc = new UploadedDocument();\r\n doc.setDocumentId(500);\r\n doc.setContestId(1);\r\n doc.setFileName(\"test.txt\");\r\n doc.setPath(\"test_files\");\r\n doc.setMimeTypeId(new MimeTypeRetriever().getMimeTypeIdFromFileName(\"test_files/test.txt\"));\r\n List<UploadedDocument> docUploads = new ArrayList<UploadedDocument>();\r\n docUploads.add(doc);\r\n\r\n instance.performLogic(docUploads);\r\n }", "public void testRunning()\n\t\t{\n\t\t\tInvestigate._invData.clearStores();\n\n\t\t\tfinal WorldLocation topLeft = SupportTesting.createLocation(0, 10000);\n\t\t\ttopLeft.setDepth(-1000);\n\t\t\tfinal WorldLocation bottomRight = SupportTesting.createLocation(10000, 0);\n\t\t\tbottomRight.setDepth(1000);\n\t\t\tfinal WorldArea theArea = new WorldArea(topLeft, bottomRight);\n\t\t\tfinal RectangleWander heloWander = new RectangleWander(theArea,\n\t\t\t\t\t\"rect wander\");\n\t\t\theloWander.setSpeed(new WorldSpeed(20, WorldSpeed.Kts));\n\t\t\tfinal RectangleWander fishWander = new RectangleWander(theArea,\n\t\t\t\t\t\"rect wander 2\");\n\n\t\t\tRandomGenerator.seed(12);\n\n\t\t\tWaterfall searchPattern = new Waterfall();\n\t\t\tsearchPattern.setName(\"Searching\");\n\n\t\t\tTargetType theTarget = new TargetType(Category.Force.RED);\n\t\t\tInvestigate investigate = new Investigate(\"investigating red targets\",\n\t\t\t\t\ttheTarget, DetectionEvent.IDENTIFIED, null);\n\t\t\tsearchPattern.insertAtHead(investigate);\n\t\t\tsearchPattern.insertAtFoot(heloWander);\n\n\t\t\tfinal Status heloStat = new Status(1, 0);\n\t\t\theloStat.setLocation(SupportTesting.createLocation(2000, 4000));\n\t\t\theloStat.getLocation().setDepth(-200);\n\t\t\theloStat.setCourse(270);\n\t\t\theloStat.setSpeed(new WorldSpeed(100, WorldSpeed.Kts));\n\n\t\t\tfinal Status fisherStat = new Status(1, 0);\n\t\t\tfisherStat.setLocation(SupportTesting.createLocation(4000, 2000));\n\t\t\tfisherStat.setCourse(155);\n\t\t\tfisherStat.setSpeed(new WorldSpeed(12, WorldSpeed.Kts));\n\n\t\t\tfinal DemandedStatus dem = null;\n\n\t\t\tfinal SimpleDemandedStatus ds = (SimpleDemandedStatus) heloWander.decide(\n\t\t\t\t\theloStat, null, dem, null, null, 100);\n\n\t\t\tassertNotNull(\"dem returned\", ds);\n\n\t\t\t// ok. the radar first\n\t\t\tASSET.Models.Sensor.Lookup.RadarLookupSensor radar = new RadarLookupSensor(\n\t\t\t\t\t12, \"radar\", 0.04, 11000, 1.2, 0, new Duration(0, Duration.SECONDS),\n\t\t\t\t\t0, new Duration(0, Duration.SECONDS), 9200);\n\n\t\t\tASSET.Models.Sensor.Lookup.OpticLookupSensor optic = new OpticLookupSensor(\n\t\t\t\t\t333, \"optic\", 0.05, 10000, 1.05, 0.8, new Duration(20,\n\t\t\t\t\t\t\tDuration.SECONDS), 0.2, new Duration(30, Duration.SECONDS));\n\n\t\t\tHelo helo = new Helo(23);\n\t\t\thelo.setName(\"Merlin\");\n\t\t\thelo.setCategory(new Category(Category.Force.BLUE,\n\t\t\t\t\tCategory.Environment.AIRBORNE, Category.Type.HELO));\n\t\t\thelo.setStatus(heloStat);\n\t\t\thelo.setDecisionModel(searchPattern);\n\t\t\thelo.setMovementChars(HeloMovementCharacteristics.getSampleChars());\n\t\t\thelo.getSensorFit().add(radar);\n\t\t\thelo.getSensorFit().add(optic);\n\n\t\t\tSurface fisher2 = new Surface(25);\n\t\t\tfisher2.setName(\"Fisher2\");\n\t\t\tfisher2.setCategory(new Category(Category.Force.RED,\n\t\t\t\t\tCategory.Environment.SURFACE, Category.Type.FISHING_VESSEL));\n\t\t\tfisher2.setStatus(fisherStat);\n\t\t\tfisher2.setDecisionModel(fishWander);\n\t\t\tfisher2.setMovementChars(SurfaceMovementCharacteristics.getSampleChars());\n\n\t\t\tCoreScenario cs = new CoreScenario();\n\t\t\tcs.setScenarioStepTime(5000);\n\t\t\tcs.addParticipant(helo.getId(), helo);\n\t\t\tcs.addParticipant(fisher2.getId(), fisher2);\n\n\t\t\t// ok. just do a couple of steps, to check how things pan out.\n\t\t\tcs.step();\n\n\t\t\tSystem.out.println(\"started at:\" + cs.getTime());\n\n\t\t\tDebriefReplayObserver dro = new DebriefReplayObserver(\"./test_reports/\",\n\t\t\t\t\t\"investigate_search.rep\", false, true, true, null, \"plotter\", true);\n\t\t\tTrackPlotObserver tpo = new TrackPlotObserver(\"./test_reports/\", 300,\n\t\t\t\t\t300, \"investigate_search.png\", null, false, true, false, \"tester\",\n\t\t\t\t\ttrue);\n\t\t\tdro.setup(cs);\n\t\t\ttpo.setup(cs);\n\t\t\t//\n\t\t\tdro.outputThisArea(theArea);\n\n\t\t\tInvestigateStore theStore = Investigate._invData.firstStore();\n\n\t\t\t// now run through to completion\n\t\t\tint counter = 0;\n\t\t\twhile ((cs.getTime() < 12000000)\n\t\t\t\t\t&& (theStore.getCurrentTarget(23) == null))\n\t\t\t{\n\t\t\t\tcs.step();\n\t\t\t\tcounter++;\n\t\t\t}\n\n\t\t\t// so, we should have found our tartget\n\t\t\tassertNotNull(\"found target\", theStore.getCurrentTarget(23));\n\n\t\t\t// ok. we've found it. check that we do transition to detected\n\t\t\tcounter = 0;\n\t\t\twhile ((counter++ < 100) && (theStore.getCurrentTarget(23) != null))\n\t\t\t{\n\t\t\t\tcs.step();\n\t\t\t}\n\n\t\t\tdro.tearDown(cs);\n\t\t\ttpo.tearDown(cs);\n\n\t\t\t// so, we should have cleared our tartget\n\t\t\tassertNull(\"found target\", theStore.getCurrentTarget(23));\n\t\t\tassertEquals(\"remembered contact\", 1, theStore.countDoneTargets());\n\n\t\t}", "@Override\n public void test() {\n \n }", "@Override\r\n\tpublic void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}", "@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }", "@Test\n public void testGetAnalyzedData() {\n System.out.println(\"getAnalyzedData\");\n \n }", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "@Test\n\tpublic void testReadTicketOk() {\n\t}", "public void testWriteOrders() throws Exception {\n }", "@Test\r\n public void test_performLogic_Accuracy1() throws Exception {\r\n try {\r\n UploadedDocument doc = new UploadedDocument();\r\n doc.setDocumentId(1);\r\n doc.setContestId(1);\r\n doc.setFileName(\"test.txt\");\r\n doc.setPath(\"test_files\");\r\n doc.setMimeTypeId(new MimeTypeRetriever().getMimeTypeIdFromFileName(\"test_files/test.txt\"));\r\n List<UploadedDocument> docUploads = new ArrayList<UploadedDocument>();\r\n docUploads.add(doc);\r\n\r\n instance.performLogic(docUploads);\r\n\r\n String expectedContents = TestHelper.getFileContents(\"test_files/test.txt\");\r\n\r\n // make sure file was added\r\n assertEquals(\"content type is wrong\", \"text/plain\", instance.getContentType());\r\n assertEquals(\"content length is wrong\", expectedContents.length(), instance.getContentLength());\r\n assertEquals(\"content disposition is wrong\", \"attachment;filename=test.txt\", instance\r\n .getContentDisposition());\r\n\r\n // make sure input stream was set correctly and file contents are correct\r\n StringWriter writer = new StringWriter();\r\n IOUtils.copy(instance.getInputStream(), writer);\r\n String actualContents = writer.toString();\r\n assertEquals(\"input stream is wrong\", expectedContents, actualContents);\r\n } finally {\r\n IOUtils.closeQuietly(instance.getInputStream());\r\n }\r\n }", "@Override\n\tpublic void testEngine() {\n\t\t\n\t}", "public static void run()\n {\n String[] testInput = FileIO.readAsStrings(\"2020/src/day17/Day17TestInput.txt\");\n String[] realInput = FileIO.readAsStrings(\"2020/src/day17/Day17Input.txt\");\n\n Test.assertEqual(\"Day 17 - Part A - Test input\", partA(testInput), 112);\n Test.assertEqual(\"Day 17 - Part A - Challenge input\", partA(realInput), 384);\n Test.assertEqual(\"Day 17 - Part B - Test input\", partB(testInput), 848);\n Test.assertEqual(\"Day 17 - Part B - Challenge input\", partB(realInput), 2012);\n }", "public void testOperation();", "@Test\n public void matchCorrect() {\n }", "public void run() {\n\t\t// Child threads start here to begin testing-- tests are below\n\t\n\t\t// We suggest writing a series of zero-sum tests,\n\t\t// i.e. lists should be empty between tests. \n\t\t// The interimBarr enforces this.\n\t\ttry {\n\t\t\tcontainsOnEmptyListTest();\n\t\t\tinterimBarr.await();\n\t\t\tsentinelsInEmptyListTest();\n\t\t\tprintResBarr.await();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "static void executeTest() {\n int[] param1 = { // Checkpoint 1\n 12, 11, 10, -1, -15,};\n boolean[] expect = { // Checkpoint 2\n true, false,true, false, true,}; \n System.out.printf(\"課題番号:%s, 学籍番号:%s, 氏名:%s\\n\",\n question, gakuban, yourname);\n int passed = 0;\n for (int i = 0; i < param1.length; i++) {\n String info1 = \"\", info2 = \"\";\n Exception ex = null;\n boolean returned = false; //3\n try {\n returned = isDivable(param1[i]); //4\n if (expect[i] == (returned)) { //5\n info1 = \"OK\";\n passed++;\n } else {\n info1 = \"NG\";\n info2 = String.format(\" <= SHOULD BE %s\", expect[i]);\n }\n } catch (Exception e) {\n info1 = \"NG\";\n info2 = \"EXCEPTION!!\";\n ex = e;\n } finally {\n String line = String.format(\"*** Test#%d %s %s(%s) => \",\n i + 1, info1, method, param1[i]);\n if (ex == null) {\n System.out.println(line + returned + info2);\n } else {\n System.out.println(line + info2);\n ex.printStackTrace();\n return;\n }\n }\n }\n System.out.printf(\"Summary: %s,%s,%s,%d/%d\\n\",\n question, gakuban, yourname, passed, param1.length);\n }", "@Test\r\n public void dummyCanGiveXP() {\n\r\n dummy.giveExperience();\r\n\r\n assertEquals(DUMMY_EXPERIENCE, dummy.giveExperience());\r\n }", "@Override\n\tpublic void onTestSuccess(ITestResult arg0) {\n\t\tSystem.out.println(\"when test success\");\n\t\t\n\t}", "@Test\r\n\tpublic void acreditar() {\r\n\t}", "public void testBidu(){\n\t}", "@Override\n\tpublic void onTestSuccess(ITestResult arg0) {\n\n\t}", "public void testaReclamacao() {\n\t}", "public void run(TestCase testCase) {\n }", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t}", "protected abstract void executeTests() throws BuilderException;", "@Test\r\n public void test_performLogic_Accuracy5() throws Exception {\r\n try {\r\n UploadedDocument doc = new UploadedDocument();\r\n doc.setDocumentId(1);\r\n doc.setContestId(1);\r\n doc.setFileName(\"test.txt\");\r\n doc.setPath(\"test_files\");\r\n doc.setMimeTypeId(new MimeTypeRetriever().getMimeTypeIdFromFileName(\"test_files/test.txt\"));\r\n List<UploadedDocument> docUploads = new ArrayList<UploadedDocument>();\r\n\r\n // add null element for test\r\n docUploads.add(null);\r\n\r\n docUploads.add(doc);\r\n\r\n instance.performLogic(docUploads);\r\n\r\n String expectedContents = TestHelper.getFileContents(\"test_files/test.txt\");\r\n\r\n // make sure file was added\r\n assertEquals(\"content type is wrong\", \"text/plain\", instance.getContentType());\r\n assertEquals(\"content length is wrong\", expectedContents.length(), instance.getContentLength());\r\n assertEquals(\"content disposition is wrong\", \"attachment;filename=test.txt\", instance\r\n .getContentDisposition());\r\n\r\n // make sure input stream was set correctly and file contents are correct\r\n StringWriter writer = new StringWriter();\r\n IOUtils.copy(instance.getInputStream(), writer);\r\n String actualContents = writer.toString();\r\n assertEquals(\"input stream is wrong\", expectedContents, actualContents);\r\n } finally {\r\n IOUtils.closeQuietly(instance.getInputStream());\r\n }\r\n }", "@Test\npublic void testUpdateResult() throws Exception { \n//TODO: Test goes here... \n}", "public void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "@Test\n public void test4() {\n userFury.login(\"23ab\");\n assertTrue(userFury.getLoggedIn());\n\n userFury.buy(secondMusicTitle);\n ArrayList<MusicTitle> actualList = userFury.getTitlesBought();\n assertTrue(actualList.isEmpty());\n }", "public final void doTest() {\n\n constructTestPlan();\n calculator.start();\n resultViewer.start();\n\n // Run Test Plan\n getJmeter().configure(testPlanTree);\n ((StandardJMeterEngine)jmeter).run();\n }", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "public void onTestSuccess(ITestResult arg0) {\n\t\t\n\t}", "public void onTestSuccess(ITestResult arg0) {\n\t\t\n\t}", "@Test\r\n public void test_performLogic_Accuracy2() throws Exception {\r\n instance.performLogic(null);\r\n }", "@Test\n\n\tpublic void Cases_26538_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Verify fields show special chars in name and description fields\n\t\tmyCase.navToRecord();\n\t\tsugar().cases.recordView.getDetailField(\"name\").assertElementContains(casesRecord.get(\"name\"), true);\n\t\tsugar().cases.recordView.getDetailField(\"description\").assertElementContains(casesRecord.get(\"description\"), true);\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@Test\r\n\t public void hasSubmitted3() {\n\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t this.instructor.addHomework(\"sean\", \"ecs60\", 2017, \"p1\");\r\n\t this.student.submitHomework(\"gurender\", \"p1\", \"abc\", \"ecs60\", 2017);\r\n\t this.student.dropClass(\"gurender\", \"ecs60\", 2017);\r\n\t assertTrue(this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs60\", 2017));\r\n\t }", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t}", "public static void testIt () {\r\n\t\tjunit.textui.TestRunner.run (suite());\r\n\t}", "@Test\n public void testActualizar3() {\n System.out.println(\"actualizar\");\n int codigo = 2;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = false;\n boolean result = usuarioController.actualizar(codigo, usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testRentOut() {\r\n }", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice02() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Test\n public void testActualizar2() {\n System.out.println(\"actualizar\");\n usuarioController.crear(usuario1);\n int codigo = 2;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = false;\n boolean result = usuarioController.actualizar(codigo, usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tpublic void test() {\r\n\t}", "public void testPerformance() {\n \t}", "protected void runTest() throws Throwable {\n\t\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t\t}", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "@Test\n public void testActualizar() {\n System.out.println(\"actualizar\");\n usuarioController.crear(usuario1);\n int codigo = 1;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = true;\n boolean result = usuarioController.actualizar(codigo, usuario);\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 }", "public static void runUsual() throws Exception {\r\n\t\ttestRun(0);\r\n\t}", "public void testAltaVehiculo(){\r\n\t}", "public void testexecute(String test) throws Exception;", "public void run(){\n ArrayList<ArrayList<Furniture>> all = getSubsets(getFoundFurniture());\n ArrayList<ArrayList<Furniture>> valid = getValid(all);\n ArrayList<ArrayList<Furniture>> ordered = comparePrice(valid);\n ArrayList<ArrayList<Furniture>> orders = produceOrder();\n checkOrder(orders, false);\n }", "private void runTest(String path, int key){\n\t\t\n\t\tsaveTestList(path); \n\t\tgetSelectedPanel().clearResults();\n\t\tcontroller.runTest(path,key);\n\t}", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\n public void testCheckForProduct() throws Exception {\n }", "@Test\n public void transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice03() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\texspectedFoodList.add(new Appetizer(\"Salad\",Food.foodType.APPETIZER, \"55\"));\r\n\t\texspectedFoodList.add(new Appetizer(\"Beef Enchailada\",Food.foodType.MAINDISH, \"100\"));\t\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\texspectedCombinationList.add(new Combination(exspectedFoodList));\r\n\t\t\r\n\t\tint combinationCounter = 0;\r\n\t\tint foodCounter = 0;\r\n\t\tfor(Combination actualCombination : calcPrice.getResult())\r\n\t\t{\r\n\t\t\tfor(Food actualFood : actualCombination.getFoodCombination())\r\n\t\t\t{\r\n\t\t\t\tassertEquals(exspectedCombinationList.get(combinationCounter).getFoodCombination().get(foodCounter).getFoodName(), actualFood.getFoodName());\r\n\t\t\t\tfoodCounter++;\r\n\t\t\t}\r\n\t\t\tcombinationCounter++;\r\n\t\t}\r\n\t}", "@Test\r\n\t public void hasSubmitted1() {\n\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t // this.instructor.addHomework(\"sean\", \"ecs60\", 2017, \"p1\");\r\n\t this.student.submitHomework(\"gurender\", \"p1\", \"abc\", \"ecs60\", 2017);\r\n\t // assertFalse(this.student.isRegisteredFor(\"gurender\", \"ecs60\", 2018));\r\n\t\t assertFalse(this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs60\", 2017));\r\n\t }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n public void testIsFalling() {\n // Setup\n\n // Run the test\n modelUnderTest.isFalling();\n\n // Verify the results\n }", "@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}", "public void\n performTest\n ( \n BaseMasterExt ext\n )\n throws PipelineException\n {\n ext.preUnpackTest(pPath, pAuthor, pView, pReleaseOnError, pActionOnExistence,\n pToolsetRemap, pSelectionKeyRemap, pLicenseKeyRemap, pHardwareKeyRemap); \n }", "public void testGetTaskActorE(){\n }", "@Test\n public void sustainMassiveDamage() {\n }" ]
[ "0.7184567", "0.6948016", "0.690171", "0.67469656", "0.6716915", "0.6637996", "0.6626388", "0.6604838", "0.66003877", "0.65517974", "0.6337954", "0.63341606", "0.6323361", "0.632129", "0.6306889", "0.6300133", "0.62561285", "0.6252528", "0.6246481", "0.62294793", "0.62277454", "0.6215197", "0.6212795", "0.6212487", "0.6198665", "0.61978376", "0.61946326", "0.6185863", "0.617481", "0.6172313", "0.6166998", "0.61662304", "0.6164596", "0.6155312", "0.6151862", "0.61446387", "0.61425334", "0.6140606", "0.6126324", "0.6126324", "0.6120085", "0.6113726", "0.61099535", "0.6099877", "0.6097377", "0.6088569", "0.60764974", "0.607328", "0.607207", "0.60718685", "0.6071657", "0.60687417", "0.604973", "0.60483706", "0.6043753", "0.6034882", "0.6023792", "0.60231245", "0.60228604", "0.602073", "0.6013068", "0.60117316", "0.60005546", "0.60002434", "0.59991014", "0.5990777", "0.598977", "0.5981873", "0.59818417", "0.59818417", "0.5973351", "0.59727675", "0.5969767", "0.59693325", "0.59692067", "0.5962725", "0.5961198", "0.5947581", "0.59461445", "0.59414804", "0.59378123", "0.5935571", "0.59302664", "0.5913861", "0.5909778", "0.5909635", "0.59039444", "0.59025115", "0.5898282", "0.5896219", "0.58956856", "0.588949", "0.5889004", "0.5886257", "0.58801544", "0.5879894", "0.58760494", "0.5874194", "0.58730257", "0.5872499", "0.5869594" ]
0.0
-1
Retorna um extrato, escrevendoo em arquivo para paginacao.
public static RetornoExtrato getExtratos(String msisdn, String dataInicial, String dataFinal, String servidor, String porta, ArrayList diretorios, String sessionId) throws Exception { String xmlExtrato = ConsultaExtratoGPP.getXml(msisdn, dataInicial, dataFinal, servidor, porta); ConsultaExtratoGPP.saveToFile(xmlExtrato, diretorios, sessionId); return ConsultaExtratoGPP.parse(xmlExtrato); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }", "@Override\r\n\tpublic void gerarExtratoDetalhado(Conta conta) {\n\t\t\r\n\t\tDate agora = new Date();\r\n\r\n\t\tSystem.out.println(\"\\nData: \" + sdf.format(agora));\r\n\t\tSystem.out.println(\"\\nConta: \" + conta.getNumero());\r\n\t\tSystem.out.println(\"\\nAgencia: \" + conta.getAgencia().getNumero());\r\n\t\tSystem.out.println(\"\\nCliente: \" + conta.getCliente().getNome());\r\n\t\tSystem.out.println(\"\\nSaldo: R$\" + df.format(conta.getSaldo()));\r\n\t\tSystem.out.println(\"\\nTaxa Rendimento: \" + df.format(taxaRendimento) + \"%\");\r\n\t}", "private void getExtractWithFiles(){\n\t\ttry{\n\t\t\t\n\t\t\tFileInputStream fStream = new FileInputStream(tfile);\n\t\t\tfileBytes = new byte[(int)tfile.length()];\n\t\t\t\n\t\t\tfStream.read(fileBytes, 0, fileBytes.length);\n\t\t\tfileSize = fileBytes.length;\n\t\t}catch(Exception ex){\n\t\t\tSystem.err.println(\"File Packet \"+ex.getMessage());\n\t\t}\n\t}", "private static RetornoExtrato parse(String xmlExtrato) throws Exception\n\t{\n\t\tRetornoExtrato result = new RetornoExtrato();\n\t\t\n\t\ttry\n\t\t{\t\t\t\t\t\n\t\t\t//Obtendo os objetos necessarios para a execucao do parse do xml\n\t\t\tDocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder parse = docBuilder.newDocumentBuilder();\n\t\t\tInputSource is = new InputSource(new StringReader(xmlExtrato));\n\t\t\tDocument doc = parse.parse(is);\n\n\t\t\tVector v = new Vector();\n\t\t\n\t\t\tExtrato extrato = null;\n\t\t\t\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\n\t\t\t//Obter o índice de recarga\n\t\t\tElement elmDadosControle = (Element)doc.getElementsByTagName(\"dadosControle\").item(0);\n\t\t\tNodeList nlDadosControle = elmDadosControle.getChildNodes();\n\t\t\tif(nlDadosControle.getLength() > 0)\n\t\t\t{\n\t\t\t\tresult.setIndAssinanteLigMix(nlDadosControle.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setPlanoPreco\t\t(nlDadosControle.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t}\n\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"detalhe\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"detalhe\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\t\n\t\t\t\t\textrato = new Extrato();\n\t\t\t\t\textrato.setNumeroOrigem(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setHoraChamada(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setTipoTarifacao(itemNodes.item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setOperacao(itemNodes.item(5).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoOrigem(itemNodes.item(6).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoDestino(itemNodes.item(7).getChildNodes().item(0)!=null?itemNodes.item(7).getChildNodes().item(0).getNodeValue():\"\");\n\t\t\t\t\textrato.setNumeroDestino(itemNodes.item(8).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setDuracaoChamada(itemNodes.item(9).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\t\n\t\t\t\t\textrato.setValorPrincipal\t(stringToDouble(itemNodes.item(10).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorBonus\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorSMS\t\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorGPRS\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorPeriodico\t(stringToDouble(itemNodes.item(10).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorTotal\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\n\t\t\t\t\textrato.setSaldoPrincipal\t(stringToDouble(itemNodes.item(11).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoBonus\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoSMS\t\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoGPRS\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoPeriodico\t(stringToDouble(itemNodes.item(11).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoTotal\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\t\n\t\t\t\t\tv.add(extrato);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setExtratos(v);\n\t\t\t\n\t\t\tv= new Vector();\n\t\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"evento\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"evento\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\n\t\t\t\t\tEvento evento = new Evento();\n\t\t\t\t\tevento.setNome(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setHora(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tv.add(evento);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setEventos(v);\n\t\t\t\n\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"totais\" ).item(0);\n\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t{\t\n\t\t\t\t// SaldoInicial Principal\n\t\t\t\tresult.setSaldoInicialPrincipal\t(itemNodes.item(0).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialBonus\t\t(itemNodes.item(0).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialSMS\t\t(itemNodes.item(0).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialGPRS\t\t(itemNodes.item(0).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialPeriodico\t(itemNodes.item(0).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialTotal\t\t(itemNodes.item(0).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalDebitosPrincipal\t(itemNodes.item(1).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosBonus\t\t(itemNodes.item(1).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosSMS\t\t(itemNodes.item(1).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosGPRS\t\t(itemNodes.item(1).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosPeriodico (itemNodes.item(1).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosTotal\t\t(itemNodes.item(1).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalCreditosPrincipal(itemNodes.item(2).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosBonus\t(itemNodes.item(2).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosSMS\t\t(itemNodes.item(2).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosGPRS\t\t(itemNodes.item(2).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosPeriodico(itemNodes.item(2).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosTotal\t(itemNodes.item(2).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setSaldoFinalPrincipal\t(itemNodes.item(3).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalBonus\t\t(itemNodes.item(3).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalSMS\t\t\t(itemNodes.item(3).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalGPRS\t\t(itemNodes.item(3).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalPeriodico\t(itemNodes.item(3).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalTotal\t\t(itemNodes.item(3).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tserviceElement = (Element) doc.getElementsByTagName( \"dadosCadastrais\" ).item(0);\n\t\t\t\titemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.item(2).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setDataAtivacao(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (itemNodes.item(3).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setPlano(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tthrow new Exception(\"Problemas com a geração do Comprovante de Serviços.\");\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public List<Cuenta> leerArchivoToList(InputStream archivo);", "@Override\n\tpublic MedioPago grabar(MedioPago entidad) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic String[] abrirPedido() throws IOException {\r\n\t\tString[] dados = new String[2];\r\n\t\ttry {\r\n\t\t\tFile f = new File(\"pedido.dat\");\r\n\t\t\tif (f.exists()) {\r\n\t\t\t\tFileInputStream ficheiro = new FileInputStream(f);\r\n\t\t\t\tObjectInputStream in = new ObjectInputStream(ficheiro);\r\n\t\t\t\tdados = (String[]) in.readObject();\r\n\t\t\t\tin.close();\r\n\t\t\t\tficheiro.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tJFrame frame = new JFrame();\r\n\t\t\tJOptionPane.showMessageDialog(frame, \"Ficheiro de contas não encontrado.\");\r\n\t\t}\r\n\t\treturn dados;\r\n\t}", "private byte[] getStreamArquivo(File arquivo) throws IOException\n\t{\n\t\t/* Define o tamanho do buffer a ser lido do arquivo (max 32kb),\n\t\t * faz a criacao de um buffer em memoria para ir armazenando os dados\n\t\t * lidos e entao apos a leitura faz o envio dos dados para o GPP\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tFileInputStream fileInput = new FileInputStream(arquivo);\n\t\tByteArrayOutputStream bufferArquivo = new ByteArrayOutputStream();\n\n\t\tbyte[] data = new byte[sizeBuffer];\n\t\tint count=0;\n\t\twhile ( (count = fileInput.read(data)) != -1 )\n\t\t\tbufferArquivo.write(data,0,count);\n\t\t\n\t\treturn bufferArquivo.toByteArray();\n\t}", "public static RetornoExtrato getExtratosFromFile(String msisdn, String dataInicial, String dataFinal, String servidor, String porta, ArrayList diretorios, String sessionId) throws Exception\n\t{\n\t String xmlExtrato = ConsultaExtratoGPP.readFromFile(diretorios, sessionId);\n\t if(xmlExtrato == null)\n\t {\n\t return ConsultaExtratoGPP.getExtratos(msisdn, dataInicial, dataFinal, servidor, porta, diretorios, sessionId);\n\t }\n\t \n\t return ConsultaExtratoGPP.parse(xmlExtrato);\n\t}", "public Bufer buscandoArchivo(String ruta, String archivo) throws SOAPFaultException, SOAPException{\n traza.trace(\"buscar archivo\", Level.INFO);\n traza.trace(\"archivo \"+archivo, Level.INFO);\n traza.trace(\"ruta \"+ruta, Level.INFO);\n Bufer resp = null;\n try {\n resp = buscarBuferArchivo(ruta, archivo);\n } catch (Exception ex) {\n traza.trace(\"archivo no encontrado\", Level.ERROR, ex);\n }\n return resp;\n }", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "public byte[] getLocalFileDataExtra() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"0a848c50-13a5-41b9-817e-28d7235fee87\");\n final byte[] extra = getExtra();\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1f7ca2fd-527c-4d39-9a26-89a6c51e4dca\");\n return extra != null ? extra : EMPTY;\n }", "private List<PreDocumentoEntrata> ricercaSinteticaPreDocumentoEntrata() {\n\t\tRicercaSinteticaPreDocumentoEntrataResponse resRSPD = ricercaSinteticaPreDocumentoEntrata(0);\t\t\n\t\tList<PreDocumentoEntrata> result = resRSPD.getPreDocumenti();\n\t\t\n\t\tfor(int i = 1; i < resRSPD.getTotalePagine(); i++) {\t\t\t\n\t\t\tresRSPD = ricercaSinteticaPreDocumentoEntrata(i);\n\t\t\tresult.addAll(resRSPD.getPreDocumenti());\t\t\t\n\t\t}\n\t\treturn result;\n\t}", "private static ArrayList<String> Read(String endereco) {\n\n ArrayList<String> conteudo = new ArrayList();\n\n try {\n\n Reader arquivo = null;\n\n try {\n arquivo = new InputStreamReader(new FileInputStream(endereco), \"ISO-8859-1\");\n } catch (UnsupportedEncodingException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR\\nNão foi possivel ler o arquivo: \" + ex);\n }\n\n BufferedReader leitura = new BufferedReader(arquivo);\n\n String linha = \"\";\n\n try {\n\n linha = leitura.readLine();\n\n while (linha != null) {\n\n conteudo.add(linha);\n linha = leitura.readLine();\n\n }\n\n arquivo.close();\n\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR\\nNão foi possivel ler o arquivo: \" + ex);\n }\n\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR\\nArquivo não encontrado: \" + ex);\n }\n\n return conteudo;\n\n }", "public Object leggiDati(){\n\t\ttry{\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tdati = ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t\tSystem.out.println(\"File \" + file + \" letto\");\n\t\t} catch(Exception e){\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.out.println(\"File \" + file + \" non trovato\");\n\t\t\treturn null;\n\t\t}\n\t\treturn dati;\n\t}", "public byte[] getUnzippedFile() throws IOException {\r\n byte[] result = null;\r\n\r\n byte[] zipped = super.getFile();\r\n ByteArrayInputStream bais = new ByteArrayInputStream(zipped);\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n BufferedInputStream bis = new BufferedInputStream(new GZIPInputStream(bais));\r\n BufferedOutputStream bos = new BufferedOutputStream(baos);\r\n int read = -1;\r\n while ((read = bis.read()) != -1) {\r\n bos.write(read);\r\n }\r\n bos.flush();\r\n baos.flush();\r\n result = baos.toByteArray();\r\n bos.close();\r\n bis.close();\r\n bais.close();\r\n baos.close();\r\n\r\n return result;\r\n }", "@Override\n public BufferedReader requestContentTxtFile(Context context) throws IOException{\n InputStream ins = context.getResources().openRawResource(R.raw.timferris);\n BufferedReader reader = new BufferedReader(new InputStreamReader(ins));\n Log.d(\"teste leitura\", \"Model return after reading has been reached\");\n\n return reader;\n }", "@Override\n\tpublic void emiteExtrato() {\n\t\t\n\t}", "private String[] concatenaArquivos(File ordem) throws Exception\n\t{\n\t\t// Cria referencia para os arquivos que serao retornados\n\t\t// apos o processamento\n\t\tCollection arquivosAposConcatenacao = new LinkedList();\n\t\t\n\t\t// Busca o objeto VoucherOrdem contendo os dados da ordem\n\t\t// que foram lidos a partir do arquivo cabecalho da ordem\n\t\tArquivoPedidoVoucherParser ordemParser = new ArquivoPedidoVoucherParser();\n\t\tVoucherOrdem ordemVoucher = ordemParser.parse(ordem);\n\t\t\n\t\t// Busca agora todas os nomes de arquivos de caixa\n\t\t// existentes gravados tambem no arquivo cabecalho\n\t\tString arquivosCaixa[] = getNomeArquivosCaixa(ordem);\n\t\tString dirOrigem = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\t\t\t\n\t\t// Faz a iteracao nos itens da ordem para entao criar um arquivo \n\t\t// para cada item no formato PrintOrder#[NUMORDEM]_[NUMITEM].dat\n\t\t// e para cada item entao identifica quais arquivos serao concatenados\n\t\tint realNumItem \t\t= 1;\n\t\tlong qtdeSomaCartoes \t= 0;\n\t\tboolean deveConcatenar \t= true;\n\t\tfor (Iterator i=ordemVoucher.getItensOrdem().iterator(); i.hasNext();)\n\t\t{\n\t\t\tVoucherOrdemItem itemOrdem = (VoucherOrdemItem)i.next();\n\t\t\t// O numero do item no sistema GPP comeca a partir do numero zero (0)\n\t\t\t// portanto como na Tecnomen e criado com item 1 o valor e decrescido de um\n\t\t\tlong qtdCartoes = procBatchPOA.getQtdeCartoes(ordemVoucher.getNumeroOrdem(),realNumItem-1);//(int)itemOrdem.getNumItem()-1);\n\t\t\tqtdeSomaCartoes += itemOrdem.getQtdeCartoes();\n\t\t\tif (qtdCartoes != 0 && deveConcatenar)\n\t\t\t{\n\t\t\t\titemOrdem.setQtdeCartoes( qtdCartoes );\n\t\t\t\tFile arquivoItem = new File(getNomeArquivoItem(ordem,realNumItem));//itemOrdem.getNumItem()));\n\t\t\t\tFileOutputStream itemStream = new FileOutputStream(arquivoItem);\n\t\t\t\tif (itemStream != null)\n\t\t\t\t{\n\t\t\t\t\t// Identifica quais sao os arquivos que devem ser concatenados\n\t\t\t\t\t// para este item. Para cada arquivo encontrado , este e lido\n\t\t\t\t\t// e entao concatenado ao arquivo do item que foi criado\n\t\t\t\t\tString caixasDoItem[] = getArquivosCaixaPorItem(ordemVoucher,itemOrdem,arquivosCaixa);\n\t\t\t\t\t// Atualiza informacoes de numeracao de lote do pedido no GPP\n\t\t\t\t\tatualizaNumeracaoLote(ordemVoucher.getNumeroOrdem(),realNumItem,caixasDoItem);//itemOrdem.getNumItem(),caixasDoItem);\n\t\t\t\t\tfor (int j=0; j < caixasDoItem.length; j++)\n\t\t\t\t\t\titemStream.write(getStreamArquivo(new File(dirOrigem+\n\t\t\t\t\t\t System.getProperty(\"file.separator\")+\n\t\t\t\t\t\t caixasDoItem[j])));\n\t\n\t\t\t\t\titemStream.close();\n\t\t\t\t\tarquivosAposConcatenacao.add(arquivoItem.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\titemOrdem.setQtdeCartoes(0);\n\n\t\t\tdeveConcatenar = (qtdCartoes == qtdeSomaCartoes);\n\t\t\tif (qtdCartoes == qtdeSomaCartoes)\n\t\t\t{\n\t\t\t\tqtdeSomaCartoes = 0;\n\t\t\t\trealNumItem++;\n\t\t\t}\n\t\t}\n\t\treturn (String[])arquivosAposConcatenacao.toArray(new String[0]);\n\t}", "protected int leerArchivo(File f){\n try{\n fr = new FileReader(f);\n return parse();\n } catch(Exception e){\n System.out.println(\"Error: \" + e);\n }\n return -1;\n }", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "@GET\n @Path(\"/mostrarOrdenadasFT\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFT(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFT(idUser);\n }", "Pagina getDestino();", "public String getConteudoArquivo() {\n\t\tfinal StringBuilder builder = new StringBuilder();\n\t\tFileReader leitor = null;\n\t\tBufferedReader buffer = null;\n\t\ttry {\n\n\t\t\tleitor = new FileReader(this.arquivo);\n\t\t\tbuffer = new BufferedReader(leitor);\n\n\t\t\twhile (buffer.ready()) {\n\t\t\t\tbuilder.append(buffer.readLine() + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"Imposivel de ler o arquivo \"\n\t\t\t\t\t+ this.arquivo.getName());\n\t\t} finally {\n\t\t\tRessourcesUtils.closeRessources(buffer);\n\t\t}\n\n\t\treturn builder.toString();\n\t}", "public ArrayList<T> cargar(String ruta) {\n// ArrayList<T> productos = ArrayList();\n try {\n fis = new FileInputStream(ManejoDato.rutaArchivo);\n ois = new ObjectInputStream(fis);\n ArrayList<T> lista = (ArrayList<T>) ois.readObject();\n// productos = FXCollections.observableList(lista);\n ois.close();\n fis.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"ERROR: \" + e.getLocalizedMessage());\n } catch (IOException | ClassNotFoundException e) {\n System.err.println(\"ERROR: \" + e.getLocalizedMessage());\n }\n return lista;\n }", "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "public byte[] decifrar(String archivo) {\n\t\tVector[] texto = null;\n\t\tMessageDigest md;\n\t\tPolinomio polinomio = new Polinomio();\n\t\tLinkedList<Vector> lista = new LinkedList<Vector>();\n\t\ttry {\n\t\t\tString linea;\n\t\t\tFileInputStream fis = new FileInputStream(archivo + \".frg\");\n\t\t\tDataInputStream in = new DataInputStream(fis);\n\t\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile((linea = bf.readLine()) != null) {\n\t\t\t\tlista.add(new Vector(2));\n\t\t\t\t((Vector)lista.getLast()).add(0, new BigInteger(linea.substring(0, linea.indexOf(','))));\n\t\t\t\t((Vector)lista.getLast()).add(1, new BigInteger(linea.substring(linea.indexOf(',') + 1 , linea.length())));\n\t\t\t}\n\t\t\tin.close();\n\t\t\ttexto = new Vector[lista.size()];\n\t\t\tfor(int i = 0; i < texto.length; i++)\n\t\t\t\ttexto[i] = (Vector)lista.get(i);\n\t\t\treturn polinomio.interpolacion(new BigInteger(\"0\"), texto).toByteArray();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error al decifrar!\");\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<PizzaBean> viewPizzaDetails() {\n\t\ttry {\r\n\t\t\tois = new ObjectInputStream(new FileInputStream(\"pizza.txt\"));\r\n\t\t\tpizza = (List<PizzaBean>) ois.readObject();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn pizza;\r\n\t}", "private AtualizarContaPreFaturadaHelper parserRegistroTipo1(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\r\n\t\t// Tipo de medição\r\n\t\tretorno.tipoMedicao = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_TIPO_MEDICAO);\r\n\t\tindex += REGISTRO_TIPO_1_TIPO_MEDICAO;\r\n\r\n\t\t// Ano e mes do faturamento\r\n\t\tretorno.anoMesFaturamento = Util.formatarMesAnoParaAnoMes(linha\r\n\t\t\t\t.substring(index, index + REGISTRO_TIPO_1_ANO_MES_FATURAMENTO));\r\n\t\tindex += REGISTRO_TIPO_1_ANO_MES_FATURAMENTO;\r\n\r\n\t\t// Numero da conta\r\n\t\tretorno.numeroConta = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_NUMERO_CONTA);\r\n\t\tindex += REGISTRO_TIPO_1_NUMERO_CONTA;\r\n\r\n\t\t// Codigo do Grupo de faturamento\r\n\t\tretorno.codigoGrupoFaturamento = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CODIGO_GRUPO_FATURAMENTO);\r\n\t\tindex += REGISTRO_TIPO_1_CODIGO_GRUPO_FATURAMENTO;\r\n\r\n\t\t// Codigo da rota\r\n\t\tretorno.codigoRota = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CODIGO_ROTA);\r\n\t\tindex += REGISTRO_TIPO_1_CODIGO_ROTA;\r\n\r\n\t\t// Codigo da leitura do hidrometro\r\n\t\tretorno.leituraHidrometro = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_LEITURA_HIDROMETRO);\r\n\t\tindex += REGISTRO_TIPO_1_LEITURA_HIDROMETRO;\r\n\r\n\t\t// Anormalidade de Leitura\r\n\t\tretorno.anormalidadeLeitura = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_ANORMALIDADE_LEITURA);\r\n\t\tindex += REGISTRO_TIPO_1_ANORMALIDADE_LEITURA;\r\n\r\n\t\t// Data e Hora Leitura\r\n\t\tretorno.dataHoraLeituraHidrometro = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_DATA_HORA_LEITURA);\r\n\t\tindex += REGISTRO_TIPO_1_DATA_HORA_LEITURA;\r\n\r\n\t\t// Indicador de Confirmacao\r\n\t\tretorno.indicadorConfirmacaoLeitura = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_INDICADOR_CONFIRMACAO_LEITURA);\r\n\t\tindex += REGISTRO_TIPO_1_INDICADOR_CONFIRMACAO_LEITURA;\r\n\r\n\t\t// Leitura do Faturamento\r\n\t\tretorno.leituraFaturamento = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_LEITURA_FATURAMENTO);\r\n\t\tindex += REGISTRO_TIPO_1_LEITURA_FATURAMENTO;\r\n\r\n\t\t// Consumo Medido no mes\r\n\t\tretorno.consumoMedido = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CONSUMO_MEDIDO);\r\n\t\tindex += REGISTRO_TIPO_1_CONSUMO_MEDIDO;\r\n\r\n\t\t// Consumo a ser cobrado\r\n\t\tretorno.consumoASerCobradoMes = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CONSUMO_A_SER_COBRADO_MES);\r\n\t\tindex += REGISTRO_TIPO_1_CONSUMO_A_SER_COBRADO_MES;\r\n\r\n\t\t// Consumo rateio agua\r\n\t\tretorno.consumoRateioAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CONSUMO_RATEIO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_1_CONSUMO_RATEIO_AGUA;\r\n\r\n\t\t// Valor rateio agua\r\n\t\tretorno.valorRateioAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_VALOR_RATEIO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_1_VALOR_RATEIO_AGUA;\r\n\r\n\t\t// Consumo rateio esgoto\r\n\t\tretorno.consumoRateioEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CONSUMO_RATEIO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_1_CONSUMO_RATEIO_ESGOTO;\r\n\r\n\t\t// Valor rateio esgoto\r\n\t\tretorno.valorRateioEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_VALOR_RATEIO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_1_VALOR_RATEIO_ESGOTO;\r\n\r\n\t\t// Tipo de consumo\r\n\t\tretorno.tipoConsumo = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_TIPO_CONSUMO);\r\n\t\tindex += REGISTRO_TIPO_1_TIPO_CONSUMO;\r\n\r\n\t\t// Anormalidade de consumo\r\n\t\tretorno.anormalidadeConsumo = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_ANORMALIDADE_CONSUMO);\r\n\t\tindex += REGISTRO_TIPO_1_ANORMALIDADE_CONSUMO;\r\n\r\n\t\t// Indicador de emissao de conta\r\n\t\tretorno.indicacaoEmissaoConta = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_INDICACAO_EMISSAO_CONTA);\r\n\t\tindex += REGISTRO_TIPO_1_INDICACAO_EMISSAO_CONTA;\r\n\r\n\t\t// Inscricao\r\n\t\tString inscricao = \"\";\r\n\t\tinscricao = linha.substring(index, index + REGISTRO_TIPO_1_INSCRICAO);\r\n\t\tformatarInscricao(retorno, inscricao);\r\n\t\tindex += REGISTRO_TIPO_1_INSCRICAO;\r\n\r\n\t\t// Indicador Geração da conta\r\n\t\tretorno.indicadorGeracaoConta = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_INDICADOR_GERACAO_CONTA);\r\n\t\tindex += REGISTRO_TIPO_1_INDICADOR_GERACAO_CONTA;\r\n\r\n\t\t// consumo imóveis vinculados\r\n\t\tretorno.consumoImoveisVinculados = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_CONSUMO_IMOVEIS_VINCULADOS);\r\n\t\tindex += REGISTRO_TIPO_1_CONSUMO_IMOVEIS_VINCULADOS;\r\n\r\n\t\t// anormalidade de faturamento\r\n\t\tretorno.anormalidadeFaturamento = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_ANORMALIDADE_FATURAMENTO);\r\n\t\tindex += REGISTRO_TIPO_1_ANORMALIDADE_FATURAMENTO;\r\n\r\n\t\t// Id Cobrança Documento\r\n\t\tretorno.idCobrancaDocumento = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_COBRANCA_DOCUMENTO);\r\n\t\tindex += REGISTRO_TIPO_1_NUMERO_CONTA;\r\n\r\n\t\t// Codigo da leitura do hidrometro anterior\r\n\t\tretorno.leituraHidrometroAnterior = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_1_LEITURA_HIDROMETRO_ANTERIOR);\r\n\t\tindex += REGISTRO_TIPO_1_LEITURA_HIDROMETRO_ANTERIOR;\r\n\r\n\t\t\r\n\t\tif (linha.length() > 200) {\r\n\t\t\t// Latitude\r\n\t\t\tretorno.latitude = linha.substring( index, index + REGISTRO_TIPO_1_LATITUDE );\r\n\t\t\tindex += REGISTRO_TIPO_1_LATITUDE;\r\n\r\n\t\t\t// Longitude\r\n\t\t\tretorno.longitude = linha.substring( index, index + REGISTRO_TIPO_1_LONGITUDE );\r\n\t\t\t index += REGISTRO_TIPO_1_LONGITUDE;\r\n\r\n\t\t\t// Versão do IS\r\n\t\t\tretorno.numeroVersao = linha.substring(index, index\t+ REGISTRO_TIPO_1_NUMERO_VERSAO);\r\n\t\t\tindex += REGISTRO_TIPO_1_NUMERO_VERSAO;\r\n\r\n\t\t} else {\r\n\t\t\t// Latitude\r\n\t\t\tretorno.latitude = \"0\";\r\n\r\n\t\t\t// Longitude\r\n\t\t\t retorno.longitude = \"0\";\r\n\r\n\t\t\t// Versão do IS\r\n\t\t\tretorno.numeroVersao = linha.substring(index, index\t+ REGISTRO_TIPO_1_NUMERO_VERSAO);\r\n\t\t\tindex += REGISTRO_TIPO_1_NUMERO_VERSAO;\r\n\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "public File getFoto() {\r\n\t\treturn temp;\r\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode,\n Intent resultData) {\n /**\n * Dentro de este método lo que hacemos es coger el Uri que nos genera el selector\n * de archivos y extraer los datos que necesitamos como el Path, el nombre del fichero o\n * la extensión.\n */\n\n if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n // The document selected by the user won't be returned in the intent.\n // Instead, a URI to that document will be contained in the return intent\n // provided to this method as a parameter.\n // Pull that URI using resultData.getData().\n Uri uri = null;\n if (resultData != null) {\n uri = resultData.getData();\n String path = uri.getPath().toString();\n TextView txtinfo = (TextView) findViewById(R.id.txtInfo);\n txtinfo.setText(path);\n String name = uri.getLastPathSegment().toString();\n Cursor returnCursor =\n getContentResolver().query(uri, null, null, null, null);\n int extensionIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);\n int sizeIndex = returnCursor.getColumnIndex(OpenableColumns.SIZE);\n int nombreIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);\n returnCursor.moveToFirst();\n TextView txtmida = (TextView) findViewById(R.id.textView20);\n TextView txtnom = (TextView) findViewById(R.id.textView24);\n TextView txtextension = (TextView) findViewById(R.id.textView21);\n\n String nombre1 = returnCursor.getString(nombreIndex);\n String nombre = nombre1.substring(0, nombre1.lastIndexOf('.'));\n\n String extension1 = returnCursor.getString(extensionIndex);\n String extension = extension1.substring(extension1.lastIndexOf('.'), extension1.length());\n\n txtnom.setText(nombre);\n txtextension.setText(extension);\n txtmida.setText(Long.toString(returnCursor.getLong(sizeIndex))+ \" bytes\");\n\n }\n }\n }", "private List<String> getDataFromApi() throws IOException {\n // Get a list of up to 10 files.\n List<String> fileInfo = new ArrayList<String>();\n FileList result = mService.files().list()\n .setMaxResults(10)\n .execute();\n List<File> files = result.getItems();\n if (files != null) {\n for (File file : files) {\n fileInfo.add(String.format(\"%s (%s)\\n\",\n file.getTitle(), file.getId()));\n }\n }\n return fileInfo;\n }", "public Arquivo getArquivo() {\n\t\treturn arquivo;\n\t}", "public void cargarProductosEnVenta() {\n try {\n //Lectura de los objetos de tipo producto Vendido\n FileInputStream archivo= new FileInputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n this.productosEnVenta = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"ERROR: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "@Override\n\tpublic byte[] get()\n\t{\n\t\tif (isInMemory())\n\t\t{\n\t\t\tif (cachedContent == null)\n\t\t\t{\n\t\t\t\tcachedContent = dfos.getData();\n\t\t\t}\n\t\t\treturn cachedContent;\n\t\t}\n\n\t\tFile file = dfos.getFile();\n\n\t\ttry\n\t\t{\n\t\t\treturn Files.readBytes(file);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tlog.debug(\"failed to read content of file: \" + file.getAbsolutePath(), e);\n\t\t\treturn null;\n\t\t}\n\t}", "List<String> obtenerlineas(String archivo) throws FileException;", "private File getFile() {\n\t\t// retornamos el fichero a enviar\n\t\treturn this.file;\n\t}", "public static byte [] convertirFoto(String ruta){\n byte[] icono;\n try {\n File rut=new File(ruta);\n icono = new byte[(int)rut.length()];\n InputStream input = new FileInputStream(ruta);\n input.read(icono);\n } catch (Exception ex) {\n return null;\n }\n return icono;\n }", "public File getFile() {\n // some code goes here\n return m_f;\n }", "@GET\n @Path(\"/mostrarOrdenadasFS\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFS(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFS(idUser);\n }", "private Object getFile(String path) throws Exception {\t\t\t\n\t\t \n\t\t FileInputStream fileIn = new FileInputStream(path);\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\n\n Object obj = objectIn.readObject();\n objectIn.close();\n \n return obj;\t\t\n\t}", "@GET\n\t\t\t@Path(\"/filter\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getIndentRowsByFilter() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new IndentDao(uriInfo,header).getIndentByFilter();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getIndentRowsByFilter()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public byte[] getContents() throws VlException\n {\n long len = getLength();\n // 2 GB files cannot be read into memory !\n\n // zero size optimization ! \n\n if (len==0) \n {\n return new byte[0]; // empty buffer ! \n }\n\n if (len > ((long) VRS.MAX_CONTENTS_READ_SIZE))\n throw (new ResourceToBigException(\n \"Cannot read complete contents of a file greater then:\"\n + VRS.MAX_CONTENTS_READ_SIZE));\n\n int intLen = (int) len;\n return getContents(intLen);\n\n }", "public String abrirArquivo(String nome) {\n this.titulo = nome;\n try {\n return metodos.abrirArquivo(nome, this.nome);\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@JsonIgnore public Mass getTransFatContent() {\n return (Mass) getValue(\"transFatContent\");\n }", "private AtualizarContaPreFaturadaHelper parserRegistroTipo2(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\t\tSystem.out.println(\"Tipo de Retorno: \" + retorno.tipoRegistro);\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\t\tSystem.out.println(\"Matricula do Imovel: \" + retorno.matriculaImovel);\r\n\r\n\t\t// Codigo da Categoria\r\n\t\tretorno.codigoCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CODIGO_CATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_2_CODIGO_CATEGORIA;\r\n\r\n\t\t// Codigo da Subcategoria\r\n\t\tretorno.codigoSubCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CODIGO_SUBCATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_2_CODIGO_SUBCATEGORIA;\r\n\r\n\t\t// Valor faturado agua\r\n\t\tretorno.valorFaturadoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_FATURADO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_FATURADO_AGUA;\r\n\r\n\t\t// Consumo faturado de agua\r\n\t\tretorno.consumoFaturadoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_FATURADO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_FATURADO_AGUA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorTarifaMinimaAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_AGUA;\r\n\r\n\t\t// Consumo Minimo de Agua\r\n\t\tretorno.consumoMinimoAgua = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_MINIMO_AGUA);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_MINIMO_AGUA;\r\n\r\n\t\t// Valor faturado esgoto\r\n\t\tretorno.valorFaturadoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_FATURADO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_FATURADO_ESGOTO;\r\n\r\n\t\t// Consumo faturado de esgoto\r\n\t\tretorno.consumoFaturadoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_FATURADO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_FATURADO_ESGOTO;\r\n\r\n\t\t// Valor tarifa minima de esgoto\r\n\t\tretorno.valorTarifaMinimaEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_VALOR_TARIFA_MINIMA_ESGOTO;\r\n\r\n\t\t// Consumo Minimo de esgoto\r\n\t\tretorno.consumoMinimoEsgoto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_CONSUMO_MINIMO_ESGOTO);\r\n\t\tindex += REGISTRO_TIPO_2_CONSUMO_MINIMO_ESGOTO;\r\n\t\t\r\n\t\t// Consumo Minimo de esgoto \r\n\t\t/*\r\n\t\tretorno.subsidio = linha.substring(index + 2, index\r\n\t\t\t\t+ REGISTRO_TIPO_2_SUBSIDIO_AGUA_PARA);\r\n\t\tindex += REGISTRO_TIPO_2_SUBSIDIO_AGUA_PARA;\r\n\t\t*/\r\n\t\treturn retorno;\r\n\t}", "@GET\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic Object get() throws MalformedURLException, IOException {\n\t\tURI uri = URI.create(request.getRequestURL().toString());\n\t\tURI serviceUri = uri.resolve(\"mail/multipart\");\n\t\ttry(InputStream is = serviceUri.toURL().openStream()) {\n\t\t\treturn StreamUtil.readString(is);\n\t\t}\n\t}", "private AtualizarContaPreFaturadaHelper parserRegistroTipo4(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\r\n\t\t// Tipo do imposto\r\n\t\tretorno.tipoImposto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_TIPO_IMPOSTO);\r\n\t\tindex += REGISTRO_TIPO_4_TIPO_IMPOSTO;\r\n\r\n\t\t// Descrição do imposto\r\n\t\tretorno.descricaoImposto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_DESCRICAO_IMPOSTO);\r\n\t\tindex += REGISTRO_TIPO_4_DESCRICAO_IMPOSTO;\r\n\r\n\t\t// Percentual da aliquota\r\n\t\tretorno.percentualAliquota = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_PERCENTUAL_ALIQUOTA);\r\n\t\tindex += REGISTRO_TIPO_4_PERCENTUAL_ALIQUOTA;\r\n\r\n\t\t// Valor do imposoto\r\n\t\tretorno.valorImposto = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_4_VALOR_IMPOSTO);\r\n\t\tindex += REGISTRO_TIPO_4_VALOR_IMPOSTO;\r\n\r\n\t\treturn retorno;\r\n\t}", "Documento getDocumento();", "public Mass getTransFatContent() throws ClassCastException;", "FileObject getFile();", "FileObject getFile();", "public Part getFotoPerfil(){\n return fotoPerfil;\n }", "public void leerArchivo() {\n String rfcProveedor = produccionCigarrosHelper.getProveedor().getRfc();\n String rfcTabacalera = produccionCigarrosHelper.getTabacalera().getRfc();\n\n if (archivoFoliosService != null && desperdiciosHelper.getArchivoFolios() != null) {\n try {\n desperdiciosHelper.setNombreArchivo(desperdiciosHelper.getArchivoFolios().getFileName());\n InputStream inputStream = desperdiciosHelper.getArchivoFolios().getInputstream();\n\n desperdiciosHelper.setRangoFoliosList(archivoFoliosProduccionService.leerArchivoFolios(inputStream, desperdiciosHelper.getNombreArchivo()));\n desperdiciosHelper.setRangoFoliosListAux(validadorRangosService.generarRangosProduccion(rfcTabacalera, rfcProveedor, desperdiciosHelper.getRangoFoliosList()));\n desperdiciosHelper.setMsgErrorArchivo(\"\");\n\n solicitudService.generaCadenaOriginal(firmaFormHelper.getRfcSession(), sumaRangosFolio(desperdiciosHelper.getRangoFoliosListAux()), null);\n firmaFormHelper.setCadenaOriginal(solicitudService.generaCadenaOriginal(firmaFormHelper.getRfcSession(), sumaRangosFolio(desperdiciosHelper.getRangoFoliosListAux()), null));\n desperdiciosHelper.setCantidadSolicitada(sumaRangosFolio(desperdiciosHelper.getRangoFoliosListAux()));\n\n } catch (SolicitudServiceException bE) {\n desperdiciosHelper.setMsgErrorArchivo(bE.getMessage());\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n LOGGER.error(\"Error: al Leer el archivo\" + bE.getMessage(), bE);\n } catch (RangosException rE) {\n desperdiciosHelper.setMsgErrorArchivo(rE.getMessage());\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n super.msgError(rE.getMessage());\n } catch (IOException io) {\n desperdiciosHelper.setMsgErrorArchivo(io.getMessage());\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n LOGGER.error(\"ERROR: Al leer el Archivo : \" + io.getMessage());\n } catch (ArchivoFoliosServiceException ex) {\n LOGGER.error(\"ERROR: Al leer el Archivo : \" + ex.getMessage());\n }\n if (!desperdiciosHelper.getMsgErrorArchivo().isEmpty()) {\n desperdiciosHelper.setDeshabilitaBtnGuardar(true);\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n } else {\n desperdiciosHelper.setMsgExitoArchivo(\"El archivo \" + desperdiciosHelper.getNombreArchivo() + \" se cargo con éxito\");\n desperdiciosHelper.setMsgErrorArchivo(\"\");\n }\n }\n }", "@JsonIgnore public Collection<Mass> getTransFatContents() {\n final Object current = myData.get(\"transFatContent\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Mass>) current;\n }\n return Arrays.asList((Mass) current);\n }", "public void cargarProductosVendidos() {\n try {\n //Lectura de los objetos de tipo productosVendidos\n FileInputStream archivo= new FileInputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosVendidos = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public Tripulante buscarTripulante(String documento) throws Exception;", "public File getFile() {\n // some code goes here\n return f;\n }", "public CompletionStage<String> readFile() {\n\n CompletableFuture<String> future = new CompletableFuture<>();\n StringBuffer sb = new StringBuffer();\n\n vertx.fileSystem().rxReadFile(path)\n .flatMapObservable(buffer -> Observable.fromArray(buffer.toString().split(\"\\n\")))\n .skip(1)\n .map(s -> s.split(\",\"))\n .map(data-> new Customer(Integer.parseInt(data[0]),data[1],data[2]))\n .subscribe(\n data -> sb.append(data.toString()),\n error -> System.err.println(error),\n () -> future.complete(sb.toString()));\n\n\n return future;\n\n }", "public String getFile() {\n \n // return it\n return theFile;\n }", "public interface Filtrado extends ItemFiltro {\n\t/**\n\t * A exemplo da interface Serializable, mas nao necessariamente pelo menos\n\t * motivo, esta interface nao define nenhum metodo.\n\t */\n\t\n\t/**\n\t* Deseja-se ter um elo entre Filtrado e registro,\n\t* visto que o que se deseja eh armazenadar os\n\t* filtrados no output.txt para uso posterior.\n\t* @return Registro Registro \n\t* */\n\tpublic Registro getRegistro();\n\n}", "private byte[] getContent(File f) {\n byte[] content = null;\n\n try {\n FileInputStream fis = new FileInputStream(f);\n byte[] temp = new byte[fis.available()];\n fis.read(temp);\n fis.close();\n content = temp;\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n\n return content;\n }", "public ArrayList<Usuario> buscarTodos()throws Exception{\r\n File f=new File(\"archivaldo.raton\");\r\n \r\n FileInputStream fis=new FileInputStream(f);\r\n ObjectInputStream ois=new ObjectInputStream(fis);\r\n usuarios= (ArrayList<Usuario>)ois.readObject();\r\n return usuarios;\r\n }", "edu.usfca.cs.dfs.StorageMessages.RetrieveFile getRetrieveFile();", "double getFile(int index);", "public InputStream getData() throws java.io.IOException {\n \t\tInputStream is;\n \t\tis = new BufferedInputStream(new GZIPInputStream(new FileInputStream(\n \t\t\t\tdataFile)));\n \t\tis.skip(this.dataOffset);\n \n \t\treturn is;\n \t}", "public Uzsakymas paimtiFragmenta() {\n\t\tString[] langeliai = this.file_line.split ( \",\" );\n\t\t\n\t\tUzsakymas uzsakymas = null;\n\t\t\n\t\tif ( ! this.file_line.trim().equals(\"\") ) { \n\t\t\n\t\t\tuzsakymas = new Uzsakymas(); \n\t\t\t\n\t\t\tuzsakymas.setPav ( langeliai [ 0 ] );\n\t\t\tuzsakymas.setTrukme_ruosimo ( 0 );\n\t\t\tuzsakymas.setTrukme_kaitinimo ( 0 );\n\t\t\t\n\t\t\ttry {\n\t\t\t\n\t\t\t\tif ( langeliai.length > 1 ) {\n\t\t\t\t\n\t\t\t\t\tuzsakymas.setTrukme_ruosimo ( Integer.parseInt( langeliai [ 1 ] ) );\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch ( Exception e ) {\n\t\t\t\t\n\t\t\t\tuzsakymas.setTrukme_ruosimo ( -1 );\n\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\n\t\t\t\tif ( langeliai.length > 2 ) {\n\t\t\n\t\t\t\t\tuzsakymas.setTrukme_kaitinimo ( Integer.parseInt( langeliai [ 2 ] ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch ( Exception e ) {\t\n\t\t\t\t\n\t\t\t\tuzsakymas.setTrukme_kaitinimo ( -1 );\n\t\t\t}\n\t\t}\n\t\n\t\treturn uzsakymas;\n\t}", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "@Override\n\t\tpublic List<InJarResourceImpl> getContents(InJarResourceImpl serializationArtefact) {\n\t\t\treturn serializationArtefact.getContents(false);\n\t\t}", "private void abrirEntTransaccion(){\n try{\n entTransaccion = new ObjectInputStream(\n Files.newInputStream(Paths.get(\"trans.ser\")));\n }\n catch(IOException iOException){\n System.err.println(\"Error al abrir el archivo. Terminado.\");\n System.exit(1);\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if ((requestCode == request_code) && (resultCode == RESULT_OK)){\n Toast.makeText(getApplicationContext(),data.getDataString(),Toast.LENGTH_LONG).show();\n elemento = new File(data.getDataString());\n }\n }", "private void imprimirPago() throws Exception {\n\t\tthis.pagoDto = (ReciboDTO) this.getDTOById(Recibo.class.getName(), this.selectedItem.getId(), new AssemblerRecibo());\n\t\t\n\t\tString source = ReportesViewModel.SOURCE_RECIBO;\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tJRDataSource dataSource = new ReciboDataSource();\n\t\tparams.put(\"title\", this.pagoDto.getTipoMovimiento().getPos1());\n\t\tparams.put(\"fieldRazonSocial\", this.pagoDto.isCobro() ? \"Recibí de:\" : \"A la Orden de:\");\n\t\tparams.put(\"RazonSocial\", this.pagoDto.getRazonSocial());\n\t\tparams.put(\"Ruc\", this.pagoDto.getRuc());\n\t\tparams.put(\"NroRecibo\", this.pagoDto.getNumero());\n\t\tparams.put(\"Moneda\", this.pagoDto.isMonedaLocal() ? \"Guaraníes:\" : \"Dólares:\");\n\t\tparams.put(\"Moneda_\", this.pagoDto.isMonedaLocal() ? \"Gs.\" : \"U$D\");\n\t\tparams.put(\"ImporteEnLetra\", this.pagoDto.isMonedaLocal() ? this.pagoDto.getImporteEnLetras() : this.pagoDto.getImporteEnLetrasDs());\n\t\tparams.put(\"TotalImporteGs\",\n\t\t\t\tthis.pagoDto.isMonedaLocal() ? Utiles.getNumberFormat(this.pagoDto.getTotalImporteGs())\n\t\t\t\t\t\t: Utiles.getNumberFormatDs(this.pagoDto.getTotalImporteDs()));\n\t\tparams.put(\"Usuario\", this.getUs().getNombre());\n\t\tthis.imprimirComprobante(source, params, dataSource, this.selectedFormato);\n\t}", "private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }", "public String checkPDFContent(File file) throws IOException {\n String extractedText =\"\";\n try{\n PDDocument doc = PDDocument.load(file);\n int totalPages = doc.getNumberOfPages();\n System.out.println(\"Total pages: \" + totalPages);\n PDFTextStripper stripper = new PDFTextStripper();\n stripper.setStartPage(1);\n stripper.setEndPage(totalPages);\n extractedText = stripper.getText(doc);\n } catch (IOException e) {\n System.out.println(\"Nu merge !\");\n e.printStackTrace();\n }\n System.out.println(extractedText);\n return extractedText;\n }", "Reserva Obtener();", "public ArrayList<String> leerArchivo(String nombreArchivo) { //\"getter\" metodo arraylist que recibe como parametro nombreArchivo\n\t\tArrayList<String> lineasArchivo = new ArrayList<String>(); //instacia del ArrayList\n\t\tBufferedReader archivo = null;\n\t\ttry {\n\t\t\t//BufferedReader para leer lineas completas de una secuencia de entrada\n\t\t\t archivo = new BufferedReader(new FileReader(nombreArchivo)); \n\t\t\tString linea = \"\";\n\t\t\twhile (linea != null) {\n\t\t\t\tlinea = archivo.readLine();\n\t\t\t\tif (linea != null) {\n\t\t\t\t\tlineasArchivo.add(linea);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarchivo.close();\t\t\t\n\t\t} catch(IOException ioe) {\n\t\t}\n\t\treturn lineasArchivo;\n\t}", "public File getFile();", "public File getFile();", "private List<String[]> extract(String file) {\n List<String[]> readIn = null;\n try {\n // instantiate file reader object\n FileReader fr = new FileReader(file);\n\n // instantiate csv reader object\n CSVReader csvReader = new CSVReaderBuilder(fr).build();\n readIn = csvReader.readAll();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return readIn;\n }", "@GET\n\t@Produces({ MediaType.APPLICATION_JSON })\n\tpublic Response getTipos() {\n\t\tRotondAndesTM tm = new RotondAndesTM(getPath());\n\t\tList<Tipo> Tipos;\n\t\ttry {\n\t\t\tTipos = tm.darTipos();\n\t\t} catch (Exception e) {\n\t\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t\treturn Response.status(200).entity(Tipos).build();\n\t}", "@Override\n\tpublic Optional<MedioPago> EntityForSpecificatios(MedioPago entidad, Object filter) {\n\t\treturn null;\n\t}", "public ArchivoAula descargarArchivo(){\n\t\tArchivoAula nuevoArchivo = this;\n\t\tnuevoArchivo.setNombre(this.nombre);\n\t\tnuevoArchivo.setFormato(this.formato);\n\t\treturn nuevoArchivo;\n\t}", "protected File getDocument(String dql, String ext) {\r\n\t\tlog.error(\"====================FUN��O getDocument NA CLASSE DocumentumCoreServicesImpl==================\");\r\n\t\tlog.error(\"====================PARAMETROS RECEBIDOS================== DQL \"\r\n\t\t\t\t+ dql + \" ================== ext \" + ext);\r\n\t\tFile fileReturn = null;\r\n\r\n\t\tContentProfile contentProfile = new ContentProfile();\r\n\r\n\t\tcontentProfile.setFormatFilter(FormatFilter.SPECIFIED);\r\n\r\n\t\tcontentProfile.setFormat(ext);\r\n\t\tlog.error(\"======================= contentProfile.setFormat====== \"\r\n\t\t\t\t+ ext);\r\n\t\tcontentProfile.setContentReturnType(FileContent.class);\r\n\r\n\t\tOperationOptions operationOptions = new OperationOptions();\r\n\r\n\t\toperationOptions.setContentProfile(contentProfile);\r\n\t\tlog.error(\"======================= operationOptions.setContentProfile====== \"\r\n\t\t\t\t+ contentProfile);\r\n\t\tContentTransferProfile transferProfile = new ContentTransferProfile();\r\n\r\n\t\toperationOptions.setContentTransferProfile(transferProfile);\r\n\r\n\t\tQualification qualification1 = new Qualification(dql);\r\n\r\n\t\tObjectIdentity targetObjectIdentity1 = new ObjectIdentity(\r\n\t\t\t\tqualification1, REPOSITORY_NAME);\r\n\t\tlog.error(\"======================= targetObjectIdentity1 (qualification1, REPOSITORY_NAME)====== \"\r\n\t\t\t\t+ targetObjectIdentity1);\r\n\t\tObjectIdentitySet objIdSet = new ObjectIdentitySet();\r\n\r\n\t\tobjIdSet.addIdentity(targetObjectIdentity1);\r\n\r\n\t\tDataPackage dataPackage;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tdataPackage = this.objectService.get(objIdSet,\r\n\t\t\t\t\toperationOptions);\r\n\t\t\tlog.error(\"======================= objIdSet ====== \" + objIdSet);\r\n\t\t\tlog.error(\"======================= operationOptions ====== \"\r\n\t\t\t\t\t+ operationOptions);\r\n\r\n\t\t\tDataObject dataObject = dataPackage.getDataObjects().get(0);\r\n\t\t\tlog.error(\"======================= dataObject ====== \"\r\n\t\t\t\t\t+ dataPackage.getDataObjects().get(0));\r\n\t\t\tContent resultContent = dataObject.getContents().get(0);\r\n\t\t\tlog.error(\"======================= resultContent ====== \"\r\n\t\t\t\t\t+ dataObject.getContents().get(0));\r\n\r\n\t\t\tFileContent fileContent = (FileContent) resultContent;\r\n\t\t\tfileReturn = fileContent.getAsFile();\r\n\r\n\t\t} catch (CoreServiceException e) {\r\n\t\t\tSystem.out.println(\"CoreServiceException \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tlogger.error(ERROR_REPOSITORIO_EMC.concat(e.getLocalizedMessage()));\r\n\t\t\tSystem.out.println(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n CoreServiceException\");\r\n\t\t} catch (ServiceException e) {\r\n\t\t\tSystem.out.println(\"ServiceException \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tlogger.error(ERROR_SERVICO_EMC.concat(e.getLocalizedMessage()));\r\n\t\t\tSystem.out.println(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n ServiceException\");\r\n\r\n\t\t}\r\n\t\tlog.error(\"==================== FIM FUN��O getDocument NA CLASSE DocumentumCoreServicesImpl==================\");\r\n\r\n\t\t/*\r\n\t\t * File source = new File(fileReturn.getPath()); File dest = new\r\n\t\t * File(\"D:\\\\Temp\\\\file2.docx\"); try { FileUtils.copyFile(source, dest);\r\n\t\t * } catch (IOException e) { e.printStackTrace(); }\r\n\t\t */\r\n\r\n\t\treturn fileReturn;\r\n\r\n\t}", "NffgReader getReader() throws ServiceException;", "private byte[] readFdocaBytes(int length) {\n\n checkForSplitRowAndComplete(length);\n\n byte[] b = new byte[length];\n dataBuffer_.readBytes(b);\n// System.arraycopy(dataBuffer_, position_, b, 0, length);\n// position_ += length;\n//\n return b;\n }", "private static String readFromFile(ArrayList diretorios, String sessionId)\n\t{\n\t StringBuffer result = new StringBuffer();\n\t \n\t try\n\t {\n\t //Verificando na lista de diretorios se o arquivo pode ser encontrado. \n\t for(int i = 0; i < diretorios.size(); i++)\n\t {\n\t\t String fileName = (String)diretorios.get(i) + File.separator + sessionId;\n\t\t File fileExtrato = new File(fileName);\n\t\t \n\t\t if(fileExtrato.exists())\n\t\t {\n\t\t //Lendo o XML do arquivo.\n\t\t FileReader reader = new FileReader(fileExtrato);\n\t\t char[] buffer = new char[new Long(fileExtrato.length()).intValue()];\n\t\t int bytesRead = 0;\n\t \n\t\t while((bytesRead = reader.read(buffer)) != -1)\n\t\t {\n\t\t result.append(buffer);\n\t\t }\n\t \n\t\t reader.close();\n\t\t break;\n\t\t }\n\t }\n\t }\n\t catch(Exception e)\n\t {\n\t e.printStackTrace();\n\t }\n\t \n\t return (result.length() > 0) ? result.toString() : null;\n\t}", "@JsonIgnore public Mass getFatContent() {\n return (Mass) getValue(\"fatContent\");\n }", "public interface ImportarPolizaDTO {\r\n\t\r\n\t/**\r\n\t * Execute.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @param idSector the id sector\r\n\t * @param idUser the id user\r\n\t * @return the poliza import DTO\r\n\t */\r\n\tPolizaImportDTO execute(PolizaImportDTO importDTO, Integer idSector, String idUser);\r\n\t\r\n\t/**\r\n\t * Export reports.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @param tipo the tipo\r\n\t * @return the poliza import DTO\r\n\t */\r\n\tPolizaImportDTO exportReports(PolizaImportDTO importDTO, String tipo);\r\n\t\r\n\t\r\n\t/**\r\n\t * Generate excel.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @return the poliza import DTO\r\n\t */\r\n\tPolizaImportDTO generateExcel(PolizaImportDTO importDTO);\r\n\t\r\n\t/**\r\n\t * Generate head.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @return the list\r\n\t */\r\n\tList<PolizaExcelDTO> generateHead(PolizaImportDTO importDTO);\r\n\t\r\n\t/**\r\n\t * Generate body.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @return the list\r\n\t */\r\n\tList<PolizaBody> generateBody(PolizaImportDTO importDTO);\r\n\t\r\n\t/**\r\n\t * Gets the path.\r\n\t *\r\n\t * @param cvePath the cve path\r\n\t * @return the path\r\n\t */\r\n\tString getPath(String cvePath);\r\n\t\r\n\t/**\r\n\t * Gets the mes activo.\r\n\t *\r\n\t * @param idSector the id sector\r\n\t * @return the mes activo\r\n\t */\r\n\tList<String> getMesActivo(Integer idSector);\r\n\r\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 }", "File getFile();", "File getFile();", "public NSMutableArray<Pair> formattedFiles()\n {\n if ( formattedFiles == null )\n {\n formattedFiles = new NSMutableArray<Pair>();\n Pair[] rawPairs = (Pair[])task.result();\n if (rawPairs != null && rawPairs.length > 0)\n {\n EOEditingContext taskContext =\n rawPairs[0].file.editingContext();\n try\n {\n taskContext.lock();\n for (int i = 0; i < rawPairs.length; i++)\n {\n Pair pair = new Pair();\n formattedFiles.addObject(pair);\n pair.file = rawPairs[i].file\n .localInstance(localContext());\n pair.html = rawPairs[i].html;\n }\n }\n finally\n {\n taskContext.unlock();\n }\n }\n task.resultNoLongerNeeded();\n }\n return formattedFiles;\n }", "public File getFile() {\n // some code goes here\n return this.f;\n }", "private void leituraTexto() {\n try {\n Context context = getApplicationContext();\n\n InputStream arquivo = context.getResources().openRawResource(R.raw.catalogo_restaurantes);\n InputStreamReader isr = new InputStreamReader(arquivo);\n\n BufferedReader br = new BufferedReader(isr);\n\n String linha = \"\";\n restaurantes = new ArrayList<>();\n\n while ((linha = br.readLine()) != null) {\n restaurante = new Restaurante(linha);\n String id = Biblioteca.parserNome(restaurante.getId());\n String nome = Biblioteca.parserNome(restaurante.getNome());\n String descricao = Biblioteca.parserNome(restaurante.getDescricao());\n// Log.i(\"NOME\", nome);\n String rank = Biblioteca.parserNome(restaurante.getRank());\n int imagem = context.getResources().getIdentifier(nome, \"mipmap\", context.getPackageName());\n restaurante.setLogo(imagem);\n\n int imgrank = context.getResources().getIdentifier(rank, \"drawable\", context.getPackageName());\n restaurante.setRank(String.valueOf(imgrank));\n\n restaurantes.add(restaurante);\n }\n carregarListView();\n br.close();\n isr.close();\n arquivo.close();\n// Log.i(\"Quantidade\", \"\" + produtos.size());\n } catch (Exception erro) {\n Log.e(\"FRUTARIA Erro\", erro.getMessage());\n }\n\n }", "private String compactaOrdem(File ordem, String[] arquivosCaixa) throws IOException\n\t{\n\t\t/* Define referencias aos streams de arquivos a serem utilizados */\n\t\t/* Buffer a ser utilizado para leitura dos arquivos de caixa */\n\t\tBufferedInputStream buffOrigem \t= null;\n\t\t/* Esta referencia e do arquivo final (zip) do processo */\n\t\tFileOutputStream \tarqDestino \t= new FileOutputStream(getNomeArquivoCompactado(ordem));\n\t\tZipOutputStream \tarqSaida \t= new ZipOutputStream (new BufferedOutputStream(arqDestino));\n\n\t\t/* Define o buffer de dados com o tamanho sendo definido no\n\t\t * arquivo de configuracao\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tbyte data[] = new byte[sizeBuffer];\n\n\t\tString extArqCriptografado = getPropriedade(\"ordemVoucher.extensaoArquivoCriptografado\");\n\t\t\n\t\t/* Faz a varredura dos arquivos de caixa que serao utilizados\n\t\t * para a compactacao. Lembrando que o nome e o mesmo do arquivo da\n\t\t * ordem com a extensao pgp devido ao utilitario de criptografia\n\t\t */\n\t\tSystem.out.println(\"Iniciando compactacao para o arquivo:\"+getNomeArquivoCompactado(ordem));\n\t\tfor (int i=0; i<arquivosCaixa.length; i++) \n\t\t{\n\t\t\tString nomArqOrigem\t\t\t= arquivosCaixa[i] + extArqCriptografado;\n\t\t\tSystem.out.println(\"Incluindo arquivo de ordem \"+nomArqOrigem+\" no arquivo compactado...\");\n\n\t\t\tFile arquivoOrigem\t\t\t= new File(nomArqOrigem);\n\t\t\tFileInputStream fileInput \t= new FileInputStream(arquivoOrigem);\n\t\t \tbuffOrigem \t\t\t\t\t= new BufferedInputStream(fileInput, sizeBuffer);\n\t\t \tZipEntry entry \t\t\t\t= new ZipEntry(arquivoOrigem.getName());\n\t\t \tarqSaida.putNextEntry(entry);\n\t\t \tint count;\n\t\t\twhile((count = buffOrigem.read(data, 0, sizeBuffer)) != -1) \n\t\t\t arqSaida.write(data, 0, count);\n\t\t\t \n\t\t buffOrigem.close();\n\t\t}\n\t\tarqSaida.close();\n\t\tSystem.out.println(\"Termino da compactacao do arquivo.\");\t\n\t\treturn getNomeArquivoCompactado(ordem); \n\t}", "private byte[] extractContent(EmbeddedXMLType embeddedXMLType) {\n\t\tbyte[] content;\n\t\ttry {\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\n\t\t\tTransformer t = tf.newTransformer();\n\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\t\tResult result = new StreamResult(baos);\n\t\t\tt.transform(embeddedXMLType.getContent(), result);\n\t\t\tcontent = baos.toByteArray();\n\t\t} catch (TransformerException te) {\n\t\t\tthrow new BusinessException(ErroreCore.ERRORE_DI_SISTEMA.getErrore(\"Errore di trasformazionew della fattura elettronica\" + (te != null ? \" (\" + te.getMessage() + \")\" : \"\")));\n\t\t}\n\t\treturn content;\n\t}", "public void recargarTinta(int tinta)\n {\n //COMPLETE\n this.tinta += tinta;\n if(this.tienePaginasPendientesPorImprimir()) {\n this.imprimir(0);\n }\n }", "public String getFormattedFileContents ();" ]
[ "0.59332055", "0.5704028", "0.5477154", "0.54430526", "0.5402125", "0.53177804", "0.5258843", "0.5153146", "0.51301175", "0.49590394", "0.49516788", "0.4939048", "0.49386194", "0.48882568", "0.48857602", "0.48635757", "0.48553735", "0.48528275", "0.48517406", "0.48430127", "0.4800272", "0.4788912", "0.47874632", "0.47758305", "0.4774271", "0.47724044", "0.4757436", "0.4722253", "0.4708954", "0.46964696", "0.46739087", "0.46675864", "0.4658503", "0.46364546", "0.4630392", "0.46094075", "0.46083915", "0.46079096", "0.4600526", "0.45990586", "0.4590926", "0.458626", "0.4586112", "0.45828223", "0.45661888", "0.45594245", "0.45574746", "0.45569736", "0.4555171", "0.45535916", "0.45495567", "0.45439053", "0.45439053", "0.45430136", "0.45402354", "0.45382458", "0.45307902", "0.4529053", "0.45278615", "0.45234776", "0.451963", "0.45148593", "0.45143774", "0.4504756", "0.44953522", "0.44910455", "0.44818914", "0.44807664", "0.44583505", "0.4455972", "0.44505754", "0.44489226", "0.4446019", "0.4441813", "0.4440554", "0.44398808", "0.4438445", "0.44341674", "0.44335616", "0.44335616", "0.44315773", "0.44272593", "0.442451", "0.4423792", "0.4420066", "0.44174895", "0.44168282", "0.44094542", "0.44022864", "0.44000733", "0.43961126", "0.43942642", "0.43942642", "0.43938252", "0.43871588", "0.43854642", "0.43674803", "0.43668225", "0.43641004", "0.4360587" ]
0.46032047
38
Retorna um extrato a partir de arquivo ja criado. Caso o arquivo nao exista, obtem o extrato a partir de interface com o GPP.
public static RetornoExtrato getExtratosFromFile(String msisdn, String dataInicial, String dataFinal, String servidor, String porta, ArrayList diretorios, String sessionId) throws Exception { String xmlExtrato = ConsultaExtratoGPP.readFromFile(diretorios, sessionId); if(xmlExtrato == null) { return ConsultaExtratoGPP.getExtratos(msisdn, dataInicial, dataFinal, servidor, porta, diretorios, sessionId); } return ConsultaExtratoGPP.parse(xmlExtrato); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }", "public static boolean retrieveFile(SteganoInformation info, boolean overwrite) {\n File dataFile = null;\n features = info.getFeatures();\n\n try {\n masterFile = info.getFile();\n byteArrayIn = new byte[(int) masterFile.length()];\n\n DataInputStream in = new DataInputStream(new FileInputStream(masterFile));\n in.read(byteArrayIn, 0, (int) masterFile.length());\n in.close();\n\n messageSize = info.getDataLength();\n byte[] fileArray = new byte[messageSize];\n inputOutputMarker = info.getInputMarker();\n readBytes(fileArray);\n\n if (messageSize <= 0) {\n message = \"Unexpected size of embedded file: 0.\";\n return false;\n }\n\n\n// if (features == CEF || features == UEF) {\n// password = password.substring(0, 16);\n// byte passwordBytes[] = password.getBytes();\n// cipher = Cipher.getInstance(\"AES\");\n// spec = new SecretKeySpec(passwordBytes, \"AES\");\n// cipher.init(Cipher.DECRYPT_MODE, spec);\n// try {\n// fileArray = cipher.doFinal(fileArray);\n// } catch (Exception bp) {\n// message = \"Incorrent Password\";\n// bp.printStackTrace();\n// return false;\n// }\n// messageSize = fileArray.length;\n// }\n\n\n// if (features == CUF || features == CEF) {\n// ByteArrayOutputStream by = new ByteArrayOutputStream();\n// DataOutputStream out = new DataOutputStream(by);\n//\n// ZipInputStream zipIn = new ZipInputStream(new ByteArrayInputStream(fileArray));\n// ZipEntry entry = zipIn.getNextEntry();\n// dataFile = new File(entry.getName());\n//\n// byteArrayIn = new byte[1024];\n// while ((tempInt = zipIn.read(byteArrayIn, 0, 1024)) != -1)\n// out.write(byteArrayIn, 0, tempInt);\n//\n// zipIn.close();\n// out.close();\n// fileArray = by.toByteArray();\n// messageSize = fileArray.length;\n// }\n\n info.setDataFile(dataFile);\n if (dataFile.exists() && !overwrite) {\n message = \"File Exists\";\n return false;\n }\n\n DataOutputStream out = new DataOutputStream(new FileOutputStream(dataFile));\n out.write(fileArray, 0, fileArray.length);\n out.close();\n } catch (Exception e) {\n message = \"Oops!!\\n Error: \" + e;\n e.printStackTrace();\n return false;\n }\n\n message = \"Retrieved file size: \" + messageSize + \" B\";\n return true;\n }", "private boolean copiaArquivo(File origem, File destino)\n\t{\n\t\tboolean copiou = false;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream input \t= new FileInputStream(origem);\n\t\t\tFileOutputStream output = new FileOutputStream(destino);\n\t\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\t\tbyte[] buffer = new byte[sizeBuffer];\n\t\t\tint count=0;\n\t\t\twhile( (count=input.read(buffer, 0, sizeBuffer)) != -1)\n\t\t\t\toutput.write(buffer,0,count);\n\n\t\t\toutput.close();\n\t\t\tinput.close();\n\t\t\tcopiou = true;\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tcopiou = false;\n\t\t}\n\t\treturn copiou;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic String[] abrirPedido() throws IOException {\r\n\t\tString[] dados = new String[2];\r\n\t\ttry {\r\n\t\t\tFile f = new File(\"pedido.dat\");\r\n\t\t\tif (f.exists()) {\r\n\t\t\t\tFileInputStream ficheiro = new FileInputStream(f);\r\n\t\t\t\tObjectInputStream in = new ObjectInputStream(ficheiro);\r\n\t\t\t\tdados = (String[]) in.readObject();\r\n\t\t\t\tin.close();\r\n\t\t\t\tficheiro.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tJFrame frame = new JFrame();\r\n\t\t\tJOptionPane.showMessageDialog(frame, \"Ficheiro de contas não encontrado.\");\r\n\t\t}\r\n\t\treturn dados;\r\n\t}", "@Override\r\n protected FileObject findPrimaryFile(FileObject fo) {\r\n String fileExt = fo.getExt();\r\n\r\n // Ensure all the mandatory files that comprise a shapefile are avialable...\r\n for (String mandatoryExt : MANDATORY_EXTENSIONS) {\r\n FileObject brother = FileUtil.findBrother(fo, mandatoryExt);\r\n if (brother == null) {\r\n return null;\r\n }\r\n }\r\n // ... and then return the primary file object\r\n if (PRIMARY_EXTENSION.equalsIgnoreCase(fileExt)) {\r\n return fo;\r\n }\r\n else {\r\n return FileUtil.findBrother(fo, PRIMARY_EXTENSION);\r\n }\r\n }", "private void getExtractWithFiles(){\n\t\ttry{\n\t\t\t\n\t\t\tFileInputStream fStream = new FileInputStream(tfile);\n\t\t\tfileBytes = new byte[(int)tfile.length()];\n\t\t\t\n\t\t\tfStream.read(fileBytes, 0, fileBytes.length);\n\t\t\tfileSize = fileBytes.length;\n\t\t}catch(Exception ex){\n\t\t\tSystem.err.println(\"File Packet \"+ex.getMessage());\n\t\t}\n\t}", "private String[] concatenaArquivos(File ordem) throws Exception\n\t{\n\t\t// Cria referencia para os arquivos que serao retornados\n\t\t// apos o processamento\n\t\tCollection arquivosAposConcatenacao = new LinkedList();\n\t\t\n\t\t// Busca o objeto VoucherOrdem contendo os dados da ordem\n\t\t// que foram lidos a partir do arquivo cabecalho da ordem\n\t\tArquivoPedidoVoucherParser ordemParser = new ArquivoPedidoVoucherParser();\n\t\tVoucherOrdem ordemVoucher = ordemParser.parse(ordem);\n\t\t\n\t\t// Busca agora todas os nomes de arquivos de caixa\n\t\t// existentes gravados tambem no arquivo cabecalho\n\t\tString arquivosCaixa[] = getNomeArquivosCaixa(ordem);\n\t\tString dirOrigem = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\t\t\t\n\t\t// Faz a iteracao nos itens da ordem para entao criar um arquivo \n\t\t// para cada item no formato PrintOrder#[NUMORDEM]_[NUMITEM].dat\n\t\t// e para cada item entao identifica quais arquivos serao concatenados\n\t\tint realNumItem \t\t= 1;\n\t\tlong qtdeSomaCartoes \t= 0;\n\t\tboolean deveConcatenar \t= true;\n\t\tfor (Iterator i=ordemVoucher.getItensOrdem().iterator(); i.hasNext();)\n\t\t{\n\t\t\tVoucherOrdemItem itemOrdem = (VoucherOrdemItem)i.next();\n\t\t\t// O numero do item no sistema GPP comeca a partir do numero zero (0)\n\t\t\t// portanto como na Tecnomen e criado com item 1 o valor e decrescido de um\n\t\t\tlong qtdCartoes = procBatchPOA.getQtdeCartoes(ordemVoucher.getNumeroOrdem(),realNumItem-1);//(int)itemOrdem.getNumItem()-1);\n\t\t\tqtdeSomaCartoes += itemOrdem.getQtdeCartoes();\n\t\t\tif (qtdCartoes != 0 && deveConcatenar)\n\t\t\t{\n\t\t\t\titemOrdem.setQtdeCartoes( qtdCartoes );\n\t\t\t\tFile arquivoItem = new File(getNomeArquivoItem(ordem,realNumItem));//itemOrdem.getNumItem()));\n\t\t\t\tFileOutputStream itemStream = new FileOutputStream(arquivoItem);\n\t\t\t\tif (itemStream != null)\n\t\t\t\t{\n\t\t\t\t\t// Identifica quais sao os arquivos que devem ser concatenados\n\t\t\t\t\t// para este item. Para cada arquivo encontrado , este e lido\n\t\t\t\t\t// e entao concatenado ao arquivo do item que foi criado\n\t\t\t\t\tString caixasDoItem[] = getArquivosCaixaPorItem(ordemVoucher,itemOrdem,arquivosCaixa);\n\t\t\t\t\t// Atualiza informacoes de numeracao de lote do pedido no GPP\n\t\t\t\t\tatualizaNumeracaoLote(ordemVoucher.getNumeroOrdem(),realNumItem,caixasDoItem);//itemOrdem.getNumItem(),caixasDoItem);\n\t\t\t\t\tfor (int j=0; j < caixasDoItem.length; j++)\n\t\t\t\t\t\titemStream.write(getStreamArquivo(new File(dirOrigem+\n\t\t\t\t\t\t System.getProperty(\"file.separator\")+\n\t\t\t\t\t\t caixasDoItem[j])));\n\t\n\t\t\t\t\titemStream.close();\n\t\t\t\t\tarquivosAposConcatenacao.add(arquivoItem.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\titemOrdem.setQtdeCartoes(0);\n\n\t\t\tdeveConcatenar = (qtdCartoes == qtdeSomaCartoes);\n\t\t\tif (qtdCartoes == qtdeSomaCartoes)\n\t\t\t{\n\t\t\t\tqtdeSomaCartoes = 0;\n\t\t\t\trealNumItem++;\n\t\t\t}\n\t\t}\n\t\treturn (String[])arquivosAposConcatenacao.toArray(new String[0]);\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if ((requestCode == request_code) && (resultCode == RESULT_OK)){\n Toast.makeText(getApplicationContext(),data.getDataString(),Toast.LENGTH_LONG).show();\n elemento = new File(data.getDataString());\n }\n }", "public void salvaPartita(String file) {\n\r\n }", "private void cargarFichero() throws FileNotFoundException {\n\t\tFile miFichero = new File(NOMBRE_FICHERO);\n\t\tFileWriter erroresFichero;\n\t\t\n\t\tScanner in = new Scanner(miFichero);\n\t\t\n\t\tEjercicio nuevoEjer;\n\t\tString siguienteLinea;\n\t\tComprobadorEntradaFichero comprobador = new ComprobadorEntradaFichero();\n\t\tString errores = \"\";\n\t\tint numLinea = 1;\n\t\t\n\t\twhile (in.hasNextLine()) {\n\t\t\t\n\t\t\tsiguienteLinea = in.nextLine();\n\t\t\tif (comprobador.test(siguienteLinea)) {\n\t\t\t\tnuevoEjer = new Ejercicio(siguienteLinea);\n\t\t\t\tcoleccionEj.addEjercicio(nuevoEjer);\n\t\t\t} else {\n\t\t\t\t//Controlar cuántos errores va dando\n\t\t\t\terrores += \"Error en la línea: \" + String.valueOf(numLinea) + \". Datos: \" + siguienteLinea + \"\\n\";\n\t\t\t}\n\t\t\tnumLinea++;\n\t\t}\n\t\t\n\t\tin.close();\n\t\t\n\t\t\n\t\t//Ahora escribimos \n\t\tif (errores != \"\") {\n\t\t\ttry {\n\t\t\t erroresFichero = new FileWriter(NOMBRE_FICHERO_ERRORES);\n\t\t\n\t\t\t erroresFichero.write(errores);\n\n\t\t\t erroresFichero.close();\n\n\t\t\t} catch (Exception ex) {\n\t\t\t\tSystem.out.println(\"Mensaje de la excepción: \" + ex.getMessage());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private static File identifyFile() {\n try {\n File inputFile = new File(\"inputFile.txt\");\n if (inputFile.createNewFile()) {\n System.out.println(\"Debug : File Created\");\n } else {\n System.out.println(\"Debug : File Exists\");\n }\n return inputFile;\n } catch (IOException e) {\n System.out.println(\"Error reading input\");\n e.printStackTrace();\n }\n return null;\n }", "FileContent createFileContent();", "public void crearPrimerFichero(){\n File f=new File(getApplicationContext().getFilesDir(),\"datos.json\");\n // si no existe lo creo\n if(!f.exists()) {\n String filename = \"datos.json\";\n String fileContents = \"[]\";\n FileOutputStream outputStream;\n\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(fileContents.getBytes());\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "public void processaArquivos() throws Exception\n\t{\n\t\t/* Busca o nome do diretorio no arquivo de propriedades */\n\t\tString nomeDiretorio = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\tFile dirArquivos = new File(nomeDiretorio);\n\t\tif (!dirArquivos.isDirectory())\n\t\t\tthrow new IOException(\"Diretorio invalido... \"+nomeDiretorio);\n\n\t\t/* Busca os arquivos das ordems (arquivos com informacoes de caixa) */\n\t\tFileFilter filtro = new OrdemVoucherFileFilter(getPropriedade(\"ordemVoucher.patternArquivos\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t getPropriedade(\"ordemVoucher.extensaoArquivos\"));\n\t\tFile arquivosOrdem[] = dirArquivos.listFiles(filtro);\n\t\t\n\t\t/* Faz a varredura dos arquivos de ordem de voucher encontrados */\n\t\tfor (int i=0; i < arquivosOrdem.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Processando ordem:\"+arquivosOrdem[i].getName());\n\t\t\t\tif (existeArquivos(arquivosOrdem[i]))\n\t\t\t\t{\n\t\t\t\t\t// Realiza a concatenacao dos arquivos da ordem agrupando-as por item\n\t\t\t\t\t// e entao processa-os para a criptografia e compactacao antes de \n\t\t\t\t\t// envia-los ao GPP\n\t\t\t\t\tString arqAProcessar[] = concatenaArquivos(arquivosOrdem[i]);\n\t\t\t\t\t\n\t\t\t\t\t// Para cada arquivo encontrado de ordem de criacao de voucher\n\t\t\t\t\t// faz se a criptografia dos arquivos de caixa correspondentes\n\t\t\t\t\t// para entao compacta-los em um unico arquivo para posteriormente\n\t\t\t\t\t// ser enviado ao GPP juntamente com este arquivo de capa\n\t\t\t\t\t// da ordem de criacao do voucher\n\t\t\t\t\tString arquivoCompactado = criptografaECompactaOrdem(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\n\t\t\t\t\t// Caso ao criar os arquivos criptografados e compacta-los aconteca algum\n\t\t\t\t\t// erro entao o retorno do metodo e um nome de arquivo nulo. Se este nome\n\t\t\t\t\t// for nulo, entao nada e executado com esta ordem passando entao para a\n\t\t\t\t\t// proxima\n\t\t\t\t\tif (arquivoCompactado != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Envia o arquivo do cabecalho da ordem \n\t\t\t\t\t\t// e em seguida envia o arquivo compactado\n\t\t\t\t\t\tenviaArquivoParaGPP(arquivosOrdem[i]);\n\t\t\t\t\t\tenviaArquivoParaGPP(new File(arquivoCompactado));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove os arquivos criptografados e compactados que foram enviados\n\t\t\t\t\t\t// para o GPP\n\t\t\t\t\t\tremoveArquivos(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Move os arquivos de origem das informacoes de voucher para um diretorio\n\t\t\t\t\t\t// historico desses arquivos\n\t\t\t\t\t\t// Obs: Os arquivos concatenados foram removidos do diretorio\n\t\t\t\t\t\tmoveArquivos(arquivosOrdem[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Erro ao processar ordem:\"+arquivosOrdem[i].getName()+\" Erro:\"+e);\n\t\t\t}\n\t\t}\n\t}", "public void recevoirDossier() {\n try {\n fileInfo = (FileInfo) ois.readObject(); //lire les informations du fichier\n //chemin du fichier en sortie\n String outputFile = fileInfo.getDestinationDirectory() + fileInfo.getFilename();\n dstFile = new File(outputFile);\n if (!new File(fileInfo.getDestinationDirectory()).exists()) { //si le fichier n'existe pas\n new File(fileInfo.getDestinationDirectory()).mkdirs(); //creation du fichier\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData()); //ecrire les données dans le fichier\n fos.flush();\n fileInfo.setFileData(null);\n System.gc();\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n\n } else if (dstFile.lastModified() < fileInfo.getModifier()) { //si le fichier existe et que c'est une nouvelle version alors\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData());\n fos.flush();\n fileInfo.setFileData(null);\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(RecevoirFichier.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public Partie charger() {\n Partie partie = new Partie(0,\"pseudo\");\n try {\n FileInputStream fileStream = new FileInputStream(\"savePartie\");\n ObjectInputStream objectStream = new ObjectInputStream(fileStream);\n partie.setPseudo((String)objectStream.readObject());\n partie.niveau = (int)objectStream.readObject();\n objectStream.close();\n fileStream.close();\n } catch ( IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return partie;\n }", "public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}", "private void importarDatos() {\r\n // Cabecera\r\n System.out.println(\"Importación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (\r\n FileReader fr = new FileReader(DEF_NOMBRE_FICHERO);\r\n BufferedReader br = new BufferedReader(fr)) {\r\n // Colección Auxiliar\r\n final List<Item> AUX = new ArrayList<>();\r\n\r\n // Bucle de Lectura\r\n boolean lecturaOK = true;\r\n do {\r\n // Lectura Linea Actual\r\n String linea = br.readLine();\r\n\r\n // Procesar Lectura\r\n if (linea != null) {\r\n // String > Array\r\n String[] items = linea.split(REG_CSV_LECT);\r\n\r\n // Campo 0 - id ( int )\r\n int id = Integer.parseInt(items[DEF_INDICE_ID]);\r\n\r\n // Campo 1 - nombre ( String )\r\n String nombre = items[DEF_INDICE_NOMBRE].trim();\r\n\r\n // Campo 2 - precio ( double )\r\n double precio = Double.parseDouble(items[DEF_INDICE_PRECIO].trim());\r\n\r\n // Campo 3 - color ( Color )\r\n Color color = UtilesGraficos.generarColor(items[DEF_INDICE_COLOR].trim());\r\n\r\n // Generar Nuevo Item\r\n Item item = new Item(id, nombre, precio, color);\r\n\r\n // Item > Carrito\r\n AUX.add(item);\r\n// System.out.println(\"Importado: \" + item);\r\n } else {\r\n lecturaOK = false;\r\n }\r\n } while (lecturaOK);\r\n\r\n // Vaciar Carrito\r\n CARRITO.clear();\r\n\r\n // AUX > CARRITO\r\n CARRITO.addAll(AUX);\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos importados correctamente\");\r\n } catch (NumberFormatException | NullPointerException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Formato de datos incorrecto\");\r\n\r\n // Vaciado Carrito\r\n CARRITO.clear();\r\n } catch (IOException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Acceso al fichero\");\r\n }\r\n }", "public InterfazInfo importarInterfaz(InterfazInfo info) \n throws InterfacesException, MareException\n {\n String codigoInterfaz = info.getCodigoInterfaz();\n String numeroLote = info.getNumeroLote();\n Long pais = info.getPais();\n\n InterfazDef def = importarInterfazP1(codigoInterfaz, numeroLote, pais, info); \n \n return importarInterfazP2(codigoInterfaz, numeroLote, pais, def, info);\n }", "public interface Filtrado extends ItemFiltro {\n\t/**\n\t * A exemplo da interface Serializable, mas nao necessariamente pelo menos\n\t * motivo, esta interface nao define nenhum metodo.\n\t */\n\t\n\t/**\n\t* Deseja-se ter um elo entre Filtrado e registro,\n\t* visto que o que se deseja eh armazenadar os\n\t* filtrados no output.txt para uso posterior.\n\t* @return Registro Registro \n\t* */\n\tpublic Registro getRegistro();\n\n}", "public PrimaryFile clonePrimaryFile()\n {\n ExtractedTargetFile pf = new ExtractedTargetFile();\n pf.setInternalBaseHref(getInternalBaseHref());\n pf.setExternalBaseHref(getExternalBaseHref());\n return pf;\n }", "private byte[] getStreamArquivo(File arquivo) throws IOException\n\t{\n\t\t/* Define o tamanho do buffer a ser lido do arquivo (max 32kb),\n\t\t * faz a criacao de um buffer em memoria para ir armazenando os dados\n\t\t * lidos e entao apos a leitura faz o envio dos dados para o GPP\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tFileInputStream fileInput = new FileInputStream(arquivo);\n\t\tByteArrayOutputStream bufferArquivo = new ByteArrayOutputStream();\n\n\t\tbyte[] data = new byte[sizeBuffer];\n\t\tint count=0;\n\t\twhile ( (count = fileInput.read(data)) != -1 )\n\t\t\tbufferArquivo.write(data,0,count);\n\t\t\n\t\treturn bufferArquivo.toByteArray();\n\t}", "private Ingrediente givenExisteUnIngrediente() {\n\t\tIngrediente ing = new Ingrediente();\n\t\ting.setId_categoriaIngrediente(1);\n\t\ting.setNombre(\"TOMATE\");\n\t\treturn ing;\n\t}", "private static RetornoExtrato parse(String xmlExtrato) throws Exception\n\t{\n\t\tRetornoExtrato result = new RetornoExtrato();\n\t\t\n\t\ttry\n\t\t{\t\t\t\t\t\n\t\t\t//Obtendo os objetos necessarios para a execucao do parse do xml\n\t\t\tDocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder parse = docBuilder.newDocumentBuilder();\n\t\t\tInputSource is = new InputSource(new StringReader(xmlExtrato));\n\t\t\tDocument doc = parse.parse(is);\n\n\t\t\tVector v = new Vector();\n\t\t\n\t\t\tExtrato extrato = null;\n\t\t\t\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\n\t\t\t//Obter o índice de recarga\n\t\t\tElement elmDadosControle = (Element)doc.getElementsByTagName(\"dadosControle\").item(0);\n\t\t\tNodeList nlDadosControle = elmDadosControle.getChildNodes();\n\t\t\tif(nlDadosControle.getLength() > 0)\n\t\t\t{\n\t\t\t\tresult.setIndAssinanteLigMix(nlDadosControle.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setPlanoPreco\t\t(nlDadosControle.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t}\n\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"detalhe\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"detalhe\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\t\n\t\t\t\t\textrato = new Extrato();\n\t\t\t\t\textrato.setNumeroOrigem(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setHoraChamada(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setTipoTarifacao(itemNodes.item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setOperacao(itemNodes.item(5).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoOrigem(itemNodes.item(6).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoDestino(itemNodes.item(7).getChildNodes().item(0)!=null?itemNodes.item(7).getChildNodes().item(0).getNodeValue():\"\");\n\t\t\t\t\textrato.setNumeroDestino(itemNodes.item(8).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setDuracaoChamada(itemNodes.item(9).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\t\n\t\t\t\t\textrato.setValorPrincipal\t(stringToDouble(itemNodes.item(10).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorBonus\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorSMS\t\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorGPRS\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorPeriodico\t(stringToDouble(itemNodes.item(10).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorTotal\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\n\t\t\t\t\textrato.setSaldoPrincipal\t(stringToDouble(itemNodes.item(11).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoBonus\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoSMS\t\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoGPRS\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoPeriodico\t(stringToDouble(itemNodes.item(11).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoTotal\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\t\n\t\t\t\t\tv.add(extrato);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setExtratos(v);\n\t\t\t\n\t\t\tv= new Vector();\n\t\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"evento\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"evento\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\n\t\t\t\t\tEvento evento = new Evento();\n\t\t\t\t\tevento.setNome(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setHora(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tv.add(evento);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setEventos(v);\n\t\t\t\n\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"totais\" ).item(0);\n\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t{\t\n\t\t\t\t// SaldoInicial Principal\n\t\t\t\tresult.setSaldoInicialPrincipal\t(itemNodes.item(0).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialBonus\t\t(itemNodes.item(0).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialSMS\t\t(itemNodes.item(0).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialGPRS\t\t(itemNodes.item(0).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialPeriodico\t(itemNodes.item(0).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialTotal\t\t(itemNodes.item(0).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalDebitosPrincipal\t(itemNodes.item(1).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosBonus\t\t(itemNodes.item(1).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosSMS\t\t(itemNodes.item(1).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosGPRS\t\t(itemNodes.item(1).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosPeriodico (itemNodes.item(1).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosTotal\t\t(itemNodes.item(1).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalCreditosPrincipal(itemNodes.item(2).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosBonus\t(itemNodes.item(2).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosSMS\t\t(itemNodes.item(2).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosGPRS\t\t(itemNodes.item(2).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosPeriodico(itemNodes.item(2).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosTotal\t(itemNodes.item(2).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setSaldoFinalPrincipal\t(itemNodes.item(3).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalBonus\t\t(itemNodes.item(3).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalSMS\t\t\t(itemNodes.item(3).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalGPRS\t\t(itemNodes.item(3).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalPeriodico\t(itemNodes.item(3).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalTotal\t\t(itemNodes.item(3).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tserviceElement = (Element) doc.getElementsByTagName( \"dadosCadastrais\" ).item(0);\n\t\t\t\titemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.item(2).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setDataAtivacao(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (itemNodes.item(3).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setPlano(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tthrow new Exception(\"Problemas com a geração do Comprovante de Serviços.\");\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static File obtenerFileDeFicheroEnUnidadExterna(String DIRECTORIOEXTERNO, String carpetaorigen, String nombrefichero) {\n boolean res = true;\n File file = null;\n try {\n // se crea variable separada por conveniencia, para facilitar una depuracion\n String pathcompleto = Environment.getExternalStoragePublicDirectory(DIRECTORIOEXTERNO) + File.separator + carpetaorigen;\n file = new File(pathcompleto, nombrefichero);\n if (file.exists()) {\n return file;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return file;\n }", "public void restaurarPartida() throws FileNotFoundException, IOException, ClassNotFoundException {\n\t\tjuego.restaurarPartida(jugador.getID());\t\r\n\t}", "private void abrirEntTransaccion(){\n try{\n entTransaccion = new ObjectInputStream(\n Files.newInputStream(Paths.get(\"trans.ser\")));\n }\n catch(IOException iOException){\n System.err.println(\"Error al abrir el archivo. Terminado.\");\n System.exit(1);\n }\n }", "public static ArrayList<Chip> ImportarChips() {\n ArrayList<Chip> ArrayChips = new ArrayList<Chip>();\n File f = new File(\"Archivos/chips.txt\");\n ManCliente objManCliente = new ManCliente();\n ImportarCliente objImpCli = new ImportarCliente();\n ArrayList<Cliente> ArrayClientes = new ArrayList<Cliente>();\n String aNumero;\n int aActivo;\n int aSaldo;\n int aMegas;\n String aCedula;\n StringTokenizer st;\n Scanner entrada = null;\n String sCadena;\n try {\n ArrayClientes = objImpCli.ImportarClientes();\n entrada = new Scanner(f);\n while (entrada.hasNext()) {\n sCadena = entrada.nextLine();\n st = new StringTokenizer(sCadena, \",\");\n while (st.hasMoreTokens()) {\n aNumero = st.nextToken();\n aActivo = Integer.parseInt(st.nextToken());\n aSaldo = Integer.parseInt(st.nextToken());\n aMegas = Integer.parseInt(st.nextToken());\n aCedula = st.nextToken();\n\n Chip objTmpChip = new Chip(aNumero, aActivo, aSaldo, aMegas, objManCliente.BuscarCliente(ArrayClientes, aCedula));\n ArrayChips.add(objTmpChip);\n\n }\n }\n } catch (FileNotFoundException e) {\n System.out.println(e.getMessage());\n } finally {\n entrada.close();\n }\n return ArrayChips;\n }", "public void leerArchivo() {\n String rfcProveedor = produccionCigarrosHelper.getProveedor().getRfc();\n String rfcTabacalera = produccionCigarrosHelper.getTabacalera().getRfc();\n\n if (archivoFoliosService != null && desperdiciosHelper.getArchivoFolios() != null) {\n try {\n desperdiciosHelper.setNombreArchivo(desperdiciosHelper.getArchivoFolios().getFileName());\n InputStream inputStream = desperdiciosHelper.getArchivoFolios().getInputstream();\n\n desperdiciosHelper.setRangoFoliosList(archivoFoliosProduccionService.leerArchivoFolios(inputStream, desperdiciosHelper.getNombreArchivo()));\n desperdiciosHelper.setRangoFoliosListAux(validadorRangosService.generarRangosProduccion(rfcTabacalera, rfcProveedor, desperdiciosHelper.getRangoFoliosList()));\n desperdiciosHelper.setMsgErrorArchivo(\"\");\n\n solicitudService.generaCadenaOriginal(firmaFormHelper.getRfcSession(), sumaRangosFolio(desperdiciosHelper.getRangoFoliosListAux()), null);\n firmaFormHelper.setCadenaOriginal(solicitudService.generaCadenaOriginal(firmaFormHelper.getRfcSession(), sumaRangosFolio(desperdiciosHelper.getRangoFoliosListAux()), null));\n desperdiciosHelper.setCantidadSolicitada(sumaRangosFolio(desperdiciosHelper.getRangoFoliosListAux()));\n\n } catch (SolicitudServiceException bE) {\n desperdiciosHelper.setMsgErrorArchivo(bE.getMessage());\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n LOGGER.error(\"Error: al Leer el archivo\" + bE.getMessage(), bE);\n } catch (RangosException rE) {\n desperdiciosHelper.setMsgErrorArchivo(rE.getMessage());\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n super.msgError(rE.getMessage());\n } catch (IOException io) {\n desperdiciosHelper.setMsgErrorArchivo(io.getMessage());\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n LOGGER.error(\"ERROR: Al leer el Archivo : \" + io.getMessage());\n } catch (ArchivoFoliosServiceException ex) {\n LOGGER.error(\"ERROR: Al leer el Archivo : \" + ex.getMessage());\n }\n if (!desperdiciosHelper.getMsgErrorArchivo().isEmpty()) {\n desperdiciosHelper.setDeshabilitaBtnGuardar(true);\n desperdiciosHelper.setMsgExitoArchivo(\"\");\n } else {\n desperdiciosHelper.setMsgExitoArchivo(\"El archivo \" + desperdiciosHelper.getNombreArchivo() + \" se cargo con éxito\");\n desperdiciosHelper.setMsgErrorArchivo(\"\");\n }\n }\n }", "private BufferedWriter abrirArquivoEscrita() {\n\t\ttry{\n\t\t\tBufferedWriter file = null;\n\t\t\tfile = new BufferedWriter(new FileWriter(caminho));\n\t\t\treturn file;\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public String abrirArquivo(String nome) {\n this.titulo = nome;\n try {\n return metodos.abrirArquivo(nome, this.nome);\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@Override\n\tpublic void emiteExtrato() {\n\t\t\n\t}", "protected void initFile(String id) throws FormatException, IOException {\n // normalize file name\n super.initFile(normalizeFilename(null, id));\n id = currentId;\n String dir = new File(id).getParent();\n\n // parse and populate OME-XML metadata\n String fileName = new Location(id).getAbsoluteFile().getAbsolutePath();\n RandomAccessInputStream ras = new RandomAccessInputStream(fileName);\n String xml;\n IFD firstIFD;\n try {\n TiffParser tp = new TiffParser(ras);\n firstIFD = tp.getFirstIFD();\n xml = firstIFD.getComment();\n }\n finally {\n ras.close();\n }\n\n if (service == null) setupService();\n OMEXMLMetadata meta;\n try {\n meta = service.createOMEXMLMetadata(xml);\n }\n catch (ServiceException se) {\n throw new FormatException(se);\n }\n\n hasSPW = meta.getPlateCount() > 0;\n\n for (int i=0; i<meta.getImageCount(); i++) {\n int sizeC = meta.getPixelsSizeC(i).getValue().intValue();\n service.removeChannels(meta, i, sizeC);\n }\n\n // TODO\n //Hashtable originalMetadata = meta.getOriginalMetadata();\n //if (originalMetadata != null) metadata = originalMetadata;\n\n LOGGER.trace(xml);\n\n if (meta.getRoot() == null) {\n throw new FormatException(\"Could not parse OME-XML from TIFF comment\");\n }\n\n String[] acquiredDates = new String[meta.getImageCount()];\n for (int i=0; i<acquiredDates.length; i++) {\n acquiredDates[i] = meta.getImageAcquiredDate(i);\n }\n\n String currentUUID = meta.getUUID();\n service.convertMetadata(meta, metadataStore);\n\n // determine series count from Image and Pixels elements\n int seriesCount = meta.getImageCount();\n core = new CoreMetadata[seriesCount];\n for (int i=0; i<seriesCount; i++) {\n core[i] = new CoreMetadata();\n }\n info = new OMETiffPlane[seriesCount][];\n\n tileWidth = new int[seriesCount];\n tileHeight = new int[seriesCount];\n\n // compile list of file/UUID mappings\n Hashtable<String, String> files = new Hashtable<String, String>();\n boolean needSearch = false;\n for (int i=0; i<seriesCount; i++) {\n int tiffDataCount = meta.getTiffDataCount(i);\n for (int td=0; td<tiffDataCount; td++) {\n String uuid = null;\n try {\n uuid = meta.getUUIDValue(i, td);\n }\n catch (NullPointerException e) { }\n String filename = null;\n if (uuid == null) {\n // no UUID means that TiffData element refers to this file\n uuid = \"\";\n filename = id;\n }\n else {\n filename = meta.getUUIDFileName(i, td);\n if (!new Location(dir, filename).exists()) filename = null;\n if (filename == null) {\n if (uuid.equals(currentUUID) || currentUUID == null) {\n // UUID references this file\n filename = id;\n }\n else {\n // will need to search for this UUID\n filename = \"\";\n needSearch = true;\n }\n }\n else filename = normalizeFilename(dir, filename);\n }\n String existing = files.get(uuid);\n if (existing == null) files.put(uuid, filename);\n else if (!existing.equals(filename)) {\n throw new FormatException(\"Inconsistent UUID filenames\");\n }\n }\n }\n\n // search for missing filenames\n if (needSearch) {\n Enumeration en = files.keys();\n while (en.hasMoreElements()) {\n String uuid = (String) en.nextElement();\n String filename = files.get(uuid);\n if (filename.equals(\"\")) {\n // TODO search...\n // should scan only other .ome.tif files\n // to make this work with OME server may be a little tricky?\n throw new FormatException(\"Unmatched UUID: \" + uuid);\n }\n }\n }\n\n // build list of used files\n Enumeration en = files.keys();\n int numUUIDs = files.size();\n HashSet fileSet = new HashSet(); // ensure no duplicate filenames\n for (int i=0; i<numUUIDs; i++) {\n String uuid = (String) en.nextElement();\n String filename = files.get(uuid);\n fileSet.add(filename);\n }\n used = new String[fileSet.size()];\n Iterator iter = fileSet.iterator();\n for (int i=0; i<used.length; i++) used[i] = (String) iter.next();\n\n // process TiffData elements\n Hashtable<String, IFormatReader> readers =\n new Hashtable<String, IFormatReader>();\n for (int i=0; i<seriesCount; i++) {\n int s = i;\n LOGGER.debug(\"Image[{}] {\", i);\n LOGGER.debug(\" id = {}\", meta.getImageID(i));\n\n String order = meta.getPixelsDimensionOrder(i).toString();\n\n PositiveInteger samplesPerPixel = null;\n if (meta.getChannelCount(i) > 0) {\n samplesPerPixel = meta.getChannelSamplesPerPixel(i, 0);\n }\n int samples = samplesPerPixel == null ? -1 : samplesPerPixel.getValue();\n int tiffSamples = firstIFD.getSamplesPerPixel();\n\n boolean adjustedSamples = false;\n if (samples != tiffSamples) {\n LOGGER.warn(\"SamplesPerPixel mismatch: OME={}, TIFF={}\",\n samples, tiffSamples);\n samples = tiffSamples;\n adjustedSamples = true;\n }\n\n if (adjustedSamples && meta.getChannelCount(i) <= 1) {\n adjustedSamples = false;\n }\n\n int effSizeC = meta.getPixelsSizeC(i).getValue().intValue();\n if (!adjustedSamples) {\n effSizeC /= samples;\n }\n if (effSizeC == 0) effSizeC = 1;\n if (effSizeC * samples != meta.getPixelsSizeC(i).getValue().intValue()) {\n effSizeC = meta.getPixelsSizeC(i).getValue().intValue();\n }\n int sizeT = meta.getPixelsSizeT(i).getValue().intValue();\n int sizeZ = meta.getPixelsSizeZ(i).getValue().intValue();\n int num = effSizeC * sizeT * sizeZ;\n\n OMETiffPlane[] planes = new OMETiffPlane[num];\n for (int no=0; no<num; no++) planes[no] = new OMETiffPlane();\n\n int tiffDataCount = meta.getTiffDataCount(i);\n boolean zOneIndexed = false;\n boolean cOneIndexed = false;\n boolean tOneIndexed = false;\n\n // pre-scan TiffData indices to see if any of them are indexed from 1\n\n for (int td=0; td<tiffDataCount; td++) {\n NonNegativeInteger firstC = meta.getTiffDataFirstC(i, td);\n NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td);\n NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td);\n int c = firstC == null ? 0 : firstC.getValue();\n int t = firstT == null ? 0 : firstT.getValue();\n int z = firstZ == null ? 0 : firstZ.getValue();\n\n if (c >= effSizeC) cOneIndexed = true;\n if (z >= sizeZ) zOneIndexed = true;\n if (t >= sizeT) tOneIndexed = true;\n }\n\n for (int td=0; td<tiffDataCount; td++) {\n LOGGER.debug(\" TiffData[{}] {\", td);\n // extract TiffData parameters\n String filename = null;\n String uuid = null;\n try {\n filename = meta.getUUIDFileName(i, td);\n } catch (NullPointerException e) {\n LOGGER.debug(\"Ignoring null UUID object when retrieving filename.\");\n }\n try {\n uuid = meta.getUUIDValue(i, td);\n } catch (NullPointerException e) {\n LOGGER.debug(\"Ignoring null UUID object when retrieving value.\");\n }\n NonNegativeInteger tdIFD = meta.getTiffDataIFD(i, td);\n int ifd = tdIFD == null ? 0 : tdIFD.getValue();\n NonNegativeInteger numPlanes = meta.getTiffDataPlaneCount(i, td);\n NonNegativeInteger firstC = meta.getTiffDataFirstC(i, td);\n NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td);\n NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td);\n int c = firstC == null ? 0 : firstC.getValue();\n int t = firstT == null ? 0 : firstT.getValue();\n int z = firstZ == null ? 0 : firstZ.getValue();\n\n // NB: some writers index FirstC, FirstZ and FirstT from 1\n if (cOneIndexed) c--;\n if (zOneIndexed) z--;\n if (tOneIndexed) t--;\n\n int index = FormatTools.getIndex(order,\n sizeZ, effSizeC, sizeT, num, z, c, t);\n int count = numPlanes == null ? 1 : numPlanes.getValue();\n if (count == 0) {\n core[s] = null;\n break;\n }\n\n // get reader object for this filename\n if (filename == null) {\n if (uuid == null) filename = id;\n else filename = files.get(uuid);\n }\n else filename = normalizeFilename(dir, filename);\n IFormatReader r = readers.get(filename);\n if (r == null) {\n r = new MinimalTiffReader();\n readers.put(filename, r);\n }\n\n Location file = new Location(filename);\n if (!file.exists()) {\n // if this is an absolute file name, try using a relative name\n // old versions of OMETiffWriter wrote an absolute path to\n // UUID.FileName, which causes problems if the file is moved to\n // a different directory\n filename =\n filename.substring(filename.lastIndexOf(File.separator) + 1);\n filename = dir + File.separator + filename;\n\n if (!new Location(filename).exists()) {\n filename = currentId;\n }\n }\n\n // populate plane index -> IFD mapping\n for (int q=0; q<count; q++) {\n int no = index + q;\n planes[no].reader = r;\n planes[no].id = filename;\n planes[no].ifd = ifd + q;\n planes[no].certain = true;\n LOGGER.debug(\" Plane[{}]: file={}, IFD={}\",\n new Object[] {no, planes[no].id, planes[no].ifd});\n }\n if (numPlanes == null) {\n // unknown number of planes; fill down\n for (int no=index+1; no<num; no++) {\n if (planes[no].certain) break;\n planes[no].reader = r;\n planes[no].id = filename;\n planes[no].ifd = planes[no - 1].ifd + 1;\n LOGGER.debug(\" Plane[{}]: FILLED\", no);\n }\n }\n else {\n // known number of planes; clear anything subsequently filled\n for (int no=index+count; no<num; no++) {\n if (planes[no].certain) break;\n planes[no].reader = null;\n planes[no].id = null;\n planes[no].ifd = -1;\n LOGGER.debug(\" Plane[{}]: CLEARED\", no);\n }\n }\n LOGGER.debug(\" }\");\n }\n\n if (core[s] == null) continue;\n\n // verify that all planes are available\n LOGGER.debug(\" --------------------------------\");\n for (int no=0; no<num; no++) {\n LOGGER.debug(\" Plane[{}]: file={}, IFD={}\",\n new Object[] {no, planes[no].id, planes[no].ifd});\n if (planes[no].reader == null) {\n LOGGER.warn(\"Image ID '{}': missing plane #{}. \" +\n \"Using TiffReader to determine the number of planes.\",\n meta.getImageID(i), no);\n TiffReader r = new TiffReader();\n r.setId(currentId);\n try {\n planes = new OMETiffPlane[r.getImageCount()];\n for (int plane=0; plane<planes.length; plane++) {\n planes[plane] = new OMETiffPlane();\n planes[plane].id = currentId;\n planes[plane].reader = r;\n planes[plane].ifd = plane;\n }\n num = planes.length;\n }\n finally {\n r.close();\n }\n }\n }\n LOGGER.debug(\" }\");\n\n // populate core metadata\n info[s] = planes;\n try {\n if (!info[s][0].reader.isThisType(info[s][0].id)) {\n info[s][0].id = currentId;\n }\n for (int plane=0; plane<info[s].length; plane++) {\n if (!info[s][plane].reader.isThisType(info[s][plane].id)) {\n info[s][plane].id = info[s][0].id;\n }\n }\n\n info[s][0].reader.setId(info[s][0].id);\n tileWidth[s] = info[s][0].reader.getOptimalTileWidth();\n tileHeight[s] = info[s][0].reader.getOptimalTileHeight();\n\n core[s].sizeX = meta.getPixelsSizeX(i).getValue().intValue();\n int tiffWidth = (int) firstIFD.getImageWidth();\n if (core[s].sizeX != tiffWidth) {\n LOGGER.warn(\"SizeX mismatch: OME={}, TIFF={}\",\n core[s].sizeX, tiffWidth);\n }\n core[s].sizeY = meta.getPixelsSizeY(i).getValue().intValue();\n int tiffHeight = (int) firstIFD.getImageLength();\n if (core[s].sizeY != tiffHeight) {\n LOGGER.warn(\"SizeY mismatch: OME={}, TIFF={}\",\n core[s].sizeY, tiffHeight);\n }\n core[s].sizeZ = meta.getPixelsSizeZ(i).getValue().intValue();\n core[s].sizeC = meta.getPixelsSizeC(i).getValue().intValue();\n core[s].sizeT = meta.getPixelsSizeT(i).getValue().intValue();\n core[s].pixelType = FormatTools.pixelTypeFromString(\n meta.getPixelsType(i).toString());\n int tiffPixelType = firstIFD.getPixelType();\n if (core[s].pixelType != tiffPixelType) {\n LOGGER.warn(\"PixelType mismatch: OME={}, TIFF={}\",\n core[s].pixelType, tiffPixelType);\n core[s].pixelType = tiffPixelType;\n }\n core[s].imageCount = num;\n core[s].dimensionOrder = meta.getPixelsDimensionOrder(i).toString();\n\n // hackish workaround for files exported by OMERO that have an\n // incorrect dimension order\n String uuidFileName = \"\";\n try {\n if (meta.getTiffDataCount(i) > 0) {\n uuidFileName = meta.getUUIDFileName(i, 0);\n }\n }\n catch (NullPointerException e) { }\n if (meta.getChannelCount(i) > 0 && meta.getChannelName(i, 0) == null &&\n meta.getTiffDataCount(i) > 0 &&\n uuidFileName.indexOf(\"__omero_export\") != -1)\n {\n core[s].dimensionOrder = \"XYZCT\";\n }\n\n core[s].orderCertain = true;\n PhotoInterp photo = firstIFD.getPhotometricInterpretation();\n core[s].rgb = samples > 1 || photo == PhotoInterp.RGB;\n if ((samples != core[s].sizeC && (samples % core[s].sizeC) != 0 &&\n (core[s].sizeC % samples) != 0) || core[s].sizeC == 1 ||\n adjustedSamples)\n {\n core[s].sizeC *= samples;\n }\n\n if (core[s].sizeZ * core[s].sizeT * core[s].sizeC >\n core[s].imageCount && !core[s].rgb)\n {\n if (core[s].sizeZ == core[s].imageCount) {\n core[s].sizeT = 1;\n core[s].sizeC = 1;\n }\n else if (core[s].sizeT == core[s].imageCount) {\n core[s].sizeZ = 1;\n core[s].sizeC = 1;\n }\n else if (core[s].sizeC == core[s].imageCount) {\n core[s].sizeT = 1;\n core[s].sizeZ = 1;\n }\n }\n\n if (meta.getPixelsBinDataCount(i) > 1) {\n LOGGER.warn(\"OME-TIFF Pixels element contains BinData elements! \" +\n \"Ignoring.\");\n }\n core[s].littleEndian = firstIFD.isLittleEndian();\n core[s].interleaved = false;\n core[s].indexed = photo == PhotoInterp.RGB_PALETTE &&\n firstIFD.getIFDValue(IFD.COLOR_MAP) != null;\n if (core[s].indexed) {\n core[s].rgb = false;\n }\n core[s].falseColor = true;\n core[s].metadataComplete = true;\n }\n catch (NullPointerException exc) {\n throw new FormatException(\"Incomplete Pixels metadata\", exc);\n }\n }\n\n // remove null CoreMetadata entries\n\n Vector<CoreMetadata> series = new Vector<CoreMetadata>();\n Vector<OMETiffPlane[]> planeInfo = new Vector<OMETiffPlane[]>();\n for (int i=0; i<core.length; i++) {\n if (core[i] != null) {\n series.add(core[i]);\n planeInfo.add(info[i]);\n }\n }\n core = series.toArray(new CoreMetadata[series.size()]);\n info = planeInfo.toArray(new OMETiffPlane[0][0]);\n\n MetadataTools.populatePixels(metadataStore, this, false, false);\n for (int i=0; i<acquiredDates.length; i++) {\n if (acquiredDates[i] != null) {\n metadataStore.setImageAcquiredDate(acquiredDates[i], i);\n }\n }\n metadataStore = getMetadataStoreForConversion();\n }", "public byte[] getLocalFileDataExtra() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"0a848c50-13a5-41b9-817e-28d7235fee87\");\n final byte[] extra = getExtra();\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1f7ca2fd-527c-4d39-9a26-89a6c51e4dca\");\n return extra != null ? extra : EMPTY;\n }", "public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\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\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic ResponsePersist persist(Produto entity, ProdutoService service, MultipartFile file) {\n\t\treturn null;\n\t}", "private boolean restoreTransferFromFile(File f) {\n long fileSize = f.length();\n\n if (fileSize > org.dkf.jed2k.Constants.BLOCK_SIZE_INT) {\n log.warn(\"[ED2K service] resume data file {} has too large size {}, skip it\"\n , f.getName(), fileSize);\n return false;\n }\n\n TransferHandle handle = null;\n ByteBuffer buffer = ByteBuffer.allocate((int)fileSize);\n try(FileInputStream istream = openFileInput(f.getName())) {\n log.info(\"[ED2K service] load resume data {} size {}\"\n , f.getName()\n , fileSize);\n\n istream.read(buffer.array(), 0, buffer.capacity());\n // do not flip buffer!\n AddTransferParams atp = new AddTransferParams();\n atp.get(buffer);\n File file = new File(atp.getFilepath().asString());\n\n if (Platforms.get().saf()) {\n LollipopFileSystem fs = (LollipopFileSystem)Platforms.fileSystem();\n if (fs.exists(file)) {\n android.util.Pair<ParcelFileDescriptor, DocumentFile> resume = fs.openFD(file, \"rw\");\n\n if (resume != null && resume.second != null && resume.first != null && resume.second.exists()) {\n atp.setExternalFileHandler(new AndroidFileHandler(file, resume.second, resume.first));\n handle = session.addTransfer(atp);\n } else {\n log.error(\"[ED2K service] restore transfer {} failed document/parcel is null\", file);\n }\n } else {\n log.warn(\"[ED2K service] unable to restore transfer {}: file not exists\", file);\n }\n } else {\n if (file.exists()) {\n atp.setExternalFileHandler(new DesktopFileHandler(file));\n handle = session.addTransfer(atp);\n } else {\n log.warn(\"[ED2K service] unable to restore transfer {}: file not exists\", file);\n }\n }\n }\n catch(FileNotFoundException e) {\n log.error(\"[ED2K service] load resume data file not found {} error {}\", f.getName(), e);\n }\n catch(IOException e) {\n log.error(\"[ED2K service] load resume data {} i/o error {}\", f.getName(), e);\n }\n catch(JED2KException e) {\n log.error(\"[ED2K service] load resume data {} add transfer error {}\", f.getName(), e);\n }\n\n // log transfer handle if it has been added\n if (handle != null) {\n log.info(\"transfer {} is {}\"\n , handle.isValid() ? handle.getHash().toString() : \"\"\n , handle.isValid() ? \"valid\" : \"invalid\");\n }\n\n return handle != null;\n }", "static Grafo cargarGrafo(String nombreArchivo, Grafo grafo)\n\t\t\tthrows IOException\n\t{\n\t\tint n; // Corresponde al número de nodos del grafo\n int m; \t // Corresponde a la cantidad de aristas en el grafo\n\n\t\tBufferedReader Lector = new BufferedReader(\n\t\t\t\tnew FileReader(nombreArchivo));\n\t\t\n String linea = Lector.readLine();\n n = Integer.parseInt(linea);\n\n /*Agregamos los vértices con las posiciones correspondientes*/\n for(int i = 0; i < n; i++){\n \tlinea = Lector.readLine();\n \tString[] posiciones = linea.split(\" \");\n \tgrafo.agregarVertice(i, Double.valueOf(posiciones[0]), Double.valueOf(posiciones[1]));\n }\n\n m = Integer.parseInt(Lector.readLine()); \n\n /*Ahora agregamos las aristas*/\n for(int i = 0; i < m; i++){\n \tlinea = Lector.readLine();\n \tString[] vertices = linea.split(\" \");\n \tgrafo.agregarArista(Integer.parseInt(vertices[0]), Integer.parseInt(vertices[1]));\n\n }\n return grafo; \n }", "static void CrearArchivo(Vector productos, Vector clientes){ \r\n \ttry{ //iniciamos el try y si no funciona se hace el catch\r\n BufferedWriter bw = new BufferedWriter(\r\n \t\t//Iniciamos el archivo adentro de bw que es un objeto.\r\n new FileWriter(\"reporte.txt\") );\r\n //creamos un producto auxiliar\r\n Producto p; \r\n //mientas existan productos se escribe lo siguiente en el archivo\r\n for(int x = 0; x < productos.size(); x++){ \r\n \t//impresiones de nombre,codigo,stock,precio en el archivo\r\n \tp = (Producto) productos.elementAt(x);\r\n bw.write(\"Nombre del producto: \" + p.getNombre() + \"\\n\"); \r\n bw.write(\"Codigo del producto: \" + p.getCodigo() + \"\\n\");\r\n bw.write(\"Tamaño del stock: \" + p.getStock() + \"\\n\");\r\n bw.write(\"Precio: \" + p.getPrecio() + \"\\n\");\r\n \r\n \r\n }\r\n //creamos un cliente auxiliar\r\n Cliente c;\r\n //mientas existan clientes se escribe lo siguiente en el archivo\r\n for(int x = 0; x < clientes.size(); x++){ \r\n \tc = (Cliente) clientes.elementAt(x);\r\n \t//impresiones de nombre,telefono,cantidad y total en el archivo\r\n bw.write(\"Nombre del cliente: \" + c.getname() + \"\\n\");\r\n bw.write(\"Numero de telefono: \" + c.getTelefono() + \"\\n\"); \r\n bw.write(\"Cantidad de compra: \" + c.getCantidad() + \"\\n\");\r\n bw.write(\"Total de compra: \" + c.getTotal() + \"\\n\");\r\n \r\n \r\n }\r\n // Cerrar archivo al finalizar\r\n bw.close();\r\n System.out.println(\"¡Archivo creado con éxito!\");\r\n //si no funciona imprime el error\r\n } catch(Exception ex){ \r\n System.out.println(ex);\r\n }\r\n }", "public interface ImportarPolizaDTO {\r\n\t\r\n\t/**\r\n\t * Execute.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @param idSector the id sector\r\n\t * @param idUser the id user\r\n\t * @return the poliza import DTO\r\n\t */\r\n\tPolizaImportDTO execute(PolizaImportDTO importDTO, Integer idSector, String idUser);\r\n\t\r\n\t/**\r\n\t * Export reports.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @param tipo the tipo\r\n\t * @return the poliza import DTO\r\n\t */\r\n\tPolizaImportDTO exportReports(PolizaImportDTO importDTO, String tipo);\r\n\t\r\n\t\r\n\t/**\r\n\t * Generate excel.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @return the poliza import DTO\r\n\t */\r\n\tPolizaImportDTO generateExcel(PolizaImportDTO importDTO);\r\n\t\r\n\t/**\r\n\t * Generate head.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @return the list\r\n\t */\r\n\tList<PolizaExcelDTO> generateHead(PolizaImportDTO importDTO);\r\n\t\r\n\t/**\r\n\t * Generate body.\r\n\t *\r\n\t * @param importDTO the import DTO\r\n\t * @return the list\r\n\t */\r\n\tList<PolizaBody> generateBody(PolizaImportDTO importDTO);\r\n\t\r\n\t/**\r\n\t * Gets the path.\r\n\t *\r\n\t * @param cvePath the cve path\r\n\t * @return the path\r\n\t */\r\n\tString getPath(String cvePath);\r\n\t\r\n\t/**\r\n\t * Gets the mes activo.\r\n\t *\r\n\t * @param idSector the id sector\r\n\t * @return the mes activo\r\n\t */\r\n\tList<String> getMesActivo(Integer idSector);\r\n\r\n}", "public void agregarMetadatos(UploadedFile ArticuloPDF, UploadedFile TablaContenidoPDF, UploadedFile cartaAprobacionPDF) throws IOException, GeneralSecurityException, DocumentException, PathNotFoundException, AccessDeniedException {\n MetodosPDF mpdf = new MetodosPDF();\n String codigoEst = this.pubEstIdentificador.getEstCodigo();\n String codigoFirma = mpdf.codigoFirma(codigoEst);\n codigoFirma = codigoFirma.trim();\n\n String nombreCartaAprob = \"Carta de Aprobacion-\" + codigoFirma;\n String nombrePublicacion = \"\";\n String nombreTablaC = \"Tabla de Contenido-\" + codigoFirma;\n\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"revista\")) {\n nombrePublicacion = this.revista.getRevTituloArticulo();\n\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"congreso\")) {\n nombrePublicacion = this.congreso.getCongTituloPonencia();\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"libro\")) {\n nombrePublicacion = this.libro.getLibTituloLibro();\n\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"capitulo_libro\")) {\n\n nombrePublicacion = this.capituloLibro.getCaplibTituloCapitulo();\n }\n\n\n /*Obtiene la ruta de la ubicacion del servidor donde se almacenaran \n temporalmente los archivos ,para luego subirlos al Gestor Documental OpenKm */\n String realPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\n // String destCartaAprob = realPath + \"WEB-INF\\\\temp\\\\Tabla de Contenido.pdf\";\n String destCartaAprob = realPath + \"WEB-INF\\\\temp\\\\\" + nombreCartaAprob + \".pdf\";\n String destArticulo = realPath + \"WEB-INF\\\\temp\\\\\" + nombrePublicacion + \".pdf\";\n // String destTablaC = realPath + \"WEB-INF\\\\temp\\\\Tabla de Contenido.pdf\";\n String destTablaC = realPath + \"WEB-INF\\\\temp\\\\\" + nombreTablaC + \".pdf\";\n\n\n /* Estampa de Tiempo\n Obtiene el dia y hora actual del servidor para posteriormente adicionarlo\n como Metadato en el documento PDF/A y el Gestor Documental*/\n Date date = new Date();\n DateFormat datehourFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n String estampaTiempo = \"\" + datehourFormat.format(date);\n\n this.setPubFechaRegistro(date);\n\n /* Metodo para almacenar los metadatos de la Carte de Aprobacion , Articulo y Tabla de Contenido \n para almacenarlo en formato PDFA */\n ArrayList<tipoPDF_cargar> subidaArchivos = new ArrayList<>();\n\n /* tipoPDF_cargar cartaAprobacion = new tipoPDF_cargar();\n cartaAprobacion.setNombreArchivo(nombreCartaAprob);\n cartaAprobacion.setRutaArchivo(destCartaAprob);\n cartaAprobacion.setTipoPDF(\"cartaAprobacion\");\n cartaAprobacion.setArchivoIS(cartaAprobacionPDF.getInputstream());\n subidaArchivos.add(cartaAprobacion); */\n if (!cartaAprobacionPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar cartaAprobacion = new tipoPDF_cargar();\n cartaAprobacion.setNombreArchivo(nombreCartaAprob);\n cartaAprobacion.setRutaArchivo(destCartaAprob);\n cartaAprobacion.setTipoPDF(\"cartaAprobacion\");\n cartaAprobacion.setArchivoIS(cartaAprobacionPDF.getInputstream());\n subidaArchivos.add(cartaAprobacion);;\n }\n\n if (!ArticuloPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar articulo = new tipoPDF_cargar();\n articulo.setNombreArchivo(nombrePublicacion);\n articulo.setRutaArchivo(destArticulo);\n articulo.setTipoPDF(\"tipoPublicacion\");\n articulo.setArchivoIS(ArticuloPDF.getInputstream());\n subidaArchivos.add(articulo);\n }\n if (!TablaContenidoPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar tablaContenido = new tipoPDF_cargar();\n tablaContenido.setNombreArchivo(nombreTablaC);\n tablaContenido.setRutaArchivo(destTablaC);\n tablaContenido.setTipoPDF(\"tablaContenido\");\n tablaContenido.setArchivoIS(TablaContenidoPDF.getInputstream());\n subidaArchivos.add(tablaContenido);\n }\n\n CrearPDFA_Metadata(subidaArchivos, estampaTiempo);\n\n String hash = mpdf.obtenerHash(destArticulo);\n\n /* Metodo para almacenar en el Gestor Documental(OPENKM), carta de aprobacion,\n el articulo en formato PDFA y la Tabla de Contenido del Articulo (formato PDFA) */\n // SubirOpenKM(rutasArchivos, nombreArchivos, estampaTiempo, codigoFirma, hash);\n SubirOpenKM(subidaArchivos, estampaTiempo, codigoFirma, hash);\n }", "public void arquivoSaida() {\r\n\r\n try {\r\n File file = new File(\"arquivoSaida.txt\");\r\n try (FileWriter arquivoSaida = new FileWriter(file, true)) {\r\n arquivoSaida.write(\"Rota do menor caminho entre as cidades escolhidas: \\n\\n\");\r\n Vertice v;\r\n \r\n //Escreve no arquivo a rota de ida de entrega nas cidades\r\n for (int i = 0; i < rota.getLista_de_rota().size() - 1; i++) {\r\n for (int j = 0; j < rota.getLista_de_rota().get(i).size(); j++) {\r\n v = rota.getLista_de_rota().get(i).get(j);\r\n arquivoSaida.write(v.getId() + \"; \");\r\n }\r\n }\r\n \r\n arquivoSaida.write(\"\\n\\nRota do menor caminho de volta: (Considerando que não há mais nenhuma entrega)\\n\\n\");\r\n // pegando a ultima posição da lista geral em que está a lista do menor caminho de volta\r\n int t = rota.getLista_de_rota().size() - 1; \r\n \r\n //Escreve a rota do caminho de volta, verificando a distancia entre a cidade origem e a cidade destino\r\n for (int j = rota.getLista_de_rota().get(t).size() - 1; j >= 0; j--) {\r\n v = (Vertice) rota.getLista_de_rota().get(t).get(j);\r\n arquivoSaida.write(v.getId() + \"; \");\r\n }\r\n arquivoSaida.write(\"Distancia percorrida: \"+rota.getDistancia()+\"\\n\");\r\n arquivoSaida.close();\r\n }\r\n } catch (IOException ex) { //caso nao seja possivel abrir algum dos arquivos\r\n System.out.println(\"Não foi possivel abrir arquivo\");\r\n }\r\n }", "public FileObject process(FileObject fileObject) {\n\t\tlastFileIn = new File(fileObject.getFile().getAbsolutePath());\n\t\tlastTimeIn = System.currentTimeMillis();\n\t\tif ( (fileObject instanceof DicomObject)\n\t\t\t\t&& (scriptFile != null)\n\t\t\t\t\t&& ((DicomObject)fileObject).isImage() ) {\n\t\t\tFile file = fileObject.getFile();\n\t\t\tgetScript();\n\t\t\tif (script != null) {\n\t\t\t\tSignature signature = script.getMatchingSignature((DicomObject)fileObject);\n\t\t\t\tlog(fileObject, signature);\n\t\t\t\tif (signature != null) {\n\t\t\t\t\tRegions regions = signature.regions;\n\t\t\t\t\tif ((regions != null) && (regions.size() > 0)) {\n //logger.info(name+\": regions=\"+regions+\"\\n\");\n //logger.info(name+\": file=\"+file+\"\\n\");\n\n \n\t\t\t\t\t\tAnonymizerStatus status = DicomOverlayPixelAnonymizer.anonymize(file, file, regions, test);\n\t\t\t\t\t\tif (status.isOK()) {\n //logger.info(name+\": status=isOK: \"+status+\"\\n\");\n\t\t\t\t\t\t\tfileObject = FileObject.getInstance(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (status.isQUARANTINE()) {\n //logger.info(name+\": status=isQUARANTINE\\n\");\n\t\t\t\t\t\t\tif (quarantine != null) quarantine.insert(fileObject);\n\t\t\t\t\t\t\tlastFileOut = null;\n\t\t\t\t\t\t\tlastTimeOut = System.currentTimeMillis();\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (status.isSKIP()) {\n\t\t\t\t\t\t //logger.info(name+\": status=isSKIP\\n\");\n\t\t\t\t\t\t}; //keep the input object\n \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlastFileOut = new File(fileObject.getFile().getAbsolutePath());\n\t\tlastTimeOut = System.currentTimeMillis();\n\t\treturn fileObject;\n\t}", "@Override\n\tpublic AggiornaModificaImportoMovimentoGestioneEntrataResponse aggiornaModificaImportoMovimentoGestioneEntrata(AggiornaModificaImportoMovimentoGestioneEntrata request) {\n\t\treturn null;\n\t}", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic ResponsePersist persist(Produto entity, ProdutoService service, Object role, MultipartFile file) {\n\t\treturn null;\n\t}", "public void incluirAtorNoFilme(Filme filme, Ator ator) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Iniciar a transação\r\n gerenciador.getTransaction().begin();\r\n\r\n //sincronizar com o BD para tornar o status managed\r\n filme = gerenciador.merge(filme);\r\n \r\n //Adicionar o ator\r\n filme.getAtores().add(ator);\r\n\r\n //Commit na transação\r\n gerenciador.getTransaction().commit();\r\n \r\n }", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "public InventarioFile(){\r\n \r\n }", "boolean hasRetrieveFile();", "private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.AddFilesToUser param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.AddFilesToUser.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }", "@Override\n\tpublic ResponsePersist persist(Produto entity, ProdutoService service, List<?> objects, Object role,\n\t\t\tMultipartFile file) {\n\t\treturn null;\n\t}", "public String uploadFile(UploadedFile file) {\n String fileName = (file.getFileName());\r\n System.out.println(\"***** fileName: \" + file.getFileName());\r\n \r\n System.out.println(System.getProperty(\"os.name\"));\r\n String basePath = \"C:\" + File.separator + \"aquivosCI\" + File.separator;\r\n System.out.println(\"BasePath: \" + basePath);\r\n File outputFilePath = new File(basePath + fileName);\r\n\r\n// Copy uploaded file to destination path\r\n InputStream inputStream = null;\r\n OutputStream outputStream = null;\r\n try {\r\n inputStream = file.getInputstream();\r\n outputStream = new FileOutputStream(outputFilePath);\r\n\r\n int read = 0;\r\n final byte[] bytes = new byte[1024];\r\n while ((read = inputStream.read(bytes)) != -1) {\r\n outputStream.write(bytes, 0, read);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n\r\n } finally {\r\n if (outputStream != null) {\r\n try {\r\n outputStream.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ComunicacaoInternaMB.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (inputStream != null) {\r\n try {\r\n inputStream.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ComunicacaoInternaMB.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return outputFilePath.getAbsolutePath(); // return to same page\r\n }", "@Override\n public void incluir(Colaborador objeto)throws Exception {\n try {\n System.out.println(\"Estou Gravando no Arquivo\" + nomeDoArquivoNoDisco);\n FileWriter fw = new FileWriter(nomeDoArquivoNoDisco, true);\n //Criar o buffer do arquivo\n BufferedWriter bw = new BufferedWriter(fw);\n //Escreve no arquivo\n bw.write(objeto.toString() + \"\\n\");\n //Fechar o arquivo\n bw.close();\n } catch (Exception erro) {\n throw erro;\n }\n }", "public Bufer buscandoArchivo(String ruta, String archivo) throws SOAPFaultException, SOAPException{\n traza.trace(\"buscar archivo\", Level.INFO);\n traza.trace(\"archivo \"+archivo, Level.INFO);\n traza.trace(\"ruta \"+ruta, Level.INFO);\n Bufer resp = null;\n try {\n resp = buscarBuferArchivo(ruta, archivo);\n } catch (Exception ex) {\n traza.trace(\"archivo no encontrado\", Level.ERROR, ex);\n }\n return resp;\n }", "public void criarArquivo(String nomeArquivo) {\n try {\n metodos.criarArquivo(nomeArquivo);\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static Card dohvatiPozadinu(){\r\n\t\tFile dir = new File(\"images\");\r\n\t\tFile[] lista = dir.listFiles();\r\n\t\tCard kartaPozadine = null;\r\n\t\tfor (File file : lista){\r\n\t\t\tif (file.isFile()){\r\n\t\t\t\tif (file.toString().contains(\"pozadina_0.gif\")){\r\n\t\t\t\t\tString[] niz = file.getName().toString().split(\"\\\\.\");\r\n\t\t\t\t\tkartaPozadine =new Card(new ImageIcon(file.toString()),0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn kartaPozadine;\r\n\t}", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void gerarCupom(String cliente, String vendedor,List<Produto> produtos, float totalVenda ) throws IOException {\r\n \r\n File arquivo = new File(\"cupomFiscal.txt\");\r\n String produto =\" \"; \r\n if(arquivo.exists()){\r\n System.out.println(\"Arquivo localizado com sucessso\");\r\n }else{\r\n System.out.println(\"Arquivo não localizado, será criado outro\");\r\n arquivo.createNewFile();\r\n } \r\n \r\n for(Produto p: produtos){\r\n produto += \" \"+p.getQtd()+\" \"+ p.getNome()+\" \"+p.getMarca()+\" \"+ p.getPreco()+\"\\n \";\r\n }\r\n \r\n \r\n \r\n FileWriter fw = new FileWriter(arquivo, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n \r\n \r\n bw.write(\" \"+LOJA);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"CLIENTE CPF\");\r\n bw.newLine();\r\n bw.write(cliente);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(DateCustom.dataHora());\r\n bw.newLine();\r\n bw.write(\" CUPOM FISCAL \");\r\n bw.newLine();\r\n bw.write(\"QTD DESCRIÇÃO PREÇO\");\r\n bw.newLine();\r\n bw.write(produto);\r\n bw.newLine(); \r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"TOTAL R$ \" + totalVenda);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"Vendedor \" + vendedor);\r\n bw.newLine();\r\n bw.newLine();\r\n bw.close();\r\n fw.close();\r\n }", "public Arquivo getArquivo() {\n\t\treturn arquivo;\n\t}", "private File createDestinationFile() {\n\t\tSystem.out.print(\"Please enter the name of the output file that will be created to hold the modified/correct inventory: \");\n\t\tString fileName = sc.nextLine();\n\t\tFile file = new File(fileName);\n\t\twhile (file.exists()) {\n\t\t\tSystem.out.println(\"----->A file with the name of \\\"\" + fileName + \"\\\" [size = \" + file.length() + \" bytes; path = \" + file.getAbsolutePath() + \"] already exists.<-----\");\n\t\t\tSystem.out.print(\"Please input a new file name: \");\n\t\t\tfileName = sc.nextLine();\n\t\t\tfile = new File(fileName);\n\t\t}\n\t\treturn file;\n\t}", "private void createCatalogFileIfNoneExists(){\n\t\t\n\t\tinOut = new IOUtility();\n\t\t\n\t\tif (inOut.checkLocalCache()) {\n\t\t\tcatalog = inOut.readCatalogFromFile();\n\t\t}\n\n\t\telse {\n\n\t\t\ttry {\n\t\t\t\tinOut.createCatalogFile();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t} \n\t\t}\n\t\t\n\t}", "private String compactaOrdem(File ordem, String[] arquivosCaixa) throws IOException\n\t{\n\t\t/* Define referencias aos streams de arquivos a serem utilizados */\n\t\t/* Buffer a ser utilizado para leitura dos arquivos de caixa */\n\t\tBufferedInputStream buffOrigem \t= null;\n\t\t/* Esta referencia e do arquivo final (zip) do processo */\n\t\tFileOutputStream \tarqDestino \t= new FileOutputStream(getNomeArquivoCompactado(ordem));\n\t\tZipOutputStream \tarqSaida \t= new ZipOutputStream (new BufferedOutputStream(arqDestino));\n\n\t\t/* Define o buffer de dados com o tamanho sendo definido no\n\t\t * arquivo de configuracao\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tbyte data[] = new byte[sizeBuffer];\n\n\t\tString extArqCriptografado = getPropriedade(\"ordemVoucher.extensaoArquivoCriptografado\");\n\t\t\n\t\t/* Faz a varredura dos arquivos de caixa que serao utilizados\n\t\t * para a compactacao. Lembrando que o nome e o mesmo do arquivo da\n\t\t * ordem com a extensao pgp devido ao utilitario de criptografia\n\t\t */\n\t\tSystem.out.println(\"Iniciando compactacao para o arquivo:\"+getNomeArquivoCompactado(ordem));\n\t\tfor (int i=0; i<arquivosCaixa.length; i++) \n\t\t{\n\t\t\tString nomArqOrigem\t\t\t= arquivosCaixa[i] + extArqCriptografado;\n\t\t\tSystem.out.println(\"Incluindo arquivo de ordem \"+nomArqOrigem+\" no arquivo compactado...\");\n\n\t\t\tFile arquivoOrigem\t\t\t= new File(nomArqOrigem);\n\t\t\tFileInputStream fileInput \t= new FileInputStream(arquivoOrigem);\n\t\t \tbuffOrigem \t\t\t\t\t= new BufferedInputStream(fileInput, sizeBuffer);\n\t\t \tZipEntry entry \t\t\t\t= new ZipEntry(arquivoOrigem.getName());\n\t\t \tarqSaida.putNextEntry(entry);\n\t\t \tint count;\n\t\t\twhile((count = buffOrigem.read(data, 0, sizeBuffer)) != -1) \n\t\t\t arqSaida.write(data, 0, count);\n\t\t\t \n\t\t buffOrigem.close();\n\t\t}\n\t\tarqSaida.close();\n\t\tSystem.out.println(\"Termino da compactacao do arquivo.\");\t\n\t\treturn getNomeArquivoCompactado(ordem); \n\t}", "String prepareFile();", "@Get\r\n\tpublic Representation getFile() throws Exception {\n\r\n\t\tString remainPart = StringUtil.split(getRequest().getResourceRef().getRemainingPart(), \"?\")[0];\r\n\t\tFile file = getAradon().getGlobalConfig().plugin().findPlugInFile(MyConstants.PLUGIN_ID, \"jminix/js/\" + remainPart ) ;\r\n\t\t\r\n\t\tif (! file.exists()) throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, getRequest().getResourceRef().getPath()) ; \r\n\r\n\t\tMediaType mtype = getMetadataService().getMediaType(StringUtil.substringAfterLast(file.getName(), \".\")) ;\r\n\t\tif (mtype == null) mtype = MediaType.ALL ; \r\n\t\t\r\n\t\tfinal FileRepresentation result = new FileRepresentation(file, mtype);\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic Pizza crearPizza(FactoriaIngredientes fi) {\n\t\treturn null;\n\t}", "private File loadFile() throws IOException {\r\n File file = new File(filePath);\r\n if (!file.exists()) {\r\n File dir = new File(fileDirectory);\r\n dir.mkdir();\r\n File newFile = new File(filePath);\r\n newFile.createNewFile();\r\n return newFile;\r\n } else {\r\n return file;\r\n }\r\n }", "private void createRecipeFromFile() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers,\n // it would be \"*/*\".\n intent.setType(\"*/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public void upload() throws ServicioException {\n if (justificacionHelper.getArchivoCargado() != null) {\n if (justificacionHelper.getArchivoCargado().getContentType().equals(\"application/pdf\")) {\n ParametroGlobal buscarParametroGlobalPorNemonico =\n administracionServicio.buscarParametroGlobalPorNemonico(\n ParametroGlobalEnum.TAMANIO_MAXIMO_PDF.getCodigo());\n if (justificacionHelper.getArchivoCargado().getSize()\n > buscarParametroGlobalPorNemonico.getValorNumerico().longValue()) {\n mostrarMensajeEnPantalla(\"El tamaño del archivo supera los \"\n + (buscarParametroGlobalPorNemonico.getValorNumerico().longValue() / 1024) + \" MB\",\n FacesMessage.SEVERITY_WARN);\n justificacionHelper.setArchivoRequerido(Boolean.TRUE);\n justificacionHelper.setArchivoCargado(null);\n } else {\n mostrarMensajeEnPantalla(\"ec.gob.mrl.smp.justificacionReglas.archivoCargadoCorrectamente\",\n FacesMessage.SEVERITY_INFO);\n justificacionHelper.setArchivoRequerido(Boolean.FALSE);\n System.out.println(\"Archivo Cargado \" + justificacionHelper.getArchivoCargado().getFileName());\n }\n } else {\n mostrarMensajeEnPantalla(\"ec.gob.mrl.smp.justificacionReglas.archivoCargadoNoesPDF\",\n FacesMessage.SEVERITY_ERROR);\n justificacionHelper.setArchivoRequerido(Boolean.TRUE);\n justificacionHelper.setArchivoCargado(null);\n }\n\n }\n }", "@Override\r\n\tpublic Transaction getDeliveryImageInfo(File file) throws Exception {\n\t\treturn null;\r\n\t}", "private boolean renomeiaArquivo(File origem, File destino)\n\t{\n\t\t// Tenta executar o renameTo da classe File. Caso o destino seja em filesystem diferente entao\n\t\t// este comando ira falhar, portanto realiza a copia do arquivo, executa o delete para entao\n\t\t// retornar a funcao\n\t\tboolean renomeou = origem.renameTo(destino);\n\t\t// Se o comando falhou entao tenta copiar e apagar o arquivo\n\t\tif (!renomeou)\n\t\t{\n\t\t\trenomeou = copiaArquivo(origem,destino);\n\t\t\t// Caso tenha conseguido copiar o arquivo origem para o destino, entao remove o arquivo\n\t\t\t// origem. Simulacao do move.\n\t\t\tif (renomeou)\n\t\t\t\trenomeou = origem.delete();\n\t\t}\n\t\treturn renomeou;\n\t}", "public boolean fExists(){\n \n try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))){\n \n }\n catch (FileNotFoundException e){\n System.out.println(\"File not found\");\n return false;\n }\n catch (IOException e){\n System.out.println(\"Another exception\");\n return false;\n }\n\n return true;\n }", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "public static void existeFichero(){\n File fichero = new File(\"config.ser\");\n\n try{\n\n if (fichero.exists()) {\n recuperarFecha();\n }\n else {\n fichero.createNewFile();\n }\n }catch(IOException ex){\n System.out.println(\"Excepcion al crear el fichero: \" + ex);\n }\n\n }", "@Override\r\n public String createSubDocument(File file, List<FirstElement> partElement) {\n return null;\r\n }", "public Polipara() {\n // Iniciar el programa cargando el archivo de propiedades si existe.\n\n if (this.validarSerializacion()) {\n int response = JOptionPane.showConfirmDialog(null, \"Hay una versión anterior de una copa,\\n\"\n + \"¿Desea cargar esa versión? (Al seleccionar \\\"No\\\", se eliminará el avance anterior y se cargará una copa nueva.)\");\n if (response == 0) {\n this.cargarSerializacion();\n } else {\n this.iniciarCopa();\n }\n } else {\n this.iniciarCopa();\n }\n }", "private static void createFileContribuicaoUmidade() throws IOException{\r\n\t\tInteger contribuicaoDefault = 0;\r\n\t\tarqContribuicaoUmidade = new File(pathContribuicaoUmidade);\r\n\t\tif(!arqContribuicaoUmidade.exists()) {\r\n\t\t\tarqContribuicaoUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqContribuicaoUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(contribuicaoDefault.toString() + String.valueOf('\\n'));\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {//Se arquivo existir\r\n\t\t\tFileReader fr = new FileReader(getArqContribuicaoUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio(modificado)*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqContribuicaoUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(contribuicaoDefault.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma contribuicao Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}", "@Override\n public IRemoteFileTransfer addSentFileTransfer(FileStructForBinder file)\n throws RemoteException {\n Logger.v(TAG, \"addSentFileTransfer() file = \" + file\n + \"fileTransferTag is \" + file.mFileTransferTag);\n PluginChatWindowFileTransfer pluginChatWindowFileTransfer =\n new PluginChatWindowFileTransfer(\n file, PluginUtils.OUTBOX_MESSAGE, mContactString);\n Long fileTransferIdInMms;\n if (mNewGroupCreate) {\n if (ThreadTranslater.tagExistInCache(mContactString)) {\n Logger.d(TAG, \"addSentMessage() Tag exists\" + mContactString);\n Long thread = ThreadTranslater.translateTag(mContactString);\n PluginUtils.insertThreadIDInDB(thread, mSubject);\n }\n mNewGroupCreate = false;\n }\n String fileTransferString = PluginUtils\n .getStringInRcse(R.string.file_transfer_title);\n int ipMsgId = PluginUtils.findFTIdInRcseDb(file.mFileTransferTag);\n fileTransferIdInMms = PluginUtils.insertDatabase(fileTransferString,\n mContactString, Integer.MAX_VALUE, PluginUtils.OUTBOX_MESSAGE);\n pluginChatWindowFileTransfer.initIpMessageInCache();\n pluginChatWindowFileTransfer.storeInCache(fileTransferIdInMms);\n Logger.d(TAG, \"addSentFileTransfer(), pluginChatWindowFileTransfer = \"\n + pluginChatWindowFileTransfer);\n return pluginChatWindowFileTransfer;\n }", "private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}", "protected FileObject getUniqueFile(Connection connection, FtpSession session, FileObject oldFile) throws FtpException {\n FileObject newFile = oldFile;\n FileSystemView fsView = session.getFileSystemView();\n String fileName = newFile.getFullName();\n while( newFile.doesExist() ) {\n newFile = fsView.getFileObject(fileName + '.' + System.currentTimeMillis());\n if(newFile == null) {\n break;\n }\n }\n return newFile;\n }", "public String upload() throws FileNotFoundException, IOException{\n FileOutputStream fout=new FileOutputStream(\"/tmp/mi_archivo\");\n int read=0;\n byte[] data=new byte[1024];\n InputStream in = archivo.getInputStream();\n\n while((read = in.read(data)) != -1){\n fout.write(data, 0, read);\n }\n\n return \"\";\n }", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "public String call() throws IOException {\n try {\n p2c.readAndWriteFile(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public DatosIntercambio subirFichero(String nombreFichero,int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\n \t//AQUI HACE FALTA CONOCER LA IP PUERTO DEL ALMACEN\n \t//Enviamos los datos para que el servicio Datos almacene los metadatos \n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \t\n \t//aqui deberiamos haber combropado un mensaje de error si idCliente < 0 podriamos saber que ha habido error\n int idCliente = datos.almacenarFichero(nombreFichero,idSesionCliente);\n int idSesionRepo = datos.dimeRepositorio(idCliente);//sesion del repositorio\n Interfaz.imprime(\"Se ha agregado el fichero \" + nombreFichero + \" en el almacen de Datos\"); \n \n //Devolvemos la URL del servicioClOperador con la carpeta donde se guardara el tema\n DatosIntercambio di = new DatosIntercambio(idCliente , \"rmi://\" + direccionServicioClOperador + \":\" + puertoServicioClOperador + \"/cloperador/\"+ idSesionRepo);\n return di;\n }", "public void imprimirResultados(int fo,File archivoResultados,Ruteo r){\n\t\tint numo=0;\n\t\tfor(int i=0;i<r.rutas.size();i++){\n\t\t\tRuta ruta=r.rutas.get(i);\n\t\t\tnumo+=ruta.obras.size()-2;\n\t\t}\n\t\tdistanciaTotalRecorrida=darDistanciaTotal(r);\n\t\ttiempoComputacionalTotal=darTiempoTotal();\n\t\ttry{\n\t\tFileWriter fw = new FileWriter(archivoResultados.getAbsoluteFile());\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tbw.write(\" GRASP + SET COVERING \");\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tif(fo==FO1){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar Costos\");\n\t\t}else if(fo==FO2){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el maximo tiempo de las rutas\");\n\t\t}else if(fo==FO3){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el numero de rutas\");\t\n\t\t}else if(fo==FO4){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el tiempo\");\n\t\t}\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tbw.write(\"Distancia total recorrida por todos los interventores: \"+distanciaTotalRecorrida);\n\t\tbw.newLine();\n\t\tbw.write(\"Numero obras: \"+numo);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional de GRASP + Set Covering: \"+tiempoComputacionalTotal);\n\t\tbw.newLine();\n\t\tbw.write(\"Numero de iteraciones de GRASP: \"+k);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional promedio de una iteración de GRASP: \"+tiempoComputacionalIterGrasp);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional del Set Covering: \"+tiempoComputacionalSetCovering);\n\t\tbw.newLine();\t\n\t\tbw.write(\"FO: \"+objval);\n\t\tbw.newLine();\t\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"************************* RUTAS *********************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tfor(int i=0;i<r.rutas.size();i++){\n\t\t\tRuta ruta=r.rutas.get(i);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\"---------------INFORMACION RUTA \"+(i+1)+\":\");\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Id: \"+(i+1));\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Dias de recorrido: \"+ruta.diasRecorrido/24.0);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Dias de descanso: \"+ruta.diasDescanso/24.0);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Cantidad de obras: \"+(ruta.obras.size()-2));\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Costo por recorrido: \"+ruta.costoRecorrido);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Costo por descanso: \"+ruta.costoDescanso);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * OBRAS: \");\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" \"+ruta.obras.toString());\n\t\t}\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"************************* FIN RUTAS *****************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.close();\n\t\t\n\t\tJOptionPane.showMessageDialog (null, \"El archivo se guardo con los parametros satisfactoriamente.\", \"Archivo Guardado\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception ee){\n\t\t\tJOptionPane.showMessageDialog (null, \"No se llevó a cabo la simulación.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t}", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "@Override\r\n\tpublic void gerarExtratoDetalhado(Conta conta) {\n\t\t\r\n\t\tDate agora = new Date();\r\n\r\n\t\tSystem.out.println(\"\\nData: \" + sdf.format(agora));\r\n\t\tSystem.out.println(\"\\nConta: \" + conta.getNumero());\r\n\t\tSystem.out.println(\"\\nAgencia: \" + conta.getAgencia().getNumero());\r\n\t\tSystem.out.println(\"\\nCliente: \" + conta.getCliente().getNome());\r\n\t\tSystem.out.println(\"\\nSaldo: R$\" + df.format(conta.getSaldo()));\r\n\t\tSystem.out.println(\"\\nTaxa Rendimento: \" + df.format(taxaRendimento) + \"%\");\r\n\t}", "public File preProcessFile(InputStream in) throws IOException {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tLOG.info(\"BIOPAX Conversion started \"\n\t\t\t\t+ sdf.format(Calendar.getInstance().getTime()));\n\n\t\tif (in == null) {\n\t\t\tthrow new IllegalArgumentException(\"Input File: \" + \" is not found\");\n\t\t}\n\n\t\tSimpleIOHandler simpleIO = new SimpleIOHandler(BioPAXLevel.L3);\n\n\t\t// create a Paxtools Model from the BioPAX L3 RDF/XML input file (stream)\n\t\torg.biopax.paxtools.model.Model model = simpleIO.convertFromOWL(in);\n\t\t// - and the input stream 'in' gets closed inside the above method call\n\n\t\t// set for the IO to output full URIs:\n\n\t\tsimpleIO.absoluteUris(true);\n\n\t\tFile fullUriBiopaxInput = File.createTempFile(\"paxtools\", \".owl\");\n\n\t\tfullUriBiopaxInput.deleteOnExit(); // delete on JVM exits\n\t\tFileOutputStream outputStream = new FileOutputStream(fullUriBiopaxInput);\n\n\t\t// write to an output stream (back to RDF/XML)\n\n\t\tsimpleIO.convertToOWL((org.biopax.paxtools.model.Model) model,\toutputStream); // it closes the stream internally\n\n\t\tLOG.info(\"BIOPAX Conversion finished \" + sdf.format(Calendar.getInstance().getTime()));\n\t\treturn fullUriBiopaxInput;\n\t}", "public static void validating(String interfaceOriginal, String foliosFaltantes, String salida) throws Exception{\n\t\t\n\t\tFileInputStream fStream = null;\t\t\n\t\tDataInputStream dInput = null;\n\t\tBufferedReader bReader = null;\n\t\t\n\t\tFileInputStream fStream2 = null;\t\t\n\t\tDataInputStream dInput2 = null;\n\t\tBufferedReader bReader2 = null;\n\t\t\n\t\tFile fileError = null;\n\t\tFileOutputStream salidaError = null;\n\t\t\n\t\t\n\t\tfStream = new FileInputStream(interfaceOriginal);\t\t\t\n\t\tdInput = new DataInputStream(fStream);\n\t\tbReader = new BufferedReader(new InputStreamReader(dInput));\n\t\t\n\t\tfileError = new File(salida);\n\t\tsalidaError = new FileOutputStream(fileError);\n\t\t\t\t\t\n\t\tint counterLine=0;\n\t\tString line = null;\n\t\tString line2 = null;\n\t\tString line01Tmp = null;\n\t\tint fAbierto=0;\n\t\tint fR11=0;\n\t\tint fExiste=0;\n\t\t//System.out.println(\"substring: \" + \"02|0101010|\".subSequence(0, 3));\n\t\t//int nFaltantes = Integer.parseInt(nFoliosFaltantes);\n\t\t//List<String> nosellados = new ArrayList<String>();\n\t\t\n\t\tHashMap<String, String> hashNoSellados= new HashMap<String, String>();\n\t\t\n\t\tfStream2 = new FileInputStream(foliosFaltantes);\t\t\t\n\t\tdInput2 = new DataInputStream(fStream2);\n\t\tbReader2 = new BufferedReader(new InputStreamReader(dInput2));\n\t\t\n\t\twhile((line2 = bReader2.readLine()) != null){\n\t\t\t//nosellados.add(line2);\t\t\t\t\n\t\t\thashNoSellados.put(line2, line2);\n\t\t}\n\t\t///////////////////////////////////////////////////\n\t\t//FileOutputStream fileX = new FileOutputStream(new File(path + \"salidaX.txt\"));\n\t\t//long counter = 0;\n\t\tint counterFaltantes = 0;\n\t\tboolean exit=false;\n\t\twhile(((line = bReader.readLine()) != null) && !exit){\n\t\t\t//fileX.write(String.valueOf(counter).getBytes());\n\t\t\t//counter++;\n\t\t\tif(line.length() >= 3){\n\t\t\t\tif(line.substring(0, 3).equals(\"01|\")){\n\t\t\t\t\tline01Tmp = line;\n\t\t\t\t\tif(fAbierto == 1){\n\t\t\t\t\t\tfAbierto=0;\n\t\t\t\t\t\tfR11=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(counterFaltantes == hashNoSellados.size()){\t\t\t\t\t\t\t\n\t\t\t\t\t\texit = true;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(line.substring(0, 3).equals(\"02|\")){\n\t\t\t\t\t\tfExiste=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tString [] strValues = line.split(\"\\\\|\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(hashNoSellados.containsKey(strValues[4].trim())){\n\t\t\t\t\t\t\tfExiste=1;\n\t\t\t\t\t\t\tcounterFaltantes++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*for(int index=0; index<nosellados.size(); index++){\n\t\t\t\t\t\t\tint lenVal1=nosellados.get(index).length();\n\t\t\t\t\t\t\tint lenTotal=lenVal1+lenVal1+18;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(line.length() >= lenTotal){\n\t\t\t\t\t\t\t\tif(line.substring(0, lenTotal).equals(\"02|I|\" + nosellados.get(index) + \"2014-07-31||\" + nosellados.get(index) + \"|\")){\n\t\t\t\t\t\t\t\t\tfExiste=1;\n\t\t\t\t\t\t\t\t\tcounterFaltantes++;\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\tif(fAbierto == 0){\n\t\t\t\t\t\t\tif(fExiste == 1){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*sbLogError.append(line01Tmp + \"\\r\\n\");\n\t\t\t\t\t\t\t\tsbLogError.append(line + \"\\r\\n\");*/\n\t\t\t\t\t\t\t\tsalidaError.write((line01Tmp + \"\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\t\tsalidaError.write((line + \"\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\t\tfAbierto=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(fAbierto == 1){\n\t\t\t\t\t\t\tif(fR11 == 0){\n\t\t\t\t\t\t\t\tif(\"11|\".equals(line.substring(0, 3))){\n\t\t\t\t\t\t\t\t\tfR11=1;\n\t\t\t\t\t\t\t\t\t//sbLogError.append(line + \"\\r\\n\");\n\t\t\t\t\t\t\t\t\tsalidaError.write((line + \"\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//sbLogError.append(line + \"\\r\\n\");\n\t\t\t\t\t\t\t\t\tsalidaError.write((line + \"\\r\\n\").getBytes(\"UTF-8\"));\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\tif(\"11|\".equals(line.substring(0, 3))){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//sbLogError.append(line + \"\\r\\n\");\n\t\t\t\t\t\t\t\t\tsalidaError.write((line + \"\\r\\n\").getBytes(\"UTF-8\"));\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tfAbierto=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tcounterLine+=1;\n\t\t}\n\t\t//fileX.close();\n\t\t//System.out.println(sbLogError.toString());\n\t\t//salidaError.write((sbLogError.toString() + \"\\r\\n\").getBytes(\"UTF-8\"));\n\t\tSystem.out.println(\"numero de lineas: \" + counterLine);\n\t\t\n\t\t\t\n\t\tif(salidaError != null)\n\t\t\tsalidaError.close();\n\t\t\n\t\tif(bReader != null)\n\t\t\tbReader.close();\n\t\t\n\t\tif(dInput != null)\n\t\t\tdInput.close();\n\t\t\n\t\tif(fStream != null)\n\t\t\tfStream.close();\n\t\t\n\t\tif(bReader2 != null)\n\t\t\tbReader2.close();\n\t\t\n\t\tif(dInput2 != null)\n\t\t\tdInput2.close();\n\t\t\n\t\tif(fStream2 != null)\n\t\t\tfStream2.close();\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n public void testDERIVATIVE_EXTRACT_CRC___() throws IOException {\n \n\t Configuration.CRC=true;\n\t Configuration.EXTRACT=true;\n\t Configuration.DERIVATIVE_EXTRACT_CRC=true;\n\t Configuration.COMPRESS=true;\n if(Configuration.CRC && Configuration.EXTRACT && Configuration.DERIVATIVE_EXTRACT_CRC && Configuration.COMPRESS) {\n \n ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(new File(\n homeDir + \"/files/Teste.txt.zip\")));\n zos.putNextEntry(new ZipEntry(homeDir + \"/files/Teste.txt.zip\"));\n zos.write(new byte[32]);\n ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(\n homeDir + \"/files/Teste.txt.zip\")));\n ZipEntry ze = zis.getNextEntry();\n assertTrue(ze != null);\n zis.available();\n zos.close();\n }\n }", "private String importExcelPromotionNew() {\n\t\ttry{\n\t\t\tList<List<String>> infoPromotion = new ArrayList<>();\n\t\t\tList<List<String>> infoPromotionDetail = new ArrayList<>();\n\t\t\tList<List<String>> infoPromotionShop = new ArrayList<>();\n\t\t\t\n\t\t\tList<CellBean> infoPromotionError = new ArrayList<>();\n\t\t\tList<CellBean> infoPromotionDetailError = new ArrayList<>();\n\t\t\tList<CellBean> infoPromotionShopError = new ArrayList<>();\n\t\t\tList<PromotionImportNewVO> promotionImportNewErrorVOs = null;\n\t\t\t\n\t\t\tgetDataImportExcelPromotion(infoPromotion, infoPromotionDetail, infoPromotionShop, infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t// xu ly xuất lỗi\n\t\t\tif (infoPromotionError.size() > 0 || infoPromotionDetailError.size() > 0 || infoPromotionShopError.size() > 0) {\n\t\t\t\treturn WriteFileError(infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t}\n\t\t\t\n\t\t\tpromotionImportNewErrorVOs = new ArrayList<>();\n\t\t\tList<PromotionImportNewVO> promotionImportNewVOs = convertDataImportExcelPromotion(infoPromotion, infoPromotionDetail, infoPromotionShop, infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\tif(promotionImportNewVOs != null && promotionImportNewVOs.size() > 0) {\n\t\t\t\t// bỏ những CT k hợp le và những CT nằm ngoài các ZV cần xử lý\n\t\t\t\tpromotionImportNewVOs = validatePromotionImport(promotionImportNewVOs, promotionImportNewErrorVOs);\n\t\t\t}\n\t\t\t// sap xep lại cac mức cho CTKM\n\t\t\tpromotionImportNewVOs = sortPromotionImport(promotionImportNewVOs);\n\t\t\t//save\n\t\t\ttotalItem = promotionImportNewErrorVOs.size() + promotionImportNewVOs.size();\n\t\t\tnumFail = promotionImportNewErrorVOs.size();\n\t\t\tif(promotionImportNewVOs != null && promotionImportNewVOs.size() > 0) {\n\t\t\t\tpromotionImportNewErrorVOs = promotionProgramMgr.saveImportPromotionNew(promotionImportNewVOs, promotionImportNewErrorVOs, getLogInfoVO());\n\t\t\t\t// thông tin tra ve\n\t\t\t\tnumFail = promotionImportNewErrorVOs.size();\n\t\t\t\tfor (PromotionImportNewVO promotion : promotionImportNewVOs) {\n\t\t\t\t\tPromotionProgram pp = promotionProgramMgr.getPromotionProgramByCode(promotion.getPromotionCode());\n\t\t\t\t\tif (pp != null) {\n\t\t\t\t\t\tpromotionProgramMgr.updateMD5ValidCode(pp, getLogInfoVO());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// xu ly nêu có loi\n\t\t\tif (promotionImportNewErrorVOs.size() > 0) {\n\t\t\t\tconvertObjectPromotionToCellBean(promotionImportNewErrorVOs, infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t\tif (infoPromotionError.size() > 0 || infoPromotionDetailError.size() > 0 || infoPromotionShopError.size() > 0) {\n\t\t\t\t\treturn WriteFileError(infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception ex) {\n\t\t\terrMsg = Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"system.error\");\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.importExcelPromotionNew\"), createLogErrorStandard(actionStartTime));\n\t\t}\t\t\n\t\treturn SUCCESS;\n\t}", "public MyFile getMyFile() {\r\n\t\tMyFile msg = new MyFile(path);\r\n\t\tString LocalfilePath = path;\r\n\r\n\t\ttry {\r\n\t\t\tFile newFile = new File(LocalfilePath);\r\n\t\t\tbyte[] mybytearray = new byte[(int) newFile.length()];\r\n\t\t\tFileInputStream fis = new FileInputStream(newFile);\r\n\t\t\tBufferedInputStream bis = new BufferedInputStream(fis);\r\n\r\n\t\t\tmsg.initArray(mybytearray.length);\r\n\t\t\tmsg.setSize(mybytearray.length);\r\n\r\n\t\t\tbis.read(msg.getMybytearray(), 0, mybytearray.length);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error send (Files)msg) to Server\");\r\n\t\t}\r\n\t\treturn msg;\r\n\t}", "edu.usfca.cs.dfs.StorageMessages.RetrieveFile getRetrieveFile();", "public CATMFGDWInvoicePush_FlatFile(){\n\n}", "SessionFile getOrCreateFile(SharedFile shared) {\n Integer id = fileIds.get(shared);\n if (id == null) {\n id = nextFileHandle++;\n SessionFile data = new SessionFile(this, id, shared);\n fileIds.put(shared, id);\n fileData.put(id, data);\n return data;\n } else {\n return fileData.get(id);\n }\n }", "private File getFile() {\n\t\t// retornamos el fichero a enviar\n\t\treturn this.file;\n\t}", "@Override\n\tpublic ResponsePersist persist(Produto entity, ProdutoService service, List<?> objects, MultipartFile file) {\n\t\treturn null;\n\t}", "public void excluir(Filme f) {\r\n\r\n //Pegando o gerenciador de acesso ao BD\r\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Iniciar a transação\r\n gerenciador.getTransaction().begin();\r\n\r\n //Para excluir tem que dar o merge primeiro para \r\n //sincronizar o ator do BD com o ator que foi\r\n //selecionado na tela\r\n f = gerenciador.merge(f);\r\n\r\n //Mandar sincronizar as alterações \r\n gerenciador.remove(f);\r\n\r\n //Commit na transação\r\n gerenciador.getTransaction().commit();\r\n\r\n }", "public void cargarProductosEnVenta() {\n try {\n //Lectura de los objetos de tipo producto Vendido\n FileInputStream archivo= new FileInputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n this.productosEnVenta = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"ERROR: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "private void abrirEntAntMaest(){\n try{\n entAntMaest = new ObjectInputStream(\n Files.newInputStream(Paths.get(\"antmaest.ser\")));\n }\n catch(IOException iOException){\n System.err.println(\"Error al abrir el archivo. Terminado.\");\n System.exit(1);\n }\n }" ]
[ "0.5829285", "0.5451365", "0.517904", "0.51188254", "0.501929", "0.49929386", "0.49060735", "0.48858744", "0.4885016", "0.4801183", "0.477274", "0.47648773", "0.47635219", "0.47602788", "0.47401047", "0.4728485", "0.4723614", "0.4715574", "0.46974182", "0.46950638", "0.4676511", "0.46687", "0.46585754", "0.4655238", "0.4654606", "0.4639007", "0.46326134", "0.4617388", "0.46142724", "0.46094376", "0.46080506", "0.4603836", "0.46002635", "0.45845005", "0.4579523", "0.45755517", "0.45706347", "0.45695356", "0.45636266", "0.456346", "0.4559241", "0.45516703", "0.45418945", "0.4537785", "0.45292303", "0.4523023", "0.45177716", "0.4511765", "0.4508075", "0.45053306", "0.45025215", "0.4500531", "0.44937852", "0.44888845", "0.44830388", "0.44782504", "0.4476557", "0.44719163", "0.4470806", "0.44661325", "0.4465879", "0.44613737", "0.44510078", "0.44509515", "0.44506627", "0.44497898", "0.44493374", "0.44478706", "0.44471863", "0.4439044", "0.4433056", "0.44293115", "0.44264323", "0.44189376", "0.44187838", "0.4417091", "0.4416965", "0.44154623", "0.44153285", "0.44010243", "0.4398928", "0.43969026", "0.4394252", "0.43865365", "0.43849733", "0.43760645", "0.43701977", "0.43652257", "0.4356334", "0.43537012", "0.43518248", "0.43489426", "0.4347835", "0.43473005", "0.4347156", "0.4345765", "0.43434376", "0.4340038", "0.43398774", "0.43386212" ]
0.4534404
44
Interpreta o XML do extrato.
private static RetornoExtrato parse(String xmlExtrato) throws Exception { RetornoExtrato result = new RetornoExtrato(); try { //Obtendo os objetos necessarios para a execucao do parse do xml DocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance(); DocumentBuilder parse = docBuilder.newDocumentBuilder(); InputSource is = new InputSource(new StringReader(xmlExtrato)); Document doc = parse.parse(is); Vector v = new Vector(); Extrato extrato = null; SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); //Obter o índice de recarga Element elmDadosControle = (Element)doc.getElementsByTagName("dadosControle").item(0); NodeList nlDadosControle = elmDadosControle.getChildNodes(); if(nlDadosControle.getLength() > 0) { result.setIndAssinanteLigMix(nlDadosControle.item(0).getChildNodes().item(0).getNodeValue()); result.setPlanoPreco (nlDadosControle.item(1).getChildNodes().item(0).getNodeValue()); } for (int i=0; i < doc.getElementsByTagName( "detalhe" ).getLength(); i++) { Element serviceElement = (Element) doc.getElementsByTagName( "detalhe" ).item(i); NodeList itemNodes = serviceElement.getChildNodes(); if (itemNodes.getLength() > 0) { extrato = new Extrato(); extrato.setNumeroOrigem(itemNodes.item(1).getChildNodes().item(0).getNodeValue()); extrato.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue()); extrato.setHoraChamada(itemNodes.item(3).getChildNodes().item(0).getNodeValue()); extrato.setTipoTarifacao(itemNodes.item(4).getChildNodes().item(0).getNodeValue()); extrato.setOperacao(itemNodes.item(5).getChildNodes().item(0).getNodeValue()); extrato.setRegiaoOrigem(itemNodes.item(6).getChildNodes().item(0).getNodeValue()); extrato.setRegiaoDestino(itemNodes.item(7).getChildNodes().item(0)!=null?itemNodes.item(7).getChildNodes().item(0).getNodeValue():""); extrato.setNumeroDestino(itemNodes.item(8).getChildNodes().item(0).getNodeValue()); extrato.setDuracaoChamada(itemNodes.item(9).getChildNodes().item(0).getNodeValue()); extrato.setValorPrincipal (stringToDouble(itemNodes.item(10).getChildNodes().item(0).getChildNodes().item(0).getNodeValue())); extrato.setValorBonus (stringToDouble(itemNodes.item(10).getChildNodes().item(1).getChildNodes().item(0).getNodeValue())); extrato.setValorSMS (stringToDouble(itemNodes.item(10).getChildNodes().item(2).getChildNodes().item(0).getNodeValue())); extrato.setValorGPRS (stringToDouble(itemNodes.item(10).getChildNodes().item(3).getChildNodes().item(0).getNodeValue())); extrato.setValorPeriodico (stringToDouble(itemNodes.item(10).getChildNodes().item(4).getChildNodes().item(0).getNodeValue())); extrato.setValorTotal (stringToDouble(itemNodes.item(10).getChildNodes().item(5).getChildNodes().item(0).getNodeValue())); extrato.setSaldoPrincipal (stringToDouble(itemNodes.item(11).getChildNodes().item(0).getChildNodes().item(0).getNodeValue())); extrato.setSaldoBonus (stringToDouble(itemNodes.item(11).getChildNodes().item(1).getChildNodes().item(0).getNodeValue())); extrato.setSaldoSMS (stringToDouble(itemNodes.item(11).getChildNodes().item(2).getChildNodes().item(0).getNodeValue())); extrato.setSaldoGPRS (stringToDouble(itemNodes.item(11).getChildNodes().item(3).getChildNodes().item(0).getNodeValue())); extrato.setSaldoPeriodico (stringToDouble(itemNodes.item(11).getChildNodes().item(4).getChildNodes().item(0).getNodeValue())); extrato.setSaldoTotal (stringToDouble(itemNodes.item(11).getChildNodes().item(5).getChildNodes().item(0).getNodeValue())); v.add(extrato); } } result.setExtratos(v); v= new Vector(); for (int i=0; i < doc.getElementsByTagName( "evento" ).getLength(); i++) { Element serviceElement = (Element) doc.getElementsByTagName( "evento" ).item(i); NodeList itemNodes = serviceElement.getChildNodes(); if (itemNodes.getLength() > 0) { Evento evento = new Evento(); evento.setNome(itemNodes.item(1).getChildNodes().item(0).getNodeValue()); evento.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue()); evento.setHora(itemNodes.item(3).getChildNodes().item(0).getNodeValue()); v.add(evento); } } result.setEventos(v); Element serviceElement = (Element) doc.getElementsByTagName( "totais" ).item(0); NodeList itemNodes = serviceElement.getChildNodes(); if (itemNodes.getLength() > 0) { // SaldoInicial Principal result.setSaldoInicialPrincipal (itemNodes.item(0).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialBonus (itemNodes.item(0).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialSMS (itemNodes.item(0).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialGPRS (itemNodes.item(0).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialPeriodico (itemNodes.item(0).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialTotal (itemNodes.item(0).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosPrincipal (itemNodes.item(1).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosBonus (itemNodes.item(1).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosSMS (itemNodes.item(1).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosGPRS (itemNodes.item(1).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosPeriodico (itemNodes.item(1).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosTotal (itemNodes.item(1).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosPrincipal(itemNodes.item(2).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosBonus (itemNodes.item(2).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosSMS (itemNodes.item(2).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosGPRS (itemNodes.item(2).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosPeriodico(itemNodes.item(2).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosTotal (itemNodes.item(2).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalPrincipal (itemNodes.item(3).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalBonus (itemNodes.item(3).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalSMS (itemNodes.item(3).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalGPRS (itemNodes.item(3).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalPeriodico (itemNodes.item(3).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalTotal (itemNodes.item(3).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); serviceElement = (Element) doc.getElementsByTagName( "dadosCadastrais" ).item(0); itemNodes = serviceElement.getChildNodes(); if (itemNodes.item(2).getChildNodes().item(0) != null) { result.setDataAtivacao(itemNodes.item(2).getChildNodes().item(0).getNodeValue()); } if (itemNodes.item(3).getChildNodes().item(0) != null) { result.setPlano(itemNodes.item(3).getChildNodes().item(0).getNodeValue()); } } } catch(NullPointerException e) { throw new Exception("Problemas com a geração do Comprovante de Serviços."); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void startElement(String espacio_nombres, String nombre_completo, String nombre_etiqueta,\r\n\t\t\tAttributes atributos) throws SAXException {\r\n\t\tif (nombre_etiqueta.equals(\"cantidad\")) {\r\n\t\t\tSystem.out.println(\"Cantidad: \");\r\n\t\t\tetiqueta_anterior = \"cantidad\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"dia-embarque\")) {\r\n\t\t\tSystem.out.println(\"Dia de embarque de la mercancia: \");\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"coche\")) {\r\n\t\t\tSystem.out.println(\"Datos del Coche: \");\r\n\t\t\tif (atributos.getLength() == 1) {\r\n\t\t\t\tSystem.out.println(atributos.getValue(\"segundamano\"));\r\n\t\t\t}\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"marca\")) {\r\n\t\t\tSystem.out.println(\"Marca: \");\r\n\t\t\tetiqueta_anterior = \"marca\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"modelo\")) {\r\n\t\t\tSystem.out.println(\"Modelo: \");\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"precio\")) {\r\n\t\t\tSystem.out.println(\"Precio: \");\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"kilometros\")) {\r\n\t\t\tSystem.out.println(\"Kilometros reales: \");\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"fecha-matriculacion\")) {\r\n\t\t\tSystem.out.println(\"Fecha de Matricualcion: \");\r\n\t\t}\r\n\r\n\t}", "@Override\n public void parseXml(Element ele, LoadContext lc) {\n\n }", "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n // <document>\n if (localName.equals(\"document\")) {\n curArticle = new ArticleSmallOpinion();\n curTagiot = new ArrayList<Tagit>();\n\n // add values\n if (atts.getValue(\"doc_id\") != null) curArticle.setDoc_id(atts.getValue(\"doc_id\"));\n if (atts.getValue(\"title\") != null) curArticle.setTitle(atts.getValue(\"title\"));\n if (atts.getValue(\"sub_title\") != null) curArticle.setSubTitle(atts.getValue(\"sub_title\"));\n if (atts.getValue(\"f7\") != null) curArticle.setF7(atts.getValue(\"f7\"));\n String author = atts.getValue(\"author_icon\");\n author = extractImageUrl(author);\n if (atts.getValue(\"author_icon\") != null) curArticle.setAuthorImgURL(author);\n if (atts.getValue(\"Created_On\") != null) curArticle.setCreatedOn(atts.getValue(\"Created_On\"));\n\n }\n // <f2>\n else if (localName.equals(\"f2\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF2(atts.getValue(\"src\"));\n\n // currently not holding image photographer via \"title=\"\n }\n // <f3>\n if (localName.equals(\"f3\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF3(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <f4>\n else if (localName.equals(\"f4\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF4(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <tagit>\n else if (localName.equals(\"tagit\")) {\n Tagit tagit = new Tagit(atts.getValue(\"id\"), atts.getValue(\"simplified\"), \"\");\n curTagiot.add(tagit);\n }\n\n }", "abstract protected String getOtherXml();", "public void transformToSecondXml();", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n \n //Se a TAG sendo lida for \"produto\" então podemos criar um novo para ser adicionado no Array\n if(qName.equals(\"produto\")) {\n\n produto = new Produto();\n }\n\n //Todo inicio de TAG limpamos o seu conteúdo\n conteudo = new StringBuilder();\n }", "@Override\n\tpublic void importXML(String nodePath, ByteArrayInputStream bis,\n\t\t\tint typeImport) throws Exception {\n\n\t}", "public void openXml() throws ParserConfigurationException, TransformerConfigurationException, SAXException {\n\n SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();\n transformer = saxTransformerFactory.newTransformerHandler();\n\n // pretty XML output\n Transformer serializer = transformer.getTransformer();\n serializer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n serializer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setResult(result);\n transformer.startDocument();\n transformer.startElement(null, null, \"inserts\", null);\n }", "protected abstract void fromXmlEx(Element source)\n throws PSUnknownNodeTypeException;", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException{\n\t File inputFile = new File(\"C:\\\\Users\\\\msamiull\\\\workspace\\\\jgraphx-master\\\\t.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.parse(inputFile);\r\n \r\n\t\tdoc.getDocumentElement().normalize();\r\n System.out.println(\"Main element :\"+ doc.getDocumentElement().getNodeName());\r\n// NodeList nodeList = doc.getElementsByTagName(\"root\");\r\n \r\n NodeList nodeList = doc.getElementsByTagName(\"iOOBN\");\r\n// NamedNodeMap attribList = doc.getAttributes();\r\n \r\n// nonRecursiveParserXML(nList, doc);\r\n\r\n ArrayList<String> tagList = new ArrayList<String>();\r\n// tagList.add(\"mxCell\");\r\n// tagList.add(\"mxGeometry\");\r\n// tagList.add(\"mxPoint\");\r\n tagList.add(\"Node\");\r\n tagList.add(\"state\");\r\n tagList.add(\"tuple\"); // purposely i raplced \"datarow\" by \"tuple\" so that my parser can consider state first before tuple/data\r\n tagList.add(\"parent\");\r\n \r\n recursiveParserXML(nodeList, tagList);\r\n\r\n }", "@Override\n\tpublic void parseXML(Element root) throws Exception {\n\t\t\n\t}", "void bukaXoxo(){\r\n FileInputStream xx = null;\r\n try {\r\n xx = new FileInputStream(\"xoxo.xml\");\r\n // harus diingat objek apa yang dahulu disimpan di file \r\n // program untuk membaca harus sinkron dengan program\r\n // yang dahulu digunakan untuk menyimpannya\r\n int isi;\r\n char charnya;\r\n String stringnya;\r\n // isi file dikembalikan menjadi string\r\n stringnya =\"\";\r\n while ((isi = xx.read()) != -1) {\r\n charnya= (char) isi;\r\n stringnya = stringnya + charnya;\r\n } \r\n // string isi file dikembalikan menjadi larik double\r\n resi = (String) xstream.fromXML(stringnya);\t \r\n }\r\n catch (Exception e){\r\n System.err.println(\"test: \"+e.getMessage());\r\n }\r\n finally{\r\n if(xx != null){\r\n try{\r\n xx.close();\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n } \r\n } \r\n \r\n }", "public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }", "public void importUsingCustomXML(OperatingConditions operatingConditions, Aircraft aircraft, ACAnalysisManager analysis, String inFilePathNoExt) {\n\n\t\t\n\t\tSystem.out.println(\"\\n ----- STARTED IMPORTING DATA FROM THE XML CUSTOM FILE -----\\n\");\n\n\t\t\n\t\t// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\t\t// STATIC FUNCTIONS - TO BE CALLED BEFORE EVERYTHING ELSE\n\t\tJPADWriteUtils.buildXmlTree();\n\n\t\tJPADXmlReader _theReadUtilities = new JPADXmlReader(aircraft, operatingConditions, inFilePathNoExt);\n\t\t_theReadUtilities.importAircraftAndOperatingConditions(aircraft, operatingConditions, inFilePathNoExt);\n\t\t\n\t\tSystem.out.println(\"\\n\\n\");\n\t\tSystem.out.println(\"\\t\\tCurrent Mach after importing = \" + operatingConditions.get_machCurrent());\n\t\tSystem.out.println(\"\\t\\tCurrent Altitude after importing = \" + operatingConditions.get_altitude());\n\t\tSystem.out.println(\"\\n\\n\");\n\t\tSystem.out.println(\"\\t\\tCurrent MTOM after importing = \" + aircraft.get_weights().get_MTOM());\n\t\tSystem.out.println(\"\\n\\n\");\n\t\t\n\t\t//-------------------------------------------------------------------\n\t\t// Export/Serialize\n\t\t\n\t\tJPADDataWriter writer = new JPADDataWriter(operatingConditions, aircraft, analysis);\n\t\t\n\t\tString myExportedFile = inFilePathNoExt + \"b\" + \".xml\";\n\t\t\n\t\twriter.exportToXMLfile(myExportedFile);\n\t\t\n\t}", "public static TPedido parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TPedido object =\n new TPedido();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"tPedido\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TPedido)biz.belcorp.www.soa.business.ffvv.sicc.concursobs.types.ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n java.util.ArrayList list20 = new java.util.ArrayList();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"codigo\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setCodigo(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"bloqueado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setBloqueado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"estado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setEstado(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"fechaFacturado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setFechaFacturado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"fechaSolicitud\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setFechaSolicitud(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"flete\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setFlete(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setFlete(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"motivoRechazo\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setMotivoRechazo(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setMotivoRechazo(biz.belcorp.www.canonico.ffvv.vender.TMotivoRechazo.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"observacion\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setObservacion(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"origen\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setOrigen(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoDescuento\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoDescuento(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoDescuento(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoEstimado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoEstimado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoEstimado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoSolicitado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoSolicitado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoSolicitado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoFacturado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoFacturado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoFacturado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoFacturadoSinDescuento\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoFacturadoSinDescuento(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoFacturadoSinDescuento(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"percepcion\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setPercepcion(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setPercepcion(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"cantidadCUVErrado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setCantidadCUVErrado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInteger(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"cantidadFaltanteAnunciado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setCantidadFaltanteAnunciado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInteger(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoPedidoRechazado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoPedidoRechazado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoPedidoRechazado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoCatalogoEstimado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoCatalogoEstimado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoCatalogoEstimado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"pedidoDetalle\").equals(reader.getName())){\n \n \n \n // Process the array and step past its final element's end.\n list20.add(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle.Factory.parse(reader));\n \n //loop until we find a start element that is not part of this array\n boolean loopDone20 = false;\n while(!loopDone20){\n // We should be at the end element, but make sure\n while (!reader.isEndElement())\n reader.next();\n // Step out of this element\n reader.next();\n // Step to next element event.\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n if (reader.isEndElement()){\n //two continuous end elements means we are exiting the xml structure\n loopDone20 = true;\n } else {\n if (new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"pedidoDetalle\").equals(reader.getName())){\n list20.add(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle.Factory.parse(reader));\n \n }else{\n loopDone20 = true;\n }\n }\n }\n // call the converter utility to convert and set the array\n \n object.setPedidoDetalle((biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[])\n org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(\n biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle.class,\n list20));\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private FatturaElettronicaType unmarshalFattura(EmbeddedXMLType fatturaXml) {\n\t\tfinal String methodName = \"unmarshalFattura\";\n\t\tbyte[] xmlBytes = extractContent(fatturaXml);\n\t\tInputStream is = new ByteArrayInputStream(xmlBytes);\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance(FatturaElettronicaType.class);\n\t\t\tUnmarshaller u = jc.createUnmarshaller();\n\t\t\tFatturaElettronicaType fattura = (FatturaElettronicaType) u.unmarshal(is);\n\t\t\tlog.logXmlTypeObject(fattura, \"Fattura elettronica\");\n\t\t\treturn fattura;\n\t\t} catch(JAXBException jaxbe) {\n\t\t\tlog.error(methodName, \"Errore di unmarshalling della fattura\", jaxbe);\n\t\t\tthrow new BusinessException(ErroreCore.ERRORE_DI_SISTEMA.getErrore(\"Errore di unmarshalling della fattura elettronica\" + (jaxbe != null ? \" (\" + jaxbe.getMessage() + \")\" : \"\")));\n\t\t}\n\t}", "public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n innerTextBuilder.setLength(0);\r\n \r\n if(qName.equals(\"sensorgroup\")){\r\n int id = Integer.parseInt(atts.getValue(\"id\"));\r\n sensorGroup = new SensorGroup(id);\r\n sensorManager.addSensorGroup(id, sensorGroup);\r\n }\r\n else if(qName.equals(\"sensor\")){\r\n inSensor = true;\r\n int id = Integer.parseInt(atts.getValue(\"id\"));\r\n sensor = new Sensor(id);\r\n sensorGroup.addSensor(id, sensor);\r\n \r\n }\r\n else if(qName.equals(\"coordinates\")){\r\n double x = Double.parseDouble(atts.getValue(\"x\"));\r\n double y = Double.parseDouble(atts.getValue(\"y\"));\r\n double z = Double.parseDouble(atts.getValue(\"z\"));\r\n \r\n sensor.setX(x);\r\n sensor.setY(y);\r\n sensor.setZ(z);\r\n }\r\n \r\n \r\n \r\n \r\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public AnXmlTransform() {\n super();\n }", "@Override\n\t@XmlElement\n\tpublic void setExtrCode(String extrCode) {\n\t\t\n\t}", "public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException {\n\t\tcheckwithnodesxmltoexcel excl= new checkwithnodesxmltoexcel();\n\t\texcl.xmltoexcelfile();\n\n\t}", "public static GetDirectAreaInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfo object =\n new GetDirectAreaInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n public void startElement(String s, String s1, String elementName, Attributes attributes) throws SAXException {\n if (elementName.equalsIgnoreCase(\"sale\")) {\n\n //make alter status false\n alterStatus=false;\n\n // Create the object\n sale = new Sale();\n\n saleSKUSet=new HashSet<SaleSKU>();\n\n //get merchantNo\n Long merchantNo=this.merchantNo;\n\n //get userNo\n Long userNo=this.userNo;\n\n //get userLocation\n Long userLocation=this.userLocation;\n\n // Hold the audit details\n String auditDetails = this.auditDetails;\n\n try{\n\n // Set the alter status\n alterStatus=(Integer.parseInt(attributes.getValue(\"ALTER_STATUS\")))==0?false:true;\n\n }catch(Exception ex){\n\n alterStatus=false;\n }\n\n // Set the merchantNo\n sale.setSalMerchantNo(merchantNo);\n\n // Set the user location\n sale.setSalLocation(userLocation);\n\n // Set the user number\n sale.setSalUserNo(userNo);\n\n if(alterStatus){\n\n //Set the updated by field\n sale.setUpdatedBy(auditDetails);\n\n }else{\n\n // Set the created by field\n sale.setCreatedBy(auditDetails);\n\n }\n\n // Set the loyatly id\n sale.setSalLoyaltyId(attributes.getValue(\"LOYALTY_ID\")==null?\"\":attributes.getValue(\"LOYALTY_ID\"));\n\n\n try{\n\n // Set the sale date\n sale.setSalDate(DBUtils.covertToSqlDate(attributes.getValue(\"DATE\")));\n\n }catch(Exception ex){\n\n // Log the file\n log.info(\"SalesMasterXMLParser - No DATE attribute\");\n\n throw new NullPointerException();\n\n }\n\n try{\n\n // Set the sale time\n sale.setSalTime(DBUtils.convertToSqlTime(attributes.getValue(\"TIME\")));\n\n }catch(Exception ex){\n\n // Log the file\n log.info(\"SalesMasterXMLParser - No TIME attribute\");\n\n\n }\n\n try{\n\n // Set the sale amount\n sale.setSalAmount(Double.parseDouble(attributes.getValue(\"TOTAL_AMOUNT\")));\n\n }catch(Exception ex){\n\n\n // Log the file\n log.info(\"SalesMasterXMLParser - No TOTAL_AMOUNT attribute\");\n\n sale.setSalAmount(0.0);\n\n //throw new NullPointerException();\n }\n\n try{\n\n // Set the reference\n sale.setSalPaymentReference(attributes.getValue(\"REFERENCE\"));\n\n\n }catch(Exception ex){\n\n // Log the file\n log.info(\"SalesMasterXMLParser - No REFERENCE attribute\");\n\n throw new NullPointerException();\n }\n\n try{\n\n // Set the reference\n String location = attributes.getValue(\"PURCHASE_LOCATION\") ==null?\"\":attributes.getValue(\"PURCHASE_LOCATION\");\n\n if(!location.equals(\"\")){\n\n Long customerLocation = getLocation(location.trim());\n\n if(customerLocation.longValue() !=0L){\n\n sale.setSalLocation(customerLocation);\n\n }else {\n\n sale.setSalLocation(userLocation);\n }\n\n }else {\n\n sale.setSalLocation(userLocation);\n }\n\n\n }catch(Exception ex){\n\n // Log the file\n log.info(\"SalesMasterXMLParser - Pue\");\n\n sale.setSalLocation(userLocation);\n\n }\n\n String paymentMode=attributes.getValue(\"PAYMENT_MODE\")==null?\"\":attributes.getValue(\"PAYMENT_MODE\");\n\n // Set the Payment Mode\n switch (paymentMode){\n\n case \"CHARGE_CARD\" :\n\n sale.setSalPaymentMode(PaymentStatusMode.CHARGE_CARD);\n\n break;\n\n case \"CASHBACK_POINTS\" :\n\n sale.setSalPaymentMode(PaymentStatusMode.CASHBACK_POINTS);\n\n break;\n\n case \"CREDIT_CARD\" :\n\n sale.setSalPaymentMode(PaymentStatusMode.CREDIT_CARD);\n\n break;\n\n case \"DEBIT_CARD\" :\n\n sale.setSalPaymentMode(PaymentStatusMode.DEBIT_CARD);\n\n break;\n\n case \"NET_BANKING\" :\n\n sale.setSalPaymentMode(PaymentStatusMode.NET_BANKING);\n\n break;\n\n case \"CASH\" :\n\n sale.setSalPaymentMode(PaymentStatusMode.CASH);\n\n break;\n default:\n break;\n }\n\n }\n\n\n // Check if the element is starting with SALE_ITEM, then its sku value\n if ( elementName.equalsIgnoreCase(\"SALE_ITEM\")) {\n\n // Set the type of the sale to sku based\n sale.setSalType(SaleType.ITEM_BASED_PURCHASE);\n\n // Create the object\n saleSKU = new SaleSKU();\n\n }\n tmpValue=\"\";\n\n }", "@Override\n public void toXml(XmlContext xc) {\n\n }", "@Override\n\tpublic void emiteExtrato() {\n\t\t\n\t}", "public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\n\t\t// On débute une balise dont on veut le contenu textuel\n\t\tif (qName.equalsIgnoreCase(mXmlTagContainingText)) {\n\t\t\tinsideTextTag = true;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor +1; indent++) {System.out.print (\"--\");}\n\t\t\tSystem.out.print (\"Debug: startElement >\"+qName+\"< \");\n\t\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );}\n\t\t\tSystem.out.println ();\n\t\t}\n\n\t\t// So far, I do not why but accessing here to the attributes values \n\t\t// prevent the case that further in the createAnnotation method, \n\t\t// you obtain a substring of attributes.toString which does not correspond to an attribute value \n\t\t// someway the current solution acts as a clone...\n\t\tfor (int indent=0 ; indent < attributes.getLength() ; indent++) {\n\t\t\tattributes.getValue(indent);\n\t\t\t//if (attributes.getValue(indent).startsWith(\"mph=\\\"\"))\t\t{ \n\t\t\t//\tSystem.out.println (\"Debug: startElement >\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t\t//}\n\t\t\t//System.out.print (\">\"+attributes.getLocalName(indent)+\"=\\\"\"+attributes.getValue(indent)+\"\\\"< \" );\n\t\t}\n\n\t\t// on stocke des informations concernant l'élément XML courant en l'empilant\n\t\t// le problème est que l'on n'a pas accès au begin et end offset d'une balise en même temps \n\t\t// et qu'il faut garder une trace des begins des balises ouvertes lorsque l'on rencontre leur end \n\t\t//if ( attributes.getLength() == 0) attributes = null;\n\t\tXMLElement xE = new XMLElement(uri, localName, qName, attributes);\n\t\telementOffsetStack.add(xE);\n\n\t\telementOffsetStackCursor++;\n\t\tcurrentOpenElementWithTheBeginToSet++;\n\n\t\t// debug\n\t\tif (debug) {\n\t\t\tfor (int indent=0 ; indent < elementOffsetStackCursor ; indent++) {System.out.print (\"--\");}\n\t\t\t//System.out.println (\"Debug: startElement empile uri>\" +uri+\"< localName>\"+localName+\"< qName>\"+qName+\"< arrayListIndex>\"+arrayListIndex+\" curentOpenTagToAnnotate>\"+curentOpenTagToAnnotate+\"<\");\n\t\t\tSystem.out.println (\"Debug: startElement tag>\"+qName+\"< que l'on empile ; il y a >\"+\n\t\t\telementOffsetStackCursor+\"< éléments dans la pile ; il y a >\"+\n\t\t\t\t\tcurrentOpenElementWithTheBeginToSet+\"< balise en attente dont le begin est définir\");\n\n\t\t}\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading OG: \"+messwert);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(messwert.equals(\"1\")){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(\"2222\");;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading EDITED:\"+nodes.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t \t//find Loading value\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\t//replace original value with new value\r\n\t\t\t\t\tif(messwert.equals(LoadOnStartAppConfiguration.value_from)){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(LoadOnStartAppConfiguration.value_to);;\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public java.lang.String getXml();", "public static void main(String[] args) {\n\t\tXStream xstream = new XStreamEx(new DomDriver());\r\n\t\txstream.alias(\"AIPG\", AIPG.class);\r\n\t\txstream.alias(\"INFO\", InfoReq.class);\r\n\t\r\n\t\t\r\n\t\t\r\n\t\txstream.alias(\"RET_DETAIL\", Ret_Detail.class);\r\n \t\txstream.aliasField(\"RET_DETAILS\", Body.class, \"details\");\r\n\t\r\n\r\n\t\t\r\n//\t\txstream.aliasField(\"TRX->CODE1\", Info.class, \"TRX_CODE\");\r\n\t\t\r\n\t\tAIPG g = new AIPG( );\r\n\t\tInfoRsp info = new InfoRsp( );\r\n\t\tinfo.setTRX_CODE(\"-----\");\r\n\t\tinfo.setVERSION(\"03\");\r\n\t\tg.setINFO(info);\r\n\t\t\r\n\t\tBody body = new Body( );\r\n//\t\tTrans_Sum transsum = new Trans_Sum( );\r\n\t\tRet_Detail detail=new Ret_Detail();\r\n\t\tdetail.setSN(\"woshi\");\r\n\t body.addDetail(detail);\r\n\t \r\n\t\t\r\n\t\tg.setBODY(body);\r\n\t\tSystem.out.println(xstream.toXML(g).replaceAll(\"__\", \"_\"));\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void startElement(final String uri, final String localName, final String name,\n\t\t\t\t\t\t\tfinal Attributes attributes) throws SAXException {\n\t\tswitch (localName) {\n\t\t\tcase \"place\":\n\t\t\t\tthis.actual = this.plaza;\n\t\t\t\tthis.tempId = attributes.getValue(\"id\");\n\t\t\t\tthis.isPlace = true;\n\t\t\t\tbreak;\n\n\t\t\tcase \"transition\":\n\t\t\t\tthis.actual = this.transicion;\n\t\t\t\tthis.tempId = attributes.getValue(\"id\");\n\t\t\t\tisActualTransition = true;\n\t\t\t\tbreak;\n\n\t\t\tcase \"arc\":\n\t\t\t\tthis.actual = this.arco;\n\t\t\t\tthis.actual.setId(attributes.getValue(\"id\"));\n\t\t\t\tthis.actual.setSourceTarget(attributes.getValue(\"source\"),\n\t\t\t\t\t\tattributes.getValue(\"target\"));\n\t\t\t\tthis.isActualArco = true;\n\t\t\t\tbreak;\n\n\t\t\tcase \"initialMarking\":\n\t\t\t\tthis.isTMarcadoInicial = true;\n\t\t\t\tbreak;\n\n\t\t\tcase \"inscription\":\n\t\t\t\tthis.isAPeso = true;\n\t\t\t\tbreak;\n\n\t\t\tcase \"text\":\n\t\t\t\tthis.isText = true;\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tthis.isType = true;\n\t\t\t\tString value = attributes.getValue(\"value\");\n\t\t\t\tif(value.compareToIgnoreCase(\"test\")== 0){\n\t\t\t\t\t((ElementoArco)this.actual).setTipo(TipoArco.LECTOR);\n\t\t\t\t}else if (value.compareToIgnoreCase(\"inhibitor\") == 0){\n\t\t\t\t\t((ElementoArco)this.actual).setTipo(TipoArco.INHIBIDOR);\n\t\t\t\t}else{\n\t\t\t\t\tthrow new SAXException(\"Tipo de Arco no soportado: \" + value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "private void parseXMLResult(String respFile, ProcureLineItem pli,\r\n\t\t\tApprovalRequest ar, BaseVector lineItems, Approvable lic)\r\n\t\t\tthrows SAXException, ParserConfigurationException, IOException {\r\n\t\tLog.customer.debug(\"After calling getVertexTaxResponse()...: %s\",\r\n\t\t\t\t\"CatTaxCustomApprover response file before parsing : - %s\",\r\n\t\t\t\tclassName, respFile);\r\n\t\t// Parsing XML and populating field in Ariba.....\r\n\t\tlic = ar.getApprovable();\r\n\t\tLog.customer.debug(\" Parsing XML file ...........: %s\", className);\r\n\t\tFile file1 = new File(respFile);\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\r\n\t\tDocument doc = db.parse(file1);\r\n\t\t// if(respFile!=null){\r\n\t\tdoc.getDocumentElement().normalize();\r\n\t\tNodeList nodeList = doc.getElementsByTagName(\"LineItem\");\r\n\t\tLog.customer.debug(\"%s Information of all Line Item nodeList %s\",\r\n\t\t\t\tclassName, nodeList.getLength());\r\n\r\n\t\tfor (int s = 0; s < nodeList.getLength(); s++) {\r\n\t\t\tNode fstNode = nodeList.item(s);\r\n\t\t\tElement fstElmntlnm = (Element) fstNode;\r\n\t\t\tString lineItemNumber = fstElmntlnm.getAttribute(\"lineItemNumber\");\r\n\t\t\tint index = Integer.parseInt(lineItemNumber);\r\n\t\t\ttry {\r\n\t\t\t\tint plinumber = index - 1;\r\n\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\"%s *** lineItemNumber plinumber after: %s\",\r\n\t\t\t\t\t\tclassName, plinumber);\r\n\t\t\t\tpli = (ProcureLineItem) lineItems.get(plinumber);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLog.customer.debug(\"%s *** in catch of pli : %s\", className,\r\n\t\t\t\t\t\tlineItemNumber + \" ******** \" + e.toString());\r\n\t\t\t\tLog.customer.debug(pli.toString());\r\n\t\t\t\tLog.customer.debug(e.getClass());\r\n\t\t\t}\r\n\t\t\tif (fstNode.getNodeType() == Node.ELEMENT_NODE) {\r\n\r\n\t\t\t\tElement fstElmnt = (Element) fstNode;\r\n\t\t\t\tNodeList countryElmntLst = fstElmnt\r\n\t\t\t\t\t\t.getElementsByTagName(\"Country\");\r\n\t\t\t\tElement lstNmElmnt = (Element) countryElmntLst.item(0);\r\n\t\t\t\tNodeList lstNm = lstNmElmnt.getChildNodes();\r\n\t\t\t\tLog.customer.debug(\"%s *** Country : %s\", className,\r\n\t\t\t\t\t\t((Node) lstNm.item(0)).getNodeValue());\r\n\r\n\t\t\t\t// Total Tax\r\n\t\t\t\tNodeList totaltaxElmntLst = fstElmnt\r\n\t\t\t\t\t\t.getElementsByTagName(\"TotalTax\");\r\n\t\t\t\tElement lstNmElmnt1 = (Element) totaltaxElmntLst.item(0);\r\n\t\t\t\tNodeList lstNm1 = lstNmElmnt1.getChildNodes();\r\n\t\t\t\tString totalTax = ((Node) lstNm1.item(0)).getNodeValue();\r\n\t\t\t\tBigDecimal taxAmount = new BigDecimal(totalTax);\r\n\t\t\t\tMoney taxTotal = new Money(taxAmount, pli.getAmount()\r\n\t\t\t\t\t\t.getCurrency());\r\n\t\t\t\tpli.setFieldValue(\"TaxAmount\", taxTotal);\r\n\t\t\t\tLog.customer.debug(\"%s *** Tax Amount : %s\", className,\r\n\t\t\t\t\t\ttotalTax);\r\n\r\n\t\t\t\t// Reason code\r\n\t\t\t\tElement fstElmntRC = (Element) fstNode;\r\n\t\t\t\tNodeList lstNmElmntLstRC = fstElmntRC\r\n\t\t\t\t\t\t.getElementsByTagName(\"AssistedParameter\");\r\n\t\t\t\tString ReasonCode = \" \";\r\n\t\t\t\tfor (int b = 0; b < lstNmElmntLstRC.getLength(); b++) {\r\n\t\t\t\t\tNode fstNodeRC = lstNmElmntLstRC.item(b);\r\n\t\t\t\t\tif (fstNodeRC.getNodeType() == Node.ELEMENT_NODE) {\r\n\t\t\t\t\t\tElement fstElmntRC1 = (Element) fstNodeRC;\r\n\t\t\t\t\t\tString fieldIdRC = fstElmntRC1.getAttribute(\"phase\");\r\n\t\t\t\t\t\tLog.customer.debug(\"%s *** ReasonCode in loop : \"\r\n\t\t\t\t\t\t\t\t+ fieldIdRC);\r\n\t\t\t\t\t\tif (\"POST\".equalsIgnoreCase(fieldIdRC)) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tElement lstNmElmntRC = (Element) lstNmElmntLstRC\r\n\t\t\t\t\t\t\t\t\t\t.item(0);\r\n\t\t\t\t\t\t\t\tif (lstNmElmntRC.equals(null)\r\n\t\t\t\t\t\t\t\t\t\t|| lstNmElmntRC.equals(\"\")) {\r\n\t\t\t\t\t\t\t\t\tReasonCode = \"\";\r\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\t\"%s *** ReasonCode in if : %s\",\r\n\t\t\t\t\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tNodeList lstNmRC = lstNmElmntRC\r\n\t\t\t\t\t\t\t\t\t\t\t.getChildNodes();\r\n\t\t\t\t\t\t\t\t\tReasonCode = ((Node) lstNmRC.item(0))\r\n\t\t\t\t\t\t\t\t\t\t\t.getNodeValue();\r\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\t\"%s *** ReasonCode in else : %s\",\r\n\t\t\t\t\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\"%s *** inside exception : %s\",\r\n\t\t\t\t\t\t\t\t\t\tclassName);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/*****************************************/\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLog.customer.debug(\"inside loop still....\");\r\n\t\t\t\t}\r\n\t\t\t\tLog.customer.debug(\"outside loop .....\");\r\n\t\t\t\t// *********************************************************************************\r\n\t\t\t\t// TaxAmount = 0 and Reason code = Null then exempt Reason code\r\n\t\t\t\t// is E0.\r\n\r\n\t\t\t\t// Start : RSD 111 (FRD4.0/TD 1.2)\r\n\r\n\t\t\t\tString sapsource = null;\r\n\t\t\t\tsapsource = (String)pli.getLineItemCollection().getDottedFieldValue(\"CompanyCode.SAPSource\");\r\n\r\n\t\t\t\tLog.customer.debug(\"*** ReasonCode logic RSD111 SAPSource is: %s\",sapsource);\r\n\r\n\t\t\t\tif((sapsource.equals(\"MACH1\")) && ((ReasonCode != null) && (!\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))\r\n\t\t\t\t{\r\n\t\t\t\t\t/** Fetching Description from Table. */\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode logic RSD111: \" + ReasonCode);\r\n\t\t\t\t\tString taxCodeForLookup = ReasonCode; // Please Replace with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Actual value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from Web Service\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Response.\r\n\t\t\t\t\tString qryStringrc = \"Select TaxExemptDescription from cat.core.TaxExemptReasonCode where TaxExemptUniqueName = '\"\r\n\t\t\t\t\t\t\t+ taxCodeForLookup + \"'\";\r\n\t\t\t\t\tLog.customer.debug(\"%s TaxExemptReasonCode : qryString \"\r\n\t\t\t\t\t\t\t+ qryStringrc);\r\n\t\t\t\t\t// Replace the cntrctrequest - Invoice Reconciliation Object\r\n\t\t\t\t\tAQLOptions queryOptionsrc = new AQLOptions(ar\r\n\t\t\t\t\t\t\t.getPartition());\r\n\t\t\t\t\tAQLResultCollection queryResultsrc = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryStringrc, queryOptionsrc);\r\n\t\t\t\t\tif (queryResultsrc != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" RSD111 -- TaxExemptReasonCode: Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResultsrc.next()) {\r\n\t\t\t\t\t\t\tString taxdescfromLookupvalue = (String) queryResultsrc\r\n\t\t\t\t\t\t\t\t\t.getString(0);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" RSD111 TaxExemptReasonCode: taxdescfromLookupvalue = \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t\t// Change the rli to appropriate Carrier Holding\r\n\t\t\t\t\t\t\t// object, i.e. IR Line object\r\n\t\t\t\t\t\t\tif (\"\".equals(taxdescfromLookupvalue)\r\n\t\t\t\t\t\t\t\t\t|| taxdescfromLookupvalue == null\r\n\t\t\t\t\t\t\t\t\t|| \"null\".equals(taxdescfromLookupvalue)) {\r\n\t\t\t\t\t\t\t\t// if(taxdescfromLookupvalue.equals(\"\")||taxdescfromLookupvalue\r\n\t\t\t\t\t\t\t\t// ==\r\n\t\t\t\t\t\t\t\t// null||taxdescfromLookupvalue.equals(\"null\")\r\n\t\t\t\t\t\t\t\t// ){\r\n\t\t\t\t\t\t\t\ttaxdescfromLookupvalue = \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpli\r\n\t\t\t\t\t\t\t\t\t.setFieldValue(\"Carrier\",\r\n\t\t\t\t\t\t\t\t\t\t\ttaxdescfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" RSD111 -- TaxExemptReasonCode Applied on Carrier: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// End : RSD 111 (FRD4.0/TD 1.2)\r\n\r\n\r\n\t\t\t\t} else if ((\"0.0\".equals(totalTax) && ((ReasonCode == null) || (\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))) {\r\n\t\t\t\t\tReasonCode = \"E0\";\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode in condition : %s\",\r\n\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t} else if ((\"0.0\".equals(totalTax) && ((ReasonCode != null) || (!\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))) {\r\n\r\n\t\t\t\t\t// End Exempt Reason code logic.\r\n\t\t\t\t\t/** Fetching Description from Table. */\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode after : \" + ReasonCode);\r\n\t\t\t\t\tString taxCodeForLookup = ReasonCode; // Please Replace with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Actual value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from Web Service\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Response.\r\n\t\t\t\t\tString qryStringrc = \"Select TaxExemptDescription from cat.core.TaxExemptReasonCode where TaxExemptUniqueName = '\"\r\n\t\t\t\t\t\t\t+ taxCodeForLookup + \"'\";\r\n\t\t\t\t\tLog.customer.debug(\"%s TaxExemptReasonCode : qryString \"\r\n\t\t\t\t\t\t\t+ qryStringrc);\r\n\t\t\t\t\t// Replace the cntrctrequest - Invoice Reconciliation Object\r\n\t\t\t\t\tAQLOptions queryOptionsrc = new AQLOptions(ar\r\n\t\t\t\t\t\t\t.getPartition());\r\n\t\t\t\t\tAQLResultCollection queryResultsrc = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryStringrc, queryOptionsrc);\r\n\t\t\t\t\tif (queryResultsrc != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode: Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResultsrc.next()) {\r\n\t\t\t\t\t\t\tString taxdescfromLookupvalue = (String) queryResultsrc\r\n\t\t\t\t\t\t\t\t\t.getString(0);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode: taxdescfromLookupvalue = \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t\t// Change the rli to appropriate Carrier Holding\r\n\t\t\t\t\t\t\t// object, i.e. IR Line object\r\n\t\t\t\t\t\t\tif (\"\".equals(taxdescfromLookupvalue)\r\n\t\t\t\t\t\t\t\t\t|| taxdescfromLookupvalue == null\r\n\t\t\t\t\t\t\t\t\t|| \"null\".equals(taxdescfromLookupvalue)) {\r\n\t\t\t\t\t\t\t\t// if(taxdescfromLookupvalue.equals(\"\")||taxdescfromLookupvalue\r\n\t\t\t\t\t\t\t\t// ==\r\n\t\t\t\t\t\t\t\t// null||taxdescfromLookupvalue.equals(\"null\")\r\n\t\t\t\t\t\t\t\t// ){\r\n\t\t\t\t\t\t\t\ttaxdescfromLookupvalue = \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpli\r\n\t\t\t\t\t\t\t\t\t.setFieldValue(\"Carrier\",\r\n\t\t\t\t\t\t\t\t\t\t\ttaxdescfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode Applied on Carrier: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// End Exempt Reason code logic.\r\n\r\n\t\t\t\t// *****************************************************************************//*\r\n\t\t\t\t// tax code logic ...\r\n\t\t\t\tif (totalTax.equals(\"0.0\")) {\r\n\t\t\t\t\tString companyCode = (String) lic\r\n\t\t\t\t\t\t\t.getDottedFieldValue(\"CompanyCode.UniqueName\");\r\n\t\t\t\t\tString state = (String) pli\r\n\t\t\t\t\t\t\t.getDottedFieldValue(\"ShipTo.State\");\r\n\t\t\t\t\tString formattedString = companyCode + \"_\" + state + \"_\"\r\n\t\t\t\t\t\t\t+ \"B0\";\r\n\t\t\t\t\tLog.customer.debug(\"***formattedString : \"\r\n\t\t\t\t\t\t\t+ formattedString);\r\n\t\t\t\t\tString qryString = \"Select TaxCode,UniqueName, SAPTaxCode from ariba.tax.core.TaxCode where UniqueName = '\"\r\n\t\t\t\t\t\t\t+ formattedString\r\n\t\t\t\t\t\t\t+ \"' and Country.UniqueName ='\"\r\n\t\t\t\t\t\t\t+ pli\r\n\t\t\t\t\t\t\t\t\t.getDottedFieldValue(\"ShipTo.Country.UniqueName\")\r\n\t\t\t\t\t\t\t+ \"'\";\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: qryString \"\r\n\t\t\t\t\t\t\t\t\t+ qryString);\r\n\t\t\t\t\tAQLOptions queryOptions = new AQLOptions(ar.getPartition());\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage I\");\r\n\t\t\t\t\tAQLResultCollection queryResults = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryString, queryOptions);\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage II- Query Executed\");\r\n\t\t\t\t\tif (queryResults != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage III - Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResults.next()) {\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage IV - Entering the DO of DO-WHILE\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ queryResults.getBaseId(0).get());\r\n\t\t\t\t\t\t\tTaxCode taxfromLookupvalue = (TaxCode) queryResults\r\n\t\t\t\t\t\t\t\t\t.getBaseId(0).get();\r\n\t\t\t\t\t\t\tLog.customer.debug(\" taxfromLookupvalue\"\r\n\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: TaxCodefromLookup\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\t// Set the Value of LineItem.TaxCode.UniqueName =\r\n\t\t\t\t\t\t\t// 'formattedString'\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: Setting TaxCodefromLookup\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\tpli.setFieldValue(\"TaxCode\", taxfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: Applied \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\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\t// end Tax code...\r\n\t\t\t\tLog.customer.debug(\"*** After loop Tax code : \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// }\r\n\t}", "public void readXML(org.dom4j.Element el) throws Exception {\n String name,value;\n org.dom4j.Element node=el;\n\n if (el.attribute(\"type\") != null)\n setType(el.attribute(\"type\").getText());\n if (el.attribute(\"action\") != null)\n setAction(ActionList.valueOf(el.attribute(\"action\").getText()));\n if (el.attribute(\"direction\") != null)\n setDirection(DirectionList.valueOf(el.attribute(\"direction\").getText()));\n if (el.attribute(\"content\") != null)\n setContent(el.attribute(\"content\").getText());\n if (el.attribute(\"iterations\") != null)\n setIterations(org.jbrain.xml.binding._TypeConverter.parseInteger(el.attribute(\"iterations\").getText(), sObjName, \"Iterations\"));\n if (el.attribute(\"asynchronous\") != null)\n setAsynchronous(org.jbrain.xml.binding._TypeConverter.parseBoolean(el.attribute(\"asynchronous\").getText(), sObjName, \"Asynchronous\"));\n }", "public static void main(String[]args){\n XMLOutputter out = new XMLOutputter();\n SAXBuilder sax = new SAXBuilder();\n\n //Objekte die gepseichert werden sollen\n Car car = new Car(\"CR-MD-5\",\"16.05.1998\",4,4,4);\n Car car2 = new Car(\"UL-M-5\",\"11.03.2002\",10,2,5);\n\n\n Element rootEle = new Element(\"cars\");\n Document doc = new Document(rootEle);\n\n //hinzufuegen des ersten autos\n Element carEle = new Element(\"car\");\n carEle.setAttribute(new Attribute(\"car\",\"1\"));\n carEle.addContent(new Element(\"licenseplate\").setText(car.getLicensePlate()));\n carEle.addContent(new Element(\"productiondate\").setText(car.getProductionDate()));\n carEle.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car.getNumberPassengers())));\n carEle.addContent(new Element(\"numberwheels\").setText(Integer.toString(car.getNumberWheels())));\n carEle.addContent(new Element(\"numberdoors\").setText(Integer.toString(car.getNumberDoors())));\n\n //hinzufuegen des zweiten autos\n Element carEle2 = new Element(\"car2\");\n carEle2.setAttribute(new Attribute(\"car2\",\"2\"));\n carEle2.addContent(new Element(\"licenseplate\").setText(car2.getLicensePlate()));\n carEle2.addContent(new Element(\"productiondate\").setText(car2.getProductionDate()));\n carEle2.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car2.getNumberPassengers())));\n carEle2.addContent(new Element(\"numberwheels\").setText(Integer.toString(car2.getNumberWheels())));\n carEle2.addContent(new Element(\"numberdoors\").setText(Integer.toString(car2.getNumberDoors())));\n\n\n doc.getRootElement().addContent(carEle);\n doc.getRootElement().addContent(carEle2);\n\n //Einstellen des Formates auf gut lesbares, eingeruecktes Format\n out.setFormat(Format.getPrettyFormat());\n //Versuche in xml Datei zu schreiben\n try {\n out.output(doc, new FileWriter(\"SaveCar.xml\"));\n } catch (IOException e) {\n System.out.println(\"Error opening File\");\n }\n\n\n //Einlesen\n\n File input = new File(\"SaveCar.xml\");\n Document inputDoc = null;\n //Versuche aus xml Datei zu lesen und Document zu instanziieren\n try {\n inputDoc = (Document) sax.build(input);\n } catch (JDOMException e) {\n System.out.println(\"An Error occured\");\n } catch (IOException e) {\n System.out.print(\"Error opening File\");\n }\n\n //Liste von Elementen der jeweiligen Autos\n List<Element> listCar = inputDoc.getRootElement().getChildren(\"car\");\n List<Element> listCar2 = inputDoc.getRootElement().getChildren(\"car2\");\n\n //Ausgabe der Objekte auf der Konsole (manuell)\n printXML(listCar);\n System.out.println();\n printXML(listCar2);\n\n //Erstellen der abgespeicherten Objekte\n Car savedCar1 = createObj(listCar);\n Car savedCar2 = createObj(listCar2);\n\n System.out.println();\n System.out.println(savedCar1);\n System.out.println();\n System.out.println(savedCar2);\n\n}", "public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "void readXML(Element elem) throws XMLSyntaxError;", "@Override\r\n\tpublic void gerarExtratoDetalhado(Conta conta) {\n\t\t\r\n\t\tDate agora = new Date();\r\n\r\n\t\tSystem.out.println(\"\\nData: \" + sdf.format(agora));\r\n\t\tSystem.out.println(\"\\nConta: \" + conta.getNumero());\r\n\t\tSystem.out.println(\"\\nAgencia: \" + conta.getAgencia().getNumero());\r\n\t\tSystem.out.println(\"\\nCliente: \" + conta.getCliente().getNome());\r\n\t\tSystem.out.println(\"\\nSaldo: R$\" + df.format(conta.getSaldo()));\r\n\t\tSystem.out.println(\"\\nTaxa Rendimento: \" + df.format(taxaRendimento) + \"%\");\r\n\t}", "private void loadFile() {\n String xmlContent = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><atomic-mass-table mass-units=\\\"u\\\" abundance-units=\\\"Mole Fraction\\\"><entry symbol=\\\"H\\\" atomic-number=\\\"1\\\"> <natural-abundance> <mass value=\\\"1.00794\\\" error=\\\"0.00007\\\" /> <isotope mass-number=\\\"1\\\"> <mass value=\\\"1.0078250319\\\" error=\\\"0.00000000006\\\" /> <abundance value=\\\"0.999885\\\" error=\\\"0.000070\\\" /> </isotope> <isotope mass-number=\\\"2\\\"> <mass value=\\\"2.0141017779\\\" error=\\\"0.0000000006\\\" /> <abundance value=\\\"0.000115\\\" error=\\\"0.000070\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"He\\\" atomic-number=\\\"2\\\"> <natural-abundance> <mass value=\\\"4.002602\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"3.0160293094\\\" error=\\\"0.0000000012\\\" /> <abundance value=\\\"0.00000134\\\" error=\\\"0.00000003\\\" /> </isotope> <isotope mass-number=\\\"4\\\"> <mass value=\\\"4.0026032497\\\" error=\\\"0.0000000015\\\" /> <abundance value=\\\"0.99999866\\\" error=\\\"0.00000003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Li\\\" atomic-number=\\\"3\\\"> <natural-abundance> <mass value=\\\"6.9421\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"6.0151223\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.0759\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"7\\\"> <mass value=\\\"7.0160041\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.9241\\\" error=\\\"0.0004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Be\\\" atomic-number=\\\"4\\\"> <natural-abundance> <mass value=\\\"9.012182\\\" error=\\\"0.000003\\\" /> <isotope mass-number=\\\"9\\\"> <mass value=\\\"9.0121822\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"B\\\" atomic-number=\\\"5\\\"> <natural-abundance> <mass value=\\\"10.881\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"10\\\"> <mass value=\\\"10.0129371\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.199\\\" error=\\\"0.007\\\" /> </isotope> <isotope mass-number=\\\"11\\\"> <mass value=\\\"11.0093055\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.801\\\" error=\\\"0.007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"C\\\" atomic-number=\\\"6\\\"> <natural-abundance> <mass value=\\\"12.0107\\\" error=\\\"0.0008\\\" /> <isotope mass-number=\\\"12\\\"> <mass value=\\\"12\\\" error=\\\"0\\\" /> <abundance value=\\\"0.9893\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"13\\\"> <mass value=\\\"13.003354838\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.0107\\\" error=\\\"0.0008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"N\\\" atomic-number=\\\"7\\\"> <natural-abundance> <mass value=\\\"14.0067\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"14\\\"> <mass value=\\\"14.0030740074\\\" error=\\\"0.0000000018\\\" /> <abundance value=\\\"0.99636\\\" error=\\\"0.00020\\\" /> </isotope> <isotope mass-number=\\\"15\\\"> <mass value=\\\"15.000108973\\\" error=\\\"0.000000012\\\" /> <abundance value=\\\"0.00364\\\" error=\\\"0.00020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"O\\\" atomic-number=\\\"8\\\"> <natural-abundance> <mass value=\\\"15.9994\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"16\\\"> <mass value=\\\"15.9949146223\\\" error=\\\"0.0000000025\\\" /> <abundance value=\\\"0.99759\\\" error=\\\"0.00016\\\" /> </isotope> <isotope mass-number=\\\"17\\\"> <mass value=\\\"16.99913150\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.00038\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"18\\\"> <mass value=\\\"17.9991604\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.00205\\\" error=\\\"0.00014\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"F\\\" atomic-number=\\\"9\\\"> <natural-abundance> <mass value=\\\"18.9984032\\\" error=\\\"0.0000005\\\" /> <isotope mass-number=\\\"19\\\"> <mass value=\\\"18.99840320\\\" error=\\\"0.00000007\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ne\\\" atomic-number=\\\"10\\\"> <natural-abundance> <mass value=\\\"20.1797\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"20\\\"> <mass value=\\\"19.992440176\\\" error=\\\"0.000000003\\\" /> <abundance value=\\\"0.9048\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"21\\\"> <mass value=\\\"20.99384674\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.0027\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"22\\\"> <mass value=\\\"21.99138550\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0925\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Na\\\" atomic-number=\\\"11\\\"> <natural-abundance> <mass value=\\\"22.989770\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"23\\\"> <mass value=\\\"22.98976966\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mg\\\" atomic-number=\\\"12\\\"> <natural-abundance> <mass value=\\\"24.3050\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"24\\\"> <mass value=\\\"23.98504187\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.7899\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"25\\\"> <mass value=\\\"24.98583700\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1000\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"26\\\"> <mass value=\\\"25.98259300\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1101\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Al\\\" atomic-number=\\\"13\\\"> <natural-abundance> <mass value=\\\"26.981538\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"27\\\"> <mass value=\\\"26.98153841\\\" error=\\\"0.00000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Si\\\" atomic-number=\\\"14\\\"> <natural-abundance> <mass value=\\\"28.0855\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"28\\\"> <mass value=\\\"27.97692649\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.92223\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"29\\\"> <mass value=\\\"28.97649468\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.04685\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"30\\\"> <mass value=\\\"29.97377018\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.03092\\\" error=\\\"0.00011\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"P\\\" atomic-number=\\\"15\\\"> <natural-abundance> <mass value=\\\"30.973761\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"31\\\"> <mass value=\\\"30.97376149\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"S\\\" atomic-number=\\\"16\\\"> <natural-abundance> <mass value=\\\"32.065\\\" error=\\\"0.005\\\" /> <isotope mass-number=\\\"32\\\"> <mass value=\\\"31.97207073\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.9499\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"33\\\"> <mass value=\\\"32.97145854\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.0075\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"34\\\"> <mass value=\\\"33.96786687\\\" error=\\\"0.00000014\\\" /> <abundance value=\\\"0.0425\\\" error=\\\"0.0024\\\" /> </isotope> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96708088\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0001\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cl\\\" atomic-number=\\\"17\\\"> <natural-abundance> <mass value=\\\"35.453\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"35\\\"> <mass value=\\\"34.96885271\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.7576\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"37\\\"> <mass value=\\\"36.96590260\\\" error=\\\"0.00000005\\\" /> <abundance value=\\\"0.2424\\\" error=\\\"0.0010\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ar\\\" atomic-number=\\\"18\\\"> <natural-abundance> <mass value=\\\"39.948\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96754626\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"0.0003365\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"38\\\"> <mass value=\\\"37.9627322\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.000632\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.962383124\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.996003\\\" error=\\\"0.000030\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"K\\\" atomic-number=\\\"19\\\"> <natural-abundance> <mass value=\\\"39.0983\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"39\\\"> <mass value=\\\"38.9637069\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.932581\\\" error=\\\"0.000044\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.96399867\\\" error=\\\"0.00000029\\\" /> <abundance value=\\\"0.000117\\\" error=\\\"0.000001\\\" /> </isotope> <isotope mass-number=\\\"41\\\"> <mass value=\\\"40.96182597\\\" error=\\\"0.00000028\\\" /> <abundance value=\\\"0.067302\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ca\\\" atomic-number=\\\"20\\\"> <natural-abundance> <mass value=\\\"40.078\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.9625912\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.96941\\\" error=\\\"0.00156\\\" /> </isotope> <isotope mass-number=\\\"42\\\"> <mass value=\\\"41.9586183\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.00647\\\" error=\\\"0.00023\\\" /> </isotope> <isotope mass-number=\\\"43\\\"> <mass value=\\\"42.9587668\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.00135\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"44\\\"> <mass value=\\\"43.9554811\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.02086\\\" error=\\\"0.00110\\\" /> </isotope> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9536927\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.00004\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.952533\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00187\\\" error=\\\"0.00021\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sc\\\" atomic-number=\\\"21\\\"> <natural-abundance> <mass value=\\\"44.955910\\\" error=\\\"0.000008\\\" /> <isotope mass-number=\\\"45\\\"> <mass value=\\\"44.9559102\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ti\\\" atomic-number=\\\"22\\\"> <natural-abundance> <mass value=\\\"47.867\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9526295\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"0.0825\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"47\\\"> <mass value=\\\"46.9517637\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0744\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.9479470\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.7372\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"49\\\"> <mass value=\\\"48.9478707\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0541\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"V\\\" atomic-number=\\\"23\\\"> <natural-abundance> <mass value=\\\"50.9415\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9471627\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.00250\\\" error=\\\"0.00004\\\" /> </isotope> <isotope mass-number=\\\"51\\\"> <mass value=\\\"50.9439635\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.99750\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cr\\\" atomic-number=\\\"24\\\"> <natural-abundance> <mass value=\\\"51.9961\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9460495\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.04345\\\" error=\\\"0.00013\\\" /> </isotope> <isotope mass-number=\\\"52\\\"> <mass value=\\\"51.9405115\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.83789\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"53\\\"> <mass value=\\\"52.9406534\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.09501\\\" error=\\\"0.00017\\\" /> </isotope> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.938846\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02365\\\" error=\\\"0.00007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mn\\\" atomic-number=\\\"25\\\"> <natural-abundance> <mass value=\\\"54.938049\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"55\\\"> <mass value=\\\"54.9380493\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Fe\\\" atomic-number=\\\"26\\\"> <natural-abundance> <mass value=\\\"55.845\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.9396147\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.05845\\\" error=\\\"0.00035\\\" /> </isotope> <isotope mass-number=\\\"56\\\"> <mass value=\\\"55.9349418\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.91754\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"57\\\"> <mass value=\\\"56.9353983\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02119\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9332801\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.00282\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Co\\\" atomic-number=\\\"27\\\"> <natural-abundance> <mass value=\\\"58.933200\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"59\\\"> <mass value=\\\"59.9331999\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ni\\\" atomic-number=\\\"28\\\"> <natural-abundance> <mass value=\\\"58.6934\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9353477\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.680769\\\" error=\\\"0.000089\\\" /> </isotope> <isotope mass-number=\\\"60\\\"> <mass value=\\\"59.9307903\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.262231\\\" error=\\\"0.000077\\\" /> </isotope> <isotope mass-number=\\\"61\\\"> <mass value=\\\"60.9310601\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.011399\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"62\\\"> <mass value=\\\"61.9283484\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0036345\\\" error=\\\"0.000017\\\" /> </isotope> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9279692\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.009256\\\" error=\\\"0.000009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cu\\\" atomic-number=\\\"29\\\"> <natural-abundance> <mass value=\\\"63.546\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"63\\\"> <mass value=\\\"62.9296007\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.6915\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"65\\\"> <mass value=\\\"64.9277938\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3085\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zn\\\" atomic-number=\\\"30\\\"> <natural-abundance> <mass value=\\\"65.409\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9291461\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.48268\\\" error=\\\"0.00321\\\" /> </isotope> <isotope mass-number=\\\"66\\\"> <mass value=\\\"65.9260364\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.27975\\\" error=\\\"0.00077\\\" /> </isotope> <isotope mass-number=\\\"67\\\"> <mass value=\\\"66.9271305\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.04102\\\" error=\\\"0.00021\\\" /> </isotope> <isotope mass-number=\\\"68\\\"> <mass value=\\\"67.9248473\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.19024\\\" error=\\\"0.00123\\\" /> </isotope> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.925325\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00631\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ga\\\" atomic-number=\\\"31\\\"> <natural-abundance> <mass value=\\\"69.723\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"69\\\"> <mass value=\\\"68.925581\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.60108\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"71\\\"> <mass value=\\\"70.9247073\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.39892\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ge\\\" atomic-number=\\\"32\\\"> <natural-abundance> <mass value=\\\"72.64\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.9242500\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.2038\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"72\\\"> <mass value=\\\"71.9220763\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2731\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"73\\\"> <mass value=\\\"72.9234595\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0776\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9211784\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.3672\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9214029\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0783\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"As\\\" atomic-number=\\\"33\\\"> <natural-abundance> <mass value=\\\"74.92160\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"75\\\"> <mass value=\\\"74.9215966\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Se\\\" atomic-number=\\\"34\\\"> <natural-abundance> <mass value=\\\"78.96\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9224767\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9192143\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0937\\\" error=\\\"0.0029\\\" /> </isotope> <isotope mass-number=\\\"77\\\"> <mass value=\\\"76.9199148\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0763\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.9173097\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2377\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.9165221\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.4961\\\" error=\\\"0.0041\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9167003\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.0873\\\" error=\\\"0.0022\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Br\\\" atomic-number=\\\"35\\\"> <natural-abundance> <mass value=\\\"79.904\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"79\\\"> <mass value=\\\"78.9183379\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.5069\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"81\\\"> <mass value=\\\"80.916291\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4931\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Kr\\\" atomic-number=\\\"36\\\"> <natural-abundance> <mass value=\\\"83.798\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.920388\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00355\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.916379\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.02286\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9134850\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.11593\\\" error=\\\"0.00031\\\" /> </isotope> <isotope mass-number=\\\"83\\\"> <mass value=\\\"82.914137\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11500\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.911508\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.56987\\\" error=\\\"0.00015\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.910615\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.17279\\\" error=\\\"0.00041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rb\\\" atomic-number=\\\"37\\\"> <natural-abundance> <mass value=\\\"85.4678\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"85\\\"> <mass value=\\\"84.9117924\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.7217\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9091858\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.2783\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sr\\\" atomic-number=\\\"38\\\"> <natural-abundance> <mass value=\\\"87.62\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.913426\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0056\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.9092647\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0986\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9088816\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0700\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"88\\\"> <mass value=\\\"87.9056167\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.8258\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Y\\\" atomic-number=\\\"39\\\"> <natural-abundance> <mass value=\\\"88.90585\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"89\\\"> <mass value=\\\"88.9058485\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zr\\\" atomic-number=\\\"40\\\"> <natural-abundance> <mass value=\\\"91.224\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"90\\\"> <mass value=\\\"89.9047022\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"0.5145\\\" error=\\\"0.0040\\\" /> </isotope> <isotope mass-number=\\\"91\\\"> <mass value=\\\"90.9056434\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1122\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.9050386\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1715\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9063144\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.1738\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.908275\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0280\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nb\\\" atomic-number=\\\"41\\\"> <natural-abundance> <mass value=\\\"92.90638\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"93\\\"> <mass value=\\\"92.9063762\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mo\\\" atomic-number=\\\"42\\\"> <natural-abundance> <mass value=\\\"95.94\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.906810\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.1477\\\" error=\\\"0.0031\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9050867\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0923\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"95\\\"> <mass value=\\\"94.9058406\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1590\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.9046780\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1668\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"97\\\"> <mass value=\\\"96.9030201\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0956\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.9054069\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.2419\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.907476\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0967\\\" error=\\\"0.0020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ru\\\" atomic-number=\\\"44\\\"> <natural-abundance> <mass value=\\\"101.07\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.907604\\\" error=\\\"0.000009\\\" /> <abundance value=\\\"0.0554\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.905287\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.0187\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"99\\\"> <mass value=\\\"98.9059385\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\".01276\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.9042189\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1260\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"101\\\"> <mass value=\\\"100.9055815\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1706\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.9043488\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.3155\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.905430\\\" error=\\\".01862\\\" /> <abundance value=\\\"0.1862\\\" error=\\\"0.0027\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rh\\\" atomic-number=\\\"45\\\"> <natural-abundance> <mass value=\\\"1025.90550\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"103\\\"> <mass value=\\\"102.905504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pd\\\" atomic-number=\\\"46\\\"> <natural-abundance> <mass value=\\\"106.42\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.905607\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0102\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.904034\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.1114\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"105\\\"> <mass value=\\\"104.905083\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2233\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.903484\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2733\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.903895\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.2646\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.905153\\\" error=\\\"0.000012\\\" /> <abundance value=\\\"0.1172\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ag\\\" atomic-number=\\\"47\\\"> <natural-abundance> <mass value=\\\"107.8682\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"107\\\"> <mass value=\\\"106.905093\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.51839\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"109\\\"> <mass value=\\\"108.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.48161\\\" error=\\\"0.00008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cd\\\" atomic-number=\\\"48\\\"> <natural-abundance> <mass value=\\\"112.411\\\" error=\\\"0.008\\\" /> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.906458\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0125\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.904183\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.903006\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1249\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"111\\\"> <mass value=\\\"110.904182\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1280\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.9027577\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2413\\\" error=\\\"0.0021\\\" /> </isotope> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.9044014\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1222\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.9033586\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2873\\\" error=\\\"0.0042\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0749\\\" error=\\\"0.0018\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"In\\\" atomic-number=\\\"49\\\"> <natural-abundance> <mass value=\\\"114.818\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.904062\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0429\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903879\\\" error=\\\"0.000040\\\" /> <abundance value=\\\"0.9571\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sn\\\" atomic-number=\\\"50\\\"> <natural-abundance> <mass value=\\\"118.710\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.904822\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0097\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.902783\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0066\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903347\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0034\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.901745\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1454\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"117\\\"> <mass value=\\\"116.902955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0768\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"118\\\"> <mass value=\\\"117.901608\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2422\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"119\\\"> <mass value=\\\"118.903311\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0859\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.9021985\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3258\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9034411\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0463\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9052745\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0579\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sb\\\" atomic-number=\\\"51\\\"> <natural-abundance> <mass value=\\\"121.760\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"121\\\"> <mass value=\\\"120.9038222\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.5721\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042160\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.4279\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Te\\\" atomic-number=\\\"52\\\"> <natural-abundance> <mass value=\\\"127.60\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.904026\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.0009\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9030558\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0255\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042711\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9028188\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0474\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"125\\\"> <mass value=\\\"124.9044241\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0707\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.9033049\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1884\\\" error=\\\"0.0025\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9044615\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3174\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9062229\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.3408\\\" error=\\\"0.0062\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"I\\\" atomic-number=\\\"53\\\"> <natural-abundance> <mass value=\\\"126.90447\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"127\\\"> <mass value=\\\"126.904468\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Xe\\\" atomic-number=\\\"54\\\"> <natural-abundance> <mass value=\\\"131.293\\\" error=\\\"0.006\\\" /> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9058954\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.000952\\\" error=\\\"0.000003\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.904268\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.000890\\\" error=\\\"0.000002\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9035305\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.019102\\\" error=\\\"0.000008\\\" /> </isotope> <isotope mass-number=\\\"129\\\"> <mass value=\\\"128.9047799\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.264006\\\" error=\\\"0.000082\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9035089\\\" error=\\\"0.0000011\\\" /> <abundance value=\\\"0.040710\\\" error=\\\"0.000013\\\" /> </isotope> <isotope mass-number=\\\"131\\\"> <mass value=\\\"130.9050828\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.212324\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.9041546\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.269086\\\" error=\\\"0.000033\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.9053945\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.104357\\\" error=\\\"0.000021\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907220\\\" error=\\\"0.000008\\\" /> <abundance value=\\\"0.088573\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cs\\\" atomic-number=\\\"55\\\"> <natural-abundance> <mass value=\\\"132.90545\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"133\\\"> <mass value=\\\"132.905447\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ba\\\" atomic-number=\\\"56\\\"> <natural-abundance> <mass value=\\\"137.327\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.906311\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00106\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.905056\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00101\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.904504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02417\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"135\\\"> <mass value=\\\"134.905684\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.000003\\\" error=\\\"0.00012\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.904571\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.07854\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"137\\\"> <mass value=\\\"136.905822\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.11232\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905242\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.71698\\\" error=\\\"0.00042\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"La\\\" atomic-number=\\\"57\\\"> <natural-abundance> <mass value=\\\"138.9055\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.907108\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00090\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"139\\\"> <mass value=\\\"138.906349\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.99910\\\" error=\\\"0.00001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ce\\\" atomic-number=\\\"58\\\"> <natural-abundance> <mass value=\\\"140.116\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907140\\\" error=\\\"0.000050\\\" /> <abundance value=\\\"0.00185\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905986\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.00251\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"140\\\"> <mass value=\\\"139.905\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.88450\\\" error=\\\"0.00051\\\" /> </isotope> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.909241\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11114\\\" error=\\\"0.00051\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pr\\\" atomic-number=\\\"59\\\"> <natural-abundance> <mass value=\\\"140.90765\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"141\\\"> <mass value=\\\"140.907648\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nd\\\" atomic-number=\\\"60\\\"> <natural-abundance> <mass value=\\\"144.24\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.907719\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.272\\\" error=\\\"0.005\\\" /> </isotope> <isotope mass-number=\\\"143\\\"> <mass value=\\\"142.909810\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.122\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.910083\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.238\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"145\\\"> <mass value=\\\"144.912569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.083\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"146\\\"> <mass value=\\\"145.913113\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.172\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.916889\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.057\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.920887\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.056\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sm\\\" atomic-number=\\\"62\\\"> <natural-abundance> <mass value=\\\"150.36\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.911996\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0307\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"147\\\"> <mass value=\\\"146.914894\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1499\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.914818\\\" error=\\\"0.1124\\\" /> <abundance value=\\\"0.1124\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"149\\\"> <mass value=\\\"148.917180\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1382\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.917272\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0738\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919729\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2675\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.922206\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2275\\\" error=\\\"0.0029\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Eu\\\" atomic-number=\\\"63\\\"> <natural-abundance> <mass value=\\\"151.964\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"151\\\"> <mass value=\\\"150.919846\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4781\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"153\\\"> <mass value=\\\"152.921227\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.5219\\\" error=\\\"0.0006\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Gd\\\" atomic-number=\\\"64\\\"> <natural-abundance> <mass value=\\\"157.25\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919789\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0020\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.920862\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0218\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"155\\\"> <mass value=\\\"154.922619\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1480\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.922120\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2047\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"157\\\"> <mass value=\\\"156.923957\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1565\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924101\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2484\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.927051\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2186\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tb\\\" atomic-number=\\\"65\\\"> <natural-abundance> <mass value=\\\"158.92534\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"159\\\"> <mass value=\\\"158.925343\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Dy\\\" atomic-number=\\\"66\\\"> <natural-abundance> <mass value=\\\"162.500\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.924278\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00056\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924405\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00095\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.925194\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02329\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"161\\\"> <mass value=\\\"160.926930\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.18889\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.926795\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25475\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"163\\\"> <mass value=\\\"162.928728\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.24896\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929171\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.28260\\\" error=\\\"0.00054\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ho\\\" atomic-number=\\\"67\\\"> <natural-abundance> <mass value=\\\"164.93032\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"165\\\"> <mass value=\\\"164.930319\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Er\\\" atomic-number=\\\"68\\\"> <natural-abundance> <mass value=\\\"167.259\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.928775\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00139\\\" error=\\\"0.00005\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929197\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.01601\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"166\\\"> <mass value=\\\"165.930290\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33503\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"167\\\"> <mass value=\\\"166.932046\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.22869\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.932368\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.26978\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.935461\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.14910\\\" error=\\\"0.00036\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tm\\\" atomic-number=\\\"69\\\"> <natural-abundance> <mass value=\\\"168.93421\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"169\\\"> <mass value=\\\"168.934211\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Yb\\\" atomic-number=\\\"70\\\"> <natural-abundance> <mass value=\\\"173.04\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.933895\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0013\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.934759\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0304\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"171\\\"> <mass value=\\\"170.936323\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1428\\\" error=\\\"0.0057\\\" /> </isotope> <isotope mass-number=\\\"172\\\"> <mass value=\\\"171.936378\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2183\\\" error=\\\"0.0067\\\" /> </isotope> <isotope mass-number=\\\"173\\\"> <mass value=\\\"172.938207\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1613\\\" error=\\\"0.0027\\\" /> </isotope> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.938858\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3183\\\" error=\\\"0.0092\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.942569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1276\\\" error=\\\"0.0041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Lu\\\" atomic-number=\\\"71\\\"> <natural-abundance> <mass value=\\\"174.967\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"175\\\"> <mass value=\\\"174.9407682\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.9741\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.9426827\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.0259\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hf\\\" atomic-number=\\\"72\\\"> <natural-abundance> <mass value=\\\"178.49\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.940042\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0016\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.941403\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0526\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"177\\\"> <mass value=\\\"176.9432204\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1860\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"178\\\"> <mass value=\\\"177.9436981\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.2728\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"179\\\"> <mass value=\\\"178.9488154\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1362\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.9465488\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3508\\\" error=\\\"0.0016\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ta\\\" atomic-number=\\\"73\\\"> <natural-abundance> <mass value=\\\"180.9479\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.947466\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00012\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"181\\\"> <mass value=\\\"180.947996\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.99988\\\" error=\\\"0.00002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"W\\\" atomic-number=\\\"74\\\"> <natural-abundance> <mass value=\\\"183.84\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.946706\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0012\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"182\\\"> <mass value=\\\"181.948205\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.265\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"183\\\"> <mass value=\\\"182.9502242\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1431\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.9509323\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.3064\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.954362\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2843\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Re\\\" atomic-number=\\\"75\\\"> <natural-abundance> <mass value=\\\"186.207\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"185\\\"> <mass value=\\\"184.952955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3740\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557505\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.6260\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Os\\\" atomic-number=\\\"76\\\"> <natural-abundance> <mass value=\\\"190.23\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.952491\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0002\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.953838\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0159\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557476\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.0196\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"188\\\"> <mass value=\\\"187.9558357\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1324\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"189\\\"> <mass value=\\\"188.958145\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1615\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.958445\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2626\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961479\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.4078\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ir\\\" atomic-number=\\\"77\\\"> <natural-abundance> <mass value=\\\"192.217\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"191\\\"> <mass value=\\\"190.960591\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.373\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"193\\\"> <mass value=\\\"192.962923\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.627\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pt\\\" atomic-number=\\\"78\\\"> <natural-abundance> <mass value=\\\"195.078\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.959930\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00014\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961035\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00782\\\" error=\\\"0.00007\\\" /> </isotope> <isotope mass-number=\\\"194\\\"> <mass value=\\\"193.962663\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.32967\\\" error=\\\"0.00099\\\" /> </isotope> <isotope mass-number=\\\"195\\\"> <mass value=\\\"194.964774\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33832\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.964934\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25242\\\" error=\\\"0.00041\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.967875\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.07163\\\" error=\\\"0.00055\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Au\\\" atomic-number=\\\"79\\\"> <natural-abundance> <mass value=\\\"196.96655\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"197\\\"> <mass value=\\\"196.966551\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hg\\\" atomic-number=\\\"80\\\"> <natural-abundance> <mass value=\\\"200.59\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.965814\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0015\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.966752\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0997\\\" error=\\\"0.0020\\\" /> </isotope> <isotope mass-number=\\\"199\\\"> <mass value=\\\"198.968262\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1687\\\" error=\\\"0.0022\\\" /> </isotope> <isotope mass-number=\\\"200\\\"> <mass value=\\\"199.968309\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2310\\\" error=\\\"0.0019\\\" /> </isotope> <isotope mass-number=\\\"201\\\"> <mass value=\\\"200.970285\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1318\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"202\\\"> <mass value=\\\"201.970625\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2986\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973475\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0687\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tl\\\" atomic-number=\\\"81\\\"> <natural-abundance> <mass value=\\\"204.3833\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"203\\\"> <mass value=\\\"202.972329\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2952\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"205\\\"> <mass value=\\\"204.974412\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.7048\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pb\\\" atomic-number=\\\"82\\\"> <natural-abundance> <mass value=\\\"207.2\\\" error=\\\"0.1\\\" /> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973028\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.014\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"206\\\"> <mass value=\\\"205.974449\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.241\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"207\\\"> <mass value=\\\"206.975880\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.221\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"208\\\"> <mass value=\\\"207.976636\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.524\\\" error=\\\"0.001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Bi\\\" atomic-number=\\\"83\\\"> <natural-abundance> <mass value=\\\"208.98038\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"209\\\"> <mass value=\\\"208.980384\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Th\\\" atomic-number=\\\"90\\\"> <natural-abundance> <mass value=\\\"232.0381\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"232\\\"> <mass value=\\\"232.0380495\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pa\\\" atomic-number=\\\"91\\\"> <natural-abundance> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"231\\\"> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"U\\\" atomic-number=\\\"92\\\"> <natural-abundance> <mass value=\\\"238.02891\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"234\\\"> <mass value=\\\"234.0409447\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.000054\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"235\\\"> <mass value=\\\"235.0439222\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.007204\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"238\\\"> <mass value=\\\"238.0507835\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.992742\\\" error=\\\"0.000010\\\" /> </isotope> </natural-abundance> </entry></atomic-mass-table>\";\n try {\n// this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);\n this.document = XMLParser.parse(xmlContent);\n } catch (Exception e) {\n throw new RuntimeException(\"Error reading atomic_system.xml.\");\n }\n\n NodeList nodes = document.getElementsByTagName(\"entry\");\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n String symbol = node.getAttributes().getNamedItem(\"symbol\").getNodeValue();\n\n entries.put(symbol, new Entry(node));\n }\n }", "@Override\n public void endElement(String uri, String localName, String qName) throws SAXException {\n\n //Verificar se a TAG 'produto' chegou ao fim. Se chegou podemos adicionar o produto no array\n if(qName.equals(\"produto\")) {\n\n produtos.add(produto);\n \n //Verificar se a TAG nome hegou ao fim. se chegou podemos atribui-la ao produto\n } else if(qName.equals(\"nome\")) {\n\n produto.setNome(conteudo.toString());\n\n //Verificar se a TAG preco hegou ao fim. se chegou podemos atribui-la ao produto\n } else if(qName.equals(\"preco\")) {\n\n produto.setPreco(Double.parseDouble(conteudo.toString()));\n }\n\n\n }", "private void testProXml(){\n\t}", "public static void subirXMLFTP(String cotizacionId,String xml) {\n\t\tDocumentBuilderFactory factory;\r\n\t DocumentBuilder builder;\r\n\t Document doc;\r\n\t TransformerFactory tFactory;\r\n\t Transformer transformer;\r\n\t \r\n\t String nombreArchivo = cotizacionId+\".xml\";\r\n\t\ttry {\r\n\t\t\tfactory \t\t\t= DocumentBuilderFactory.newInstance();\r\n\t\t\tbuilder \t\t\t= factory.newDocumentBuilder();\r\n\t\t\tdoc \t\t\t\t= builder.parse(new InputSource(new StringReader(xml)));\r\n\t\t\t// Usamos un transformador para la salida del archivo xml generado\r\n\t\t\ttFactory \t\t\t= TransformerFactory.newInstance();\r\n\t\t transformer \t\t= tFactory.newTransformer();\r\n\t\t DOMSource source \t= new DOMSource(doc);\t\t \r\n\t\t StreamResult result = new StreamResult(new File(\"/home/insis/\"+nombreArchivo));\r\n\t\t transformer.transform(source, result);\r\n\t\t \r\n\t\t \r\n\t\t} catch (SAXException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerException e) {\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n}", "public void readXML() {\n\t try {\n\n\t \t//getting xml file\n\t \t\tFile fXmlFile = new File(\"cards.xml\");\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t \n\t\t\t//doc.getDocumentElement().normalize(); ???\n\t\t \n\t\t \t//inserting card IDs and Effects into arrays\n\t\t\tNodeList nList = doc.getElementsByTagName(\"card\");\n\t\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\t\tNode nNode = nList.item(i);\n\t\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement eElement = (Element) nNode;\n\t\t\t\t\tint id = Integer.parseInt(eElement.getAttribute(\"id\"));\n\t\t\t\t\tString effect = eElement.getElementsByTagName(\"effect\").item(0).getTextContent();\n\t\t\t\t\tidarr.add(id);\n\t\t\t\t\teffsarr.add(effect);\n\t\t\t\t}\n\t\t\t}\n\t } catch (Exception e) {\n\t\t\te.printStackTrace();\n\t }\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n//\t\ttag=localName;\n//\t\t\tif(localName.equals(\"nombre\")){\n//\t\t\t\tSystem.out.print(\"AUTOR :\");\n//\t\t\t}\n//\t\t\tif(localName.equals(\"descripcion\")){\n//\t\t\t\tSystem.out.print(\"Descripcion:\");\n//\t\t\t}\n\t\t\tswitch(localName){\n\t\t\tcase \"autor\":\n\t\t\t\tautor=new Autor(\"\",attributes.getValue(\"url\"),\"\");\n\t\t\t\tbreak;\n\t\t\tcase \"frase\":\n\t\t\t\tfrase=new Frase(\"\",\"\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(localName.equals(\"autor\")){\n\t\t\t\t\n\t\t\t\t//url=attributes.getValue(\"url\");\n\t\t\t}\n\t\t\t//System.out.println(\"Start \"+localName);\n\t}", "public void xmlPresentation () {\n System.out.println ( \"****** XML Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n Books books = new Books();\n books.setBooks(new ArrayList<Book>());\n\n bookArrayList = new Request().postRequestBook();\n\n for (Book aux: bookArrayList) {\n books.getBooks().add(aux);\n }\n\n try {\n javax.xml.bind.JAXBContext jaxbContext = JAXBContext.newInstance(Books.class);\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n jaxbMarshaller.marshal(books, System.out);\n } catch (JAXBException e) {\n System.out.println(\"Error: \"+ e);\n }\n ClientEntry.showMenu ( );\n }", "Element toXML();", "public static void testXmlImport() {\n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"codigo\"));\n \n elementList.add(localCodigo==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCodigo));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"bloqueado\"));\n \n elementList.add(localBloqueado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localBloqueado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"estado\"));\n \n \n elementList.add(localEstado==null?null:\n localEstado);\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"fechaFacturado\"));\n \n elementList.add(localFechaFacturado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFechaFacturado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"fechaSolicitud\"));\n \n elementList.add(localFechaSolicitud==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFechaSolicitud));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"flete\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFlete));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"motivoRechazo\"));\n \n \n elementList.add(localMotivoRechazo==null?null:\n localMotivoRechazo);\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"observacion\"));\n \n elementList.add(localObservacion==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localObservacion));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"origen\"));\n \n elementList.add(localOrigen==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOrigen));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoDescuento\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoDescuento));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoEstimado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoEstimado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoSolicitado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoSolicitado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoFacturado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoFacturado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoFacturadoSinDescuento\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoFacturadoSinDescuento));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"percepcion\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPercepcion));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"cantidadCUVErrado\"));\n \n elementList.add(localCantidadCUVErrado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCantidadCUVErrado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"cantidadFaltanteAnunciado\"));\n \n elementList.add(localCantidadFaltanteAnunciado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCantidadFaltanteAnunciado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoPedidoRechazado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoPedidoRechazado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoCatalogoEstimado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoCatalogoEstimado));\n \n if (localPedidoDetalle!=null) {\n for (int i = 0;i < localPedidoDetalle.length;i++){\n\n if (localPedidoDetalle[i] != null){\n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"pedidoDetalle\"));\n elementList.add(localPedidoDetalle[i]);\n } else {\n \n throw new org.apache.axis2.databinding.ADBException(\"pedidoDetalle cannot be null !!\");\n \n }\n\n }\n } else {\n \n throw new org.apache.axis2.databinding.ADBException(\"pedidoDetalle cannot be null!!\");\n \n }\n\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public void setFilaDatosExportarXmlLiquidacionImpuestoImpor(LiquidacionImpuestoImpor liquidacionimpuestoimpor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(LiquidacionImpuestoImporConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(liquidacionimpuestoimpor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(LiquidacionImpuestoImporConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(liquidacionimpuestoimpor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementpedidocompraimpor_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDPEDIDOCOMPRAIMPOR);\r\n\t\telementpedidocompraimpor_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getpedidocompraimpor_descripcion()));\r\n\t\telement.appendChild(elementpedidocompraimpor_descripcion);\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementcliente_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDCLIENTE);\r\n\t\telementcliente_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcliente_descripcion()));\r\n\t\telement.appendChild(elementcliente_descripcion);\r\n\r\n\t\tElement elementfactura_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDFACTURA);\r\n\t\telementfactura_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfactura_descripcion()));\r\n\t\telement.appendChild(elementfactura_descripcion);\r\n\r\n\t\tElement elementnumero_comprobante = document.createElement(LiquidacionImpuestoImporConstantesFunciones.NUMEROCOMPROBANTE);\r\n\t\telementnumero_comprobante.appendChild(document.createTextNode(liquidacionimpuestoimpor.getnumero_comprobante().trim()));\r\n\t\telement.appendChild(elementnumero_comprobante);\r\n\r\n\t\tElement elementnumero_dui = document.createElement(LiquidacionImpuestoImporConstantesFunciones.NUMERODUI);\r\n\t\telementnumero_dui.appendChild(document.createTextNode(liquidacionimpuestoimpor.getnumero_dui().trim()));\r\n\t\telement.appendChild(elementnumero_dui);\r\n\r\n\t\tElement elementfecha = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FECHA);\r\n\t\telementfecha.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfecha().toString().trim()));\r\n\t\telement.appendChild(elementfecha);\r\n\r\n\t\tElement elementfecha_pago = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FECHAPAGO);\r\n\t\telementfecha_pago.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfecha_pago().toString().trim()));\r\n\t\telement.appendChild(elementfecha_pago);\r\n\r\n\t\tElement elementfob = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FOB);\r\n\t\telementfob.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfob().toString().trim()));\r\n\t\telement.appendChild(elementfob);\r\n\r\n\t\tElement elementseguro = document.createElement(LiquidacionImpuestoImporConstantesFunciones.SEGURO);\r\n\t\telementseguro.appendChild(document.createTextNode(liquidacionimpuestoimpor.getseguro().toString().trim()));\r\n\t\telement.appendChild(elementseguro);\r\n\r\n\t\tElement elementflete = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FLETE);\r\n\t\telementflete.appendChild(document.createTextNode(liquidacionimpuestoimpor.getflete().toString().trim()));\r\n\t\telement.appendChild(elementflete);\r\n\r\n\t\tElement elementporcentaje_fodi = document.createElement(LiquidacionImpuestoImporConstantesFunciones.PORCENTAJEFODI);\r\n\t\telementporcentaje_fodi.appendChild(document.createTextNode(liquidacionimpuestoimpor.getporcentaje_fodi().toString().trim()));\r\n\t\telement.appendChild(elementporcentaje_fodi);\r\n\r\n\t\tElement elementporcentaje_iva = document.createElement(LiquidacionImpuestoImporConstantesFunciones.PORCENTAJEIVA);\r\n\t\telementporcentaje_iva.appendChild(document.createTextNode(liquidacionimpuestoimpor.getporcentaje_iva().toString().trim()));\r\n\t\telement.appendChild(elementporcentaje_iva);\r\n\r\n\t\tElement elementtasa_control = document.createElement(LiquidacionImpuestoImporConstantesFunciones.TASACONTROL);\r\n\t\telementtasa_control.appendChild(document.createTextNode(liquidacionimpuestoimpor.gettasa_control().toString().trim()));\r\n\t\telement.appendChild(elementtasa_control);\r\n\r\n\t\tElement elementcfr = document.createElement(LiquidacionImpuestoImporConstantesFunciones.CFR);\r\n\t\telementcfr.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcfr().toString().trim()));\r\n\t\telement.appendChild(elementcfr);\r\n\r\n\t\tElement elementcif = document.createElement(LiquidacionImpuestoImporConstantesFunciones.CIF);\r\n\t\telementcif.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcif().toString().trim()));\r\n\t\telement.appendChild(elementcif);\r\n\r\n\t\tElement elementtotal = document.createElement(LiquidacionImpuestoImporConstantesFunciones.TOTAL);\r\n\t\telementtotal.appendChild(document.createTextNode(liquidacionimpuestoimpor.gettotal().toString().trim()));\r\n\t\telement.appendChild(elementtotal);\r\n\t}", "public void parseXML(String xmlString) {\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); \n Document document = null; \n try { \n //DOM parser instance \n DocumentBuilder builder = builderFactory.newDocumentBuilder(); \n \n //parse an XML file into a DOM tree, in this case, change the filepath to xml String \n document = builder.parse(new File(filePath));\n \n //get root element, which is <Airports>\n Element rootElement = document.getDocumentElement(); \n \n //traverse child elements. retrieve all the <Airport>\n NodeList nodes = rootElement.getChildNodes(); \n for (int i=0; i < nodes.getLength(); i++) \n { \n Node node = nodes.item(i); \n if (node.getNodeType() == Node.ELEMENT_NODE) { \n Element airport = (Element) node; \n \n //process child element \n String code = airport.getAttribute(\"Code\");\n String name = airport.getAttribute(\"Name\"); \n \n // child node of airport\n NodeList airportChildren = airport.getChildNodes();\n \n // value of longitude & latitude\n String longitude = airportChildren.item(1).getTextContent();\n String latitude = airportChildren.item(2).getTextContent();\n \n Location location = new Location(longitude, latitude);\n airportList.add(new Airport(code, name, location));\n } \n } \n \n // another approach to traverse all the listNode by tagName \n /*NodeList nodeList = rootElement.getElementsByTagName(\"book\"); \n if(nodeList != null) \n { \n for (int i = 0 ; i < nodeList.getLength(); i++) \n { \n Element element = (Element)nodeList.item(i); \n String id = element.getAttribute(\"id\"); \n } \n }*/\n // add the DOM object to the airportList\n } catch (ParserConfigurationException e) { \n e.printStackTrace(); \n } catch (SAXException e) { \n e.printStackTrace(); \n } catch (IOException e) { \n e.printStackTrace(); \n } \n }", "void simpleContent(ComplexTypeSG type) throws SAXException;", "@Override\n public String getXmlDocument( HttpServletRequest request )\n {\n return XmlUtil.getXmlHeader( ) + getXml( request );\n }", "public static GetVehicleAlarmInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPage object =\n new GetVehicleAlarmInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static void readXML(){\n try{\n Document doc = getDoc(\"config.xml\");\n Element root = doc.getRootElement();\n\n //Muestra los elementos dentro de la configuracion del xml\n \n System.out.println(\"Color : \" + root.getChildText(\"color\"));\n System.out.println(\"Pattern : \" + root.getChildText(\"pattern\"));\n System.out.println(\"Background : \" + root.getChildText(\"background\"));\n \n\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "@Override\n protected void loadXMLDescription() {\n\n }", "@Override\n public void endElement(String uri, String localName,\n String qName) throws SAXException {\ntry{\n if (currentField.equals(\"vypis\")) {\n String hodnota = stringBuffer.toString();\n scanner = new Scanner(hodnota);\n while (scanner.hasNextLine()) {\n String veta=scanner.nextLine();\n //tady otchytavam vety tarifikace\n\n System.out.println(veta);\n //String[] radky = veta.split(\"\\n\");\n //for (int radek=0;radek<radky.length;radek++){\n // System.out.println(\"tak radek \"+ radek + \" : \"+radky[radek]);\n String[] temp = veta.split(\";\");// radky[radek].split(\";\"); //rozdelim string po castech do pole sringu, oddelovac je strednik\n // System.out.println(\"velikost vety je:\"+temp.length);\n if (temp.length == 13) { //pravidelne na stejnem vzorku se vzdy stane po x desitkach radek, ze neni vse, posledni znak je utnut a vlozen jako jediny do dalsiho value\n String sql = \"insert into tarifikace(_z,_na,pole2,kdy,priznak1,priznak2,popis,pole7,delka,pole10,pole11,pole12,pole13) values('\" + temp[0].trim() + \"','\" + temp[1] + \"','\" + temp[2] + \"','\" + temp[3] + \"','\" + temp[4] + \"','\" + temp[5] + \"','\" + temp[6] + \"','\" + temp[7] + \"',\" + temp[8] + \",'\" + temp[9] + \"','\" + temp[10] + \"','\" + temp[11] + \"','\" + temp[12] + \"')\";\n \n try {\n if(d.existujeTarifikace(temp[0].trim(),temp[1], temp[3]))\n {\n //System.out.println(\"sql :\" + sql);\n Menu.log1.info(\"Tarifikace: linka \"+temp[0]+\" cil \"+temp[1]+\" datum \"+temp[3]+\" delka\"+temp[8]);\n d.update(sql);\n if (temp[11].length() < 1) {\n temp[11] = \"0\";// a mam tu problem trun se jmenuje \"vyskocilova\" tak dam natvrdo \"0\"\n }\n if (temp[5].contains(\"Y\")) {\n Menu.single.execute(new Caracas(c.tatifikace(temp[0].trim(), temp[1], temp[3], Integer.parseInt(temp[8]), \"0\")));//c.zapis(c.tatifikace(temp[0].trim(), temp[1], temp[3], Integer.parseInt(temp[8]), \"0\"));\n }}else{\n //System.out.println(\"zaznam jiz v tarifikaci existuje\");\n }\n } catch (Exception ex) {\n Menu.log1.severe(\"Chyba - sql: \"+sql);\n Logger.getLogger(LinkyHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n //System.out.println(\"Zaznam \"+temp + \"ma delku: \" + temp.length);\n }//}\n }\n\n\n\n }\n }catch (NullPointerException ne){\n //System.out.println(\"Tak currenfield je null\");\n }\n currentField = null;\n }", "public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void run() {\n try {\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n // Fortify Mod: prevent external entity injection\r\n tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\r\n Transformer transformer = tFactory.newTransformer();\r\n transformer.setOutputProperty(\"encoding\", \"UTF-8\");\r\n transformer.setOutputProperty(\"indent\", \"yes\");\r\n transformer.transform(new DOMSource(doc), new StreamResult(\r\n pos));\r\n } catch (Exception e) {\r\n throw new RuntimeException(\r\n \"Error converting Document to InputStream. \"\r\n + e.getMessage());\r\n } finally {\r\n try {\r\n pos.close();\r\n } catch (IOException e) {\r\n\r\n }\r\n }\r\n }", "public abstract T readFromXml(XmlPullParser parser, int version, Context context)\n throws IOException, XmlPullParserException;", "public void setFilaDatosExportarXmlCostoGastoImpor(CostoGastoImpor costogastoimpor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(CostoGastoImporConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(costogastoimpor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(CostoGastoImporConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(costogastoimpor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(costogastoimpor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(costogastoimpor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementtipocostogastoimpor_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDTIPOCOSTOGASTOIMPOR);\r\n\t\telementtipocostogastoimpor_descripcion.appendChild(document.createTextNode(costogastoimpor.gettipocostogastoimpor_descripcion()));\r\n\t\telement.appendChild(elementtipocostogastoimpor_descripcion);\r\n\r\n\t\tElement elementnombre = document.createElement(CostoGastoImporConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(costogastoimpor.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementes_activo = document.createElement(CostoGastoImporConstantesFunciones.ESACTIVO);\r\n\t\telementes_activo.appendChild(document.createTextNode(costogastoimpor.getes_activo().toString().trim()));\r\n\t\telement.appendChild(elementes_activo);\r\n\r\n\t\tElement elementcon_agrupa = document.createElement(CostoGastoImporConstantesFunciones.CONAGRUPA);\r\n\t\telementcon_agrupa.appendChild(document.createTextNode(costogastoimpor.getcon_agrupa().toString().trim()));\r\n\t\telement.appendChild(elementcon_agrupa);\r\n\r\n\t\tElement elementcon_prorratea = document.createElement(CostoGastoImporConstantesFunciones.CONPRORRATEA);\r\n\t\telementcon_prorratea.appendChild(document.createTextNode(costogastoimpor.getcon_prorratea().toString().trim()));\r\n\t\telement.appendChild(elementcon_prorratea);\r\n\r\n\t\tElement elementcon_factura = document.createElement(CostoGastoImporConstantesFunciones.CONFACTURA);\r\n\t\telementcon_factura.appendChild(document.createTextNode(costogastoimpor.getcon_factura().toString().trim()));\r\n\t\telement.appendChild(elementcon_factura);\r\n\r\n\t\tElement elementcon_flete = document.createElement(CostoGastoImporConstantesFunciones.CONFLETE);\r\n\t\telementcon_flete.appendChild(document.createTextNode(costogastoimpor.getcon_flete().toString().trim()));\r\n\t\telement.appendChild(elementcon_flete);\r\n\r\n\t\tElement elementcon_arancel = document.createElement(CostoGastoImporConstantesFunciones.CONARANCEL);\r\n\t\telementcon_arancel.appendChild(document.createTextNode(costogastoimpor.getcon_arancel().toString().trim()));\r\n\t\telement.appendChild(elementcon_arancel);\r\n\r\n\t\tElement elementcon_seguro = document.createElement(CostoGastoImporConstantesFunciones.CONSEGURO);\r\n\t\telementcon_seguro.appendChild(document.createTextNode(costogastoimpor.getcon_seguro().toString().trim()));\r\n\t\telement.appendChild(elementcon_seguro);\r\n\r\n\t\tElement elementcon_total_general = document.createElement(CostoGastoImporConstantesFunciones.CONTOTALGENERAL);\r\n\t\telementcon_total_general.appendChild(document.createTextNode(costogastoimpor.getcon_total_general().toString().trim()));\r\n\t\telement.appendChild(elementcon_total_general);\r\n\r\n\t\tElement elementcon_digitado = document.createElement(CostoGastoImporConstantesFunciones.CONDIGITADO);\r\n\t\telementcon_digitado.appendChild(document.createTextNode(costogastoimpor.getcon_digitado().toString().trim()));\r\n\t\telement.appendChild(elementcon_digitado);\r\n\t}", "@WebMethod(operationName = \"CalcularPP\")\n public String CalcularPP(@WebParam(name = \"xml\")String xml)\n {\n try\n {\n if(xml == null)\n return xmlVacioExpt;\n ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());\n DocumentBuilderFactory dbfacIN = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilderIN = dbfacIN.newDocumentBuilder();\n Document docIN = docBuilderIN.parse(bais);\n if( docIN.getDocumentElement().getNodeName().equals(\"EntradaCalculadoraPP\"))\n {\n int cliId = GetValueInt(docIN, \"CLI_ID\");\n int cliSap = GetValueInt(docIN, \"CLI_SAP\");\n String cliApePat = GetValue(docIN, \"CLI_APE_PAT\");\n String cliApeMat = GetValue(docIN, \"CLI_APE_MAT\");\n String cliNom = GetValue(docIN, \"CLI_NOM\");\n String cliFecNac = GetValue(docIN, \"CLI_FEC_NAC\");\n String cliDomCal = GetValue(docIN,\"CLI_DOM_CAL\");\n String cliDomNumExt = GetValue(docIN,\"CLI_DOM_NUM_EXT\");\n String cliDomNumInt = GetValue(docIN,\"CLI_DOM_NUM_INT\");\n String cliDomCol = GetValue(docIN,\"CLI_DOM_COL\");\n String codPosId = GetValue(docIN,\"COD_POS_ID\");\n\n int estado = GetValueInt(docIN, \"ESTADO\");\n int edad = GetValueInt(docIN, \"EDAD\");\n int ocupacion = GetValueInt(docIN, \"OCUPACION\");\n String fecha = GetValue(docIN, \"FECHA\");\n float mensualidad = GetValueInt(docIN, \"CUOTA\");\n float valor_vivienda = GetValueInt(docIN, \"VALOR_VIVIENDA\");\n\n if(estado<1 || ocupacion<1)\n return datosErrorExpt+\"ESTADO,OCUPACION\";\n if(edad<18 && edad>65)\n return ErrorEdadExpt;\n\n\n\n //Crear un XML vacio\n DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = dbfac.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //Crear el Arbol XML\n\n //Añadir la raiz\n Element raiz = doc.createElement(\"SalidaCalculadoraPP\");\n doc.appendChild(raiz);\n\n //Crear hijs y adicionarlos a la raiz\n AgregarNodo(raiz,doc,\"CLI_ID\",Integer.toString(cliId));\n AgregarNodo(raiz,doc,\"CLI_SAP\",Integer.toString(cliSap));\n\n Session s = objetos.HibernateUtil.getSessionFactory().getCurrentSession();\n \n Transaction tx = s.beginTransaction();\n Query q = s.createQuery(\"from Edo as edo where edo.cal.calId = '6'\");\n List lista = (List) q.list();\n double estado_woe = ((Edo)lista.get(estado-1)).getEdoWoe();\n double recargo = ((Edo)lista.get(estado-1)).getEdoRcg();\n\n q = s.createQuery(\"from RngEda as eda where eda.calId='6' and eda.rngEdaLimInf<=\"+edad+\" and eda.rngEdaLimSup>=\"+edad);\n lista = (List) q.list();\n double edad_woe = ((RngEda)lista.get(0)).getRngEdaWoe();\n\n q = s.createQuery(\"from Ocp as ocp where ocp.cal.calId = '6' and ocp.ocpOrdPre=\"+ocupacion);\n lista = (List) q.list();\n double ocupacion_woe = ((Ocp)lista.get(0)).getOcpWoe();\n\n // double zeta = 0.018-(0.01)*estado_woe-(0.017)*edad_woe-(0.008)*ocupacion_woe;\n double zeta = 0.018146691102274-(0.00993013369427481)* estado_woe -(0.017366941566975)* edad_woe -(0.00838465419451784)* ocupacion_woe;\n double pi = Math.exp(zeta)/(1+Math.exp(zeta));\n\n q = s.createQuery(\"from IntPi as intPi where intPi.cal.calId='6' and intPi.intPiLimInf<=\"+pi+\" and intPi.intPiLimSup>=\"+pi);\n lista = (List) q.list();\n String clasificacion = ((IntPi)lista.get(0)).getIntPiDes();\n\n q = s.createQuery(\"from FtrPpr as fp where fp.ftrPprCls='\"+clasificacion+\"' and fp.ftrPprMes=\"+fecha);\n lista = (List) q.list();\n double cuota = ((FtrPpr)lista.get(0)).getFtrPprFtr();\n\n double ppr = valor_vivienda*cuota;\n double cuota_pprr = cuota * (1 + recargo);\n double pprr = valor_vivienda *cuota_pprr;\n\n\n System.out.println(estado_woe);\n System.out.println(recargo);\n System.out.println(edad_woe);\n System.out.println(ocupacion_woe);\n System.out.println(zeta);\n System.out.println(pi);\n System.out.println(clasificacion);\n System.out.println(cuota);\n System.out.println(ppr);\n System.out.println(cuota_pprr);\n System.out.println(pprr);\n\n\n AgregarNodo(raiz,doc,\"CUOTA_PURA_RIESGO\",Double.toString(cuota*100)+\"%\");\n AgregarNodo(raiz,doc,\"CUOTA_RECARGADAD\",Double.toString(cuota_pprr*100)+\"%\");\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESGO\",\"$\"+Double.toString(ppr));\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESO_RECARGADA\",\"$\"+Double.toString(pprr));\n //Salida del XML\n TransformerFactory transfac = TransformerFactory.newInstance();\n Transformer trans = transfac.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n StringWriter sw = new StringWriter();\n StreamResult result = new StreamResult(sw);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, result);\n String xmlString = sw.toString();\n\n return xmlString;\n }else\n return tabNoEncontradoExpt+\"EntradaCalculadoraPP\";\n } catch (ParserConfigurationException parE) {\n return xmlExpt;\n } catch (SAXException saxE) {\n return xmlExpt;\n } catch (IOException ioE) {\n return xmlExpt;\n } catch (Exception e) {\n return e.getMessage();\n }\n }", "void startComplexContent(ComplexTypeSG type) throws SAXException;", "public void importElement(XmlPullParser xpp, Epml epml) {\n\t\tlineNumber = xpp.getLineNumber();\n\t\t/*\n\t\t * Import all attributes of this element.\n\t\t */\n\t\timportAttributes(xpp, epml);\n\t\t/*\n\t\t * Create afresh stack to keep track of start tags to match.\n\t\t */\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\t/*\n\t\t * Add the current tag to this stack, as we still have to find the\n\t\t * matching end tag.\n\t\t */\n\t\tstack.add(tag);\n\t\t/*\n\t\t * As long as the stack is not empty, we're still working on this\n\t\t * object.\n\t\t */\n\t\twhile (!stack.isEmpty()) {\n\t\t\ttry {\n\t\t\t\t/*\n\t\t\t\t * Get next event.\n\t\t\t\t */\n\t\t\t\tint eventType = xpp.next();\n\t\t\t\tif (eventType == XmlPullParser.END_DOCUMENT) {\n\t\t\t\t\t/*\n\t\t\t\t\t * End of document. Should not happen.\n\t\t\t\t\t */\n\t\t\t\t\tepml.log(tag, xpp.getLineNumber(), \"Found end of document\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (eventType == XmlPullParser.START_TAG) {\n\t\t\t\t\t//System.out.println(xpp.getLineNumber() + \" <\" + xpp.getName() + \">\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Start tag. Push it on the stack.\n\t\t\t\t\t */\n\t\t\t\t\tstack.add(xpp.getName());\n\t\t\t\t\t/*\n\t\t\t\t\t * If this tag is the second on the stack, then it is a\n\t\t\t\t\t * direct child.\n\t\t\t\t\t */\n\t\t\t\t\tif (stack.size() == 2) {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * For a direct child, check whether the tag is known.\n\t\t\t\t\t\t * If so, take proper action. Note that this needs not\n\t\t\t\t\t\t * to be done for other offspring.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (importElements(xpp, epml)) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Known start tag. The end tag has been matched and\n\t\t\t\t\t\t\t * can be popped from the stack.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tstack.remove(stack.size() - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ((eventType == XmlPullParser.END_TAG)) {\n\t\t\t\t\t//System.out.println(xpp.getLineNumber() + \" </\" + xpp.getName() + \">\");\n\t\t\t\t\t/*\n\t\t\t\t\t * End tag. Should be identical to top of the stack.\n\t\t\t\t\t */\n\t\t\t\t\tif (xpp.getName().equals(stack.get(stack.size() - 1))) {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Yes it is. Pop the stack.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tstack.remove(stack.size() - 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * No it is not. XML violation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tepml.log(tag, xpp.getLineNumber(), \"Found \" + xpp.getName() + \", expected \"\n\t\t\t\t\t\t\t\t+ stack.get(stack.size() - 1));\n\t\t\t\t\t}\n\t\t\t\t} else if (eventType == XmlPullParser.TEXT) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Plain text. Import it.\n\t\t\t\t\t */\n\t\t\t\t\timportText(xpp.getText(), epml);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tepml.log(tag, xpp.getLineNumber(), ex.getMessage());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * The element has been imported. Now is a good time to check its\n\t\t * validity.\n\t\t */\n\t\tcheckValidity(epml);\n\t}", "@Override\n public void fromXML(Node node)\n {\n super.fromXML(node);\n\n NodeList children = node.getChildNodes();\n\n for (int j = 0; j < children.getLength(); j++)\n {\n Node child = children.item(j);\n\n if (child.getNodeName().equalsIgnoreCase(\"lethal-range\"))\n {\n this.setLethalRange(Double.parseDouble(child.getTextContent()));\n }\n else if (child.getNodeName().equalsIgnoreCase(\"pk\"))\n {\n this.setPk(Double.parseDouble(child.getTextContent()));\n }\n else if (child.getNodeName().equalsIgnoreCase(\"max-gs\"))\n {\n this.setMaxGs(Double.parseDouble(child.getTextContent()));\n }\n }\n }", "public static GetDirectAreaInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfoResponse object =\n new GetDirectAreaInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectAreaInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectAreaInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectAreaInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected void importAttributes(XmlPullParser xpp, Epml epml) {\n\t}", "public void loadxml ()\n\t{\n\t\t\t\tString [] kategorienxml;\n\t\t\t\tString [] textbausteinexml;\n\t\t\t\tString [] textexml;\n\t\t\t\t\n\t\t\t\tString filenamexml = \"Katalogname_gekuerzt_lauffaehig-ja.xml\";\n\t\t\t\tFile xmlfile = new File (filenamexml);\n\t\t\t\t\n\t\t\t\t// lies gesamten text aus: String gesamterhtmlcode = \"\";\n\t\t\t\tString gesamterhtmlcode = \"\";\n\t\t\t\tString [] gesamtertbarray = new String[1001];\n\t\t BufferedReader inx = null;\n\t\t try {\n\t\t inx = new BufferedReader(new FileReader(xmlfile));\n\t\t String zeilex = null;\n\t\t while ((zeilex = inx.readLine()) != null) {\n\t\t \tSystem.out.println(zeilex + \"\\n\");\n\t\t \tRandom rand = new Random();\n\t\t \tint n = 0;\n\t\t \t// Obtain a number between [0 - 49].\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.End\\\"/>\")) // dann ab hier speichern bis zum ende:\n\t\t \t{\n\t\t \t\t// \terstelle neue random zahl und speichere alle folgenden zeilen bis zum .Start in diesen n rein\n\t\t \t\tn = rand.nextInt(1001);\n\n\t\t \t\t\n\t\t \t}\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n] + zeilex;\n\t\t \tFile f = new File (\"baustein_\"+ n + \".txt\");\n\t\t \t\n\t\t \tFileWriter fw = new FileWriter (f);\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\\\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\\\"\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/></w:rPr><w:r><w:rPr><w:rStyle w:val=\\\"T8\\\"/></w:rPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\t\t \t<w:rStyle\" , \"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:p>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:pStyle w:val=\\\"_37_b._20_Text\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr><w:r><w:t>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:r><w:rPr><w:rStyle\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\\\"><w:pPr></\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:pPr><w:r>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"compatible:1.0\\\"><w:pPr></w:pPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:p><w:p\",\"\");\n\t\t \n\n\t\t \t\n\n\t\t \tfw.write(gesamtertbarray[n]);\n\t\t \tfw.flush();\n\t\t \tfw.close();\n\t\t \t\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.Start\\\"))\"))\n \t\t\t{\n\t\t \t\t// dann erhöhe speicher id für neue rand zahl, weil ab hier ist ende des vorherigen textblocks;\n\t\t\t \tn = rand.nextInt(1001);\n \t\t\t}\n\t\t \n\t\t }}\n\t\t \tcatch (Exception s)\n\t\t {}\n\t\t \n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t}", "private void initializeXml() {\n Bundle bundle = this.getIntent().getExtras();\n\n // Texts.\n dateText = (TextView)findViewById(R.id.date_text);\n typeText = (TextView)findViewById(R.id.packet_type_text);\n sourceAddressText = (TextView)findViewById(R.id.source_address_text);\n packetDataText = (TextView)findViewById(R.id.packet_data_text);\n\n dateText.setText(bundle.getString(\"date\"));\n typeText.setText(bundle.getString(\"type\"));\n sourceAddressText.setText(bundle.getString(\"sourceAddress\"));\n data = bundle.getString(\"packetData\");\n packetDataText.setText(data);\n\n // Buttons.\n Button compareButton = (Button)findViewById(R.id.compare_button);\n compareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n handleCompareButtonPressed();\n }\n });\n }", "XMLIn(String legendFile, RFO r)\n\t\t{\n\t\t\tsuper();\n\t\t\trfo = r;\n\t\t\telement = \"\";\n\t\t\tlocation = \"\";\n\t\t\tfiletype = \"\";\n\t\t\tmaterial = \"\";\n\t\t\tmElements = new double[16];\n\t\t\tsetMToIdentity();\t\t\t\n\t\t\t\n\t\t\tXMLReader xr = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\txr = XMLReaderFactory.createXMLReader();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tDebug.e(\"XMLIn() 1: \" + e);\n\t\t\t}\n\t\t\t\n\t\t\txr.setContentHandler(this);\n\t\t\txr.setErrorHandler(this);\n\t\t\ttry\n\t\t\t{\n\t\t\t\txr.parse(new InputSource(legendFile));\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tDebug.e(\"XMLIn() 2: \" + e);\n\t\t\t}\n\n\t\t}", "public void fromXML(Element altN) {\r\n \t\tthis.fromXML = true;\r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \r\n \t\t// add idref ***from the XML***\r\n \t\tString idref = altN.getAttribute(\"id\");\r\n \r\n \t\t// get our name\r\n \t\tname = altN.getAttribute(\"name\");\r\n \r\n \t\t// get our status\r\n \t\tstatus = AlternativeStatus.fromString(altN.getAttribute(\"status\"));\r\n \r\n \t\t// get our evaluation\r\n \t\tevaluation = Float.parseFloat(altN.getAttribute(\"evaluation\"));\r\n \r\n \t\tNode descN = altN.getFirstChild();\r\n \t\t// get the description\r\n \t\t// the text is actually the child of the element, odd...\r\n \t\tNode descT = descN.getFirstChild();\r\n \t\tif (descT instanceof Text) {\r\n \t\t\tText text = (Text) descT;\r\n \t\t\tString data = text.getData();\r\n \t\t\tsetDescription(data);\r\n \t\t}\r\n \r\n \t\t// and last....\r\n \t\tdb.addRef(idref, this); // important to use the ref from the XML file!\r\n \r\n \t\tElement child = (Element) descN.getNextSibling();\r\n \r\n \t\twhile (child != null) {\r\n \r\n \t\t\tString nextName;\r\n \r\n \t\t\tnextName = child.getNodeName();\r\n \t\t\t// here we check the type, then process\r\n \t\t\tif (nextName.compareTo(\"DR:argument\") == 0) {\r\n \t\t\t\tArgument arg = new Argument();\r\n \t\t\t\tdb.addArgument(arg);\r\n \t\t\t\taddArgument(arg);\r\n \t\t\t\targ.fromXML(child);\r\n \t\t\t} else if (nextName.compareTo(\"DR:question\") == 0) {\r\n \t\t\t\tQuestion quest = new Question();\r\n \t\t\t\tdb.addQuestion(quest);\r\n \t\t\t\taddQuestion(quest);\r\n \t\t\t\tquest.fromXML(child);\r\n \t\t\t} else if (nextName.compareTo(\"DR:decisionproblem\") == 0) {\r\n \t\t\t\tDecision dec = new Decision();\r\n \t\t\t\tdb.addDecision(dec);\r\n \t\t\t\taddSubDecision(dec);\r\n \t\t\t\tdec.fromXML(child);\r\n \t\t\t} else if (nextName.compareTo(\"DR:history\") == 0) {\r\n \t\t\t\thistoryFromXML(child);\r\n \t\t\t} else if (nextName.compareTo(\"argref\") == 0) {\r\n \t\t\t\tNode childRef = child.getFirstChild(); // now, get the text\r\n \t\t\t\t// decode the reference\r\n \t\t\t\tText refText = (Text) childRef;\r\n \t\t\t\tString stRef = refText.getData();\r\n \t\t\t\taddArgument((Argument) db.getRef(stRef));\r\n \r\n \t\t\t} else if (nextName.compareTo(\"decref\") == 0) {\r\n \t\t\t\tNode childRef = child.getFirstChild(); // now, get the text\r\n \t\t\t\t// decode the reference\r\n \t\t\t\tText refText = (Text) childRef;\r\n \t\t\t\tString stRef = refText.getData();\r\n \t\t\t\taddSubDecision((Decision) db.getRef(stRef));\r\n \r\n \t\t\t} else if (nextName.compareTo(\"questref\") == 0) {\r\n \t\t\t\tNode childRef = child.getFirstChild(); // now, get the text\r\n \t\t\t\t// decode the reference\r\n \t\t\t\tText refText = (Text) childRef;\r\n \t\t\t\tString stRef = refText.getData();\r\n \t\t\t\taddQuestion((Question) db.getRef(stRef));\r\n \r\n \t\t\t} else {\r\n \t\t\t\tSystem.out.println(\"unrecognized element under alternative!\");\r\n \t\t\t}\r\n \r\n \t\t\tchild = (Element) child.getNextSibling();\r\n \t\t}\r\n \t}", "@Override\r\n\tpublic void rebuildFromXml(Element e,List<Object> err) {\n\t\tsuper.rebuildFromXml(e,err);\r\n\t\t\t\r\n\t\tif(e.attribute(ModelType.ATR_COORTYPE) != null){\r\n\t\t\t\tcoorType = e.attributeValue(ModelType.ATR_COORTYPE);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_COORTYPE));\r\n\t\t}\r\n\t\t\t\r\n\t\tif(e.attribute(ModelType.ATR_VELOCITY) != null){\r\n\t\t\tvelocity = e.attributeValue(ModelType.ATR_VELOCITY);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_VELOCITY));\r\n\t\t}\r\n\t\t\t\r\n\t\tif(e.attribute(ModelType.ATR_CX) != null){\r\n\t\t\tcx = e.attributeValue(ModelType.ATR_CX);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_CX));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_CY) != null){\r\n\t\t\tcy = e.attributeValue(ModelType.ATR_CY);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_CY));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_CZ) != null){\r\n\t\t\tcz = e.attributeValue(ModelType.ATR_CZ);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_CZ));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_DA) != null){\r\n\t\t\tda = e.attributeValue(ModelType.ATR_DA);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_DA));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_DB) != null){\r\n\t\t\tdb = e.attributeValue(ModelType.ATR_DB);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_DB));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_DC) != null){\r\n\t\t\tdc = e.attributeValue(ModelType.ATR_DC);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_DC));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_R) != null){\r\n\t\t\tR = e.attributeValue(ModelType.ATR_R);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_R));\r\n\t\t}\r\n\t\t\r\n\t\tif(e.attribute(ModelType.ATR_RAD) != null){\r\n\t\t\trad = e.attributeValue(ModelType.ATR_RAD);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_RAD));\r\n\t\t}\r\n\t\t/*if(e.attribute(ModelType.ATR_INDEX) != null){\r\n\t\t\tindex = e.attributeValue(ModelType.ATR_INDEX);\r\n\t\t}\r\n\t\telse{\r\n\t\t\terr.add(new CustomErrorInfo(\r\n\t\t\t\t\te,\r\n\t\t\t\t\tCustomErrorInfo.NULL,\r\n\t\t\t\t\tModelType.ATR_INDEX));\r\n\t\t}*/\r\n\t}", "public static void main(String[] args) {\n new MySaxParserEx(\"ProductCatalog.xml\");\n\n }", "protected abstract String getEventChildXML();", "protected abstract Element toXmlEx(Document doc);", "com.synergyj.cursos.webservices.ordenes.XMLBFactura getXMLBFactura();", "private XmlHelper() {}", "public static Hello parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n Hello object =\n new Hello();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"hello\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (Hello)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"param0\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setParam0(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private void unpackGeneralXmlMarkup(Document doc, RepositioningInfo repInfo,\n RepositioningInfo ampCodingInfo, StatusListener statusListener)\n throws DocumentFormatException {\n boolean docHasContentButNoValidURL = hasContentButNoValidUrl(doc);\n\n XmlDocumentHandler xmlDocHandler = null;\n try {\n\n // Create a new Xml document handler\n xmlDocHandler =\n new XmlDocumentHandler(doc, this.markupElementsMap,\n this.element2StringMap);\n\n // Register a status listener with it\n xmlDocHandler.addStatusListener(statusListener);\n\n // set repositioning object\n xmlDocHandler.setRepositioningInfo(repInfo);\n\n // set the object with ampersand coding positions\n xmlDocHandler.setAmpCodingInfo(ampCodingInfo);\n\n // create the parser\n SAXDocumentParser newxmlParser = new SAXDocumentParser();\n\n // Set up the factory to create the appropriate type of parser\n // Fast Infoset doesn't support validating which is good as we would want\n // it off any way, but we do want it to be namesapace aware\n newxmlParser.setFeature(\"http://xml.org/sax/features/namespaces\", true);\n newxmlParser.setFeature(\"http://xml.org/sax/features/namespace-prefixes\",\n true);\n newxmlParser.setContentHandler(xmlDocHandler);\n newxmlParser.setErrorHandler(xmlDocHandler);\n newxmlParser.setDTDHandler(xmlDocHandler);\n newxmlParser.setEntityResolver(xmlDocHandler);\n\n // Parse the XML Document with the appropriate encoding\n Reader docReader = null;\n try {\n InputSource is;\n if(docHasContentButNoValidURL) {\n // no URL, so parse from string\n is = new InputSource(new StringReader(doc.getContent().toString()));\n } else if(doc instanceof TextualDocument) {\n // textual document - load with user specified encoding\n String docEncoding = ((TextualDocument)doc).getEncoding();\n // don't strip BOM on XML.\n docReader =\n new InputStreamReader(doc.getSourceUrl().openStream(),\n docEncoding);\n is = new InputSource(docReader);\n // must set system ID to allow relative URLs (e.g. to a DTD) to\n // work\n is.setSystemId(doc.getSourceUrl().toString());\n } else {\n // let the parser decide the encoding\n is = new InputSource(doc.getSourceUrl().toString());\n }\n newxmlParser.parse(is);\n } finally {\n // make sure the open streams are closed\n if(docReader != null) docReader.close();\n }\n\n ((DocumentImpl)doc).setNextAnnotationId(xmlDocHandler\n .getCustomObjectsId());\n } catch(SAXException e) {\n doc.getFeatures().put(\"parsingError\", Boolean.TRUE);\n\n Boolean bThrow =\n (Boolean)doc.getFeatures().get(\n GateConstants.THROWEX_FORMAT_PROPERTY_NAME);\n\n if(bThrow != null && bThrow.booleanValue()) {\n throw new DocumentFormatException(e);\n } else {\n Out.println(\"Warning: Document remains unparsed. \\n\"\n + \"\\n Stack Dump: \");\n e.printStackTrace(Out.getPrintWriter());\n }\n\n } catch(IOException e) {\n throw new DocumentFormatException(\"I/O exception for \"\n + doc.getSourceUrl(), e);\n } finally {\n if(xmlDocHandler != null)\n xmlDocHandler.removeStatusListener(statusListener);\n }\n }", "public void convertAll() {\n Document dom = null;\n long beginTime = System.currentTimeMillis();\n try {\n log.info(\" ############################### begin import ######################\");\n dom = XMLParser.parseXMLToDOM(context.getResourceAsStream(IMPORT_FILE));\n // XMLParser.DTDValidator(dom);\n Element element = (Element) dom.getElementsByTagName(\"import\").item(0);\n String encoding = element.getAttribute(\"encoding\");\n DataAccessor.encoding = encoding;\n\n NodeList list = element.getChildNodes();\n\n List<Data> clondSources = new ArrayList<Data>();\n for (int i = 0; i < list.getLength(); i++) {\n // datatype node\n Node itemDatatype = list.item(i);\n List<Data> sources = processDatatype(itemDatatype);\n clondSources.addAll(sources);\n }\n NodeService.insertMigrationMappings(clondSources);\n createRelationDataType(clondSources);\n linkRoot(list);\n log.info(String.format(\n \" ---->#######################finished importing [time:%s mins] #############################\",\n (System.currentTimeMillis() - beginTime) / (1000 * 60)));\n NodeService.insertProperties(properties);\n }\n catch (Exception e) {\n log.error(e.getMessage());\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\t\n\t\t\t// TEST generazione DOM da String contenente l'xml\n\t\t\tDocument doc1 = XMLHelper.newDocument(\"<root xmlns:testNS=\\\"http://testNS\\\"><uno>vediamo {cosa}</uno><testNS:tre>prova con namespace</testNS:tre><due>prova {prova}<due-uno>primo elemento interno all'elemento due</due-uno></due></root>\", true);\n\t\t\t\t\t\t\n\t\t\tXMLHelper.write(doc1, System.out, null);\n\t\t\t\n\t\t\t// TEST sostituzioni....\n\t\t\tfinal Map<String,String> mappa = new HashMap<String, String>();\n\t\t\t\tmappa.put(\"cosa\", \"sostituto_cosa\");\n\t\t\t\tmappa.put(\"prova\", \"sostituto_prova\");\n\t\t\t\n\t\t\tfinal String result = XMLHelper.injectValues(doc1, mappa);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "protected abstract void _fromXml_(Element in_xml) throws ConfigurationException;", "public static GetVehicleBookPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPage object =\n new GetVehicleBookPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void startElement(String uri, String localName,String qName,\n Attributes attributes) throws SAXException {\n\n if(qName.equalsIgnoreCase(\"sce:PLPExtract\") | (qName.equalsIgnoreCase(\"sce:Payload\"))\n | (qName.equalsIgnoreCase(\"sce:Header\"))) {\n return;\n }\n\n builder.append(\"<\").append(qName).append(\">\");\n\n if (qName.equalsIgnoreCase(\"sce:mRID\")) {\n mRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:aliasName\")) {\n aliasName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:name\")) {\n name = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:grandFatherFlag\")) {\n grandFather = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:type\")) {\n pType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:value\")) {\n value = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:baseKind\")) {\n baseKind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:classification\")) {\n classification = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:unit\")) {\n unit = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:speciesType\")) {\n speciesT = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:rSMVal\")) {\n rSMVal = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:specialProjectName\")) {\n specialProj = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:currentRating\")) {\n cRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:inServiceRating\")) {\n iRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highWindFlag\")) {\n highWind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highFireFlag\")) {\n highFire = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:srsName\")) {\n srsName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:xPosition\")) {\n xPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:yPosition\")) {\n yPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:description\")) {\n desc = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:street\")) {\n street = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:city\")) {\n city = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:mapRefNumber\")) {\n mapRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:installationDate\")) {\n installDate = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:symbolRef\")) {\n symbolRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:orientation\")) {\n orientation = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:substationMRID\")) {\n substationMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:owner\")) {\n owner = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ownerType\")) {\n ownerType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ratedVoltage\")) {\n ratedVoltage = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:pos\")) {\n pos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:bundleType\")) {\n bundleType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitName\")) {\n circuitName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitSection\")) {\n circuitSection = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:material\")) {\n material = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:size\")) {\n size = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:quantity\")) {\n quantity = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:phase\")) {\n phase = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:posList\")) {\n posList = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:no_of_wires\")) {\n no_of_wires = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:commIndicator\")) {\n commIndicator = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:structureID\")) {\n structureID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:strucRefMRID\")) {\n strucRefMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:serviceType\")) {\n serviceType = true;\n }\n\n }", "public String generarAnclajeAtributosXML(){\r\n\r\n\t\tDocument doc = new Document();\r\n\t\tElement datosClearQuest = new Element(\"datosClearQuest\");\r\n\t\tdoc.setRootElement(datosClearQuest);\r\n\t\t\r\n\t\tgenerarConexion(datosClearQuest);\r\n\t\tgenerarAnclaje(datosClearQuest);\r\n\r\n\t\treturn convertXMLToString(doc);\r\n\r\n\t}", "public void setFilaDatosExportarXmlAnalisisTransaCliente(AnalisisTransaCliente analisistransacliente,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(AnalisisTransaClienteConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(analisistransacliente.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(AnalisisTransaClienteConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(analisistransacliente.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(analisistransacliente.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementmodulo_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDMODULO);\r\n\t\telementmodulo_descripcion.appendChild(document.createTextNode(analisistransacliente.getmodulo_descripcion()));\r\n\t\telement.appendChild(elementmodulo_descripcion);\r\n\r\n\t\tElement elementnombre = document.createElement(AnalisisTransaClienteConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(analisistransacliente.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementdescripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.DESCRIPCION);\r\n\t\telementdescripcion.appendChild(document.createTextNode(analisistransacliente.getdescripcion().trim()));\r\n\t\telement.appendChild(elementdescripcion);\r\n\r\n\t\tElement elementtransaccion_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION);\r\n\t\telementtransaccion_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion_descripcion()));\r\n\t\telement.appendChild(elementtransaccion_descripcion);\r\n\r\n\t\tElement elementtransaccion1_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION1);\r\n\t\telementtransaccion1_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion1_descripcion()));\r\n\t\telement.appendChild(elementtransaccion1_descripcion);\r\n\r\n\t\tElement elementtransaccion2_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION2);\r\n\t\telementtransaccion2_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion2_descripcion()));\r\n\t\telement.appendChild(elementtransaccion2_descripcion);\r\n\r\n\t\tElement elementtransaccion3_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION3);\r\n\t\telementtransaccion3_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion3_descripcion()));\r\n\t\telement.appendChild(elementtransaccion3_descripcion);\r\n\r\n\t\tElement elementtransaccion4_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION4);\r\n\t\telementtransaccion4_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion4_descripcion()));\r\n\t\telement.appendChild(elementtransaccion4_descripcion);\r\n\r\n\t\tElement elementtransaccion5_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION5);\r\n\t\telementtransaccion5_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion5_descripcion()));\r\n\t\telement.appendChild(elementtransaccion5_descripcion);\r\n\r\n\t\tElement elementtransaccion6_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION6);\r\n\t\telementtransaccion6_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion6_descripcion()));\r\n\t\telement.appendChild(elementtransaccion6_descripcion);\r\n\r\n\t\tElement elementtransaccion7_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION7);\r\n\t\telementtransaccion7_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion7_descripcion()));\r\n\t\telement.appendChild(elementtransaccion7_descripcion);\r\n\r\n\t\tElement elementtransaccion8_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION8);\r\n\t\telementtransaccion8_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion8_descripcion()));\r\n\t\telement.appendChild(elementtransaccion8_descripcion);\r\n\r\n\t\tElement elementtransaccion9_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION9);\r\n\t\telementtransaccion9_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion9_descripcion()));\r\n\t\telement.appendChild(elementtransaccion9_descripcion);\r\n\r\n\t\tElement elementtransaccion10_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION10);\r\n\t\telementtransaccion10_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion10_descripcion()));\r\n\t\telement.appendChild(elementtransaccion10_descripcion);\r\n\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public static boolean ReescrituraConfig(String ruta, String ws, String ip_bd, String id_portico, String chapa, String dispo, String idAdmin, List<EventoPuertaMagnetica> eventos, String loc_geo){\n try{\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //creacion de elementos\n Element rootElement = doc.createElement(\"parametros\");\n Element urlWS = doc.createElement(\"Url_WebServices\");\n Element idPort = doc.createElement(\"Id_Portico\");\n Element ipBD = doc.createElement(\"Base_Datos_IP\");\n Element cha = doc.createElement(\"Tiene_Chapa\");\n Element disp = doc.createElement(\"Disposicion\");\n Element idAdm = doc.createElement(\"Id_Crede_Administrador\");\n Element lg = doc.createElement(\"Localizacion_Geografica\");\n\n doc.appendChild(rootElement); //ingreso de cabecera.\n\n //ingreso de datos a elementos\n urlWS.appendChild(doc.createTextNode(ws));\n idPort.appendChild(doc.createTextNode(id_portico));\n ipBD.appendChild(doc.createTextNode(ip_bd));\n cha.appendChild(doc.createTextNode(chapa));\n disp.appendChild(doc.createTextNode(dispo));\n idAdm.appendChild(doc.createTextNode(idAdmin));\n lg.appendChild(doc.createTextNode(loc_geo));\n\n //ingresos de elementos a cabecera\n rootElement.appendChild(urlWS);\n rootElement.appendChild(idPort);\n rootElement.appendChild(ipBD);\n rootElement.appendChild(cha);\n rootElement.appendChild(disp);\n rootElement.appendChild(idAdm);\n rootElement.appendChild(lg);\n\n if(chapa.equals(\"Z0B9C4B\")){\n for(int i=0; i<eventos.size(); i++){\n Element event = doc.createElement(\"Evento\");\n Element idEvent = doc.createElement(\"Id_Evento\");\n Element nombreEvent = doc.createElement(\"Nombre_Evento\");\n idEvent.appendChild(doc.createTextNode(eventos.get(i).get_U01B3F3()));\n nombreEvent.appendChild(doc.createTextNode(eventos.get(i).get_DESTINO()));\n event.appendChild(idEvent);\n event.appendChild(nombreEvent);\n rootElement.appendChild(event);\n }\n\n }\n\n //transformacion a archivo XML.\n\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer trans = transFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File dir = new File(ruta);\n\n Log.i(TAG, \"Se verifica la existencia del archivo apra su creacion\");\n if(dir.exists()){\n //elimino el archivo xml junto con el folder.\n\n File [] archivo = dir.listFiles();//data/data/com.civi/config/config.xml\n if(archivo.length != 0){//existen archivos.\n Log.i(TAG, \"Archivo config existe, eliminando...\");\n if(archivo[0].delete()){\n Log.i(TAG, \"Archivo Config eliminado\");\n if(dir.delete()){//elimino el folder.\n Log.i(TAG, \"Folder config eliminado\");\n }else{\n Log.i(TAG, \"No fue posible la eliminacion del folder\");\n }\n }else{\n Log.i(TAG, \"NO fue posible la eliminacion del archivo\");\n }\n }else{\n Log.i(TAG, \"Archivo Config no existe. elimino solo el folder\");\n if(dir.delete()){\n Log.i(TAG, \"Folder eliminado\");\n }\n }\n\n }\n\n //Creacion de folder.\n if(dir.mkdirs()){\n StreamResult result = new StreamResult(new File(dir, \"config.xml\"));\n trans.transform(source, result);\n }\n Log.i(TAG, \"Generacion de config.xml realizada en \"+ruta);\n\n } catch(Exception ex){\n return false;\n }\n return true;\n }", "Lista_Simple datos(File tipo1) {\n \n SAXBuilder builder = new SAXBuilder();\n try {\n \n \n \n\n \n //Se obtiene la lista de hijos de la raiz 'tables'\n Document document = builder.build(tipo1);\n Element rootNode = document.getRootElement(); \n // JOptionPane.showMessageDialog(null,\" e1: \"+(rootNode.getChildText(\"dimension\"))); \n tam= Integer.parseInt(rootNode.getChildText(\"dimension\"));\n Element dobles = rootNode.getChild(\"dobles\");\n \n List list = dobles.getChildren(\"casilla\");\n for ( int i = 0; i < list.size(); i++ )\n {\n Element tabla = (Element) list.get(i);\n d1.enlistar(tabla.getChildTextTrim(\"x\"));\n \n d1.enlistar(tabla.getChildTextTrim(\"y\"));\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"x\").toString());\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"y\").toString());\n }\n \n \n Element triples = rootNode.getChild(\"triples\");\n \n List listt = triples.getChildren(\"casilla\");\n for ( int i = 0; i < listt.size(); i++ )\n {\n Element tabla = (Element) listt.get(i);\n d2.enlistar(tabla.getChildTextTrim(\"x\"));\n d2.enlistar(tabla.getChildTextTrim(\"y\"));\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"x\").toString());\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"y\").toString());\n }\n Element dicc = rootNode.getChild(\"diccionario\");\n List dic = dicc.getChildren();\n\n for ( int i = 0; i < dic.size(); i++ )\n {\n Element tabla = (Element) dic.get(i);\n //JOptionPane.showMessageDialog(null,\"\"+tabla.getText().toString());\n d.enlistar(tabla.getText().toString());\n \n \n \n } \n \n }catch (JDOMException | IOException | NumberFormatException | HeadlessException e){\n JOptionPane.showMessageDialog(null,\" error de archivo\");\n }\n return d;\n \n}", "private void serializeOutOfTypeSystemElements() throws SAXException {\n if (cds.marker != null) {\n return;\n }\n if (cds.sharedData == null) {\n return;\n }\n Iterator<OotsElementData> it = cds.sharedData.getOutOfTypeSystemElements().iterator();\n while (it.hasNext()) {\n OotsElementData oed = it.next();\n workAttrs.clear();\n // Add ID attribute\n addIdAttribute(workAttrs, oed.xmiId);\n\n // Add other attributes\n Iterator<XmlAttribute> attrIt = oed.attributes.iterator();\n while (attrIt.hasNext()) {\n XmlAttribute attr = attrIt.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n // debug\n if (oed.elementName.qName.endsWith(\"[]\")) {\n Misc.internalError(new Exception(\n \"XMI Cas Serialization: out of type system data has type name ending with []\"));\n }\n // serialize element\n startElement(oed.elementName, workAttrs, oed.childElements.size());\n\n // serialize features encoded as child elements\n Iterator<XmlElementNameAndContents> childElemIt = oed.childElements.iterator();\n while (childElemIt.hasNext()) {\n XmlElementNameAndContents child = childElemIt.next();\n workAttrs.clear();\n Iterator<XmlAttribute> attrIter = child.attributes.iterator();\n while (attrIter.hasNext()) {\n XmlAttribute attr = attrIter.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n\n if (child.contents != null) {\n startElement(child.name, workAttrs, 1);\n addText(child.contents);\n } else {\n startElement(child.name, workAttrs, 0);\n }\n endElement(child.name);\n }\n\n endElement(oed.elementName);\n }\n }", "public void parse() throws ParserConfigurationException, SAXException,\n\t\t\tIOException, XMLStreamException {\n\n\t\tGem gem = new Gem();\n\t\tVisualParameters params = new VisualParameters();\n\n\t\t// current element name holder\n\t\tString currentElement = null;\n\n\t\tXMLInputFactory factory = XMLInputFactory.newInstance();\n\n\t\tfactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);\n\n\t\tXMLEventReader reader = factory.createXMLEventReader(new StreamSource(\n\t\t\t\txmlFileName));\n\n\t\twhile (reader.hasNext()) {\n\t\t\tXMLEvent event = reader.nextEvent();\n\n\t\t\t// skip any empty content\n\t\t\tif (event.isCharacters() && event.asCharacters().isWhiteSpace()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// handler for start tags\n\t\t\tif (event.isStartElement()) {\n\t\t\t\tStartElement startElement = event.asStartElement();\n\t\t\t\tcurrentElement = startElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.FOND.equalsTo(currentElement)) {\n\t\t\t\t\tfond = new Fond();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.GEM.equalsTo(currentElement)) {\n\t\t\t\t\tgem = new Gem();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(currentElement)) {\n\t\t\t\t\tparams = new VisualParameters();\n\t\t\t\t\tAttribute attribute = startElement\n\t\t\t\t\t\t\t.getAttributeByName(new QName(XML.VALUE_COLOR\n\t\t\t\t\t\t\t\t\t.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setValueColor(EnumColors.fromValue(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.TRANSPARENCY.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setTransparency(Integer.valueOf(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.FACETING.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setFaceting(Integer.valueOf(attribute.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// handler for contents\n\t\t\tif (event.isCharacters()) {\n\t\t\t\tCharacters characters = event.asCharacters();\n\n\t\t\t\tif (XML.NAME.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setName(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.PRECIOUSNESS.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setPreciousness(Boolean.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.ORIGIN.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setOrigin(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.VALUE.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setValue(Double.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// handler for end tags\n\t\t\tif (event.isEndElement()) {\n\t\t\t\tEndElement endElement = event.asEndElement();\n\t\t\t\tString localName = endElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.GEM.equalsTo(localName)) {\n\t\t\t\t\tfond.getGem().add(gem);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(localName)) {\n\t\t\t\t\t// just add answer to container\n\t\t\t\t\tgem.setVisualParameters(params);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}", "public RayTracerXMLSceneParser() {\n\t\ttry {\n\t\t\treader = XMLReaderFactory.createXMLReader();\n\t\t\treader.setContentHandler(this);\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void EjecutarXML(String path)\n {\n for(ArrayList<NodoXML> l : listaxml)\n {\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n }\n \n /*Ahora las importaciones*/\n// for(ArrayList<NodoXML> l : singlenton.listaAST)\n for(int cont = 0; cont<singlenton.listaAST.size(); cont++)\n {\n ArrayList<NodoXML> l = singlenton.listaAST.get(cont);\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n } \n \n mostrarTraduccion(path);\n }", "private void handleXMLBrowse(Shell parent) {\n\t\tFileDialog fileDialog = new FileDialog(parent);\n\t\tfileDialog.setFilterExtensions(new String[] { WSASCreationUIMessages.FILE_XML });\n\t\tString fileName = fileDialog.open();\n\t\tif (fileName != null) {\n\t\t\tservicesXMLPath.setText(fileName);\n\t\t\tmodel.setPathToServicesXML( servicesXMLPath.getText() );\n\t\t}\n\t}", "public void extrairMetadados(Dataset dataset) throws SenseRDFException;", "public String getRequestInXML() throws Exception;", "public void setFilaDatosExportarXmlTipoDireccion(TipoDireccion tipodireccion,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(TipoDireccionConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(tipodireccion.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(TipoDireccionConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(tipodireccion.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(TipoDireccionConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(tipodireccion.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementcodigo = document.createElement(TipoDireccionConstantesFunciones.CODIGO);\r\n\t\telementcodigo.appendChild(document.createTextNode(tipodireccion.getcodigo().trim()));\r\n\t\telement.appendChild(elementcodigo);\r\n\r\n\t\tElement elementnombre = document.createElement(TipoDireccionConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(tipodireccion.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\t}", "String toXML() throws RemoteException;", "public OutEntries getFromSecondXml();" ]
[ "0.61329365", "0.5817315", "0.57173467", "0.568149", "0.565352", "0.5651485", "0.56410336", "0.55726254", "0.54854697", "0.5471709", "0.54672277", "0.5407306", "0.53699845", "0.5358391", "0.5353021", "0.53317195", "0.5311994", "0.5259272", "0.5243615", "0.5243615", "0.5243615", "0.5238201", "0.5235819", "0.52235085", "0.52142507", "0.5214022", "0.52127534", "0.51984775", "0.51914704", "0.51853174", "0.51853174", "0.5163015", "0.5157631", "0.51568556", "0.5156147", "0.51469755", "0.51458496", "0.5145327", "0.514266", "0.51417595", "0.5138735", "0.5138316", "0.5138021", "0.5135733", "0.5125376", "0.5121455", "0.5119045", "0.511886", "0.5092663", "0.5079446", "0.5076544", "0.50640804", "0.5051861", "0.50477743", "0.5042923", "0.5040578", "0.50386554", "0.5035565", "0.5028721", "0.5025552", "0.50231254", "0.50159776", "0.50157714", "0.50114423", "0.5007334", "0.49980727", "0.4993742", "0.49923244", "0.49893075", "0.49845627", "0.49819252", "0.49804154", "0.49627203", "0.49535707", "0.49523073", "0.49496827", "0.4941577", "0.4937248", "0.49355894", "0.4935564", "0.49280462", "0.49271408", "0.49270058", "0.49217355", "0.49208933", "0.49188498", "0.4913903", "0.4897769", "0.4892449", "0.4888423", "0.48874253", "0.48787248", "0.4877602", "0.48771122", "0.48762387", "0.48721626", "0.48639035", "0.48634887", "0.48596016", "0.48555565" ]
0.68789977
0
Le o XML do extrato retornado pelo GPP no arquivo criado na sessao.
private static String readFromFile(ArrayList diretorios, String sessionId) { StringBuffer result = new StringBuffer(); try { //Verificando na lista de diretorios se o arquivo pode ser encontrado. for(int i = 0; i < diretorios.size(); i++) { String fileName = (String)diretorios.get(i) + File.separator + sessionId; File fileExtrato = new File(fileName); if(fileExtrato.exists()) { //Lendo o XML do arquivo. FileReader reader = new FileReader(fileExtrato); char[] buffer = new char[new Long(fileExtrato.length()).intValue()]; int bytesRead = 0; while((bytesRead = reader.read(buffer)) != -1) { result.append(buffer); } reader.close(); break; } } } catch(Exception e) { e.printStackTrace(); } return (result.length() > 0) ? result.toString() : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static RetornoExtrato parse(String xmlExtrato) throws Exception\n\t{\n\t\tRetornoExtrato result = new RetornoExtrato();\n\t\t\n\t\ttry\n\t\t{\t\t\t\t\t\n\t\t\t//Obtendo os objetos necessarios para a execucao do parse do xml\n\t\t\tDocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder parse = docBuilder.newDocumentBuilder();\n\t\t\tInputSource is = new InputSource(new StringReader(xmlExtrato));\n\t\t\tDocument doc = parse.parse(is);\n\n\t\t\tVector v = new Vector();\n\t\t\n\t\t\tExtrato extrato = null;\n\t\t\t\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\n\t\t\t//Obter o índice de recarga\n\t\t\tElement elmDadosControle = (Element)doc.getElementsByTagName(\"dadosControle\").item(0);\n\t\t\tNodeList nlDadosControle = elmDadosControle.getChildNodes();\n\t\t\tif(nlDadosControle.getLength() > 0)\n\t\t\t{\n\t\t\t\tresult.setIndAssinanteLigMix(nlDadosControle.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setPlanoPreco\t\t(nlDadosControle.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t}\n\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"detalhe\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"detalhe\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\t\n\t\t\t\t\textrato = new Extrato();\n\t\t\t\t\textrato.setNumeroOrigem(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setHoraChamada(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setTipoTarifacao(itemNodes.item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setOperacao(itemNodes.item(5).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoOrigem(itemNodes.item(6).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoDestino(itemNodes.item(7).getChildNodes().item(0)!=null?itemNodes.item(7).getChildNodes().item(0).getNodeValue():\"\");\n\t\t\t\t\textrato.setNumeroDestino(itemNodes.item(8).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setDuracaoChamada(itemNodes.item(9).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\t\n\t\t\t\t\textrato.setValorPrincipal\t(stringToDouble(itemNodes.item(10).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorBonus\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorSMS\t\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorGPRS\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorPeriodico\t(stringToDouble(itemNodes.item(10).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorTotal\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\n\t\t\t\t\textrato.setSaldoPrincipal\t(stringToDouble(itemNodes.item(11).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoBonus\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoSMS\t\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoGPRS\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoPeriodico\t(stringToDouble(itemNodes.item(11).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoTotal\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\t\n\t\t\t\t\tv.add(extrato);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setExtratos(v);\n\t\t\t\n\t\t\tv= new Vector();\n\t\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"evento\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"evento\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\n\t\t\t\t\tEvento evento = new Evento();\n\t\t\t\t\tevento.setNome(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setHora(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tv.add(evento);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setEventos(v);\n\t\t\t\n\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"totais\" ).item(0);\n\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t{\t\n\t\t\t\t// SaldoInicial Principal\n\t\t\t\tresult.setSaldoInicialPrincipal\t(itemNodes.item(0).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialBonus\t\t(itemNodes.item(0).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialSMS\t\t(itemNodes.item(0).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialGPRS\t\t(itemNodes.item(0).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialPeriodico\t(itemNodes.item(0).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialTotal\t\t(itemNodes.item(0).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalDebitosPrincipal\t(itemNodes.item(1).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosBonus\t\t(itemNodes.item(1).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosSMS\t\t(itemNodes.item(1).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosGPRS\t\t(itemNodes.item(1).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosPeriodico (itemNodes.item(1).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosTotal\t\t(itemNodes.item(1).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalCreditosPrincipal(itemNodes.item(2).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosBonus\t(itemNodes.item(2).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosSMS\t\t(itemNodes.item(2).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosGPRS\t\t(itemNodes.item(2).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosPeriodico(itemNodes.item(2).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosTotal\t(itemNodes.item(2).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setSaldoFinalPrincipal\t(itemNodes.item(3).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalBonus\t\t(itemNodes.item(3).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalSMS\t\t\t(itemNodes.item(3).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalGPRS\t\t(itemNodes.item(3).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalPeriodico\t(itemNodes.item(3).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalTotal\t\t(itemNodes.item(3).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tserviceElement = (Element) doc.getElementsByTagName( \"dadosCadastrais\" ).item(0);\n\t\t\t\titemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.item(2).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setDataAtivacao(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (itemNodes.item(3).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setPlano(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tthrow new Exception(\"Problemas com a geração do Comprovante de Serviços.\");\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private void salvarXML(){\r\n\t\tarquivo.setLista(listaDeUsuarios);\r\n\t\tarquivo.finalizarXML();\r\n\t}", "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "@WebMethod(operationName = \"CalcularPP\")\n public String CalcularPP(@WebParam(name = \"xml\")String xml)\n {\n try\n {\n if(xml == null)\n return xmlVacioExpt;\n ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());\n DocumentBuilderFactory dbfacIN = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilderIN = dbfacIN.newDocumentBuilder();\n Document docIN = docBuilderIN.parse(bais);\n if( docIN.getDocumentElement().getNodeName().equals(\"EntradaCalculadoraPP\"))\n {\n int cliId = GetValueInt(docIN, \"CLI_ID\");\n int cliSap = GetValueInt(docIN, \"CLI_SAP\");\n String cliApePat = GetValue(docIN, \"CLI_APE_PAT\");\n String cliApeMat = GetValue(docIN, \"CLI_APE_MAT\");\n String cliNom = GetValue(docIN, \"CLI_NOM\");\n String cliFecNac = GetValue(docIN, \"CLI_FEC_NAC\");\n String cliDomCal = GetValue(docIN,\"CLI_DOM_CAL\");\n String cliDomNumExt = GetValue(docIN,\"CLI_DOM_NUM_EXT\");\n String cliDomNumInt = GetValue(docIN,\"CLI_DOM_NUM_INT\");\n String cliDomCol = GetValue(docIN,\"CLI_DOM_COL\");\n String codPosId = GetValue(docIN,\"COD_POS_ID\");\n\n int estado = GetValueInt(docIN, \"ESTADO\");\n int edad = GetValueInt(docIN, \"EDAD\");\n int ocupacion = GetValueInt(docIN, \"OCUPACION\");\n String fecha = GetValue(docIN, \"FECHA\");\n float mensualidad = GetValueInt(docIN, \"CUOTA\");\n float valor_vivienda = GetValueInt(docIN, \"VALOR_VIVIENDA\");\n\n if(estado<1 || ocupacion<1)\n return datosErrorExpt+\"ESTADO,OCUPACION\";\n if(edad<18 && edad>65)\n return ErrorEdadExpt;\n\n\n\n //Crear un XML vacio\n DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = dbfac.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //Crear el Arbol XML\n\n //Añadir la raiz\n Element raiz = doc.createElement(\"SalidaCalculadoraPP\");\n doc.appendChild(raiz);\n\n //Crear hijs y adicionarlos a la raiz\n AgregarNodo(raiz,doc,\"CLI_ID\",Integer.toString(cliId));\n AgregarNodo(raiz,doc,\"CLI_SAP\",Integer.toString(cliSap));\n\n Session s = objetos.HibernateUtil.getSessionFactory().getCurrentSession();\n \n Transaction tx = s.beginTransaction();\n Query q = s.createQuery(\"from Edo as edo where edo.cal.calId = '6'\");\n List lista = (List) q.list();\n double estado_woe = ((Edo)lista.get(estado-1)).getEdoWoe();\n double recargo = ((Edo)lista.get(estado-1)).getEdoRcg();\n\n q = s.createQuery(\"from RngEda as eda where eda.calId='6' and eda.rngEdaLimInf<=\"+edad+\" and eda.rngEdaLimSup>=\"+edad);\n lista = (List) q.list();\n double edad_woe = ((RngEda)lista.get(0)).getRngEdaWoe();\n\n q = s.createQuery(\"from Ocp as ocp where ocp.cal.calId = '6' and ocp.ocpOrdPre=\"+ocupacion);\n lista = (List) q.list();\n double ocupacion_woe = ((Ocp)lista.get(0)).getOcpWoe();\n\n // double zeta = 0.018-(0.01)*estado_woe-(0.017)*edad_woe-(0.008)*ocupacion_woe;\n double zeta = 0.018146691102274-(0.00993013369427481)* estado_woe -(0.017366941566975)* edad_woe -(0.00838465419451784)* ocupacion_woe;\n double pi = Math.exp(zeta)/(1+Math.exp(zeta));\n\n q = s.createQuery(\"from IntPi as intPi where intPi.cal.calId='6' and intPi.intPiLimInf<=\"+pi+\" and intPi.intPiLimSup>=\"+pi);\n lista = (List) q.list();\n String clasificacion = ((IntPi)lista.get(0)).getIntPiDes();\n\n q = s.createQuery(\"from FtrPpr as fp where fp.ftrPprCls='\"+clasificacion+\"' and fp.ftrPprMes=\"+fecha);\n lista = (List) q.list();\n double cuota = ((FtrPpr)lista.get(0)).getFtrPprFtr();\n\n double ppr = valor_vivienda*cuota;\n double cuota_pprr = cuota * (1 + recargo);\n double pprr = valor_vivienda *cuota_pprr;\n\n\n System.out.println(estado_woe);\n System.out.println(recargo);\n System.out.println(edad_woe);\n System.out.println(ocupacion_woe);\n System.out.println(zeta);\n System.out.println(pi);\n System.out.println(clasificacion);\n System.out.println(cuota);\n System.out.println(ppr);\n System.out.println(cuota_pprr);\n System.out.println(pprr);\n\n\n AgregarNodo(raiz,doc,\"CUOTA_PURA_RIESGO\",Double.toString(cuota*100)+\"%\");\n AgregarNodo(raiz,doc,\"CUOTA_RECARGADAD\",Double.toString(cuota_pprr*100)+\"%\");\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESGO\",\"$\"+Double.toString(ppr));\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESO_RECARGADA\",\"$\"+Double.toString(pprr));\n //Salida del XML\n TransformerFactory transfac = TransformerFactory.newInstance();\n Transformer trans = transfac.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n StringWriter sw = new StringWriter();\n StreamResult result = new StreamResult(sw);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, result);\n String xmlString = sw.toString();\n\n return xmlString;\n }else\n return tabNoEncontradoExpt+\"EntradaCalculadoraPP\";\n } catch (ParserConfigurationException parE) {\n return xmlExpt;\n } catch (SAXException saxE) {\n return xmlExpt;\n } catch (IOException ioE) {\n return xmlExpt;\n } catch (Exception e) {\n return e.getMessage();\n }\n }", "public void setFilaDatosExportarXmlCostoGastoImpor(CostoGastoImpor costogastoimpor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(CostoGastoImporConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(costogastoimpor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(CostoGastoImporConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(costogastoimpor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(costogastoimpor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(costogastoimpor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementtipocostogastoimpor_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDTIPOCOSTOGASTOIMPOR);\r\n\t\telementtipocostogastoimpor_descripcion.appendChild(document.createTextNode(costogastoimpor.gettipocostogastoimpor_descripcion()));\r\n\t\telement.appendChild(elementtipocostogastoimpor_descripcion);\r\n\r\n\t\tElement elementnombre = document.createElement(CostoGastoImporConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(costogastoimpor.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementes_activo = document.createElement(CostoGastoImporConstantesFunciones.ESACTIVO);\r\n\t\telementes_activo.appendChild(document.createTextNode(costogastoimpor.getes_activo().toString().trim()));\r\n\t\telement.appendChild(elementes_activo);\r\n\r\n\t\tElement elementcon_agrupa = document.createElement(CostoGastoImporConstantesFunciones.CONAGRUPA);\r\n\t\telementcon_agrupa.appendChild(document.createTextNode(costogastoimpor.getcon_agrupa().toString().trim()));\r\n\t\telement.appendChild(elementcon_agrupa);\r\n\r\n\t\tElement elementcon_prorratea = document.createElement(CostoGastoImporConstantesFunciones.CONPRORRATEA);\r\n\t\telementcon_prorratea.appendChild(document.createTextNode(costogastoimpor.getcon_prorratea().toString().trim()));\r\n\t\telement.appendChild(elementcon_prorratea);\r\n\r\n\t\tElement elementcon_factura = document.createElement(CostoGastoImporConstantesFunciones.CONFACTURA);\r\n\t\telementcon_factura.appendChild(document.createTextNode(costogastoimpor.getcon_factura().toString().trim()));\r\n\t\telement.appendChild(elementcon_factura);\r\n\r\n\t\tElement elementcon_flete = document.createElement(CostoGastoImporConstantesFunciones.CONFLETE);\r\n\t\telementcon_flete.appendChild(document.createTextNode(costogastoimpor.getcon_flete().toString().trim()));\r\n\t\telement.appendChild(elementcon_flete);\r\n\r\n\t\tElement elementcon_arancel = document.createElement(CostoGastoImporConstantesFunciones.CONARANCEL);\r\n\t\telementcon_arancel.appendChild(document.createTextNode(costogastoimpor.getcon_arancel().toString().trim()));\r\n\t\telement.appendChild(elementcon_arancel);\r\n\r\n\t\tElement elementcon_seguro = document.createElement(CostoGastoImporConstantesFunciones.CONSEGURO);\r\n\t\telementcon_seguro.appendChild(document.createTextNode(costogastoimpor.getcon_seguro().toString().trim()));\r\n\t\telement.appendChild(elementcon_seguro);\r\n\r\n\t\tElement elementcon_total_general = document.createElement(CostoGastoImporConstantesFunciones.CONTOTALGENERAL);\r\n\t\telementcon_total_general.appendChild(document.createTextNode(costogastoimpor.getcon_total_general().toString().trim()));\r\n\t\telement.appendChild(elementcon_total_general);\r\n\r\n\t\tElement elementcon_digitado = document.createElement(CostoGastoImporConstantesFunciones.CONDIGITADO);\r\n\t\telementcon_digitado.appendChild(document.createTextNode(costogastoimpor.getcon_digitado().toString().trim()));\r\n\t\telement.appendChild(elementcon_digitado);\r\n\t}", "public void setFilaDatosExportarXmlLiquidacionImpuestoImpor(LiquidacionImpuestoImpor liquidacionimpuestoimpor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(LiquidacionImpuestoImporConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(liquidacionimpuestoimpor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(LiquidacionImpuestoImporConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(liquidacionimpuestoimpor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementpedidocompraimpor_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDPEDIDOCOMPRAIMPOR);\r\n\t\telementpedidocompraimpor_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getpedidocompraimpor_descripcion()));\r\n\t\telement.appendChild(elementpedidocompraimpor_descripcion);\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementcliente_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDCLIENTE);\r\n\t\telementcliente_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcliente_descripcion()));\r\n\t\telement.appendChild(elementcliente_descripcion);\r\n\r\n\t\tElement elementfactura_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDFACTURA);\r\n\t\telementfactura_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfactura_descripcion()));\r\n\t\telement.appendChild(elementfactura_descripcion);\r\n\r\n\t\tElement elementnumero_comprobante = document.createElement(LiquidacionImpuestoImporConstantesFunciones.NUMEROCOMPROBANTE);\r\n\t\telementnumero_comprobante.appendChild(document.createTextNode(liquidacionimpuestoimpor.getnumero_comprobante().trim()));\r\n\t\telement.appendChild(elementnumero_comprobante);\r\n\r\n\t\tElement elementnumero_dui = document.createElement(LiquidacionImpuestoImporConstantesFunciones.NUMERODUI);\r\n\t\telementnumero_dui.appendChild(document.createTextNode(liquidacionimpuestoimpor.getnumero_dui().trim()));\r\n\t\telement.appendChild(elementnumero_dui);\r\n\r\n\t\tElement elementfecha = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FECHA);\r\n\t\telementfecha.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfecha().toString().trim()));\r\n\t\telement.appendChild(elementfecha);\r\n\r\n\t\tElement elementfecha_pago = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FECHAPAGO);\r\n\t\telementfecha_pago.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfecha_pago().toString().trim()));\r\n\t\telement.appendChild(elementfecha_pago);\r\n\r\n\t\tElement elementfob = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FOB);\r\n\t\telementfob.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfob().toString().trim()));\r\n\t\telement.appendChild(elementfob);\r\n\r\n\t\tElement elementseguro = document.createElement(LiquidacionImpuestoImporConstantesFunciones.SEGURO);\r\n\t\telementseguro.appendChild(document.createTextNode(liquidacionimpuestoimpor.getseguro().toString().trim()));\r\n\t\telement.appendChild(elementseguro);\r\n\r\n\t\tElement elementflete = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FLETE);\r\n\t\telementflete.appendChild(document.createTextNode(liquidacionimpuestoimpor.getflete().toString().trim()));\r\n\t\telement.appendChild(elementflete);\r\n\r\n\t\tElement elementporcentaje_fodi = document.createElement(LiquidacionImpuestoImporConstantesFunciones.PORCENTAJEFODI);\r\n\t\telementporcentaje_fodi.appendChild(document.createTextNode(liquidacionimpuestoimpor.getporcentaje_fodi().toString().trim()));\r\n\t\telement.appendChild(elementporcentaje_fodi);\r\n\r\n\t\tElement elementporcentaje_iva = document.createElement(LiquidacionImpuestoImporConstantesFunciones.PORCENTAJEIVA);\r\n\t\telementporcentaje_iva.appendChild(document.createTextNode(liquidacionimpuestoimpor.getporcentaje_iva().toString().trim()));\r\n\t\telement.appendChild(elementporcentaje_iva);\r\n\r\n\t\tElement elementtasa_control = document.createElement(LiquidacionImpuestoImporConstantesFunciones.TASACONTROL);\r\n\t\telementtasa_control.appendChild(document.createTextNode(liquidacionimpuestoimpor.gettasa_control().toString().trim()));\r\n\t\telement.appendChild(elementtasa_control);\r\n\r\n\t\tElement elementcfr = document.createElement(LiquidacionImpuestoImporConstantesFunciones.CFR);\r\n\t\telementcfr.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcfr().toString().trim()));\r\n\t\telement.appendChild(elementcfr);\r\n\r\n\t\tElement elementcif = document.createElement(LiquidacionImpuestoImporConstantesFunciones.CIF);\r\n\t\telementcif.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcif().toString().trim()));\r\n\t\telement.appendChild(elementcif);\r\n\r\n\t\tElement elementtotal = document.createElement(LiquidacionImpuestoImporConstantesFunciones.TOTAL);\r\n\t\telementtotal.appendChild(document.createTextNode(liquidacionimpuestoimpor.gettotal().toString().trim()));\r\n\t\telement.appendChild(elementtotal);\r\n\t}", "com.synergyj.cursos.webservices.ordenes.XMLBFactura getXMLBFactura();", "public static boolean ReescrituraConfig(String ruta, String ws, String ip_bd, String id_portico, String chapa, String dispo, String idAdmin, List<EventoPuertaMagnetica> eventos, String loc_geo){\n try{\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //creacion de elementos\n Element rootElement = doc.createElement(\"parametros\");\n Element urlWS = doc.createElement(\"Url_WebServices\");\n Element idPort = doc.createElement(\"Id_Portico\");\n Element ipBD = doc.createElement(\"Base_Datos_IP\");\n Element cha = doc.createElement(\"Tiene_Chapa\");\n Element disp = doc.createElement(\"Disposicion\");\n Element idAdm = doc.createElement(\"Id_Crede_Administrador\");\n Element lg = doc.createElement(\"Localizacion_Geografica\");\n\n doc.appendChild(rootElement); //ingreso de cabecera.\n\n //ingreso de datos a elementos\n urlWS.appendChild(doc.createTextNode(ws));\n idPort.appendChild(doc.createTextNode(id_portico));\n ipBD.appendChild(doc.createTextNode(ip_bd));\n cha.appendChild(doc.createTextNode(chapa));\n disp.appendChild(doc.createTextNode(dispo));\n idAdm.appendChild(doc.createTextNode(idAdmin));\n lg.appendChild(doc.createTextNode(loc_geo));\n\n //ingresos de elementos a cabecera\n rootElement.appendChild(urlWS);\n rootElement.appendChild(idPort);\n rootElement.appendChild(ipBD);\n rootElement.appendChild(cha);\n rootElement.appendChild(disp);\n rootElement.appendChild(idAdm);\n rootElement.appendChild(lg);\n\n if(chapa.equals(\"Z0B9C4B\")){\n for(int i=0; i<eventos.size(); i++){\n Element event = doc.createElement(\"Evento\");\n Element idEvent = doc.createElement(\"Id_Evento\");\n Element nombreEvent = doc.createElement(\"Nombre_Evento\");\n idEvent.appendChild(doc.createTextNode(eventos.get(i).get_U01B3F3()));\n nombreEvent.appendChild(doc.createTextNode(eventos.get(i).get_DESTINO()));\n event.appendChild(idEvent);\n event.appendChild(nombreEvent);\n rootElement.appendChild(event);\n }\n\n }\n\n //transformacion a archivo XML.\n\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer trans = transFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File dir = new File(ruta);\n\n Log.i(TAG, \"Se verifica la existencia del archivo apra su creacion\");\n if(dir.exists()){\n //elimino el archivo xml junto con el folder.\n\n File [] archivo = dir.listFiles();//data/data/com.civi/config/config.xml\n if(archivo.length != 0){//existen archivos.\n Log.i(TAG, \"Archivo config existe, eliminando...\");\n if(archivo[0].delete()){\n Log.i(TAG, \"Archivo Config eliminado\");\n if(dir.delete()){//elimino el folder.\n Log.i(TAG, \"Folder config eliminado\");\n }else{\n Log.i(TAG, \"No fue posible la eliminacion del folder\");\n }\n }else{\n Log.i(TAG, \"NO fue posible la eliminacion del archivo\");\n }\n }else{\n Log.i(TAG, \"Archivo Config no existe. elimino solo el folder\");\n if(dir.delete()){\n Log.i(TAG, \"Folder eliminado\");\n }\n }\n\n }\n\n //Creacion de folder.\n if(dir.mkdirs()){\n StreamResult result = new StreamResult(new File(dir, \"config.xml\"));\n trans.transform(source, result);\n }\n Log.i(TAG, \"Generacion de config.xml realizada en \"+ruta);\n\n } catch(Exception ex){\n return false;\n }\n return true;\n }", "public void transfertopurge(File file) {\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = null;\n String selfNodeID = null;\n try {\n documentBuilder = builderFactory.newDocumentBuilder();\n Document doc = documentBuilder.parse(file);\n doc.getDocumentElement().normalize();\n String rootElement = doc.getDocumentElement().getNodeName();\n String layerIDS = doc.getDocumentElement().getAttribute(\"LayerID\");\n int layerID = Integer.parseInt(layerIDS);\n NodeList nodeList1 = doc.getElementsByTagName(\"DATA\");\n for (int i = 0; i < nodeList1.getLength(); i++) {\n Node node = nodeList1.item(i);\n\n if (node.getNodeType() == node.ELEMENT_NODE) {\n Element element = (Element) node;\n String index = node.getAttributes().getNamedItem(\"INDEX\").getNodeValue();\n\n //Get value of all sub-Elements\n String key = element.getElementsByTagName(\"KEY\").item(0).getTextContent();\n String hashid = String.valueOf(element.getElementsByTagName(\"NEXTHOP\").item(0).getTextContent());\n if (!(hashid.equals(\"RootNode\"))) {\n ObjReturn obj3 = utility.search_entry(key,layerID);\n transfer(key, obj3);\n utility.delete_entry(layerID, key);\n\n }\n }\n }\n\n\n } catch (ParserConfigurationException | IOException e) {\n\n } catch (org.xml.sax.SAXException e) {\n e.printStackTrace();\n }\n }", "public void parse() {\n File sourceFile = new File(DEFAULT_DS_FILE_PATH);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory\n .newInstance();\n documentBuilderFactory.setNamespaceAware(true);\n DocumentBuilder builder = null;\n try {\n builder = documentBuilderFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n Document document = null;\n try {\n document = builder.parse(sourceFile);\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n XPathFactory xpathFactory = XPathFactory.newInstance();\n XPath xpath = xpathFactory.newXPath();\n\n //read the database properties and assign to local variables.\n XPathExpression expression = null;\n Node result = null;\n try {\n expression = xpath.compile(DRIVER_CLASS_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n driverClassName = result.getTextContent();\n expression = xpath.compile(CONNECTION_URL_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n connectionUrl = result.getTextContent();\n expression = xpath.compile(USER_NAME_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n userName = result.getTextContent();\n expression = xpath.compile(PASSWORD_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n password = result.getTextContent();\n\n } catch (XPathExpressionException e) {\n e.printStackTrace();\n }\n System.out.println(driverClassName);\n System.out.println(connectionUrl);\n try {\n\t\t\tSystem.out.println(userName.getBytes(\"EUC-JP\"));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(password);\n }", "public void setFilaDatosExportarXmlPagosAutorizados(PagosAutorizados pagosautorizados,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(PagosAutorizadosConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(pagosautorizados.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(PagosAutorizadosConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(pagosautorizados.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(PagosAutorizadosConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(pagosautorizados.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementfecha_corte = document.createElement(PagosAutorizadosConstantesFunciones.FECHACORTE0);\r\n\t\telementfecha_corte.appendChild(document.createTextNode(pagosautorizados.getfecha_corte().toString().trim()));\r\n\t\telement.appendChild(elementfecha_corte);\r\n\r\n\t\tElement elementnombre_cliente = document.createElement(PagosAutorizadosConstantesFunciones.NOMBRECLIENTE);\r\n\t\telementnombre_cliente.appendChild(document.createTextNode(pagosautorizados.getnombre_cliente().trim()));\r\n\t\telement.appendChild(elementnombre_cliente);\r\n\r\n\t\tElement elementnumero_factura = document.createElement(PagosAutorizadosConstantesFunciones.NUMEROFACTURA);\r\n\t\telementnumero_factura.appendChild(document.createTextNode(pagosautorizados.getnumero_factura().trim()));\r\n\t\telement.appendChild(elementnumero_factura);\r\n\r\n\t\tElement elementfecha_emision = document.createElement(PagosAutorizadosConstantesFunciones.FECHAEMISION);\r\n\t\telementfecha_emision.appendChild(document.createTextNode(pagosautorizados.getfecha_emision().toString().trim()));\r\n\t\telement.appendChild(elementfecha_emision);\r\n\r\n\t\tElement elementfecha_vencimiento = document.createElement(PagosAutorizadosConstantesFunciones.FECHAVENCIMIENTO);\r\n\t\telementfecha_vencimiento.appendChild(document.createTextNode(pagosautorizados.getfecha_vencimiento().toString().trim()));\r\n\t\telement.appendChild(elementfecha_vencimiento);\r\n\r\n\t\tElement elementnombre_banco = document.createElement(PagosAutorizadosConstantesFunciones.NOMBREBANCO);\r\n\t\telementnombre_banco.appendChild(document.createTextNode(pagosautorizados.getnombre_banco().trim()));\r\n\t\telement.appendChild(elementnombre_banco);\r\n\r\n\t\tElement elementvalor_por_pagar = document.createElement(PagosAutorizadosConstantesFunciones.VALORPORPAGAR);\r\n\t\telementvalor_por_pagar.appendChild(document.createTextNode(pagosautorizados.getvalor_por_pagar().toString().trim()));\r\n\t\telement.appendChild(elementvalor_por_pagar);\r\n\r\n\t\tElement elementvalor_cancelado = document.createElement(PagosAutorizadosConstantesFunciones.VALORCANCELADO);\r\n\t\telementvalor_cancelado.appendChild(document.createTextNode(pagosautorizados.getvalor_cancelado().toString().trim()));\r\n\t\telement.appendChild(elementvalor_cancelado);\r\n\r\n\t\tElement elementnumero_cuenta = document.createElement(PagosAutorizadosConstantesFunciones.NUMEROCUENTA);\r\n\t\telementnumero_cuenta.appendChild(document.createTextNode(pagosautorizados.getnumero_cuenta().trim()));\r\n\t\telement.appendChild(elementnumero_cuenta);\r\n\r\n\t\tElement elementesta_autorizado = document.createElement(PagosAutorizadosConstantesFunciones.ESTAAUTORIZADO);\r\n\t\telementesta_autorizado.appendChild(document.createTextNode(pagosautorizados.getesta_autorizado().toString().trim()));\r\n\t\telement.appendChild(elementesta_autorizado);\r\n\r\n\t\tElement elementdescripcion = document.createElement(PagosAutorizadosConstantesFunciones.DESCRIPCION);\r\n\t\telementdescripcion.appendChild(document.createTextNode(pagosautorizados.getdescripcion().trim()));\r\n\t\telement.appendChild(elementdescripcion);\r\n\r\n\t\tElement elementfecha_corte_dato = document.createElement(PagosAutorizadosConstantesFunciones.FECHACORTE);\r\n\t\telementfecha_corte_dato.appendChild(document.createTextNode(pagosautorizados.getfecha_corte_dato().toString().trim()));\r\n\t\telement.appendChild(elementfecha_corte_dato);\r\n\r\n\t\tElement elementestado = document.createElement(PagosAutorizadosConstantesFunciones.ESTADO);\r\n\t\telementestado.appendChild(document.createTextNode(pagosautorizados.getestado().trim()));\r\n\t\telement.appendChild(elementestado);\r\n\r\n\t\tElement elementcodigo_cuenta_con_cliente = document.createElement(PagosAutorizadosConstantesFunciones.CODIGOCUENTACONCLIENTE);\r\n\t\telementcodigo_cuenta_con_cliente.appendChild(document.createTextNode(pagosautorizados.getcodigo_cuenta_con_cliente().trim()));\r\n\t\telement.appendChild(elementcodigo_cuenta_con_cliente);\r\n\r\n\t\tElement elementcodigo_cuenta_con_banco = document.createElement(PagosAutorizadosConstantesFunciones.CODIGOCUENTACONBANCO);\r\n\t\telementcodigo_cuenta_con_banco.appendChild(document.createTextNode(pagosautorizados.getcodigo_cuenta_con_banco().trim()));\r\n\t\telement.appendChild(elementcodigo_cuenta_con_banco);\r\n\t}", "public File escribirXML(String pPath, String pathDestino){\r\n \r\n File fi = new File (pathDestino);\r\n \r\n FileWriter f;\r\n \r\n try {\r\n \r\n f = new FileWriter(fi);\r\n \r\n f.write(escrituraXML(pHost,pIp,pPath));\r\n \r\n f.close();\r\n \r\n } catch (Exception e) {\r\n \r\n e.printStackTrace();\r\n }\r\n return fi ;\r\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"codigo\"));\n \n elementList.add(localCodigo==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCodigo));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"bloqueado\"));\n \n elementList.add(localBloqueado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localBloqueado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"estado\"));\n \n \n elementList.add(localEstado==null?null:\n localEstado);\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"fechaFacturado\"));\n \n elementList.add(localFechaFacturado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFechaFacturado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"fechaSolicitud\"));\n \n elementList.add(localFechaSolicitud==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFechaSolicitud));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"flete\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFlete));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"motivoRechazo\"));\n \n \n elementList.add(localMotivoRechazo==null?null:\n localMotivoRechazo);\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"observacion\"));\n \n elementList.add(localObservacion==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localObservacion));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"origen\"));\n \n elementList.add(localOrigen==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOrigen));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoDescuento\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoDescuento));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoEstimado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoEstimado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoSolicitado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoSolicitado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoFacturado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoFacturado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoFacturadoSinDescuento\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoFacturadoSinDescuento));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"percepcion\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPercepcion));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"cantidadCUVErrado\"));\n \n elementList.add(localCantidadCUVErrado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCantidadCUVErrado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"cantidadFaltanteAnunciado\"));\n \n elementList.add(localCantidadFaltanteAnunciado==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCantidadFaltanteAnunciado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoPedidoRechazado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoPedidoRechazado));\n \n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"montoCatalogoEstimado\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMontoCatalogoEstimado));\n \n if (localPedidoDetalle!=null) {\n for (int i = 0;i < localPedidoDetalle.length;i++){\n\n if (localPedidoDetalle[i] != null){\n elementList.add(new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\n \"pedidoDetalle\"));\n elementList.add(localPedidoDetalle[i]);\n } else {\n \n throw new org.apache.axis2.databinding.ADBException(\"pedidoDetalle cannot be null !!\");\n \n }\n\n }\n } else {\n \n throw new org.apache.axis2.databinding.ADBException(\"pedidoDetalle cannot be null!!\");\n \n }\n\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public void testImportXML() throws RepositoryException, IOException{\n String path = \"path\";\n InputStream stream = new ByteArrayInputStream(new byte[0]);\n session.importXML(path, stream, 0);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.importXML(path, stream, 0);\n }", "public void loadFromLocalXML(Context context) {\n\n AccountManager.getInstance().reset();\n int _cnt = PreferenceManager.getDefaultSharedPreferences(context).getInt(\"Account_amount\", 0);\n for (int _iter = 0; _iter < _cnt; _iter++) {\n String[] _tmp;\n _tmp = PreferenceManager.getDefaultSharedPreferences(context).getString(\"Account_\" + String.valueOf(_iter), \"\").split(String.valueOf(separator));\n this.addAccount(_tmp[0], _tmp[1], _tmp[2], Integer.valueOf(_tmp[3]));\n }\n\n }", "public PointPolygon extractPointFromIO(String xml_og) {\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t\t\t\tString pathToCoordinates =\"//gml:Point/gml:pos\";\r\n\t\t\t\t//String pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\tArrayList<String> list_xy = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\t\t\r\n\t\t\t\t\tlist_xy.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t\tpoint.y_latitude = Double.parseDouble(list_xy.get(0).split(\" \")[0]);\r\n\t\t\t\t\tpoint.x_longitude = Double.parseDouble(list_xy.get(0).split(\" \")[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tpoint.point2D.setLocation(point.x_longitude, point.y_latitude);\r\n\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\treturn point;\t\t\t\t\r\n\t}", "public PointPolygon extractPointFromIO(String xml_og) {\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t\t\t\t\r\n\t\t\t\t//String pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t \t\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi test!\");\r\n\t\t\t\t\r\n\t \tString pathToCoordinates =\"//gml:Point/gml:pos\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tArrayList<String> list_xy = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\t\t\r\n\t\t\t\t\tlist_xy.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\r\n\t\t\t\ttry{\t\t\t\t\r\n\t\t\t\t\tpoint.y_latitude = Double.parseDouble(list_xy.get(0).split(\" \")[0]);\r\n\t\t\t\t\tpoint.x_longitude = Double.parseDouble(list_xy.get(0).split(\" \")[1]);\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tpoint.point2D.setLocation(point.y_latitude, point.x_longitude);\r\n\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\t\t\t\t\t\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\treturn point;\t\t\t\t\r\n\t}", "public void saveToLocalXML(Context context){\n\n PreferenceManager.getDefaultSharedPreferences(context).edit().putInt(\"Account_amount\",\n this.size()).commit();\n for (int _iter = 0; _iter < AccountManager.getInstance().size(); _iter++) {\n PreferenceManager.getDefaultSharedPreferences(context).edit().putString(\"Account_\" + String.valueOf(_iter),\n this.getAccount(_iter).getName() + separator +\n this.getAccount(_iter).getUsername() + separator +\n this.getAccount(_iter).getPassword() + separator +\n String.valueOf(this.getAccount(_iter).getDepartment())).commit();\n }\n }", "public void setFilaDatosExportarXmlFacturaPuntoVenta(FacturaPuntoVenta facturapuntoventa,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(FacturaPuntoVentaConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(facturapuntoventa.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(FacturaPuntoVentaConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(facturapuntoventa.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(facturapuntoventa.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(facturapuntoventa.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementusuario_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDUSUARIO);\r\n\t\telementusuario_descripcion.appendChild(document.createTextNode(facturapuntoventa.getusuario_descripcion()));\r\n\t\telement.appendChild(elementusuario_descripcion);\r\n\r\n\t\tElement elementvendedor_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDVENDEDOR);\r\n\t\telementvendedor_descripcion.appendChild(document.createTextNode(facturapuntoventa.getvendedor_descripcion()));\r\n\t\telement.appendChild(elementvendedor_descripcion);\r\n\r\n\t\tElement elementcliente_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDCLIENTE);\r\n\t\telementcliente_descripcion.appendChild(document.createTextNode(facturapuntoventa.getcliente_descripcion()));\r\n\t\telement.appendChild(elementcliente_descripcion);\r\n\r\n\t\tElement elementcaja_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDCAJA);\r\n\t\telementcaja_descripcion.appendChild(document.createTextNode(facturapuntoventa.getcaja_descripcion()));\r\n\t\telement.appendChild(elementcaja_descripcion);\r\n\r\n\t\tElement elementtipoprecio_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDTIPOPRECIO);\r\n\t\telementtipoprecio_descripcion.appendChild(document.createTextNode(facturapuntoventa.gettipoprecio_descripcion()));\r\n\t\telement.appendChild(elementtipoprecio_descripcion);\r\n\r\n\t\tElement elementmesa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDMESA);\r\n\t\telementmesa_descripcion.appendChild(document.createTextNode(facturapuntoventa.getmesa_descripcion()));\r\n\t\telement.appendChild(elementmesa_descripcion);\r\n\r\n\t\tElement elementformato_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDFORMATO);\r\n\t\telementformato_descripcion.appendChild(document.createTextNode(facturapuntoventa.getformato_descripcion()));\r\n\t\telement.appendChild(elementformato_descripcion);\r\n\r\n\t\tElement elementtipofacturapuntoventa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDTIPOFACTURAPUNTOVENTA);\r\n\t\telementtipofacturapuntoventa_descripcion.appendChild(document.createTextNode(facturapuntoventa.gettipofacturapuntoventa_descripcion()));\r\n\t\telement.appendChild(elementtipofacturapuntoventa_descripcion);\r\n\r\n\t\tElement elementestadofacturapuntoventa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDESTADOFACTURAPUNTOVENTA);\r\n\t\telementestadofacturapuntoventa_descripcion.appendChild(document.createTextNode(facturapuntoventa.getestadofacturapuntoventa_descripcion()));\r\n\t\telement.appendChild(elementestadofacturapuntoventa_descripcion);\r\n\r\n\t\tElement elementasientocontable_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDASIENTOCONTABLE);\r\n\t\telementasientocontable_descripcion.appendChild(document.createTextNode(facturapuntoventa.getasientocontable_descripcion()));\r\n\t\telement.appendChild(elementasientocontable_descripcion);\r\n\r\n\t\tElement elementnumero_secuencial = document.createElement(FacturaPuntoVentaConstantesFunciones.NUMEROSECUENCIAL);\r\n\t\telementnumero_secuencial.appendChild(document.createTextNode(facturapuntoventa.getnumero_secuencial().trim()));\r\n\t\telement.appendChild(elementnumero_secuencial);\r\n\r\n\t\tElement elementcodigo_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.CODIGOCLIENTE);\r\n\t\telementcodigo_cliente.appendChild(document.createTextNode(facturapuntoventa.getcodigo_cliente().trim()));\r\n\t\telement.appendChild(elementcodigo_cliente);\r\n\r\n\t\tElement elementnombre_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.NOMBRECLIENTE);\r\n\t\telementnombre_cliente.appendChild(document.createTextNode(facturapuntoventa.getnombre_cliente().trim()));\r\n\t\telement.appendChild(elementnombre_cliente);\r\n\r\n\t\tElement elementtarjeta_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.TARJETACLIENTE);\r\n\t\telementtarjeta_cliente.appendChild(document.createTextNode(facturapuntoventa.gettarjeta_cliente().trim()));\r\n\t\telement.appendChild(elementtarjeta_cliente);\r\n\r\n\t\tElement elementdireccion_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.DIRECCIONCLIENTE);\r\n\t\telementdireccion_cliente.appendChild(document.createTextNode(facturapuntoventa.getdireccion_cliente().trim()));\r\n\t\telement.appendChild(elementdireccion_cliente);\r\n\r\n\t\tElement elementtelefono_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.TELEFONOCLIENTE);\r\n\t\telementtelefono_cliente.appendChild(document.createTextNode(facturapuntoventa.gettelefono_cliente().trim()));\r\n\t\telement.appendChild(elementtelefono_cliente);\r\n\r\n\t\tElement elementfecha = document.createElement(FacturaPuntoVentaConstantesFunciones.FECHA);\r\n\t\telementfecha.appendChild(document.createTextNode(facturapuntoventa.getfecha().toString().trim()));\r\n\t\telement.appendChild(elementfecha);\r\n\r\n\t\tElement elementhora = document.createElement(FacturaPuntoVentaConstantesFunciones.HORA);\r\n\t\telementhora.appendChild(document.createTextNode(facturapuntoventa.gethora().toString().trim()));\r\n\t\telement.appendChild(elementhora);\r\n\r\n\t\tElement elementtotal_iva = document.createElement(FacturaPuntoVentaConstantesFunciones.TOTALIVA);\r\n\t\telementtotal_iva.appendChild(document.createTextNode(facturapuntoventa.gettotal_iva().toString().trim()));\r\n\t\telement.appendChild(elementtotal_iva);\r\n\r\n\t\tElement elementtotal_sin_iva = document.createElement(FacturaPuntoVentaConstantesFunciones.TOTALSINIVA);\r\n\t\telementtotal_sin_iva.appendChild(document.createTextNode(facturapuntoventa.gettotal_sin_iva().toString().trim()));\r\n\t\telement.appendChild(elementtotal_sin_iva);\r\n\r\n\t\tElement elementiva = document.createElement(FacturaPuntoVentaConstantesFunciones.IVA);\r\n\t\telementiva.appendChild(document.createTextNode(facturapuntoventa.getiva().toString().trim()));\r\n\t\telement.appendChild(elementiva);\r\n\r\n\t\tElement elementdescuento = document.createElement(FacturaPuntoVentaConstantesFunciones.DESCUENTO);\r\n\t\telementdescuento.appendChild(document.createTextNode(facturapuntoventa.getdescuento().toString().trim()));\r\n\t\telement.appendChild(elementdescuento);\r\n\r\n\t\tElement elementfinanciamiento = document.createElement(FacturaPuntoVentaConstantesFunciones.FINANCIAMIENTO);\r\n\t\telementfinanciamiento.appendChild(document.createTextNode(facturapuntoventa.getfinanciamiento().toString().trim()));\r\n\t\telement.appendChild(elementfinanciamiento);\r\n\r\n\t\tElement elementflete = document.createElement(FacturaPuntoVentaConstantesFunciones.FLETE);\r\n\t\telementflete.appendChild(document.createTextNode(facturapuntoventa.getflete().toString().trim()));\r\n\t\telement.appendChild(elementflete);\r\n\r\n\t\tElement elementice = document.createElement(FacturaPuntoVentaConstantesFunciones.ICE);\r\n\t\telementice.appendChild(document.createTextNode(facturapuntoventa.getice().toString().trim()));\r\n\t\telement.appendChild(elementice);\r\n\r\n\t\tElement elementotros = document.createElement(FacturaPuntoVentaConstantesFunciones.OTROS);\r\n\t\telementotros.appendChild(document.createTextNode(facturapuntoventa.getotros().toString().trim()));\r\n\t\telement.appendChild(elementotros);\r\n\r\n\t\tElement elementsub_total = document.createElement(FacturaPuntoVentaConstantesFunciones.SUBTOTAL);\r\n\t\telementsub_total.appendChild(document.createTextNode(facturapuntoventa.getsub_total().toString().trim()));\r\n\t\telement.appendChild(elementsub_total);\r\n\r\n\t\tElement elementtotal = document.createElement(FacturaPuntoVentaConstantesFunciones.TOTAL);\r\n\t\telementtotal.appendChild(document.createTextNode(facturapuntoventa.gettotal().toString().trim()));\r\n\t\telement.appendChild(elementtotal);\r\n\t}", "public GeoJson extractDataForGeoJsonFromIo(String xml_og){\r\n\t\t\r\n\t\tGeoJson geoJson = new GeoJson();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else if(\"sams\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/samplingSpatial/2.0\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t \t\r\n\t \t//The path to the time is only for the first observation block valid; other blocks have another path\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString path_SamplingFOIIdentifier = \"//sams:SF_SpatialSamplingFeature/gml:identifier\";\r\n\t\t\t\tNodeList nodes_path_SamplingFOIIdentifier = (NodeList)xPath.compile(path_SamplingFOIIdentifier).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\r\n\t\t\t\tString path_y_lat_x_long = \"//gml:pos\";\r\n\t\t\t\tNodeList nodes_path_y_lat_x_long = (NodeList)xPath.compile(path_y_lat_x_long).evaluate(doc, XPathConstants.NODESET);\t\t\t\t\t\t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString messwert = \"\";\t\r\n\t\t\t\t\r\n\t\t\t\t//for(int n = 0; n<nodes_procedure.getLength(); n++){\r\n\t\t\t\t//we need the data from only the first observation block\r\n\t\t\t\tfor(int n = 0; n<1; n++){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString path_time = \"//gml:timePosition\";\r\n\t\t\t\t\tNodeList nodes_path_time = (NodeList)xPath.compile(path_time).evaluate(doc, XPathConstants.NODESET);\t\t\t\t\r\n\t\t\t\t\tString path_SamplingFOIName = \"//sams:SF_SpatialSamplingFeature/gml:name\";\r\n\t\t\t\t\tNodeList nodes_path_SamplingFOIName = (NodeList)xPath.compile(path_SamplingFOIName).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\tString path_procedure = \"//om:OM_Observation/om:procedure/@xlink:href\";\r\n\t\t\t\t\tNodeList nodes_procedure = (NodeList)xPath.compile(path_procedure).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tGeoJson gjson = new GeoJson();\r\n\t\t\t\t\t\tgeoJson.list_geoJson.add(gjson);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.observationPhenomenonTime = nodes_path_time.item(0).getTextContent();\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.samplingFOIName = nodes_path_SamplingFOIName.item(n).getTextContent();\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.samplingFOIIdentifier = nodes_path_SamplingFOIIdentifier.item(n).getTextContent();\r\n\t\t\t\t\t\tgjson.procedure = nodes_procedure.item(n).getTextContent();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString coords = nodes_path_y_lat_x_long.item(n).getTextContent();\r\n\t\t\t\t\t\tString [] stray = coords.split(\" \");\r\n\t\t\t\t\t\tgjson.y_lat = Double.parseDouble(coords.split(\" \")[0]);\r\n\t\t\t\t\t\tgjson.x_long = Double.parseDouble(coords.split(\" \")[1]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(stray.length==3){\r\n\t\t\t\t\t\t\tgjson.z_alt = Double.parseDouble(coords.split(\" \")[2]); \r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlogger.error(\"some error\", ex);\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\tGeoJson gj = geoJson.list_geoJson.get(0);\r\n\t\t\t\tfor (Field field : gj.getClass().getDeclaredFields()) {\r\n\t\t\t\t\tlogger.debug(field.getName()+ \": \"+field.get(gj));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\t//xml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn geoJson.list_geoJson.get(0);\r\n\t}", "private void parseXMLResult(String respFile, ProcureLineItem pli,\r\n\t\t\tApprovalRequest ar, BaseVector lineItems, Approvable lic)\r\n\t\t\tthrows SAXException, ParserConfigurationException, IOException {\r\n\t\tLog.customer.debug(\"After calling getVertexTaxResponse()...: %s\",\r\n\t\t\t\t\"CatTaxCustomApprover response file before parsing : - %s\",\r\n\t\t\t\tclassName, respFile);\r\n\t\t// Parsing XML and populating field in Ariba.....\r\n\t\tlic = ar.getApprovable();\r\n\t\tLog.customer.debug(\" Parsing XML file ...........: %s\", className);\r\n\t\tFile file1 = new File(respFile);\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\r\n\t\tDocument doc = db.parse(file1);\r\n\t\t// if(respFile!=null){\r\n\t\tdoc.getDocumentElement().normalize();\r\n\t\tNodeList nodeList = doc.getElementsByTagName(\"LineItem\");\r\n\t\tLog.customer.debug(\"%s Information of all Line Item nodeList %s\",\r\n\t\t\t\tclassName, nodeList.getLength());\r\n\r\n\t\tfor (int s = 0; s < nodeList.getLength(); s++) {\r\n\t\t\tNode fstNode = nodeList.item(s);\r\n\t\t\tElement fstElmntlnm = (Element) fstNode;\r\n\t\t\tString lineItemNumber = fstElmntlnm.getAttribute(\"lineItemNumber\");\r\n\t\t\tint index = Integer.parseInt(lineItemNumber);\r\n\t\t\ttry {\r\n\t\t\t\tint plinumber = index - 1;\r\n\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\"%s *** lineItemNumber plinumber after: %s\",\r\n\t\t\t\t\t\tclassName, plinumber);\r\n\t\t\t\tpli = (ProcureLineItem) lineItems.get(plinumber);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLog.customer.debug(\"%s *** in catch of pli : %s\", className,\r\n\t\t\t\t\t\tlineItemNumber + \" ******** \" + e.toString());\r\n\t\t\t\tLog.customer.debug(pli.toString());\r\n\t\t\t\tLog.customer.debug(e.getClass());\r\n\t\t\t}\r\n\t\t\tif (fstNode.getNodeType() == Node.ELEMENT_NODE) {\r\n\r\n\t\t\t\tElement fstElmnt = (Element) fstNode;\r\n\t\t\t\tNodeList countryElmntLst = fstElmnt\r\n\t\t\t\t\t\t.getElementsByTagName(\"Country\");\r\n\t\t\t\tElement lstNmElmnt = (Element) countryElmntLst.item(0);\r\n\t\t\t\tNodeList lstNm = lstNmElmnt.getChildNodes();\r\n\t\t\t\tLog.customer.debug(\"%s *** Country : %s\", className,\r\n\t\t\t\t\t\t((Node) lstNm.item(0)).getNodeValue());\r\n\r\n\t\t\t\t// Total Tax\r\n\t\t\t\tNodeList totaltaxElmntLst = fstElmnt\r\n\t\t\t\t\t\t.getElementsByTagName(\"TotalTax\");\r\n\t\t\t\tElement lstNmElmnt1 = (Element) totaltaxElmntLst.item(0);\r\n\t\t\t\tNodeList lstNm1 = lstNmElmnt1.getChildNodes();\r\n\t\t\t\tString totalTax = ((Node) lstNm1.item(0)).getNodeValue();\r\n\t\t\t\tBigDecimal taxAmount = new BigDecimal(totalTax);\r\n\t\t\t\tMoney taxTotal = new Money(taxAmount, pli.getAmount()\r\n\t\t\t\t\t\t.getCurrency());\r\n\t\t\t\tpli.setFieldValue(\"TaxAmount\", taxTotal);\r\n\t\t\t\tLog.customer.debug(\"%s *** Tax Amount : %s\", className,\r\n\t\t\t\t\t\ttotalTax);\r\n\r\n\t\t\t\t// Reason code\r\n\t\t\t\tElement fstElmntRC = (Element) fstNode;\r\n\t\t\t\tNodeList lstNmElmntLstRC = fstElmntRC\r\n\t\t\t\t\t\t.getElementsByTagName(\"AssistedParameter\");\r\n\t\t\t\tString ReasonCode = \" \";\r\n\t\t\t\tfor (int b = 0; b < lstNmElmntLstRC.getLength(); b++) {\r\n\t\t\t\t\tNode fstNodeRC = lstNmElmntLstRC.item(b);\r\n\t\t\t\t\tif (fstNodeRC.getNodeType() == Node.ELEMENT_NODE) {\r\n\t\t\t\t\t\tElement fstElmntRC1 = (Element) fstNodeRC;\r\n\t\t\t\t\t\tString fieldIdRC = fstElmntRC1.getAttribute(\"phase\");\r\n\t\t\t\t\t\tLog.customer.debug(\"%s *** ReasonCode in loop : \"\r\n\t\t\t\t\t\t\t\t+ fieldIdRC);\r\n\t\t\t\t\t\tif (\"POST\".equalsIgnoreCase(fieldIdRC)) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tElement lstNmElmntRC = (Element) lstNmElmntLstRC\r\n\t\t\t\t\t\t\t\t\t\t.item(0);\r\n\t\t\t\t\t\t\t\tif (lstNmElmntRC.equals(null)\r\n\t\t\t\t\t\t\t\t\t\t|| lstNmElmntRC.equals(\"\")) {\r\n\t\t\t\t\t\t\t\t\tReasonCode = \"\";\r\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\t\"%s *** ReasonCode in if : %s\",\r\n\t\t\t\t\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tNodeList lstNmRC = lstNmElmntRC\r\n\t\t\t\t\t\t\t\t\t\t\t.getChildNodes();\r\n\t\t\t\t\t\t\t\t\tReasonCode = ((Node) lstNmRC.item(0))\r\n\t\t\t\t\t\t\t\t\t\t\t.getNodeValue();\r\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\t\"%s *** ReasonCode in else : %s\",\r\n\t\t\t\t\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\"%s *** inside exception : %s\",\r\n\t\t\t\t\t\t\t\t\t\tclassName);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/*****************************************/\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLog.customer.debug(\"inside loop still....\");\r\n\t\t\t\t}\r\n\t\t\t\tLog.customer.debug(\"outside loop .....\");\r\n\t\t\t\t// *********************************************************************************\r\n\t\t\t\t// TaxAmount = 0 and Reason code = Null then exempt Reason code\r\n\t\t\t\t// is E0.\r\n\r\n\t\t\t\t// Start : RSD 111 (FRD4.0/TD 1.2)\r\n\r\n\t\t\t\tString sapsource = null;\r\n\t\t\t\tsapsource = (String)pli.getLineItemCollection().getDottedFieldValue(\"CompanyCode.SAPSource\");\r\n\r\n\t\t\t\tLog.customer.debug(\"*** ReasonCode logic RSD111 SAPSource is: %s\",sapsource);\r\n\r\n\t\t\t\tif((sapsource.equals(\"MACH1\")) && ((ReasonCode != null) && (!\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))\r\n\t\t\t\t{\r\n\t\t\t\t\t/** Fetching Description from Table. */\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode logic RSD111: \" + ReasonCode);\r\n\t\t\t\t\tString taxCodeForLookup = ReasonCode; // Please Replace with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Actual value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from Web Service\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Response.\r\n\t\t\t\t\tString qryStringrc = \"Select TaxExemptDescription from cat.core.TaxExemptReasonCode where TaxExemptUniqueName = '\"\r\n\t\t\t\t\t\t\t+ taxCodeForLookup + \"'\";\r\n\t\t\t\t\tLog.customer.debug(\"%s TaxExemptReasonCode : qryString \"\r\n\t\t\t\t\t\t\t+ qryStringrc);\r\n\t\t\t\t\t// Replace the cntrctrequest - Invoice Reconciliation Object\r\n\t\t\t\t\tAQLOptions queryOptionsrc = new AQLOptions(ar\r\n\t\t\t\t\t\t\t.getPartition());\r\n\t\t\t\t\tAQLResultCollection queryResultsrc = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryStringrc, queryOptionsrc);\r\n\t\t\t\t\tif (queryResultsrc != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" RSD111 -- TaxExemptReasonCode: Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResultsrc.next()) {\r\n\t\t\t\t\t\t\tString taxdescfromLookupvalue = (String) queryResultsrc\r\n\t\t\t\t\t\t\t\t\t.getString(0);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" RSD111 TaxExemptReasonCode: taxdescfromLookupvalue = \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t\t// Change the rli to appropriate Carrier Holding\r\n\t\t\t\t\t\t\t// object, i.e. IR Line object\r\n\t\t\t\t\t\t\tif (\"\".equals(taxdescfromLookupvalue)\r\n\t\t\t\t\t\t\t\t\t|| taxdescfromLookupvalue == null\r\n\t\t\t\t\t\t\t\t\t|| \"null\".equals(taxdescfromLookupvalue)) {\r\n\t\t\t\t\t\t\t\t// if(taxdescfromLookupvalue.equals(\"\")||taxdescfromLookupvalue\r\n\t\t\t\t\t\t\t\t// ==\r\n\t\t\t\t\t\t\t\t// null||taxdescfromLookupvalue.equals(\"null\")\r\n\t\t\t\t\t\t\t\t// ){\r\n\t\t\t\t\t\t\t\ttaxdescfromLookupvalue = \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpli\r\n\t\t\t\t\t\t\t\t\t.setFieldValue(\"Carrier\",\r\n\t\t\t\t\t\t\t\t\t\t\ttaxdescfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" RSD111 -- TaxExemptReasonCode Applied on Carrier: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// End : RSD 111 (FRD4.0/TD 1.2)\r\n\r\n\r\n\t\t\t\t} else if ((\"0.0\".equals(totalTax) && ((ReasonCode == null) || (\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))) {\r\n\t\t\t\t\tReasonCode = \"E0\";\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode in condition : %s\",\r\n\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t} else if ((\"0.0\".equals(totalTax) && ((ReasonCode != null) || (!\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))) {\r\n\r\n\t\t\t\t\t// End Exempt Reason code logic.\r\n\t\t\t\t\t/** Fetching Description from Table. */\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode after : \" + ReasonCode);\r\n\t\t\t\t\tString taxCodeForLookup = ReasonCode; // Please Replace with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Actual value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from Web Service\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Response.\r\n\t\t\t\t\tString qryStringrc = \"Select TaxExemptDescription from cat.core.TaxExemptReasonCode where TaxExemptUniqueName = '\"\r\n\t\t\t\t\t\t\t+ taxCodeForLookup + \"'\";\r\n\t\t\t\t\tLog.customer.debug(\"%s TaxExemptReasonCode : qryString \"\r\n\t\t\t\t\t\t\t+ qryStringrc);\r\n\t\t\t\t\t// Replace the cntrctrequest - Invoice Reconciliation Object\r\n\t\t\t\t\tAQLOptions queryOptionsrc = new AQLOptions(ar\r\n\t\t\t\t\t\t\t.getPartition());\r\n\t\t\t\t\tAQLResultCollection queryResultsrc = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryStringrc, queryOptionsrc);\r\n\t\t\t\t\tif (queryResultsrc != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode: Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResultsrc.next()) {\r\n\t\t\t\t\t\t\tString taxdescfromLookupvalue = (String) queryResultsrc\r\n\t\t\t\t\t\t\t\t\t.getString(0);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode: taxdescfromLookupvalue = \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t\t// Change the rli to appropriate Carrier Holding\r\n\t\t\t\t\t\t\t// object, i.e. IR Line object\r\n\t\t\t\t\t\t\tif (\"\".equals(taxdescfromLookupvalue)\r\n\t\t\t\t\t\t\t\t\t|| taxdescfromLookupvalue == null\r\n\t\t\t\t\t\t\t\t\t|| \"null\".equals(taxdescfromLookupvalue)) {\r\n\t\t\t\t\t\t\t\t// if(taxdescfromLookupvalue.equals(\"\")||taxdescfromLookupvalue\r\n\t\t\t\t\t\t\t\t// ==\r\n\t\t\t\t\t\t\t\t// null||taxdescfromLookupvalue.equals(\"null\")\r\n\t\t\t\t\t\t\t\t// ){\r\n\t\t\t\t\t\t\t\ttaxdescfromLookupvalue = \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpli\r\n\t\t\t\t\t\t\t\t\t.setFieldValue(\"Carrier\",\r\n\t\t\t\t\t\t\t\t\t\t\ttaxdescfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode Applied on Carrier: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// End Exempt Reason code logic.\r\n\r\n\t\t\t\t// *****************************************************************************//*\r\n\t\t\t\t// tax code logic ...\r\n\t\t\t\tif (totalTax.equals(\"0.0\")) {\r\n\t\t\t\t\tString companyCode = (String) lic\r\n\t\t\t\t\t\t\t.getDottedFieldValue(\"CompanyCode.UniqueName\");\r\n\t\t\t\t\tString state = (String) pli\r\n\t\t\t\t\t\t\t.getDottedFieldValue(\"ShipTo.State\");\r\n\t\t\t\t\tString formattedString = companyCode + \"_\" + state + \"_\"\r\n\t\t\t\t\t\t\t+ \"B0\";\r\n\t\t\t\t\tLog.customer.debug(\"***formattedString : \"\r\n\t\t\t\t\t\t\t+ formattedString);\r\n\t\t\t\t\tString qryString = \"Select TaxCode,UniqueName, SAPTaxCode from ariba.tax.core.TaxCode where UniqueName = '\"\r\n\t\t\t\t\t\t\t+ formattedString\r\n\t\t\t\t\t\t\t+ \"' and Country.UniqueName ='\"\r\n\t\t\t\t\t\t\t+ pli\r\n\t\t\t\t\t\t\t\t\t.getDottedFieldValue(\"ShipTo.Country.UniqueName\")\r\n\t\t\t\t\t\t\t+ \"'\";\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: qryString \"\r\n\t\t\t\t\t\t\t\t\t+ qryString);\r\n\t\t\t\t\tAQLOptions queryOptions = new AQLOptions(ar.getPartition());\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage I\");\r\n\t\t\t\t\tAQLResultCollection queryResults = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryString, queryOptions);\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage II- Query Executed\");\r\n\t\t\t\t\tif (queryResults != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage III - Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResults.next()) {\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage IV - Entering the DO of DO-WHILE\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ queryResults.getBaseId(0).get());\r\n\t\t\t\t\t\t\tTaxCode taxfromLookupvalue = (TaxCode) queryResults\r\n\t\t\t\t\t\t\t\t\t.getBaseId(0).get();\r\n\t\t\t\t\t\t\tLog.customer.debug(\" taxfromLookupvalue\"\r\n\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: TaxCodefromLookup\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\t// Set the Value of LineItem.TaxCode.UniqueName =\r\n\t\t\t\t\t\t\t// 'formattedString'\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: Setting TaxCodefromLookup\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\tpli.setFieldValue(\"TaxCode\", taxfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: Applied \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\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\t// end Tax code...\r\n\t\t\t\tLog.customer.debug(\"*** After loop Tax code : \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// }\r\n\t}", "abstract protected String getOtherXml();", "public void readXmlFile() {\r\n try {\r\n ClassLoader classLoader = getClass().getClassLoader();\r\n File credentials = new File(classLoader.getResource(\"credentials_example.xml\").getFile());\r\n DocumentBuilderFactory Factory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder Builder = Factory.newDocumentBuilder();\r\n Document doc = Builder.parse(credentials);\r\n doc.getDocumentElement().normalize();\r\n username = doc.getElementsByTagName(\"username\").item(0).getTextContent();\r\n password = doc.getElementsByTagName(\"password\").item(0).getTextContent();\r\n url = doc.getElementsByTagName(\"url\").item(0).getTextContent();\r\n setUsername(username);\r\n setPassword(password);\r\n setURL(url);\r\n } catch (Exception error) {\r\n System.out.println(\"Error in parssing the given xml file: \" + error.getMessage());\r\n }\r\n }", "public void obtainDisObsr() {\n\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"Observations\");\n\t\t\tdoc.appendChild(rootElement);\n\n\t\t\treader = new BufferedReader(new FileReader(this.dSPath));\n\n\t\t\tString line;\n\t\t\tString id = null;\n\t\t\tString nextID;\n\t\t\tString siteID;\n\t\t\tString siteID_Old = null;\n\t\t\tStringBuilder obsr = null;\n\n\t\t\t/**\n\t\t\t * Data must be sorted by the user ID Data set Arrana=ged as the\n\t\t\t * following ID Time Site ID\n\t\t\t */\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString lineSplit[] = line.split(\",\");\n\n\t\t\t\tnextID = lineSplit[0].trim();\n\n\t\t\t\tif (id == null) {\n\t\t\t\t\tid = nextID;\n\t\t\t\t}\n\t\t\t\tsiteID = lineSplit[2].trim();\n\n\t\t\t\tif (siteID_Old == null) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t} else if (siteID.equals(siteID_Old) && id.equals(nextID)) {\n\t\t\t\t\t// System.out.println(\"same id\");\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (!siteID.equals(siteID_Old)) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t}\n\n\t\t\t\tif (obsr == null) {\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\t\t\t\t} else if (id.equals(nextID)) {\n\t\t\t\t\tobsr.append(\",\");\n\t\t\t\t\tobsr.append(siteID);\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * User changed write the XL file Data Change the user ID ,\n\t\t\t\t\t * and record site with the new user\n\t\t\t\t\t */\n\n\t\t\t\t\tElement userElement = doc.createElement(\"user\");\n\t\t\t\t\trootElement.appendChild(userElement);\n\n\t\t\t\t\t// set attribute to staff element\n\t\t\t\t\tAttr attr = doc.createAttribute(\"id\");\n\t\t\t\t\tattr.setValue(id);\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"sitesSequanace\");\n\t\t\t\t\tattr.setValue(obsr.toString());\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tid = nextID;\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(new File(this.xmlPath));\n\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"File saved!\");\n\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (ParserConfigurationException | TransformerException pce) {\n\t\t}\n\t}", "public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localGBInterval_fromTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_from\"));\n \n if (localGBInterval_from != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_from));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_from cannot be null!!\");\n }\n } if (localGBInterval_toTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_to\"));\n \n if (localGBInterval_to != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_to));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_to cannot be null!!\");\n }\n } if (localGBInterval_pointTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_point\"));\n \n if (localGBInterval_point != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_point));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_point cannot be null!!\");\n }\n } if (localGBInterval_iscompTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_iscomp\"));\n \n \n if (localGBInterval_iscomp==null){\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_iscomp cannot be null!!\");\n }\n elementList.add(localGBInterval_iscomp);\n } if (localGBInterval_interbpTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_interbp\"));\n \n \n if (localGBInterval_interbp==null){\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_interbp cannot be null!!\");\n }\n elementList.add(localGBInterval_interbp);\n }\n elementList.add(new javax.xml.namespace.QName(\"http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq\",\n \"GBInterval_accession\"));\n \n if (localGBInterval_accession != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGBInterval_accession));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"GBInterval_accession cannot be null!!\");\n }\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public boolean processXml() throws Exception {\n\t\ttry {\n\t\t\tFile f = new File(fileOutboundLocation);\n\t\t\tString filesList[] = f.list();\n\t\n\t\t\tif (filesList != null) {\n\t\t\t\tfor (int i = 0; i < filesList.length; i++) {\n\t\t\t\t\tfileName = filesList[i];\n\t\t\t\t\tAppLogger.info(\"XmlProcessor.processXml()... file Name=\"+ filesList[i]);\n\t\t\t\t\tcopyFile(filesList[i], fileOutboundLocation, fileBackupLocation);\n\t\t\t\t\tSchemaValidator sv = new SchemaValidator();\n\t\t\t\t\tsv.validateXml(fileOutboundLocation+File.separator+filesList[i], xsdFileLocation, fileErrorLocation);\n\t\t\t\t\tString xmlString = fileRead(fileOutboundLocation + File.separator+ filesList[i]);\n\n\t\t\t\t\tconvertXmlToJavaObject(xmlString);\n\t\t\t\t\tpolicyNo = tXLifeType.getTXLifeRequest().getOLifE().getHolding().getPolicy().getPolNumber(); //RL_009109 - Changed by Kayal\n\t\t\t\t\tint indexOfUnderScore = fileName.indexOf(\"_\");\n\t\t\t\t\tString backupFileName = fileName.substring(0,indexOfUnderScore+1).concat(policyNo+\"_\").concat(fileName.substring(indexOfUnderScore+1));\n\t\t\t\t\t\n\t\t\t\t\trenameFile(fileName, fileBackupLocation, backupFileName, fileBackupLocation); //RL_009109 - Changed by Kayal\n\t\t\t\t\t\n\t\t\t\t\tsaveDetails();\n\t\t\t\t\tdeleteFile(filesList[i], fileOutboundLocation);\n\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tStringWriter sw = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t\te.printStackTrace(pw);\n\t\t\tAppLogger.error(\"Error Occurred: Exception is=\"+sw.toString());\n\t\t\tcopyFile(fileName, fileOutboundLocation, fileErrorLocation);\n\t\t\tdeleteFile(fileName, fileOutboundLocation);\n\t\t\tApcDAO dao = new ApcDAO();\n\t\t\tdao.saveErrorMsg(fileName, sw.toString(), policyNo); //RL_009109\n\t\t}\n\n\t\treturn true;\n\t}", "public void process(PurchaseOrder po)\n {\n File file = new File(path + \"/\" + ORDERS_XML);\n \n try\n {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource();\n is.setCharacterStream(new FileReader(file));\n\n Document doc = db.parse(is);\n\n Element root = doc.getDocumentElement();\n Element e = doc.createElement(\"order\");\n\n // Convert the purchase order to an XML format\n String keys[] = {\"orderNum\",\"customerRef\",\"product\",\"quantity\",\"unitPrice\"};\n String values[] = {Integer.toString(po.getOrderNum()), po.getCustomerRef(), po.getProduct().getProductType(), Integer.toString(po.getQuantity()), Float.toString(po.getUnitPrice())};\n \n for(int i=0;i<keys.length;i++)\n {\n Element tmp = doc.createElement(keys[i]);\n tmp.setTextContent(values[i]);\n e.appendChild(tmp);\n }\n \n // Set the status to submitted\n Element status = doc.createElement(\"status\");\n status.setTextContent(\"submitted\");\n e.appendChild(status);\n\n // Set the order total\n Element total = doc.createElement(\"orderTotal\");\n float orderTotal = po.getQuantity() * po.getUnitPrice();\n total.setTextContent(Float.toString(orderTotal));\n e.appendChild(total);\n\n // Write the content all as a new element in the root\n root.appendChild(e);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer m = tf.newTransformer();\n DOMSource source = new DOMSource(root);\n StreamResult result = new StreamResult(file);\n m.transform(source, result);\n\n }\n catch(Exception e)\n {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public static void subirXMLFTP(String cotizacionId,String xml) {\n\t\tDocumentBuilderFactory factory;\r\n\t DocumentBuilder builder;\r\n\t Document doc;\r\n\t TransformerFactory tFactory;\r\n\t Transformer transformer;\r\n\t \r\n\t String nombreArchivo = cotizacionId+\".xml\";\r\n\t\ttry {\r\n\t\t\tfactory \t\t\t= DocumentBuilderFactory.newInstance();\r\n\t\t\tbuilder \t\t\t= factory.newDocumentBuilder();\r\n\t\t\tdoc \t\t\t\t= builder.parse(new InputSource(new StringReader(xml)));\r\n\t\t\t// Usamos un transformador para la salida del archivo xml generado\r\n\t\t\ttFactory \t\t\t= TransformerFactory.newInstance();\r\n\t\t transformer \t\t= tFactory.newTransformer();\r\n\t\t DOMSource source \t= new DOMSource(doc);\t\t \r\n\t\t StreamResult result = new StreamResult(new File(\"/home/insis/\"+nombreArchivo));\r\n\t\t transformer.transform(source, result);\r\n\t\t \r\n\t\t \r\n\t\t} catch (SAXException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerException e) {\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n}", "@Override\n protected String[] doInBackground(Void... params) {\n String [] medicaArray=null;\n try {\n medicaArray=WebService.bajalistamedica();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (XmlPullParserException e) {\n e.printStackTrace();\n }\n\n // TODO: register the new account here.\n return medicaArray;\n }", "public String doneXML() {\r\n return null;\r\n }", "public String generarPasajeReglaXML() {\r\n\r\n\t\tDocument doc = new Document();\r\n\t\tElement datosClearQuest = new Element(\"datosClearQuest\");\r\n\t\tdoc.setRootElement(datosClearQuest);\r\n\t\t\r\n\t\tgenerarConexion(datosClearQuest);\r\n\t\tgenerarPasaje(datosClearQuest);\r\n\r\n\t\treturn convertXMLToString(doc);\r\n\t}", "@Override\n public void endElement(String uri, String localName,\n String qName) throws SAXException {\ntry{\n if (currentField.equals(\"vypis\")) {\n String hodnota = stringBuffer.toString();\n scanner = new Scanner(hodnota);\n while (scanner.hasNextLine()) {\n String veta=scanner.nextLine();\n //tady otchytavam vety tarifikace\n\n System.out.println(veta);\n //String[] radky = veta.split(\"\\n\");\n //for (int radek=0;radek<radky.length;radek++){\n // System.out.println(\"tak radek \"+ radek + \" : \"+radky[radek]);\n String[] temp = veta.split(\";\");// radky[radek].split(\";\"); //rozdelim string po castech do pole sringu, oddelovac je strednik\n // System.out.println(\"velikost vety je:\"+temp.length);\n if (temp.length == 13) { //pravidelne na stejnem vzorku se vzdy stane po x desitkach radek, ze neni vse, posledni znak je utnut a vlozen jako jediny do dalsiho value\n String sql = \"insert into tarifikace(_z,_na,pole2,kdy,priznak1,priznak2,popis,pole7,delka,pole10,pole11,pole12,pole13) values('\" + temp[0].trim() + \"','\" + temp[1] + \"','\" + temp[2] + \"','\" + temp[3] + \"','\" + temp[4] + \"','\" + temp[5] + \"','\" + temp[6] + \"','\" + temp[7] + \"',\" + temp[8] + \",'\" + temp[9] + \"','\" + temp[10] + \"','\" + temp[11] + \"','\" + temp[12] + \"')\";\n \n try {\n if(d.existujeTarifikace(temp[0].trim(),temp[1], temp[3]))\n {\n //System.out.println(\"sql :\" + sql);\n Menu.log1.info(\"Tarifikace: linka \"+temp[0]+\" cil \"+temp[1]+\" datum \"+temp[3]+\" delka\"+temp[8]);\n d.update(sql);\n if (temp[11].length() < 1) {\n temp[11] = \"0\";// a mam tu problem trun se jmenuje \"vyskocilova\" tak dam natvrdo \"0\"\n }\n if (temp[5].contains(\"Y\")) {\n Menu.single.execute(new Caracas(c.tatifikace(temp[0].trim(), temp[1], temp[3], Integer.parseInt(temp[8]), \"0\")));//c.zapis(c.tatifikace(temp[0].trim(), temp[1], temp[3], Integer.parseInt(temp[8]), \"0\"));\n }}else{\n //System.out.println(\"zaznam jiz v tarifikaci existuje\");\n }\n } catch (Exception ex) {\n Menu.log1.severe(\"Chyba - sql: \"+sql);\n Logger.getLogger(LinkyHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n //System.out.println(\"Zaznam \"+temp + \"ma delku: \" + temp.length);\n }//}\n }\n\n\n\n }\n }catch (NullPointerException ne){\n //System.out.println(\"Tak currenfield je null\");\n }\n currentField = null;\n }", "public HashMap<String, String> timbrarXML(String url_ws, String rfc, String clave,String ruta_xml,String produccion)\n\t{\n\t\tSystem.out.println(\"Ejecucion timbrarXML: \\n\\n\");\n\t\t\n\t\tString xml_tmp;\n\t\tString xml = null;\n\t\t\n\t\ttry {\n\t\t\t//LEO EL XML Y LO CONVIERTO A CADENA\n\t\t\txml_tmp = generar_Cadena(ruta_xml);\n\t\t\t//CONVIERTO EL XML A BASE64 PARA ENVIARL AL WS MULTIFACTURAS\n\t\t\txml=encode64(xml_tmp);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//SOLICITUD QUE SE ENVIARA AL WS MULTIFACTURAS\n\t\tstrRequest=\"<soapenv:Envelope xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:urn=\\\"urn:wservicewsdl\\\">\"\n\t\t\t\t \t+\"<soapenv:Header/>\"\n\t\t\t\t \t\t+\"<soapenv:Body>\"\n \t\t+\"<urn:timbrar64 soapenv:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\">\"\n \t\t\t+\"<rfc xsi:type=\\\"xsd:string\\\">\"+rfc+\"</rfc>\"\n \t\t\t+\"<clave xsi:type=\\\"xsd:string\\\">\"+clave+\"</clave>\"\n \t\t\t+\"<xml xsi:type=\\\"xsd:string\\\">\"+xml+\"</xml>\"\n \t\t\t+\"<produccion xsi:type=\\\"xsd:string\\\">\"+produccion+\"</produccion>\"\n \t\t+\"</urn:timbrar64>\"\n \t+\"</soapenv:Body>\"\n +\"</soapenv:Envelope>\";\n\t\t//IMPRIMIR SOLICITUD ENVIADA\n\t\t//System.out.println(strRequest);\t\t \n\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\tHttpPost postRequest = new HttpPost(url_ws);\n\t\tStringEntity input = null;\n\t\t\n\t\ttry {\n\t\t\tinput = new StringEntity(strRequest);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tinput.setContentType(\"text/xml\");\n\t\t//input.setContentEncoding(\"ISO-8859-1\");\n\t\t\n\t\tpostRequest.setEntity(input);\n\t\t\n\t\t//TRATAR LA RESPUESTA DEL WS\n\t\tHttpResponse response = null;\n\t\t\n\t\ttry {\n\t\t\tresponse = httpClient.execute(postRequest);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tif (response.getStatusLine().getStatusCode() != 200) {\n\t\t\tthrow new RuntimeException(\"Error : C�digo de error HTTP : \" +response.getStatusLine().getStatusCode());\n\t\t}else{\n\t\t\t\n\t\t\tentity = response.getEntity();\n\t\t\tif (entity != null) {\n\t\t\t\tInputStream instream;\n try {\n\t\t\t\t\tinstream = entity.getContent();\n\t\t\t\t\tstrResponse = convertStreamToString(instream);\n\t //System.out.println(strResponse);\n\n\t\t\t\t\t//CIERRA EL INPUT STREAM PARA LIBERAR LA CONEXION PARA CONVERTIR LA RESPUESTA A STRING\n\t instream.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//OBTENER LA INFORMACION DE LA RESPUESTA DEL WS\n\t\t\tString xml_respuesta = strResponse;\n\n\t\t\tInputSource source = new InputSource(new StringReader(xml_respuesta));\n\n\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder db;\n\t\t\ttry {\n\t\t\t\tdb = dbf.newDocumentBuilder();\n\t\t\t\tDocument document = db.parse(source);\n\t\t\t\t\n\t\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\t\tXPath xpath = xpathFactory.newXPath();\n\n\t\t\t\tString cfdi64 = xpath.evaluate(\"//cfdi\", document);\n\t\t\t\tString png = xpath.evaluate(\"//png\", document);\n\t\t\t\tString idpac = xpath.evaluate(\"//idpac\", document);\n\t\t\t\tString produccion_ = xpath.evaluate(\"//produccion\", document);\n\t\t\t\tString codigo_mf_numero = xpath.evaluate(\"//codigo_mf_numero\", document);\n\t\t\t\tString codigo_mf_texto = xpath.evaluate(\"//codigo_mf_texto\", document);\n\t\t\t\tString mensaje_original_pac_json = xpath.evaluate(\"//mensaje_original_pac_json\", document);\n\t\t\t\tString cancelada = xpath.evaluate(\"//cancelada\", document);\n\t\t\t\tString saldo = xpath.evaluate(\"//saldo\", document);\n\t\t\t\tString uuid = xpath.evaluate(\"//uuid\", document);\n\t\t\t\tString servidor = xpath.evaluate(\"//servidor\", document);\n\t\t\t\tString ejecucion = xpath.evaluate(\"//ejecucion\", document);\n\t\t\t\t\n\t\t\t\t//convertir cfdi (base64) a xml normal\n\t\t\t\tString cfdi=decode64(cfdi64);\n\t\t\t\t\n\t\t\t\trespuestaMultifacturas= new HashMap<String, String>();\n\t\t\t\t\n\t\t\t\trespuestaMultifacturas.put(\"cfdi64\",cfdi64);\n\t\t\t\trespuestaMultifacturas.put(\"cfdi\",cfdi);\n\t\t\t\trespuestaMultifacturas.put(\"png\",png);\n\t\t\t\trespuestaMultifacturas.put(\"idpac\",idpac);\n\t\t\t\trespuestaMultifacturas.put(\"produccion\",produccion_);\n\t\t\t\trespuestaMultifacturas.put(\"codigo_mf_numero\",codigo_mf_numero);\n\t\t\t\trespuestaMultifacturas.put(\"codigo_mf_texto\",codigo_mf_texto);\n\t\t\t\trespuestaMultifacturas.put(\"mensaje_original_pac_json\",mensaje_original_pac_json);\n\t\t\t\trespuestaMultifacturas.put(\"cancelada\",cancelada);\n\t\t\t\trespuestaMultifacturas.put(\"saldo\",saldo);\n\t\t\t\trespuestaMultifacturas.put(\"uuid\",uuid);\n\t\t\t\trespuestaMultifacturas.put(\"servidor\",servidor);\n\t\t\t\trespuestaMultifacturas.put(\"ejecucion\",ejecucion);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tSystem.out.println(\"cfdi=\" + cfdi);\n\t\t\t\tSystem.out.println(\"xml_cfdi=\" + xml_cfdi);\n\t\t\t\tSystem.out.println(\"png=\" + png);\n\t\t\t\tSystem.out.println(\"idpac=\" + idpac);\n\t\t\t\tSystem.out.println(\"produccion=\" + produccion);\n\t\t\t\tSystem.out.println(\"codigo_mf_numero=\" + codigo_mf_numero);\n\t\t\t\tSystem.out.println(\"codigo_mf_texto=\" + codigo_mf_texto);\n\t\t\t\tSystem.out.println(\"mensaje_original_pac_json=\" + mensaje_original_pac_json);\n\t\t\t\tSystem.out.println(\"cancelada=\" + cancelada);\n\t\t\t\tSystem.out.println(\"saldo=\" + saldo);\n\t\t\t\tSystem.out.println(\"uuid=\" + uuid);\n\t\t\t\tSystem.out.println(\"servidor=\" + servidor);\n\t\t\t\tSystem.out.println(\"ejecucion=\" + ejecucion);\n\t\t\t\t*/\n\t\t\t} catch (Throwable e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t//CIERRA LA CONEXION CON EL WS\n\t\tif (httpClient != null) httpClient.getConnectionManager().shutdown();\n\t\t\n\t\treturn respuestaMultifacturas;\n\t}", "public void encerrarSistema() {\r\n\t\tthis.salvarXML();\r\n\t}", "public void loadData(){\n try {\n entities.clear();\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(fileName);\n\n Node root = document.getDocumentElement();\n NodeList nodeList = root.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++){\n Node node = nodeList.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE){\n Element element = (Element) node;\n Department department = createDepartmentFromElement(element);\n try{\n super.save(department);\n } catch (RepositoryException | ValidatorException e) {\n e.printStackTrace();\n }\n }\n }\n } catch (SAXException | ParserConfigurationException | IOException e) {\n e.printStackTrace();\n }\n }", "public void guardarUsuarioXML(int nia, int parser) {\n\t\tIUsuarioDao usuarioDAO =new UsuarioXMLDAO();\n/*\t\t\n\t\tif(parser==1) {\n\t\t\tusuarioDAO = new UsuarioXMLDAO();\n\t\t}else {\n\t\t\tusuarioDAO = new UsuarioJAXBDAO();\n\t\t}\n*/\t\t\n\t\tUsuario usuario1 =usuarioDAO.getUsuario(nia);\n\t\tif(usuario1!=null) {\n\t\t\tSystem.out.println(usuario1.getId() + \" - \" + usuario1.getNombre() + \" - \" + usuario1.getApellido1() + \" - \" + usuario1.getApellido2() + \" - \" + usuario1.getNickname() + \" - \" + usuario1.getEmail());\n\t\t}\n\t\t\n\t\tList<Usuario> lista =usuarioDAO.getListaUsuarios();\n\t\tfor (Usuario usuario : lista) {\n\t\t\tSystem.out.println(usuario.getId() + \" - \" + usuario.getNombre() + \" - \" + usuario.getApellido1() + \" - \" + usuario.getApellido2() + \" - \" + usuario.getNickname() + \" - \" + usuario1.getEmail());\t\n\t\t}\n\n\t\t\n\n\t}", "public void loadXML(){\n new DownloadXmlTask().execute(URL);\n }", "@Override\r\n\tpublic void startElement(String espacio_nombres, String nombre_completo, String nombre_etiqueta,\r\n\t\t\tAttributes atributos) throws SAXException {\r\n\t\tif (nombre_etiqueta.equals(\"cantidad\")) {\r\n\t\t\tSystem.out.println(\"Cantidad: \");\r\n\t\t\tetiqueta_anterior = \"cantidad\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"dia-embarque\")) {\r\n\t\t\tSystem.out.println(\"Dia de embarque de la mercancia: \");\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"coche\")) {\r\n\t\t\tSystem.out.println(\"Datos del Coche: \");\r\n\t\t\tif (atributos.getLength() == 1) {\r\n\t\t\t\tSystem.out.println(atributos.getValue(\"segundamano\"));\r\n\t\t\t}\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"marca\")) {\r\n\t\t\tSystem.out.println(\"Marca: \");\r\n\t\t\tetiqueta_anterior = \"marca\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"modelo\")) {\r\n\t\t\tSystem.out.println(\"Modelo: \");\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"precio\")) {\r\n\t\t\tSystem.out.println(\"Precio: \");\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"kilometros\")) {\r\n\t\t\tSystem.out.println(\"Kilometros reales: \");\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"fecha-matriculacion\")) {\r\n\t\t\tSystem.out.println(\"Fecha de Matricualcion: \");\r\n\t\t}\r\n\r\n\t}", "public static Parametros ConfiguracionParametros(String ruta){\n try{\n Parametros theParametros = new Parametros();\n List<EventoPuertaMagnetica> eventoPM = new ArrayList<>();\n File theXmlFile = new File(ruta + \"config.xml\");\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(theXmlFile);\n doc.getDocumentElement().normalize();\n\n String url_ws= doc.getDocumentElement().getElementsByTagName(\"Url_WebServices\").item(0).getTextContent();\n String id_port = doc.getDocumentElement().getElementsByTagName(\"Id_Portico\").item(0).getTextContent();\n String ip_bd = doc.getDocumentElement().getElementsByTagName(\"Base_Datos_IP\").item(0).getTextContent();\n String mani_puerta_chapa = doc.getDocumentElement().getElementsByTagName(\"Tiene_Chapa\").item(0).getTextContent();\n String dispo = doc.getDocumentElement().getElementsByTagName(\"Disposicion\").item(0).getTextContent();\n String crede_admin = doc.getDocumentElement().getElementsByTagName(\"Id_Crede_Administrador\").item(0).getTextContent();\n String loc_geo = doc.getDocumentElement().getElementsByTagName(\"Localizacion_Geografica\").item(0).getTextContent();\n\n NodeList events = doc.getDocumentElement().getElementsByTagName(\"Evento\"); //0 o mas ...\n for(int i=0; i< events.getLength(); i++){\n EventoPuertaMagnetica event = new EventoPuertaMagnetica();\n\n Node nodo = events.item(i);\n NodeList caracteristicasEvento = nodo.getChildNodes();\n\n String id_evento = caracteristicasEvento.item(0).getTextContent();\n String nombre_evento = caracteristicasEvento.item(1).getTextContent();\n\n event.set_U01B3F3(id_evento);\n event.set_DESTINO(nombre_evento);\n\n eventoPM.add(event);\n }\n theParametros.set_Url_WebServices(url_ws);\n theParametros.set_Id_Portico(id_port);\n theParametros.set_Base_Datos_IP(ip_bd);\n theParametros.set_Manipulacion_Puerta(mani_puerta_chapa);\n theParametros.set_Disposicion(dispo);\n theParametros.set_Id_CredencialAdmin(crede_admin);\n theParametros.set_Localizacion_Geografica(loc_geo);\n theParametros.set_Eventos(eventoPM);\n\n return theParametros;\n\n }catch (Exception ex){\n return null;\n }\n }", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og, String url_geofenceWfs, String serviceIdentifier) {\r\n\t\t\r\n\t\t//logger.debug(xml_og);\r\n\t\tnameSpaceUri = getArbeitsbereichXmlTagFromWfs(url_geofenceWfs); //z.B. focus\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(nameSpaceUri.equals(args)){\r\n\t\t\t \treturn nameSpaceUri;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\r\n\t \tString pathToObjectid = \"//\"+nameSpaceUri +\":objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi test!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t//\tlogger.debug(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(serviceIdentifier.equals(\"within\")){\r\n\t\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBoxWithin.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "private static String generateXML(String userName, String hash,\n String userID, String ipAddress, String paymentToolNumber,\n String expDate, String cvc, String orderID, String amount,\n String currency) {\n\n try {\n // Create instance of DocumentBuilderFactory\n DocumentBuilderFactory factory = DocumentBuilderFactory\n .newInstance();\n // Get the DocumentBuilder\n DocumentBuilder docBuilder = factory.newDocumentBuilder();\n // Create blank DOM Document\n Document doc = docBuilder.newDocument();\n\n Element root = doc.createElement(\"GVPSRequest\");\n doc.appendChild(root);\n\n Element Mode = doc.createElement(\"Mode\");\n Mode.appendChild(doc.createTextNode(\"PROD\"));\n root.appendChild(Mode);\n\n Element Version = doc.createElement(\"Version\");\n Version.appendChild(doc.createTextNode(\"v0.01\"));\n root.appendChild(Version);\n\n Element Terminal = doc.createElement(\"Terminal\");\n root.appendChild(Terminal);\n\n Element ProvUserID = doc.createElement(\"ProvUserID\");\n // ProvUserID.appendChild(doc.createTextNode(userName));\n ProvUserID.appendChild(doc.createTextNode(\"PROVAUT\"));\n Terminal.appendChild(ProvUserID);\n\n Element HashData_ = doc.createElement(\"HashData\");\n HashData_.appendChild(doc.createTextNode(hash));\n Terminal.appendChild(HashData_);\n\n Element UserID = doc.createElement(\"UserID\");\n UserID.appendChild(doc.createTextNode(\"deneme\"));\n Terminal.appendChild(UserID);\n\n Element ID = doc.createElement(\"ID\");\n ID.appendChild(doc.createTextNode(\"10000039\"));\n Terminal.appendChild(ID);\n\n Element MerchantID = doc.createElement(\"MerchantID\");\n MerchantID.appendChild(doc.createTextNode(userID));\n Terminal.appendChild(MerchantID);\n\n Element Customer = doc.createElement(\"Customer\");\n root.appendChild(Customer);\n\n Element IPAddress = doc.createElement(\"IPAddress\");\n IPAddress.appendChild(doc.createTextNode(ipAddress));\n Customer.appendChild(IPAddress);\n\n Element EmailAddress = doc.createElement(\"EmailAddress\");\n EmailAddress.appendChild(doc.createTextNode(\"[email protected]\"));\n Customer.appendChild(EmailAddress);\n\n Element Card = doc.createElement(\"Card\");\n root.appendChild(Card);\n\n Element Number = doc.createElement(\"Number\");\n Number.appendChild(doc.createTextNode(paymentToolNumber));\n Card.appendChild(Number);\n\n Element ExpireDate = doc.createElement(\"ExpireDate\");\n ExpireDate.appendChild(doc.createTextNode(\"1212\"));\n Card.appendChild(ExpireDate);\n\n Element CVV2 = doc.createElement(\"CVV2\");\n CVV2.appendChild(doc.createTextNode(cvc));\n Card.appendChild(CVV2);\n\n Element Order = doc.createElement(\"Order\");\n root.appendChild(Order);\n\n Element OrderID = doc.createElement(\"OrderID\");\n OrderID.appendChild(doc.createTextNode(orderID));\n Order.appendChild(OrderID);\n\n Element GroupID = doc.createElement(\"GroupID\");\n GroupID.appendChild(doc.createTextNode(\"\"));\n Order.appendChild(GroupID);\n\n\t\t\t/*\n * Element Description=doc.createElement(\"Description\");\n\t\t\t * Description.appendChild(doc.createTextNode(\"\"));\n\t\t\t * Order.appendChild(Description);\n\t\t\t */\n\n Element Transaction = doc.createElement(\"Transaction\");\n root.appendChild(Transaction);\n\n Element Type = doc.createElement(\"Type\");\n Type.appendChild(doc.createTextNode(\"sales\"));\n Transaction.appendChild(Type);\n\n Element InstallmentCnt = doc.createElement(\"InstallmentCnt\");\n InstallmentCnt.appendChild(doc.createTextNode(\"\"));\n Transaction.appendChild(InstallmentCnt);\n\n Element Amount = doc.createElement(\"Amount\");\n Amount.appendChild(doc.createTextNode(amount));\n Transaction.appendChild(Amount);\n\n Element CurrencyCode = doc.createElement(\"CurrencyCode\");\n CurrencyCode.appendChild(doc.createTextNode(currency));\n Transaction.appendChild(CurrencyCode);\n\n Element CardholderPresentCode = doc\n .createElement(\"CardholderPresentCode\");\n CardholderPresentCode.appendChild(doc.createTextNode(\"0\"));\n Transaction.appendChild(CardholderPresentCode);\n\n Element MotoInd = doc.createElement(\"MotoInd\");\n MotoInd.appendChild(doc.createTextNode(\"N\"));\n Transaction.appendChild(MotoInd);\n\n // Convert dom to String\n TransformerFactory tranFactory = TransformerFactory.newInstance();\n Transformer aTransformer = tranFactory.newTransformer();\n StringWriter buffer = new StringWriter();\n aTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,\n \"yes\");\n aTransformer\n .transform(new DOMSource(doc), new StreamResult(buffer));\n return buffer.toString();\n\n } catch (Exception e) {\n return null;\n }\n\n }", "public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }", "public void setFilaDatosExportarXmlPlantillaFactura(PlantillaFactura plantillafactura,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(PlantillaFacturaConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(plantillafactura.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(PlantillaFacturaConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(plantillafactura.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(plantillafactura.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementcodigo = document.createElement(PlantillaFacturaConstantesFunciones.CODIGO);\r\n\t\telementcodigo.appendChild(document.createTextNode(plantillafactura.getcodigo().trim()));\r\n\t\telement.appendChild(elementcodigo);\r\n\r\n\t\tElement elementnombre = document.createElement(PlantillaFacturaConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(plantillafactura.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementdescripcion = document.createElement(PlantillaFacturaConstantesFunciones.DESCRIPCION);\r\n\t\telementdescripcion.appendChild(document.createTextNode(plantillafactura.getdescripcion().trim()));\r\n\t\telement.appendChild(elementdescripcion);\r\n\r\n\t\tElement elementes_proveedor = document.createElement(PlantillaFacturaConstantesFunciones.ESPROVEEDOR);\r\n\t\telementes_proveedor.appendChild(document.createTextNode(plantillafactura.getes_proveedor().toString().trim()));\r\n\t\telement.appendChild(elementes_proveedor);\r\n\r\n\t\tElement elementcuentacontableaplicada_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA);\r\n\t\telementcuentacontableaplicada_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontableaplicada_descripcion()));\r\n\t\telement.appendChild(elementcuentacontableaplicada_descripcion);\r\n\r\n\t\tElement elementcuentacontablecreditobien_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN);\r\n\t\telementcuentacontablecreditobien_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontablecreditobien_descripcion()));\r\n\t\telement.appendChild(elementcuentacontablecreditobien_descripcion);\r\n\r\n\t\tElement elementcuentacontablecreditoservicio_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO);\r\n\t\telementcuentacontablecreditoservicio_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontablecreditoservicio_descripcion()));\r\n\t\telement.appendChild(elementcuentacontablecreditoservicio_descripcion);\r\n\r\n\t\tElement elementtiporetencionfuentebien_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN);\r\n\t\telementtiporetencionfuentebien_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionfuentebien_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionfuentebien_descripcion);\r\n\r\n\t\tElement elementtiporetencionfuenteservicio_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO);\r\n\t\telementtiporetencionfuenteservicio_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionfuenteservicio_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionfuenteservicio_descripcion);\r\n\r\n\t\tElement elementtiporetencionivabien_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN);\r\n\t\telementtiporetencionivabien_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionivabien_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionivabien_descripcion);\r\n\r\n\t\tElement elementtiporetencionivaservicio_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO);\r\n\t\telementtiporetencionivaservicio_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionivaservicio_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionivaservicio_descripcion);\r\n\r\n\t\tElement elementcuentacontablegasto_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO);\r\n\t\telementcuentacontablegasto_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontablegasto_descripcion()));\r\n\t\telement.appendChild(elementcuentacontablegasto_descripcion);\r\n\t}", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localSpIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spId\"));\r\n \r\n if (localSpId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spId cannot be null!!\");\r\n }\r\n } if (localSpPasswordTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"spPassword\"));\r\n \r\n if (localSpPassword != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSpPassword));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"spPassword cannot be null!!\");\r\n }\r\n } if (localServiceIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"serviceId\"));\r\n \r\n if (localServiceId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"serviceId cannot be null!!\");\r\n }\r\n } if (localTimeStampTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"timeStamp\"));\r\n \r\n if (localTimeStamp != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localTimeStamp));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"timeStamp cannot be null!!\");\r\n }\r\n } if (localOATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"OA\"));\r\n \r\n if (localOA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"OA cannot be null!!\");\r\n }\r\n } if (localOauth_tokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"oauth_token\"));\r\n \r\n if (localOauth_token != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOauth_token));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"oauth_token cannot be null!!\");\r\n }\r\n } if (localFATracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"FA\"));\r\n \r\n if (localFA != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFA));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"FA cannot be null!!\");\r\n }\r\n } if (localTokenTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"token\"));\r\n \r\n if (localToken != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"token cannot be null!!\");\r\n }\r\n } if (localWatcherTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"watcher\"));\r\n \r\n if (localWatcher != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localWatcher));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"watcher cannot be null!!\");\r\n }\r\n } if (localPresentityTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentity\"));\r\n \r\n if (localPresentity != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentity));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentity cannot be null!!\");\r\n }\r\n } if (localAuthIdTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"authId\"));\r\n \r\n if (localAuthId != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAuthId));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"authId cannot be null!!\");\r\n }\r\n } if (localLinkidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"linkid\"));\r\n \r\n if (localLinkid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLinkid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"linkid cannot be null!!\");\r\n }\r\n } if (localPresentidTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"presentid\"));\r\n \r\n if (localPresentid != null){\r\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPresentid));\r\n } else {\r\n throw new org.apache.axis2.databinding.ADBException(\"presentid cannot be null!!\");\r\n }\r\n } if (localMsgTypeTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\r\n \"msgType\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMsgType));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public Document saveAsXML() {\n\tDocument xmldoc= new DocumentImpl();\n\tElement root = createFeaturesElement(xmldoc);\n\txmldoc.appendChild(root);\n\treturn xmldoc;\n }", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og) {\r\n\t\tSystem.out.println(\"ParserXmlJson.extractBoundingBoxFromWfsXml: \"+ xml_og);\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon.equals(args)){\r\n\t\t\t \treturn LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t \tString pathToObjectid = \"//geofence_sbg:objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO objectid: \"+nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "void bukaXoxo(){\r\n FileInputStream xx = null;\r\n try {\r\n xx = new FileInputStream(\"xoxo.xml\");\r\n // harus diingat objek apa yang dahulu disimpan di file \r\n // program untuk membaca harus sinkron dengan program\r\n // yang dahulu digunakan untuk menyimpannya\r\n int isi;\r\n char charnya;\r\n String stringnya;\r\n // isi file dikembalikan menjadi string\r\n stringnya =\"\";\r\n while ((isi = xx.read()) != -1) {\r\n charnya= (char) isi;\r\n stringnya = stringnya + charnya;\r\n } \r\n // string isi file dikembalikan menjadi larik double\r\n resi = (String) xstream.fromXML(stringnya);\t \r\n }\r\n catch (Exception e){\r\n System.err.println(\"test: \"+e.getMessage());\r\n }\r\n finally{\r\n if(xx != null){\r\n try{\r\n xx.close();\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n } \r\n } \r\n \r\n }", "String generarXmlTodoRiesgoMontaje(RamoRiesgoMontaje ramoRiesgoMontaje) throws HiperionException;", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localTokenTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"token\"));\n \n elementList.add(localToken==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localToken));\n } if (localObjectNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"objectName\"));\n \n elementList.add(localObjectName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localObjectName));\n } if (localOldProperty_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldProperty_description\"));\n \n elementList.add(localOldProperty_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldProperty_description));\n } if (localOldValues_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldValues_description\"));\n \n elementList.add(localOldValues_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldValues_description));\n } if (localNewProperty_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newProperty_description\"));\n \n elementList.add(localNewProperty_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewProperty_description));\n } if (localNewValues_descriptionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newValues_description\"));\n \n elementList.add(localNewValues_description==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewValues_description));\n } if (localOldProperty_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldProperty_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldProperty_descriptionType));\n } if (localOldValues_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldValues_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldValues_descriptionType));\n } if (localNewProperty_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newProperty_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewProperty_descriptionType));\n } if (localNewValues_descriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newValues_descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewValues_descriptionType));\n } if (localOldCardinalityTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldCardinalityType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldCardinalityType));\n } if (localOldCardinalityNumTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"oldCardinalityNum\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOldCardinalityNum));\n } if (localNewCardinalityTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newCardinalityType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewCardinalityType));\n } if (localNewCardinalityNumTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"newCardinalityNum\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewCardinalityNum));\n } if (localDescriptionTypeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://knowledge.sjxx.cn\",\n \"descriptionType\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDescriptionType));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localUserTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"user\"));\r\n \r\n elementList.add(localUser==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUser));\r\n } if (localDeletedFilesTracker){\r\n if (localDeletedFiles!=null){\r\n for (int i = 0;i < localDeletedFiles.length;i++){\r\n \r\n if (localDeletedFiles[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"deletedFiles\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDeletedFiles[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"deletedFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"deletedFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public void setFilaDatosExportarXmlEvaluacionProveedor(EvaluacionProveedor evaluacionproveedor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(EvaluacionProveedorConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(evaluacionproveedor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(EvaluacionProveedorConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(evaluacionproveedor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(EvaluacionProveedorConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(evaluacionproveedor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(EvaluacionProveedorConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(evaluacionproveedor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementejercicio_descripcion = document.createElement(EvaluacionProveedorConstantesFunciones.IDEJERCICIO);\r\n\t\telementejercicio_descripcion.appendChild(document.createTextNode(evaluacionproveedor.getejercicio_descripcion()));\r\n\t\telement.appendChild(elementejercicio_descripcion);\r\n\r\n\t\tElement elementperiodo_descripcion = document.createElement(EvaluacionProveedorConstantesFunciones.IDPERIODO);\r\n\t\telementperiodo_descripcion.appendChild(document.createTextNode(evaluacionproveedor.getperiodo_descripcion()));\r\n\t\telement.appendChild(elementperiodo_descripcion);\r\n\r\n\t\tElement elementcliente_descripcion = document.createElement(EvaluacionProveedorConstantesFunciones.IDCLIENTE);\r\n\t\telementcliente_descripcion.appendChild(document.createTextNode(evaluacionproveedor.getcliente_descripcion()));\r\n\t\telement.appendChild(elementcliente_descripcion);\r\n\r\n\t\tElement elementfecha = document.createElement(EvaluacionProveedorConstantesFunciones.FECHA);\r\n\t\telementfecha.appendChild(document.createTextNode(evaluacionproveedor.getfecha().toString().trim()));\r\n\t\telement.appendChild(elementfecha);\r\n\r\n\t\tElement elementcontacto = document.createElement(EvaluacionProveedorConstantesFunciones.CONTACTO);\r\n\t\telementcontacto.appendChild(document.createTextNode(evaluacionproveedor.getcontacto().trim()));\r\n\t\telement.appendChild(elementcontacto);\r\n\r\n\t\tElement elementevaluado = document.createElement(EvaluacionProveedorConstantesFunciones.EVALUADO);\r\n\t\telementevaluado.appendChild(document.createTextNode(evaluacionproveedor.getevaluado().trim()));\r\n\t\telement.appendChild(elementevaluado);\r\n\r\n\t\tElement elementresultado = document.createElement(EvaluacionProveedorConstantesFunciones.RESULTADO);\r\n\t\telementresultado.appendChild(document.createTextNode(evaluacionproveedor.getresultado().trim()));\r\n\t\telement.appendChild(elementresultado);\r\n\r\n\t\tElement elementresponsable = document.createElement(EvaluacionProveedorConstantesFunciones.RESPONSABLE);\r\n\t\telementresponsable.appendChild(document.createTextNode(evaluacionproveedor.getresponsable().trim()));\r\n\t\telement.appendChild(elementresponsable);\r\n\r\n\t\tElement elementfecha_desde = document.createElement(EvaluacionProveedorConstantesFunciones.FECHADESDE);\r\n\t\telementfecha_desde.appendChild(document.createTextNode(evaluacionproveedor.getfecha_desde().toString().trim()));\r\n\t\telement.appendChild(elementfecha_desde);\r\n\r\n\t\tElement elementfecha_hasta = document.createElement(EvaluacionProveedorConstantesFunciones.FECHAHASTA);\r\n\t\telementfecha_hasta.appendChild(document.createTextNode(evaluacionproveedor.getfecha_hasta().toString().trim()));\r\n\t\telement.appendChild(elementfecha_hasta);\r\n\r\n\t\tElement elementobservacion = document.createElement(EvaluacionProveedorConstantesFunciones.OBSERVACION);\r\n\t\telementobservacion.appendChild(document.createTextNode(evaluacionproveedor.getobservacion().trim()));\r\n\t\telement.appendChild(elementobservacion);\r\n\t}", "public static OrderDTO parsePurchaseOrderXML(Document orderXML) {\n OrderDTO orderDTO = new OrderDTO();\n List<OrderlineDTO> listOrderLineDTO = new ArrayList<OrderlineDTO>();\n int lineCount = 0;\n int fieldsCount = 0;\n\n try {\n orderDTO.setStoreName(orderXML.getElementsByTagName(storeName).item(0).getChildNodes()\n .item(0).getNodeValue());\n orderDTO.setEmail(orderXML.getElementsByTagName(email).item(0).getChildNodes().item(0)\n .getNodeValue());\n orderDTO.setBrand(orderXML.getElementsByTagName(brand).item(0).getChildNodes().item(0)\n .getNodeValue());\n\n // Parsing of Purchase order lines\n\n NodeList listPOlines = orderXML.getElementsByTagName(poLines);\n NodeList listPOl = orderXML.getElementsByTagName(poLine);\n lineCount = listPOl.getLength();\n // System.out.println(lineCount+\"linecount============\");\n\n if (null != listPOlines && listPOlines.getLength() > 0 && null != listPOl\n && listPOl.getLength() > 0) {\n log.debug(\"PO Lines exist\");\n\n lineCount = listPOl.getLength();\n\n for (int indexLine = 0; indexLine < lineCount; indexLine++) {\n Node poLineNode = listPOl.item(indexLine);\n fieldsCount = poLineNode.getChildNodes().getLength();\n NodeList listFields = poLineNode.getChildNodes();\n\n OrderlineDTO orderlineDTO = new OrderlineDTO();\n int tagCount = 0;\n\n for (int indexField = 0; indexField < fieldsCount; indexField++) {\n Node fieldNode = listFields.item(indexField);\n\n if (fieldNode.getNodeName().equals(qtyOrdered)) {\n orderlineDTO.setQtyOrdered(Integer.parseInt(fieldNode.getChildNodes().item(0)\n .getNodeValue()));\n tagCount += 1;\n }\n if (fieldNode.getNodeName().equals(priceActual)) {\n orderlineDTO.setPriceActual(Double.parseDouble(fieldNode.getChildNodes().item(0)\n .getNodeValue()));\n tagCount += 1;\n }\n\n if (fieldNode.getNodeName().equals(itemCode)) {\n orderlineDTO.setItemCode(fieldNode.getChildNodes().item(0).getNodeValue());\n tagCount += 1;\n }\n }\n\n if (tagCount != 3) {\n throw new Exception(\"Mandatory parameters missing in Lines.\");\n }\n\n listOrderLineDTO.add(orderlineDTO);\n }\n\n }\n\n orderDTO.setListOrderlineDTOs(listOrderLineDTO);\n orderDTO.setSuccessStatus(success);\n\n } catch (Exception exp) {\n log.error(\"Exception while parsing the mandatory fields for creating Purchase Order. \", exp);\n // orderDTO.setSuccessStatus(\"failure\");\n orderDTO.setSuccessStatus(\"Unable to create Order-Incomplete Data->\" + exp);\r\n\n return orderDTO;\n }\n\n return orderDTO;\n\n }", "DocumentFragment getXML(String path)\n throws ProcessingException ;", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localUserTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"user\"));\r\n \r\n elementList.add(localUser==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUser));\r\n } if (localNewFilesTracker){\r\n if (localNewFiles!=null){\r\n for (int i = 0;i < localNewFiles.length;i++){\r\n \r\n if (localNewFiles[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"newFiles\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localNewFiles[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"newFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"newFiles\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading OG: \"+messwert);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(messwert.equals(\"1\")){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(\"2222\");;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading EDITED:\"+nodes.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t \t//find Loading value\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\t//replace original value with new value\r\n\t\t\t\t\tif(messwert.equals(LoadOnStartAppConfiguration.value_from)){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(LoadOnStartAppConfiguration.value_to);;\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "@GET\n @Produces(\"application/xml\")\n public String getXml() {\n java.sql.Connection conn = Connection.getConnection();\n try {\n PreparedStatement ps = conn.prepareStatement(\"DELETE FROM POSITION\");\n ps.executeUpdate();\n ps.close();\n conn.close();\n } catch (SQLException ex) {\n Logger.getLogger(DeleteResource.class.getName()).log(Level.SEVERE, null, ex);\n }\n return \"<done/>\";\n }", "public static TPedido parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TPedido object =\n new TPedido();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"tPedido\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TPedido)biz.belcorp.www.soa.business.ffvv.sicc.concursobs.types.ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n java.util.ArrayList list20 = new java.util.ArrayList();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"codigo\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setCodigo(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"bloqueado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setBloqueado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"estado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setEstado(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"fechaFacturado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setFechaFacturado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"fechaSolicitud\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setFechaSolicitud(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"flete\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setFlete(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setFlete(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"motivoRechazo\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setMotivoRechazo(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setMotivoRechazo(biz.belcorp.www.canonico.ffvv.vender.TMotivoRechazo.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"observacion\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setObservacion(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"origen\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setOrigen(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoDescuento\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoDescuento(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoDescuento(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoEstimado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoEstimado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoEstimado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoSolicitado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoSolicitado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoSolicitado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoFacturado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoFacturado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoFacturado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoFacturadoSinDescuento\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoFacturadoSinDescuento(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoFacturadoSinDescuento(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"percepcion\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setPercepcion(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setPercepcion(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"cantidadCUVErrado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setCantidadCUVErrado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInteger(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"cantidadFaltanteAnunciado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setCantidadFaltanteAnunciado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInteger(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoPedidoRechazado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoPedidoRechazado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoPedidoRechazado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"montoCatalogoEstimado\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n\n java.lang.String content = reader.getElementText();\n \n object.setMontoCatalogoEstimado(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToDouble(content));\n \n } else {\n \n \n object.setMontoCatalogoEstimado(java.lang.Double.NaN);\n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"pedidoDetalle\").equals(reader.getName())){\n \n \n \n // Process the array and step past its final element's end.\n list20.add(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle.Factory.parse(reader));\n \n //loop until we find a start element that is not part of this array\n boolean loopDone20 = false;\n while(!loopDone20){\n // We should be at the end element, but make sure\n while (!reader.isEndElement())\n reader.next();\n // Step out of this element\n reader.next();\n // Step to next element event.\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n if (reader.isEndElement()){\n //two continuous end elements means we are exiting the xml structure\n loopDone20 = true;\n } else {\n if (new javax.xml.namespace.QName(\"http://www.belcorp.biz/canonico/ffvv/Vender\",\"pedidoDetalle\").equals(reader.getName())){\n list20.add(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle.Factory.parse(reader));\n \n }else{\n loopDone20 = true;\n }\n }\n }\n // call the converter utility to convert and set the array\n \n object.setPedidoDetalle((biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[])\n org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(\n biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle.class,\n list20));\n \n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localAxisOperationTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"axisOperation\"));\n \n \n elementList.add(localAxisOperation==null?null:\n localAxisOperation);\n } if (localCompleteTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"complete\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localComplete));\n } if (localConfigurationContextTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"configurationContext\"));\n \n \n elementList.add(localConfigurationContext==null?null:\n localConfigurationContext);\n } if (localKeyTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"key\"));\n \n elementList.add(localKey==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localKey));\n } if (localLogCorrelationIDStringTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"logCorrelationIDString\"));\n \n elementList.add(localLogCorrelationIDString==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localLogCorrelationIDString));\n } if (localMessageContextsTracker){\n if (localMessageContexts!=null){\n for (int i = 0;i < localMessageContexts.length;i++){\n \n if (localMessageContexts[i] != null){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"messageContexts\"));\n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localMessageContexts[i]));\n } else {\n \n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"messageContexts\"));\n elementList.add(null);\n \n }\n \n\n }\n } else {\n \n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"messageContexts\"));\n elementList.add(null);\n \n }\n\n } if (localOperationNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"operationName\"));\n \n elementList.add(localOperationName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOperationName));\n } if (localRootContextTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"rootContext\"));\n \n \n elementList.add(localRootContext==null?null:\n localRootContext);\n } if (localServiceContextTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"serviceContext\"));\n \n \n elementList.add(localServiceContext==null?null:\n localServiceContext);\n } if (localServiceGroupNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"serviceGroupName\"));\n \n elementList.add(localServiceGroupName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceGroupName));\n } if (localServiceNameTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://context.axis2.apache.org/xsd\",\n \"serviceName\"));\n \n elementList.add(localServiceName==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localServiceName));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public void setFilaDatosExportarXmlAnalisisTransaCliente(AnalisisTransaCliente analisistransacliente,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(AnalisisTransaClienteConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(analisistransacliente.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(AnalisisTransaClienteConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(analisistransacliente.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(analisistransacliente.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementmodulo_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDMODULO);\r\n\t\telementmodulo_descripcion.appendChild(document.createTextNode(analisistransacliente.getmodulo_descripcion()));\r\n\t\telement.appendChild(elementmodulo_descripcion);\r\n\r\n\t\tElement elementnombre = document.createElement(AnalisisTransaClienteConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(analisistransacliente.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementdescripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.DESCRIPCION);\r\n\t\telementdescripcion.appendChild(document.createTextNode(analisistransacliente.getdescripcion().trim()));\r\n\t\telement.appendChild(elementdescripcion);\r\n\r\n\t\tElement elementtransaccion_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION);\r\n\t\telementtransaccion_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion_descripcion()));\r\n\t\telement.appendChild(elementtransaccion_descripcion);\r\n\r\n\t\tElement elementtransaccion1_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION1);\r\n\t\telementtransaccion1_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion1_descripcion()));\r\n\t\telement.appendChild(elementtransaccion1_descripcion);\r\n\r\n\t\tElement elementtransaccion2_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION2);\r\n\t\telementtransaccion2_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion2_descripcion()));\r\n\t\telement.appendChild(elementtransaccion2_descripcion);\r\n\r\n\t\tElement elementtransaccion3_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION3);\r\n\t\telementtransaccion3_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion3_descripcion()));\r\n\t\telement.appendChild(elementtransaccion3_descripcion);\r\n\r\n\t\tElement elementtransaccion4_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION4);\r\n\t\telementtransaccion4_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion4_descripcion()));\r\n\t\telement.appendChild(elementtransaccion4_descripcion);\r\n\r\n\t\tElement elementtransaccion5_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION5);\r\n\t\telementtransaccion5_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion5_descripcion()));\r\n\t\telement.appendChild(elementtransaccion5_descripcion);\r\n\r\n\t\tElement elementtransaccion6_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION6);\r\n\t\telementtransaccion6_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion6_descripcion()));\r\n\t\telement.appendChild(elementtransaccion6_descripcion);\r\n\r\n\t\tElement elementtransaccion7_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION7);\r\n\t\telementtransaccion7_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion7_descripcion()));\r\n\t\telement.appendChild(elementtransaccion7_descripcion);\r\n\r\n\t\tElement elementtransaccion8_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION8);\r\n\t\telementtransaccion8_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion8_descripcion()));\r\n\t\telement.appendChild(elementtransaccion8_descripcion);\r\n\r\n\t\tElement elementtransaccion9_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION9);\r\n\t\telementtransaccion9_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion9_descripcion()));\r\n\t\telement.appendChild(elementtransaccion9_descripcion);\r\n\r\n\t\tElement elementtransaccion10_descripcion = document.createElement(AnalisisTransaClienteConstantesFunciones.IDTRANSACCION10);\r\n\t\telementtransaccion10_descripcion.appendChild(document.createTextNode(analisistransacliente.gettransaccion10_descripcion()));\r\n\t\telement.appendChild(elementtransaccion10_descripcion);\r\n\t}", "public DElementPagosPago() {\n super(\"pago10:Pago\");\n\n moAttFechaPago = new DAttributeDatetime(\"FechaPago\", true);\n moAttFormaDePagoP = new DAttributeString(\"FormaDePagoP\", true, 2, 2); // c_FormaPago catalog codes of 2 fixed digits\n moAttMonedaP = new DAttributeString(\"MonedaP\", true, 3, 3); // c_Moneda catalog codes of 3 fixed digits\n moAttTipoCambioP = new DAttributeTipoCambio(\"TipoCambioP\", false);\n moAttMonto = new DAttributeTypeImporte(\"Monto\", true);\n moAttNumOperacion = new DAttributeString(\"NumOperacion\", false, 1, 100);\n moAttRfcEmisorCtaOrd = new DAttributeString(\"RfcEmisorCtaOrd\", false, 12, 13);\n moAttNomBancoOrdExt = new DAttributeString(\"NomBancoOrdExt\", false, 1, 300);\n moAttCtaOrdenante = new DAttributeString(\"CtaOrdenante\", false, 10, 50);\n moAttRfcEmisorCtaBen = new DAttributeString(\"RfcEmisorCtaBen\", false, 12, 12);\n moAttCtaBeneficiario = new DAttributeString(\"CtaBeneficiario\", false, 10, 50);\n moAttTipoCadPago = new DAttributeString(\"TipoCadPago\", false, 2, 2);\n moAttCertPago = new DAttributeString(\"CertPago\", false, 1); // xs:base64Binary\n moAttCadPago = new DAttributeString(\"CadPago\", false, 1, 8192);\n moAttSelloPago = new DAttributeString(\"SelloPago\", false, 1); // xs:base64Binary\n\n mvAttributes.add(moAttFechaPago);\n mvAttributes.add(moAttFormaDePagoP);\n mvAttributes.add(moAttMonedaP);\n mvAttributes.add(moAttTipoCambioP);\n mvAttributes.add(moAttMonto);\n mvAttributes.add(moAttNumOperacion);\n mvAttributes.add(moAttRfcEmisorCtaOrd);\n mvAttributes.add(moAttNomBancoOrdExt);\n mvAttributes.add(moAttCtaOrdenante);\n mvAttributes.add(moAttRfcEmisorCtaBen);\n mvAttributes.add(moAttCtaBeneficiario);\n mvAttributes.add(moAttTipoCadPago);\n mvAttributes.add(moAttCertPago);\n mvAttributes.add(moAttCadPago);\n mvAttributes.add(moAttSelloPago);\n \n maEltDoctoRelacionados = new ArrayList<>();\n }", "private void saveXML_FTP(String yearId, String templateId, String schoolCode,Restrictions r) {\n String server = \"192.168.1.36\";\r\n int port = 21;\r\n String user = \"david\";\r\n String pass = \"david\";\r\n DocumentBuilderFactory icFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder icBuilder;\r\n FTPClient ftpClient = new FTPClient();\r\n try {\r\n ftpClient.connect(server, port);\r\n ftpClient.login(user, pass);\r\n\r\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\tDate date = new Date();\r\n\t//System.out.println(dateFormat.format(date)); //2016/11/16 12:08:43\r\n String fecha = dateFormat.format(date);\r\n fecha = fecha.replace(\" \", \"_\");\r\n fecha = fecha.replace(\"/\", \"_\");\r\n fecha = fecha.replace(\":\", \"_\");\r\n String filename = yearId + \"_\" + templateId+\"_\"+fecha+\".xml\";\r\n String rutaCarpeta = \"/Schedules/\" + schoolCode;\r\n\r\n if (!ftpClient.changeWorkingDirectory(rutaCarpeta));\r\n {\r\n ftpClient.changeWorkingDirectory(\"/Schedules\");\r\n ftpClient.mkd(schoolCode);\r\n ftpClient.changeWorkingDirectory(schoolCode);\r\n }\r\n\r\n icBuilder = icFactory.newDocumentBuilder();\r\n Document doc = icBuilder.newDocument();\r\n Element mainRootElement = doc.createElementNS(\"http://eduwebgroup.ddns.net/ScheduleWeb/enviarmensaje.htm\", \"Horarios\");\r\n doc.appendChild(mainRootElement);\r\n Element students = doc.createElement(\"Students\");\r\n // append child elements to root element\r\n \r\n for (Course t : r.courses) {\r\n for (int j = 0; j < t.getArraySecciones().size(); j++) {\r\n for (int k = 0; k < t.getArraySecciones().get(j).getIdStudents().size(); k++) { \r\n students.appendChild(getStudent(doc,\"\"+t.getArraySecciones().get(j).getIdStudents().get(k),\"\"+t.getIdCourse(),\"\"+(j+1),yearId,\"\"+t.getArraySecciones().get(j).getClassId())); \r\n } \r\n }\r\n }\r\n \r\n Element cursos = doc.createElement(\"Courses\");\r\n for (Course t : r.courses) {\r\n for (int j = 1; j < t.getArraySecciones().size(); j++) {\r\n //if()\r\n cursos.appendChild(getCursos(doc,\"\"+t.getIdCourse(),\"\"+j,\"\"+t.getArraySecciones().get(j).getIdTeacher(),yearId,\"\"+t.getArraySecciones().get(j).getClassId()));\r\n }\r\n }\r\n \r\n//private Node getBloques(Document doc, String day, String begin, String tempId, String courseId, String section) {\r\n \r\n Element bloques = doc.createElement(\"Blocks\");\r\n for (Course t : r.courses) {\r\n /* for (int i = 0; i < TAMY; i++) {\r\n for (int j = 0; j < TAMX; j++) {\r\n \r\n if ( !t.getHuecos()[j][i].contains(\"0\")) {\r\n if(t.getHuecos()[j][i].contains(\"and\")){\r\n String[] partsSections = t.getHuecos()[j][i].split(\"and\");\r\n for (String partsSection : partsSections) {\r\n String seccionClean = partsSection.replace(\" \", \"\");\r\n if(!seccionClean.equals(\"0\"))bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),seccionClean,yearId));\r\n }\r\n }\r\n else\r\n bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),\"\"+t.getHuecos()[j][i],yearId));\r\n }\r\n }\r\n }*/\r\n for (int i = 0; i < t.getArraySecciones().size(); i++) {\r\n for (int j = 0; j < t.getArraySecciones().get(i).getPatronUsado().size(); j++) {\r\n int col = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).x +1;\r\n int row = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).y +1;\r\n \r\n bloques.appendChild(getBloques(doc,\"\"+(col),\"\"+(row),templateId,\"\"+t.getIdCourse(),\"\"+t.getArraySecciones().get(i).getNumSeccion(),yearId,\"\"+t.getArraySecciones().get(i).getClassId(),\"\"+t.getArraySecciones().get(i).getPatternRenweb()));\r\n }\r\n }\r\n }\r\n \r\n /* students.appendChild(getCompany(doc, \"Paypal\", \"Payment\", \"1000\"));\r\n students.appendChild(getCompany(doc, \"eBay\", \"Shopping\", \"2000\"));\r\n students.appendChild(getCompany(doc, \"Google\", \"Search\", \"3000\"));*/\r\n \r\n mainRootElement.appendChild(students);\r\n mainRootElement.appendChild(cursos);\r\n mainRootElement.appendChild(bloques);\r\n // output DOM XML to console \r\n /*Transformer transformer = TransformerFactory.newInstance().newTransformer();\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n StreamResult console = new StreamResult(System.out);\r\n transformer.transform(source, console);\r\n*/\r\n\r\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\r\n Source xmlSource = new DOMSource(doc);\r\n Result outputTarget = new StreamResult(outputStream);\r\n TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget);\r\n InputStream is = new ByteArrayInputStream(outputStream.toByteArray());\r\n\r\n ftpClient.storeFile(filename, is);\r\n ftpClient.logout();\r\n\r\n } catch (Exception ex) {\r\n System.err.println(\"\");\r\n }\r\n\r\n }", "com.synergyj.cursos.webservices.ordenes.XMLBFactura addNewXMLBFactura();", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Test\r\n public void TestEnvioXML() {\n String expected = \"{\\\"estado\\\":\\\"DEVUELTA\\\",\\\"comprobantes\\\":[{\\\"claveAcceso\\\":\\\"3110201901099000573700120010011183877400105361110\\\",\\\"mensajes\\\":[{\\\"identificador\\\":\\\"65\\\",\\\"mensaje\\\":\\\"FECHA EMISIÓN EXTEMPORANEA\\\",\\\"informacionAdicional\\\":\\\"La fecha de emisión está fuera del rango de tolerancia [43201 minutos], o es mayor a la fecha del servidor\\\",\\\"tipo\\\":\\\"ERROR\\\",\\\"__hashCodeCalc\\\":false}],\\\"__hashCodeCalc\\\":false}],\\\"__hashCodeCalc\\\":false}\";\r\n try {\r\n EnvioComprobantesWs comprobantesWs = new EnvioComprobantesWs(\r\n \"https://celcer.sri.gob.ec/comprobantes-electronicos-ws/RecepcionComprobantesOffline?wsdl\");\r\n String path = \"src/main/resources/expected/0990005737001-01-001-001-118387740-autorizado.xml\";\r\n File file = new File(path);\r\n System.out.println(\"Name file:\" + file.getName());\r\n System.out.println(\"path file:\" + file.getAbsolutePath());\r\n byte[] xml = Files.readAllBytes(file.toPath());\r\n // act\r\n RespuestaSolicitud result = comprobantesWs.enviarComprobanteLotes(\"\", xml, \"\", \"\");\r\n // assert\r\n Gson gson = new Gson();\r\n\r\n // System.out.println(comprobantesWs.obtenerMensajeRespuesta(result));\r\n String res = gson.toJson(result);\r\n System.out.println(gson.toJson(res));\r\n assertEquals(expected, res);\r\n\r\n } catch (Exception e) {\r\n\r\n System.err.println(\"\" + e.getMessage());\r\n assertEquals(expected, e.getMessage());\r\n }\r\n\r\n }", "public void insertPakageXML(String userID, String fromDate, String toDate, String access_token,String retrieveRequestID) {\n String uri = \"https://vinay9-dev-ed.my.salesforce.com/services/data/v56.0/sobjects/Package_XML__c/\";\n try {\n System.out.println(\"access_token \"+access_token);\n Header oauthHeader = new BasicHeader(\"Authorization\", \"OAuth \" + access_token);\n JSONObject packageXMLRecord = new JSONObject();\n packageXMLRecord.put(\"xml_string__c\", packageXMLString);\n packageXMLRecord.put(\"CSV_String__c\", csvRows);\n packageXMLRecord.put(\"userid__c\", userID);\n packageXMLRecord.put(\"from_date__c\", fromDate);\n packageXMLRecord.put(\"to_date__c\", toDate);\n\t packageXMLRecord.put(\"Retrieve_Request_ID__c\", retrieveRequestID);\n DefaultHttpClient httpClient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(uri);\n httpPost.addHeader(oauthHeader);\n StringEntity body = new StringEntity(packageXMLRecord.toString(1));\n body.setContentType(\"application/json\");\n httpPost.setEntity(body);\n\n HttpResponse response = httpClient.execute(httpPost);\n\n int statusCode = response.getStatusLine().getStatusCode();\n if (statusCode == 201) {\n String response_string = EntityUtils.toString(response.getEntity());\n JSONObject json = new JSONObject(response_string);\n System.out.println(\"New packagexml id from response: \" + json.getString(\"id\"));\n } else {\n System.out.println(\"Insertion unsuccessful. Status code returned is \" + statusCode);\n }\n } catch (JSONException e) {\n\t \n System.out.println(\"Issue creating JSON or processing results\");\n e.printStackTrace();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (NullPointerException npe) {\n npe.printStackTrace();\n }\n }", "private List<String> usingXml(String urladd) {\n List<String> retLst = new ArrayList<String>();\n try {\n\n URL url = new URL(urladd);\n URLConnection urlConnection = url.openConnection();\n HttpURLConnection connection = null;\n connection = (HttpURLConnection) urlConnection;\n\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(connection.getInputStream());\n\n doc.getDocumentElement().normalize();\n\n NodeList nList = doc.getElementsByTagName(\"surfaceForm\");\n\n boolean flg = true;\n for (int temp = 0; temp < nList.getLength(); temp++) {\n\n Node nNode = nList.item(temp);\n\n if (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\n Element eElement = (Element) nNode;\n String text = eElement.getAttribute(\"name\");\n String offset = eElement.getAttribute(\"offset\");\n\n String startEnd = Integer.parseInt(offset) + \",\" + (text.length() + Integer.parseInt(offset));\n retLst.add(startEnd);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return retLst;\n }", "org.apache.xmlbeans.XmlString xgetSaltData();", "private FatturaElettronicaType unmarshalFattura(EmbeddedXMLType fatturaXml) {\n\t\tfinal String methodName = \"unmarshalFattura\";\n\t\tbyte[] xmlBytes = extractContent(fatturaXml);\n\t\tInputStream is = new ByteArrayInputStream(xmlBytes);\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance(FatturaElettronicaType.class);\n\t\t\tUnmarshaller u = jc.createUnmarshaller();\n\t\t\tFatturaElettronicaType fattura = (FatturaElettronicaType) u.unmarshal(is);\n\t\t\tlog.logXmlTypeObject(fattura, \"Fattura elettronica\");\n\t\t\treturn fattura;\n\t\t} catch(JAXBException jaxbe) {\n\t\t\tlog.error(methodName, \"Errore di unmarshalling della fattura\", jaxbe);\n\t\t\tthrow new BusinessException(ErroreCore.ERRORE_DI_SISTEMA.getErrore(\"Errore di unmarshalling della fattura elettronica\" + (jaxbe != null ? \" (\" + jaxbe.getMessage() + \")\" : \"\")));\n\t\t}\n\t}", "public void parseDocument() {\n\n // Create a SAXParserFactory instance\n SAXParserFactory factory = SAXParserFactory.newInstance();\n\n // Get the today Date\n Date today = new Date(new java.util.Date().getTime());\n\n File file=new File(this.xmlFileName);\n this.fileName=file.getName();\n\n //Create Sync Status Object\n SyncStatus syncStatus= new SyncStatus();\n syncStatus.setSysMerchantNo(this.merchantNo);\n syncStatus.setSysLocation(this.userLocation);\n\n Long lastBatchIndex=syncStatusService.getLastBatchIndex(this.merchantNo, this.userLocation,SyncType.SALES, today);\n\n syncStatus.setSysBatch(lastBatchIndex!=null?lastBatchIndex+1L:1L);\n syncStatus.setSysDate(today);\n syncStatus.setSysBatchRef(this.fileName);\n syncStatus.setSysType(SyncType.SALES);\n syncStatus.setSysStatus(SyncProcessStatus.ONGOING);\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n try {\n\n\n\n // Get the parser\n SAXParser parser = factory.newSAXParser();\n\n // Call the parse on the parser for the filename\n parser.parse(xmlFileName,this);\n\n //get size of salesData\n Integer noSalesData=salesData.size();\n\n //Sub list of salesData List for Batch split\n List<Sale> saleList;\n\n //To set batchEndIndex for subList\n int batchStartIndex=0;\n\n //To set batchEndIndex for subList\n int batchEndIndex=0;\n\n\n boolean isSaveStatus=true;\n\n Integer savedCount=0;\n\n //process new sales\n for(batchStartIndex=0;batchStartIndex<noSalesData;batchStartIndex=batchStartIndex+noPerBatch){\n\n //set batchEndIndex\n batchEndIndex=(batchStartIndex+noPerBatch);\n\n //set batchEndIndex as size of saleData if batchEndIndex is greater than its size\n batchEndIndex=batchEndIndex>noSalesData?noSalesData:batchEndIndex;\n\n saleList=salesData.subList(batchStartIndex,batchEndIndex);\n\n try{\n\n // Save the Sale\n saleService.saveSalesAll(saleList, auditDetails);\n\n savedCount++;\n\n }catch(InspireNetzException ex){\n\n isSaveStatus=false;\n\n log.info(\"SalesMasterXMLParser:- Save :-batch \"+syncStatus.getSysBatch()+\" : \"+batchStartIndex+\" failed\");\n\n ex.printStackTrace();\n }catch(Exception e){\n\n log.info(\"SalesMasterXMLParser:- Save :-batch sale:\"+e);\n\n e.printStackTrace();\n\n }\n\n\n }\n\n if(isSaveStatus){\n\n syncStatus.setSysStatus(SyncProcessStatus.COMPLETED);\n\n }else if(!isSaveStatus && savedCount>0){\n\n syncStatus.setSysStatus(SyncProcessStatus.PARTIALLY_COMPLETED);\n\n }else{\n\n syncStatus.setSysStatus(SyncProcessStatus.FAILED);\n\n }\n\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n }catch(NullPointerException e){\n\n syncStatus.setSysStatus(SyncProcessStatus.FAILED);\n\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n log.error(\"Parser Config Error \" + xmlFileName);\n\n\n e.printStackTrace();\n\n throw e;\n }\n catch (ParserConfigurationException e) {\n\n syncStatus.setSysStatus(SyncProcessStatus.FAILED);\n\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n log.error(\"Parser Config Error \" + xmlFileName);\n e.printStackTrace();\n\n } catch (SAXException e) {\n\n syncStatus.setSysStatus(SyncProcessStatus.FAILED);\n\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n log.error(\"SAX Exception : XML not well formed \" + xmlFileName);\n e.printStackTrace();\n\n } catch (IOException e) {\n\n syncStatus.setSysStatus(SyncProcessStatus.FAILED);\n\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n log.error(\"IO Error \" + xmlFileName);\n e.printStackTrace();\n\n }catch(Exception e){\n\n syncStatus.setSysStatus(SyncProcessStatus.FAILED);\n\n syncStatus=syncStatusService.saveSyncStatus(syncStatus);\n\n log.error(e.toString() + xmlFileName);\n e.printStackTrace();\n\n }\n\n }", "@GET\n @Produces(MediaType.APPLICATION_XML)\n \n public String getXml() {\n \n return \"<gps_data>\"\n + \"<gps_id>1</gps_id>\"\n + \"<gps_coord>107,-40</gps_coord>\"\n + \"<gps_time>12:00</gps_time>\"\n + \"</gps_data>\";\n }", "private void testProXml(){\n\t}", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n \n //Se a TAG sendo lida for \"produto\" então podemos criar um novo para ser adicionado no Array\n if(qName.equals(\"produto\")) {\n\n produto = new Produto();\n }\n\n //Todo inicio de TAG limpamos o seu conteúdo\n conteudo = new StringBuilder();\n }", "public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localFteReasonCodeTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"FteReasonCode\"));\n \n elementList.add(localFteReasonCode==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFteReasonCode));\n } if (localPrimaryPrintIndicatorTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"PrimaryPrintIndicator\"));\n \n elementList.add(localPrimaryPrintIndicator==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPrimaryPrintIndicator));\n } if (localSecondaryPrintIndicatorTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"SecondaryPrintIndicator\"));\n \n elementList.add(localSecondaryPrintIndicator==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSecondaryPrintIndicator));\n } if (localFingerprintTemplateTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"FingerprintTemplate\"));\n \n elementList.add(localFingerprintTemplate);\n } if (localNfiqScoresTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://hspd12.gsa.gov/federated/enrollment\",\n \"NfiqScores\"));\n \n \n elementList.add(localNfiqScores==null?null:\n localNfiqScores);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }", "public static GetParkPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetParkPage object =\n new GetParkPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getParkPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetParkPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n @Path(\"ServicioMonto/list\")\r\n public ArrayList<ServicioMonto> getXmlc() throws Exception {\n ArrayList<ServicioMonto> lista=new ArrayList<ServicioMonto>();\r\n lista=ServicioMonto.servicio_monto();\r\n return lista;\r\n }", "private void readXML() {\n\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\n\t\tXMLReader handler = new XMLReader();\n\t\tSAXParser parser;\n\t\t\n\t\t//Parsing xml file\n\t\ttry {\n\t\t\tparser = factory.newSAXParser();\n\t\t\tparser.parse(\"src/data/users.xml\", handler);\n\t\t\tgroupsList = handler.getGroupNames();\n\t\t} catch(SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t};\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException, InterruptedException, ParseException, SQLException, ParserConfigurationException, SAXException {\n\t\t// response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\tPrintWriter out = response.getWriter();\n\t\tHttpSession session = request.getSession();\n \tServletContext sc = session.getServletContext();\n \tString file = sc.getRealPath(\"VM_Local.xml\");\n\t\tfinal DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\n\t\tfinal DocumentBuilder builder = factory.newDocumentBuilder();\n\t\tfinal Document document = builder.parse(file);\n\t\tString export = document.getDocumentElement().getElementsByTagName(\"export\").item(0).getTextContent();\n\t\tString protocole =document.getDocumentElement().getElementsByTagName(\"protocole\").item(0).getTextContent();\t\n\t\tString hote =document.getDocumentElement().getElementsByTagName(\"hote\").item(0).getTextContent();\t\t\n\t\tString disc =document.getDocumentElement().getElementsByTagName(\"disc\").item(0).getTextContent();\n\t\tString geojsonpath =document.getDocumentElement().getElementsByTagName(\"geojsonpath\").item(0).getTextContent();\n\t\tString templatepath =document.getDocumentElement().getElementsByTagName(\"templatepath\").item(0).getTextContent();\n\t\tString featureAnalyzerURL =document.getDocumentElement().getElementsByTagName(\"featureAnalyzerURL\").item(0).getTextContent();\n\t\tString caractereAjoutParamURL =document.getDocumentElement().getElementsByTagName(\"caractereAjoutParamURL\").item(0).getTextContent();\n\t\t\n\t\tfeatureAnalyzerURL =featureAnalyzerURL.replace(caractereAjoutParamURL, \"&\");\n\t\t\n\t\tString hostURL = protocole +\"://\" +hote;\n\t\t\n\t\t/* CHOIX D'EXPORTATION POUR LA VM OU EN LOCAL */\n\t\t// String export = \"VM\";\n\t\t// String export = \"local\";\n\n\t\t/*\n\t\t * CHOIX DE CREER PLUSIEURS FICHIERS PAR RAPPORT A LA DATE OU UN SEUL FICHIER\n\t\t * GEOJSON\n\t\t */\n\t\tint date = 0; // UN SEUL FICHIER\n// int data = 1; // PLUSIEURS FICHIERS\n\n\t\t// MainApp.main(null);\n\t\tString typeCarte = MainApp.main(request, export,hote,disc,geojsonpath,templatepath, date, protocole);\n\t\t\n\t\tSystem.out.println(\"******************** TTTTTTTTT14/09/2021TTTTTTTTt **************************\");\n\t\tString templateAsJSON = iOServiceWithBuffered.read(templatepath);\n\t\tSystem.out.println(hostURL);\n\t\tSystem.out.println(templateAsJSON);\n\t\t\n\t\tSystem.out.println(\"******************** TTTTTTTTT14/09/2021TTTTTTTTt **************************\");\n\t\t\n\t\ttry {\n\n// \tCircles crl = new Circles();\n\n\t\t\t/* TODO output your page here. You may use following sample code. */\n\t\t\tout.println(\"<html>\");\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title>Servlet data processing</title>\");\n\t\t\tout.println(\"<script language=\\\"JavaScript\\\" >\");\n\t\t\tout.println(\"function OpenInNewTab(url) {\");\n\t\t\tout.println(\"var win = window.open(url, '_self');\");\n\t\t\tout.println(\"win.focus();\");\n\t\t\tout.println(\"}\");\n\t\t\tout.println(\"</script>\");\n\n\t\t\tout.println(\"</head>\");\n\t\t\t\t\t\t\t\t\t\n\t\t\tout.println(\"<body>\");\n\t\t\t\tout.println(\"<script language=\\\"JavaScript\\\" >\");\n\t\t\t\tout.println(\"var popup;\");\n\t\t\t\tout.println(\"window.addEventListener('message', (event) => {\");\n\t\t\t\t\tout.println(\"if (event.data === 'readyAnalyzer') {\");\n\t\t\t\t\t\tout.println(\"popup.postMessage({ type: 'solapdata', content:\"+ templateAsJSON +\"}, '\" +hostURL +\"')\");\n\t\t\t\t\tout.println(\"}\");\n\t\t\t\tout.println(\"});\");\n\t\t\t\tout.println(\"popup = window.open('\" + featureAnalyzerURL +\"');\");\n\t\t\t\tout.println(\"</script>\");\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tout.println(\"</body>\");\n\t\t\tout.println(\"</html>\");\n\n\t\t} finally {\n\t\t\tout.close();\n\t\t}\n\n\t}", "public void EjecutarXML(String path)\n {\n for(ArrayList<NodoXML> l : listaxml)\n {\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n }\n \n /*Ahora las importaciones*/\n// for(ArrayList<NodoXML> l : singlenton.listaAST)\n for(int cont = 0; cont<singlenton.listaAST.size(); cont++)\n {\n ArrayList<NodoXML> l = singlenton.listaAST.get(cont);\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n } \n \n mostrarTraduccion(path);\n }", "public CommandProcessXML(String filePath){\n _xmlFile = new File(filePath);\n _dbFactory = DocumentBuilderFactory.newInstance();\n }", "public String[][] cittaXml(String endPath) throws XmlException {\r\n\r\n\t\tString[][] cityInfo;\r\n\t\tcityInfo = cittaXml.readFileXml(endPath);\r\n\r\n\t\t/*\r\n\t\t * array cityInfo prototype returned coloumn 0: name of the city coloumn\r\n\t\t * 1: color of the city coloumn 2: link of the city (the id to which it\r\n\t\t * is connected the city) coloumn 3: id of the city coloumn 4: region of\r\n\t\t * the city\r\n\t\t */\r\n\t\treturn cityInfo;// ritorna l'array con le informazioni delle citta'\r\n\t}", "public static GetFilesFromUser parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n GetFilesFromUser object =\r\n new GetFilesFromUser();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName!=null){\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1){\r\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\r\n \r\n if (!\"getFilesFromUser\".equals(type)){\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (GetFilesFromUser)ExtensionMapper.getTypeObject(\r\n nsUri,type,reader);\r\n }\r\n \r\n\r\n }\r\n \r\n\r\n }\r\n\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n \r\n reader.next();\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://registry\",\"user\").equals(reader.getName())){\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\r\n \r\n\r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setUser(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n } else {\r\n \r\n \r\n reader.getElementText(); // throw away text nodes if any.\r\n }\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n \r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException{\n\t File inputFile = new File(\"C:\\\\Users\\\\msamiull\\\\workspace\\\\jgraphx-master\\\\t.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.parse(inputFile);\r\n \r\n\t\tdoc.getDocumentElement().normalize();\r\n System.out.println(\"Main element :\"+ doc.getDocumentElement().getNodeName());\r\n// NodeList nodeList = doc.getElementsByTagName(\"root\");\r\n \r\n NodeList nodeList = doc.getElementsByTagName(\"iOOBN\");\r\n// NamedNodeMap attribList = doc.getAttributes();\r\n \r\n// nonRecursiveParserXML(nList, doc);\r\n\r\n ArrayList<String> tagList = new ArrayList<String>();\r\n// tagList.add(\"mxCell\");\r\n// tagList.add(\"mxGeometry\");\r\n// tagList.add(\"mxPoint\");\r\n tagList.add(\"Node\");\r\n tagList.add(\"state\");\r\n tagList.add(\"tuple\"); // purposely i raplced \"datarow\" by \"tuple\" so that my parser can consider state first before tuple/data\r\n tagList.add(\"parent\");\r\n \r\n recursiveParserXML(nodeList, tagList);\r\n\r\n }", "private ArrayList<UserDao> parseFormXmlUser(String path){\n try {\n File inputFile = new File(path);\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n UserHandler userHandler = new UserHandler();\n saxParser.parse(inputFile, userHandler);\n return (ArrayList<UserDao>)userHandler.getObjects();\n } catch (Exception e) {\n AppLogger.getLogger().error(e.getMessage());\n return null;\n }\n }", "public String getRequestInXML() throws Exception;", "public static GetDirectAreaInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfo object =\n new GetDirectAreaInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected void importDefaultData()\n {\n LOG.info(\"Importing Data\");\n Session session = HibernateUtil.currentSession();\n Transaction tx = session.beginTransaction();\n Session dom4jSession = session.getSession(EntityMode.DOM4J);\n\n SAXReader saxReader = new SAXReader();\n try\n {\n Document document = saxReader.read(Setup.class.getResource(\"/DefaultData.xml\"));\n \n for (Object obj : document.selectNodes(\"//name\"))\n {\n Node node = (Node)obj;\n node.setText(node.getText().trim());\n }\n \n List<?> nodes = document.selectNodes(\"/Data/*/*\");\n \n for (Object obj : nodes)\n {\n Node node = (Node)obj;\n \n Class<?> clazz = Class.forName(\"at.easydiet.model.\" + node.getName());\n LOG.info(\"Importing \" + clazz.getName());\n dom4jSession.save(clazz.getName(), node);\n }\n \n session.flush();\n tx.commit();\n HibernateUtil.closeSession();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n tx.rollback();\n }\n LOG.info(\"Importing ended\");\n }", "@Override\n public void endElement(String uri, String localName, String qName) throws SAXException {\n\n //Verificar se a TAG 'produto' chegou ao fim. Se chegou podemos adicionar o produto no array\n if(qName.equals(\"produto\")) {\n\n produtos.add(produto);\n \n //Verificar se a TAG nome hegou ao fim. se chegou podemos atribui-la ao produto\n } else if(qName.equals(\"nome\")) {\n\n produto.setNome(conteudo.toString());\n\n //Verificar se a TAG preco hegou ao fim. se chegou podemos atribui-la ao produto\n } else if(qName.equals(\"preco\")) {\n\n produto.setPreco(Double.parseDouble(conteudo.toString()));\n }\n\n\n }", "public void importUsingCustomXML(OperatingConditions operatingConditions, Aircraft aircraft, ACAnalysisManager analysis, String inFilePathNoExt) {\n\n\t\t\n\t\tSystem.out.println(\"\\n ----- STARTED IMPORTING DATA FROM THE XML CUSTOM FILE -----\\n\");\n\n\t\t\n\t\t// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\t\t// STATIC FUNCTIONS - TO BE CALLED BEFORE EVERYTHING ELSE\n\t\tJPADWriteUtils.buildXmlTree();\n\n\t\tJPADXmlReader _theReadUtilities = new JPADXmlReader(aircraft, operatingConditions, inFilePathNoExt);\n\t\t_theReadUtilities.importAircraftAndOperatingConditions(aircraft, operatingConditions, inFilePathNoExt);\n\t\t\n\t\tSystem.out.println(\"\\n\\n\");\n\t\tSystem.out.println(\"\\t\\tCurrent Mach after importing = \" + operatingConditions.get_machCurrent());\n\t\tSystem.out.println(\"\\t\\tCurrent Altitude after importing = \" + operatingConditions.get_altitude());\n\t\tSystem.out.println(\"\\n\\n\");\n\t\tSystem.out.println(\"\\t\\tCurrent MTOM after importing = \" + aircraft.get_weights().get_MTOM());\n\t\tSystem.out.println(\"\\n\\n\");\n\t\t\n\t\t//-------------------------------------------------------------------\n\t\t// Export/Serialize\n\t\t\n\t\tJPADDataWriter writer = new JPADDataWriter(operatingConditions, aircraft, analysis);\n\t\t\n\t\tString myExportedFile = inFilePathNoExt + \"b\" + \".xml\";\n\t\t\n\t\twriter.exportToXMLfile(myExportedFile);\n\t\t\n\t}", "public String generarMuestraDatosXML() {\r\n\r\n\t\tDocument doc = new Document();\r\n\t\tElement datosClearQuest = new Element(\"datosClearQuest\");\r\n\t\tdoc.setRootElement(datosClearQuest);\r\n\t\t\r\n\t\tgenerarConexion(datosClearQuest);\r\n\t\tgenerarLote(datosClearQuest);\r\n\r\n\t\treturn convertXMLToString(doc);\r\n\t}", "LinkedList<Data> getDataConfirm(){\r\n FileInputStream xx = null;\r\n try {\r\n xx = new FileInputStream(\"dataConfirm.xml\");\r\n // harus diingat objek apa yang dahulu disimpan di file \r\n // program untuk membaca harus sinkron dengan program\r\n // yang dahulu digunakan untuk menyimpannya\r\n int isi;\r\n char charnya;\r\n String stringnya;\r\n // isi file dikembalikan menjadi string\r\n stringnya =\"\";\r\n while ((isi = xx.read()) != -1) {\r\n charnya= (char) isi;\r\n stringnya = stringnya + charnya;\r\n } \r\n // string isi file dikembalikan menjadi larik double\r\n return (LinkedList<Data>) xstream.fromXML(stringnya);\t \r\n }\r\n catch (Exception e){\r\n System.err.println(\"test: \"+e.getMessage());\r\n }\r\n finally{\r\n if(xx != null){\r\n try{\r\n xx.close();\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n } \r\n } \r\n return null;\r\n \r\n }", "private void marshall() {\n\t\t\n\t\ttry {\n\t\t\tFile file = new File(IKATS_IMPORT_SESSIONS_FILE);\n\t\t\t\n\t\t\tClass<?>[] classes = new Class[]{IngestionModel.class, ImportStatus.class};\n\t\t\t\n\t\t\tJAXBContext jaxbContext = JAXBContext.newInstance(classes);\n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n\t\t\t// output pretty printed then save.\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\t\t\tjaxbMarshaller.marshal(model, file);\n\t\t\t\n\t\t\tlogger.info(\"Saved session file: {}\", file.getAbsolutePath());\n\n\t\t} catch (JAXBException e) {\n\t\t // Review#147170 logger.error(e)\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public static void readXML(){\n try{\n Document doc = getDoc(\"config.xml\");\n Element root = doc.getRootElement();\n\n //Muestra los elementos dentro de la configuracion del xml\n \n System.out.println(\"Color : \" + root.getChildText(\"color\"));\n System.out.println(\"Pattern : \" + root.getChildText(\"pattern\"));\n System.out.println(\"Background : \" + root.getChildText(\"background\"));\n \n\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "public static GetEntrancePage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetEntrancePage object =\n new GetEntrancePage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getEntrancePage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetEntrancePage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public byte[] getAsBytes (Properties p) {\r\n\r\n //code description\r\n\t \r\n\tif (this.document == null) return null;\r\n\ttry {\r\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\t \t \r\n\t Transformer t = TransformerFactory.newInstance().newTransformer();\r\n\t t.setOutputProperties(p);\r\n\t t.transform(new DOMSource(this.document), new StreamResult(out));\r\n\t return out.toByteArray();\r\n\t}\r\n\tcatch (Exception err) {\r\n\t\tTemplateLogger.getLogger().error(\"XML Data - cannot write XMLData instance to byte array.\", err);\r\n\t}\r\n return null;\r\n\r\n }", "private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }", "private void refreshXML() {\n\t\t// Build a new thread to handle the request, since fetching files from\n\t\t// a remove server shouldn't block screen drawing.\n\t\tToast.makeText(\n\t\t\t\tthis,\n\t\t\t\tgetString(R.string.xml_requested_from) + \": \"\n\t\t\t\t\t\t+ PreferencesManager.getXmlUri(this), Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t\t// We use a separate runnable class instead of an anonymous inner class\n\t\t// so that when the async request is completed, it can signal the viewer\n\t\t// to toast.\n\t\tFetchThread ft = new FetchThread(this);\n\t\tft.start();\n\t}", "private void importWSDLDocument(Import bpelImport) {\n \tString namespace = bpelImport.getNamespace();\n \tString location = bpelImport.getLocation();\n \tif (location == null) {\n mLogger.severe(\"Unable to import wsdl document, import location is null \" + bpelImport);\n throw new XMLParseVisitorException(\"Unable to import wsdl document, import location is null \" + bpelImport);\n }\n \t\n \tLazyImportVisitorService vService = (LazyImportVisitorService) getVisitorService();\n \tBPELParseContext bpelParseContext = vService.getBPELParseContext();\n \tIWSDLResolver wsdlResolver = bpelParseContext.getWSDLResolver();\n \t\n \tif(wsdlResolver == null) {\n \t\tmLogger.severe(\"Unable to import wsdl document, must specify WSDL Resolver \" + bpelImport);\n throw new XMLParseVisitorException(\"Unable to import wsdl document, must specify WSDL Resolver \" + bpelImport);\n \t}\n \t\n \ttry {\n\t \tWSDLDocument wsdlDocument = wsdlResolver.resolve(namespace, location);\n\t \n\t if(wsdlDocument == null) {\n\t \tmLogger.severe(\"Unable to import wsdl document for import \" + bpelImport);\n\t throw new XMLParseVisitorException(\"Unable to import wsdl document for import \" + bpelImport);\t\n\t }\n\t \n\t bpelImport.setImportedObject(wsdlDocument);\n \n } catch (EInsightModelException e) {\n mLogger.log(Level.SEVERE, \"Unable to import wsdl document for import \" + bpelImport, e);\n throw new XMLParseVisitorException(\"Unable to import wsdl document for import \" + bpelImport, e);\n }\n \n }" ]
[ "0.5937196", "0.5669714", "0.56444585", "0.5582642", "0.5332328", "0.5290343", "0.52739567", "0.52367693", "0.5192469", "0.5190454", "0.5152447", "0.5120376", "0.5109881", "0.51018614", "0.5096098", "0.5080247", "0.5080247", "0.50472367", "0.5047176", "0.5041284", "0.5016519", "0.50078535", "0.5003034", "0.5001529", "0.49960843", "0.49693817", "0.4967982", "0.49631628", "0.496228", "0.49573973", "0.4948642", "0.49484572", "0.4906758", "0.48990446", "0.48887256", "0.48849106", "0.48817408", "0.4881385", "0.48782533", "0.48714596", "0.48686066", "0.48470926", "0.48470604", "0.4846534", "0.48410752", "0.48393264", "0.48356527", "0.48331517", "0.48294175", "0.48135555", "0.48021877", "0.4802116", "0.47979006", "0.4784373", "0.4784028", "0.47689837", "0.47689837", "0.47643638", "0.4764363", "0.47590828", "0.47499236", "0.47486973", "0.47368485", "0.4730654", "0.47303694", "0.472229", "0.47213602", "0.4714704", "0.47131255", "0.47111833", "0.47074205", "0.47069412", "0.47049505", "0.46887046", "0.46880084", "0.4680916", "0.4674718", "0.46727887", "0.46608374", "0.4659843", "0.4654838", "0.46460813", "0.46391678", "0.4630566", "0.46243674", "0.46197248", "0.46139038", "0.46120226", "0.46102664", "0.46099046", "0.46085268", "0.4607749", "0.46047944", "0.460461", "0.45996946", "0.4595233", "0.45881474", "0.4586499", "0.45847613", "0.4578528", "0.45781505" ]
0.0
-1
Grava o XML do extrato retornado pelo GPP em arquivo.
private static void saveToFile(String xmlExtrato, ArrayList diretorios, String sessionId) { try { //Percorrendo a lista de diretorios e verificando se existe algum valido. for(int i = 0; i < diretorios.size(); i++) { File diretorio = new File((String)diretorios.get(i)); if((diretorio.exists()) && (diretorio.isDirectory())) { //Salvando o xml em arquivo String fileName = diretorios.get(i) + File.separator + sessionId; File fileExtrato = new File(fileName); FileWriter writer = new FileWriter(fileExtrato); writer.write(xmlExtrato); writer.close(); break; } } } catch(Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "DocumentFragment getXML(String path)\n throws ProcessingException ;", "void bukaXoxo(){\r\n FileInputStream xx = null;\r\n try {\r\n xx = new FileInputStream(\"xoxo.xml\");\r\n // harus diingat objek apa yang dahulu disimpan di file \r\n // program untuk membaca harus sinkron dengan program\r\n // yang dahulu digunakan untuk menyimpannya\r\n int isi;\r\n char charnya;\r\n String stringnya;\r\n // isi file dikembalikan menjadi string\r\n stringnya =\"\";\r\n while ((isi = xx.read()) != -1) {\r\n charnya= (char) isi;\r\n stringnya = stringnya + charnya;\r\n } \r\n // string isi file dikembalikan menjadi larik double\r\n resi = (String) xstream.fromXML(stringnya);\t \r\n }\r\n catch (Exception e){\r\n System.err.println(\"test: \"+e.getMessage());\r\n }\r\n finally{\r\n if(xx != null){\r\n try{\r\n xx.close();\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n } \r\n } \r\n \r\n }", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public void generateXmlFile(IGallery gallery) {\r\n // create gallery node and page nodes for every page, subpage\r\n // and append that nodes to document object\r\n appendGallery(gallery);\r\n\r\n /*\r\n *****\r\n choose directory and file name\r\n *****\r\n */\r\n try {\r\n document.setXmlStandalone(true);\r\n xmlFile = new File(file + \".xml\");\r\n xmlFile.createNewFile();\r\n FileOutputStream outputStream = new FileOutputStream(xmlFile);\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t = tf.newTransformer();\r\n DOMSource dSource = new DOMSource(document);\r\n StreamResult sr = new StreamResult(outputStream);\r\n\r\n // set node indentation in xml\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", indent);\r\n\r\n // add doctype to xml document\r\n DOMImplementation domImpl = document.getImplementation();\r\n DocumentType docType = domImpl.createDocumentType(\"doctype\", ROOT_NODE, DTD_FILE);\r\n t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, docType.getSystemId());\r\n t.transform(dSource, sr);\r\n\r\n outputStream.flush();\r\n outputStream.close();\r\n\r\n zipGallery();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (TransformerException e) {\r\n e.printStackTrace();\r\n }\r\n }", "com.synergyj.cursos.webservices.ordenes.XMLBFactura getXMLBFactura();", "public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private static RetornoExtrato parse(String xmlExtrato) throws Exception\n\t{\n\t\tRetornoExtrato result = new RetornoExtrato();\n\t\t\n\t\ttry\n\t\t{\t\t\t\t\t\n\t\t\t//Obtendo os objetos necessarios para a execucao do parse do xml\n\t\t\tDocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder parse = docBuilder.newDocumentBuilder();\n\t\t\tInputSource is = new InputSource(new StringReader(xmlExtrato));\n\t\t\tDocument doc = parse.parse(is);\n\n\t\t\tVector v = new Vector();\n\t\t\n\t\t\tExtrato extrato = null;\n\t\t\t\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\n\t\t\t//Obter o índice de recarga\n\t\t\tElement elmDadosControle = (Element)doc.getElementsByTagName(\"dadosControle\").item(0);\n\t\t\tNodeList nlDadosControle = elmDadosControle.getChildNodes();\n\t\t\tif(nlDadosControle.getLength() > 0)\n\t\t\t{\n\t\t\t\tresult.setIndAssinanteLigMix(nlDadosControle.item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setPlanoPreco\t\t(nlDadosControle.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t}\n\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"detalhe\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"detalhe\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\t\n\t\t\t\t\textrato = new Extrato();\n\t\t\t\t\textrato.setNumeroOrigem(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setHoraChamada(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setTipoTarifacao(itemNodes.item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setOperacao(itemNodes.item(5).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoOrigem(itemNodes.item(6).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setRegiaoDestino(itemNodes.item(7).getChildNodes().item(0)!=null?itemNodes.item(7).getChildNodes().item(0).getNodeValue():\"\");\n\t\t\t\t\textrato.setNumeroDestino(itemNodes.item(8).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\textrato.setDuracaoChamada(itemNodes.item(9).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\t\n\t\t\t\t\textrato.setValorPrincipal\t(stringToDouble(itemNodes.item(10).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorBonus\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorSMS\t\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorGPRS\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorPeriodico\t(stringToDouble(itemNodes.item(10).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setValorTotal\t\t(stringToDouble(itemNodes.item(10).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\n\t\t\t\t\textrato.setSaldoPrincipal\t(stringToDouble(itemNodes.item(11).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoBonus\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoSMS\t\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoGPRS\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoPeriodico\t(stringToDouble(itemNodes.item(11).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\textrato.setSaldoTotal\t\t(stringToDouble(itemNodes.item(11).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()));\n\t\t\t\t\t\n\t\t\t\t\tv.add(extrato);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setExtratos(v);\n\t\t\t\n\t\t\tv= new Vector();\n\t\t\t\n\t\t\tfor (int i=0; i < doc.getElementsByTagName( \"evento\" ).getLength(); i++)\n\t\t\t{\n\t\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"evento\" ).item(i);\n\t\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t\t{\n\t\t\t\t\tEvento evento = new Evento();\n\t\t\t\t\tevento.setNome(itemNodes.item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tevento.setHora(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t\tv.add(evento);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult.setEventos(v);\n\t\t\t\n\t\t\tElement serviceElement = (Element) doc.getElementsByTagName( \"totais\" ).item(0);\n\t\t\tNodeList itemNodes = serviceElement.getChildNodes();\n\t\t\tif (itemNodes.getLength() > 0)\n\t\t\t{\t\n\t\t\t\t// SaldoInicial Principal\n\t\t\t\tresult.setSaldoInicialPrincipal\t(itemNodes.item(0).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialBonus\t\t(itemNodes.item(0).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialSMS\t\t(itemNodes.item(0).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialGPRS\t\t(itemNodes.item(0).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialPeriodico\t(itemNodes.item(0).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoInicialTotal\t\t(itemNodes.item(0).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalDebitosPrincipal\t(itemNodes.item(1).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosBonus\t\t(itemNodes.item(1).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosSMS\t\t(itemNodes.item(1).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosGPRS\t\t(itemNodes.item(1).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosPeriodico (itemNodes.item(1).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalDebitosTotal\t\t(itemNodes.item(1).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setTotalCreditosPrincipal(itemNodes.item(2).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosBonus\t(itemNodes.item(2).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosSMS\t\t(itemNodes.item(2).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosGPRS\t\t(itemNodes.item(2).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosPeriodico(itemNodes.item(2).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setTotalCreditosTotal\t(itemNodes.item(2).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tresult.setSaldoFinalPrincipal\t(itemNodes.item(3).getChildNodes().item(0).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalBonus\t\t(itemNodes.item(3).getChildNodes().item(1).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalSMS\t\t\t(itemNodes.item(3).getChildNodes().item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalGPRS\t\t(itemNodes.item(3).getChildNodes().item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalPeriodico\t(itemNodes.item(3).getChildNodes().item(4).getChildNodes().item(0).getNodeValue());\n\t\t\t\tresult.setSaldoFinalTotal\t\t(itemNodes.item(3).getChildNodes().item(5).getChildNodes().item(0).getNodeValue());\n\n\t\t\t\tserviceElement = (Element) doc.getElementsByTagName( \"dadosCadastrais\" ).item(0);\n\t\t\t\titemNodes = serviceElement.getChildNodes();\n\n\t\t\t\tif (itemNodes.item(2).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setDataAtivacao(itemNodes.item(2).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (itemNodes.item(3).getChildNodes().item(0) != null)\n\t\t\t\t{\n\t\t\t\t\tresult.setPlano(itemNodes.item(3).getChildNodes().item(0).getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tthrow new Exception(\"Problemas com a geração do Comprovante de Serviços.\");\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\r\n\tpublic void startElement(String espacio_nombres, String nombre_completo, String nombre_etiqueta,\r\n\t\t\tAttributes atributos) throws SAXException {\r\n\t\tif (nombre_etiqueta.equals(\"cantidad\")) {\r\n\t\t\tSystem.out.println(\"Cantidad: \");\r\n\t\t\tetiqueta_anterior = \"cantidad\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"dia-embarque\")) {\r\n\t\t\tSystem.out.println(\"Dia de embarque de la mercancia: \");\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"coche\")) {\r\n\t\t\tSystem.out.println(\"Datos del Coche: \");\r\n\t\t\tif (atributos.getLength() == 1) {\r\n\t\t\t\tSystem.out.println(atributos.getValue(\"segundamano\"));\r\n\t\t\t}\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"marca\")) {\r\n\t\t\tSystem.out.println(\"Marca: \");\r\n\t\t\tetiqueta_anterior = \"marca\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"modelo\")) {\r\n\t\t\tSystem.out.println(\"Modelo: \");\r\n\t\t\tetiqueta_anterior = \"\";\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"precio\")) {\r\n\t\t\tSystem.out.println(\"Precio: \");\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"kilometros\")) {\r\n\t\t\tSystem.out.println(\"Kilometros reales: \");\r\n\t\t}\r\n\t\tif (nombre_etiqueta.equals(\"fecha-matriculacion\")) {\r\n\t\t\tSystem.out.println(\"Fecha de Matricualcion: \");\r\n\t\t}\r\n\r\n\t}", "public void process(PurchaseOrder po)\n {\n File file = new File(path + \"/\" + ORDERS_XML);\n \n try\n {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource();\n is.setCharacterStream(new FileReader(file));\n\n Document doc = db.parse(is);\n\n Element root = doc.getDocumentElement();\n Element e = doc.createElement(\"order\");\n\n // Convert the purchase order to an XML format\n String keys[] = {\"orderNum\",\"customerRef\",\"product\",\"quantity\",\"unitPrice\"};\n String values[] = {Integer.toString(po.getOrderNum()), po.getCustomerRef(), po.getProduct().getProductType(), Integer.toString(po.getQuantity()), Float.toString(po.getUnitPrice())};\n \n for(int i=0;i<keys.length;i++)\n {\n Element tmp = doc.createElement(keys[i]);\n tmp.setTextContent(values[i]);\n e.appendChild(tmp);\n }\n \n // Set the status to submitted\n Element status = doc.createElement(\"status\");\n status.setTextContent(\"submitted\");\n e.appendChild(status);\n\n // Set the order total\n Element total = doc.createElement(\"orderTotal\");\n float orderTotal = po.getQuantity() * po.getUnitPrice();\n total.setTextContent(Float.toString(orderTotal));\n e.appendChild(total);\n\n // Write the content all as a new element in the root\n root.appendChild(e);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer m = tf.newTransformer();\n DOMSource source = new DOMSource(root);\n StreamResult result = new StreamResult(file);\n m.transform(source, result);\n\n }\n catch(Exception e)\n {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void transfertopurge(File file) {\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = null;\n String selfNodeID = null;\n try {\n documentBuilder = builderFactory.newDocumentBuilder();\n Document doc = documentBuilder.parse(file);\n doc.getDocumentElement().normalize();\n String rootElement = doc.getDocumentElement().getNodeName();\n String layerIDS = doc.getDocumentElement().getAttribute(\"LayerID\");\n int layerID = Integer.parseInt(layerIDS);\n NodeList nodeList1 = doc.getElementsByTagName(\"DATA\");\n for (int i = 0; i < nodeList1.getLength(); i++) {\n Node node = nodeList1.item(i);\n\n if (node.getNodeType() == node.ELEMENT_NODE) {\n Element element = (Element) node;\n String index = node.getAttributes().getNamedItem(\"INDEX\").getNodeValue();\n\n //Get value of all sub-Elements\n String key = element.getElementsByTagName(\"KEY\").item(0).getTextContent();\n String hashid = String.valueOf(element.getElementsByTagName(\"NEXTHOP\").item(0).getTextContent());\n if (!(hashid.equals(\"RootNode\"))) {\n ObjReturn obj3 = utility.search_entry(key,layerID);\n transfer(key, obj3);\n utility.delete_entry(layerID, key);\n\n }\n }\n }\n\n\n } catch (ParserConfigurationException | IOException e) {\n\n } catch (org.xml.sax.SAXException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException{\n\t File inputFile = new File(\"C:\\\\Users\\\\msamiull\\\\workspace\\\\jgraphx-master\\\\t.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.parse(inputFile);\r\n \r\n\t\tdoc.getDocumentElement().normalize();\r\n System.out.println(\"Main element :\"+ doc.getDocumentElement().getNodeName());\r\n// NodeList nodeList = doc.getElementsByTagName(\"root\");\r\n \r\n NodeList nodeList = doc.getElementsByTagName(\"iOOBN\");\r\n// NamedNodeMap attribList = doc.getAttributes();\r\n \r\n// nonRecursiveParserXML(nList, doc);\r\n\r\n ArrayList<String> tagList = new ArrayList<String>();\r\n// tagList.add(\"mxCell\");\r\n// tagList.add(\"mxGeometry\");\r\n// tagList.add(\"mxPoint\");\r\n tagList.add(\"Node\");\r\n tagList.add(\"state\");\r\n tagList.add(\"tuple\"); // purposely i raplced \"datarow\" by \"tuple\" so that my parser can consider state first before tuple/data\r\n tagList.add(\"parent\");\r\n \r\n recursiveParserXML(nodeList, tagList);\r\n\r\n }", "public void transformToSecondXml();", "private void printFile(Products print, String ufilename) {\n\t\tFile file = new File(\"output\"+File.separator+ufilename+fileId+\".xml\"); \n\t\tSystem.out.println(\"Exporting : \"+ file);\n\t\tJAXBContext jaxbContext;\n\t\ttry {\n\t\t\tjaxbContext = JAXBContext.newInstance(Products.class); \n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);\n\t\t\tjaxbMarshaller.setProperty(\"com.sun.xml.internal.bind.xmlHeaders\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);\n\t\t\tjaxbMarshaller.marshal(print, file); // prints the file\n\t\t\t// \t\t jaxbMarshaller.marshal(products, System.out);\n\t\t} catch (JAXBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void dumpAsXmlFile(String pFileName);", "private void readXGMML() throws JAXBException, IOException {\n \n \t\ttry {\n \t\t\tnodeAttributes = Cytoscape.getNodeAttributes();\n \t\t\tedgeAttributes = Cytoscape.getEdgeAttributes();\n \t\t\tnetworkCyAttributes = Cytoscape.getNetworkAttributes();\n \n \t\t\t// Use JAXB-generated methods to create data structure\n \t\t\tfinal JAXBContext jaxbContext = JAXBContext.newInstance(\n \t\t\t\t\tXGMML_PACKAGE, this.getClass().getClassLoader());\n \t\t\t// Unmarshall the XGMML file\n \t\t\tfinal Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\n \n \t\t\t/*\n \t\t\t * Read the file and map the entire XML document into data\n \t\t\t * structure.\n \t\t\t */\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(-1);\n \t\t\t\ttaskMonitor.setStatus(\"Reading XGMML data...\");\n \t\t\t}\n \t\t\t\n \t\t\tnetwork = (Graph) unmarshaller.unmarshal(networkStream);\n \t\t\t// Report Status Value\n \t\t\tif (taskMonitor != null) {\n \t\t\t\t//taskMonitor.setPercentCompleted(50);\n \t\t\t\ttaskMonitor.setStatus(\"XGMML file is valid. Next, create network...\");\n \t\t\t}\n \t\t\tnetworkName = network.getLabel();\n \n \t\t\trootNodes = new ArrayList();\n \n \t\t\t// Split the list into two: node and edge list\n \t\t\tnodes = new ArrayList();\n \t\t\tedges = new ArrayList();\n \t\t\tfinal Iterator it = network.getNodeOrEdge().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal Object curObj = it.next();\n \t\t\t\tif (curObj.getClass() == cytoscape.generated2.impl.NodeImpl.class) {\n \t\t\t\t\tnodes.add(curObj);\n \t\t\t\t} else {\n \t\t\t\t\tedges.add(curObj);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// Build the network\n \t\t\tcreateGraph();\n \n \t\t\t// It's not generally a good idea to catch OutOfMemoryErrors, but\n \t\t\t// in this case, where we know the culprit (a file that is too\n \t\t\t// large),\n \t\t\t// we can at least try to degrade gracefully.\n \t\t} catch (OutOfMemoryError oe) {\n \t\t\tnetwork = null;\n \t\t\tedges = null;\n \t\t\tnodes = null;\n \t\t\tnodeIDMap = null;\n \t\t\tnodeMap = null;\n \t\t\tSystem.gc();\n \t\t\tthrow new XGMMLException(\n \t\t\t\t\t\"Out of memory error caught! The network being loaded is too large for the current memory allocation. Use the -Xmx flag for the java virtual machine to increase the amount of memory available, e.g. java -Xmx1G cytoscape.jar -p plugins ....\");\n \t\t}\n \t}", "public PointPolygon extractPointFromIO(String xml_og) {\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t\t\t\tString pathToCoordinates =\"//gml:Point/gml:pos\";\r\n\t\t\t\t//String pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\tArrayList<String> list_xy = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\t\t\r\n\t\t\t\t\tlist_xy.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t\tpoint.y_latitude = Double.parseDouble(list_xy.get(0).split(\" \")[0]);\r\n\t\t\t\t\tpoint.x_longitude = Double.parseDouble(list_xy.get(0).split(\" \")[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tpoint.point2D.setLocation(point.x_longitude, point.y_latitude);\r\n\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\treturn point;\t\t\t\t\r\n\t}", "public PointPolygon extractPointFromIO(String xml_og) {\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t\t\t\t\r\n\t\t\t\t//String pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t \t\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi test!\");\r\n\t\t\t\t\r\n\t \tString pathToCoordinates =\"//gml:Point/gml:pos\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tArrayList<String> list_xy = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\t\t\r\n\t\t\t\t\tlist_xy.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\r\n\t\t\t\ttry{\t\t\t\t\r\n\t\t\t\t\tpoint.y_latitude = Double.parseDouble(list_xy.get(0).split(\" \")[0]);\r\n\t\t\t\t\tpoint.x_longitude = Double.parseDouble(list_xy.get(0).split(\" \")[1]);\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tpoint.point2D.setLocation(point.y_latitude, point.x_longitude);\r\n\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\t\t\t\t\t\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\treturn point;\t\t\t\t\r\n\t}", "private void parseXmlFile(InputStream file)\n {\n\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n\ttry\n\t{\n\t // Using factory get an instance of document builder\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Creating a new Document Builder.\");\n\t DocumentBuilder db = dbf.newDocumentBuilder();\n\n\t // parse using builder to get DOM representation of the XML file\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Attempting to parse the file.\");\n\t // This line causes the program to crash when attempting to read the SVG file, which is in XML format.\n\t dom = db.parse(file);\n\t //Log.d(Constants.TAG, \"XMLReader::parseXmlFile - Finished parsing the file.\");\n\t}\n\tcatch (ParserConfigurationException pce)\n\t{\n\t Log.d(Constants.TAG, \"ParserConfigurationException MSG: \" + pce.getMessage());\n\n\t pce.printStackTrace();\n\t}\n\tcatch (SAXException se)\n\t{\n\t Log.d(Constants.TAG, \"SAXException MSG: \" + se.getMessage());\n\n\t se.printStackTrace();\n\t}\n\tcatch (IOException ioe)\n\t{\n\t Log.d(Constants.TAG, \"IOException MSG: \" + ioe.getMessage());\n\n\t ioe.printStackTrace();\n\t}\n\tcatch (Exception e)\n\t{\n\t Log.d(Constants.TAG, \"Exception MSG: \" + e.getMessage());\n\t e.printStackTrace();\n\t}\n\n\t//Log.d(Constants.TAG, \"XMLReader::parseXmlFile() Exiting!\");\n }", "public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public File escribirXML(String pPath, String pathDestino){\r\n \r\n File fi = new File (pathDestino);\r\n \r\n FileWriter f;\r\n \r\n try {\r\n \r\n f = new FileWriter(fi);\r\n \r\n f.write(escrituraXML(pHost,pIp,pPath));\r\n \r\n f.close();\r\n \r\n } catch (Exception e) {\r\n \r\n e.printStackTrace();\r\n }\r\n return fi ;\r\n }", "public void setFilaDatosExportarXmlCostoGastoImpor(CostoGastoImpor costogastoimpor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(CostoGastoImporConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(costogastoimpor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(CostoGastoImporConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(costogastoimpor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(costogastoimpor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(costogastoimpor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementtipocostogastoimpor_descripcion = document.createElement(CostoGastoImporConstantesFunciones.IDTIPOCOSTOGASTOIMPOR);\r\n\t\telementtipocostogastoimpor_descripcion.appendChild(document.createTextNode(costogastoimpor.gettipocostogastoimpor_descripcion()));\r\n\t\telement.appendChild(elementtipocostogastoimpor_descripcion);\r\n\r\n\t\tElement elementnombre = document.createElement(CostoGastoImporConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(costogastoimpor.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementes_activo = document.createElement(CostoGastoImporConstantesFunciones.ESACTIVO);\r\n\t\telementes_activo.appendChild(document.createTextNode(costogastoimpor.getes_activo().toString().trim()));\r\n\t\telement.appendChild(elementes_activo);\r\n\r\n\t\tElement elementcon_agrupa = document.createElement(CostoGastoImporConstantesFunciones.CONAGRUPA);\r\n\t\telementcon_agrupa.appendChild(document.createTextNode(costogastoimpor.getcon_agrupa().toString().trim()));\r\n\t\telement.appendChild(elementcon_agrupa);\r\n\r\n\t\tElement elementcon_prorratea = document.createElement(CostoGastoImporConstantesFunciones.CONPRORRATEA);\r\n\t\telementcon_prorratea.appendChild(document.createTextNode(costogastoimpor.getcon_prorratea().toString().trim()));\r\n\t\telement.appendChild(elementcon_prorratea);\r\n\r\n\t\tElement elementcon_factura = document.createElement(CostoGastoImporConstantesFunciones.CONFACTURA);\r\n\t\telementcon_factura.appendChild(document.createTextNode(costogastoimpor.getcon_factura().toString().trim()));\r\n\t\telement.appendChild(elementcon_factura);\r\n\r\n\t\tElement elementcon_flete = document.createElement(CostoGastoImporConstantesFunciones.CONFLETE);\r\n\t\telementcon_flete.appendChild(document.createTextNode(costogastoimpor.getcon_flete().toString().trim()));\r\n\t\telement.appendChild(elementcon_flete);\r\n\r\n\t\tElement elementcon_arancel = document.createElement(CostoGastoImporConstantesFunciones.CONARANCEL);\r\n\t\telementcon_arancel.appendChild(document.createTextNode(costogastoimpor.getcon_arancel().toString().trim()));\r\n\t\telement.appendChild(elementcon_arancel);\r\n\r\n\t\tElement elementcon_seguro = document.createElement(CostoGastoImporConstantesFunciones.CONSEGURO);\r\n\t\telementcon_seguro.appendChild(document.createTextNode(costogastoimpor.getcon_seguro().toString().trim()));\r\n\t\telement.appendChild(elementcon_seguro);\r\n\r\n\t\tElement elementcon_total_general = document.createElement(CostoGastoImporConstantesFunciones.CONTOTALGENERAL);\r\n\t\telementcon_total_general.appendChild(document.createTextNode(costogastoimpor.getcon_total_general().toString().trim()));\r\n\t\telement.appendChild(elementcon_total_general);\r\n\r\n\t\tElement elementcon_digitado = document.createElement(CostoGastoImporConstantesFunciones.CONDIGITADO);\r\n\t\telementcon_digitado.appendChild(document.createTextNode(costogastoimpor.getcon_digitado().toString().trim()));\r\n\t\telement.appendChild(elementcon_digitado);\r\n\t}", "public void loadxml ()\n\t{\n\t\t\t\tString [] kategorienxml;\n\t\t\t\tString [] textbausteinexml;\n\t\t\t\tString [] textexml;\n\t\t\t\t\n\t\t\t\tString filenamexml = \"Katalogname_gekuerzt_lauffaehig-ja.xml\";\n\t\t\t\tFile xmlfile = new File (filenamexml);\n\t\t\t\t\n\t\t\t\t// lies gesamten text aus: String gesamterhtmlcode = \"\";\n\t\t\t\tString gesamterhtmlcode = \"\";\n\t\t\t\tString [] gesamtertbarray = new String[1001];\n\t\t BufferedReader inx = null;\n\t\t try {\n\t\t inx = new BufferedReader(new FileReader(xmlfile));\n\t\t String zeilex = null;\n\t\t while ((zeilex = inx.readLine()) != null) {\n\t\t \tSystem.out.println(zeilex + \"\\n\");\n\t\t \tRandom rand = new Random();\n\t\t \tint n = 0;\n\t\t \t// Obtain a number between [0 - 49].\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.End\\\"/>\")) // dann ab hier speichern bis zum ende:\n\t\t \t{\n\t\t \t\t// \terstelle neue random zahl und speichere alle folgenden zeilen bis zum .Start in diesen n rein\n\t\t \t\tn = rand.nextInt(1001);\n\n\t\t \t\t\n\t\t \t}\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n] + zeilex;\n\t\t \tFile f = new File (\"baustein_\"+ n + \".txt\");\n\t\t \t\n\t\t \tFileWriter fw = new FileWriter (f);\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\\\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\\\"\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/></w:rPr><w:r><w:rPr><w:rStyle w:val=\\\"T8\\\"/></w:rPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"\t\t \t<w:rStyle\" , \"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:p>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:val=\\\"Hyperlink\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:pStyle w:val=\\\"_37_b._20_Text\\\"/>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr><w:r><w:t>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:rPr></w:r></w:hlink><w:hlink w:dest=\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"<w:r><w:rPr><w:rStyle\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:t></w:r></w:r></w:hlink></w:p><w:p\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"xmlns:fo=\\\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\\\"><w:pPr></\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"w:pPr><w:r>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"compatible:1.0\\\"><w:pPr></w:pPr>\",\"\");\n\t\t \tgesamtertbarray[n] = gesamtertbarray[n].replace(\"</w:p><w:p\",\"\");\n\t\t \n\n\t\t \t\n\n\t\t \tfw.write(gesamtertbarray[n]);\n\t\t \tfw.flush();\n\t\t \tfw.close();\n\t\t \t\n\t\t \tif (zeilex.contains(\"w:type=\\\"Word.Bookmark.Start\\\"))\"))\n \t\t\t{\n\t\t \t\t// dann erhöhe speicher id für neue rand zahl, weil ab hier ist ende des vorherigen textblocks;\n\t\t\t \tn = rand.nextInt(1001);\n \t\t\t}\n\t\t \n\t\t }}\n\t\t \tcatch (Exception s)\n\t\t {}\n\t\t \n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t}", "public Document saveAsXML() {\n\tDocument xmldoc= new DocumentImpl();\n\tElement root = createFeaturesElement(xmldoc);\n\txmldoc.appendChild(root);\n\treturn xmldoc;\n }", "XMLIn(String legendFile, RFO r)\n\t\t{\n\t\t\tsuper();\n\t\t\trfo = r;\n\t\t\telement = \"\";\n\t\t\tlocation = \"\";\n\t\t\tfiletype = \"\";\n\t\t\tmaterial = \"\";\n\t\t\tmElements = new double[16];\n\t\t\tsetMToIdentity();\t\t\t\n\t\t\t\n\t\t\tXMLReader xr = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\txr = XMLReaderFactory.createXMLReader();\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tDebug.e(\"XMLIn() 1: \" + e);\n\t\t\t}\n\t\t\t\n\t\t\txr.setContentHandler(this);\n\t\t\txr.setErrorHandler(this);\n\t\t\ttry\n\t\t\t{\n\t\t\t\txr.parse(new InputSource(legendFile));\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tDebug.e(\"XMLIn() 2: \" + e);\n\t\t\t}\n\n\t\t}", "public void setFilaDatosExportarXmlLiquidacionImpuestoImpor(LiquidacionImpuestoImpor liquidacionimpuestoimpor,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(LiquidacionImpuestoImporConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(liquidacionimpuestoimpor.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(LiquidacionImpuestoImporConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(liquidacionimpuestoimpor.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementpedidocompraimpor_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDPEDIDOCOMPRAIMPOR);\r\n\t\telementpedidocompraimpor_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getpedidocompraimpor_descripcion()));\r\n\t\telement.appendChild(elementpedidocompraimpor_descripcion);\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementcliente_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDCLIENTE);\r\n\t\telementcliente_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcliente_descripcion()));\r\n\t\telement.appendChild(elementcliente_descripcion);\r\n\r\n\t\tElement elementfactura_descripcion = document.createElement(LiquidacionImpuestoImporConstantesFunciones.IDFACTURA);\r\n\t\telementfactura_descripcion.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfactura_descripcion()));\r\n\t\telement.appendChild(elementfactura_descripcion);\r\n\r\n\t\tElement elementnumero_comprobante = document.createElement(LiquidacionImpuestoImporConstantesFunciones.NUMEROCOMPROBANTE);\r\n\t\telementnumero_comprobante.appendChild(document.createTextNode(liquidacionimpuestoimpor.getnumero_comprobante().trim()));\r\n\t\telement.appendChild(elementnumero_comprobante);\r\n\r\n\t\tElement elementnumero_dui = document.createElement(LiquidacionImpuestoImporConstantesFunciones.NUMERODUI);\r\n\t\telementnumero_dui.appendChild(document.createTextNode(liquidacionimpuestoimpor.getnumero_dui().trim()));\r\n\t\telement.appendChild(elementnumero_dui);\r\n\r\n\t\tElement elementfecha = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FECHA);\r\n\t\telementfecha.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfecha().toString().trim()));\r\n\t\telement.appendChild(elementfecha);\r\n\r\n\t\tElement elementfecha_pago = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FECHAPAGO);\r\n\t\telementfecha_pago.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfecha_pago().toString().trim()));\r\n\t\telement.appendChild(elementfecha_pago);\r\n\r\n\t\tElement elementfob = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FOB);\r\n\t\telementfob.appendChild(document.createTextNode(liquidacionimpuestoimpor.getfob().toString().trim()));\r\n\t\telement.appendChild(elementfob);\r\n\r\n\t\tElement elementseguro = document.createElement(LiquidacionImpuestoImporConstantesFunciones.SEGURO);\r\n\t\telementseguro.appendChild(document.createTextNode(liquidacionimpuestoimpor.getseguro().toString().trim()));\r\n\t\telement.appendChild(elementseguro);\r\n\r\n\t\tElement elementflete = document.createElement(LiquidacionImpuestoImporConstantesFunciones.FLETE);\r\n\t\telementflete.appendChild(document.createTextNode(liquidacionimpuestoimpor.getflete().toString().trim()));\r\n\t\telement.appendChild(elementflete);\r\n\r\n\t\tElement elementporcentaje_fodi = document.createElement(LiquidacionImpuestoImporConstantesFunciones.PORCENTAJEFODI);\r\n\t\telementporcentaje_fodi.appendChild(document.createTextNode(liquidacionimpuestoimpor.getporcentaje_fodi().toString().trim()));\r\n\t\telement.appendChild(elementporcentaje_fodi);\r\n\r\n\t\tElement elementporcentaje_iva = document.createElement(LiquidacionImpuestoImporConstantesFunciones.PORCENTAJEIVA);\r\n\t\telementporcentaje_iva.appendChild(document.createTextNode(liquidacionimpuestoimpor.getporcentaje_iva().toString().trim()));\r\n\t\telement.appendChild(elementporcentaje_iva);\r\n\r\n\t\tElement elementtasa_control = document.createElement(LiquidacionImpuestoImporConstantesFunciones.TASACONTROL);\r\n\t\telementtasa_control.appendChild(document.createTextNode(liquidacionimpuestoimpor.gettasa_control().toString().trim()));\r\n\t\telement.appendChild(elementtasa_control);\r\n\r\n\t\tElement elementcfr = document.createElement(LiquidacionImpuestoImporConstantesFunciones.CFR);\r\n\t\telementcfr.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcfr().toString().trim()));\r\n\t\telement.appendChild(elementcfr);\r\n\r\n\t\tElement elementcif = document.createElement(LiquidacionImpuestoImporConstantesFunciones.CIF);\r\n\t\telementcif.appendChild(document.createTextNode(liquidacionimpuestoimpor.getcif().toString().trim()));\r\n\t\telement.appendChild(elementcif);\r\n\r\n\t\tElement elementtotal = document.createElement(LiquidacionImpuestoImporConstantesFunciones.TOTAL);\r\n\t\telementtotal.appendChild(document.createTextNode(liquidacionimpuestoimpor.gettotal().toString().trim()));\r\n\t\telement.appendChild(elementtotal);\r\n\t}", "public String getXml()\n {\n StringBuffer result = new StringBuffer(256);\n\n result.append(\"<importOptions>\");\n\n result.append(m_fileOptions.asXML());\n result.append(getOtherXml());\n\n result.append(\"</importOptions>\");\n\n return result.toString();\n }", "public void parse() throws ParserConfigurationException, SAXException,\n\t\t\tIOException, XMLStreamException {\n\n\t\tGem gem = new Gem();\n\t\tVisualParameters params = new VisualParameters();\n\n\t\t// current element name holder\n\t\tString currentElement = null;\n\n\t\tXMLInputFactory factory = XMLInputFactory.newInstance();\n\n\t\tfactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);\n\n\t\tXMLEventReader reader = factory.createXMLEventReader(new StreamSource(\n\t\t\t\txmlFileName));\n\n\t\twhile (reader.hasNext()) {\n\t\t\tXMLEvent event = reader.nextEvent();\n\n\t\t\t// skip any empty content\n\t\t\tif (event.isCharacters() && event.asCharacters().isWhiteSpace()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// handler for start tags\n\t\t\tif (event.isStartElement()) {\n\t\t\t\tStartElement startElement = event.asStartElement();\n\t\t\t\tcurrentElement = startElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.FOND.equalsTo(currentElement)) {\n\t\t\t\t\tfond = new Fond();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.GEM.equalsTo(currentElement)) {\n\t\t\t\t\tgem = new Gem();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(currentElement)) {\n\t\t\t\t\tparams = new VisualParameters();\n\t\t\t\t\tAttribute attribute = startElement\n\t\t\t\t\t\t\t.getAttributeByName(new QName(XML.VALUE_COLOR\n\t\t\t\t\t\t\t\t\t.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setValueColor(EnumColors.fromValue(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.TRANSPARENCY.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setTransparency(Integer.valueOf(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.FACETING.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setFaceting(Integer.valueOf(attribute.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// handler for contents\n\t\t\tif (event.isCharacters()) {\n\t\t\t\tCharacters characters = event.asCharacters();\n\n\t\t\t\tif (XML.NAME.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setName(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.PRECIOUSNESS.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setPreciousness(Boolean.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.ORIGIN.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setOrigin(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.VALUE.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setValue(Double.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// handler for end tags\n\t\t\tif (event.isEndElement()) {\n\t\t\t\tEndElement endElement = event.asEndElement();\n\t\t\t\tString localName = endElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.GEM.equalsTo(localName)) {\n\t\t\t\t\tfond.getGem().add(gem);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(localName)) {\n\t\t\t\t\t// just add answer to container\n\t\t\t\t\tgem.setVisualParameters(params);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}", "public void savetoxml() throws FileNotFoundException, JAXBException {\n xml_methods.save(player);\n }", "private void testProXml(){\n\t}", "private void loadGpxClicked() {\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n\n startActivityForResult(Intent.createChooser(intent, \"Select a GPX file\"), RQS_OPEN_GPX);\n }", "abstract protected String getOtherXml();", "private void loadFile() {\n String xmlContent = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><atomic-mass-table mass-units=\\\"u\\\" abundance-units=\\\"Mole Fraction\\\"><entry symbol=\\\"H\\\" atomic-number=\\\"1\\\"> <natural-abundance> <mass value=\\\"1.00794\\\" error=\\\"0.00007\\\" /> <isotope mass-number=\\\"1\\\"> <mass value=\\\"1.0078250319\\\" error=\\\"0.00000000006\\\" /> <abundance value=\\\"0.999885\\\" error=\\\"0.000070\\\" /> </isotope> <isotope mass-number=\\\"2\\\"> <mass value=\\\"2.0141017779\\\" error=\\\"0.0000000006\\\" /> <abundance value=\\\"0.000115\\\" error=\\\"0.000070\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"He\\\" atomic-number=\\\"2\\\"> <natural-abundance> <mass value=\\\"4.002602\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"3.0160293094\\\" error=\\\"0.0000000012\\\" /> <abundance value=\\\"0.00000134\\\" error=\\\"0.00000003\\\" /> </isotope> <isotope mass-number=\\\"4\\\"> <mass value=\\\"4.0026032497\\\" error=\\\"0.0000000015\\\" /> <abundance value=\\\"0.99999866\\\" error=\\\"0.00000003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Li\\\" atomic-number=\\\"3\\\"> <natural-abundance> <mass value=\\\"6.9421\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"6.0151223\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.0759\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"7\\\"> <mass value=\\\"7.0160041\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.9241\\\" error=\\\"0.0004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Be\\\" atomic-number=\\\"4\\\"> <natural-abundance> <mass value=\\\"9.012182\\\" error=\\\"0.000003\\\" /> <isotope mass-number=\\\"9\\\"> <mass value=\\\"9.0121822\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"B\\\" atomic-number=\\\"5\\\"> <natural-abundance> <mass value=\\\"10.881\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"10\\\"> <mass value=\\\"10.0129371\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.199\\\" error=\\\"0.007\\\" /> </isotope> <isotope mass-number=\\\"11\\\"> <mass value=\\\"11.0093055\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.801\\\" error=\\\"0.007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"C\\\" atomic-number=\\\"6\\\"> <natural-abundance> <mass value=\\\"12.0107\\\" error=\\\"0.0008\\\" /> <isotope mass-number=\\\"12\\\"> <mass value=\\\"12\\\" error=\\\"0\\\" /> <abundance value=\\\"0.9893\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"13\\\"> <mass value=\\\"13.003354838\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.0107\\\" error=\\\"0.0008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"N\\\" atomic-number=\\\"7\\\"> <natural-abundance> <mass value=\\\"14.0067\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"14\\\"> <mass value=\\\"14.0030740074\\\" error=\\\"0.0000000018\\\" /> <abundance value=\\\"0.99636\\\" error=\\\"0.00020\\\" /> </isotope> <isotope mass-number=\\\"15\\\"> <mass value=\\\"15.000108973\\\" error=\\\"0.000000012\\\" /> <abundance value=\\\"0.00364\\\" error=\\\"0.00020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"O\\\" atomic-number=\\\"8\\\"> <natural-abundance> <mass value=\\\"15.9994\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"16\\\"> <mass value=\\\"15.9949146223\\\" error=\\\"0.0000000025\\\" /> <abundance value=\\\"0.99759\\\" error=\\\"0.00016\\\" /> </isotope> <isotope mass-number=\\\"17\\\"> <mass value=\\\"16.99913150\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.00038\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"18\\\"> <mass value=\\\"17.9991604\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.00205\\\" error=\\\"0.00014\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"F\\\" atomic-number=\\\"9\\\"> <natural-abundance> <mass value=\\\"18.9984032\\\" error=\\\"0.0000005\\\" /> <isotope mass-number=\\\"19\\\"> <mass value=\\\"18.99840320\\\" error=\\\"0.00000007\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ne\\\" atomic-number=\\\"10\\\"> <natural-abundance> <mass value=\\\"20.1797\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"20\\\"> <mass value=\\\"19.992440176\\\" error=\\\"0.000000003\\\" /> <abundance value=\\\"0.9048\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"21\\\"> <mass value=\\\"20.99384674\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.0027\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"22\\\"> <mass value=\\\"21.99138550\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0925\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Na\\\" atomic-number=\\\"11\\\"> <natural-abundance> <mass value=\\\"22.989770\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"23\\\"> <mass value=\\\"22.98976966\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mg\\\" atomic-number=\\\"12\\\"> <natural-abundance> <mass value=\\\"24.3050\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"24\\\"> <mass value=\\\"23.98504187\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.7899\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"25\\\"> <mass value=\\\"24.98583700\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1000\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"26\\\"> <mass value=\\\"25.98259300\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1101\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Al\\\" atomic-number=\\\"13\\\"> <natural-abundance> <mass value=\\\"26.981538\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"27\\\"> <mass value=\\\"26.98153841\\\" error=\\\"0.00000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Si\\\" atomic-number=\\\"14\\\"> <natural-abundance> <mass value=\\\"28.0855\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"28\\\"> <mass value=\\\"27.97692649\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.92223\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"29\\\"> <mass value=\\\"28.97649468\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.04685\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"30\\\"> <mass value=\\\"29.97377018\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.03092\\\" error=\\\"0.00011\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"P\\\" atomic-number=\\\"15\\\"> <natural-abundance> <mass value=\\\"30.973761\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"31\\\"> <mass value=\\\"30.97376149\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"S\\\" atomic-number=\\\"16\\\"> <natural-abundance> <mass value=\\\"32.065\\\" error=\\\"0.005\\\" /> <isotope mass-number=\\\"32\\\"> <mass value=\\\"31.97207073\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.9499\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"33\\\"> <mass value=\\\"32.97145854\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.0075\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"34\\\"> <mass value=\\\"33.96786687\\\" error=\\\"0.00000014\\\" /> <abundance value=\\\"0.0425\\\" error=\\\"0.0024\\\" /> </isotope> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96708088\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0001\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cl\\\" atomic-number=\\\"17\\\"> <natural-abundance> <mass value=\\\"35.453\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"35\\\"> <mass value=\\\"34.96885271\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.7576\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"37\\\"> <mass value=\\\"36.96590260\\\" error=\\\"0.00000005\\\" /> <abundance value=\\\"0.2424\\\" error=\\\"0.0010\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ar\\\" atomic-number=\\\"18\\\"> <natural-abundance> <mass value=\\\"39.948\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96754626\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"0.0003365\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"38\\\"> <mass value=\\\"37.9627322\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.000632\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.962383124\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.996003\\\" error=\\\"0.000030\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"K\\\" atomic-number=\\\"19\\\"> <natural-abundance> <mass value=\\\"39.0983\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"39\\\"> <mass value=\\\"38.9637069\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.932581\\\" error=\\\"0.000044\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.96399867\\\" error=\\\"0.00000029\\\" /> <abundance value=\\\"0.000117\\\" error=\\\"0.000001\\\" /> </isotope> <isotope mass-number=\\\"41\\\"> <mass value=\\\"40.96182597\\\" error=\\\"0.00000028\\\" /> <abundance value=\\\"0.067302\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ca\\\" atomic-number=\\\"20\\\"> <natural-abundance> <mass value=\\\"40.078\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.9625912\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.96941\\\" error=\\\"0.00156\\\" /> </isotope> <isotope mass-number=\\\"42\\\"> <mass value=\\\"41.9586183\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.00647\\\" error=\\\"0.00023\\\" /> </isotope> <isotope mass-number=\\\"43\\\"> <mass value=\\\"42.9587668\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.00135\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"44\\\"> <mass value=\\\"43.9554811\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.02086\\\" error=\\\"0.00110\\\" /> </isotope> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9536927\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.00004\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.952533\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00187\\\" error=\\\"0.00021\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sc\\\" atomic-number=\\\"21\\\"> <natural-abundance> <mass value=\\\"44.955910\\\" error=\\\"0.000008\\\" /> <isotope mass-number=\\\"45\\\"> <mass value=\\\"44.9559102\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ti\\\" atomic-number=\\\"22\\\"> <natural-abundance> <mass value=\\\"47.867\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9526295\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"0.0825\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"47\\\"> <mass value=\\\"46.9517637\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0744\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.9479470\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.7372\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"49\\\"> <mass value=\\\"48.9478707\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0541\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"V\\\" atomic-number=\\\"23\\\"> <natural-abundance> <mass value=\\\"50.9415\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9471627\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.00250\\\" error=\\\"0.00004\\\" /> </isotope> <isotope mass-number=\\\"51\\\"> <mass value=\\\"50.9439635\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.99750\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cr\\\" atomic-number=\\\"24\\\"> <natural-abundance> <mass value=\\\"51.9961\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9460495\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.04345\\\" error=\\\"0.00013\\\" /> </isotope> <isotope mass-number=\\\"52\\\"> <mass value=\\\"51.9405115\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.83789\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"53\\\"> <mass value=\\\"52.9406534\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.09501\\\" error=\\\"0.00017\\\" /> </isotope> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.938846\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02365\\\" error=\\\"0.00007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mn\\\" atomic-number=\\\"25\\\"> <natural-abundance> <mass value=\\\"54.938049\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"55\\\"> <mass value=\\\"54.9380493\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Fe\\\" atomic-number=\\\"26\\\"> <natural-abundance> <mass value=\\\"55.845\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.9396147\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.05845\\\" error=\\\"0.00035\\\" /> </isotope> <isotope mass-number=\\\"56\\\"> <mass value=\\\"55.9349418\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.91754\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"57\\\"> <mass value=\\\"56.9353983\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02119\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9332801\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.00282\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Co\\\" atomic-number=\\\"27\\\"> <natural-abundance> <mass value=\\\"58.933200\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"59\\\"> <mass value=\\\"59.9331999\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ni\\\" atomic-number=\\\"28\\\"> <natural-abundance> <mass value=\\\"58.6934\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9353477\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.680769\\\" error=\\\"0.000089\\\" /> </isotope> <isotope mass-number=\\\"60\\\"> <mass value=\\\"59.9307903\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.262231\\\" error=\\\"0.000077\\\" /> </isotope> <isotope mass-number=\\\"61\\\"> <mass value=\\\"60.9310601\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.011399\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"62\\\"> <mass value=\\\"61.9283484\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0036345\\\" error=\\\"0.000017\\\" /> </isotope> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9279692\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.009256\\\" error=\\\"0.000009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cu\\\" atomic-number=\\\"29\\\"> <natural-abundance> <mass value=\\\"63.546\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"63\\\"> <mass value=\\\"62.9296007\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.6915\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"65\\\"> <mass value=\\\"64.9277938\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3085\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zn\\\" atomic-number=\\\"30\\\"> <natural-abundance> <mass value=\\\"65.409\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9291461\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.48268\\\" error=\\\"0.00321\\\" /> </isotope> <isotope mass-number=\\\"66\\\"> <mass value=\\\"65.9260364\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.27975\\\" error=\\\"0.00077\\\" /> </isotope> <isotope mass-number=\\\"67\\\"> <mass value=\\\"66.9271305\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.04102\\\" error=\\\"0.00021\\\" /> </isotope> <isotope mass-number=\\\"68\\\"> <mass value=\\\"67.9248473\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.19024\\\" error=\\\"0.00123\\\" /> </isotope> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.925325\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00631\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ga\\\" atomic-number=\\\"31\\\"> <natural-abundance> <mass value=\\\"69.723\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"69\\\"> <mass value=\\\"68.925581\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.60108\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"71\\\"> <mass value=\\\"70.9247073\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.39892\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ge\\\" atomic-number=\\\"32\\\"> <natural-abundance> <mass value=\\\"72.64\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.9242500\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.2038\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"72\\\"> <mass value=\\\"71.9220763\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2731\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"73\\\"> <mass value=\\\"72.9234595\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0776\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9211784\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.3672\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9214029\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0783\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"As\\\" atomic-number=\\\"33\\\"> <natural-abundance> <mass value=\\\"74.92160\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"75\\\"> <mass value=\\\"74.9215966\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Se\\\" atomic-number=\\\"34\\\"> <natural-abundance> <mass value=\\\"78.96\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9224767\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9192143\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0937\\\" error=\\\"0.0029\\\" /> </isotope> <isotope mass-number=\\\"77\\\"> <mass value=\\\"76.9199148\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0763\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.9173097\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2377\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.9165221\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.4961\\\" error=\\\"0.0041\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9167003\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.0873\\\" error=\\\"0.0022\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Br\\\" atomic-number=\\\"35\\\"> <natural-abundance> <mass value=\\\"79.904\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"79\\\"> <mass value=\\\"78.9183379\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.5069\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"81\\\"> <mass value=\\\"80.916291\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4931\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Kr\\\" atomic-number=\\\"36\\\"> <natural-abundance> <mass value=\\\"83.798\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.920388\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00355\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.916379\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.02286\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9134850\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.11593\\\" error=\\\"0.00031\\\" /> </isotope> <isotope mass-number=\\\"83\\\"> <mass value=\\\"82.914137\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11500\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.911508\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.56987\\\" error=\\\"0.00015\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.910615\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.17279\\\" error=\\\"0.00041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rb\\\" atomic-number=\\\"37\\\"> <natural-abundance> <mass value=\\\"85.4678\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"85\\\"> <mass value=\\\"84.9117924\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.7217\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9091858\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.2783\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sr\\\" atomic-number=\\\"38\\\"> <natural-abundance> <mass value=\\\"87.62\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.913426\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0056\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.9092647\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0986\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9088816\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0700\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"88\\\"> <mass value=\\\"87.9056167\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.8258\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Y\\\" atomic-number=\\\"39\\\"> <natural-abundance> <mass value=\\\"88.90585\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"89\\\"> <mass value=\\\"88.9058485\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zr\\\" atomic-number=\\\"40\\\"> <natural-abundance> <mass value=\\\"91.224\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"90\\\"> <mass value=\\\"89.9047022\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"0.5145\\\" error=\\\"0.0040\\\" /> </isotope> <isotope mass-number=\\\"91\\\"> <mass value=\\\"90.9056434\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1122\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.9050386\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1715\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9063144\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.1738\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.908275\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0280\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nb\\\" atomic-number=\\\"41\\\"> <natural-abundance> <mass value=\\\"92.90638\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"93\\\"> <mass value=\\\"92.9063762\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mo\\\" atomic-number=\\\"42\\\"> <natural-abundance> <mass value=\\\"95.94\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.906810\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.1477\\\" error=\\\"0.0031\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9050867\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0923\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"95\\\"> <mass value=\\\"94.9058406\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1590\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.9046780\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1668\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"97\\\"> <mass value=\\\"96.9030201\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0956\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.9054069\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.2419\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.907476\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0967\\\" error=\\\"0.0020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ru\\\" atomic-number=\\\"44\\\"> <natural-abundance> <mass value=\\\"101.07\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.907604\\\" error=\\\"0.000009\\\" /> <abundance value=\\\"0.0554\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.905287\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.0187\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"99\\\"> <mass value=\\\"98.9059385\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\".01276\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.9042189\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1260\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"101\\\"> <mass value=\\\"100.9055815\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1706\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.9043488\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.3155\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.905430\\\" error=\\\".01862\\\" /> <abundance value=\\\"0.1862\\\" error=\\\"0.0027\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rh\\\" atomic-number=\\\"45\\\"> <natural-abundance> <mass value=\\\"1025.90550\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"103\\\"> <mass value=\\\"102.905504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pd\\\" atomic-number=\\\"46\\\"> <natural-abundance> <mass value=\\\"106.42\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.905607\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0102\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.904034\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.1114\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"105\\\"> <mass value=\\\"104.905083\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2233\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.903484\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2733\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.903895\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.2646\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.905153\\\" error=\\\"0.000012\\\" /> <abundance value=\\\"0.1172\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ag\\\" atomic-number=\\\"47\\\"> <natural-abundance> <mass value=\\\"107.8682\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"107\\\"> <mass value=\\\"106.905093\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.51839\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"109\\\"> <mass value=\\\"108.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.48161\\\" error=\\\"0.00008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cd\\\" atomic-number=\\\"48\\\"> <natural-abundance> <mass value=\\\"112.411\\\" error=\\\"0.008\\\" /> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.906458\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0125\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.904183\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.903006\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1249\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"111\\\"> <mass value=\\\"110.904182\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1280\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.9027577\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2413\\\" error=\\\"0.0021\\\" /> </isotope> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.9044014\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1222\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.9033586\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2873\\\" error=\\\"0.0042\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0749\\\" error=\\\"0.0018\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"In\\\" atomic-number=\\\"49\\\"> <natural-abundance> <mass value=\\\"114.818\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.904062\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0429\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903879\\\" error=\\\"0.000040\\\" /> <abundance value=\\\"0.9571\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sn\\\" atomic-number=\\\"50\\\"> <natural-abundance> <mass value=\\\"118.710\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.904822\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0097\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.902783\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0066\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903347\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0034\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.901745\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1454\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"117\\\"> <mass value=\\\"116.902955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0768\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"118\\\"> <mass value=\\\"117.901608\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2422\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"119\\\"> <mass value=\\\"118.903311\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0859\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.9021985\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3258\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9034411\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0463\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9052745\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0579\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sb\\\" atomic-number=\\\"51\\\"> <natural-abundance> <mass value=\\\"121.760\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"121\\\"> <mass value=\\\"120.9038222\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.5721\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042160\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.4279\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Te\\\" atomic-number=\\\"52\\\"> <natural-abundance> <mass value=\\\"127.60\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.904026\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.0009\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9030558\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0255\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042711\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9028188\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0474\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"125\\\"> <mass value=\\\"124.9044241\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0707\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.9033049\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1884\\\" error=\\\"0.0025\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9044615\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3174\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9062229\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.3408\\\" error=\\\"0.0062\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"I\\\" atomic-number=\\\"53\\\"> <natural-abundance> <mass value=\\\"126.90447\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"127\\\"> <mass value=\\\"126.904468\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Xe\\\" atomic-number=\\\"54\\\"> <natural-abundance> <mass value=\\\"131.293\\\" error=\\\"0.006\\\" /> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9058954\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.000952\\\" error=\\\"0.000003\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.904268\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.000890\\\" error=\\\"0.000002\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9035305\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.019102\\\" error=\\\"0.000008\\\" /> </isotope> <isotope mass-number=\\\"129\\\"> <mass value=\\\"128.9047799\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.264006\\\" error=\\\"0.000082\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9035089\\\" error=\\\"0.0000011\\\" /> <abundance value=\\\"0.040710\\\" error=\\\"0.000013\\\" /> </isotope> <isotope mass-number=\\\"131\\\"> <mass value=\\\"130.9050828\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.212324\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.9041546\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.269086\\\" error=\\\"0.000033\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.9053945\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.104357\\\" error=\\\"0.000021\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907220\\\" error=\\\"0.000008\\\" /> <abundance value=\\\"0.088573\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cs\\\" atomic-number=\\\"55\\\"> <natural-abundance> <mass value=\\\"132.90545\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"133\\\"> <mass value=\\\"132.905447\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ba\\\" atomic-number=\\\"56\\\"> <natural-abundance> <mass value=\\\"137.327\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.906311\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00106\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.905056\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00101\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.904504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02417\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"135\\\"> <mass value=\\\"134.905684\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.000003\\\" error=\\\"0.00012\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.904571\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.07854\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"137\\\"> <mass value=\\\"136.905822\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.11232\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905242\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.71698\\\" error=\\\"0.00042\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"La\\\" atomic-number=\\\"57\\\"> <natural-abundance> <mass value=\\\"138.9055\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.907108\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00090\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"139\\\"> <mass value=\\\"138.906349\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.99910\\\" error=\\\"0.00001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ce\\\" atomic-number=\\\"58\\\"> <natural-abundance> <mass value=\\\"140.116\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907140\\\" error=\\\"0.000050\\\" /> <abundance value=\\\"0.00185\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905986\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.00251\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"140\\\"> <mass value=\\\"139.905\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.88450\\\" error=\\\"0.00051\\\" /> </isotope> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.909241\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11114\\\" error=\\\"0.00051\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pr\\\" atomic-number=\\\"59\\\"> <natural-abundance> <mass value=\\\"140.90765\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"141\\\"> <mass value=\\\"140.907648\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nd\\\" atomic-number=\\\"60\\\"> <natural-abundance> <mass value=\\\"144.24\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.907719\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.272\\\" error=\\\"0.005\\\" /> </isotope> <isotope mass-number=\\\"143\\\"> <mass value=\\\"142.909810\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.122\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.910083\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.238\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"145\\\"> <mass value=\\\"144.912569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.083\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"146\\\"> <mass value=\\\"145.913113\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.172\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.916889\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.057\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.920887\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.056\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sm\\\" atomic-number=\\\"62\\\"> <natural-abundance> <mass value=\\\"150.36\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.911996\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0307\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"147\\\"> <mass value=\\\"146.914894\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1499\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.914818\\\" error=\\\"0.1124\\\" /> <abundance value=\\\"0.1124\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"149\\\"> <mass value=\\\"148.917180\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1382\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.917272\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0738\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919729\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2675\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.922206\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2275\\\" error=\\\"0.0029\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Eu\\\" atomic-number=\\\"63\\\"> <natural-abundance> <mass value=\\\"151.964\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"151\\\"> <mass value=\\\"150.919846\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4781\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"153\\\"> <mass value=\\\"152.921227\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.5219\\\" error=\\\"0.0006\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Gd\\\" atomic-number=\\\"64\\\"> <natural-abundance> <mass value=\\\"157.25\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919789\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0020\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.920862\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0218\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"155\\\"> <mass value=\\\"154.922619\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1480\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.922120\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2047\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"157\\\"> <mass value=\\\"156.923957\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1565\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924101\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2484\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.927051\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2186\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tb\\\" atomic-number=\\\"65\\\"> <natural-abundance> <mass value=\\\"158.92534\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"159\\\"> <mass value=\\\"158.925343\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Dy\\\" atomic-number=\\\"66\\\"> <natural-abundance> <mass value=\\\"162.500\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.924278\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00056\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924405\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00095\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.925194\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02329\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"161\\\"> <mass value=\\\"160.926930\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.18889\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.926795\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25475\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"163\\\"> <mass value=\\\"162.928728\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.24896\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929171\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.28260\\\" error=\\\"0.00054\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ho\\\" atomic-number=\\\"67\\\"> <natural-abundance> <mass value=\\\"164.93032\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"165\\\"> <mass value=\\\"164.930319\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Er\\\" atomic-number=\\\"68\\\"> <natural-abundance> <mass value=\\\"167.259\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.928775\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00139\\\" error=\\\"0.00005\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929197\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.01601\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"166\\\"> <mass value=\\\"165.930290\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33503\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"167\\\"> <mass value=\\\"166.932046\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.22869\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.932368\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.26978\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.935461\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.14910\\\" error=\\\"0.00036\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tm\\\" atomic-number=\\\"69\\\"> <natural-abundance> <mass value=\\\"168.93421\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"169\\\"> <mass value=\\\"168.934211\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Yb\\\" atomic-number=\\\"70\\\"> <natural-abundance> <mass value=\\\"173.04\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.933895\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0013\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.934759\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0304\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"171\\\"> <mass value=\\\"170.936323\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1428\\\" error=\\\"0.0057\\\" /> </isotope> <isotope mass-number=\\\"172\\\"> <mass value=\\\"171.936378\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2183\\\" error=\\\"0.0067\\\" /> </isotope> <isotope mass-number=\\\"173\\\"> <mass value=\\\"172.938207\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1613\\\" error=\\\"0.0027\\\" /> </isotope> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.938858\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3183\\\" error=\\\"0.0092\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.942569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1276\\\" error=\\\"0.0041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Lu\\\" atomic-number=\\\"71\\\"> <natural-abundance> <mass value=\\\"174.967\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"175\\\"> <mass value=\\\"174.9407682\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.9741\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.9426827\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.0259\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hf\\\" atomic-number=\\\"72\\\"> <natural-abundance> <mass value=\\\"178.49\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.940042\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0016\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.941403\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0526\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"177\\\"> <mass value=\\\"176.9432204\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1860\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"178\\\"> <mass value=\\\"177.9436981\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.2728\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"179\\\"> <mass value=\\\"178.9488154\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1362\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.9465488\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3508\\\" error=\\\"0.0016\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ta\\\" atomic-number=\\\"73\\\"> <natural-abundance> <mass value=\\\"180.9479\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.947466\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00012\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"181\\\"> <mass value=\\\"180.947996\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.99988\\\" error=\\\"0.00002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"W\\\" atomic-number=\\\"74\\\"> <natural-abundance> <mass value=\\\"183.84\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.946706\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0012\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"182\\\"> <mass value=\\\"181.948205\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.265\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"183\\\"> <mass value=\\\"182.9502242\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1431\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.9509323\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.3064\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.954362\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2843\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Re\\\" atomic-number=\\\"75\\\"> <natural-abundance> <mass value=\\\"186.207\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"185\\\"> <mass value=\\\"184.952955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3740\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557505\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.6260\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Os\\\" atomic-number=\\\"76\\\"> <natural-abundance> <mass value=\\\"190.23\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.952491\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0002\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.953838\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0159\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557476\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.0196\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"188\\\"> <mass value=\\\"187.9558357\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1324\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"189\\\"> <mass value=\\\"188.958145\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1615\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.958445\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2626\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961479\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.4078\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ir\\\" atomic-number=\\\"77\\\"> <natural-abundance> <mass value=\\\"192.217\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"191\\\"> <mass value=\\\"190.960591\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.373\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"193\\\"> <mass value=\\\"192.962923\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.627\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pt\\\" atomic-number=\\\"78\\\"> <natural-abundance> <mass value=\\\"195.078\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.959930\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00014\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961035\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00782\\\" error=\\\"0.00007\\\" /> </isotope> <isotope mass-number=\\\"194\\\"> <mass value=\\\"193.962663\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.32967\\\" error=\\\"0.00099\\\" /> </isotope> <isotope mass-number=\\\"195\\\"> <mass value=\\\"194.964774\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33832\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.964934\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25242\\\" error=\\\"0.00041\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.967875\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.07163\\\" error=\\\"0.00055\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Au\\\" atomic-number=\\\"79\\\"> <natural-abundance> <mass value=\\\"196.96655\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"197\\\"> <mass value=\\\"196.966551\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hg\\\" atomic-number=\\\"80\\\"> <natural-abundance> <mass value=\\\"200.59\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.965814\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0015\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.966752\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0997\\\" error=\\\"0.0020\\\" /> </isotope> <isotope mass-number=\\\"199\\\"> <mass value=\\\"198.968262\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1687\\\" error=\\\"0.0022\\\" /> </isotope> <isotope mass-number=\\\"200\\\"> <mass value=\\\"199.968309\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2310\\\" error=\\\"0.0019\\\" /> </isotope> <isotope mass-number=\\\"201\\\"> <mass value=\\\"200.970285\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1318\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"202\\\"> <mass value=\\\"201.970625\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2986\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973475\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0687\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tl\\\" atomic-number=\\\"81\\\"> <natural-abundance> <mass value=\\\"204.3833\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"203\\\"> <mass value=\\\"202.972329\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2952\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"205\\\"> <mass value=\\\"204.974412\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.7048\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pb\\\" atomic-number=\\\"82\\\"> <natural-abundance> <mass value=\\\"207.2\\\" error=\\\"0.1\\\" /> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973028\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.014\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"206\\\"> <mass value=\\\"205.974449\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.241\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"207\\\"> <mass value=\\\"206.975880\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.221\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"208\\\"> <mass value=\\\"207.976636\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.524\\\" error=\\\"0.001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Bi\\\" atomic-number=\\\"83\\\"> <natural-abundance> <mass value=\\\"208.98038\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"209\\\"> <mass value=\\\"208.980384\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Th\\\" atomic-number=\\\"90\\\"> <natural-abundance> <mass value=\\\"232.0381\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"232\\\"> <mass value=\\\"232.0380495\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pa\\\" atomic-number=\\\"91\\\"> <natural-abundance> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"231\\\"> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"U\\\" atomic-number=\\\"92\\\"> <natural-abundance> <mass value=\\\"238.02891\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"234\\\"> <mass value=\\\"234.0409447\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.000054\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"235\\\"> <mass value=\\\"235.0439222\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.007204\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"238\\\"> <mass value=\\\"238.0507835\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.992742\\\" error=\\\"0.000010\\\" /> </isotope> </natural-abundance> </entry></atomic-mass-table>\";\n try {\n// this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);\n this.document = XMLParser.parse(xmlContent);\n } catch (Exception e) {\n throw new RuntimeException(\"Error reading atomic_system.xml.\");\n }\n\n NodeList nodes = document.getElementsByTagName(\"entry\");\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n String symbol = node.getAttributes().getNamedItem(\"symbol\").getNodeValue();\n\n entries.put(symbol, new Entry(node));\n }\n }", "@WebMethod(operationName = \"CalcularPP\")\n public String CalcularPP(@WebParam(name = \"xml\")String xml)\n {\n try\n {\n if(xml == null)\n return xmlVacioExpt;\n ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());\n DocumentBuilderFactory dbfacIN = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilderIN = dbfacIN.newDocumentBuilder();\n Document docIN = docBuilderIN.parse(bais);\n if( docIN.getDocumentElement().getNodeName().equals(\"EntradaCalculadoraPP\"))\n {\n int cliId = GetValueInt(docIN, \"CLI_ID\");\n int cliSap = GetValueInt(docIN, \"CLI_SAP\");\n String cliApePat = GetValue(docIN, \"CLI_APE_PAT\");\n String cliApeMat = GetValue(docIN, \"CLI_APE_MAT\");\n String cliNom = GetValue(docIN, \"CLI_NOM\");\n String cliFecNac = GetValue(docIN, \"CLI_FEC_NAC\");\n String cliDomCal = GetValue(docIN,\"CLI_DOM_CAL\");\n String cliDomNumExt = GetValue(docIN,\"CLI_DOM_NUM_EXT\");\n String cliDomNumInt = GetValue(docIN,\"CLI_DOM_NUM_INT\");\n String cliDomCol = GetValue(docIN,\"CLI_DOM_COL\");\n String codPosId = GetValue(docIN,\"COD_POS_ID\");\n\n int estado = GetValueInt(docIN, \"ESTADO\");\n int edad = GetValueInt(docIN, \"EDAD\");\n int ocupacion = GetValueInt(docIN, \"OCUPACION\");\n String fecha = GetValue(docIN, \"FECHA\");\n float mensualidad = GetValueInt(docIN, \"CUOTA\");\n float valor_vivienda = GetValueInt(docIN, \"VALOR_VIVIENDA\");\n\n if(estado<1 || ocupacion<1)\n return datosErrorExpt+\"ESTADO,OCUPACION\";\n if(edad<18 && edad>65)\n return ErrorEdadExpt;\n\n\n\n //Crear un XML vacio\n DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = dbfac.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //Crear el Arbol XML\n\n //Añadir la raiz\n Element raiz = doc.createElement(\"SalidaCalculadoraPP\");\n doc.appendChild(raiz);\n\n //Crear hijs y adicionarlos a la raiz\n AgregarNodo(raiz,doc,\"CLI_ID\",Integer.toString(cliId));\n AgregarNodo(raiz,doc,\"CLI_SAP\",Integer.toString(cliSap));\n\n Session s = objetos.HibernateUtil.getSessionFactory().getCurrentSession();\n \n Transaction tx = s.beginTransaction();\n Query q = s.createQuery(\"from Edo as edo where edo.cal.calId = '6'\");\n List lista = (List) q.list();\n double estado_woe = ((Edo)lista.get(estado-1)).getEdoWoe();\n double recargo = ((Edo)lista.get(estado-1)).getEdoRcg();\n\n q = s.createQuery(\"from RngEda as eda where eda.calId='6' and eda.rngEdaLimInf<=\"+edad+\" and eda.rngEdaLimSup>=\"+edad);\n lista = (List) q.list();\n double edad_woe = ((RngEda)lista.get(0)).getRngEdaWoe();\n\n q = s.createQuery(\"from Ocp as ocp where ocp.cal.calId = '6' and ocp.ocpOrdPre=\"+ocupacion);\n lista = (List) q.list();\n double ocupacion_woe = ((Ocp)lista.get(0)).getOcpWoe();\n\n // double zeta = 0.018-(0.01)*estado_woe-(0.017)*edad_woe-(0.008)*ocupacion_woe;\n double zeta = 0.018146691102274-(0.00993013369427481)* estado_woe -(0.017366941566975)* edad_woe -(0.00838465419451784)* ocupacion_woe;\n double pi = Math.exp(zeta)/(1+Math.exp(zeta));\n\n q = s.createQuery(\"from IntPi as intPi where intPi.cal.calId='6' and intPi.intPiLimInf<=\"+pi+\" and intPi.intPiLimSup>=\"+pi);\n lista = (List) q.list();\n String clasificacion = ((IntPi)lista.get(0)).getIntPiDes();\n\n q = s.createQuery(\"from FtrPpr as fp where fp.ftrPprCls='\"+clasificacion+\"' and fp.ftrPprMes=\"+fecha);\n lista = (List) q.list();\n double cuota = ((FtrPpr)lista.get(0)).getFtrPprFtr();\n\n double ppr = valor_vivienda*cuota;\n double cuota_pprr = cuota * (1 + recargo);\n double pprr = valor_vivienda *cuota_pprr;\n\n\n System.out.println(estado_woe);\n System.out.println(recargo);\n System.out.println(edad_woe);\n System.out.println(ocupacion_woe);\n System.out.println(zeta);\n System.out.println(pi);\n System.out.println(clasificacion);\n System.out.println(cuota);\n System.out.println(ppr);\n System.out.println(cuota_pprr);\n System.out.println(pprr);\n\n\n AgregarNodo(raiz,doc,\"CUOTA_PURA_RIESGO\",Double.toString(cuota*100)+\"%\");\n AgregarNodo(raiz,doc,\"CUOTA_RECARGADAD\",Double.toString(cuota_pprr*100)+\"%\");\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESGO\",\"$\"+Double.toString(ppr));\n AgregarNodo(raiz,doc,\"PRIMA_PURA_RIESO_RECARGADA\",\"$\"+Double.toString(pprr));\n //Salida del XML\n TransformerFactory transfac = TransformerFactory.newInstance();\n Transformer trans = transfac.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n StringWriter sw = new StringWriter();\n StreamResult result = new StreamResult(sw);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, result);\n String xmlString = sw.toString();\n\n return xmlString;\n }else\n return tabNoEncontradoExpt+\"EntradaCalculadoraPP\";\n } catch (ParserConfigurationException parE) {\n return xmlExpt;\n } catch (SAXException saxE) {\n return xmlExpt;\n } catch (IOException ioE) {\n return xmlExpt;\n } catch (Exception e) {\n return e.getMessage();\n }\n }", "public GeoJson extractDataForGeoJsonFromIo(String xml_og){\r\n\t\t\r\n\t\tGeoJson geoJson = new GeoJson();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else if(\"sams\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/samplingSpatial/2.0\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t \t\r\n\t \t//The path to the time is only for the first observation block valid; other blocks have another path\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString path_SamplingFOIIdentifier = \"//sams:SF_SpatialSamplingFeature/gml:identifier\";\r\n\t\t\t\tNodeList nodes_path_SamplingFOIIdentifier = (NodeList)xPath.compile(path_SamplingFOIIdentifier).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\r\n\t\t\t\tString path_y_lat_x_long = \"//gml:pos\";\r\n\t\t\t\tNodeList nodes_path_y_lat_x_long = (NodeList)xPath.compile(path_y_lat_x_long).evaluate(doc, XPathConstants.NODESET);\t\t\t\t\t\t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString messwert = \"\";\t\r\n\t\t\t\t\r\n\t\t\t\t//for(int n = 0; n<nodes_procedure.getLength(); n++){\r\n\t\t\t\t//we need the data from only the first observation block\r\n\t\t\t\tfor(int n = 0; n<1; n++){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString path_time = \"//gml:timePosition\";\r\n\t\t\t\t\tNodeList nodes_path_time = (NodeList)xPath.compile(path_time).evaluate(doc, XPathConstants.NODESET);\t\t\t\t\r\n\t\t\t\t\tString path_SamplingFOIName = \"//sams:SF_SpatialSamplingFeature/gml:name\";\r\n\t\t\t\t\tNodeList nodes_path_SamplingFOIName = (NodeList)xPath.compile(path_SamplingFOIName).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\tString path_procedure = \"//om:OM_Observation/om:procedure/@xlink:href\";\r\n\t\t\t\t\tNodeList nodes_procedure = (NodeList)xPath.compile(path_procedure).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tGeoJson gjson = new GeoJson();\r\n\t\t\t\t\t\tgeoJson.list_geoJson.add(gjson);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.observationPhenomenonTime = nodes_path_time.item(0).getTextContent();\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.samplingFOIName = nodes_path_SamplingFOIName.item(n).getTextContent();\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.samplingFOIIdentifier = nodes_path_SamplingFOIIdentifier.item(n).getTextContent();\r\n\t\t\t\t\t\tgjson.procedure = nodes_procedure.item(n).getTextContent();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString coords = nodes_path_y_lat_x_long.item(n).getTextContent();\r\n\t\t\t\t\t\tString [] stray = coords.split(\" \");\r\n\t\t\t\t\t\tgjson.y_lat = Double.parseDouble(coords.split(\" \")[0]);\r\n\t\t\t\t\t\tgjson.x_long = Double.parseDouble(coords.split(\" \")[1]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(stray.length==3){\r\n\t\t\t\t\t\t\tgjson.z_alt = Double.parseDouble(coords.split(\" \")[2]); \r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlogger.error(\"some error\", ex);\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\tGeoJson gj = geoJson.list_geoJson.get(0);\r\n\t\t\t\tfor (Field field : gj.getClass().getDeclaredFields()) {\r\n\t\t\t\t\tlogger.debug(field.getName()+ \": \"+field.get(gj));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\t//xml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn geoJson.list_geoJson.get(0);\r\n\t}", "public Graph loadFile(){\r\n String path = \"\";\r\n JFileChooser choix = new JFileChooser();\r\n choix.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only xml files\", \"xml\");\r\n choix.addChoosableFileFilter(filter);\r\n if (choix.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){\r\n path = choix.getSelectedFile().getAbsolutePath();\r\n }\r\n Graph g = new Graph();\r\n boolean quit = false;\r\n int max = 0;\r\n try{\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n do {\r\n String line = br.readLine();\r\n if (line.indexOf(\"<node\") != -1){\r\n String[] node_xml = line.split(\"\\\"\");\r\n Node node = new Node(Integer.parseInt(node_xml[1]),(int)Double.parseDouble(node_xml[3]),(int)Double.parseDouble(node_xml[5]),TypeNode.valueOf(node_xml[7]));\r\n max = Math.max(max, node.getId());\r\n if (node.getType() == TypeNode.INCENDIE){\r\n node.kindleFire((int)Double.parseDouble(node_xml[9]));\r\n }\r\n g.getListNodes().add(node);\r\n }\r\n if (line.indexOf(\"<edge\") != -1){\r\n String[] edge_xml = line.split(\"\\\"\");\r\n Edge edge = new Edge(findNode(g,Integer.parseInt(edge_xml[1])),findNode(g,Integer.parseInt(edge_xml[3])),TypeEdge.valueOf(edge_xml[5]));\r\n g.getListEdges().add(edge);\r\n }\r\n if (line.startsWith(\"</osm>\")){\r\n quit = true;\r\n } \r\n Node.setNb_node(max+1);\r\n } while (!quit);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"File not found : \"+e.getMessage());\r\n } catch (IOException e) {\r\n System.out.println(\"Listening file error : \"+e.getMessage());\r\n }\r\n return g;\r\n }", "public static void main(String[] args) {\n\t\tXStream xstream = new XStreamEx(new DomDriver());\r\n\t\txstream.alias(\"AIPG\", AIPG.class);\r\n\t\txstream.alias(\"INFO\", InfoReq.class);\r\n\t\r\n\t\t\r\n\t\t\r\n\t\txstream.alias(\"RET_DETAIL\", Ret_Detail.class);\r\n \t\txstream.aliasField(\"RET_DETAILS\", Body.class, \"details\");\r\n\t\r\n\r\n\t\t\r\n//\t\txstream.aliasField(\"TRX->CODE1\", Info.class, \"TRX_CODE\");\r\n\t\t\r\n\t\tAIPG g = new AIPG( );\r\n\t\tInfoRsp info = new InfoRsp( );\r\n\t\tinfo.setTRX_CODE(\"-----\");\r\n\t\tinfo.setVERSION(\"03\");\r\n\t\tg.setINFO(info);\r\n\t\t\r\n\t\tBody body = new Body( );\r\n//\t\tTrans_Sum transsum = new Trans_Sum( );\r\n\t\tRet_Detail detail=new Ret_Detail();\r\n\t\tdetail.setSN(\"woshi\");\r\n\t body.addDetail(detail);\r\n\t \r\n\t\t\r\n\t\tg.setBODY(body);\r\n\t\tSystem.out.println(xstream.toXML(g).replaceAll(\"__\", \"_\"));\r\n\t\t\r\n\t\t\r\n\t}", "String generarXmlTodoRiesgoMontaje(RamoRiesgoMontaje ramoRiesgoMontaje) throws HiperionException;", "public static void readXML(){\n try{\n Document doc = getDoc(\"config.xml\");\n Element root = doc.getRootElement();\n\n //Muestra los elementos dentro de la configuracion del xml\n \n System.out.println(\"Color : \" + root.getChildText(\"color\"));\n System.out.println(\"Pattern : \" + root.getChildText(\"pattern\"));\n System.out.println(\"Background : \" + root.getChildText(\"background\"));\n \n\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "public String[] colorXml(String endPath) {\r\n\t\tString[] color = null;\r\n\r\n\t\ttry {// provo a leggere il file xml\r\n\t\t\tcolor = colorXml.coloriXml(endPath);\r\n\t\t} catch (XmlException e) {\r\n\t\t\tlogger.error(err + endPath, e);\r\n\t\t\tcolor = null;\r\n\t\t}\r\n\r\n\t\treturn color;\r\n\t}", "private void parseXMLResult(String respFile, ProcureLineItem pli,\r\n\t\t\tApprovalRequest ar, BaseVector lineItems, Approvable lic)\r\n\t\t\tthrows SAXException, ParserConfigurationException, IOException {\r\n\t\tLog.customer.debug(\"After calling getVertexTaxResponse()...: %s\",\r\n\t\t\t\t\"CatTaxCustomApprover response file before parsing : - %s\",\r\n\t\t\t\tclassName, respFile);\r\n\t\t// Parsing XML and populating field in Ariba.....\r\n\t\tlic = ar.getApprovable();\r\n\t\tLog.customer.debug(\" Parsing XML file ...........: %s\", className);\r\n\t\tFile file1 = new File(respFile);\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\r\n\t\tDocument doc = db.parse(file1);\r\n\t\t// if(respFile!=null){\r\n\t\tdoc.getDocumentElement().normalize();\r\n\t\tNodeList nodeList = doc.getElementsByTagName(\"LineItem\");\r\n\t\tLog.customer.debug(\"%s Information of all Line Item nodeList %s\",\r\n\t\t\t\tclassName, nodeList.getLength());\r\n\r\n\t\tfor (int s = 0; s < nodeList.getLength(); s++) {\r\n\t\t\tNode fstNode = nodeList.item(s);\r\n\t\t\tElement fstElmntlnm = (Element) fstNode;\r\n\t\t\tString lineItemNumber = fstElmntlnm.getAttribute(\"lineItemNumber\");\r\n\t\t\tint index = Integer.parseInt(lineItemNumber);\r\n\t\t\ttry {\r\n\t\t\t\tint plinumber = index - 1;\r\n\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\"%s *** lineItemNumber plinumber after: %s\",\r\n\t\t\t\t\t\tclassName, plinumber);\r\n\t\t\t\tpli = (ProcureLineItem) lineItems.get(plinumber);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLog.customer.debug(\"%s *** in catch of pli : %s\", className,\r\n\t\t\t\t\t\tlineItemNumber + \" ******** \" + e.toString());\r\n\t\t\t\tLog.customer.debug(pli.toString());\r\n\t\t\t\tLog.customer.debug(e.getClass());\r\n\t\t\t}\r\n\t\t\tif (fstNode.getNodeType() == Node.ELEMENT_NODE) {\r\n\r\n\t\t\t\tElement fstElmnt = (Element) fstNode;\r\n\t\t\t\tNodeList countryElmntLst = fstElmnt\r\n\t\t\t\t\t\t.getElementsByTagName(\"Country\");\r\n\t\t\t\tElement lstNmElmnt = (Element) countryElmntLst.item(0);\r\n\t\t\t\tNodeList lstNm = lstNmElmnt.getChildNodes();\r\n\t\t\t\tLog.customer.debug(\"%s *** Country : %s\", className,\r\n\t\t\t\t\t\t((Node) lstNm.item(0)).getNodeValue());\r\n\r\n\t\t\t\t// Total Tax\r\n\t\t\t\tNodeList totaltaxElmntLst = fstElmnt\r\n\t\t\t\t\t\t.getElementsByTagName(\"TotalTax\");\r\n\t\t\t\tElement lstNmElmnt1 = (Element) totaltaxElmntLst.item(0);\r\n\t\t\t\tNodeList lstNm1 = lstNmElmnt1.getChildNodes();\r\n\t\t\t\tString totalTax = ((Node) lstNm1.item(0)).getNodeValue();\r\n\t\t\t\tBigDecimal taxAmount = new BigDecimal(totalTax);\r\n\t\t\t\tMoney taxTotal = new Money(taxAmount, pli.getAmount()\r\n\t\t\t\t\t\t.getCurrency());\r\n\t\t\t\tpli.setFieldValue(\"TaxAmount\", taxTotal);\r\n\t\t\t\tLog.customer.debug(\"%s *** Tax Amount : %s\", className,\r\n\t\t\t\t\t\ttotalTax);\r\n\r\n\t\t\t\t// Reason code\r\n\t\t\t\tElement fstElmntRC = (Element) fstNode;\r\n\t\t\t\tNodeList lstNmElmntLstRC = fstElmntRC\r\n\t\t\t\t\t\t.getElementsByTagName(\"AssistedParameter\");\r\n\t\t\t\tString ReasonCode = \" \";\r\n\t\t\t\tfor (int b = 0; b < lstNmElmntLstRC.getLength(); b++) {\r\n\t\t\t\t\tNode fstNodeRC = lstNmElmntLstRC.item(b);\r\n\t\t\t\t\tif (fstNodeRC.getNodeType() == Node.ELEMENT_NODE) {\r\n\t\t\t\t\t\tElement fstElmntRC1 = (Element) fstNodeRC;\r\n\t\t\t\t\t\tString fieldIdRC = fstElmntRC1.getAttribute(\"phase\");\r\n\t\t\t\t\t\tLog.customer.debug(\"%s *** ReasonCode in loop : \"\r\n\t\t\t\t\t\t\t\t+ fieldIdRC);\r\n\t\t\t\t\t\tif (\"POST\".equalsIgnoreCase(fieldIdRC)) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tElement lstNmElmntRC = (Element) lstNmElmntLstRC\r\n\t\t\t\t\t\t\t\t\t\t.item(0);\r\n\t\t\t\t\t\t\t\tif (lstNmElmntRC.equals(null)\r\n\t\t\t\t\t\t\t\t\t\t|| lstNmElmntRC.equals(\"\")) {\r\n\t\t\t\t\t\t\t\t\tReasonCode = \"\";\r\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\t\"%s *** ReasonCode in if : %s\",\r\n\t\t\t\t\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tNodeList lstNmRC = lstNmElmntRC\r\n\t\t\t\t\t\t\t\t\t\t\t.getChildNodes();\r\n\t\t\t\t\t\t\t\t\tReasonCode = ((Node) lstNmRC.item(0))\r\n\t\t\t\t\t\t\t\t\t\t\t.getNodeValue();\r\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\t\"%s *** ReasonCode in else : %s\",\r\n\t\t\t\t\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\t\t\t\t\tLog.customer.debug(\r\n\t\t\t\t\t\t\t\t\t\t\"%s *** inside exception : %s\",\r\n\t\t\t\t\t\t\t\t\t\tclassName);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/*****************************************/\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLog.customer.debug(\"inside loop still....\");\r\n\t\t\t\t}\r\n\t\t\t\tLog.customer.debug(\"outside loop .....\");\r\n\t\t\t\t// *********************************************************************************\r\n\t\t\t\t// TaxAmount = 0 and Reason code = Null then exempt Reason code\r\n\t\t\t\t// is E0.\r\n\r\n\t\t\t\t// Start : RSD 111 (FRD4.0/TD 1.2)\r\n\r\n\t\t\t\tString sapsource = null;\r\n\t\t\t\tsapsource = (String)pli.getLineItemCollection().getDottedFieldValue(\"CompanyCode.SAPSource\");\r\n\r\n\t\t\t\tLog.customer.debug(\"*** ReasonCode logic RSD111 SAPSource is: %s\",sapsource);\r\n\r\n\t\t\t\tif((sapsource.equals(\"MACH1\")) && ((ReasonCode != null) && (!\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))\r\n\t\t\t\t{\r\n\t\t\t\t\t/** Fetching Description from Table. */\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode logic RSD111: \" + ReasonCode);\r\n\t\t\t\t\tString taxCodeForLookup = ReasonCode; // Please Replace with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Actual value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from Web Service\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Response.\r\n\t\t\t\t\tString qryStringrc = \"Select TaxExemptDescription from cat.core.TaxExemptReasonCode where TaxExemptUniqueName = '\"\r\n\t\t\t\t\t\t\t+ taxCodeForLookup + \"'\";\r\n\t\t\t\t\tLog.customer.debug(\"%s TaxExemptReasonCode : qryString \"\r\n\t\t\t\t\t\t\t+ qryStringrc);\r\n\t\t\t\t\t// Replace the cntrctrequest - Invoice Reconciliation Object\r\n\t\t\t\t\tAQLOptions queryOptionsrc = new AQLOptions(ar\r\n\t\t\t\t\t\t\t.getPartition());\r\n\t\t\t\t\tAQLResultCollection queryResultsrc = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryStringrc, queryOptionsrc);\r\n\t\t\t\t\tif (queryResultsrc != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" RSD111 -- TaxExemptReasonCode: Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResultsrc.next()) {\r\n\t\t\t\t\t\t\tString taxdescfromLookupvalue = (String) queryResultsrc\r\n\t\t\t\t\t\t\t\t\t.getString(0);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" RSD111 TaxExemptReasonCode: taxdescfromLookupvalue = \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t\t// Change the rli to appropriate Carrier Holding\r\n\t\t\t\t\t\t\t// object, i.e. IR Line object\r\n\t\t\t\t\t\t\tif (\"\".equals(taxdescfromLookupvalue)\r\n\t\t\t\t\t\t\t\t\t|| taxdescfromLookupvalue == null\r\n\t\t\t\t\t\t\t\t\t|| \"null\".equals(taxdescfromLookupvalue)) {\r\n\t\t\t\t\t\t\t\t// if(taxdescfromLookupvalue.equals(\"\")||taxdescfromLookupvalue\r\n\t\t\t\t\t\t\t\t// ==\r\n\t\t\t\t\t\t\t\t// null||taxdescfromLookupvalue.equals(\"null\")\r\n\t\t\t\t\t\t\t\t// ){\r\n\t\t\t\t\t\t\t\ttaxdescfromLookupvalue = \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpli\r\n\t\t\t\t\t\t\t\t\t.setFieldValue(\"Carrier\",\r\n\t\t\t\t\t\t\t\t\t\t\ttaxdescfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" RSD111 -- TaxExemptReasonCode Applied on Carrier: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// End : RSD 111 (FRD4.0/TD 1.2)\r\n\r\n\r\n\t\t\t\t} else if ((\"0.0\".equals(totalTax) && ((ReasonCode == null) || (\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))) {\r\n\t\t\t\t\tReasonCode = \"E0\";\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode in condition : %s\",\r\n\t\t\t\t\t\t\tclassName, ReasonCode);\r\n\t\t\t\t} else if ((\"0.0\".equals(totalTax) && ((ReasonCode != null) || (!\"\"\r\n\t\t\t\t\t\t.equals(ReasonCode))))) {\r\n\r\n\t\t\t\t\t// End Exempt Reason code logic.\r\n\t\t\t\t\t/** Fetching Description from Table. */\r\n\t\t\t\t\tLog.customer.debug(\"*** ReasonCode after : \" + ReasonCode);\r\n\t\t\t\t\tString taxCodeForLookup = ReasonCode; // Please Replace with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Actual value\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from Web Service\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Response.\r\n\t\t\t\t\tString qryStringrc = \"Select TaxExemptDescription from cat.core.TaxExemptReasonCode where TaxExemptUniqueName = '\"\r\n\t\t\t\t\t\t\t+ taxCodeForLookup + \"'\";\r\n\t\t\t\t\tLog.customer.debug(\"%s TaxExemptReasonCode : qryString \"\r\n\t\t\t\t\t\t\t+ qryStringrc);\r\n\t\t\t\t\t// Replace the cntrctrequest - Invoice Reconciliation Object\r\n\t\t\t\t\tAQLOptions queryOptionsrc = new AQLOptions(ar\r\n\t\t\t\t\t\t\t.getPartition());\r\n\t\t\t\t\tAQLResultCollection queryResultsrc = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryStringrc, queryOptionsrc);\r\n\t\t\t\t\tif (queryResultsrc != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode: Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResultsrc.next()) {\r\n\t\t\t\t\t\t\tString taxdescfromLookupvalue = (String) queryResultsrc\r\n\t\t\t\t\t\t\t\t\t.getString(0);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode: taxdescfromLookupvalue = \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t\t// Change the rli to appropriate Carrier Holding\r\n\t\t\t\t\t\t\t// object, i.e. IR Line object\r\n\t\t\t\t\t\t\tif (\"\".equals(taxdescfromLookupvalue)\r\n\t\t\t\t\t\t\t\t\t|| taxdescfromLookupvalue == null\r\n\t\t\t\t\t\t\t\t\t|| \"null\".equals(taxdescfromLookupvalue)) {\r\n\t\t\t\t\t\t\t\t// if(taxdescfromLookupvalue.equals(\"\")||taxdescfromLookupvalue\r\n\t\t\t\t\t\t\t\t// ==\r\n\t\t\t\t\t\t\t\t// null||taxdescfromLookupvalue.equals(\"null\")\r\n\t\t\t\t\t\t\t\t// ){\r\n\t\t\t\t\t\t\t\ttaxdescfromLookupvalue = \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpli\r\n\t\t\t\t\t\t\t\t\t.setFieldValue(\"Carrier\",\r\n\t\t\t\t\t\t\t\t\t\t\ttaxdescfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" TaxExemptReasonCode Applied on Carrier: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxdescfromLookupvalue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// End Exempt Reason code logic.\r\n\r\n\t\t\t\t// *****************************************************************************//*\r\n\t\t\t\t// tax code logic ...\r\n\t\t\t\tif (totalTax.equals(\"0.0\")) {\r\n\t\t\t\t\tString companyCode = (String) lic\r\n\t\t\t\t\t\t\t.getDottedFieldValue(\"CompanyCode.UniqueName\");\r\n\t\t\t\t\tString state = (String) pli\r\n\t\t\t\t\t\t\t.getDottedFieldValue(\"ShipTo.State\");\r\n\t\t\t\t\tString formattedString = companyCode + \"_\" + state + \"_\"\r\n\t\t\t\t\t\t\t+ \"B0\";\r\n\t\t\t\t\tLog.customer.debug(\"***formattedString : \"\r\n\t\t\t\t\t\t\t+ formattedString);\r\n\t\t\t\t\tString qryString = \"Select TaxCode,UniqueName, SAPTaxCode from ariba.tax.core.TaxCode where UniqueName = '\"\r\n\t\t\t\t\t\t\t+ formattedString\r\n\t\t\t\t\t\t\t+ \"' and Country.UniqueName ='\"\r\n\t\t\t\t\t\t\t+ pli\r\n\t\t\t\t\t\t\t\t\t.getDottedFieldValue(\"ShipTo.Country.UniqueName\")\r\n\t\t\t\t\t\t\t+ \"'\";\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: qryString \"\r\n\t\t\t\t\t\t\t\t\t+ qryString);\r\n\t\t\t\t\tAQLOptions queryOptions = new AQLOptions(ar.getPartition());\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage I\");\r\n\t\t\t\t\tAQLResultCollection queryResults = Base.getService()\r\n\t\t\t\t\t\t\t.executeQuery(qryString, queryOptions);\r\n\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage II- Query Executed\");\r\n\t\t\t\t\tif (queryResults != null) {\r\n\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage III - Query Results not null\");\r\n\t\t\t\t\t\twhile (queryResults.next()) {\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination: REQUISITION - Stage IV - Entering the DO of DO-WHILE\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ queryResults.getBaseId(0).get());\r\n\t\t\t\t\t\t\tTaxCode taxfromLookupvalue = (TaxCode) queryResults\r\n\t\t\t\t\t\t\t\t\t.getBaseId(0).get();\r\n\t\t\t\t\t\t\tLog.customer.debug(\" taxfromLookupvalue\"\r\n\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: TaxCodefromLookup\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\t// Set the Value of LineItem.TaxCode.UniqueName =\r\n\t\t\t\t\t\t\t// 'formattedString'\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: Setting TaxCodefromLookup\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\r\n\t\t\t\t\t\t\tpli.setFieldValue(\"TaxCode\", taxfromLookupvalue);\r\n\t\t\t\t\t\t\tLog.customer\r\n\t\t\t\t\t\t\t\t\t.debug(\" CatMSCTaxCodeDetermination : REQUISITION: Applied \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ taxfromLookupvalue);\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\t// end Tax code...\r\n\t\t\t\tLog.customer.debug(\"*** After loop Tax code : \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// }\r\n\t}", "public java.lang.String getXml();", "public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}", "private Document xsltTransformGetFeature(String gml, String xsltURL) {\r\n Debug.debugMethodBegin( this, \"xsltTransformGetFeature\" );\r\n\r\n Document document = null;\r\n try {\r\n document = XMLTools.parse( new StringReader( gml ) );\r\n \r\n // Use the static TransformerFactory.newInstance() method to instantiate\r\n // a TransformerFactory. The javax.xml.transform.TransformerFactory\r\n // system property setting determines the actual class to instantiate --\r\n // org.apache.xalan.transformer.TransformerImpl.\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n \r\n // Use the TransformerFactory to instantiate a Transformer that will work with\r\n // the stylesheet you specify. This method call also processes the stylesheet\r\n // into a compiled Templates object.\r\n URL url = new URL( xsltURL );\r\n Transformer transformer =\r\n tFactory.newTransformer( new StreamSource( url.openStream() ) );\r\n \r\n // Use the Transformer to apply the associated Templates object to an XML document\r\n // (foo.xml) and write the output to a file (foo.out).\r\n StringWriter sw = new StringWriter();\r\n transformer.transform(new DOMSource(document), new StreamResult( sw ));\r\n\r\n document = XMLTools.parse( new StringReader( sw.toString() ) );\r\n } catch(Exception e) {\r\n Debug.debugException( e, \"an error/fault body for the soap message will be created\");\r\n //TODO exception\r\n }\r\n \r\n Debug.debugMethodEnd();\r\n return document;\r\n }", "public void generarDoc(){\n generarDocP();\n }", "public String processGcfmlFile(IProject pr, IResource resource){\n\t\tResourceSet resourceSet = new ResourceSetImpl();\r\n\t\tString gcfmlOutputFile = \"\";\r\n\t\t// Get the URI of the model file.\r\n\t\t\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tURI fileURI = URI.createPlatformResourceURI(resource.getFullPath().toString(), true);\r\n\r\n\t\t\t// Create a resource for this file.\r\n\t\t\tResource gcfmlResource = resourceSet.getResource(fileURI, true);\r\n\t\t\t\r\n\t\t\t// Initialize DOM\r\n\t\t\tDOMImplementation domi = initializeDom();\r\n\t\t\tEFile gcfmlFile = (EFile) gcfmlResource.getContents().get(0); // Load gcfml contents\r\n\t\t\tEConfigurationProject project = ConfMLCore.getProjectModel(pr);\r\n\t\t\t// Go through gcfml settings\r\n\t\t\tfor (ESetting gcfmlSetting : gcfmlFile.getSetting()) {\r\n\t\t\t\t\r\n\t\t\t\tgcfmlFile.setLocation(fileURI.toPlatformString(true));\r\n\t\t\t\tSettingImplementationCollector.addImplementation(gcfmlSetting.getRef(), gcfmlFile);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tEcorePlugin.INSTANCE.log(e);\r\n\t\t}\r\n\t\treturn gcfmlOutputFile;\r\n\t}", "public XMLElement(PApplet sketch, String filename)\n/* */ {\n/* 174 */ this();\n/* 175 */ this.sketch = sketch;\n/* 176 */ init(sketch.createReader(filename));\n/* */ }", "public String generarPasajeReglaXML() {\r\n\r\n\t\tDocument doc = new Document();\r\n\t\tElement datosClearQuest = new Element(\"datosClearQuest\");\r\n\t\tdoc.setRootElement(datosClearQuest);\r\n\t\t\r\n\t\tgenerarConexion(datosClearQuest);\r\n\t\tgenerarPasaje(datosClearQuest);\r\n\r\n\t\treturn convertXMLToString(doc);\r\n\t}", "public static boolean ReescrituraConfig(String ruta, String ws, String ip_bd, String id_portico, String chapa, String dispo, String idAdmin, List<EventoPuertaMagnetica> eventos, String loc_geo){\n try{\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n //creacion de elementos\n Element rootElement = doc.createElement(\"parametros\");\n Element urlWS = doc.createElement(\"Url_WebServices\");\n Element idPort = doc.createElement(\"Id_Portico\");\n Element ipBD = doc.createElement(\"Base_Datos_IP\");\n Element cha = doc.createElement(\"Tiene_Chapa\");\n Element disp = doc.createElement(\"Disposicion\");\n Element idAdm = doc.createElement(\"Id_Crede_Administrador\");\n Element lg = doc.createElement(\"Localizacion_Geografica\");\n\n doc.appendChild(rootElement); //ingreso de cabecera.\n\n //ingreso de datos a elementos\n urlWS.appendChild(doc.createTextNode(ws));\n idPort.appendChild(doc.createTextNode(id_portico));\n ipBD.appendChild(doc.createTextNode(ip_bd));\n cha.appendChild(doc.createTextNode(chapa));\n disp.appendChild(doc.createTextNode(dispo));\n idAdm.appendChild(doc.createTextNode(idAdmin));\n lg.appendChild(doc.createTextNode(loc_geo));\n\n //ingresos de elementos a cabecera\n rootElement.appendChild(urlWS);\n rootElement.appendChild(idPort);\n rootElement.appendChild(ipBD);\n rootElement.appendChild(cha);\n rootElement.appendChild(disp);\n rootElement.appendChild(idAdm);\n rootElement.appendChild(lg);\n\n if(chapa.equals(\"Z0B9C4B\")){\n for(int i=0; i<eventos.size(); i++){\n Element event = doc.createElement(\"Evento\");\n Element idEvent = doc.createElement(\"Id_Evento\");\n Element nombreEvent = doc.createElement(\"Nombre_Evento\");\n idEvent.appendChild(doc.createTextNode(eventos.get(i).get_U01B3F3()));\n nombreEvent.appendChild(doc.createTextNode(eventos.get(i).get_DESTINO()));\n event.appendChild(idEvent);\n event.appendChild(nombreEvent);\n rootElement.appendChild(event);\n }\n\n }\n\n //transformacion a archivo XML.\n\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer trans = transFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File dir = new File(ruta);\n\n Log.i(TAG, \"Se verifica la existencia del archivo apra su creacion\");\n if(dir.exists()){\n //elimino el archivo xml junto con el folder.\n\n File [] archivo = dir.listFiles();//data/data/com.civi/config/config.xml\n if(archivo.length != 0){//existen archivos.\n Log.i(TAG, \"Archivo config existe, eliminando...\");\n if(archivo[0].delete()){\n Log.i(TAG, \"Archivo Config eliminado\");\n if(dir.delete()){//elimino el folder.\n Log.i(TAG, \"Folder config eliminado\");\n }else{\n Log.i(TAG, \"No fue posible la eliminacion del folder\");\n }\n }else{\n Log.i(TAG, \"NO fue posible la eliminacion del archivo\");\n }\n }else{\n Log.i(TAG, \"Archivo Config no existe. elimino solo el folder\");\n if(dir.delete()){\n Log.i(TAG, \"Folder eliminado\");\n }\n }\n\n }\n\n //Creacion de folder.\n if(dir.mkdirs()){\n StreamResult result = new StreamResult(new File(dir, \"config.xml\"));\n trans.transform(source, result);\n }\n Log.i(TAG, \"Generacion de config.xml realizada en \"+ruta);\n\n } catch(Exception ex){\n return false;\n }\n return true;\n }", "public void showLoadXML(Properties p);", "private String getOMEXML(final String file) throws FormatException,\n \t\t\tIOException\n \t\t{\n \t\t\tfinal String uuid =\n \t\t\t\t\"urn:uuid:\" + getUUID(new Location(getContext(), file).getName());\n \t\t\tomeMeta.setUUID(uuid);\n \n \t\t\tString xml;\n \t\t\ttry {\n \t\t\t\txml = service.getOMEXML(omeMeta);\n \t\t\t}\n \t\t\tcatch (final ServiceException se) {\n \t\t\t\tthrow new FormatException(se);\n \t\t\t}\n \n \t\t\t// insert warning comment\n \t\t\tfinal String prefix = xml.substring(0, xml.indexOf(\">\") + 1);\n \t\t\tfinal String suffix = xml.substring(xml.indexOf(\">\") + 1);\n \t\t\treturn prefix + WARNING_COMMENT + suffix;\n \t\t}", "private static Document processFile(String filename, String mode) throws Exception {\t\t\n\t\t// First make sure the properties file is loaded...\n\t\tOscar3Props.getInstance();\n\t\tDocument doc;\n\n\t\tPubXMLToSciXML ptsx = null;\n\t\t\n\t\tif(mode.equals(\"Process\") || mode.equals(\"SAF\") || mode.equals(\"Data\")) {\n\t\t\tSystem.out.println(\"Loading file...\");\n\t\t\tdoc = ToSciXML.fileToSciXML(new File(filename));\n\t\t} else if(mode.equals(\"RoundTrip\")) {\n\t\t\tptsx = new PubXMLToSciXML(new Builder().build(new File(filename)));\n\t\t\tdoc = ptsx.getSciXML();\n\t\t} else {\n\t\t\tthrow new Error(\"Mode not recognised\");\n\t\t}\n\t\t\n\t\tOscarFlow oscarFlow = new OscarFlow(doc);\n\n\t\tif(mode.equals(\"Process\")) {\n\t\t\toscarFlow.processLite();\n\t\t\treturn oscarFlow.getInlineXML();\n\t\t} else if(mode.equals(\"SAF\")) {\n\t\t\toscarFlow.processToSAF();\n\t\t\treturn oscarFlow.getSafXML();\n\t\t} else if(mode.equals(\"Data\")) {\n\t\t\toscarFlow.parseData();\n\t\t\treturn oscarFlow.getDataXML();\n\t\t} else if(mode.equals(\"RoundTrip\")) {\n\t\t\toscarFlow.processLite();\n\t\t\tptsx.setSciXMLDoc(oscarFlow.getInlineXML());\n\t\t\treturn ptsx.getAnnotatedPubXML();\n\t\t}\n\t\treturn null;\n\t}", "public String doneXML() {\r\n return null;\r\n }", "private static PriceList getConvertedDocument(String sourceFolderPath, String constSourceFileName) throws ParserConfigurationException, SAXException, IOException {\n String filePath = sourceFolderPath.concat(constSourceFileName);\n File xmlFile = new File(filePath);\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = factory.newDocumentBuilder();\n Document doc = dBuilder.parse(xmlFile);\n \n \n //create the excel document Java representation\n PriceList priceList = new PriceList(doc.getDocumentElement());\n return priceList;\n }", "public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException {\n\t\tcheckwithnodesxmltoexcel excl= new checkwithnodesxmltoexcel();\n\t\texcl.xmltoexcelfile();\n\n\t}", "public void importUsingCustomXML(OperatingConditions operatingConditions, Aircraft aircraft, ACAnalysisManager analysis, String inFilePathNoExt) {\n\n\t\t\n\t\tSystem.out.println(\"\\n ----- STARTED IMPORTING DATA FROM THE XML CUSTOM FILE -----\\n\");\n\n\t\t\n\t\t// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\t\t// STATIC FUNCTIONS - TO BE CALLED BEFORE EVERYTHING ELSE\n\t\tJPADWriteUtils.buildXmlTree();\n\n\t\tJPADXmlReader _theReadUtilities = new JPADXmlReader(aircraft, operatingConditions, inFilePathNoExt);\n\t\t_theReadUtilities.importAircraftAndOperatingConditions(aircraft, operatingConditions, inFilePathNoExt);\n\t\t\n\t\tSystem.out.println(\"\\n\\n\");\n\t\tSystem.out.println(\"\\t\\tCurrent Mach after importing = \" + operatingConditions.get_machCurrent());\n\t\tSystem.out.println(\"\\t\\tCurrent Altitude after importing = \" + operatingConditions.get_altitude());\n\t\tSystem.out.println(\"\\n\\n\");\n\t\tSystem.out.println(\"\\t\\tCurrent MTOM after importing = \" + aircraft.get_weights().get_MTOM());\n\t\tSystem.out.println(\"\\n\\n\");\n\t\t\n\t\t//-------------------------------------------------------------------\n\t\t// Export/Serialize\n\t\t\n\t\tJPADDataWriter writer = new JPADDataWriter(operatingConditions, aircraft, analysis);\n\t\t\n\t\tString myExportedFile = inFilePathNoExt + \"b\" + \".xml\";\n\t\t\n\t\twriter.exportToXMLfile(myExportedFile);\n\t\t\n\t}", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "private String writeValidXMLFile() throws java.io.IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"06010101\\\">\");\n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>3</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>200.0</plot_lenX>\");\n oOut.write(\"<plot_lenY>200.0</plot_lenY>\");\n oOut.write(\"<plot_precip_mm_yr>1150.645781</plot_precip_mm_yr>\");\n oOut.write(\"<plot_temp_C>12.88171785</plot_temp_C>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_3\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_4\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_5\\\" />\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_3\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_4\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_5\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_3\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_4\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_5\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_sizeClasses>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s1.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s10.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s20.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s30.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s40.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s50.0\\\"/>\");\n oOut.write(\"</tr_sizeClasses>\");\n oOut.write(\"<tr_initialDensities>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_2\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_3\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_4\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_5\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"</tr_initialDensities>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_3\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_4\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_5\\\">39.48</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_3\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_4\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_5\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_3\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_4\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_5\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_3\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_4\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_5\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_3\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_4\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_5\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_3\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_4\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_5\\\">0.389</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_3\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_4\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_5\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_3\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_4\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_5\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_3\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_4\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_5\\\">0.0299</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_3\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_4\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_5\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_3\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_4\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_5\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_3\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_4\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_5\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_3\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_4\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_5\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_3\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_4\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_5\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_3\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_4\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_5\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_3\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_4\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_5\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>QualityVigorClassifier</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_3\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_4\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_5\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<QualityVigorClassifier1>\");\n oOut.write(\"<ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>10</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>20</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.78</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.88</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.61</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.64</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">1</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.55</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>20</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>30</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.33</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.81</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.64</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.32</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.32</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.69</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.58</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>30</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>40</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.34</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.57</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.26</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.46</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.13</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.36</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.66</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.45</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"</ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierVigBeta0>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_2\\\">0.1</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_3\\\">0</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_4\\\">0.3</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_5\\\">0.4</ma_cvb0Val>\");\n oOut.write(\"</ma_classifierVigBeta0>\");\n oOut.write(\"<ma_classifierVigBeta11>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_2\\\">0.2</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_3\\\">2.35</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_4\\\">0.1</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_5\\\">2.43</ma_cvb11Val>\");\n oOut.write(\"</ma_classifierVigBeta11>\");\n oOut.write(\"<ma_classifierVigBeta12>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_2\\\">-2.3</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_3\\\">1.12</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_4\\\">0.32</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_5\\\">1.3</ma_cvb12Val>\");\n oOut.write(\"</ma_classifierVigBeta12>\");\n oOut.write(\"<ma_classifierVigBeta13>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_2\\\">0.13</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_3\\\">1</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_4\\\">-0.2</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_5\\\">1</ma_cvb13Val>\");\n oOut.write(\"</ma_classifierVigBeta13>\");\n oOut.write(\"<ma_classifierVigBeta14>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_2\\\">0.9</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_3\\\">0</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_4\\\">-1</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_5\\\">0</ma_cvb14Val>\");\n oOut.write(\"</ma_classifierVigBeta14>\");\n oOut.write(\"<ma_classifierVigBeta15>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_2\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_3\\\">0.25</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_4\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_5\\\">-0.45</ma_cvb15Val>\");\n oOut.write(\"</ma_classifierVigBeta15>\");\n oOut.write(\"<ma_classifierVigBeta16>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_2\\\">1</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_3\\\">0.36</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_4\\\">0</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_5\\\">0.46</ma_cvb16Val>\");\n oOut.write(\"</ma_classifierVigBeta16>\");\n oOut.write(\"<ma_classifierVigBeta2>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_2\\\">0.01</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_3\\\">0.02</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_4\\\">0.04</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_5\\\">0.1</ma_cvb2Val>\");\n oOut.write(\"</ma_classifierVigBeta2>\");\n oOut.write(\"<ma_classifierVigBeta3>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_2\\\">0.001</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_3\\\">0.2</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_4\\\">0.3</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_5\\\">0.4</ma_cvb3Val>\");\n oOut.write(\"</ma_classifierVigBeta3>\");\n oOut.write(\"<ma_classifierQualBeta0>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_2\\\">0.25</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_3\\\">1.13</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_4\\\">0</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_5\\\">1.15</ma_cqb0Val>\");\n oOut.write(\"</ma_classifierQualBeta0>\");\n oOut.write(\"<ma_classifierQualBeta11>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_2\\\">0.36</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_3\\\">0</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_4\\\">0.4</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_5\\\">0</ma_cqb11Val>\");\n oOut.write(\"</ma_classifierQualBeta11>\");\n oOut.write(\"<ma_classifierQualBeta12>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_2\\\">0.02</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_3\\\">10</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_4\\\">0.3</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_5\\\">30</ma_cqb12Val>\");\n oOut.write(\"</ma_classifierQualBeta12>\");\n oOut.write(\"<ma_classifierQualBeta13>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_2\\\">0.2</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_3\\\">10</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_4\\\">-0.3</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_5\\\">30</ma_cqb13Val>\");\n oOut.write(\"</ma_classifierQualBeta13>\");\n oOut.write(\"<ma_classifierQualBeta14>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_2\\\">-0.2</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_3\\\">10</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_4\\\">-0.4</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_5\\\">30</ma_cqb14Val>\");\n oOut.write(\"</ma_classifierQualBeta14>\");\n oOut.write(\"<ma_classifierQualBeta2>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_2\\\">-0.2</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_3\\\">10</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_4\\\">0</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_5\\\">30</ma_cqb2Val>\");\n oOut.write(\"</ma_classifierQualBeta2>\");\n oOut.write(\"<ma_classifierQualBeta3>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_2\\\">1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_3\\\">10</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_4\\\">0.1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_5\\\">30</ma_cqb3Val>\");\n oOut.write(\"</ma_classifierQualBeta3>\");\n oOut.write(\"<ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_2\\\">0.1</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_3\\\">0.25</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_4\\\">0.5</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_5\\\">0.74</ma_cnapvVal>\");\n oOut.write(\"</ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_2\\\">0.9</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_3\\\">0.25</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_4\\\">0.3</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_5\\\">0.74</ma_cnapsVal>\");\n oOut.write(\"</ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_classifierDeciduous>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_2\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_3\\\">0</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_4\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_5\\\">0</ma_cdVal>\");\n oOut.write(\"</ma_classifierDeciduous>\");\n oOut.write(\"</QualityVigorClassifier1>\");\n oOut.write(\"</paramFile>\");\n\n oOut.close();\n return sFileName;\n }", "void saveXML(String path,\n SourceParameters parameters)\n throws SAXException, ProcessingException, IOException;", "public static GpxStats getGpxStats(File gpxFile) {\n try {\n // Create a FileInputStream from the Gpx File\n InputStream inStream = new FileInputStream(gpxFile);\n\n // Parse to a Gpx\n Gpx parsedGpx = new GPXParser().parse(inStream);\n\n // Close the FileInputStream\n inStream.close();\n\n if (parsedGpx != null) {\n // Get the TrackPoints from the Gpx\n List<TrackPoint> points = parsedGpx.getTracks().get(0).getTrackSegments().get(0).getTrackPoints();\n\n // Initialize the variables that will be used to calculate the distance and elevation\n double totalDistance = 0.0;\n double low = 0.0;\n double high = 0.0;\n\n // Initialize the coordinates that will be used to calculate the center of the trail\n double north = 0;\n double south = 0;\n double east = 0;\n double west = 0;\n\n // Init the Geodetic Calculater (Uses Vincenty's formula for higher accuracy)\n GeodeticCalculator calculator = new GeodeticCalculator();\n\n // Iterate through each pair of points and calculate the distance between them\n for (int i = 0; i < points.size() - 1; i++) {\n // Ellipsoid.WGS84 is the commonly accepted model for Earth\n GeodeticMeasurement measurement = calculator.calculateGeodeticMeasurement(Ellipsoid.WGS84,\n // Note: Distance is calculated ignoring elevation\n // First point\n new GlobalPosition(points.get(i).getLatitude(), points.get(i).getLongitude(), 0),\n // Second point\n new GlobalPosition(points.get(i + 1).getLatitude(), points.get(i + 1).getLongitude(), 0));\n\n // Add the distance between the two points to the total distance\n totalDistance += measurement.getPointToPointDistance();\n\n // Find the high and low elevation\n if (i == 0) {\n // For the first point, set the respective elevations for the low and high\n boolean firstHigher = points.get(i).getElevation() > points.get(i + 1).getElevation();\n if (firstHigher) {\n low = points.get(i + 1).getElevation();\n high = points.get(i).getElevation();\n } else {\n low = points.get(i).getElevation();\n high = points.get(i + 1).getElevation();\n }\n\n // For the first point, set all coordinates to the points coordinates\n if (points.get(i).getLongitude() > points.get(i + 1).getLongitude()) {\n north = points.get(i).getLongitude();\n south = points.get(i + 1).getLongitude();\n } else {\n north = points.get(i + 1).getLongitude();\n south = points.get(i).getLongitude();\n }\n\n if (points.get(i).getLatitude() > points.get(i + 1).getLatitude()) {\n east = points.get(i).getLatitude();\n west = points.get(i + 1).getLatitude();\n } else {\n east = points.get(i + 1).getLatitude();\n west = points.get(i).getLatitude();\n }\n\n } else {\n // For all other iterations, set the high elevation if higher or low\n // elevation if lower\n double elevation = points.get(i + 1).getElevation();\n\n // Set the coordinates if they are more extreme than the previous coordinate\n double longitude = points.get(i + 1).getLongitude();\n double latitude = points.get(i + 1).getLatitude();\n\n if (elevation < low) {\n low = elevation;\n } else if (elevation > high) {\n high = elevation;\n }\n\n if (north < longitude) {\n north = longitude;\n } else if (south > longitude) {\n south = longitude;\n }\n\n if (east < latitude) {\n east = latitude;\n } else if (west > latitude) {\n west = latitude;\n }\n }\n }\n\n // Create a GpxStats Object from the stats\n GpxStats gpxStats = new GpxStats();\n gpxStats.distance = totalDistance;\n gpxStats.elevation = high - low;\n gpxStats.latitude = (west + east) / 2;\n gpxStats.longitude = (north + south) / 2;\n\n return gpxStats;\n }\n } catch (XmlPullParserException | IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public ArrayList<Layout> xmlFileToLayoutsPalette(InputStream fis, boolean concatenate) {\n\n ArrayList<Layout> result = null;\n\n Bundle bundle = null;\n ArrayList<Layout> layoutsPalette = null;\n Layout layoutElement = null;\n Stack<Bundle> bundleStack = new Stack<>();\n long arrayLong[] = null;\n float arrayFloat[] = null;\n String arrayString[] = null;\n int arrayIndex = 0;\n boolean needGC = false;\n\n mXmlPullParser = Xml.newPullParser();\n\n try {\n //FileInputStream fis;\n\n mXmlPullParser.setInput(fis, null);\n int eventType = mXmlPullParser.getEventType();\n boolean done = false;\n\n while (eventType != XmlPullParser.END_DOCUMENT && !done) {\n\n String name = null;\n Bitmap denseIcon = null, ambientIcon = null;\n\n if(needGC) { System.gc(); needGC = false; }\n\n switch (eventType) {\n\n case XmlPullParser.START_DOCUMENT:\n// bundle = new Bundle();\n break;\n\n case XmlPullParser.START_TAG:\n\n name = mXmlPullParser.getName();\n\n if (name.equalsIgnoreCase(mRootTag)) {\n String prodid = mXmlPullParser.getAttributeValue(null, ATTR_PRODUCT_ID);\n if (null == prodid || !prodid.equalsIgnoreCase(productId)) {\n done = true;\n }\n\n } else if (name.equalsIgnoreCase(LAYOUTS_PALETTE)) {\n layoutsPalette = new ArrayList<>();\n needGC = true;\n\n } else if (name.equalsIgnoreCase(LAYOUT)) {\n// bundleStack.push(bundle);\n// bundle = new Bundle();\n layoutElement = new Layout();\n layoutElement.iconAmbientFileName = null;\n layoutElement.iconDenseFileName = null;\n denseIcon = null;\n ambientIcon = null;\n needGC = true;\n\n } else if (name.equalsIgnoreCase(LAYOUT_NAME)) {\n String lp_name = mXmlPullParser.nextText();\n// bundle.putString(name, lp_name);\n layoutElement.name = lp_name;\n\n// } else if (name.equalsIgnoreCase(DENSE_ICON) || name.equalsIgnoreCase(AMBIENT_ICON)) {\n// String base64gzip = mXmlPullParser.nextText();\n// GZIPInputStream zis = new GZIPInputStream(new ByteArrayInputStream(Base64.decode(base64gzip, 0)));\n// ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();\n// byte[] buffer = new byte[1024];\n// int len; while ((len = zis.read(buffer)) != -1) byteBuffer.write(buffer, 0, len);\n// zis.close();\n//// bundle.putByteArray(name, byteBuffer.toByteArray());\n// ByteArrayInputStream bais = new ByteArrayInputStream(byteBuffer.toByteArray());\n// Bitmap bmp = BitmapFactory.decodeStream(bais);\n// Bitmap sb = Bitmap.createScaledBitmap(bmp, ACommon.LAYOUT_PALETTE_ICON_SIDE_DIMENSION,\n// ACommon.LAYOUT_PALETTE_ICON_SIDE_DIMENSION, true);\n// if (name.equalsIgnoreCase(DENSE_ICON)) {\n// layoutElement.iconDense = sb;\n// } else if (name.equalsIgnoreCase(AMBIENT_ICON)) {\n// layoutElement.iconAmbient = sb;\n// }\n// needGC = true;\n } else if (name.equalsIgnoreCase(DENSE_ICON) || name.equalsIgnoreCase(AMBIENT_ICON)) {\n String base64gzip = mXmlPullParser.nextText();\n GZIPInputStream zis = new GZIPInputStream(new ByteArrayInputStream(Base64.decode(base64gzip, 0)));\n ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();\n byte[] buffer = new byte[1024];\n int len; while ((len = zis.read(buffer)) != -1) byteBuffer.write(buffer, 0, len);\n zis.close();\n// bundle.putByteArray(name, byteBuffer.toByteArray());\n ByteArrayInputStream bais = new ByteArrayInputStream(byteBuffer.toByteArray());\n Bitmap bmp = BitmapFactory.decodeStream(bais);\n Bitmap sb = Bitmap.createScaledBitmap(bmp, ACommon.LAYOUT_PALETTE_ICON_SIDE_DIMENSION,\n ACommon.LAYOUT_PALETTE_ICON_SIDE_DIMENSION, true);\n if (name.equalsIgnoreCase(DENSE_ICON)) {\n denseIcon = sb;\n //Log.i(TAG, \"#XML, xmlFileToLayoutsPalette, ICON, iconD=\" + denseIcon + \", fname=\" + layoutElement.iconDenseFileName);\n if (null != layoutElement.iconDenseFileName) {\n bmpToFile(denseIcon, layoutElement.iconDenseFileName);\n denseIcon = null;\n }\n } else if (name.equalsIgnoreCase(AMBIENT_ICON)) {\n ambientIcon = sb;\n //Log.i(TAG, \"#XML, xmlFileToLayoutsPalette, ICON, iconA=\" + ambientIcon + \", fname=\" + layoutElement.iconAmbientFileName);\n if (null != layoutElement.iconAmbientFileName) {\n bmpToFile(ambientIcon, layoutElement.iconAmbientFileName);\n ambientIcon = null;\n }\n }\n needGC = true;\n\n } else if (name.equalsIgnoreCase(DENSE_ICON_FILENAME) || name.equalsIgnoreCase(AMBIENT_ICON_FILENAME)) {\n String iconFileName = mXmlPullParser.nextText();\n if (name.equalsIgnoreCase(DENSE_ICON_FILENAME)) {\n if (!concatenate) layoutElement.iconDenseFileName = iconFileName;\n else layoutElement.iconDenseFileName = String.valueOf(System.currentTimeMillis()) + \"_D\";\n //Log.i(TAG, \"#XML, xmlFileToLayoutsPalette, FNAME, iconD=\" + denseIcon + \", fname=\" + layoutElement.iconDenseFileName);\n if (null != denseIcon) {\n bmpToFile(denseIcon, layoutElement.iconDenseFileName);\n denseIcon = null;\n }\n } else if (name.equalsIgnoreCase(AMBIENT_ICON_FILENAME)) {\n if (!concatenate) layoutElement.iconAmbientFileName = iconFileName;\n else layoutElement.iconAmbientFileName = String.valueOf(System.currentTimeMillis()) + \"_A\";\n //Log.i(TAG, \"#XML, xmlFileToLayoutsPalette, FNAME, iconA=\" + ambientIcon + \", fname=\" + layoutElement.iconAmbientFileName);\n if (null != ambientIcon) {\n bmpToFile(ambientIcon, layoutElement.iconAmbientFileName);\n ambientIcon = null;\n }\n }\n needGC = true;\n\n } else if (name.equalsIgnoreCase(WATCH_APPEARANCE)) {\n// bundleStack.push(bundle);\n bundle = new Bundle();\n\n } else if (name.equalsIgnoreCase(INSCRIPTION_BUNDLE)) {\n bundleStack.push(bundle);\n bundle = new Bundle();\n\n } else if (name.equalsIgnoreCase(Inscription.CFG_INSCR_DIRECTION) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_BEND) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_BURNIN) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_ENABLED) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXTCOLOR) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_FX)) {\n arrayIndex = 0;\n arrayLong = new long[Inscription.NUM_INSCRIPTIONS];\n for (int i = 0; i < Inscription.NUM_INSCRIPTIONS; i++) arrayLong[i] = 0;\n needGC = true;\n\n } else if (name.equalsIgnoreCase(ACommon.CFG_HOUR_MARKS)) {\n arrayIndex = 0;\n arrayLong = new long[WatchAppearance.NUM_HOUR_MARKS];\n for (int i = 0; i < WatchAppearance.NUM_HOUR_MARKS; i++) arrayLong[i] = WatchAppearance.DEFAULT_HOUR_MARK; //0;\n needGC = true;\n\n } else if (name.equalsIgnoreCase(ACommon.CFG_HOUR_MARKS_RELIEF)) {\n arrayIndex = 0;\n arrayLong = new long[WatchAppearance.NUM_HOUR_MARKS];\n for (int i = 0; i < WatchAppearance.NUM_HOUR_MARKS; i++) arrayLong[i] = WatchAppearance.DEFAULT_HOUR_MARK_RELIEF;\n needGC = true;\n\n } else if (name.equalsIgnoreCase(LONG_ITEM)) {\n String value = mXmlPullParser.nextText();\n arrayIndex = fromXml(arrayLong, value, arrayIndex);\n\n } else if (name.equalsIgnoreCase(Inscription.CFG_INSCR_ANGLE) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXTSIZE) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXTSCALEX) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_RADIUS) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_INCLINE)) {\n arrayIndex = 0;\n arrayFloat = new float[Inscription.NUM_INSCRIPTIONS];\n for(int i=0; i<Inscription.NUM_INSCRIPTIONS; i++) arrayFloat[i] = 0.0f;\n needGC = true;\n\n } else if (name.equalsIgnoreCase(FLOAT_ITEM)) {\n String value = mXmlPullParser.nextText();\n arrayIndex = fromXml(arrayFloat, value, arrayIndex);\n\n } else if (name.equalsIgnoreCase(Inscription.CFG_INSCR_FONTFAMILY) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXT) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_FONTSTYLE)) {\n arrayIndex = 0;\n arrayString = new String[Inscription.NUM_INSCRIPTIONS];\n for(int i=0; i<Inscription.NUM_INSCRIPTIONS; i++) arrayString[i] = \"\";\n needGC = true;\n\n } else if (name.equalsIgnoreCase(STRING_ITEM)) {\n String value = mXmlPullParser.nextText();\n arrayIndex = fromXml(arrayString, value, arrayIndex);\n\n\n } else {\n String value = mXmlPullParser.nextText();\n fromXML(bundle, name, value);\n }\n break;\n\n\n case XmlPullParser.END_TAG:\n\n name = mXmlPullParser.getName();\n\n if (name.equalsIgnoreCase(mRootTag)) {\n done = true;\n\n } else if (name.equalsIgnoreCase(LAYOUTS_PALETTE)) {\n// bundle.putStringArrayList(LAYOUTS_PALETTE, layoutsPalette);\n result = layoutsPalette;\n needGC = true;\n\n } else if (name.equalsIgnoreCase(LAYOUT)) {\n// String base64 = ACommon.serializeBundle(bundle);\n// layoutsPalette.add(base64);\n// bundle = bundleStack.pop();\n layoutsPalette.add(layoutElement);\n needGC = true;\n\n } else if (name.equalsIgnoreCase(WATCH_APPEARANCE)) {\n// Bundle poped = bundleStack.pop();\n// poped.putBundle(WATCH_APPEARANCE, bundle);\n// bundle = poped;\n layoutElement.config = bundle;\n bundle = null;\n\n } else if (name.equalsIgnoreCase(INSCRIPTION_BUNDLE)) {\n Bundle popped = bundleStack.pop();\n popped.putBundle(INSCRIPTION_BUNDLE, bundle);\n bundle = popped;\n\n\n } else if (name.equalsIgnoreCase(Inscription.CFG_INSCR_DIRECTION) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_BEND) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_BURNIN) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_ENABLED) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXTCOLOR) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_FX)) {\n bundle.putLongArray(name, arrayLong);\n\n } else if (name.equalsIgnoreCase(ACommon.CFG_HOUR_MARKS)) {\n bundle.putLongArray(name, arrayLong);\n\n } else if (name.equalsIgnoreCase(ACommon.CFG_HOUR_MARKS_RELIEF)) {\n bundle.putLongArray(name, arrayLong);\n\n } else if (name.equalsIgnoreCase(Inscription.CFG_INSCR_ANGLE) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXTSIZE) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXTSCALEX) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_RADIUS) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_INCLINE)) {\n bundle.putFloatArray(name, arrayFloat);\n\n } else if (name.equalsIgnoreCase(Inscription.CFG_INSCR_FONTFAMILY) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_TEXT) ||\n name.equalsIgnoreCase(Inscription.CFG_INSCR_FONTSTYLE)) {\n bundle.putStringArray(name, arrayString);\n\n\n }\n break;\n\n } // switch\n eventType = mXmlPullParser.next();\n } // while\n\n } catch (Exception e) {\n e.printStackTrace();\n result = null;\n } finally {\n System.gc();\n }\n\n// Log.i(TAG, \"((( xmlFileToLayoutsPalette STOP, file=\" + fileName +\n// \", elements count=\" + ((null==result) ? 0 : result.size()) + \", concatenate=\" + concatenate);\n return result;\n }", "org.apache.xmlbeans.XmlString xgetContent();", "public void setFilaDatosExportarXmlPagosAutorizados(PagosAutorizados pagosautorizados,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(PagosAutorizadosConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(pagosautorizados.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(PagosAutorizadosConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(pagosautorizados.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(PagosAutorizadosConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(pagosautorizados.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementfecha_corte = document.createElement(PagosAutorizadosConstantesFunciones.FECHACORTE0);\r\n\t\telementfecha_corte.appendChild(document.createTextNode(pagosautorizados.getfecha_corte().toString().trim()));\r\n\t\telement.appendChild(elementfecha_corte);\r\n\r\n\t\tElement elementnombre_cliente = document.createElement(PagosAutorizadosConstantesFunciones.NOMBRECLIENTE);\r\n\t\telementnombre_cliente.appendChild(document.createTextNode(pagosautorizados.getnombre_cliente().trim()));\r\n\t\telement.appendChild(elementnombre_cliente);\r\n\r\n\t\tElement elementnumero_factura = document.createElement(PagosAutorizadosConstantesFunciones.NUMEROFACTURA);\r\n\t\telementnumero_factura.appendChild(document.createTextNode(pagosautorizados.getnumero_factura().trim()));\r\n\t\telement.appendChild(elementnumero_factura);\r\n\r\n\t\tElement elementfecha_emision = document.createElement(PagosAutorizadosConstantesFunciones.FECHAEMISION);\r\n\t\telementfecha_emision.appendChild(document.createTextNode(pagosautorizados.getfecha_emision().toString().trim()));\r\n\t\telement.appendChild(elementfecha_emision);\r\n\r\n\t\tElement elementfecha_vencimiento = document.createElement(PagosAutorizadosConstantesFunciones.FECHAVENCIMIENTO);\r\n\t\telementfecha_vencimiento.appendChild(document.createTextNode(pagosautorizados.getfecha_vencimiento().toString().trim()));\r\n\t\telement.appendChild(elementfecha_vencimiento);\r\n\r\n\t\tElement elementnombre_banco = document.createElement(PagosAutorizadosConstantesFunciones.NOMBREBANCO);\r\n\t\telementnombre_banco.appendChild(document.createTextNode(pagosautorizados.getnombre_banco().trim()));\r\n\t\telement.appendChild(elementnombre_banco);\r\n\r\n\t\tElement elementvalor_por_pagar = document.createElement(PagosAutorizadosConstantesFunciones.VALORPORPAGAR);\r\n\t\telementvalor_por_pagar.appendChild(document.createTextNode(pagosautorizados.getvalor_por_pagar().toString().trim()));\r\n\t\telement.appendChild(elementvalor_por_pagar);\r\n\r\n\t\tElement elementvalor_cancelado = document.createElement(PagosAutorizadosConstantesFunciones.VALORCANCELADO);\r\n\t\telementvalor_cancelado.appendChild(document.createTextNode(pagosautorizados.getvalor_cancelado().toString().trim()));\r\n\t\telement.appendChild(elementvalor_cancelado);\r\n\r\n\t\tElement elementnumero_cuenta = document.createElement(PagosAutorizadosConstantesFunciones.NUMEROCUENTA);\r\n\t\telementnumero_cuenta.appendChild(document.createTextNode(pagosautorizados.getnumero_cuenta().trim()));\r\n\t\telement.appendChild(elementnumero_cuenta);\r\n\r\n\t\tElement elementesta_autorizado = document.createElement(PagosAutorizadosConstantesFunciones.ESTAAUTORIZADO);\r\n\t\telementesta_autorizado.appendChild(document.createTextNode(pagosautorizados.getesta_autorizado().toString().trim()));\r\n\t\telement.appendChild(elementesta_autorizado);\r\n\r\n\t\tElement elementdescripcion = document.createElement(PagosAutorizadosConstantesFunciones.DESCRIPCION);\r\n\t\telementdescripcion.appendChild(document.createTextNode(pagosautorizados.getdescripcion().trim()));\r\n\t\telement.appendChild(elementdescripcion);\r\n\r\n\t\tElement elementfecha_corte_dato = document.createElement(PagosAutorizadosConstantesFunciones.FECHACORTE);\r\n\t\telementfecha_corte_dato.appendChild(document.createTextNode(pagosautorizados.getfecha_corte_dato().toString().trim()));\r\n\t\telement.appendChild(elementfecha_corte_dato);\r\n\r\n\t\tElement elementestado = document.createElement(PagosAutorizadosConstantesFunciones.ESTADO);\r\n\t\telementestado.appendChild(document.createTextNode(pagosautorizados.getestado().trim()));\r\n\t\telement.appendChild(elementestado);\r\n\r\n\t\tElement elementcodigo_cuenta_con_cliente = document.createElement(PagosAutorizadosConstantesFunciones.CODIGOCUENTACONCLIENTE);\r\n\t\telementcodigo_cuenta_con_cliente.appendChild(document.createTextNode(pagosautorizados.getcodigo_cuenta_con_cliente().trim()));\r\n\t\telement.appendChild(elementcodigo_cuenta_con_cliente);\r\n\r\n\t\tElement elementcodigo_cuenta_con_banco = document.createElement(PagosAutorizadosConstantesFunciones.CODIGOCUENTACONBANCO);\r\n\t\telementcodigo_cuenta_con_banco.appendChild(document.createTextNode(pagosautorizados.getcodigo_cuenta_con_banco().trim()));\r\n\t\telement.appendChild(elementcodigo_cuenta_con_banco);\r\n\t}", "@Test\n public void testFromXml() throws Exception\n {\n Element root = XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"kml\",\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"Folder\",\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"description\", XmlBuilder.text(\"folder description\"))),\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"Document\",\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"description\", XmlBuilder.text(\"document description\"))))\n .toDOM().getDocumentElement();\n\n KmlFile file = KmlFile.fromXml(root.getOwnerDocument());\n\n List<Feature<?>> features = file.getFeatures();\n\n assertEquals(\"number of features\", 2, features.size());\n assertEquals(\"first feature type\", Folder.class, features.get(0).getClass());\n assertEquals(\"first feature attribute\", \"folder description\", features.get(0).getDescription());\n assertEquals(\"second feature type\", Document.class, features.get(1).getClass());\n assertEquals(\"second feature attribute\", \"document description\", features.get(1).getDescription());\n }", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og) {\r\n\t\tSystem.out.println(\"ParserXmlJson.extractBoundingBoxFromWfsXml: \"+ xml_og);\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon.equals(args)){\r\n\t\t\t \treturn LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t \tString pathToObjectid = \"//geofence_sbg:objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO objectid: \"+nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t \t//find Loading value\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\t//replace original value with new value\r\n\t\t\t\t\tif(messwert.equals(LoadOnStartAppConfiguration.value_from)){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(LoadOnStartAppConfiguration.value_to);;\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public String modifyIoXml(String xml_og){\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\tString path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\tNodeList nodes = (NodeList)xPath.compile(path_loading).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString messwert = \"\";\r\n\t\t\t\tfor(int n = 0; n<nodes.getLength(); n++){\r\n\t\t\t\t\tmesswert = nodes.item(n).getTextContent();\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading OG: \"+messwert);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(messwert.equals(\"1\")){\r\n\t\t\t\t\t\tnodes.item(n).setTextContent(\"2222\");;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.parseInsertObservation:parser Loading EDITED:\"+nodes.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\txml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn xml_final;\r\n\t}", "public static void subirXMLFTP(String cotizacionId,String xml) {\n\t\tDocumentBuilderFactory factory;\r\n\t DocumentBuilder builder;\r\n\t Document doc;\r\n\t TransformerFactory tFactory;\r\n\t Transformer transformer;\r\n\t \r\n\t String nombreArchivo = cotizacionId+\".xml\";\r\n\t\ttry {\r\n\t\t\tfactory \t\t\t= DocumentBuilderFactory.newInstance();\r\n\t\t\tbuilder \t\t\t= factory.newDocumentBuilder();\r\n\t\t\tdoc \t\t\t\t= builder.parse(new InputSource(new StringReader(xml)));\r\n\t\t\t// Usamos un transformador para la salida del archivo xml generado\r\n\t\t\ttFactory \t\t\t= TransformerFactory.newInstance();\r\n\t\t transformer \t\t= tFactory.newTransformer();\r\n\t\t DOMSource source \t= new DOMSource(doc);\t\t \r\n\t\t StreamResult result = new StreamResult(new File(\"/home/insis/\"+nombreArchivo));\r\n\t\t transformer.transform(source, result);\r\n\t\t \r\n\t\t \r\n\t\t} catch (SAXException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerException e) {\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n}", "static void writeGPXFile(Trail trail, Context context) {\r\n if(gpxParser == null)\r\n buildParser();\r\n\r\n GPX gpx = parseTrailtoGPX(trail);\r\n\r\n System.out.println(\"~~~~~~~~~~~~~~~\"+trail.getMetadata().getName());\r\n\r\n //create a new file with the given name\r\n File file = new File(context.getExternalFilesDir(null), trail.getMetadata().getName()+\".gpx\");\r\n FileOutputStream out;\r\n try {\r\n out = new FileOutputStream(file);\r\n gpxParser.writeGPX(gpx, out);\r\n } catch(FileNotFoundException e) {\r\n AlertUtils.showAlert(context,\"File not found\",\"Please notify the developers.\");\r\n } catch (TransformerException e) {\r\n AlertUtils.showAlert(context,\"Transformer Exception\",\"Please notify the developers.\");\r\n } catch (ParserConfigurationException e) {\r\n AlertUtils.showAlert(context,\"Parser Exception\",\"Please notify the developers.\");\r\n }\r\n }", "@Override\n public void toXml(XmlContext xc) {\n\n }", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "public void xmlExporter(String path, short side, String extention) throws IOException {\r\n\t\tOutputStream fout = null;\r\n\t\tOutputStream bout = null;\r\n\t\tOutputStreamWriter output = null;\r\n\r\n\t\tString newPath = checkPath(path, extention);\r\n\r\n\t\ttry {\r\n\t\t\t// ovisno o odabranoj strani stvara se datoteka i poziva metoda koja\r\n\t\t\t// vrsi ispis\r\n\t\t\tif (side == (short) 1) {\r\n\t\t\t\tfout = new FileOutputStream(newPath);\r\n\t\t\t\tbout = new BufferedOutputStream(fout);\r\n\t\t\t\toutput = new OutputStreamWriter(bout, \"UTF-8\");\r\n\r\n\t\t\t\t// FileOutputStream output = new FileOutputStream(\"left.xml\");\r\n\t\t\t\tthis.writeToFile(output, idList1);\r\n\t\t\t\toutput.close();\r\n\t\t\t} else {\r\n\t\t\t\tfout = new FileOutputStream(newPath);\r\n\t\t\t\tbout = new BufferedOutputStream(fout);\r\n\t\t\t\toutput = new OutputStreamWriter(bout, \"UTF-8\");\r\n\r\n\t\t\t\t// output = new FileOutputStream(\"right.xml\");\r\n\t\t\t\tthis.writeToFile(output, idList2);\r\n\t\t\t\toutput.close();\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new FileNotFoundException(\r\n\t\t\t\t\t\"File could not be found!\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Verify that the file exists in the specified location.\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Check the spelling of the name of the document.\\r\\n\\r\\n\"\r\n\t\t\t\t\t\t\t+ path);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IOException(\"I/O exception has occurred.\");\r\n\t\t}\r\n\r\n\t}", "public void testImportXML() throws RepositoryException, IOException{\n String path = \"path\";\n InputStream stream = new ByteArrayInputStream(new byte[0]);\n session.importXML(path, stream, 0);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.importXML(path, stream, 0);\n }", "public void testImportXMLFailure() throws ParserConfigurationException, IOException {\n testInvalidXML(INVALID_XML_TEST_GPX);\n }", "public boolean processXml() throws Exception {\n\t\ttry {\n\t\t\tFile f = new File(fileOutboundLocation);\n\t\t\tString filesList[] = f.list();\n\t\n\t\t\tif (filesList != null) {\n\t\t\t\tfor (int i = 0; i < filesList.length; i++) {\n\t\t\t\t\tfileName = filesList[i];\n\t\t\t\t\tAppLogger.info(\"XmlProcessor.processXml()... file Name=\"+ filesList[i]);\n\t\t\t\t\tcopyFile(filesList[i], fileOutboundLocation, fileBackupLocation);\n\t\t\t\t\tSchemaValidator sv = new SchemaValidator();\n\t\t\t\t\tsv.validateXml(fileOutboundLocation+File.separator+filesList[i], xsdFileLocation, fileErrorLocation);\n\t\t\t\t\tString xmlString = fileRead(fileOutboundLocation + File.separator+ filesList[i]);\n\n\t\t\t\t\tconvertXmlToJavaObject(xmlString);\n\t\t\t\t\tpolicyNo = tXLifeType.getTXLifeRequest().getOLifE().getHolding().getPolicy().getPolNumber(); //RL_009109 - Changed by Kayal\n\t\t\t\t\tint indexOfUnderScore = fileName.indexOf(\"_\");\n\t\t\t\t\tString backupFileName = fileName.substring(0,indexOfUnderScore+1).concat(policyNo+\"_\").concat(fileName.substring(indexOfUnderScore+1));\n\t\t\t\t\t\n\t\t\t\t\trenameFile(fileName, fileBackupLocation, backupFileName, fileBackupLocation); //RL_009109 - Changed by Kayal\n\t\t\t\t\t\n\t\t\t\t\tsaveDetails();\n\t\t\t\t\tdeleteFile(filesList[i], fileOutboundLocation);\n\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tStringWriter sw = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t\te.printStackTrace(pw);\n\t\t\tAppLogger.error(\"Error Occurred: Exception is=\"+sw.toString());\n\t\t\tcopyFile(fileName, fileOutboundLocation, fileErrorLocation);\n\t\t\tdeleteFile(fileName, fileOutboundLocation);\n\t\t\tApcDAO dao = new ApcDAO();\n\t\t\tdao.saveErrorMsg(fileName, sw.toString(), policyNo); //RL_009109\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean load_pepXML(Connection conn, Appendable out, UIAlerter alerter, Component comp) throws IOException {\n boolean status = false;\n Statement stmt = null;\n PreparedStatement prep = null;\n try {\n String err = \"Loading pepXML files\\n\";\n if (out != null) {\n out.append(err);\n }\n\n stmt = conn.createStatement();\n String query;\n\n stmt.executeUpdate(\"DROP TABLE IF EXISTS pepXML\");\n\n query = \"CREATE CACHED TABLE pepXML (\"\n + \" srcFile VARCHAR(250),\"\n + \" specId VARCHAR(250),\"\n + \" charge TINYINT,\"\n + \" peptide VARCHAR(250),\"\n + \" modPeptide VARCHAR(250),\"\n + \" iniProb DECIMAL(8,6)\"\n + \")\";\n\n stmt.executeUpdate(query);\n\n query = \"INSERT INTO pepXML VALUES (\"\n + \"?, \" //srcFile\n + \"?, \" //specId\n + \"?, \" //charge\n + \"?, \" //peptide\n + \"?, \" //modPeptide\n + \"? \" //iniProb\n + \")\";\n prep = conn.prepareStatement(query);\n\n // At this juncture, the database should have been created.\n // We will now iterate through the pepXML files loading the relevant content\n for (int i = 0; i < Globals.pepXmlFiles.size(); i++) {\n Globals.proceedWithQuery = false;\n status = XMLUtils.parseXMLDocument(Globals.srcDir, Globals.pepXmlFiles.get(i), \"pepXML\", prep, i, out);\n if (status) {\n return status; // a return of 'true' means something went wrong\n }\n if (Globals.proceedWithQuery) { // if queryCtr > 0 then you got at least 1 row to insert into the DB\n conn.setAutoCommit(false);\n prep.executeBatch();\n conn.setAutoCommit(true);\n prep.clearBatch();\n }\n }\n prep.clearBatch();\n } catch (SQLException | IOException e) {\n if (out != null) {\n out.append(\"There was an error parsing your pepXML files\\n\\n\");\n status = true;\n }\n if (alerter != null) {\n alerter.alert(comp);\n }\n e.printStackTrace();\n } finally {\n try {\n if (stmt != null) {\n stmt.close();\n }\n if (prep != null) {\n prep.close();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n if (out != null) {\n out.append(\"\\n\");\n }\n return status;\n }", "@Override\n\tpublic Propisi unmarshall(File f) throws JAXBException {\n\n\t\tJAXBContext context = JAXBContext.newInstance(Propisi.class);\n\n\t\t// Unmarshaller je objekat zadu�en za konverziju iz XML-a u objektni\n\t\t// model\n\t\tUnmarshaller unmarshaller = context.createUnmarshaller();\n\n\t\t// Unmarshalling generi�e objektni model na osnovu XML fajla\n\t\treturn (Propisi) unmarshaller.unmarshal(f);\n\t}", "public void unMarshall(File xmlDocument) {\n\t\ttry {\n\n\t\t\tJAXBContext jaxbContext = JAXBContext.newInstance(\"peoplestore.generated\");\n\n\t\t\tUnmarshaller unMarshaller = jaxbContext.createUnmarshaller();\n\t\t\tSchemaFactory schemaFactory = SchemaFactory\n\t\t\t\t\t.newInstance(\"http://www.w3.org/2001/XMLSchema\");\n\t\t\tSchema schema = schemaFactory.newSchema(new File(\n\t\t\t\t\t\"people.xsd\"));\n\t\t\tunMarshaller.setSchema(schema);\n\t\t\tCustomValidationEventHandler validationEventHandler = new CustomValidationEventHandler();\n\t\t\tunMarshaller.setEventHandler(validationEventHandler);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tJAXBElement<PeopleType> peopleElement = (JAXBElement<PeopleType>) unMarshaller\n\t\t\t\t\t.unmarshal(xmlDocument);\n\n\t\t\tPeopleType people = peopleElement.getValue();\n\n\t\t\tList<PersonType> personList = people.getPerson();\n\t\t\tfor (int i = 0; i < personList.size(); i++) {\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * Inside the for loop are printed\n\t\t\t\t * all the values of the person, calling \n\t\t\t\t * the accessor method get.\n\t\t\t\t * \n\t\t\t\t * Example:\n\t\t\t\t * \t\t\tperson.getFirstname()\n\t\t\t\t * \t\t\tget the firstname of the person at index i\n\t\t\t\t */\n\t\t\t\tPersonType person = (PersonType) personList.get(i);\n\t\t\t\tSystem.out.println(\"Id: \"+ person.getId());\n\t\t\t\tSystem.out.println(\"Firstname: \"+ person.getFirstname());\n\t\t\t\tSystem.out.println(\"Lastname: \"+ person.getLastname());\n\t\t\t\tSystem.out.println(\"Birthday: \"+ person.getBirthdate());\n\t\t\t\tHealthDataType hp = person.getHealthprofile();\n\t\t\t\tSystem.out.println(\" HealthProfile: \");\n\t\t\t\tSystem.out.println(\" Lastupdate: \"+ hp.getLastupdate());\n\t\t\t\tSystem.out.println(\" Weight: \"+ hp.getWeight());\n\t\t\t\tSystem.out.println(\" Height: \" + hp.getHeight());\n\t\t\t\tSystem.out.println(\" BMI: \" + hp.getBmi());\n\t\t\t\tSystem.out.println(\"=======================\");\n\n\t\t\t}\n\t\t} catch (JAXBException e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t} catch (SAXException e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}", "private void loadData(String fileName, String cobrandPath)\n throws ParserConfigurationException, SAXException, IOException {\n\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(cobrandPath);\n\n Element root = doc.getDocumentElement();\n\n Element updateElement = doc.createElement(IConstants.IMAGE_FILE);\n Node updateText = doc.createTextNode(fileName);\n\n updateElement.appendChild(updateText);\n root.appendChild(updateElement);\n\n try {\n\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(new FileOutputStream(\n cobrandPath));\n\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer transformer = transFactory.newTransformer();\n\n transformer.transform(source, result);\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private FatturaElettronicaType unmarshalFattura(EmbeddedXMLType fatturaXml) {\n\t\tfinal String methodName = \"unmarshalFattura\";\n\t\tbyte[] xmlBytes = extractContent(fatturaXml);\n\t\tInputStream is = new ByteArrayInputStream(xmlBytes);\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance(FatturaElettronicaType.class);\n\t\t\tUnmarshaller u = jc.createUnmarshaller();\n\t\t\tFatturaElettronicaType fattura = (FatturaElettronicaType) u.unmarshal(is);\n\t\t\tlog.logXmlTypeObject(fattura, \"Fattura elettronica\");\n\t\t\treturn fattura;\n\t\t} catch(JAXBException jaxbe) {\n\t\t\tlog.error(methodName, \"Errore di unmarshalling della fattura\", jaxbe);\n\t\t\tthrow new BusinessException(ErroreCore.ERRORE_DI_SISTEMA.getErrore(\"Errore di unmarshalling della fattura elettronica\" + (jaxbe != null ? \" (\" + jaxbe.getMessage() + \")\" : \"\")));\n\t\t}\n\t}", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "public void convertAll() {\n Document dom = null;\n long beginTime = System.currentTimeMillis();\n try {\n log.info(\" ############################### begin import ######################\");\n dom = XMLParser.parseXMLToDOM(context.getResourceAsStream(IMPORT_FILE));\n // XMLParser.DTDValidator(dom);\n Element element = (Element) dom.getElementsByTagName(\"import\").item(0);\n String encoding = element.getAttribute(\"encoding\");\n DataAccessor.encoding = encoding;\n\n NodeList list = element.getChildNodes();\n\n List<Data> clondSources = new ArrayList<Data>();\n for (int i = 0; i < list.getLength(); i++) {\n // datatype node\n Node itemDatatype = list.item(i);\n List<Data> sources = processDatatype(itemDatatype);\n clondSources.addAll(sources);\n }\n NodeService.insertMigrationMappings(clondSources);\n createRelationDataType(clondSources);\n linkRoot(list);\n log.info(String.format(\n \" ---->#######################finished importing [time:%s mins] #############################\",\n (System.currentTimeMillis() - beginTime) / (1000 * 60)));\n NodeService.insertProperties(properties);\n }\n catch (Exception e) {\n log.error(e.getMessage());\n e.printStackTrace();\n }\n }", "XMLOut(String LegendFile, String start)\n\t\t{\n\t\t\tFileOutputStream fileStream = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfileStream = new FileOutputStream(LegendFile);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tDebug.e(\"XMLOut(): \" + e);\n\t\t\t}\n\t\t\tXMLStream = new PrintStream(fileStream);\n\t\t\tstack = new String[top];\n\t\t\tsp = 0;\n\t\t\tpush(start);\n\t\t}", "public void record_XML_files(File dir) {\n\n FilenameFilter filter = null;\n\n // filter to only select pepXML files\n filter = new FilenameFilter() {\n public boolean accept(File dir, String name) {\n return name.endsWith(Globals.pepXMLsuffix);\n }\n };\n String[] pep = dir.list(filter);\n for (String aPep : pep) {\n if (!Globals.pepXmlFiles.contains(aPep)) {\n Globals.pepXmlFiles.add(aPep);\n }\n }\n\n if (!Globals.byPeptide) {\n // filter to only select protXML files\n filter = new FilenameFilter() {\n public boolean accept(File dir, String name) {\n return name.endsWith(Globals.protXMLsuffix);\n }\n };\n String[] prot = dir.list(filter);\n\n for (String aProt : prot) {\n if (!Globals.protXmlFiles.contains(aProt)) {\n Globals.protXmlFiles.add(aProt);\n }\n }\n }\n\n }", "private void exportTreeML()\r\n {\r\n // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Save the file.\r\n// String file = openFileChooser(false, filters);\r\n// \r\n// // Write the file.\r\n// if (file != null)\r\n// {\r\n// String extension = file.substring(file.length() - 4);\r\n// if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n// Writer.writeTreeML(m_gtree, file);\r\n// }\r\n }", "Element toXML();", "protected void growGrapes(){\n try {\n Builder parser = new Builder(); //new parser is created\n Document doc = parser.build(argument); //the parsed tokens are passed to a XOM document (in order to manipulate the elements accordingly)\n Element root = doc.getRootElement(); //the root element of the document is selected\n if(root.getQualifiedName().equals(\"grapes\"))\n listChildren(root); //goes onto the categorizing method\n\n else\n System.err.print(\"The root element of the XML file has to be <grapes>\");\n\n }\n catch (ParsingException ex) {\n System.out.println(argument + \" is not well-formed.\");\n System.out.println(ex.getMessage());\n }\n catch (IOException ex) {\n System.out.println(\n \"Due to an IOException, the parser could not print \"\n + argument\n );\n }\n }", "public void readXMLFile(File file, int dim, int verbose) {\n\n\t\tif(file.exists()) {\n\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\n\t\t\ttry {\n\t\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\t\tDocument document = builder.parse(file);\n\n\t\t\t\tElement racine = document.getDocumentElement();\n\t\t\t\tNodeList racineNoeuds = racine.getChildNodes();\n\t\t\t\tint nbRacineNoeuds = racineNoeuds.getLength();\n\n\t\t\t\t// Number of instances\n\t\t\t\tint numberOfInstances = -1;\n\n\t\t\t\tfor(int i=0; i<nbRacineNoeuds; i++) {\n\t\t\t\t\tif(racineNoeuds.item(i).getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\tElement e = (Element) racineNoeuds.item(i);\n\t\t\t\t\t\tif(verbose > 2) System.out.println(i + \"\\t\" + e + \"\\t\" + e.getTextContent());\n\n\t\t\t\t\t\tif(e.getTagName().compareToIgnoreCase(\"name\") == 0) {\n\t\t\t\t\t\t\t// Read the name of the bag\n\t\t\t\t\t\t\tString name = e.getTextContent();\n\t\t\t\t\t\t\tsetName(name);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(e.getTagName().compareToIgnoreCase(\"numberofinstances\") == 0) {\n\t\t\t\t\t\t\t// Read the number of instances\n\t\t\t\t\t\t\tnumberOfInstances = Integer.parseInt(e.getTextContent());\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(e.getTagName().compareToIgnoreCase(\"feature\") == 0) {\n\t\t\t\t\t\t\t// Read the global feature representation of the bag\n\t\t\t\t\t\t\tint featureDim = Integer.parseInt(e.getAttribute(\"dim\"));\n\t\t\t\t\t\t\tif(dim >= 0 && featureDim != dim) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"ERROR - read dimension feature \" + featureDim + \" vs \" + dim);\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString stringFeature = e.getTextContent();\n\t\t\t\t\t\t\tsetBagFeature(readFeature(stringFeature, featureDim));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(e.getTagName().compareToIgnoreCase(\"instance\") == 0) {\n\t\t\t\t\t\t\t// Read an instance\n\n\t\t\t\t\t\t\tNodeList childNoeuds = e.getChildNodes();\n\t\t\t\t\t\t\tint nbChildNoeuds = childNoeuds.getLength();\n\n\t\t\t\t\t\t\t// Index of instance\n\t\t\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t\t\t// Instance feature\n\t\t\t\t\t\t\tdouble[] feature = null;\n\n\t\t\t\t\t\t\tfor(int j=0; j<nbChildNoeuds; j++) {\n\t\t\t\t\t\t\t\tif(childNoeuds.item(j).getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\t\tElement childElement = (Element) childNoeuds.item(j);\n\n\t\t\t\t\t\t\t\t\tif(verbose > 2) System.out.println(j + \"\\t\" + childElement);\n\n\t\t\t\t\t\t\t\t\tif(childElement.getTagName().compareToIgnoreCase(\"index\") == 0) {\n\t\t\t\t\t\t\t\t\t\t// Read index of instance\n\t\t\t\t\t\t\t\t\t\tindex = Integer.parseInt(childElement.getTextContent());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(childElement.getTagName().compareToIgnoreCase(\"feature\") == 0) {\n\t\t\t\t\t\t\t\t\t\t// Read instance feature\n\t\t\t\t\t\t\t\t\t\tint featureDim = Integer.parseInt(childElement.getAttribute(\"dim\"));\n\t\t\t\t\t\t\t\t\t\tif(dim >= 0 && featureDim != dim) {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"ERROR - read dimension feature \" + featureDim + \" vs \" + dim);\n\t\t\t\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tString stringFeature = childElement.getTextContent();\n\t\t\t\t\t\t\t\t\t\tfeature = readFeature(stringFeature, featureDim);\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\n\t\t\t\t\t\t\tif(index != -1) {\n\t\t\t\t\t\t\t\taddInstance(index, feature);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\taddInstance(feature);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif(numberOfInstances != -1 && numberOfInstances != numberOfInstances()) {\n\t\t\t\t\tSystem.out.println(\"Error in readXMLFile - number of instances incorrect \" + numberOfInstances + \" != \" + numberOfInstances());\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (final ParserConfigurationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcatch (final SAXException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcatch (final IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"\\nError file \" + file.getAbsolutePath() + \" does not exist\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "@GET\n @Produces(MediaType.APPLICATION_XML)\n \n public String getXml() {\n \n return \"<gps_data>\"\n + \"<gps_id>1</gps_id>\"\n + \"<gps_coord>107,-40</gps_coord>\"\n + \"<gps_time>12:00</gps_time>\"\n + \"</gps_data>\";\n }", "public void endSvgFile(){\n\t\toutput += \"</g>\\n\" + \n\t\t\t\t\t\"</g>\\n\" +\n\t\t\t\t\t\"</svg>\\n\";\n\t}", "public void importElement(XmlPullParser xpp, Epml epml) {\n\t\tlineNumber = xpp.getLineNumber();\n\t\t/*\n\t\t * Import all attributes of this element.\n\t\t */\n\t\timportAttributes(xpp, epml);\n\t\t/*\n\t\t * Create afresh stack to keep track of start tags to match.\n\t\t */\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\t/*\n\t\t * Add the current tag to this stack, as we still have to find the\n\t\t * matching end tag.\n\t\t */\n\t\tstack.add(tag);\n\t\t/*\n\t\t * As long as the stack is not empty, we're still working on this\n\t\t * object.\n\t\t */\n\t\twhile (!stack.isEmpty()) {\n\t\t\ttry {\n\t\t\t\t/*\n\t\t\t\t * Get next event.\n\t\t\t\t */\n\t\t\t\tint eventType = xpp.next();\n\t\t\t\tif (eventType == XmlPullParser.END_DOCUMENT) {\n\t\t\t\t\t/*\n\t\t\t\t\t * End of document. Should not happen.\n\t\t\t\t\t */\n\t\t\t\t\tepml.log(tag, xpp.getLineNumber(), \"Found end of document\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (eventType == XmlPullParser.START_TAG) {\n\t\t\t\t\t//System.out.println(xpp.getLineNumber() + \" <\" + xpp.getName() + \">\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Start tag. Push it on the stack.\n\t\t\t\t\t */\n\t\t\t\t\tstack.add(xpp.getName());\n\t\t\t\t\t/*\n\t\t\t\t\t * If this tag is the second on the stack, then it is a\n\t\t\t\t\t * direct child.\n\t\t\t\t\t */\n\t\t\t\t\tif (stack.size() == 2) {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * For a direct child, check whether the tag is known.\n\t\t\t\t\t\t * If so, take proper action. Note that this needs not\n\t\t\t\t\t\t * to be done for other offspring.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (importElements(xpp, epml)) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Known start tag. The end tag has been matched and\n\t\t\t\t\t\t\t * can be popped from the stack.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tstack.remove(stack.size() - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ((eventType == XmlPullParser.END_TAG)) {\n\t\t\t\t\t//System.out.println(xpp.getLineNumber() + \" </\" + xpp.getName() + \">\");\n\t\t\t\t\t/*\n\t\t\t\t\t * End tag. Should be identical to top of the stack.\n\t\t\t\t\t */\n\t\t\t\t\tif (xpp.getName().equals(stack.get(stack.size() - 1))) {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Yes it is. Pop the stack.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tstack.remove(stack.size() - 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * No it is not. XML violation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tepml.log(tag, xpp.getLineNumber(), \"Found \" + xpp.getName() + \", expected \"\n\t\t\t\t\t\t\t\t+ stack.get(stack.size() - 1));\n\t\t\t\t\t}\n\t\t\t\t} else if (eventType == XmlPullParser.TEXT) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Plain text. Import it.\n\t\t\t\t\t */\n\t\t\t\t\timportText(xpp.getText(), epml);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tepml.log(tag, xpp.getLineNumber(), ex.getMessage());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * The element has been imported. Now is a good time to check its\n\t\t * validity.\n\t\t */\n\t\tcheckValidity(epml);\n\t}", "private void salvarXML(){\r\n\t\tarquivo.setLista(listaDeUsuarios);\r\n\t\tarquivo.finalizarXML();\r\n\t}", "public void readXML() {\n\t try {\n\n\t \t//getting xml file\n\t \t\tFile fXmlFile = new File(\"cards.xml\");\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t \n\t\t\t//doc.getDocumentElement().normalize(); ???\n\t\t \n\t\t \t//inserting card IDs and Effects into arrays\n\t\t\tNodeList nList = doc.getElementsByTagName(\"card\");\n\t\t\tfor (int i = 0; i < nList.getLength(); i++) {\n\t\t\t\tNode nNode = nList.item(i);\n\t\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement eElement = (Element) nNode;\n\t\t\t\t\tint id = Integer.parseInt(eElement.getAttribute(\"id\"));\n\t\t\t\t\tString effect = eElement.getElementsByTagName(\"effect\").item(0).getTextContent();\n\t\t\t\t\tidarr.add(id);\n\t\t\t\t\teffsarr.add(effect);\n\t\t\t\t}\n\t\t\t}\n\t } catch (Exception e) {\n\t\t\te.printStackTrace();\n\t }\n }", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "public void saveAsXML(String fname) {\n\tXMLUtil.writeXML(saveAsXML(), fname);\n }", "public void setFilaDatosExportarXmlFacturaPuntoVenta(FacturaPuntoVenta facturapuntoventa,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(FacturaPuntoVentaConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(facturapuntoventa.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(FacturaPuntoVentaConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(facturapuntoventa.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(facturapuntoventa.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementsucursal_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDSUCURSAL);\r\n\t\telementsucursal_descripcion.appendChild(document.createTextNode(facturapuntoventa.getsucursal_descripcion()));\r\n\t\telement.appendChild(elementsucursal_descripcion);\r\n\r\n\t\tElement elementusuario_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDUSUARIO);\r\n\t\telementusuario_descripcion.appendChild(document.createTextNode(facturapuntoventa.getusuario_descripcion()));\r\n\t\telement.appendChild(elementusuario_descripcion);\r\n\r\n\t\tElement elementvendedor_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDVENDEDOR);\r\n\t\telementvendedor_descripcion.appendChild(document.createTextNode(facturapuntoventa.getvendedor_descripcion()));\r\n\t\telement.appendChild(elementvendedor_descripcion);\r\n\r\n\t\tElement elementcliente_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDCLIENTE);\r\n\t\telementcliente_descripcion.appendChild(document.createTextNode(facturapuntoventa.getcliente_descripcion()));\r\n\t\telement.appendChild(elementcliente_descripcion);\r\n\r\n\t\tElement elementcaja_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDCAJA);\r\n\t\telementcaja_descripcion.appendChild(document.createTextNode(facturapuntoventa.getcaja_descripcion()));\r\n\t\telement.appendChild(elementcaja_descripcion);\r\n\r\n\t\tElement elementtipoprecio_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDTIPOPRECIO);\r\n\t\telementtipoprecio_descripcion.appendChild(document.createTextNode(facturapuntoventa.gettipoprecio_descripcion()));\r\n\t\telement.appendChild(elementtipoprecio_descripcion);\r\n\r\n\t\tElement elementmesa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDMESA);\r\n\t\telementmesa_descripcion.appendChild(document.createTextNode(facturapuntoventa.getmesa_descripcion()));\r\n\t\telement.appendChild(elementmesa_descripcion);\r\n\r\n\t\tElement elementformato_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDFORMATO);\r\n\t\telementformato_descripcion.appendChild(document.createTextNode(facturapuntoventa.getformato_descripcion()));\r\n\t\telement.appendChild(elementformato_descripcion);\r\n\r\n\t\tElement elementtipofacturapuntoventa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDTIPOFACTURAPUNTOVENTA);\r\n\t\telementtipofacturapuntoventa_descripcion.appendChild(document.createTextNode(facturapuntoventa.gettipofacturapuntoventa_descripcion()));\r\n\t\telement.appendChild(elementtipofacturapuntoventa_descripcion);\r\n\r\n\t\tElement elementestadofacturapuntoventa_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDESTADOFACTURAPUNTOVENTA);\r\n\t\telementestadofacturapuntoventa_descripcion.appendChild(document.createTextNode(facturapuntoventa.getestadofacturapuntoventa_descripcion()));\r\n\t\telement.appendChild(elementestadofacturapuntoventa_descripcion);\r\n\r\n\t\tElement elementasientocontable_descripcion = document.createElement(FacturaPuntoVentaConstantesFunciones.IDASIENTOCONTABLE);\r\n\t\telementasientocontable_descripcion.appendChild(document.createTextNode(facturapuntoventa.getasientocontable_descripcion()));\r\n\t\telement.appendChild(elementasientocontable_descripcion);\r\n\r\n\t\tElement elementnumero_secuencial = document.createElement(FacturaPuntoVentaConstantesFunciones.NUMEROSECUENCIAL);\r\n\t\telementnumero_secuencial.appendChild(document.createTextNode(facturapuntoventa.getnumero_secuencial().trim()));\r\n\t\telement.appendChild(elementnumero_secuencial);\r\n\r\n\t\tElement elementcodigo_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.CODIGOCLIENTE);\r\n\t\telementcodigo_cliente.appendChild(document.createTextNode(facturapuntoventa.getcodigo_cliente().trim()));\r\n\t\telement.appendChild(elementcodigo_cliente);\r\n\r\n\t\tElement elementnombre_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.NOMBRECLIENTE);\r\n\t\telementnombre_cliente.appendChild(document.createTextNode(facturapuntoventa.getnombre_cliente().trim()));\r\n\t\telement.appendChild(elementnombre_cliente);\r\n\r\n\t\tElement elementtarjeta_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.TARJETACLIENTE);\r\n\t\telementtarjeta_cliente.appendChild(document.createTextNode(facturapuntoventa.gettarjeta_cliente().trim()));\r\n\t\telement.appendChild(elementtarjeta_cliente);\r\n\r\n\t\tElement elementdireccion_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.DIRECCIONCLIENTE);\r\n\t\telementdireccion_cliente.appendChild(document.createTextNode(facturapuntoventa.getdireccion_cliente().trim()));\r\n\t\telement.appendChild(elementdireccion_cliente);\r\n\r\n\t\tElement elementtelefono_cliente = document.createElement(FacturaPuntoVentaConstantesFunciones.TELEFONOCLIENTE);\r\n\t\telementtelefono_cliente.appendChild(document.createTextNode(facturapuntoventa.gettelefono_cliente().trim()));\r\n\t\telement.appendChild(elementtelefono_cliente);\r\n\r\n\t\tElement elementfecha = document.createElement(FacturaPuntoVentaConstantesFunciones.FECHA);\r\n\t\telementfecha.appendChild(document.createTextNode(facturapuntoventa.getfecha().toString().trim()));\r\n\t\telement.appendChild(elementfecha);\r\n\r\n\t\tElement elementhora = document.createElement(FacturaPuntoVentaConstantesFunciones.HORA);\r\n\t\telementhora.appendChild(document.createTextNode(facturapuntoventa.gethora().toString().trim()));\r\n\t\telement.appendChild(elementhora);\r\n\r\n\t\tElement elementtotal_iva = document.createElement(FacturaPuntoVentaConstantesFunciones.TOTALIVA);\r\n\t\telementtotal_iva.appendChild(document.createTextNode(facturapuntoventa.gettotal_iva().toString().trim()));\r\n\t\telement.appendChild(elementtotal_iva);\r\n\r\n\t\tElement elementtotal_sin_iva = document.createElement(FacturaPuntoVentaConstantesFunciones.TOTALSINIVA);\r\n\t\telementtotal_sin_iva.appendChild(document.createTextNode(facturapuntoventa.gettotal_sin_iva().toString().trim()));\r\n\t\telement.appendChild(elementtotal_sin_iva);\r\n\r\n\t\tElement elementiva = document.createElement(FacturaPuntoVentaConstantesFunciones.IVA);\r\n\t\telementiva.appendChild(document.createTextNode(facturapuntoventa.getiva().toString().trim()));\r\n\t\telement.appendChild(elementiva);\r\n\r\n\t\tElement elementdescuento = document.createElement(FacturaPuntoVentaConstantesFunciones.DESCUENTO);\r\n\t\telementdescuento.appendChild(document.createTextNode(facturapuntoventa.getdescuento().toString().trim()));\r\n\t\telement.appendChild(elementdescuento);\r\n\r\n\t\tElement elementfinanciamiento = document.createElement(FacturaPuntoVentaConstantesFunciones.FINANCIAMIENTO);\r\n\t\telementfinanciamiento.appendChild(document.createTextNode(facturapuntoventa.getfinanciamiento().toString().trim()));\r\n\t\telement.appendChild(elementfinanciamiento);\r\n\r\n\t\tElement elementflete = document.createElement(FacturaPuntoVentaConstantesFunciones.FLETE);\r\n\t\telementflete.appendChild(document.createTextNode(facturapuntoventa.getflete().toString().trim()));\r\n\t\telement.appendChild(elementflete);\r\n\r\n\t\tElement elementice = document.createElement(FacturaPuntoVentaConstantesFunciones.ICE);\r\n\t\telementice.appendChild(document.createTextNode(facturapuntoventa.getice().toString().trim()));\r\n\t\telement.appendChild(elementice);\r\n\r\n\t\tElement elementotros = document.createElement(FacturaPuntoVentaConstantesFunciones.OTROS);\r\n\t\telementotros.appendChild(document.createTextNode(facturapuntoventa.getotros().toString().trim()));\r\n\t\telement.appendChild(elementotros);\r\n\r\n\t\tElement elementsub_total = document.createElement(FacturaPuntoVentaConstantesFunciones.SUBTOTAL);\r\n\t\telementsub_total.appendChild(document.createTextNode(facturapuntoventa.getsub_total().toString().trim()));\r\n\t\telement.appendChild(elementsub_total);\r\n\r\n\t\tElement elementtotal = document.createElement(FacturaPuntoVentaConstantesFunciones.TOTAL);\r\n\t\telementtotal.appendChild(document.createTextNode(facturapuntoventa.gettotal().toString().trim()));\r\n\t\telement.appendChild(elementtotal);\r\n\t}", "public void setFilaDatosExportarXmlPlantillaFactura(PlantillaFactura plantillafactura,Document document,Element element) {\r\n\t\t\r\n\r\n\t\tElement elementId = document.createElement(PlantillaFacturaConstantesFunciones.ID);\r\n\t\telementId.appendChild(document.createTextNode(plantillafactura.getId().toString().trim()));\r\n\t\telement.appendChild(elementId);\r\n\r\n\t\tif(parametroGeneralUsuario.getcon_exportar_campo_version()){\r\n\r\n\t\tElement elementVersionRow = document.createElement(PlantillaFacturaConstantesFunciones.VERSIONROW);\r\n\t\telementVersionRow.appendChild(document.createTextNode(plantillafactura.getVersionRow().toString().trim()));\r\n\t\telement.appendChild(elementVersionRow);\r\n\t\t}\r\n\r\n\r\n\t\tElement elementempresa_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDEMPRESA);\r\n\t\telementempresa_descripcion.appendChild(document.createTextNode(plantillafactura.getempresa_descripcion()));\r\n\t\telement.appendChild(elementempresa_descripcion);\r\n\r\n\t\tElement elementcodigo = document.createElement(PlantillaFacturaConstantesFunciones.CODIGO);\r\n\t\telementcodigo.appendChild(document.createTextNode(plantillafactura.getcodigo().trim()));\r\n\t\telement.appendChild(elementcodigo);\r\n\r\n\t\tElement elementnombre = document.createElement(PlantillaFacturaConstantesFunciones.NOMBRE);\r\n\t\telementnombre.appendChild(document.createTextNode(plantillafactura.getnombre().trim()));\r\n\t\telement.appendChild(elementnombre);\r\n\r\n\t\tElement elementdescripcion = document.createElement(PlantillaFacturaConstantesFunciones.DESCRIPCION);\r\n\t\telementdescripcion.appendChild(document.createTextNode(plantillafactura.getdescripcion().trim()));\r\n\t\telement.appendChild(elementdescripcion);\r\n\r\n\t\tElement elementes_proveedor = document.createElement(PlantillaFacturaConstantesFunciones.ESPROVEEDOR);\r\n\t\telementes_proveedor.appendChild(document.createTextNode(plantillafactura.getes_proveedor().toString().trim()));\r\n\t\telement.appendChild(elementes_proveedor);\r\n\r\n\t\tElement elementcuentacontableaplicada_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA);\r\n\t\telementcuentacontableaplicada_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontableaplicada_descripcion()));\r\n\t\telement.appendChild(elementcuentacontableaplicada_descripcion);\r\n\r\n\t\tElement elementcuentacontablecreditobien_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN);\r\n\t\telementcuentacontablecreditobien_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontablecreditobien_descripcion()));\r\n\t\telement.appendChild(elementcuentacontablecreditobien_descripcion);\r\n\r\n\t\tElement elementcuentacontablecreditoservicio_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO);\r\n\t\telementcuentacontablecreditoservicio_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontablecreditoservicio_descripcion()));\r\n\t\telement.appendChild(elementcuentacontablecreditoservicio_descripcion);\r\n\r\n\t\tElement elementtiporetencionfuentebien_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN);\r\n\t\telementtiporetencionfuentebien_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionfuentebien_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionfuentebien_descripcion);\r\n\r\n\t\tElement elementtiporetencionfuenteservicio_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO);\r\n\t\telementtiporetencionfuenteservicio_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionfuenteservicio_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionfuenteservicio_descripcion);\r\n\r\n\t\tElement elementtiporetencionivabien_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN);\r\n\t\telementtiporetencionivabien_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionivabien_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionivabien_descripcion);\r\n\r\n\t\tElement elementtiporetencionivaservicio_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO);\r\n\t\telementtiporetencionivaservicio_descripcion.appendChild(document.createTextNode(plantillafactura.gettiporetencionivaservicio_descripcion()));\r\n\t\telement.appendChild(elementtiporetencionivaservicio_descripcion);\r\n\r\n\t\tElement elementcuentacontablegasto_descripcion = document.createElement(PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO);\r\n\t\telementcuentacontablegasto_descripcion.appendChild(document.createTextNode(plantillafactura.getcuentacontablegasto_descripcion()));\r\n\t\telement.appendChild(elementcuentacontablegasto_descripcion);\r\n\t}" ]
[ "0.60666734", "0.55372864", "0.54506916", "0.54175603", "0.5373407", "0.53551567", "0.53147066", "0.5314182", "0.52882135", "0.5281166", "0.5244031", "0.5222948", "0.5206495", "0.5205105", "0.5198041", "0.5197243", "0.5188375", "0.517097", "0.513585", "0.513585", "0.5114613", "0.51110387", "0.50964326", "0.50417393", "0.50306904", "0.50255275", "0.49861822", "0.49803087", "0.4950395", "0.4948965", "0.49480876", "0.4935546", "0.49308455", "0.49295324", "0.49258125", "0.49172086", "0.491194", "0.49024943", "0.48886225", "0.48768353", "0.48703882", "0.4867925", "0.48658645", "0.48586777", "0.48500454", "0.4838581", "0.4833026", "0.48290676", "0.48228148", "0.48212865", "0.48105478", "0.4805069", "0.48024413", "0.48002335", "0.47985208", "0.47889242", "0.47645473", "0.47502282", "0.4748379", "0.4748379", "0.4748379", "0.47291103", "0.4726679", "0.47246885", "0.47221303", "0.47194406", "0.47188258", "0.4718713", "0.47113055", "0.47054234", "0.47054234", "0.47033212", "0.47023737", "0.4700464", "0.46882558", "0.4686717", "0.4685089", "0.46845183", "0.46722373", "0.46691683", "0.46641853", "0.46616733", "0.46606058", "0.46490705", "0.4648523", "0.46480906", "0.46459085", "0.46366352", "0.46358377", "0.46290314", "0.46251023", "0.4623314", "0.46211752", "0.46199292", "0.4617876", "0.4617326", "0.46167856", "0.4616577", "0.4615388", "0.46086353", "0.46039882" ]
0.0
-1
Retorna um numero double a partir de uma string. Espera que o parametros de regionalizacao estejam em formato ingles.
private static double stringToDouble(String valor) throws ParseException { DecimalFormat format = new DecimalFormat("#,###,##0.00", new DecimalFormatSymbols(Locale.ENGLISH)); double result = 0.0d; try { if(!valor.equalsIgnoreCase("")) { result = format.parse(valor).doubleValue(); } } catch(ParseException e) { result = 0; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Double stod(String string) {\n\t\tDouble result = 2.0; // should handle this error: \"cannnot convert string to Double\"\n\t\tif (string == null || string.equals(\"\") || string.equals(\"null\") || string.equals(\"I\")) {\n\t\t\tresult = 0.0;\n\t\t} else if (string.equals(\"E\")) {\n\t\t\tresult = 1.0;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tresult = Double.parseDouble(string);\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "String doubleRead();", "public static double readDouble() {\n return Double.parseDouble(readString());\n }", "public static double toDouble(String s) {\n\t\tint i;\n\t\tif((i = s.indexOf(\",\")) > 0)\n\t\t\ts = s.substring(0, i) + \".\" + s.substring(i + 1);\n\t\telse if(i == 0)\n\t\t\ts = \".\" + s.substring(i + 1);\n\t\t\n\t\tif((i = s.indexOf(\" \")) > 0)\n\t\t\ts = s.substring(0, i) + s.substring(i + 1);\n\t\telse if(i == 0)\n\t\t\ts = s.substring(i + 1);\n\t\t\n\t\ttry {\n\t\t\treturn Double.parseDouble(s);\n\t\t} catch(NumberFormatException e) {\n\t\t\treturn 0.0;\n\t\t}\n\t}", "@Override\n\t\tpublic Double convert(String s) {\n\t\t\treturn Double.parseDouble(s);\n\t\t}", "public static double StringToDouble(String StringValue){\n Double doublee;\n doublee = Double.valueOf(StringValue);\n return doublee.doubleValue();\n }", "public double toDouble() {\n/* */ try {\n/* 813 */ return Double.valueOf(this.m_str).doubleValue();\n/* */ }\n/* 815 */ catch (NumberFormatException nfe) {\n/* */ \n/* 817 */ return Double.NaN;\n/* */ } \n/* */ }", "public static double parseDouble(String s){\r\n double v=-1;\r\n try{\r\n v = Double.parseDouble(s);\r\n }catch(NumberFormatException e){\r\n System.out.println(\"Invalid input\");\r\n }\r\n return v;\r\n }", "public static double parseDouble(final CharSequence s)\n {\n // no string\n if (s == null)\n {\n throw new NumberFormatException(\"null\");\n }\n\n // determine length\n final int length = s.length();\n\n if (length == 0)\n {\n throw new NumberFormatException(\"length = 0\");\n }\n\n // that is safe, we already know that we are > 0\n final int digit = s.charAt(0);\n\n // turn the compare around to allow the compiler and cpu\n // to run the next code most of the time\n if (digit < '0' || digit > '9')\n {\n return Double.parseDouble(s.toString());\n }\n\n long value = digit - DIGITOFFSET;\n\n int decimalPos = 0;\n\n for (int i = 1; i < length; i++)\n {\n final int d = s.charAt(i);\n if (d == '.')\n {\n decimalPos = i;\n continue;\n }\n if (d < '0' || d > '9')\n {\n throw new NumberFormatException(\"Not a double \" + s.toString());\n }\n\n value = ((value << 3) + (value << 1));\n value += (d - DIGITOFFSET);\n }\n\n // adjust the decimal places\n return decimalPos > 0 ? value * multipliers[length - decimalPos] : value;\n }", "public Double convertStringToDouble(String s ) {\n\t\t\treturn Double.valueOf(s);\n\t\t}", "private double convertDouble()\n\t{\n\t\tString val = tokens[10];\n\t\tdouble value = 0.0;\n\t\ttry {\n\t\t\tvalue = Double.parseDouble(tokens[10]);\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\tSystem.err.print(\"\");\n\t\t}\n\t\treturn value;\n\t}", "public double getDoubleValueOf(String string) {\n\t\tif (this.numeric) {\n\t\t\ttry {\n\t\t\t\tdouble value = NumberParser.parseNumber(string);\n\t\t\t\treturn value;\n\t\t\t} catch (ParseException e1) {\n\t\t\t\tthis.numeric = false;\n\t\t\t}\n\t\t}\n\n\t\tint index = 0;\n\t\tIterator<String> it = discreteLevels.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tif (string.equalsIgnoreCase(it.next())) {\n\t\t\t\treturn (double) index;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\n\t\t// String not found, add it to discrete levels\n\t\tthis.discreteLevels.add(string);\n\t\tindex = 0;\n\t\tit = discreteLevels.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tString next = it.next();\n\t\t\tif (string.equalsIgnoreCase(next)) {\n\t\t\t\treturn (double) index;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\tthrow new CorruptDataException(this);\n\t}", "public double getDouble(String name)\r\n throws NumberFormatException\r\n {\r\n return Double.parseDouble(getString(name));\r\n }", "private static Double grabPriceText(String s_input, String s_label) {\n Pattern dollabillsyall = Pattern.compile(\"[0-9]{1,4}[.][0-9]{0,4}\");\n Matcher matcher = dollabillsyall.matcher(s_input);\n\n if (matcher.find())\n System.out.println(\"=== \" + s_label + \": \" + matcher.group(0));\n else\n System.out.println(\"=== \" + s_label + \": \" + \"no match\");\n\n return Double.parseDouble(matcher.group(0));\n }", "public abstract void getDoubleImpl(String str, double d, Resolver<Double> resolver);", "public static Double DVal( String psNum ) {\n return DVal( psNum, null );\n }", "static double readDouble() throws Exception {\n\t\treturn Double.parseDouble(readString());\n\t}", "private static double parseOutNum(String s)\n {\n final int N = s.length();\n // If the last character of s is a digit, the whole of s is assumed to\n // be a numeral. Otherwise, s up to, but not including, its last \n // character, is assumed to be a numeral.\n if (Character.isDigit(s.charAt(N-1)))\n { return Double.parseDouble(s); }\n else\n { return Double.parseDouble(s.substring(0,N-1)); }\n }", "public final double getDouble(final String tagToGet) {\n try {\n return Double.parseDouble(getStr(tagToGet));\n } catch (final Exception e) {\n return 0.0;\n }\n }", "public double readDouble() throws NumberFormatException {\r\n\t\treturn Double.parseDouble(scanner.nextLine());\r\n\t}", "public double extractDouble(String s) {\n String pattern = \"(\\\\d+)\";\n //Create a Pattern object\n Pattern r = Pattern.compile(pattern);\n //Look for a match\n Matcher m = r.matcher(s);\n if (m.find( )) {\n Log.i(\"REGEX\", \"Found value: \" + m.group(0));\n return Double.parseDouble(m.group(0));\n } else {\n Log.i(\"REGEX\", \"No match found.\");\n return 0;\n }\n\n}", "private DoubleField(String str, double low, double high) {\n\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\tsetBackground(Color.WHITE);\n\t\tsetHorizontalAlignment(RIGHT);\n\t\tminValue = low;\n\t\tmaxValue = high;\n\t\tsetText(str);\n\t\texceptionOnError = false;\n\t}", "public double getDouble(String key) {\n\t\treturn Double.parseDouble(get(key));\n\t}", "private double tranferStringToNum(String num){\r\n double number = 0;\r\n try{\r\n\tnumber = Double.parseDouble(num);\r\n }catch(Exception ex){\r\n\tnumber = 0;\r\n }\r\n return number;\r\n }", "public static boolean isDouble(String s){\n boolean flag = true;\n int countPonto = 0;\n if(s.charAt(0) == '.' || s.charAt(0) == ',')\n countPonto++;\n else \n flag = ((s.charAt(0) >= '0' && s.charAt(0) <= '9') || s.charAt(0) == '-' || s.charAt(0) == '+' );\n int i = 1;\n while(flag && i < s.length() && countPonto <=1){\n if(s.charAt(i) == '.' || s.charAt(i) == ',')\n countPonto++;\n else \n flag = (s.charAt(i) >= '0' && s.charAt(i) <= '9' );\n i++;\n }\n flag = flag&&(countPonto<=1) ? true:false;\n return flag;\n }", "private static double createDoubleFromImaginary(String s) {\n\t\ts = s.substring(0, s.length() - 1);\n\t\treturn Double.parseDouble(s);\n\t}", "public static double parseDouble(String val)\n {\n if(val == null || val.trim().length() == 0)\n {\n return 0;\n }\n else\n {\n return Double.parseDouble(val);\n }\n }", "public static double doubleEingeben(String text){\n boolean korrekt=true;\n double eingabe= 0.0;\n do {\n System.out.print(text);\n String input = reader.next();\n try {\n double isNum = Double.parseDouble(input);\n if (isNum == Math.floor(isNum)) {\n korrekt=true;\n eingabe= Double.valueOf(input);\n //enter a double again\n } else {\n korrekt=true;\n eingabe= Double.valueOf(input);\n //break\n }\n } catch (Exception e) {\n if (input.toCharArray().length == 1) {\n System.out.println(\"Input ist ein Char\");\n korrekt=false;\n\n //enter a double again\n } else {\n System.out.println(\"Input ist ein String\");\n korrekt=false;\n\n //enter a double again\n }\n }\n }while(korrekt==false);\n return eingabe;\n }", "public static Double converteStringToDouble(String valor) {\n Double retorno;\n try {\n String valorSemFormatacao = valor.replace(StringUtil.CARACTER_PONTO, \"\").replace(StringUtil.CARACTER_VIRGULA, StringUtil.CARACTER_PONTO);\n BigDecimal bd2 = new BigDecimal(valorSemFormatacao, new MathContext(15, RoundingMode.FLOOR));\n retorno = bd2.doubleValue();\n } catch (NumberFormatException e) {\n retorno = null;\n } catch (NullPointerException e) {\n retorno = null;\n }\n return retorno;\n }", "public double toDouble(String stringItem) {\n Float floatItem = (float) 0.0;\n try {\n floatItem = Float.valueOf(stringItem);\n } // try\n catch (NumberFormatException ioError) {\n System.out.print(\"Error converting \" + stringItem);\n System.out.print(\" to a floating point number::\");\n System.out.println(\" Termio.ToDouble method.\");\n } // catch\n return floatItem.doubleValue();\n }", "public double parseDouble()\r\n {\r\n String str = feed.findWithinHorizon( REAL_PATTERN, 0 );\r\n \r\n if( str == null )\r\n throw new NumberFormatException( \"[Line \" + lineNum + \"] Input did not match a real number\" );\r\n else if( str.length() == 0 )\r\n throw new NumberFormatException( \"[Line \" + lineNum + \"] Input did not match a real number\" );\r\n \r\n return Double.parseDouble( str );\r\n }", "public double getDouble(String key, double fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getDouble(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Double.parseDouble(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "public static double getDouble(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Double.parseDouble(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as a double.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}", "double readDouble();", "public static double atof(String s)\n {\n int i = 0;\n int sign = 1;\n double r = 0; // integer part\n // double f = 0; // fractional part\n double p = 1; // exponent of fractional part\n int state = 0; // 0 = int part, 1 = frac part\n\n while ((i < s.length()) && Character.isWhitespace(s.charAt(i)))\n {\n i++;\n }\n\n if ((i < s.length()) && (s.charAt(i) == '-'))\n {\n sign = -1;\n i++;\n }\n else if ((i < s.length()) && (s.charAt(i) == '+'))\n {\n i++;\n }\n\n while (i < s.length())\n {\n char ch = s.charAt(i);\n\n if (('0' <= ch) && (ch <= '9'))\n {\n if (state == 0)\n {\n r = ((r * 10) + ch) - '0';\n }\n else if (state == 1)\n {\n p = p / 10;\n r = r + (p * (ch - '0'));\n }\n }\n else if (ch == '.')\n {\n if (state == 0)\n {\n state = 1;\n }\n else\n {\n return sign * r;\n }\n }\n else if ((ch == 'e') || (ch == 'E'))\n {\n long e = (int) parseLong(s.substring(i + 1), 10);\n\n return sign * r * Math.pow(10, e);\n }\n else\n {\n return sign * r;\n }\n\n i++;\n }\n\n return sign * r;\n }", "private Double parseNumber(String num) {\r\n\t\tDouble tempnum = (double) 0;\r\n\t\tint opos; //operator position\r\n\t\tif ((num == null) || (num.length() < 1) ) {\r\n\t\t\treturn tempnum;\r\n\t\t}\r\n\r\n\t\t//replace constants with their value\r\n\t\twhile (num.indexOf(\"P\") >= 0) { //PI constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'P', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.PI)+numparts[1];\r\n\t\t}\r\n\t\twhile (num.indexOf(\"X\") >= 0) { //e constant\r\n\t\t\tString[] numparts = StringUtil.splitData(num, 'X', 2);\r\n\t\t\tnum = numparts[0]+String.valueOf(Math.E)+numparts[1];\r\n\t\t}\r\n\r\n\t\tif (num.indexOf(\"^\") >= 0) { //allows to specify powers (e.g.: 2^10)\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '^', 2);\r\n\t\t\ttempnum = Math.pow(parseNumber(numparts[0]), parseNumber(numparts[1]));\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"-\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '-', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) - parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if ( ((opos = num.indexOf(\"+\")) > 0) && (num.charAt(opos-1) != 'E') && (num.charAt(opos-1) != '^')) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '+', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) + parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"/\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '/', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) / parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse if (num.indexOf(\"*\") >= 0) {\r\n\t\t\tString[] numparts = StringUtil.splitData(num, '*', 2);\r\n\t\t\ttempnum = parseNumber(numparts[0]) * parseNumber(numparts[1]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttempnum = Double.valueOf(num);\r\n\t\t}\r\n\r\n\t\treturn tempnum;\r\n\t}", "static Value<Double> parseDouble(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Double.parseDouble(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "public static double parseInt(final Object self, final Object string) {\n return parseIntInternal(JSType.trimLeft(JSType.toString(string)), 0);\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 }", "public double readDouble() {\n\t\tString read;\n\t\ttry {\n\t\t\tread = myInput.readLine();\n\t\t\tdouble num = Double.parseDouble(read);\n\t\t\treturn num;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Input failed!\\n\");\n\t\t\treturn -1;\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.out.println(\"Not a valid selection!\\n\");\n\t\t\treturn -1;\n\t\t}\n\t}", "public double getDouble(String name)\n/* */ {\n/* 1015 */ return getDouble(name, 0.0D);\n/* */ }", "public static double validDouble(String message){\n boolean success = false;\n double value = -1;\n do {\n try {\n value = (double)readNumber(message, \"double\");\n success = true;\n } catch (InputMismatchException e){\n System.out.println(\"Debe introducir un valor numérico válido... \");\n }\n } while(!success);\n return value;\n }", "private double formatRating(String rating){\n double ratingDouble = Double.parseDouble(rating);\n return ratingDouble;\n\n }", "public double getDouble(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Double.parseDouble(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for long integer configuration parameter: \" + key);\n\t\t}\n\t}", "public double readDouble() throws IOException {\n int token = fTokenizer.nextToken();\n if (token == StreamTokenizer.TT_NUMBER)\n return fTokenizer.nval;\n\n String msg = \"Double expected in line: \" + fTokenizer.lineno();\n throw new IOException(msg);\n }", "public static double stringToDouble(Object val) {\n String doubleStr = String.valueOf(val);\n return Double.parseDouble(doubleStr);\n }", "public double getDouble(String name, double defaultValue)\n/* */ {\n/* 1028 */ String value = getString(name);\n/* 1029 */ return value == null ? defaultValue : Double.parseDouble(value);\n/* */ }", "public static double[] stringToDouble(String[] dataArray){\n\t\t\n\t\tint entries = dataArray.length;\n\t\tdouble[] returnData = new double[entries];\n\t\t\n\t\tfor (int i = 0; i < entries ; i++) {\n\t\t\treturnData[i] = Double.parseDouble(dataArray[i]);\n\n\t\t}\n\t\treturn returnData;\n\t}", "public static double convertToDouble(String number) {\n try {\n return Double.parseDouble(number);\n } catch (Exception e) {\n e.printStackTrace();\n return 0;\n }\n }", "public static void main(String[] args) {\n\n\n String a=\"95.244522094727\";\n int score = (int)Double.parseDouble(a);\n System.out.println(score);\n }", "public static double parseDouble(String val) {\n\n\t\tif (val == null) {\n\t\t\tval = \"0\";\n\t\t}\n\n\t\tdouble ret = 0;\n\n\t\ttry {\n\t\t\tret = Double.parseDouble(val);\n\t\t} catch (NumberFormatException e) {\n\t\t}\n\n\t\treturn ret;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString st1 = \"abcdefg\";\n\t\t\n\t\tString st2 = st1.substring(2);\n\t\tSystem.out.println(st2);\n\t\t\n\t\tString st3 = st1.substring(2, 4);\n\t\tSystem.out.println(st3);\n\t\t\n\t\tdouble e = 2.7777;\n\t\tString se = String.valueOf(e);\n\t\tSystem.out.println(se);\n\t\t\n\t\tint num = 3;\n\t\tdouble nume = Double.valueOf(num);\n\t\tSystem.out.println(nume);\n\t}", "public final Double _parseDouble(JsonParser jVar, DeserializationContext gVar) throws IOException {\n JsonToken l = jVar.mo29328l();\n if (l == JsonToken.VALUE_NUMBER_INT || l == JsonToken.VALUE_NUMBER_FLOAT) {\n return Double.valueOf(jVar.mo29251G());\n }\n if (l == JsonToken.VALUE_STRING) {\n String trim = jVar.mo29334t().trim();\n if (trim.length() == 0) {\n return (Double) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Double) _coerceTextualNull(gVar, this._primitive);\n }\n char charAt = trim.charAt(0);\n if (charAt != '-') {\n if (charAt != 'I') {\n if (charAt == 'N' && _isNaN(trim)) {\n return Double.valueOf(Double.NaN);\n }\n } else if (_isPosInf(trim)) {\n return Double.valueOf(Double.POSITIVE_INFINITY);\n }\n } else if (_isNegInf(trim)) {\n return Double.valueOf(Double.NEGATIVE_INFINITY);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n return Double.valueOf(parseDouble(trim));\n } catch (IllegalArgumentException unused) {\n return (Double) gVar.mo31517b(this._valueClass, trim, \"not a valid Double value\", new Object[0]);\n }\n } else if (l == JsonToken.VALUE_NULL) {\n return (Double) _coerceNullToken(gVar, this._primitive);\n } else {\n if (l == JsonToken.START_ARRAY) {\n return (Double) _deserializeFromArray(jVar, gVar);\n }\n return (Double) gVar.mo31493a(this._valueClass, jVar);\n }\n }", "public double getDouble(String name) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return -1D;\n }", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "public static double readLong() {\n return Long.parseLong(readString());\n }", "private double formatDouble(double number){\r\n return Double.parseDouble(String.format(\"%.2f\", number));\r\n }", "public double asDouble() {\r\n\t\tif (this.what == SCALARTYPE.Integer || this.what == SCALARTYPE.Float) {\r\n\t\t\treturn (new BigDecimal(this.scalar)).doubleValue();\r\n\t\t} else\r\n\t\t\treturn 0; // ritorna un valore di default\r\n\t}", "public static double inputDouble(String p) {\n String tmp;\n double d = 0;\n\n do {\n System.out.print(p);\n try {\n tmp = in.nextLine();\n if (Double.parseDouble(tmp) == Double.parseDouble(tmp)) {\n d = Double.parseDouble(tmp);\n }\n break;\n } catch (Exception e) {\n System.err.print(\"Invalid input, enter again.\\n\");\n }\n } while (true);\n return d;\n }", "@Override\n public Number fromString(String string) {\n return Double.valueOf(string).intValue();\n }", "public double getDouble(String key)\n {\n return getDouble(key, 0);\n }", "public static double getDouble (String ask)\r\n {\r\n boolean badInput = false;\r\n String input = new String(\"\");\r\n double value = 0.0;\r\n do {\r\n badInput = false;\r\n input = getString(ask);\r\n try {\r\n value = Double.parseDouble(input);\r\n }\r\n catch (NumberFormatException e) {\r\n badInput = true;\r\n }\r\n }while(badInput);\r\n return value;\r\n }", "public static double isDouble() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn input.nextDouble();\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tinput.next();\n\t\t\t\tSystem.out.println(\"Vas unos nije odgovarajuci. Probajte ponovo: \");\n\t\t\t}\n\t\t}\n\t}", "public static double getValidDouble() {\n\n // This keeps looping until double input is received.\n while (!scnr.hasNextDouble()) {\n scnr.nextLine(); // clear the buffer\n System.out.print(\"Please enter an value! \");\n }\n\n double doubleNum = scnr.nextDouble();\n scnr.nextLine();\n\n return doubleNum;\n }", "public static double readDouble() {\n try {\n return scanner.nextDouble();\n }\n catch (InputMismatchException e) {\n String token = scanner.next();\n throw new InputMismatchException(\"attempts to read a 'double' value from standard input, \"\n + \"but the next token is \\\"\" + token + \"\\\"\");\n }\n catch (NoSuchElementException e) {\n throw new NoSuchElementException(\"attempts to read a 'double' value from standard input, \"\n + \"but no more tokens are available\");\n }\n }", "private double formatDoubleWithTwoDeci(double value) {\r\n \treturn Math.floor(value*1e2)/1e2;\r\n }", "public double fieldValuetoDouble() {\n return Double.parseDouble(this.TF_Field_Value); // This just might throw and Exception. \n }", "private double _parseLongitude(String s, String d)\n {\n double _lon = StringTools.parseDouble(s, 99999.0);\n if (_lon < 99999.0) {\n double lon = (double)((long)_lon / 100L); // _lon is always positive here\n lon += (_lon - (lon * 100.0)) / 60.0;\n return d.equals(\"W\")? -lon : lon;\n } else {\n return 180.0; // invalid longitude\n }\n }", "public static double getDouble(String inputDialog) {\n return(Double.parseDouble(JOptionPane.showInputDialog(inputDialog)));\n }", "public Double getDouble(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.DOUBLE)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), Double.class);\n\t\treturn (Double)value.value;\n\t}", "private double getTextToDouble(JTextField text) {\n try {\n Double.parseDouble(text.getText());\n\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Input format for : \" + text.getText() + \" is illegal! Input number!\"\n , \"Error message\", JOptionPane.ERROR_MESSAGE);\n }\n return Double.parseDouble(text.getText());\n\n }", "@Test\n public void testLog() throws IOException {\n System.out.println(Double.parseDouble(\"3.123124354657668698\"));\n }", "private double getDoubleValue(Element element, String tagName)\n {\n try\n {\n return Double.parseDouble(getValue(element,tagName));\n }\n catch (NumberFormatException exception)\n {\n return 0.0;\n }\n }", "public static double parseDoubleOrDefault(String s, double defaultDouble) {\n try {\n return Double.parseDouble(s);\n } catch (NumberFormatException e) {\n Logger.trace(MESSAGE, s, e);\n return defaultDouble;\n }\n }", "private String doubleChecker(String s) {\n\t\tString newS = \"\";\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif((s.charAt(i) > 47 && s.charAt(i) < 58) || s.charAt(i) == '.') {\n\t\t\t\tnewS += s.charAt(i);\n\t\t\t}\n\t\t}\n\t\treturn newS;\n\t}", "public double getDouble(String key, double defaultValue) {\n String lowerCaseKey = validateAndGetLowerCaseKey(key);\n\n if(map.containsKey(lowerCaseKey)) {\n String value = map.get(lowerCaseKey);\n\n try {\n return Double.parseDouble(value);\n } catch (NumberFormatException exception) {\n System.err.println(\"Unable to parse double: \" + exception.getMessage());\n }\n\n }\n return defaultValue;\n }", "double readDouble() throws IOException;", "private double parseAmount(String amount){\n return Double.parseDouble(amount.replace(\",\", \".\"));\n }", "public double getDoubleValue() {\n\t\treturn Double.parseDouble(userInput);\n\t}", "Double getDoubleValue();", "public double readDouble(String message) {\r\n\t\tSystem.out.println(message);\r\n\t\treturn scanner.nextDouble();\r\n\t}", "double getDouble(String key) {\n double value = 0.0;\n try {\n value = mConfigurations.getDouble(key);\n } catch (JSONException e) {\n sLogger.error(\"Error retrieving double from JSONObject. @ \" + key);\n }\n return value;\n }", "public static Double getNumber(String number){\n if(StringUtils.isEmpty(number) || !containDigit(number)){\n return null;\n }\n if(containVariable(number)){\n return extractFirstVariableValue(number);\n }\n String firstNumberStr = null, numberStr = null, unitStr = null;\n if(contains(number, numberUnitPattern)){\n firstNumberStr = removeFormatForNumberStr(extract(number, numberUnitPattern));\n Matcher matcher = numberUnitPattern.matcher(firstNumberStr);\n while(matcher.find()){\n numberStr = matcher.group(2); // number\n if(matcher.group(8) != null){\n unitStr = matcher.group(8); // unit\n }\n }\n }\n\n if(StringUtils.isNotEmpty(firstNumberStr)){\n Double result = Double.valueOf(numberStr);\n if(StringUtils.isNotEmpty(unitStr)){\n switch (unitStr){\n case \"bps\" : result *= 0.0001; break;\n case \"%\" : result *= 0.01; break;\n case \"k\" : result *= 1e3; break;\n case \"m\" :\n case \"mm\" : result *= 1e6; break;\n case \"bn\" : result *= 1e9; break;\n }\n }\n return result;\n }\n return null;\n }", "public abstract double readAsDbl(int offset);", "public double getDouble (String variable){\r\n if (matlabEng==null) return 0.0;\r\n return matlabEng.engGetScalar(id,variable);\r\n }", "private boolean checkDouble(String str) {\n\t\tint i = 0, flag = 0;\n\t\tchar ch;\n\n\t\tif (str.length() == 0)\n\t\t\treturn false;\n\n\t\twhile (i < str.length()) {\n\t\t\tch = str.charAt(i);\n\n\t\t\tif (ch == '-' && flag == 0) {\n\t\t\t\tflag = 1;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag <= 2)) {\n\t\t\t\tflag = 2;\n\t\t\t} else if (ch == '.' && (flag < 3)) {\n\t\t\t\tflag = 3;\n\t\t\t} else if (ch >= '0' && ch <= '9' && (flag == 3 || flag == 4)) {\n\t\t\t\tflag = 4;\n\t\t\t} else if (whiteSpace(ch) && (flag == 2 || flag == 4)) {\n\t\t\t\tflag = 5;\n\t\t\t} else if (!(whiteSpace(ch) && flag == 0)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t\tif (flag < 2)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "double getDoubleValue2();", "public abstract double read_double();", "public abstract double fromBasicUnit(double valueJTextInsert);", "public Snippet visit(CoercionToDoubleExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t _ret.returnTemp = \"(\" + \"double\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Double();\n\t return _ret;\n\t }", "private double convertToDbl(Object a) {\n double result = 0;\n\n //If the object is a Character...\n if(a instanceof Character){\n char x = (Character)a;\n result = (double)(x - '0'); // -'0' as it will convert the ascii number (e.g 4 is 52 in ascii) to the standard number\n }\n\n //If it is a Double...\n else if(a instanceof Double){\n result = (Double)a;\n }\n\n return result;\n }", "public static double parseHumanReadable(String datum, String separator, String unit)\n {\n int end = datum.length();\n if (unit != null)\n {\n if (!datum.endsWith(unit))\n throw new NumberFormatException(datum + \" does not end in unit \" + unit);\n end -= unit.length();\n }\n\n Matcher m = BASE_NUMBER_PATTERN.matcher(datum);\n m.region(0, end);\n if (!m.lookingAt())\n throw new NumberFormatException();\n double v = Double.parseDouble(m.group(0));\n\n int pos = m.end();\n if (m.group(2) == null) // possible binary exponent, parse\n {\n m = BINARY_EXPONENT.matcher(datum);\n m.region(pos, end);\n if (m.lookingAt())\n {\n int power = Integer.parseInt(m.group(1));\n v = Math.scalb(v, power);\n pos = m.end();\n }\n }\n\n if (separator != null)\n {\n if (!datum.startsWith(separator, pos))\n throw new NumberFormatException(\"Missing separator \" + separator + \" in \" + datum);\n pos += separator.length();\n }\n else\n {\n while (pos < end && Character.isWhitespace(datum.charAt(pos)))\n ++pos;\n }\n\n if (pos < end)\n {\n char prefixChar = datum.charAt(pos);\n int prefixIndex = UNIT_PREFIXES.indexOf(prefixChar);\n if (prefixIndex >= 0)\n {\n prefixIndex -= UNIT_PREFIXES_BASE;\n ++pos;\n if (pos < end && datum.charAt(pos) == 'i')\n {\n ++pos;\n v = Math.scalb(v, prefixIndex * 10);\n }\n else\n {\n v *= Math.exp(Math.log(1000.0) * prefixIndex);\n }\n }\n }\n\n if (pos != end && unit != null)\n throw new NumberFormatException(\"Unexpected characters between pos \" + pos + \" and \" + end + \" in \" + datum);\n\n return v;\n }", "public static double datodouble(){\n try {\n Double f=new Double(dato());\n return(f.doubleValue());\n } catch (NumberFormatException error) {\n return(Double.NaN);\n }\n }", "public Double getDouble(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).doubleValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null) {\n return Double.parseDouble(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public static double getDouble() {\n while (!consoleScanner.hasNextDouble()) {\n consoleScanner.next();\n }\n return consoleScanner.nextDouble();\n }", "public static void main(String[] args) {\n\n double i = 47456.23456;\n String r1 = String.format(\"i have %,6.2f\", i);\n System.out.println(r1);\n String r2 = String.format(\"i have %,6.1f\", 4.12);\n System.out.println(r2);\n String r3 = String.format(\"i have %c\", 42);\n System.out.println(r3);\n String r4 = String.format(\"i have %x\", 42);\n System.out.println(r4);\n\n\n }", "public static boolean esDouble(String string) {\n\t\tint cantp=0;\n\t\tint pos=0;\n\t\twhile (pos<string.length()) {\n\t\t\tif(string.charAt(pos)=='.')\n\t\t\t\tcantp++;\n\t\t\tpos++;\n\t\t}\n\t\tif(cantp<=1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public static double ensureDecimal(String rawValue, int place) {\r\n\t\tString returnValue = \"\";\r\n\t\tif (rawValue.indexOf(\".\") == -1) {\r\n\t\t\treturnValue = rawValue.substring(0, (place - 1)) + \".\"\r\n\t\t\t\t\t+ rawValue.substring(place - 1);\r\n\t\t\t// System.out.println(returnValue);\r\n\t\t\treturn (Double.parseDouble(returnValue));\r\n\t\t} else\r\n\t\t\treturn Double.parseDouble(rawValue);\r\n\t}", "public static double[][] stringToDouble(String[][] dataArray){\n\t\t\n\t\tint rows = dataArray.length;\n\t\tint cols = dataArray[0].length;\n\t\t\n\t\tdouble[][] returnData = new double[rows][cols];\n\t\t\n\t\tfor (int i = 0; i < rows ; i++) {\n\t\t\tfor (int j = 0; j < cols ; j++) {\n\t\t\t\treturnData[i][j] = Double.parseDouble(dataArray[i][j]);\n\t\t\t}\n\t\t}\n\t\treturn returnData;\n\t}" ]
[ "0.67107815", "0.6372205", "0.6332132", "0.6267937", "0.62506855", "0.624613", "0.62045336", "0.6195016", "0.6167419", "0.61516327", "0.6145517", "0.61367404", "0.6106356", "0.60456055", "0.60030985", "0.5956425", "0.5933406", "0.59328485", "0.58725846", "0.5859951", "0.5823389", "0.582097", "0.58068943", "0.57812876", "0.5767154", "0.57400507", "0.5733206", "0.571674", "0.57163054", "0.57068056", "0.57044226", "0.56989336", "0.56848806", "0.56432396", "0.5616874", "0.5611287", "0.5591727", "0.55886596", "0.5587559", "0.55796385", "0.5577732", "0.557148", "0.5566597", "0.5558598", "0.55387414", "0.5531988", "0.5530344", "0.55291677", "0.55221117", "0.5488252", "0.54860467", "0.5470482", "0.5469605", "0.5446147", "0.5445885", "0.5442817", "0.543508", "0.5433935", "0.5431566", "0.5430094", "0.54227775", "0.5418263", "0.5417313", "0.54040504", "0.539075", "0.5389493", "0.53855956", "0.537544", "0.5370116", "0.5365206", "0.53614074", "0.5361217", "0.53531134", "0.5351755", "0.5349341", "0.5348538", "0.5348421", "0.53474605", "0.53458357", "0.53337497", "0.5332665", "0.5331817", "0.5331639", "0.532886", "0.532681", "0.53224075", "0.5313718", "0.53097403", "0.53060055", "0.5296565", "0.52882457", "0.5288092", "0.52836704", "0.5279213", "0.52652025", "0.5257003", "0.52441925", "0.52433556", "0.5231103", "0.5227098" ]
0.6493843
1
Process a list of Individuals into a JSON array that holds the Names and URIs.
protected JSONArray individualsToJson(List<Individual> individuals) throws ServletException { try{ JSONArray ja = new JSONArray(); for (Individual ent: individuals) { JSONObject entJ = new JSONObject(); entJ.put("name", ent.getName()); entJ.put("URI", ent.getURI()); ja.put( entJ ); } return ja; }catch(JSONException ex){ throw new ServletException("could not convert list of Individuals into JSON: " + ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Individual> getListOfIndividuals(){\n \tList<Individual> individualList = new ArrayList<>();\n\t\tIndividual individualObject = null;\n\t\tMap<String, Object> myMap = null;\n\t\tObject obj = null;\n\t\tJSONObject jsonObject = null;\n\t\tJSONArray jsonArray = null;\n\t\tJSONObject jsonObj = null;\n\t\tJSONParser parser = new JSONParser();\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tjsonObject = (JSONObject) obj;\n\n\t\t\tjsonArray = (JSONArray) jsonObject.get(\"individuals\");\n\n\t\t\tint length = jsonArray.size();\n\t\t\tfor (int size = 0; size < length; size++) {\n\n\t\t\t\tjsonObj = (JSONObject) jsonArray.get(size);\n\t\t\t\tmyMap = new HashMap<String, Object>();\n\t\t\t\tmyMap.put(\"name\", jsonObj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonObj.get(\"id\")).intValue());\n\t\t\t\tmyMap.put(\"active\", jsonObj.get(\"active\"));\n\t\t\t\tindividualObject = new Individual(myMap);\n\t\t\t\tindividualList.add(individualObject);\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn individualList;\n }", "public String getJSONfromNamedList(NamedList<?> namedList) {\n\t\tString json = null;\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(namedList);\n\t\t} catch (JsonProcessingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn json;\n\t}", "private JSONArray createJSONWeaponList(List<Weapon> weapons) {\n\t\tJSONArray jArray = new JSONArray();\n\t\tweapons.forEach(s -> jArray.add(s.getName()));\n\t\treturn jArray;\n\t}", "protected static String createJsonArray(List<String> originalList) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[\");\n for (int i = 0; i < originalList.size(); i++) {\n sb.append(originalList.get(i));\n if (i < (originalList.size() - 1)) {\n sb.append(\", \");\n }\n }\n sb.append(\"]\");\n return sb.toString();\n }", "public static void main(String[] args) {\n // Converts a collection of string object into JSON string.\n //\n List<String> names = new ArrayList<String>();\n names.add(\"Alice\");\n names.add(\"Bob\");\n names.add(\"Carol\");\n names.add(\"Mallory\");\n\n Gson gson = new Gson();\n String jsonNames = gson.toJson(names);\n System.out.println(\"jsonNames = \" + jsonNames);\n\n //\n // Converts a collection Student object into JSON string\n //\n Student a = new Student(\"Alice\", \"Apple St\",\n CollectionToJson.getDOB(2000, 10, 1));\n Student b = new Student(\"Bob\", \"Banana St\", null);\n Student c = new Student(\"Carol\", \"Grape St\",\n CollectionToJson.getDOB(2000, 5, 21));\n Student d = new Student(\"Mallory\", \"Mango St\", null);\n\n List<Student> students = new ArrayList<Student>();\n students.add(a);\n students.add(b);\n students.add(c);\n students.add(d);\n\n gson = new Gson();\n String jsonStudents = gson.toJson(students);\n System.out.println(\"jsonStudents = \" + jsonStudents);\n\n //\n // Converts JSON string into a collection of Student object.\n //\n Type type = new TypeToken<List<Student>>() {\n }.getType();\n List<Student> studentList = gson.fromJson(jsonStudents, type);\n\n for (Student student : studentList) {\n System.out.println(\"student.getName() = \" + student.getName());\n }\n }", "private String convertListToJson(List<Contacts> contactlist) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contactlist); \n\t}", "public List<String> getObjects(List<String> fullURIs) {\n List<String> abbreviatedURI = new ArrayList<>();\n StmtIterator si = model.listStatements();\n Statement s;\n while (si.hasNext()) {\n s = si.nextStatement();\n fullURIs.add(s.getObject().toString());\n abbreviatedURI.add(FileManager.getSimpleFilename(s.getObject().toString()));\n }\n return abbreviatedURI;\n }", "@Override\r\n\tpublic Map<String, MemberDto> nameList() {\n\t\tMap<String, MemberDto> list = new HashMap<>();\r\n\t\tfor (String email : emailList()) {\r\n\t\t\tlist.put(email, myInfo(email));\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public String getJSONfromList(List<?> list) {\n\t\tString json = null;\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(list);\n\t\t} catch (JsonProcessingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn json;\n\t}", "private static void writeJSONString(Iterable<?> list, Appendable out) throws IOException {\n @Var boolean first = true;\n\n out.append('[');\n for (Object value : list) {\n if (first) {\n first = false;\n } else {\n out.append(',');\n }\n\n JSON.writeJSONString(value, out);\n }\n out.append(']');\n }", "@Override\n\t\tpublic String serialize(List<Person> list) throws Exception {\n\t\t\tSAXTransformerFactory factory = (SAXTransformerFactory) TransformerFactory\n\t\t\t\t\t.newInstance();\n\t\t\tTransformerHandler handler = factory.newTransformerHandler();\n\t\t\tTransformer transformer = handler.getTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer\n\t\t\t\t\t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n\t\t\tStringWriter writer = new StringWriter();\n\t\t\tResult result = new StreamResult(writer);\n\t\t\thandler.setResult(result);\n\t\t\tString uri = \"\";\n\t\t\tString localName = \"\";\n\t\t\thandler.startDocument();\n\t\t\thandler.startElement(uri, localName, \"persons\", null);\n\t\t\tAttributesImpl attrs = new AttributesImpl();\n\t\t\tchar[] ch = null;\n\t\t\tfor (Person p : list) {\n\t\t\t\tattrs.clear();\n\t\t\t\tattrs.addAttribute(uri, localName, \"id\", \"string\",\n\t\t\t\t\t\tString.valueOf(p.getId()));\n\t\t\t\thandler.startElement(uri, localName, \"person\", attrs);\n\t\t\t\thandler.startElement(uri, localName, \"name\", null);\n\t\t\t\tch = p.getName().toCharArray();\n\t\t\t\thandler.characters(ch, 0, ch.length);\n\t\t\t\thandler.endElement(uri, localName, \"name\");\n\t\t\t\thandler.startElement(uri, localName, \"age\", null);\n\t\t\t\tch = String.valueOf(p.getAge()).toCharArray();\n\t\t\t\thandler.characters(ch, 0, ch.length);\n\t\t\t\thandler.endElement(uri, localName, \"age\");\n\t\t\t\thandler.endElement(uri, localName, \"person\");\n\t\t\t}\n\t\t\thandler.endElement(uri, localName, \"persons\");\n\t\t\thandler.endDocument();\n\t\t\treturn writer.toString();\n\t\t}", "public void harvest(List<IRI> iris);", "public JSONObject toJson() {\r\n JSONObject json = new JSONObject();\r\n return json.put(\"personList\", this.toJsonArray());\r\n }", "public static void main(String[] argv) {\n Owner owner1 = new Owner(1, 111111, \"registered\", 14,\n \"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\",\n \"Blake Lassiter\",\n \"http://stackoverflow.com/users/4805044/blake-lassiter\");\n\n Owner owner2 = new Owner(2, 222222, \"registered\", 14,\n \"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\",\n \"Blake Lassiter\",\n \"http://stackoverflow.com/users/4805044/blake-lassiter\");\n\n Owner owner3 = new Owner(3, 333333, \"registered\", 14,\n \"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\",\n \"Blake Lassiter\",\n \"http://stackoverflow.com/users/4805044/blake-lassiter\");\n\n String json = \"{\\n\" +\n \" \\\"items\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"android-manifest\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 23,\\n\" +\n \" \\\"user_id\\\": 4805044,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 14,\\n\" +\n \" \\\"profile_image\\\": \\\"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Blake Lassiter\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4805044/blake-lassiter\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 13,\\n\" +\n \" \\\"answer_count\\\": 0,\\n\" +\n \" \\\"score\\\": 0,\\n\" +\n \" \\\"last_activity_date\\\": 1462763611,\\n\" +\n \" \\\"creation_date\\\": 1462762986,\\n\" +\n \" \\\"last_edit_date\\\": 1462763611,\\n\" +\n \" \\\"question_id\\\": 37107214,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37107214/set-title-to-hidden-on-android-app\\\",\\n\" +\n \" \\\"title\\\": \\\"Set Title To Hidden on Android App\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"c++\\\",\\n\" +\n \" \\\"windows\\\",\\n\" +\n \" \\\"bluetooth\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 937,\\n\" +\n \" \\\"user_id\\\": 1183804,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 83,\\n\" +\n \" \\\"profile_image\\\": \\\"https://i.stack.imgur.com/Z5Lyl.jpg?s=128&g=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Chris\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/1183804/chris\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": true,\\n\" +\n \" \\\"view_count\\\": 17,\\n\" +\n \" \\\"answer_count\\\": 1,\\n\" +\n \" \\\"score\\\": 3,\\n\" +\n \" \\\"last_activity_date\\\": 1462763542,\\n\" +\n \" \\\"creation_date\\\": 1462701554,\\n\" +\n \" \\\"last_edit_date\\\": 1462743555,\\n\" +\n \" \\\"question_id\\\": 37098557,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37098557/c-winsock-bluetooth-connection-at-command-error-received\\\",\\n\" +\n \" \\\"title\\\": \\\"C++ WinSock Bluetooth Connection - AT Command - Error Received\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"java\\\",\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"user-interface\\\",\\n\" +\n \" \\\"fragment\\\",\\n\" +\n \" \\\"android-orientation\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 4,\\n\" +\n \" \\\"user_id\\\": 4835349,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"profile_image\\\": \\\"https://lh4.googleusercontent.com/-ZFmtDec26j4/AAAAAAAAAAI/AAAAAAAAAC4/RGi5zw-SFao/photo.jpg?sz=128\\\",\\n\" +\n \" \\\"display_name\\\": \\\"jl1992\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4835349/jl1992\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 41,\\n\" +\n \" \\\"answer_count\\\": 2,\\n\" +\n \" \\\"score\\\": -1,\\n\" +\n \" \\\"last_activity_date\\\": 1462761445,\\n\" +\n \" \\\"creation_date\\\": 1462750768,\\n\" +\n \" \\\"question_id\\\": 37105990,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37105990/android-how-do-i-prevent-class-variables-being-cleared-on-orientation-change\\\",\\n\" +\n \" \\\"title\\\": \\\"Android: how do I prevent class variables being cleared on orientation change\\\"\\n\" +\n \" }\\n\" +\n \" ],\\n\" +\n \" \\\"has_more\\\": true,\\n\" +\n \" \\\"quota_max\\\": 300,\\n\" +\n \" \\\"quota_remaining\\\": 298\\n\" +\n \"}\";\n Gson gson = new GsonBuilder().create();\n\n String jsonArray = \"[\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"android-manifest\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 23,\\n\" +\n \" \\\"user_id\\\": 4805044,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 14,\\n\" +\n \" \\\"profile_image\\\": \\\"https://www.gravatar.com/avatar/36cdb80d69e1f92ca429bdf69ccb05c6?s=128&d=identicon&r=PG&f=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Blake Lassiter\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4805044/blake-lassiter\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 13,\\n\" +\n \" \\\"answer_count\\\": 0,\\n\" +\n \" \\\"score\\\": 0,\\n\" +\n \" \\\"last_activity_date\\\": 1462763611,\\n\" +\n \" \\\"creation_date\\\": 1462762986,\\n\" +\n \" \\\"last_edit_date\\\": 1462763611,\\n\" +\n \" \\\"question_id\\\": 37107214,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37107214/set-title-to-hidden-on-android-app\\\",\\n\" +\n \" \\\"title\\\": \\\"Set Title To Hidden on Android App\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"c++\\\",\\n\" +\n \" \\\"windows\\\",\\n\" +\n \" \\\"bluetooth\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 937,\\n\" +\n \" \\\"user_id\\\": 1183804,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"accept_rate\\\": 83,\\n\" +\n \" \\\"profile_image\\\": \\\"https://i.stack.imgur.com/Z5Lyl.jpg?s=128&g=1\\\",\\n\" +\n \" \\\"display_name\\\": \\\"Chris\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/1183804/chris\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": true,\\n\" +\n \" \\\"view_count\\\": 17,\\n\" +\n \" \\\"answer_count\\\": 1,\\n\" +\n \" \\\"score\\\": 3,\\n\" +\n \" \\\"last_activity_date\\\": 1462763542,\\n\" +\n \" \\\"creation_date\\\": 1462701554,\\n\" +\n \" \\\"last_edit_date\\\": 1462743555,\\n\" +\n \" \\\"question_id\\\": 37098557,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37098557/c-winsock-bluetooth-connection-at-command-error-received\\\",\\n\" +\n \" \\\"title\\\": \\\"C++ WinSock Bluetooth Connection - AT Command - Error Received\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"tags\\\": [\\n\" +\n \" \\\"java\\\",\\n\" +\n \" \\\"android\\\",\\n\" +\n \" \\\"user-interface\\\",\\n\" +\n \" \\\"fragment\\\",\\n\" +\n \" \\\"android-orientation\\\"\\n\" +\n \" ],\\n\" +\n \" \\\"owner\\\": {\\n\" +\n \" \\\"reputation\\\": 4,\\n\" +\n \" \\\"user_id\\\": 4835349,\\n\" +\n \" \\\"user_type\\\": \\\"registered\\\",\\n\" +\n \" \\\"profile_image\\\": \\\"https://lh4.googleusercontent.com/-ZFmtDec26j4/AAAAAAAAAAI/AAAAAAAAAC4/RGi5zw-SFao/photo.jpg?sz=128\\\",\\n\" +\n \" \\\"display_name\\\": \\\"jl1992\\\",\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/users/4835349/jl1992\\\"\\n\" +\n \" },\\n\" +\n \" \\\"is_answered\\\": false,\\n\" +\n \" \\\"view_count\\\": 41,\\n\" +\n \" \\\"answer_count\\\": 2,\\n\" +\n \" \\\"score\\\": -1,\\n\" +\n \" \\\"last_activity_date\\\": 1462761445,\\n\" +\n \" \\\"creation_date\\\": 1462750768,\\n\" +\n \" \\\"question_id\\\": 37105990,\\n\" +\n \" \\\"link\\\": \\\"http://stackoverflow.com/questions/37105990/android-how-do-i-prevent-class-variables-being-cleared-on-orientation-change\\\",\\n\" +\n \" \\\"title\\\": \\\"Android: how do I prevent class variables being cleared on orientation change\\\"\\n\" +\n \" }\\n\" +\n \" ]\";\n Type collectionType = new TypeToken<List<Item>>(){}.getType();\n List<Item> items = gson.fromJson(jsonArray, collectionType);\n System.out.println(items.size());\n for (int i = 0; i < items.size();i++) {\n System.out.println(items.get(i).questionId);\n }\n\n Item[] items2 = gson.fromJson(jsonArray, Item[].class);\n ArrayList<Item> items3 = new ArrayList<Item>(Arrays.asList(items2));\n for (int i = 0; i < items3.size();i++) {\n System.out.println(items3.get(i).questionId);\n }\n\n Result r = gson.fromJson(json, Result.class);\n for (int i = 0; i < r.items.size();i++) {\n System.out.println(r.items.get(i).questionId);\n }\n }", "private String getListData() {\n String jsonStr = \"{ \\\"users\\\" :[\" +\n \"{\\\"name\\\":\\\"Ritesh Kumar\\\",\\\"designation\\\":\\\"Team Leader\\\",\\\"department\\\":\\\"Main office\\\",\\\"location\\\":\\\"Brampton\\\"}\" +\n \",{\\\"name\\\":\\\"Frank Lee\\\",\\\"designation\\\":\\\"Developer\\\",\\\"department\\\":\\\"Developer's office\\\",\\\"location\\\":\\\"Markham\\\"}\" +\n \",{\\\"name\\\":\\\"Arthur Young\\\",\\\"designation\\\":\\\"Charted Accountant\\\",\\\"department\\\":\\\"Account office\\\",\\\"location\\\":\\\"Toronto\\\"}] }\";\n return jsonStr;\n }", "public EntryToJson(){\n AccountEntry entry;\n Account acc;\n String fileName;\n ArrayList<AccountEntry> entryList;\n ArrayList<String> accList = Bank.getInstance().getAllAccounts();\n for (int i = 0; i<accList.size();i++) {\n acc = Bank.getInstance().findAccount(accList.get(i));\n entryList = acc.getEntryObjects();\n fileName = acc.getNum()+\".json\";\n\n\n Gson gson = new GsonBuilder().create();\n System.out.println(gson.toJson(entryList));\n\n\n }\n\n }", "public abstract List toNameValueList();", "public static String convertListToJSON(List<?> objectsList) {\n\t\tString listAsJSON = \"\";\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\ttry {\n\t\t\tlistAsJSON = objectMapper.writeValueAsString(objectsList);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listAsJSON;\n\t}", "public static String toJSONContainingAnything(List<Object> list) {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"[\");\n for (Iterator<Object> it = list.iterator(); it.hasNext();) {\n sb.append(\"\\n\");\n Object value = it.next();\n\n appendObject(sb, value);\n if (it.hasNext()) {\n sb.append(\",\\n\");\n }\n }\n sb.append(\"]\\n\");\n return sb.toString();\n }", "public static String getPointsOfInterestJSON(ArrayList<ArrayList<Double>> geoList){\n Map featureCollectionObj = new LinkedHashMap();\n featureCollectionObj.put(\"type\", \"FeatureCollection\");\n\n /*\"features\": [\n { type\": \"Feature\",\n \"geometry\": {\n */\n JSONArray geoJSON = new JSONArray();\n\n /*\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"LineString\",\n */\n Map featureObj = new LinkedHashMap();\n featureObj.put(\"type\",\"Feature\");\n\n /*\n \"type\": \"Polygon\",\n \"coordinates\": [ [ [102.0, 0.0], [103.0, 1.0] ..\n */\n Map polygonObj = new LinkedHashMap();\n polygonObj.put(\"type\",\"Polygon\");\n\n ArrayList<ArrayList<ArrayList<Double>>> geoArrayList = new ArrayList<>();\n geoArrayList.add(geoList);\n polygonObj.put(\"coordinates\", geoArrayList);\n\n featureObj.put(\"geometry\",polygonObj);\n\n geoJSON.add(featureObj);\n\n featureCollectionObj.put(\"features\",geoJSON);\n\n String geoJSONtoString = JSONValue.toJSONString(featureCollectionObj);\n System.out.print(geoJSONtoString);\n return geoJSONtoString;\n\n }", "public static void main(String[] args) {\n\n\t\tPerson krishna = new Person(101, \"Krisha\", \"TX\");\n\t\tPerson chani = new Person(111, \"Chani\", \"CA\");\n\t\tPerson boni = new Person(121, \"Boni\", \"FL\");\n\t\tPerson gopi = new Person(91, \"Gopi\", \"NC\");\n\t\tPerson suss = new Person(101, \"Suss\", \"ML\");\n\n\t\t// Add to array\n\n\t\tList<Person> personlist = new ArrayList<Person>();\n\n\t\tpersonlist.add(suss);\n\t\tpersonlist.add(gopi);\n\t\tpersonlist.add(boni);\n\t\tpersonlist.add(chani);\n\t\tpersonlist.add(krishna);\n\n\t\tSystem.out.println(\"Print the person names: \" + personlist);\n\n\t\t// By using for each loop to print person names\n\n\t\tfor (Person person : personlist) {\n\t\t\tSystem.out.println(person);\n\t\t}\n\n\t\tSystem.out.println(\"*******************\");\n\n\t\tMap<Integer, String> personsmap = new HashMap<Integer, String>();\n\n\t\t// put every value list to Map\n\t\tfor (Person person : personlist) {\n\t\t\tpersonsmap.put(person.getId(), person.getName());\n\t\t\tSystem.out.println(person);\n\t\t}\n\n\t\t// Streams\n\t\tSystem.out.println(\" *********** Strems ***********\");\n\t\t Map<Integer, String>\n map = personlist.stream()\n .collect(\n Collectors\n .toMap(\n Person::getId,\n Person::getName,\n (id, name)\n -> id + \", \" + name,\n HashMap::new));\n\t\t \n\t\t// print map\n\t map.forEach(\n\t (id, name) -> System.out.println(id + \"=\" + name));\n\n\t}", "public static String listToJson(List<String> list) {\n Gson gson = new Gson();\n String json = gson.toJson(list);\n return json;\n }", "private static String getAgents(ArrayList<Agent> auth){\n String agents =\"\";\n try{\n Iterator<Agent> it = auth.iterator();\n int i = 1;\n while(it.hasNext()){\n Agent currAuth = it.next();\n String authorName = currAuth.getName(); //the name should be always there\n if(authorName==null || \"\".equals(authorName)){\n authorName = \"Author\"+i;\n i++;\n }\n if(currAuth.getURL()!=null &&!\"\".equals(currAuth.getURL())){\n agents+=\"<dd><a property=\\\"dc:creator schema:author prov:wasAttributedTo\\\" resource=\\\"\"+currAuth.getURL()+\"\\\" href=\\\"\"+currAuth.getURL()+\"\\\">\"+authorName+\"</a>\";\n }else{\n agents+=\"<dd>\"+authorName;\n }\n if(currAuth.getInstitutionName()!=null && !\"\".equals(currAuth.getInstitutionName()))\n agents+=\", \"+currAuth.getInstitutionName();\n agents+=\"</dd>\";\n } \n }catch(Exception e){\n System.out.println(\"Error while writing authors, their urls or their instititions.\");\n }\n return agents;\n }", "public JSONArray attributes(final String uri, final Map<String, String> creds, final String [] entries) throws Exception {\n\t\ttry {\n\t\t\tJSONArray requestJSON = new JSONArray();\n\t\t\tfor (String entry: entries) requestJSON.put(entry);\n\t\t\t\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/attributes\");\n\t\t\tcom.sun.jersey.api.client.WebResource.Builder b = r.header(HTTP_HEADER_KEY, key).header(HTTP_HEADER_URI, uri).type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON);\n\t\t\taddMapAsHttpHeader(b, creds);\n\t\t\tString response = b.post(String.class, requestJSON.toString());\n\t \ttry { return new JSONArray(new JSONTokener(response)); }\n\t \tcatch (JSONException e) { throw new Exception(\"JSON syntax error in response\", e); } \n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}", "List<IdentificationDTO> getIdentificationList();", "public void makeJsonResultWithHead(List resultList, HttpServletRequest request, HttpServletResponse response, String listId) throws IOException\r\n {\r\n Map result = CommonUtil.makeHeaderJsonByList(resultList, request);\r\n \r\n Gson gson = new Gson();\r\n \r\n String jsonString = gson.toJson(result);\r\n response.getWriter().print(jsonString);\r\n\r\n }", "public int processingContract(String json,List<Object[]> list);", "public List<Object[]> listAgentIdName();", "public String toString() {\n\t String resultJson=\"\";\t \n\t ObjectToJson jsonObj = new ObjectToJson(this.paperAuthorsList);\n\t try {\n\t\t resultJson = jsonObj.convertToJson(); \n\t }\n\t catch(Exception ex) {\n\t\t System.out.println(\"problem in conversion \"+ex.getMessage());\t\t \n\t }\n\t return resultJson;\n }", "private JsonWrapper convert(List<IMaterialStats> stats) {\n Map<ResourceLocation,IMaterialStats> wrappedStats = stats.stream()\n .collect(Collectors.toMap(\n IMaterialStats::getIdentifier,\n stat -> stat));\n return new JsonWrapper(wrappedStats);\n }", "public String pasarAjson(ArrayList<Cliente> miLista){\n String textoenjson;\n Gson gson = new Gson();\n textoenjson = gson.toJson(miLista);\n\n\n return textoenjson;\n }", "List<Map<String, Object>> getStudentsList();", "public static void main(String[] args) {\n Map<String,String> params = new HashMap<String, String>();\n String[] aa = new String[3];\n aa[0]=\"1\";\n aa[1]=\"2\";\n aa[2]=\"3\";\n String.valueOf(aa);\n System.out.println(String.valueOf(aa));\n params.put(\"userIds\",\"22,33,44\");\n String[] resultArray = null;\n// String contacts = HttpClientsUtil.httpGet(\"http://127.0.0.1:8888/authority/user/contacts/list\",\"\",params);\n// JSONObject myJson = JSONObject.parseObject(contacts);\n /*if(\"success\".equals(myJson.get(\"code\"))){\n JSONArray userArrays =(JSONArray)myJson.get(\"content\");\n int size = userArrays.size();\n resultArray = new String[size];\n for(int i=0;i<size;i++){\n resultArray[i] = ((JSONObject)userArrays.get(i)).get(\"email\")+\"\";\n }\n }*/\n System.out.println(resultArray);\n }", "void getStates(JSONArray j) {\n for (int i = 0; i < j.length(); i++) {\n try {\n //Getting json object\n JSONObject json = j.getJSONObject(i);\n\n //Adding the name of the student to array list\n states.add(json.getString(\"name\"));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\t\tpublic String serialize(List<Person> list) throws Exception {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory\n\t\t\t\t\t.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument doc = builder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"persons\");\n\t\t\tfor (Person p : list) {\n\t\t\t\tElement personElement = doc.createElement(\"person\");\n\t\t\t\tpersonElement.setAttribute(\"id\", String.valueOf(p.getId()));\n\t\t\t\tElement nameElement = doc.createElement(\"name\");\n\t\t\t\tnameElement.setTextContent(p.getName());\n\t\t\t\tpersonElement.appendChild(nameElement);\n\t\t\t\tElement ageElement = doc.createElement(\"age\");\n\t\t\t\tageElement.setTextContent(String.valueOf(p.getAge()));\n\t\t\t\tpersonElement.appendChild(ageElement);\n\t\t\t\trootElement.appendChild(personElement);\n\t\t\t}\n\t\t\tdoc.appendChild(rootElement);\n\t\t\tTransformerFactory transFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer\n\t\t\t\t\t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n\t\t\tStringWriter writer = new StringWriter();\n\t\t\tSource source = new DOMSource(doc);\n\t\t\tResult result = new StreamResult(writer);\n\t\t\ttransformer.transform(source, result);\n\t\t\treturn writer.toString();\n\t\t}", "@Override\n\tpublic String process(List<Object> item) throws Exception {\n\t\tJSONObject jsonObject = new JSONObject();\n\n\t\t\n\n\tString station_id=\"\";\n\tJSONArray array = new JSONArray();\n\t\tfor (Object obj:item) {\n\t\t\tJSONObject programs\t = new JSONObject();\n\t\t\t\n\t\t\t System.out.println(\"obj-----\"+obj.toString());\n\t\t\tMap<String,Object> ob=(Map<String, Object>)obj;\n\t\t station_id=(String)ob.get(\"STATION_ID\");\n\t\tString provider=(String)ob.get(\"PROVIDER\");\n\t\tString start_time=(String)ob.get(\"STATION_ID\");\n\t\tString end_time=(String)ob.get(\"STATION_ID\");\n\n\t\t\n\t\tprograms.put(\"STATION_ID\", station_id);\n\t\t\n\t\t\n\t\tprograms.put(\"END_TIME\", end_time);\n\t\tprograms.put(\"START_TIME\", start_time);\n\t\tprograms.put(\"PROVIDER\", provider);\n\n\t\t\n\t\tarray.put(programs);\n\t\t\n\t//\tSystem.out.println(\"id=-----\"+id);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\t\tjsonObject.put(station_id,array );\n\t\tSystem.out.println(\"jsonObject=\"+jsonObject.toString());\n\t\treturn jsonObject.toString();\n\t}", "public void callbackArtistResponse(List<Artist>artistList);", "public JSONArray getNames(){\n\t\tString url = \"http://127.0.0.1/C:/Users/James/Documents/conTest/testScript.php\";\n\t\t\n\t\tHttpEntity http = null;\n\t\t\n\t\ttry{\n\t\t\tDefaultHttpClient httpCli = new DefaultHttpClient();\n\t\t\tHttpGet httpGet = new HttpGet(url);\n\t\t\t\n\t\t\tHttpResponse httpResponse = httpCli.execute(httpGet);\n\t\t\t\n\t\t\thttp = httpResponse.getEntity();\n\t\t}catch(ClientProtocolException cpe){\n\t\t\tcpe.printStackTrace();\n\t\t}catch(IOException ie){\n\t\t\tie.printStackTrace();\n\t\t}\n\t\t\n\t\tJSONArray jsonArray = null;\n\t\t\n\t\tif(http != null){\n\t\t\ttry{\n\t\t\t\tString entityResponse = EntityUtils.toString(http);\n\t\t\t\t//Log.e(\"Entity Response: \", entityResponse);\n\t\t\t\t\n\t\t\t\tjsonArray = new JSONArray(entityResponse);\n\t\t\t}catch(JSONException je){\n\t\t\t\tje.printStackTrace();\n\t\t\t}catch(IOException ie){\n\t\t\t\tie.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn jsonArray;\n\t}", "@Override\n\t\tpublic String serialize(List<Person> list) throws Exception {\n\t\t\tXmlSerializer serializer = Xml.newSerializer();\n\t\t\tStringWriter writer = new StringWriter();\n\t\t\tserializer.setOutput(writer);\n\t\t\tserializer.startDocument(\"UTF-8\", true);\n\t\t\tserializer.startTag(\"\", \"persons\");\n\t\t\tfor (Person p : list) {\n\t\t\t\tserializer.startTag(\"\", \"person\");\n\t\t\t\tserializer.attribute(\"\", \"id\", String.valueOf(p.getId()));\n\t\t\t\tserializer.startTag(\"\", \"name\");\n\t\t\t\tserializer.text(p.getName());\n\t\t\t\tserializer.endTag(\"\", \"name\");\n\t\t\t\tserializer.startTag(\"\", \"age\");\n\t\t\t\tserializer.text(String.valueOf(p.getAge()));\n\t\t\t\tserializer.endTag(\"\", \"age\");\n\t\t\t\tserializer.endTag(\"\", \"person\");\n\t\t\t}\n\t\t\tserializer.endTag(\"\", \"persons\");\n\t\t\tserializer.endDocument();\n\t\t\treturn writer.toString();\n\t\t}", "public static String writeItemsToJson(List<EntityRef> items) {\r\n\t\tif(items == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn EntityFactory.writeToJSONArrayString(items);\r\n\t\t} catch (JSONObjectAdapterException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t}", "protected List<AuthorNames> getAuthorNames() {\n return authors.values().stream()\n .map(a-> new AuthorNames(a.getFirstName(), a.getLastName()))\n .collect(Collectors.toList());\n }", "public static void writeToJSON(ArrayList<Shapes> list, String path) {\n // set json array\n JSONArray collective_shapes = new JSONArray();\n\n for (int i = 0; i < list.size(); i++) {\n // set json objects\n JSONObject obj = new JSONObject();\n JSONObject cubic_values = new JSONObject();\n JSONObject sphere_values = new JSONObject();\n JSONObject cilinder_values = new JSONObject();\n\n try {\n if (list.get(i).shapeName().contains(\"cubic\")) {\n // put cubic values inside new json object\n cubic_values.put(\"id\", list.get(i).id());\n cubic_values.put(\"length\", list.get(i).length());\n cubic_values.put(\"width\", list.get(i).width());\n cubic_values.put(\"height\", list.get(i).height());\n // put values inside collective object\n obj.put(\"cubic\", cubic_values);\n }\n if (list.get(i).shapeName().contains(\"sphere\")) {\n // put sphere values inside new json object\n sphere_values.put(\"id\", list.get(i).id());\n sphere_values.put(\"radius\", list.get(i).radius());\n // put values inside collective object\n obj.put(\"sphere\", sphere_values);\n }\n\n if (list.get(i).shapeName().contains(\"cilinder\")) {\n // put cilinder values inside new json object\n cilinder_values.put(\"id\", list.get(i).id());\n cilinder_values.put(\"height\", list.get(i).height());\n cilinder_values.put(\"radius\", list.get(i).radius());\n // put values inside collective object\n obj.put(\"cilinder\", cilinder_values);\n }\n } catch (JSONException e) {\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n JOptionPane.showMessageDialog(new JFrame(), errors.toString(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n // add empty array\n collective_shapes.add(obj);\n }\n\n // try to write file to selected path else error\n try (FileWriter file = new FileWriter(path)) {\n file.write(collective_shapes.toJSONString());\n file.flush();\n\n } catch (IOException e) {\n // check errors and set show message dialog\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n JOptionPane.showMessageDialog(new JFrame(), errors.toString(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "java.util.List<java.lang.String>\n getAuthoritiesList();", "public static void listGeolocations()\n {\n {\n JSONArray listGeolocations = new JSONArray();\n List<User> users = User.findAll();\n for (User user : users)\n {\n listGeolocations.add(Arrays.asList(user.firstName, user.latitude, user.longitude));\n }\n renderJSON(listGeolocations);\n }\n }", "public static String getallUsernames() {\n\t\tFile f = new File(DB_FOLDER + DB_AUTH_FILE + DB_FILE_TYPE);\n\t\tFileReader fReader;\n\n\t\tJSONArray usernamesInJSON = new JSONArray();\n\n\t\ttry {\n\t\t\tfReader = new FileReader(f);\n\n\t\t\tBufferedReader bReader = new BufferedReader(fReader);\n\n\t\t\tString s = bReader.readLine();\n\n\t\t\twhile (s != null) {\n\t\t\t\tString[] pair = s.split(\"\\\\s+\");\n\n\t\t\t\tusernamesInJSON.put(pair[0]);\n\n\t\t\t\ts = bReader.readLine();\n\t\t\t}\n\n\t\t\tfReader.close();\n\t\t\tbReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn usernamesInJSON.toString();\n\t}", "private List<Map<String, Object>> writeProducers() {\n // Create json array for producers\n List<Map<String, Object>> jsonProducers = new ArrayList<>();\n Database database = Database.getInstance();\n\n // Convert each distributor object to json object\n for (Producer producer : database.getProducersMap().values()) {\n Map<String, Object> jsonProducer = new LinkedHashMap<>();\n\n jsonProducer.put(Constants.ID, producer.getId());\n jsonProducer.put(Constants.MAXDISTRIBUTORS, producer.getMaxDistributors());\n jsonProducer.put(Constants.PRICEKW, producer.getPriceKW());\n jsonProducer.put(Constants.ENERGYTYPE, producer.getEnergyType().getLabel());\n jsonProducer.put(Constants.ENERGYPERDISTRIBUTOR, producer.getEnergyPerDistributor());\n\n // Convert producer's monthly stats to json objects\n List<Map<String, Object>> jsonMonthlyStats = writeStats(producer);\n\n jsonProducer.put(Constants.MONTHLYSTATS, jsonMonthlyStats);\n\n jsonProducers.add(jsonProducer);\n }\n return jsonProducers;\n }", "void onMultipleIssuers(final List<Issuer> issuers);", "public static JSONObjectList createJSONObjectList(List<RequirementForm> reqList)\r\n{\r\n\tJSONObjectList jsonlist = new JSONObjectList();\r\n int length = reqList.size();\r\n for (int i = 0; i < length; i++) {\r\n JSONObject uc =createJSONObject(reqList.get(i));\r\n\r\n jsonlist.getListobject().add(uc);\r\n\r\n }\r\n \r\n return jsonlist;\r\n}", "@Override\n\tpublic String toString() {\n\t\treturn \"StudentForList [marks=\" + Arrays.toString(marks) + \", names=\" + names + \"]\";\n\t}", "public ArrayList<Person> getAllFromServer() throws IOException, JSONException {\n\t\tArrayList<Person> personsFromSrv = new ArrayList<Person>();\n\t\t\n\t\tURL url = new URL(\"https://jsonplaceholder.typicode.com/users\");\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tInputStream is = conn.getInputStream();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\tString line;\n\t\tStringBuilder jsonBuilder = new StringBuilder();\n\t\tJSONArray jsonArray = null;\n\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tjsonBuilder.append(line);\n\t\t}\n\t\tString json = jsonBuilder.toString();\n\t\tjson = json.replace(\"\\n\", \"\").replace(\"\\r\", \"\");\n\t\tSystem.out.println(json);\n\t\ttry {\n\t\t\tjsonArray = new JSONArray(json);\n\t\t} catch (JSONException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\tJSONObject person = jsonArray.getJSONObject(i);\n\t\t\tPerson p = personMapper.convertFromJSONObjectToPersonObject(person);\n\t\t\tpersonsFromSrv.add(p);\n\t\t}\n\t\treturn personsFromSrv;\n\t}", "private String[] convertToList(List<String> lstAddresses) {\r\n\t\tString[] arrayAddresses = new String[lstAddresses.size()];\r\n\t\tint index=0;\r\n\t\tfor(String strAddress: lstAddresses) {\r\n\t\t\tarrayAddresses[index++] = strAddress;\r\n\t\t}\r\n\t\treturn arrayAddresses;\r\n\t}", "public String supplierList(SupplierDetails s);", "List<String> getArtists();", "private void createQualificationsList(){\n\t\tlistedQualList.clear();\n\t\tlistedQuals=jdbc.get_qualifications();\n\t\tfor(Qualification q: listedQuals){\n\t\t\tlistedQualList.addElement(q.getQualName());\n\t\t}\n\t}", "@Override\r\n public String encodeAll(List<LinkedHashMap<String, String>> dataList) {\n StringBuilder str = new StringBuilder();\r\n\r\n for (LinkedHashMap<String, String> dataMap : dataList) {\r\n Collection<String> value = dataMap.values();\r\n\r\n for (Iterator<String> itr = value.iterator(); itr.hasNext();) {\r\n str = str.append(\"\\\"\").append(itr.next()).append(\"\\\"\").append(\",\");\r\n\r\n }\r\n str = str.deleteCharAt(str.length() - 1);\r\n str = str.append(\"\\n\");\r\n }\r\n\r\n return str.toString();\r\n\r\n }", "public List<Ingredient> toIngredient(List<String> ingredientsList) {\n\t\tList<Ingredient> ingredients = new ArrayList<Ingredient>();\n\t\tfor (int i = 0; i < ingredientsList.size(); i++) {\n\t\t\tingredients.add(new Ingredient(ingredientsList.get(i)));\n\t\t}\n\t\treturn ingredients;\n\t}", "@RequestMapping(value = \"/authority\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<String>> getAll() throws URISyntaxException {\n\t\tlog.debug(\"REST request to get all authority\");\n\t\treturn new ResponseEntity<>(authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList()), HttpStatus.OK);\n\t}", "private String processandFormReponse(Set<String> lcsSet) throws JSONException{\n\t\tList<String> finalList = new ArrayList<>(lcsSet);\n\t\tCollections.sort(finalList);\n\t\tJSONObject finaljson = new JSONObject();\n\t\tJSONArray jsonArray = new JSONArray();\n\t\tfor(String str : finalList) {\n\t\t\tJSONObject row = new JSONObject();\n\t\t\trow.put(VALUE, str);\n\t\t\tjsonArray.put(row);\n\t\t}\n\t\tfinaljson.put(LCS, jsonArray);\n\t\tString values = finaljson.toString();\n\t\treturn values;\n\t\t\n\t}", "public static HashMap CreateDbObjByParams(String recipeName, String imageLocation, String usernameId, String imageToken, ArrayList<String> ingredientsArr, String instructions) throws JSONException {\n JsonObject json = new JsonObject();\n json.addProperty(\"imageLocation\", imageLocation);\n json.addProperty(\"imageToken\", imageToken);\n// JSONArray jsArray = new JSONArray(ingredientsArr);\n String arr = new Gson().toJson(ingredientsArr);\n json.addProperty(\"ingredients\", arr);\n json.addProperty(\"instructions\", instructions);\n json.addProperty(\"recipeName\", recipeName);\n json.addProperty(\"usernameId\", usernameId);\n JsonArray jsonArray = new JsonArray();\n jsonArray.add(json);\n\n\n HashMap<String, Object> js = new HashMap();\n js.put(\"imageLocation\", imageLocation);\n js.put(\"imageToken\", imageToken);\n js.put(\"ingredients\", ingredientsArr);\n js.put(\"instructions\", instructions);\n js.put(\"recipeName\", recipeName);\n js.put(\"usernameId\", usernameId);\n\n return js;\n }", "public Future<JsonArray> getList() {\n Promise<JsonArray> profileList = Promise.promise();\n JsonObject profile = new JsonObject()\n .put(\"id\", 1)\n .put(\"name\", \"Subramanian\")\n .put(\"status\", true)\n .put(\"address\", new JsonObject()\n .put(\"city\", \"Coimbatore\")\n .put(\"state\", \"Tamil Nadu\"));\n\n JsonArray profiles = new JsonArray()\n .add(profile)\n .add(new JsonObject()\n .put(\"id\", 2)\n .put(\"name\", \"Ram\")\n .put(\"status\", true)\n .put(\"address\", new JsonObject()\n .put(\"city\", \"Chennai\")\n .put(\"state\", \"Tamil Nadu\")));\n\n profileList.complete(profiles);\n\n return profileList.future();\n }", "private static void LessonCollections() {\n List<Employee> employeeList = new ArrayList<Employee>();\n\n //Create Employees from Employee objects constructor\n Employee emp1 = new Employee(\"Jordan\", \"Walker\");\n Employee emp2 = new Employee(\"Mark\", \"Tuttle\");\n Employee emp3 = new Employee(\"Wayne\", \"Henderson\");\n\n //Add them to employee list\n employeeList.add(emp1);\n employeeList.add(emp2);\n employeeList.add(emp3);\n\n //Create employee and add to list in one line\n employeeList.add(new Employee(\"Erick\", \"Jensen\"));\n\n //Get info from list\n System.out.println(employeeList.get(3).GetFullName());\n\n //Print all full names from employee list\n for(Employee e : employeeList) {\n System.out.println(e.GetFullName());\n }\n\n }", "@GET\n\t@Path(\"/helloJSONList\")\n\t/**\n\t * Here is an example of a simple REST get request that returns a String.\n\t * We also illustrate here how we can convert Java objects to JSON strings.\n\t * @return - List of words as JSON\n\t * @throws IOException\n\t */\n\tpublic String helloJSONList() throws IOException {\n\n\t\tList<String> listOfWords = new ArrayList<String>();\n\t\tlistOfWords.add(\"Hello\");\n\t\tlistOfWords.add(\"World!\");\n\n\t\t// We can turn arbatory Java objects directly into JSON strings using\n\t\t// Jackson seralization, assuming that the Java objects are not too complex.\n\t\tString listAsJSONString = oWriter.writeValueAsString(listOfWords);\n\n\t\treturn listAsJSONString;\n\t}", "@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}", "private JSONArray foodsToJson() {\n JSONArray jsonArray = new JSONArray();\n\n for (Food f : units) {\n jsonArray.put(f.toJson());\n }\n\n return jsonArray;\n }", "public static String convertUserListToNameList(List<User> userList) {\n\t\tString result = \"\";\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.disable(MapperFeature.DEFAULT_VIEW_INCLUSION);\n\t\ttry {\n\t\t\tresult = mapper.writerWithView(Views.Public.class)\n\t\t\t\t\t\t .writeValueAsString(userList);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\n\t}", "public List<Individual> getListOfActiveIndividuals(){\n List<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> activeIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn activeIndividualList;\n\n }", "@Override\n\tpublic String onData() {\n\t\tMap<String, Object> mapObj = new HashMap<String, Object>();\n\t\tfor (BasicNameValuePair pair : pairs) {\n\t\t\tmapObj.put(pair.getName(), pair.getValue());\n\t\t}\n\t\tGson gson = new Gson();\n\t\tString json = gson.toJson(mapObj);\n\t\treturn json;\n\t}", "private String[] getJSONStringList() throws SQLException {\n String sql = \"select concat(c.chart_type, ', ', c.intermediate_data) content \" +\n \"from pride_2.pride_chart_data c, pride_2.pride_experiment e \" +\n \"where c.experiment_id = e.experiment_id \" +\n \"and e.accession = ? \" +\n \"order by 1\";\n\n Connection conn = PooledConnectionFactory.getConnection();\n PreparedStatement stat = conn.prepareStatement(sql);\n stat.setString(1, accession);\n ResultSet rs = stat.executeQuery();\n\n List<String> jsonList = new ArrayList<String>();\n while (rs.next()) {\n jsonList.add(rs.getString(1));\n }\n\n rs.close();\n conn.close();\n\n return jsonList.toArray(new String[jsonList.size()]);\n }", "public static <T> String list2JSONArrayString(List<T> sourceList) {\n\t\tString json_arr = \"[]\";\n\t\tif (null == sourceList || sourceList.size() == 0) {\n\t\t\treturn json_arr;\n\t\t}\n\t\tjson_arr = JSON.toJSONString(sourceList, false); // set false to no\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// formatted\n\t\tlogger.debug(\"result:\");\n\t\tlogger.debug(json_arr);\n\t\treturn json_arr;\n\t}", "public JSONArray list(final String uri, final Map<String, String> creds) throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/directory\");\n\t\t\tcom.sun.jersey.api.client.WebResource.Builder b = r.header(HTTP_HEADER_KEY, key).header(HTTP_HEADER_URI, uri).accept(MediaType.APPLICATION_JSON);\n\t\t\taddMapAsHttpHeader(b, creds);\n\t\t\tString response = b.get(String.class);\n\t \t\ttry { return new JSONArray(new JSONTokener(response)); }\n\t \t\tcatch (JSONException e) { throw new Exception(\"JSON syntax error in response\", e); }\n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}", "public static Map<String,Wonder> parseWonders(JsonArray wonderList){\n Map<String, Wonder> wonders = new HashMap<String, Wonder>();\n for(JsonElement element: wonderList){\n Wonder newWonder = new Wonder(element.getAsJsonObject());\n wonders.put(newWonder.getName(),newWonder);\n }\n return wonders;\n }", "void outPut(ArrayList<SanPham> list);", "@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}", "private String notificacionesSRToJson(List<DaNotificacion> notificacions){\n String jsonResponse=\"\";\n Map<Integer, Object> mapResponse = new HashMap<Integer, Object>();\n Integer indice=0;\n for(DaNotificacion notificacion : notificacions){\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idNotificacion\",notificacion.getIdNotificacion());\n if (notificacion.getFechaInicioSintomas()!=null)\n map.put(\"fechaInicioSintomas\",DateUtil.DateToString(notificacion.getFechaInicioSintomas(), \"dd/MM/yyyy\"));\n else\n map.put(\"fechaInicioSintomas\",\" \");\n map.put(\"codtipoNoti\",notificacion.getCodTipoNotificacion().getCodigo());\n map.put(\"tipoNoti\",notificacion.getCodTipoNotificacion().getValor());\n map.put(\"fechaRegistro\",DateUtil.DateToString(notificacion.getFechaRegistro(), \"dd/MM/yyyy\"));\n map.put(\"SILAIS\",notificacion.getCodSilaisAtencion()!=null?notificacion.getCodSilaisAtencion().getNombre():\"\");\n map.put(\"unidad\",notificacion.getCodUnidadAtencion()!=null?notificacion.getCodUnidadAtencion().getNombre():\"\");\n //Si hay persona\n if (notificacion.getPersona()!=null){\n /// se obtiene el nombre de la persona asociada a la ficha\n String nombreCompleto = \"\";\n nombreCompleto = notificacion.getPersona().getPrimerNombre();\n if (notificacion.getPersona().getSegundoNombre()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoNombre();\n nombreCompleto = nombreCompleto+\" \"+notificacion.getPersona().getPrimerApellido();\n if (notificacion.getPersona().getSegundoApellido()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoApellido();\n map.put(\"persona\",nombreCompleto);\n //Se calcula la edad\n int edad = DateUtil.calcularEdadAnios(notificacion.getPersona().getFechaNacimiento());\n map.put(\"edad\",String.valueOf(edad));\n //se obtiene el sexo\n map.put(\"sexo\",notificacion.getPersona().getSexo().getValor());\n if(edad > 12 && notificacion.getPersona().isSexoFemenino()){\n map.put(\"embarazada\", envioMxService.estaEmbarazada(notificacion.getIdNotificacion()));\n }else\n map.put(\"embarazada\",\"--\");\n if (notificacion.getMunicipioResidencia()!=null){\n map.put(\"municipio\",notificacion.getMunicipioResidencia().getNombre());\n }else{\n map.put(\"municipio\",\"--\");\n }\n }else{\n map.put(\"persona\",\" \");\n map.put(\"edad\",\" \");\n map.put(\"sexo\",\" \");\n map.put(\"embarazada\",\"--\");\n map.put(\"municipio\",\"\");\n }\n\n mapResponse.put(indice, map);\n indice ++;\n }\n jsonResponse = new Gson().toJson(mapResponse);\n UnicodeEscaper escaper = UnicodeEscaper.above(127);\n return escaper.translate(jsonResponse);\n }", "IbeisIndividual addIndividual(String name) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, IndividualNameAlreadyExistsException;", "@GetMapping(\"/get_all_employees\")\n public String getAllEmployees(){\n\n Gson gsonBuilder = new GsonBuilder().create();\n List<Employee> initial_employee_list = employeeService.get_all_employees();\n String jsonFromJavaArray = gsonBuilder.toJson(initial_employee_list);\n\n return jsonFromJavaArray;\n }", "public static List<String> filesToListOfStrings(List<String> fileNames) throws FileNotFoundException {\n List<String> jsonStrings = new ArrayList<>();\n\n for(int i = 0; i < fileNames.size(); i ++){\n String s = fileToString(fileNames.get(i));\n jsonStrings.add(s);\n }\n\n return jsonStrings;\n }", "@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }", "protected String [] extractOrganismFrom(Collection<CrossReference> references){\n\n String taxId = \"-\";\n String organismName = \"-\";\n\n for (CrossReference ref : references){\n // look for the taxId cross reference and get the identifier (taxId) and the organism name (text of a cross reference)\n if (WriterUtils.TAXID.equalsIgnoreCase(ref.getDatabase())){\n taxId = ref.getIdentifier();\n if (ref.getText() != null){\n organismName = ref.getText();\n }\n }\n }\n\n return new String [] {taxId, organismName};\n }", "public void processList(List<String> inList);", "private void getIDOLS(int index){\n\t\t\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,-resources,jive.username\"; \n\t\tString url = urlBase+\"/api/core/v3/people/\"+this.myUsers[index].id +\"/@followers\"+params;\n\t\tHttpGet getRequest = new HttpGet(url);\n\t\t\n\t\t\n\t\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nAdding IDOLs for: \" + this.myUsers[index].login); \n\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString json_output = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjson_output = removeThrowLine(json_output);\n\t\t getIdolElements(index, json_output);\n\n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public HashMap<Long, String> fetchNamesFromIds(ArrayList<Long> ids){\n StringBuilder idsStringBuilder = new StringBuilder();\n for (long id : ids){\n idsStringBuilder.append(id).append(\",\");\n }\n String idsString = idsStringBuilder.substring(0, idsStringBuilder.length()-1);\n String response = zendeskAPI.makeGetRequest(USER_REQUEST + \"show_many.json?ids=\" + idsString);\n return JSONParser.parseUserStringForNames(response);\n }", "public List<String> getSubjects(List<String> fullURIs) {\n List<String> abbreviatedURI = new ArrayList<>();\n StmtIterator si = model.listStatements();\n Resource r;\n String uri;\n Statement s;\n while (si.hasNext()) {\n s = si.nextStatement();\n r = s.getSubject();\n uri = r.getURI();\n fullURIs.add(uri);\n abbreviatedURI.add(FileManager.getSimpleFilename(uri));\n }\n return abbreviatedURI;\n }", "public static void main(String[] args) throws Exception {\n JSONParser jsonParser = new JSONParser();\n \nFileReader reader = new FileReader(\"C:\\\\Users\\\\Training\\\\eclipse-workspace\\\\venkatesh\\\\src\\\\main\\\\java\\\\venkatesh\\\\cars.json\");\n \n //Read JSON file\n Object obj = jsonParser.parse(reader);\n \n JSONArray carsList = (JSONArray) obj;\n System.out.println(carsList);\n \n /* \n //Iterate over employee array\n carsList.forEach( emp -> parseEmployeeObject( (JSONObject) emp ) );\n \n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n \n private static void parseEmployeeObject(JSONObject employee)\n {\n //Get employee object within list\n \t\n \t//JSONObject site = (JSONObject)jsonSites.get(i);\n JSONObject employeeObject = (JSONObject) employee.get(\"metadata\");\n \n //Get employee first name\n String firstName = (String) employeeObject.get(\"make\"); \n System.out.println(firstName);\n \n //Get employee last name\n String lastName = (String) employeeObject.get(\"model\"); \n System.out.println(lastName);\n \n //Get employee website name\n String website = (String) employeeObject.get(\"price\"); \n System.out.println(website);\n }\n */\n}", "java.util.List<com.ljzn.grpc.personinfo.PersoninfoMessage> \n getPersonInfoList();", "public static List<String> writeCarToJson(List<Car> carList) {\n List<String> jsonFileNameList = new ArrayList<>();\n for (Car element : carList) {\n String fileName = \"Streams_2/target/single_car_output/\" + element.getBrand() + \"_\" + element.getPrice() + \"zl\" + \".json\";\n try (FileWriter fileWriter = new FileWriter(fileName)) {\n gson.toJson(element, fileWriter);\n } catch (Exception e) {\n throw new MyException(ExceptionCode.READ_WRITE, \"WRONG FILE NAME\");\n }\n jsonFileNameList.add(fileName);\n }\n return jsonFileNameList;\n }", "public JsonObject getRecipesByIngredients(String ingredients) throws Exception\n {\n URL url = new URL(baseUrl+\"i=\"+ingredients);\n/* TODO \nYou have to use the url to retrieve the contents of the website. \nThis will be a String, but in JSON format. */\n String contents = \"\";\n Scanner urlScanner = new Scanner(url.openStream());\n while (urlScanner.hasNextLine()){\n contents += urlScanner.nextLine();\n }\n urlScanner.close();\n JsonObject recipes = (JsonObject)Jsoner.deserialize(contents,new JsonObject());\n\n return recipes;\n }", "ArrayList getAttributes();", "public interface JsonUtil {\n /**\n * Encode {@link org.schemarepo.Subject}s into a {@link String} for use by\n * {@link #subjectNamesFromJson(String)}\n *\n * The format is an array of objects containing a name field, for example:\n *\n * [{\"name\": \"subject1\"}, {\"name\": \"subject2\"}]\n *\n * @param subjects the Subject objects to encode\n * @return The {@link org.schemarepo.Subject} objects encoded as a String\n */\n String subjectsToJson(Iterable<Subject> subjects);\n\n /**\n * Decode a string created by {@link #subjectsToJson(Iterable)}\n *\n * @param str The String to decode\n * @return an {@link java.lang.Iterable} of {@link Subject}\n */\n Iterable<String> subjectNamesFromJson(String str);\n\n /**\n * Encode {@link org.schemarepo.SchemaEntry} objects into a {@link String} for use by\n * {@link #schemasFromJson(String)}\n *\n * The format is an array of objects containing id and schema fields, for example:\n *\n * [{\"id\": \"0\", \"schema\": \"schema1\"}, {\"id\": \"2\", \"schema\": \"schema2\"}]\n *\n * @param allEntries the SchemaEntry objects to encode\n * @return The {@link org.schemarepo.SchemaEntry} objects encoded as a String\n */\n String schemasToJson(Iterable<SchemaEntry> allEntries);\n\n /**\n * Decode a string created by {@link #schemasToJson(Iterable)}\n *\n * @param str The String to decode\n * @return An {@link java.lang.Iterable} of {@link SchemaEntry}\n */\n Iterable<SchemaEntry> schemasFromJson(String str);\n}", "@SuppressWarnings(\"unchecked\")\n\tprivate static void writePurchaseListFromFile(){\n\t\tJSONArray purchaseListJSON = new JSONArray();\n\n\t\tfor (Purchase purchase : Main.purchaseList) {\n\n\t\t\t// Write the customer JSON\n\t\t\tJSONObject purchaseDetails = new JSONObject();\n\n\t\t\tJSONObject customerDetails = new JSONObject();\n\t\t\tcustomerDetails.put(\"name\", purchase.getCustomer().getName());\n\t\t\tcustomerDetails.put(\"surname\", purchase.getCustomer().getSurname());\n\t\t\tcustomerDetails.put(\"username\", purchase.getCustomer().getUsername());\n\t\t\tcustomerDetails.put(\"password\", purchase.getCustomer().getPassword());\n\t\t\tcustomerDetails.put(\"account\", \"customer\");\n\t\t\t// The account key value can only be \"customer\", because only a customer is in purchase list\n\n\t\t\t// Write the wine JSON\n\t\t\tJSONObject wineDetails = new JSONObject();\n\t\t\twineDetails.put(\"name\", purchase.getWine().getName());\n\t\t\twineDetails.put(\"year\", purchase.getWine().getYear());\n\t\t\twineDetails.put(\"description\", purchase.getWine().getDescription());\n\t\t\twineDetails.put(\"vine\", purchase.getWine().getVine());\n\t\t\twineDetails.put(\"quantity\", purchase.getWine().getQuantity());\n\t\t\twineDetails.put(\"price\", purchase.getWine().getPrice());\n\n\t\t\tpurchaseDetails.put(\"quantity\", purchase.getQuantity());\n\t\t\tpurchaseDetails.put(\"amount\", purchase.getAmount());\n\t\t\tpurchaseDetails.put(\"date\", purchase.getDate().toString());\n\t\t\tpurchaseDetails.put(\"shipped\", purchase.isShipped());\n\t\t\tpurchaseDetails.put(\"customer\", customerDetails);\n\t\t\tpurchaseDetails.put(\"wine\", wineDetails);\n\n\t\t\tpurchaseListJSON.add(purchaseDetails);\n\n\t\t}\n\n\t\t// Write JSON file\n\t\ttry (FileWriter file = new FileWriter(\"purchaseList.json\")) {\n\t\t\tfile.write(purchaseListJSON.toJSONString());\n\t\t\tfile.flush();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "List<Gist> deserializeGistsFromJson(String json);", "@Logging\n\tprivate List<Employee> getEmployee(List<String> aFileList) {\n\t\t\n\t\tList<Employee> aEmployeList = aFileList.stream()\n\t\t\t\t.skip(1) // skip the header line\n\t\t\t\t.map(line -> line.split(\",\")) // transform each line to an array\n\t\t\t\t.map(employeeData -> new Employee(Long.parseLong(employeeData[0]), employeeData[1], employeeData[2],\n\t\t\t\t\t\temployeeData[3], employeeData[4])) // transform each array to an entity\n\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\treturn aEmployeList;\n\t\t\n\t}", "public ArrayList<String> arrayListFromIngredient(List<IngredientModel> ingredientModelList){\n ArrayList<String> ingredientList = new ArrayList<>();\n\n //Loops through List<IngredientModel>, retrieves ingredient name and adds to ArrayList<String>\n for(int i = 0; i<ingredientModelList.size(); i++){\n String ingredient = ingredientModelList.get(i).getName();\n ingredientList.add(ingredient);\n }\n\n return ingredientList;\n }", "java.util.List<People>\n getUserList();", "public static void collectIndividualClients(List<? super Individual> cl) {\n cl.add(new Individual());\n cl.add(new Retiree());\n// Individual i = cl.get(0);\n }", "private List<Person> fetchingUtility() {\n List<Person> fetchedList = new ArrayList<>();\n fetchedList.add(new Person(-26.220616, 28.079329, \"PJ0\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.187616, 28.079329, \"PJ1\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.207616, 28.079329, \"PJ2\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.217616, 28.079329, \"PJ3\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.346316, 28.079329, \"PJ4\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.215896, 28.079329, \"PJ5\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.215436, 28.079129, \"PJ6\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.431461, 28.079329, \"PJ7\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.168879, 28.079329, \"PJ8\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.227616, 28.079329, \"PJ9\", \"https://twitter.com/pjapplez\", false));\n\n return fetchedList;\n }", "@Nonnull List<String> getNameList();", "void getDataSuccess(List<GrilInfo.GrilsEntity> grilsEntities);", "public Wrapper listNames() {\n Wrapper<List<HashMap<String, String>>> wrapper = new Wrapper();\n try {\n List<String> userListIds = user.getWordLists();\n List<HashMap<String, String>> listNames = new ArrayList<HashMap<String, String>>();\n\n for (String stringId : userListIds) {\n ObjectId id = new ObjectId(stringId);\n WordList wl = mongoOperations.findById(id, WordList.class, \"entries\");\n\n HashMap<String, String> object = new HashMap<>();\n object.put(\"name\", wl.getName());\n object.put(\"id\", wl.getId());\n listNames.add(object);\n }\n\n wrapper.setData(listNames);\n wrapper.setSucces(true);\n } catch (Exception e) {\n wrapper.setSucces(false);\n wrapper.setMsg(e.toString());\n }\n\n return wrapper;\n }", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}" ]
[ "0.61776406", "0.52940696", "0.52225906", "0.5167618", "0.51388365", "0.50518024", "0.503359", "0.4981715", "0.49777815", "0.49564946", "0.49414593", "0.491027", "0.48475948", "0.47817418", "0.4769946", "0.47590563", "0.47579205", "0.47232234", "0.47219178", "0.47198218", "0.47136855", "0.4710411", "0.47048533", "0.47000074", "0.4651392", "0.46478572", "0.4644587", "0.46428058", "0.4630016", "0.4614911", "0.46074668", "0.46056348", "0.45705128", "0.45466134", "0.45416558", "0.45384416", "0.4503364", "0.45011082", "0.45009896", "0.45007095", "0.44944125", "0.4493226", "0.44887474", "0.44862947", "0.4478503", "0.4462259", "0.44479227", "0.44420382", "0.4430034", "0.4428368", "0.4417879", "0.44155535", "0.44136286", "0.44129518", "0.44125327", "0.44006744", "0.43983376", "0.43825653", "0.4377818", "0.43700674", "0.4366067", "0.43639693", "0.43617916", "0.4361016", "0.43579686", "0.4350619", "0.43441707", "0.43407923", "0.4333748", "0.4333492", "0.43306038", "0.43298414", "0.43289226", "0.43264607", "0.43238944", "0.4323484", "0.43219224", "0.43121427", "0.43092158", "0.43003482", "0.4298176", "0.42934397", "0.42697513", "0.4266187", "0.4258547", "0.4257131", "0.42552257", "0.4250489", "0.42405888", "0.4239112", "0.42335272", "0.42327005", "0.42323494", "0.4226519", "0.4224738", "0.42203975", "0.4218734", "0.42140675", "0.42110008", "0.42105165" ]
0.73713714
0
Get the "vclassId" parameter from the request and instantiate the VClass. There must be one, and it must be valid.
protected VClass getVclassParameter(VitroRequest vreq) { String vclassId = vreq.getParameter("vclassId"); if (StringUtils.isEmpty(vclassId)) { log.error("parameter vclassId expected but not found"); throw new IllegalStateException("parameter vclassId expected "); } return instantiateVclass(vclassId, vreq); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected List<String> getVclassIds(VitroRequest vreq) {\n\t\tString[] vclassIds = vreq.getParameterValues(\"vclassId\");\n\t\tif ((vclassIds == null) || (vclassIds.length == 0)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected \");\n\t\t}\n\n\t\tfor (String vclassId : vclassIds) {\n\t\t\tinstantiateVclass(vclassId, vreq);\n\t\t}\n\n\t\treturn Arrays.asList(vclassIds);\n\t}", "public static JSONObject processVclassResultsJSON(Map<String, Object> map, VitroRequest vreq, boolean multipleVclasses) {\n JSONObject rObj = new JSONObject();\n VClass vclass=null; \n \n try { \n \n // Properties from ontologies used by VIVO - should not be in vitro\n DataProperty fNameDp = (new DataProperty()); \n fNameDp.setURI(\"http://xmlns.com/foaf/0.1/firstName\");\n DataProperty lNameDp = (new DataProperty());\n lNameDp.setURI(\"http://xmlns.com/foaf/0.1/lastName\");\n DataProperty preferredTitleDp = (new DataProperty());\n preferredTitleDp.setURI(\"http://vivoweb.org/ontology/core#preferredTitle\");\n \n if( log.isDebugEnabled() ){\n @SuppressWarnings(\"unchecked\")\n Enumeration<String> e = vreq.getParameterNames();\n while(e.hasMoreElements()){\n String name = (String)e.nextElement();\n log.debug(\"parameter: \" + name);\n for( String value : vreq.getParameterValues(name) ){\n log.debug(\"value for \" + name + \": '\" + value + \"'\");\n } \n }\n }\n \n //need an unfiltered dao to get firstnames and lastnames\n WebappDaoFactory fullWdf = vreq.getFullWebappDaoFactory();\n \n String[] vitroClassIdStr = vreq.getParameterValues(\"vclassId\"); \n if ( vitroClassIdStr != null && vitroClassIdStr.length > 0){ \n for(String vclassId: vitroClassIdStr) {\n vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassId);\n if (vclass == null) {\n log.error(\"Couldn't retrieve vclass \"); \n throw new Exception (\"Class \" + vclassId + \" not found\");\n } \n }\n }else{\n log.error(\"parameter vclassId URI parameter expected \");\n throw new Exception(\"parameter vclassId URI parameter expected \");\n }\n List<String> vclassIds = Arrays.asList(vitroClassIdStr); \n //if single vclass expected, then include vclass. This relates to what the expected behavior is, not size of list \n if(!multipleVclasses) {\n //currently used for ClassGroupPage\n rObj.put(\"vclass\", \n new JSONObject().put(\"URI\",vclass.getURI())\n .put(\"name\",vclass.getName()));\n } else {\n //For now, utilize very last VClass (assume that that is the one to be employed)\n //TODO: Find more general way of dealing with this\n //put multiple ones in?\n if(vclassIds.size() > 0) {\n \tint numberVClasses = vclassIds.size();\n vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassIds.get(numberVClasses - 1));\n rObj.put(\"vclass\", new JSONObject().put(\"URI\",vclass.getURI())\n .put(\"name\",vclass.getName()));\n } \n // rObj.put(\"vclasses\", new JSONObject().put(\"URIs\",vitroClassIdStr)\n // .put(\"name\",vclass.getName()));\n }\n if (vclass != null) { \n \n rObj.put(\"totalCount\", map.get(\"totalCount\"));\n rObj.put(\"alpha\", map.get(\"alpha\"));\n \n List<Individual> inds = (List<Individual>)map.get(\"entities\");\n log.debug(\"Number of individuals returned from request: \" + inds.size());\n JSONArray jInds = new JSONArray();\n for(Individual ind : inds ){\n JSONObject jo = new JSONObject();\n jo.put(\"URI\", ind.getURI());\n jo.put(\"label\",ind.getRdfsLabel());\n jo.put(\"name\",ind.getName());\n jo.put(\"thumbUrl\", ind.getThumbUrl());\n jo.put(\"imageUrl\", ind.getImageUrl());\n jo.put(\"profileUrl\", UrlBuilder.getIndividualProfileUrl(ind, vreq));\n \n jo.put(\"mostSpecificTypes\", JsonServlet.getMostSpecificTypes(ind,fullWdf)); \n jo.put(\"preferredTitle\", JsonServlet.getDataPropertyValue(ind, preferredTitleDp, fullWdf)); \n \n jInds.put(jo);\n }\n rObj.put(\"individuals\", jInds);\n \n JSONArray wpages = new JSONArray();\n //Made sure that PageRecord here is SolrIndividualListController not IndividualListController\n List<PageRecord> pages = (List<PageRecord>)map.get(\"pages\"); \n for( PageRecord pr: pages ){ \n JSONObject p = new JSONObject();\n p.put(\"text\", pr.text);\n p.put(\"param\", pr.param);\n p.put(\"index\", pr.index);\n wpages.put( p );\n }\n rObj.put(\"pages\",wpages); \n \n JSONArray jletters = new JSONArray();\n List<String> letters = Controllers.getLetters();\n for( String s : letters){\n JSONObject jo = new JSONObject();\n jo.put(\"text\", s);\n jo.put(\"param\", \"alpha=\" + URLEncoder.encode(s, \"UTF-8\"));\n jletters.put( jo );\n }\n rObj.put(\"letters\", jletters);\n } \n } catch(Exception ex) {\n log.error(\"Error occurred in processing JSON object\", ex);\n }\n return rObj;\n }", "public Class(String v, String h, String n) {\n\n\t\tclassName = n;\n\t\tvisability = v;\n\t\thierarchy = h;\n\t\tmain = false;\n\t\tisFinished = false;\n\t\tHighestMethod = 1;\n\t\tHighestVariable = 1;\n\t}", "private Class<V> getClassVO() throws ClassNotFoundException {\n Type superclass = this.getClass().getGenericSuperclass();\n\n if (superclass instanceof ParameterizedType) {\n ParameterizedType parameterizedType = (ParameterizedType) superclass;\n Type[] typeArguments = parameterizedType.getActualTypeArguments();\n\n if (typeArguments.length == 2) {\n Type typeVO = typeArguments[1];\n\n if (typeVO instanceof Class) {\n Class c = (Class) typeVO;\n String name = c.getName();\n\n return (Class<V>) Class.forName(name);\n }\n }\n }\n\n return null;\n }", "public VehicleClass(Integer vehicleClassId,\n\t\t\t\t\t\tInteger vehicleClassNumber,\n\t\t String vehicleClass)\n\t{\n\t\tthis.vehicleClassId = vehicleClassId;\n\t\tthis.vehicleClassNumber = vehicleClassNumber;\n\t\tthis.vehicleClass = vehicleClass;\n\t}", "public void setvID(int vID) {\n this.vID = vID;\n }", "public void setClassId(int value) {\r\n this.classId = value;\r\n }", "ClassInstanceCreationExpression getClass_();", "HxParameter createParameter(final String className);", "public TestBSSVRequest() {\r\n }", "public void setClassId(Integer classId) {\r\n this.classId = classId;\r\n }", "private void startRequest(int resid) {\n faceRequest.startMainClassify(this, resid, new AbstractRetrofitCallback<MainClassifyBean>() {\n @Override\n public void onSuccess(MainClassifyBean result) {\n Logger.i(TAG, \"startMainClassify\", \"\" + result.toString());\n }\n });\n }", "public void setClassId(Integer classId) {\n this.classId = classId;\n }", "VehicleClass() {}", "@POST\n @Path(\"/{version:[vV][1]}/allocate\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @Operation(description = \"Create a 3GPP Service Instance on a version provided\", responses = @ApiResponse(\n content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))))\n public Response createServiceInstance(Allocate3gppService request, @PathParam(\"version\") String version,\n @Context ContainerRequestContext requestContext) throws ApiException {\n String requestId = requestHandlerUtils.getRequestId(requestContext);\n return processServiceInstanceRequest(request, Action.createInstance, version, requestId, null,\n requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX));\n }", "public com.vodafone.global.er.decoupling.binding.request.ErVersionInfoRequest createErVersionInfoRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ErVersionInfoRequestImpl();\n }", "public void setClassid(Integer classid) {\r\n this.classid = classid;\r\n }", "public VehicleClass(Integer classNumber,\n\t\t\t\t\t\tString vehicleClass) \n\t{\n\t\tthis.vehicleClassNumber = classNumber;\n\t\tthis.vehicleClass = vehicleClass;\n\t}", "VTClass(String crn, String course, String title, String type, \n\t\t\tString cHrs, String size, String instructor, String days, \n\t\t\tString additionalDay, String beginTime, String additionalBeginTime,\n\t\t\tString endTime, String additionalEndTime, String location, String additionalLocation){\n\t\n\t\tthis.CRN = crn;\n\t\tthis.course = course;\n\t\tthis.title = title;\n\t\tthis.type = type;\n\t\tthis.creditHours = cHrs;\n\t\tthis.capacity = size;\n\t\tthis.instructor = instructor;\n\t\tthis.days = days;\n\t\tthis.additionalDay = additionalDay;\n\t\tthis.beginTime = beginTime;\n\t\tthis.additionalBeginTime = additionalBeginTime;\n\t\tthis.endTime = endTime;\n\t\tthis.additionalEndTime = additionalEndTime;\n\t\tthis.location = location;\n\t\tthis.additionalLocation = additionalLocation;\n\t}", "public static JSONObject processVClassGroupJSON(VitroRequest vreq, ServletContext context, VClassGroup vcg) {\n JSONObject map = new JSONObject(); \n try {\n ArrayList<JSONObject> classes = new ArrayList<JSONObject>(vcg.size());\n for( VClass vc : vcg){\n JSONObject vcObj = new JSONObject();\n vcObj.put(\"name\", vc.getName());\n vcObj.put(\"URI\", vc.getURI());\n vcObj.put(\"entityCount\", vc.getEntityCount());\n classes.add(vcObj);\n }\n map.put(\"classes\", classes); \n map.put(\"classGroupName\", vcg.getPublicName());\n map.put(\"classGroupUri\", vcg.getURI());\n \n } catch(Exception ex) {\n log.error(\"Error occurred in processing VClass group \", ex);\n }\n return map; \n }", "public Vin() {\n super(\"Vin\");\n\n }", "public void setClassid(Integer classid) {\n this.classid = classid;\n }", "private Long initializeVideo(Video v) {\n\t\tLong id = new Long(v.getId());\n\t\tif (id == 0 && !videos.containsKey(id)) {\n\t\t\tid = new Long(idGenerator.incrementAndGet());\n\t\t\tv.setId(id.longValue());\n\t\t\tv.setDataUrl(getUrlBaseForLocalServer() \n\t\t\t\t\t+ VideoSvcApi.VIDEO_DATA_PATH.replaceFirst(\n\t\t\t\t\t\t\t\"\\\\{id\\\\}\", id.toString()));\n\t\t\tvideos.put(id, v);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\treturn id;\n\t}", "public MyVM( ) \n {\n // initialise instance variables\n try \n {\n // your code here\n \tthis.si=new ServiceInstance(new URL(SJSULAB.getVmwareHostURL()),\n\t\t\t\t\tSJSULAB.getVmwareLogin(), SJSULAB.getVmwarePassword(), true);\n } \n catch ( Exception e ) \n { \n \tSystem.out.println( e.toString() ) ; \n }\n\n }", "VTClass(String crn, String course, String title, String type, \n\t\t\tString cHrs, String size, String instructor, String days, String beginTime,\n\t\t\tString endTime, String location){\n\t\n\t\tthis.CRN = crn;\n\t\tthis.course = course;\n\t\tthis.title = title;\n\t\tthis.type = type;\n\t\tthis.creditHours = cHrs;\n\t\tthis.capacity = size;\n\t\tthis.instructor = instructor;\n\t\tthis.days = days;\n\t\tthis.additionalDay = \"\";\n\t\tthis.beginTime = beginTime;\n\t\tthis.additionalBeginTime = \"\";\n\t\tthis.endTime = endTime;\n\t\tthis.additionalEndTime = \"\";\n\t\tthis.location = location;\n\t\tthis.additionalLocation = \"\";\n\t}", "public VITACareer()\r\n {\r\n }", "@WebMethod(operationName = \"classIsValid\")\r\n public Boolean classIsValid(@WebParam(name = \"Class_ID\") int Class_ID) {\r\n //class Class_ID exists or not\r\n try {\r\n org.netbeans.xml.schema.classxmlschema.Class cla = daoService.getClassInfo(Class_ID);\r\n\r\n if (cla != null) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "public com.vodafone.global.er.decoupling.binding.request.GetVersionRequest createGetVersionRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetVersionRequestImpl();\n }", "private Class<?> getClass(String parameterName, String classToCheck, final BeanValidationResult result) {\n if (StringUtils.isBlank(classToCheck)) {\n result.addResult(parameterName, classToCheck, ValidationStatus.INVALID, \"parameter is null or blank\");\n return null;\n }\n\n // Get the class for the event protocol\n try {\n return Class.forName(classToCheck);\n } catch (final ClassNotFoundException e) {\n result.addResult(parameterName, classToCheck, ValidationStatus.INVALID,\n \"class not found: \" + e.getMessage());\n LOGGER.warn(\"class not found: \", e);\n return null;\n }\n }", "public void setClassId(Long ClassId) {\n this.ClassId = ClassId;\n }", "private Class<?> defineClass(String paramString, URL paramURL) throws IOException {\n/* 364 */ byte[] arrayOfByte = getBytes(paramURL);\n/* 365 */ CodeSource codeSource = new CodeSource(null, (Certificate[])null);\n/* 366 */ if (!paramString.equals(\"sun.reflect.misc.Trampoline\")) {\n/* 367 */ throw new IOException(\"MethodUtil: bad name \" + paramString);\n/* */ }\n/* 369 */ return defineClass(paramString, arrayOfByte, 0, arrayOfByte.length, codeSource);\n/* */ }", "public VDCRequest() {\n\t\tthis.listVirVM = new HashMap<>();\n\t\tthis.listVirLink = new LinkedList<>();\n\t\t// this.listVirSwitch = new LinkedList<>();\n\t\tthis.numVM = 0;\n\t\tthis.vdcID = 0;\n\t\tthis.bwrequest = 0;\n\t}", "public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }", "public void setClassid(String classid) {\n this.classid = classid == null ? null : classid.trim();\n }", "public void openClassPicker(View v) {\n // Attach data to fragment\n Bundle bundle = new Bundle();\n bundle.putStringArrayList(FULL_CLASS_LIST_KEY, mFullClassList);\n mClassPickerFragment.setArguments(bundle);\n // Show the Class Picker DialogFragment.\n mClassPickerFragment.show(mFragmentManager, getString(R.string.add_classes));\n }", "public static Object createObject(String className, Class<?> parameterType, Object initarg) {\n try {\n Class<?> aClass = Class.forName(className);\n return createObject(aClass, parameterType, initarg);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }", "public VDCRequest(Map<Integer, VirtualMachine> listVM, LinkedList<VirtualLink> listVLink, double startTime,\n\t\t\tdouble lifeTime, int vdcID) {\n\t\tthis.listVirVM = listVM;\n\t\tthis.listVirLink = listVLink;\n\t\t// this.listVirSwitch = listVSwitch;\n\t\tthis.startTime = startTime;\n\t\tthis.lifeTime = lifeTime;\n\t\tthis.vdcID = vdcID;\n\t}", "public VNode(VRSContext context,VRL vrl)\n\t{\n\t\tthis.vrsContext=context;\n setLocation(vrl); \n\t}", "public static Class<?> getNewVersion(String className) {\n Class<?> ret = versions.get(className.hashCode());\n if (ret != null)\n return ret;\n return null;\n }", "ClassC initClassC(ClassC iClassC)\n {\n iClassC.updateElementValue(\"ClassC\");\n return iClassC;\n }", "@Override\n public Constraint converConstrain(String classname, String parvarn1, String parvarn2, String parvarn3) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {\n IntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); IntVar varConverZ = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; varConverZ.id = parvarn3 ;\n Class<?> clasCon = Class.forName(classname);\n Constructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class, JaCoP.core.IntVar.class});\n Constraint c = (Constraint) constru2.newInstance(varConverX,varConverY, varConverZ);\n return c;\n }", "static public QRScanProviderVolunteerRequest create(String serializedData) {\n Gson gson = new Gson();\n return gson.fromJson(serializedData, QRScanProviderVolunteerRequest.class);\n }", "@SuppressWarnings(\"unused\")\n\tprivate VNode()\n {\n \tvrsContext=null;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate Class<IFieldSetAdaptor> getClass(EquationStandardSession session, FunctionClassLoader classLoader, String optionId,\n\t\t\t\t\tString fieldId, String pvName, String type) throws EQException\n\t{\n\t\tif (LOG.isInfoEnabled())\n\t\t{\n\t\t\tLOG.debug(\"getInstance - loading definition of class for option [\" + optionId + \"], field [\" + fieldId + \"]\");\n\t\t}\n\t\tClass<IFieldSetAdaptor> c = classLoader.loadClass(session, optionId, fieldId, pvName, type);\n\t\treturn c;\n\t}", "public void openCreateClassesActivity(View v) {\n Intent intent = new Intent(this, CreateClassesActivity.class);\n startActivity(intent);\n }", "private Pokemon createPokemonFromClass(Class<?extends Pokemon> cl, Coord position) {\n\t\tConstructor<? extends Pokemon> con = null;\n\t\ttry {\n\t\t\tcon = cl.getConstructor(Environment.class, Coord.class, Movement.class);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tPokemon evolution = null;\n\t\ttry {\n\t\t\tevolution = con.newInstance(this, position, Movement.Down);\n\t\t} catch (InstantiationException\n\t\t\t\t| IllegalAccessException\n\t\t\t\t| IllegalArgumentException\n\t\t\t\t| InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn evolution;\n\t}", "private Customer parseNewCustomer(HttpServletRequest request, int cust_id){\n\t\t//parse new customer from request\n\t\tCustomer cust = new Customer();\n\t\tcust.setID(cust_id);\n\t\tcust.setFirstName(request.getParameter(\"first_name\"));\n\t\tcust.setLastName(request.getParameter(\"last_name\"));\n\t\tcust.setAddress(request.getParameter(\"address\"));\n\t\tcust.setCity(request.getParameter(\"city\"));\n\t\tcust.setState(request.getParameter(\"state\"));\n\t\tcust.setPhoneNumber(request.getParameter(\"phone\"));\n\t\treturn cust;\n\t}", "public ShowVideoResponse() {\n }", "public TboFlightSearchRequest() {\n}", "public static <T> ReflectionResponse<Constructor<T>> getConstructor(Class<T> clazz, Class<?>... params) {\n Validate.notNull(clazz, \"clazz cannot be null\");\n Validate.notNull(params, \"params cannot be null\");\n try {\n return new ReflectionResponse<>(clazz.getConstructor(params));\n } catch (NoSuchMethodException e) {\n return new ReflectionResponse<>(e);\n }\n }", "public ParameterizedInstantiateFactory(Class<? extends T> classToInstantiate) {\r\n super();\r\n this.classToInstantiate = classToInstantiate;\r\n }", "protected <T> InputParameter<T> getInputParameter(HttpServletRequest request, String paramName, Class<T> clazz) {\n\t\t\n\t\tString paramValue = request.getParameter(paramName) ;\n\t\tif ( paramValue != null ) {\n\t\t\t//T value = convertValue( clazz, paramValue ) ;\n\t\t\tBeanMapper mapper = new BeanMapper();\n\t\t\tT value = mapper.getTypedValue(clazz, paramValue);\n\t\t\treturn new InputParameter<T>(paramName, value);\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"No '\" + paramName + \"' parameter in the request\") ;\n\t\t}\n\t}", "@Override\n\tpublic Constraint converConstrain(String classname, String parvarn1, String parvarn2) throws ClassNotFoundException,\n\t\t\tSecurityException, NoSuchMethodException, IllegalArgumentException,\n\t\t\tInstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException {\n\n\t\tIntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; \n\t\tClass<?> clasCon = Class.forName(classname);\n\t\tConstructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class});\n\t\tConstraint c = (Constraint) constru2.newInstance(varConverX,varConverY);\n\t\treturn c;\n\t}", "public static String initLbInstanceId() {\n try {\n String url = \"http://169.254.169.254/latest/meta-data/instance-id\";\n\n HttpClient client = HttpClient.newHttpClient();\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(url))\n .build();\n\n byte[] result = client.send(request, HttpResponse.BodyHandlers.ofByteArray()).body();\n String instanceId = new String(result);\n System.out.println(\"[Load Balancer] The instance id of the load balancer EC2 Instance is: \" + instanceId);\n\n return instanceId;\n } catch(Exception e) {\n System.out.println(\"[Load Balancer] Wasn't able to obtain the instance id of the load balancer EC2 instance.\");\n return \"BRRAPPPP\";\n }\n }", "private CIVL_Input vdnToInput(VariableDeclarationNode vdn) {\n\t\tString name = vdn.getName();\n\t\tStringBuffer typeBuffer = vdn.getTypeNode().prettyRepresentation();\n\t\tString type = typeBuffer.toString();\n\t\tInitializerNode i = vdn.getInitializer();\n\t\tCIVL_Input ci = new CIVL_Input(name, type);\n\n\t\tif (i == null) {\n\t\t\tci.setInitializer(\"\");\n\t\t}\n\n\t\telse {\n\t\t\tString def = ((ConstantNode) i).getConstantValue().toString();\n\t\t\tci.setInitializer(def);\n\t\t}\n\n\t\treturn ci;\n\t}", "public Object newInstance( ClassLoader classLoader, final Class<?> clazz )\n {\n return Proxy.newProxyInstance( classLoader, new Class[] { clazz },\n new InvocationHandler() {\n public Object invoke( Object proxy, Method method,\n Object[] args ) throws Throwable\n {\n if ( isObjectMethodLocal()\n && method.getDeclaringClass().equals(\n Object.class ) ) { return method.invoke( proxy, args ); }\n \n String _classname = clazz.getName().replaceFirst(clazz.getPackage().getName()+\".\", \"\").toLowerCase();\n \n _classname = _classname.replace(\"$\", \".\"); //dirty hack TODO check\n \n String methodName = _classname\n + \".\" + method.getName();\n \n Object result = null;\n \n String id = \"\";\n \n JSONRPC2Request request = new JSONRPC2Request(methodName, Arrays.asList(args), id);\n client.disableStrictParsing(true);\n \n try{\n \tJSONRPC2Response response = client.send(request);\n result = response.getResult();\n \n if(response.getError() != null){\n \tthrow new TracException(response.getError().getMessage());\n }\n }catch(JSONRPC2SessionException e){\n \te.printStackTrace();\n }\n return result;\n }\n } );\n }", "public int getvID() {\n return vID;\n }", "public Class<?> getInpParmClass() {\n\t\treturn inpParmClass;\n\t}", "public Version(Integer id) {\n this.id = id;\n }", "@POST\n @Path(\"/{version:[vV][1]}/activate\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @Operation(description = \"Activate a 3GPP Service Instance on a version provided\", responses = @ApiResponse(\n content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))))\n public Response activateServiceInstance(ActivateOrDeactivate3gppService request,\n @PathParam(\"version\") String version, @Context ContainerRequestContext requestContext) throws ApiException {\n String requestId = requestHandlerUtils.getRequestId(requestContext);\n HashMap<String, String> instanceIdMap = new HashMap<>();\n instanceIdMap.put(\"serviceInstanceId\", request.getServiceInstanceID());\n return activateOrDeactivateServiceInstances(request, Action.activateInstance, version, requestId, instanceIdMap,\n requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX));\n }", "protected Provider(String providerClass, String version) {\n assert !(null == providerClass || \"\".equals(providerClass.trim())) : \"Provider class must be given!\";\n this.providerClass = providerClass;\n this.version = version;\n this.vendorSpecificProperties = initPropertyNames();\n }", "public CvSVM(Mat trainData, Mat responses, Mat varIdx, Mat sampleIdx, CvSVMParams params)\r\n {\r\n\r\n super( CvSVM_1(trainData.nativeObj, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, params.nativeObj) );\r\n\r\n return;\r\n }", "public static ReflectionResponse<Class<?>> getClass(String clazz) {\n Validate.notNull(clazz, \"clazz cannot be null\");\n try {\n return new ReflectionResponse<>(Class.forName(clazz));\n } catch (ClassNotFoundException e) {\n return new ReflectionResponse<>(e);\n }\n }", "public Class loadClass(Result result, String className) {\n\t\n try {\n WebTestsUtil webTestsUtil = WebTestsUtil.getUtil(context.getClassLoader());\n\t //webTestsUtil.appendCLWithWebInfContents();\n\t return webTestsUtil.loadClass(className);\n } catch (Throwable e) {\n\n // @see preVerify Method of Verifier.java\n try {\n ClassLoader cl = getVerifierContext().getAlternateClassLoader();\n if (cl == null) {\n throw e;\n }\n Class c = cl.loadClass(className);\n return c;\n }catch(Throwable ex) {\n /*\n result.addErrorDetails(smh.getLocalString\n (\"com.sun.enterprise.tools.verifier.tests.web.WebTest.Exception\",\n \"Error: Unexpected exception occurred [ {0} ]\",\n new Object[] {ex.toString()}));\n */\n }\n } \n return null;\n }", "private void initValets(){\n //valet in charge of getting movie database data\n mMovieValet = new MovieValet(this);\n //request favorite movie list from database\n mMovieValet.requestMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //valet in charge of getting poster refresh database data\n mRefreshValet = new RefreshValet(this);\n }", "public void setClassVersion(final long classVersion) {\n \t\tthis.classVersion = classVersion;\n \t}", "ClassCcft initClassCcft(ClassCcft iClassCcft)\n {\n iClassCcft.updateElementValue(\"ClassCcft\");\n return iClassCcft;\n }", "public <T extends Vehicle> T getVehicle(Class<T> tClass){\n try {\n return tClass.getConstructor().newInstance();\n } catch (Exception e){\n throw new RuntimeException(\"Cannot create a vehicle of type: \" + tClass, e);\n }\n }", "CabinClassModel findCabinClass(Integer cabinClassIndex);", "public GetVideoRequest(UUID requestUUID, Video video) {\n super(requestUUID, video.getVidUrl());\n this.video = video;\n getVideoRequestCount += 1;\n }", "public <T> T create(Class<T> clz) {\n String service_url = \"\";\n try {\n Field field1 = clz.getField(\"BASE_URL\");\n service_url = (String) field1.get(clz);\n if (TextUtils.isEmpty(service_url)) {\n throw new NullPointerException(\"base_url is null\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return createApiClient(service_url).create(clz);\n }", "public TV() {\r\n\t}", "default HxParameter createParameter(final Class<?> cls) {\n return createParameter(cls.getName());\n }", "protected CipherIV instantiateCipherIV (byte[] cipher, byte[] iv) {\n return new CipherIV(cipher, iv);\n }", "public GXWebObjectBase(HttpContext httpContext, Class contextClass)\n\t{\n\t\tinit(httpContext, contextClass);\n\t\tcastHttpContext();\n\t}", "public AbstractVisualizer createVisualizer(String vizClassName) {\n\t\tClass<?> theClass = null;\n\t\ttry {\n\t\t\ttheClass = Class.forName(vizClassName);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tAbstractVisualizer theViz = null;\n\t //First try and load the one with all parameters\n\t theViz = VisualizerFactory.createVisualizer(theClass, runLocal.glue, null);\n\t if (theViz == null) { //IF that didn't work, try without theControlTarget\n\t theViz = VisualizerFactory.createVisualizer(theClass, runLocal.glue);\n\t }\n\t if (theViz == null) { //IF that didn't work, try without theGlueState\n\t theViz = VisualizerFactory.createVisualizer(theClass);\n\t }\n\t return theViz;\n\t}", "ClassAcft initClassAcft(ClassAcft iClassAcft)\n {\n iClassAcft.updateElementValue(\"ClassAcft\");\n return iClassAcft;\n }", "public VehmonService() {\n }", "private void createVHost(RoutingContext routingContext) {\n LOGGER.debug(\"Info: createVHost method started;\");\n JsonObject requestJson = routingContext.getBodyAsJson();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/vhost\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson.copy(), authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n Future<Boolean> validNameResult = isValidName(requestJson.copy().getString(JSON_VHOST));\n validNameResult.onComplete(validNameHandler -> {\n if (validNameHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.createVHost(requestJson, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Creating vhost\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_EXCHANGE_NAME);\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n\n }", "public VehicleSearchRequest createSearchVechicle() {\r\n\r\n\t\tVehicleSearchRequest searchRequest = new VehicleSearchRequest();\r\n\r\n\t\tif (StringUtils.isBlank(searchLocation)) {\r\n\t\t\tsearchRequest.setLocation(DefaultValues.LOCATION_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setLocation(searchLocation);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchVehicleType)) {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(DefaultValues.VEHICLE_TYPE_DEFAULT.getDef()));\r\n\t\t} else {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(searchVehicleType));\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFin)) {\r\n\t\t\tsearchRequest.setFin(DefaultValues.FIN_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFin(searchFin);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchModel)) {\r\n\t\t\tsearchRequest.setModel(DefaultValues.MODEL_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setModel(searchModel);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFuelType)) {\r\n\t\t\tsearchRequest.setFuelType(FuelType.DEFAULT);\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFuelType(FuelType.getEnum(searchFuelType));\r\n\t\t}\r\n\r\n\t\tif (searchMaxCapacity == 0) {\r\n\t\t\tsearchRequest.setMaxCapacity(DefaultValues.MAX_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxCapacity(searchMaxCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinCapacity == 0) {\r\n\t\t\tsearchRequest.setMinCapacity(DefaultValues.MIN_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinCapacity(searchMinCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinYear == 0) {\r\n\t\t\tsearchRequest.setMinYear(DefaultValues.MIN_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinYear(searchMinYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxYear == 0) {\r\n\t\t\tsearchRequest.setMaxYear(DefaultValues.MAX_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxYear(searchMaxYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxPrice == 0) {\r\n\t\t\tsearchRequest.setMaxPrice(DefaultValues.MAX_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxPrice(searchMaxPrice);\r\n\t\t}\r\n\r\n\t\tif (searchMinPrice == 0) {\r\n\t\t\tsearchRequest.setMinPrice(DefaultValues.MIN_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinPrice(searchMinPrice);\r\n\t\t}\r\n\t\treturn searchRequest;\r\n\t}", "public void setVaccinId (java.lang.Integer vaccinId) {\n\t\tthis.vaccinId = vaccinId;\n\t}", "public abstract Class resolveClass(GenerationContext context);", "void initializeVrf(String vrfName, Configuration vpcCfg) {\n Vrf vrf =\n vrfName.equals(DEFAULT_VRF_NAME)\n ? vpcCfg.getDefaultVrf()\n : Vrf.builder().setOwner(vpcCfg).setName(vrfName).build();\n _cidrBlockAssociations.forEach(cb -> vrf.getStaticRoutes().add(staticRouteToVpcPrefix(cb)));\n }", "public static Object createObject(Class<?> clazz, Class<?>[] parameterTypes, Object[] initargs) {\n try {\n Constructor<?> declaredConstructor = clazz.getDeclaredConstructor(parameterTypes);\n declaredConstructor.setAccessible(true);\n return declaredConstructor.newInstance(initargs);\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return null;\n }", "public Class4(final HttpServletRequest httpServletRequest) {\n\t\tInjector.inject(this, httpServletRequest);\n\t\tbuildMainLayout();\n\t\tsetCompositionRoot(mainLayout);\n\t\tinitForm();\n\n\t\t// TODO add user code here\n\t}", "public static VirtualLink find_vl_from_vnfc(String vnfc_name) {\n\t\tncdb.init();\n\t\tVirtualLink vl = ncdb.find_vl_from_vnfc(vnfc_name);\n\t\tncdb.close();\n\t\treturn vl;\n\t\n\t}", "public Class<?> getParameterClass()\n\t{\n\t\treturn parameterClass;\n\t}", "VipService(int id, String bra, String mod, String col, int seat, double pri, char n, double taxR, double disco) {\n super(id, bra, mod, col, seat, pri, n);\n this.taxRate = taxR;\n this.discount = disco;\n }", "public Variable(boolean vInitialized, boolean vFinal, Keywords.Type Vtype) {\n\t\tisInitialized = vInitialized;\n\t\tisFinal = vFinal;\n\t\ttype = Vtype;\n\t}", "public VideoCreationControllerHelper() {\n\n }", "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"Webcam\");\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n }", "public Entrepot(Vector v){\r\n\t\tthis.id =(Integer)v.get(0);\r\n\t\tthis.localisation=new Localisation(\r\n\t\t\t\t(Integer)v.get(1),\r\n\t\t\t\t(String)v.get(2),\r\n\t\t\t\t(String)v.get(3),\r\n\t\t\t\t(String)v.get(4));\r\n\t\tthis.telephone=(String)v.get(5);\r\n\t}", "public abstract Class<? extends ModificationRequestBase> getRequestClass();", "public VersionModel() {\n }", "private void initClassVBox()\n {\n classVBox = new VBox();\n classVBox.setPrefSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n classVBox.setAlignment(Pos.CENTER);\n classVBox.getStyleClass().add(CLASS_BOX_ELEMENTS);\n }", "public VentanaProveedor(VentanaPrincipal v) {\n initComponents();\n v = ventanaPrincipal;\n cp = new ControladorProveedor();\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\n\tpublic ResponseEntity<?> getClassById(@PathVariable Integer id) {\n\t\tif (classRepository.existsById(id)) {\n\t\t\tClassEntity classEntity = classRepository.findById(id).get();\n\t\t\tlogger.info(\"Viewed class with id number \" + id);\n\t\t\treturn new ResponseEntity<ClassEntity>(classEntity, HttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RESTError>(\n\t\t\t\t\tnew RESTError(HttpStatus.NOT_FOUND.value(), \"Class with id number \" + id + \" not found\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}", "public void setVid(Integer vid) {\n this.vid = vid;\n }", "private NvdEntryArtifactCveMatcher(String cve) {\n this.cveId = Objects.requireNonNull(cve, \"Null is not a CVE id!\");\n }", "Object getClass_();" ]
[ "0.5663356", "0.5299197", "0.5063345", "0.48733944", "0.4868222", "0.48535985", "0.4822818", "0.47971445", "0.47788304", "0.4701368", "0.46944177", "0.46472678", "0.46394104", "0.46172217", "0.46004838", "0.45933917", "0.45919877", "0.45887905", "0.45885867", "0.45734295", "0.45694777", "0.4546336", "0.4516129", "0.45105958", "0.45029572", "0.4492074", "0.4489953", "0.44816172", "0.44603646", "0.44565535", "0.43804768", "0.43719238", "0.4355854", "0.43366376", "0.4329602", "0.4326623", "0.43125284", "0.43092984", "0.43055305", "0.42930558", "0.42893866", "0.4289156", "0.42887276", "0.42870772", "0.42864922", "0.42487794", "0.42290288", "0.42286468", "0.42258245", "0.4209493", "0.41983747", "0.4189394", "0.41834635", "0.4181064", "0.4170649", "0.41643992", "0.41521975", "0.41415814", "0.41369316", "0.41312325", "0.41295248", "0.41267756", "0.41224995", "0.41197714", "0.411976", "0.41123503", "0.41045296", "0.41044167", "0.40956417", "0.40947986", "0.40724677", "0.4070501", "0.40675893", "0.40660447", "0.4064336", "0.4062202", "0.4057474", "0.40525046", "0.40310177", "0.40184376", "0.40152046", "0.40052918", "0.4003551", "0.40022346", "0.40004653", "0.39950013", "0.3992801", "0.39888266", "0.3987063", "0.39853165", "0.39794096", "0.39790806", "0.3974877", "0.39726618", "0.39717108", "0.3965936", "0.39600548", "0.39572406", "0.39549264", "0.39548063" ]
0.79100305
0
Get one or more "vclassId" parameters from the request. Confirm that there is at least one, and that all are valid. Return value is never null and never empty.
protected List<String> getVclassIds(VitroRequest vreq) { String[] vclassIds = vreq.getParameterValues("vclassId"); if ((vclassIds == null) || (vclassIds.length == 0)) { log.error("parameter vclassId expected but not found"); throw new IllegalStateException("parameter vclassId expected "); } for (String vclassId : vclassIds) { instantiateVclass(vclassId, vreq); } return Arrays.asList(vclassIds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected VClass getVclassParameter(VitroRequest vreq) {\n\t\tString vclassId = vreq.getParameter(\"vclassId\");\n\t\tif (StringUtils.isEmpty(vclassId)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected \");\n\t\t}\n\t\treturn instantiateVclass(vclassId, vreq);\n\t}", "public static JSONObject processVclassResultsJSON(Map<String, Object> map, VitroRequest vreq, boolean multipleVclasses) {\n JSONObject rObj = new JSONObject();\n VClass vclass=null; \n \n try { \n \n // Properties from ontologies used by VIVO - should not be in vitro\n DataProperty fNameDp = (new DataProperty()); \n fNameDp.setURI(\"http://xmlns.com/foaf/0.1/firstName\");\n DataProperty lNameDp = (new DataProperty());\n lNameDp.setURI(\"http://xmlns.com/foaf/0.1/lastName\");\n DataProperty preferredTitleDp = (new DataProperty());\n preferredTitleDp.setURI(\"http://vivoweb.org/ontology/core#preferredTitle\");\n \n if( log.isDebugEnabled() ){\n @SuppressWarnings(\"unchecked\")\n Enumeration<String> e = vreq.getParameterNames();\n while(e.hasMoreElements()){\n String name = (String)e.nextElement();\n log.debug(\"parameter: \" + name);\n for( String value : vreq.getParameterValues(name) ){\n log.debug(\"value for \" + name + \": '\" + value + \"'\");\n } \n }\n }\n \n //need an unfiltered dao to get firstnames and lastnames\n WebappDaoFactory fullWdf = vreq.getFullWebappDaoFactory();\n \n String[] vitroClassIdStr = vreq.getParameterValues(\"vclassId\"); \n if ( vitroClassIdStr != null && vitroClassIdStr.length > 0){ \n for(String vclassId: vitroClassIdStr) {\n vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassId);\n if (vclass == null) {\n log.error(\"Couldn't retrieve vclass \"); \n throw new Exception (\"Class \" + vclassId + \" not found\");\n } \n }\n }else{\n log.error(\"parameter vclassId URI parameter expected \");\n throw new Exception(\"parameter vclassId URI parameter expected \");\n }\n List<String> vclassIds = Arrays.asList(vitroClassIdStr); \n //if single vclass expected, then include vclass. This relates to what the expected behavior is, not size of list \n if(!multipleVclasses) {\n //currently used for ClassGroupPage\n rObj.put(\"vclass\", \n new JSONObject().put(\"URI\",vclass.getURI())\n .put(\"name\",vclass.getName()));\n } else {\n //For now, utilize very last VClass (assume that that is the one to be employed)\n //TODO: Find more general way of dealing with this\n //put multiple ones in?\n if(vclassIds.size() > 0) {\n \tint numberVClasses = vclassIds.size();\n vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassIds.get(numberVClasses - 1));\n rObj.put(\"vclass\", new JSONObject().put(\"URI\",vclass.getURI())\n .put(\"name\",vclass.getName()));\n } \n // rObj.put(\"vclasses\", new JSONObject().put(\"URIs\",vitroClassIdStr)\n // .put(\"name\",vclass.getName()));\n }\n if (vclass != null) { \n \n rObj.put(\"totalCount\", map.get(\"totalCount\"));\n rObj.put(\"alpha\", map.get(\"alpha\"));\n \n List<Individual> inds = (List<Individual>)map.get(\"entities\");\n log.debug(\"Number of individuals returned from request: \" + inds.size());\n JSONArray jInds = new JSONArray();\n for(Individual ind : inds ){\n JSONObject jo = new JSONObject();\n jo.put(\"URI\", ind.getURI());\n jo.put(\"label\",ind.getRdfsLabel());\n jo.put(\"name\",ind.getName());\n jo.put(\"thumbUrl\", ind.getThumbUrl());\n jo.put(\"imageUrl\", ind.getImageUrl());\n jo.put(\"profileUrl\", UrlBuilder.getIndividualProfileUrl(ind, vreq));\n \n jo.put(\"mostSpecificTypes\", JsonServlet.getMostSpecificTypes(ind,fullWdf)); \n jo.put(\"preferredTitle\", JsonServlet.getDataPropertyValue(ind, preferredTitleDp, fullWdf)); \n \n jInds.put(jo);\n }\n rObj.put(\"individuals\", jInds);\n \n JSONArray wpages = new JSONArray();\n //Made sure that PageRecord here is SolrIndividualListController not IndividualListController\n List<PageRecord> pages = (List<PageRecord>)map.get(\"pages\"); \n for( PageRecord pr: pages ){ \n JSONObject p = new JSONObject();\n p.put(\"text\", pr.text);\n p.put(\"param\", pr.param);\n p.put(\"index\", pr.index);\n wpages.put( p );\n }\n rObj.put(\"pages\",wpages); \n \n JSONArray jletters = new JSONArray();\n List<String> letters = Controllers.getLetters();\n for( String s : letters){\n JSONObject jo = new JSONObject();\n jo.put(\"text\", s);\n jo.put(\"param\", \"alpha=\" + URLEncoder.encode(s, \"UTF-8\"));\n jletters.put( jo );\n }\n rObj.put(\"letters\", jletters);\n } \n } catch(Exception ex) {\n log.error(\"Error occurred in processing JSON object\", ex);\n }\n return rObj;\n }", "public Collection<String> getParameterIds();", "public synchronized final Vector getClassificationParams() {\n return getParams(CLASSIFICATION);\n }", "java.lang.String getParameterId();", "private void checkParameters()\n\t\tthrows DiameterMissingAVPException {\n\t\tDiameterClientRequest request = getRequest();\n\t\tDiameterAVPDefinition def = ShUtils.getUserIdentityAvpDefinition(getVersion());\n\t\tif (request.getDiameterAVP(def) == null) {\n\t\t\tthrow new DiameterMissingAVPException(def.getAVPCode());\n\t\t}\n\t\tdef = ShUtils.getDataReferenceAvpDefinition(getVersion());\n\t\tif (request.getDiameterAVP(def) == null) {\n\t\t\tthrow new DiameterMissingAVPException(def.getAVPCode());\n\t\t}\n\t}", "com.google.protobuf.ByteString getParameterIdBytes();", "object_detection.protos.Calibration.ClassIdSigmoidCalibrationsOrBuilder getClassIdSigmoidCalibrationsOrBuilder();", "object_detection.protos.Calibration.SigmoidParameters getClassIdSigmoidParametersMapOrThrow(\n int key);", "public void setClassId(Integer classId) {\r\n this.classId = classId;\r\n }", "object_detection.protos.Calibration.ClassIdFunctionApproximationsOrBuilder getClassIdFunctionApproximationsOrBuilder();", "@Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"id\", id);\r\n return params;\r\n }", "public void setClassId(Integer classId) {\n this.classId = classId;\n }", "public void setClassid(Integer classid) {\r\n this.classid = classid;\r\n }", "public void setvID(int vID) {\n this.vID = vID;\n }", "@java.lang.Override\n\n public object_detection.protos.Calibration.SigmoidParameters getClassIdSigmoidParametersMapOrThrow(\n int key) {\n\n java.util.Map<java.lang.Integer, object_detection.protos.Calibration.SigmoidParameters> map =\n internalGetClassIdSigmoidParametersMap().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "@java.lang.Override\n\n public object_detection.protos.Calibration.SigmoidParameters getClassIdSigmoidParametersMapOrThrow(\n int key) {\n\n java.util.Map<java.lang.Integer, object_detection.protos.Calibration.SigmoidParameters> map =\n internalGetClassIdSigmoidParametersMap().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "@WebMethod(operationName = \"classIsValid\")\r\n public Boolean classIsValid(@WebParam(name = \"Class_ID\") int Class_ID) {\r\n //class Class_ID exists or not\r\n try {\r\n org.netbeans.xml.schema.classxmlschema.Class cla = daoService.getClassInfo(Class_ID);\r\n\r\n if (cla != null) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "public void setClassid(Integer classid) {\n this.classid = classid;\n }", "public void setClassId(int value) {\r\n this.classId = value;\r\n }", "public static JSONObject processVClassGroupJSON(VitroRequest vreq, ServletContext context, VClassGroup vcg) {\n JSONObject map = new JSONObject(); \n try {\n ArrayList<JSONObject> classes = new ArrayList<JSONObject>(vcg.size());\n for( VClass vc : vcg){\n JSONObject vcObj = new JSONObject();\n vcObj.put(\"name\", vc.getName());\n vcObj.put(\"URI\", vc.getURI());\n vcObj.put(\"entityCount\", vc.getEntityCount());\n classes.add(vcObj);\n }\n map.put(\"classes\", classes); \n map.put(\"classGroupName\", vcg.getPublicName());\n map.put(\"classGroupUri\", vcg.getURI());\n \n } catch(Exception ex) {\n log.error(\"Error occurred in processing VClass group \", ex);\n }\n return map; \n }", "public Set<String> classIdSearch(\n\t\t\tfinal String partialClassId,\n\t\t\tfinal String partialClassName,\n\t\t\tfinal String partialClassDescription)\n\t\t\tthrows ServiceException {\n\t\t\n\t\ttry {\n\t\t\tSet<String> result = null;\n\t\t\t\n\t\t\tif(partialClassId != null) {\n\t\t\t\tresult = new HashSet<String>(\n\t\t\t\t\t\tclassQueries.getClassIdsFromPartialId(partialClassId));\n\t\t\t}\n\t\t\t\n\t\t\tif(partialClassName != null) {\n\t\t\t\tList<String> classIds = \n\t\t\t\t\tclassQueries.getClassIdsFromPartialName(partialClassName);\n\t\t\t\t\n\t\t\t\tif(result == null) {\n\t\t\t\t\tresult = new HashSet<String>(classIds);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult.retainAll(classIds);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(partialClassDescription != null) {\n\t\t\t\tList<String> classIds =\n\t\t\t\t\tclassQueries.getClassIdsFromPartialDescription(partialClassDescription);\n\t\t\t\t\n\t\t\t\tif(result == null) {\n\t\t\t\t\tresult = new HashSet<String>(classIds);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult.retainAll(classIds);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If all of the parameters were null.\n\t\t\tif(result == null) {\n\t\t\t\tresult = new HashSet<String>(classQueries.getAllClassIds());\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t}\n\t\tcatch(DataAccessException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "public List<String> getClassIdsFromPartialClassId(\n\t\t\tfinal String partialClassId) \n\t\t\tthrows ServiceException {\n\t\t\n\t\ttry {\n\t\t\treturn classQueries.getClassIdsFromPartialId(partialClassId);\n\t\t}\n\t\tcatch(DataAccessException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }", "public int[] getParams()\n\t{\n\t\treturn null;\n\t}", "private void validateGetIdPInputValues(String resourceId) throws IdentityProviderManagementException {\n\n if (StringUtils.isEmpty(resourceId)) {\n String data = \"Invalid argument: Identity Provider resource ID value is empty\";\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_GET_REQUEST_INVALID, data);\n }\n }", "public final String[] getParameterId() {\n return this.parameterId;\n }", "private CarAttribute getCarIdsFromRequest(HttpServletRequest request, String attributeId, boolean isApproved) {\n\t\tString cAttrId = request.getParameter(\"carAttributeId\" + attributeId);\n\t\tString carIds = request.getParameter(\"carAttributeIds\" + cAttrId);\n\t\tString oldValue = request.getParameter(\"oldValue\" + cAttrId);\n\t\t\n\t\t// Get updated value\n\t\tString valueCarAttr = request.getParameter(\"v_\" + cAttrId); \n\n\t\tAttributeValueProcessStatus accepted = (AttributeValueProcessStatus) getCarLookupManager().getAttributeValueProcessStatus(\n\t\t\t\tAttributeValueProcessStatus.ACCEPTED);\n\t\tAttributeValueProcessStatus rejected = (AttributeValueProcessStatus) getCarLookupManager().getAttributeValueProcessStatus(\n\t\t\t\tAttributeValueProcessStatus.REJECTED);\n\n\t\tCarAttribute dbCarAttribute = null;\n\t\tif (StringUtils.isNotBlank(carIds)) {\n\t\t\tStringTokenizer st = new StringTokenizer(carIds, \",\");\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString carAttributeId = st.nextToken();\n\t\t\t\tif (StringUtils.isNotBlank(carAttributeId)) {\n\t\t\t\t\tdbCarAttribute = carManager.getCarAttributeFromId(Long.parseLong(carAttributeId));\n\t\t\t\t\tif (isApproved) {\n\t\t\t\t\t\tdbCarAttribute.setAttributeValueProcessStatus(accepted);\n\n\t\t\t\t\t\tdbCarAttribute.setAttrValue(valueCarAttr);\n\n\t\t\t\t\t\t//Make sure the value is not already contained in the set\n\t\t\t\t\t\tif (!isInLookUpValues(dbCarAttribute.getAttribute().getAttributeLookupValues(), valueCarAttr)) {\n\t\t\t\t\t\t\t// Create new Attribute Value and store it\n\t\t\t\t\t\t\tAttributeLookupValue attrValue = new AttributeLookupValue();\n\t\t\t\t\t\t\tattrValue.setValue(valueCarAttr);\n\t\t\t\t\t\t\tattrValue.setAttribute(dbCarAttribute.getAttribute());\n\t\t\t\t\t\t\tattrValue.setStatusCd(Status.ACTIVE);\n\t\t\t\t\t\t\tattrValue.setTag(valueCarAttr);\n\t\t\t\t\t\t\tattrValue.setDisplaySequence((short) 0);\n\t\t\t\t\t\t\tsetAuditInfo(request, attrValue);\n\n\t\t\t\t\t\t\tdbCarAttribute.getAttribute().getAttributeLookupValues().add(attrValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdbCarAttribute.setAttributeValueProcessStatus(rejected);\n\t\t\t\t\t}\n\t\t\t\t\t// Update car attribute value\n\t\t\t\t\tdbCarAttribute = carManager.updateCarAttributeValue(dbCarAttribute);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dbCarAttribute;\n\t}", "String[] getParameterValues(String key);", "public int getvID() {\n return vID;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id\", id);\n\n\n\n\n return params;\n }", "public boolean validateVSVID(String vsvId);", "public Class<?> getParameterClass()\n\t{\n\t\treturn parameterClass;\n\t}", "public void setClassid(String classid) {\n this.classid = classid == null ? null : classid.trim();\n }", "@Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"freelancerid\", id);\r\n\r\n return params;\r\n }", "public Class<?> getInpParmClass() {\n\t\treturn inpParmClass;\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"idCliente\", idCliente);\n\n\n\n return params;\n }", "object_detection.protos.Calibration.SigmoidParameters getClassIdSigmoidParametersMapOrDefault(\n int key,\n object_detection.protos.Calibration.SigmoidParameters defaultValue);", "@DISPID(1610940429) //= 0x6005000d. The runtime will prefer the VTID if present\n @VTID(35)\n Parameters parameters();", "public int getRequiredParamsNumber() {\n\t\treturn requiredParamsNumber;\n\t}", "@Override\n\tpublic LinkedHashMap<String,?> getRequiredParams() {\n\t\tLinkedHashMap<String,String> requiredParams = new LinkedHashMap<>();\n\t\trequiredParams.put(\"crv\", crv.toString());\n\t\trequiredParams.put(\"kty\", getKeyType().getValue());\n\t\trequiredParams.put(\"x\", x.toString());\n\t\trequiredParams.put(\"y\", y.toString());\n\t\treturn requiredParams;\n\t}", "private static List<JObject> buildApiParamsJObject(Class<?> clazz) {\n\n if (clazz == null || clazz == NoneApiInput.class || clazz == NoneApiOutput.class) {\n return null;\n }\n\n\n Set<Field> fields = ClassUtils.listFields(clazz);\n List<JObject> list = new ArrayList<>();\n\n for (Field field : fields) {\n String name = StringUtil.stringToUnderLineLowerCase(field.getName());\n\n // Skip fields that are not printed\n JSONField jsonAnnotation = field.getAnnotation(JSONField.class);\n if (jsonAnnotation != null && !jsonAnnotation.serialize()) {\n continue;\n }\n\n JObject param = JObject.create();\n param.put(\"name\", name);\n String type = field.getType().getCanonicalName();\n if (type.contains(\".\")) {\n type = StringUtil.substringAfterLast(field.getType().getCanonicalName(), \".\");\n }\n param.put(\"type\", type);\n\n Check annotation = field.getAnnotation(Check.class);\n if (annotation != null) {\n if (annotation.hiddenForFrontEnd()) {\n continue;\n }\n\n if (StringUtil.isNotEmpty(annotation.name())) {\n param.put(\"comment\", annotation.name());\n }\n param.put(\"require\", annotation.require());\n }\n\n list.add(param);\n }\n return list;\n }", "@java.lang.Override\n public object_detection.protos.Calibration.ClassIdFunctionApproximationsOrBuilder getClassIdFunctionApproximationsOrBuilder() {\n if (calibratorCase_ == 2) {\n return (object_detection.protos.Calibration.ClassIdFunctionApproximations) calibrator_;\n }\n return object_detection.protos.Calibration.ClassIdFunctionApproximations.getDefaultInstance();\n }", "public void setClassId(Long ClassId) {\n this.ClassId = ClassId;\n }", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n @SuppressWarnings(\"Convert2Diamond\") Map<String,String> params = new HashMap<String, String>();\n params.put(\"meal_id\",meal_id);\n params.put(\"recipe_id\",recipe_id);\n return params;\n }", "public int getNumOfParams() { return params.length; }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n params.put(\"user_id\", globalClass.getId());\n params.put(\"view\", \"getMyTaskRewardsByUser\");\n\n Log.d(TAG, \"getParams: \"+params);\n return params;\n }", "com.google.cloud.commerce.consumer.procurement.v1.ParameterOrBuilder getParametersOrBuilder(\n int index);", "com.google.protobuf.ByteString getParams();", "public static ParamObject getParamsForGetPriceVerficationData() {\n\t\tParamObject obj = new ParamObject();\n\t\ttry {\n\t\t\tTimeUnit.MILLISECONDS.sleep(100);\n\t\t} catch (InterruptedException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString url = URL + \"/store/priceverify/\";\n\t\tobj.setUrl(url);\n\t\t// obj.addHeader(\"Authorization\", authorization);\n\t\tobj.setMethodType(\"GET\");\n\t\treturn obj;\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id\", _phoneNo);\n params.put(\"token\", token);\n params.put(\"role\", String.valueOf(pref.getResposibility()));\n return params;\n }", "@Override\r\n\tpublic String getParameter(BaseCommandPo po) {\n\t\tif(\"\".equals(vMID)){\r\n\t\t\tthrow new ServiceException(\"缺少必填参数:id\");\r\n\t\t}\r\n\t\treturn super.fromPoToJsonStr(po);\r\n\t}", "private <T> void findId(Class<T> classy) {\r\n\t\tString className = classy.getName();\r\n\t\tif (idMethods.get(className) == null && idProperties.get(className) == null) {\r\n\t\t\tfor (Field property : classy.getDeclaredFields()) {\r\n\t\t\t\tif (property.getAnnotation(Id.class) != null) {\r\n\t\t\t\t\tidProperties.put(className, property);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (idProperties.get(className) == null) {\r\n\t\t\t\tfor (Method property : classy.getDeclaredMethods()) {\r\n\t\t\t\t\tif (property.getAnnotation(Id.class) != null) {\r\n\t\t\t\t\t\tidMethods.put(className, property);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n params.put(\"userid\", globalClass.getId());\n params.put(\"parent_id\", \"0\");\n\n Log.d(TAG, \"getParams: \"+params);\n return params;\n }", "java.util.Map<java.lang.Integer, object_detection.protos.Calibration.SigmoidParameters>\n getClassIdSigmoidParametersMapMap();", "public ParamsRequestCondition getParamsCondition()\n/* */ {\n/* 133 */ return this.paramsCondition;\n/* */ }", "@Override\n\tpublic List<NameValuePair> getParams() {\n\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\tparams.add(new BasicNameValuePair(KEY_ID, Integer.toString(id)));\n params.add(new BasicNameValuePair(KEY_VEHICLE_IDVEHICLE, Integer.toString(idVehicle)));\n params.add(new BasicNameValuePair(KEY_ITEMS_IDITEMS, Integer.toString(idItem)));\n params.add(new BasicNameValuePair(KEY_RECEIPT_IDRECEIPT, Integer.toString(idReceipt)));\n params.add(new BasicNameValuePair(KEY_WORKMILEAGE, Integer.toString(WorkMileage)));\n params.add(new BasicNameValuePair(KEY_WORKNOTES, WorkNotes));\n\t\t\n\t\treturn params;\n\t}", "public String getVatId()\n {\n return vatId;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Eid\", id + \"\");\n\n\n return params;\n }", "int getParamsCount();", "public int promptClassSelect()\n\t{\n\t\t\t\t\n\t\tString tempClassSelection = JOptionPane.showInputDialog(\"Please type 1 for first class or 2 for economy: \");\n\t\t\t\n\t\t//handles a cancel\t\n\t\tif(tempClassSelection == null)\n\t\t{\n\t\t\tpromptExit();\n\t\t}\n\t\t\t\t\n\t\tif(!validate(tempClassSelection) || tempClassSelection.isEmpty()) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"You have not made a valid entry\");\n\t\t\tstart();\n\t\t}\n\t\t\n\t\tint classSelection = Integer.parseInt(tempClassSelection);\n\t\t\n\t\tif(classSelection != 1 && classSelection != 2)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"You have not made a valid entry\");\n\t\t\tstart();\n\t\t}\n\t\n\t\treturn classSelection;\n\t\t\n\t}", "public void setVsheetId(String vsheetId) {\n this.vsheetId = vsheetId == null ? null : vsheetId.trim();\n }", "int getParameterCount();", "ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData getIdVerificationResponseData();", "public DescribeInstanceParamsResponse DescribeInstanceParams(DescribeInstanceParamsRequest req) throws TencentCloudSDKException{\n JsonResponseModel<DescribeInstanceParamsResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<DescribeInstanceParamsResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"DescribeInstanceParams\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n // Adding All values to Params.\n // The firs argument should be same sa your MySQL database table columns.\n params.put(\"claim_intimationid\", cino);\n return params;\n }", "public List<String> getClassIdsFromPartialClassName(\n\t\t\tfinal String partialClassName) \n\t\t\tthrows ServiceException {\n\t\t\n\t\ttry {\n\t\t\treturn classQueries.getClassIdsFromPartialName(partialClassName);\n\t\t}\n\t\tcatch(DataAccessException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}", "com.google.cloud.commerce.consumer.procurement.v1.Parameter getParameters(int index);", "public VisionThresholdParameters getVisionParameters() {\r\n\t\tString parametersString = table.getString(VISION_PARAMETERS_KEY, \"0, 0, 0, 0, 0, 0\");\r\n\t\treturn VisionThresholdParameters.getFromStringValue(parametersString);\r\n\t}", "public ArrayList<String> getParameterValues() { return this.params; }", "public List<DetailParam> getParameterFromClassWithAnnotation(Class<?> baseClass, Class<?> annotationClass) {\n List<DetailParam> params = new ArrayList<>();\n Arrays.stream(baseClass.getDeclaredMethods()).forEach(method -> params.addAll(this.getParameterFromMethodWithAnnotation(baseClass, method, annotationClass)));\n return params;\n }", "public Class[] getParamTypeClass(String[] par, ClassLoader cl) {\n List<Class> list = new ArrayList<Class>();\n for(String s : par) {\n Class c = checkIfPrimitive(s);\n if (c != null)\n list.add(c);\n else {\n try {\n c = Class.forName(s, false, cl);\n list.add(c);\n } catch (ClassNotFoundException e) {\n //do nothing. Other test will report the problem if parameter\n // is not specified correctly\n }\n }\n }\n return list.toArray(new Class[0]);\n }", "String getParameter(HttpServletRequest request, String name) throws ValidationException;", "public int getParameterCount();", "public cosmos.distribution.v1beta1.QueryOuterClass.QueryParamsResponse params(cosmos.distribution.v1beta1.QueryOuterClass.QueryParamsRequest request) {\n return blockingUnaryCall(\n getChannel(), getParamsMethod(), getCallOptions(), request);\n }", "ParameterIdentification createParameterIdentification();", "int getClassIdSigmoidParametersMapCount();", "public void setVaccinId (java.lang.Integer vaccinId) {\n\t\tthis.vaccinId = vaccinId;\n\t}", "@Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> map = new HashMap<String, String>();\r\n// map.put(\"user_id\", \"FJBC-ONLINE-User-262\");\r\n if (ConstantSet.user != null) {\r\n map.put(\"user_id\", ConstantSet.user.getUid());\r\n }\r\n return map;\r\n }", "private void buildOtherParams() {\n\t\tmClient.putRequestParam(\"attrType\", \"1\");\r\n\t}", "public String param_id_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 32 && !try_visit_field(ph, 32) || !try_visit_item(ph, 0)) return null;\n return new String(param_id_GET(ph, new char[ph.items], 0));\n }", "private void validateClass () throws ModelValidationException\n\t\t\t{\n\t\t\t\tModel model = getModel();\n\t\t\t\tint modifiers = model.getModifiersForClass(keyClassName);\n\t\t\t\tboolean hasKeyClassName = !StringHelper.isEmpty(keyClassName);\n\t\t\t\tboolean isInnerClass = \n\t\t\t\t\t(hasKeyClassName && (keyClassName.indexOf('$') != -1));\n\t\t\t\tString pcClassName = getClassName();\n\n\t\t\t\t// check for key class existence\n\t\t\t\tif (keyClass == null)\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(\n\t\t\t\t\t\tModelValidationException.WARNING,\n\t\t\t\t\t\tmodel.getClass(pcClassName),\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_missing\", //NOI18N\n\t\t\t\t\t\tkeyClassName, pcClassName));\n\t\t\t\t}\n\n\t\t\t\t// check for public class modifier\n\t\t\t\tif (!Modifier.isPublic(modifiers))\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_public\", //NOI18N\n\t\t\t\t\t\tkeyClassName, pcClassName));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check for Serializable\n\t\t\t\t/* This check is disabled because of Boston backward \n\t\t\t\t compatibility. In Boston there was no requirement for a \n\t\t\t\t key class being serializable, thus key classes from pc \n\t\t\t\t classes mapped with boston are not serializable.\n\n\t\t\t\tif (!model.implementsInterface(keyClass, \n\t\t\t\t\t\"java.io.Serializable\")) //NOI18N\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_serializable\", //NOI18N\n\t\t\t\t\t\tkeyClassName, pcClassName));\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t// if inner class it must be static\n\t\t\t\tif (isInnerClass && !Modifier.isStatic(modifiers))\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_static\", //NOI18N\n\t\t\t\t\t\tkeyClassName, pcClassName));\n\t\t\t\t}\n\t\t\t}", "public boolean vehicleClassIdExists()\n\t{\n\t\treturn (vehicleClassId != null);\n\t}", "object_detection.protos.Calibration.ClassIdFunctionApproximations getClassIdFunctionApproximations();", "public String param_id_TRY(Bounds.Inside ph)\n {\n if(ph.field_bit != 8 && !try_visit_field(ph, 8) || !try_visit_item(ph, 0)) return null;\n return new String(param_id_GET(ph, new char[ph.items], 0));\n }", "@Schema(required = true, description = \"Identifier(s) of the constituent VNF instance(s) of this VNFFG instance. \")\n public List<String> getVnfInstanceId() {\n return vnfInstanceId;\n }", "Collection<String> getRequiredClasses( String id );", "public void setClassroomId(Integer classroomId) {\n\t\tthis.classroomId = classroomId;\n\t}", "@java.lang.Override\n public object_detection.protos.Calibration.ClassIdFunctionApproximationsOrBuilder getClassIdFunctionApproximationsOrBuilder() {\n if ((calibratorCase_ == 2) && (classIdFunctionApproximationsBuilder_ != null)) {\n return classIdFunctionApproximationsBuilder_.getMessageOrBuilder();\n } else {\n if (calibratorCase_ == 2) {\n return (object_detection.protos.Calibration.ClassIdFunctionApproximations) calibrator_;\n }\n return object_detection.protos.Calibration.ClassIdFunctionApproximations.getDefaultInstance();\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<cosmos.distribution.v1beta1.QueryOuterClass.QueryParamsResponse> params(\n cosmos.distribution.v1beta1.QueryOuterClass.QueryParamsRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getParamsMethod(), getCallOptions()), request);\n }", "java.lang.String getRequestID();", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"businessId\", businessId);\n params.put(\"category\", category);\n return params;\n }", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"businessId\", businessId);\n params.put(\"category\", category);\n return params;\n }", "@RequestMapping(value=\"suggestion\",method=RequestMethod.GET)\n @ResponseBody\n public Map<String, Object> getSuggestion(Long classId){\n try {\n return evaluateService.getAdviceAndDataForClass(classId);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String getIeClassId();", "public final HttpParams getClientParams() {\n/* 159 */ return this.clientParams;\n/* */ }", "gen.grpc.hospital.examinations.ParameterOrBuilder getParameterOrBuilder(\n int index);", "public void setProvProcessId(Integer v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/prov_process_id\",v);\n\t\t_ProvProcessId=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "@Override\n\tpublic String[] getParameterValues(String arg0) {\n\t\treturn null;\n\t}", "public BCClass[] getParamBCs() {\n String[] paramNames = getParamNames();\n BCClass[] params = new BCClass[paramNames.length];\n for (int i = 0; i < paramNames.length; i++)\n params[i] = getProject().loadClass(paramNames[i], getClassLoader());\n return params;\n }" ]
[ "0.6638624", "0.55077606", "0.485183", "0.48281676", "0.4727115", "0.47168288", "0.47023296", "0.4575096", "0.45685017", "0.4486277", "0.44839987", "0.44696748", "0.44437236", "0.43776286", "0.43764672", "0.43740287", "0.43697932", "0.43680954", "0.43468493", "0.43465132", "0.43387258", "0.4309268", "0.43015784", "0.42998034", "0.42952657", "0.42851672", "0.42490384", "0.4239823", "0.42224354", "0.4207926", "0.41815743", "0.41706315", "0.41665387", "0.41662878", "0.41407138", "0.41345528", "0.40963072", "0.4089948", "0.40736568", "0.40726575", "0.40694296", "0.40636647", "0.40580246", "0.40555826", "0.40507668", "0.40339437", "0.4030409", "0.40212205", "0.40107173", "0.3998587", "0.39938268", "0.39929083", "0.39890993", "0.3983166", "0.39566767", "0.3932189", "0.39296767", "0.3925006", "0.39227018", "0.39167", "0.39113596", "0.39079303", "0.39067253", "0.3903832", "0.390114", "0.38973215", "0.38852057", "0.38831964", "0.38831878", "0.388201", "0.3868108", "0.38637385", "0.386182", "0.38596043", "0.38550726", "0.38517264", "0.38479054", "0.38474485", "0.38463682", "0.3844961", "0.38390788", "0.3839049", "0.38324144", "0.38311043", "0.38310796", "0.38296574", "0.38281208", "0.38244942", "0.38157758", "0.38103703", "0.38093373", "0.38066223", "0.38066223", "0.37981623", "0.37947986", "0.37935254", "0.37922052", "0.37878552", "0.3786274", "0.37861428" ]
0.67500436
0
Create a new routine call instance
public ToUnixNano() { super("to_unix_nano", Public.PUBLIC, org.jooq.impl.SQLDataType.BIGINT); setReturnParameter(RETURN_VALUE); addInParameter(TS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FunCall createFunCall();", "ProcedureCall createProcedureCall();", "CallStatement createCallStatement();", "OperationCallExp createOperationCallExp();", "public X10Call createInstanceCall(Position pos, Expr receiver, Name name, Expr... args) {\n X10MethodInstance mi = createMethodInstance(receiver, name, args);\n if (null == mi) return null;\n return createInstanceCall(pos, receiver, mi, args);\n }", "H create(Method method);", "public void makeCall() {\n\n }", "public X10Call createInstanceCall(Position pos, Expr receiver, Name name, List<Type> typeArgs, Expr... args) {\n X10MethodInstance mi = createMethodInstance(receiver, name, typeArgs, args);\n if (null == mi) return null;\n return createInstanceCall(pos, receiver, mi, args);\n }", "Method createMethod();", "Method createMethod();", "public X10Call createInstanceCall(Position pos, Expr receiver, X10MethodInstance mi, Expr... args) {\n List<Type> typeParams = mi.typeParameters();\n List<TypeNode> typeParamNodes = new ArrayList<TypeNode>();\n for (Type t : typeParams) {\n typeParamNodes.add(xnf.CanonicalTypeNode(pos, t));\n }\n return (X10Call) xnf.X10Call( pos, \n receiver, \n xnf.Id(pos, mi.name()),\n typeParamNodes,\n Arrays.asList(args) ).methodInstance(mi).type(mi.returnType());\n }", "public Call_simple() {\n }", "@NonNull\n @MainThread\n protected abstract LiveData<ApiResponse<RequestType>> createCall();", "public Call createCall() throws ServiceException {\n\t\treturn null;\n\t}", "SQLCall createSQLCall();", "Operation createOperation();", "Operation createOperation();", "private void createRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Name the new routine:\",\n \"Create new\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n Routine r = new Routine(s);\n collection.add(r);\n listModel.addElement(r);\n list.setSelectedValue(r, true);\n new WorkoutsFrame(r);\n }\n }", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public Call createCall(QName arg0, QName arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public Call createCall(QName arg0, String arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public CreateRemoteClassic<Msg, Ref> create();", "public CallParams createCallParams(Call call);", "T create(R argument);", "Function createFunction();", "public Call createCall(QName arg0) throws ServiceException {\n\t\treturn null;\n\t}", "SUB createSUB();", "Reproducible newInstance();", "BOpMethod createBOpMethod();", "Run createRun();", "public static IRubyObject s_new(IRubyObject recv, IRubyObject[] args, Block block) {\n Ruby runtime = recv.getRuntime();\n RubyTime time = new RubyTime(runtime, (RubyClass) recv, new DateTime(getLocalTimeZone(runtime)));\n time.callInit(args,block);\n return time;\n }", "protected abstract CreateRemoteClassic<Msg, Ref> make_create();", "MethodStart createMethodStart();", "public MethodCall(String callee) {\n this.callee = callee;\n }", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "@Test\n\tpublic void testCreateCall_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\n\t\tCall result = fixture.createCall();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "Command createCommand();", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public Object construct() {\n try {\n Object res;\n\n res = mTarget.invokeTimeout(mMethodName, mParams, mTimeout);\n return res;\n }\n catch (TokenFailure ex) {\n return ex;\n }\n catch (RPCException ex) {\n return ex;\n }\n catch (XMPPException ex) {\n return ex;\n }\n }", "Stub createStub();", "Program createProgram();", "Program createProgram();", "Program createProgram();", "Task createTask();", "Task createTask();", "Task createTask();", "private <R> Callable<MultiResponse> createCallable(final HRegionLocation loc,\n final MultiAction<R> multi, final byte [] tableName) {\n final HConnection connection = this;\n return new Callable<MultiResponse>() {\n public MultiResponse call() throws IOException {\n ServerCallable<MultiResponse> callable =\n new ServerCallable<MultiResponse>(connection, tableName, null) {\n public MultiResponse call() throws IOException {\n return server.multi(multi);\n }\n @Override\n public void connect(boolean reload) throws IOException {\n server = connection.getHRegionConnection(loc.getHostname(), loc.getPort());\n }\n };\n return callable.withoutRetries();\n }\n };\n }", "public X10Call createStaticCall(Position pos, Type container, Name name, Expr... args) {\n X10MethodInstance mi = createMethodInstance(container, name, args);\n if (null == mi) return null;\n return createStaticCall(pos, mi, args);\n }", "private static Expr newSuperCstrCall(String superClassName) {\n MethodSignature.Builder msb = MethodSignature.newBuilder();\n msb.setName(\"new\");\n msb.setOwner(toGlobalName(superClassName));\n msb.setReturnType(voidType());\n MethodCall.Builder mb = MethodCall.newBuilder();\n mb.setSignature(msb.build());\n return Expr.newBuilder().setType(ExprType.MethodCall)\n .setMethodCall(mb.build()).build();\n }", "public X10Call createStaticCall(Position pos, X10MethodInstance mi, Expr... args) {\n List<Type> typeParams = mi.typeParameters();\n List<TypeNode> typeParamNodes = new ArrayList<TypeNode>();\n for (Type t : typeParams) {\n typeParamNodes.add(xnf.CanonicalTypeNode(pos, t));\n }\n return (X10Call) xnf.X10Call( pos, \n xnf.CanonicalTypeNode(pos, mi.container()),\n xnf.Id(pos, mi.name()), \n typeParamNodes,\n Arrays.asList(args) ).methodInstance(mi).type(mi.returnType());\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}", "void call();", "public void create(){}", "public CallInfo() {\n\t}", "Service newService();", "public OpenCall(CFG cfg, String targetName, Type staticType, Expression... parameters) {\n\t\tthis(cfg, null, targetName, staticType, parameters);\n\t}", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "@Test\n\tpublic void testCreateCall_2()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\n\t\tCall result = fixture.createCall();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public static ObjectInstance getDivideToSubtractOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getDivideEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getDivideOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getSubtractEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getSubtractOperationMBean()\n .getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public PhoneCall build() {\n return new PhoneCall(caller, callee, startTime, endTime);\n }", "RoverProgram createRoverProgram();", "public interface RpcProcessorFactory {\n\n\n RpcProcessor getProcessor(\n String rpcMethod\n );\n\n\n}", "protected abstract Object makeNew(final String prefix, final int seqno);", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "public T newInstance();", "public CreateRemoteClassic<Msg, Ref> factCreate();", "public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}", "@Test\n\tpublic void testCreateCall_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\n\t\tCall result = fixture.createCall();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "protected abstract CreateRemoteClassic<Msg, Ref> make_factCreate();", "@Test\n\tpublic void testCreateCall_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\n\t\tCall result = fixture.createCall();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public interface Callable {\n void call(String name, String telNumber);\n}", "public X10Call createStaticCall(Position pos, Type container, Name name, List<Type> typeArgs, Expr... args) {\n X10MethodInstance mi = createMethodInstance(container, name, typeArgs, args);\n if (null == mi) return null;\n return createStaticCall(pos, mi, args);\n }", "public CallMessage() {\n\t}", "Runnable mk();", "Operacion createOperacion();", "public AppCall createBaseAppCall() {\r\n return new AppCall(getRequestCode());\r\n }", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public LiveRef(ObjID paramObjID, int paramInt) {\n/* 93 */ this(paramObjID, TCPEndpoint.getLocalEndpoint(paramInt), true);\n/* */ }", "abc createabc();", "Instruction createInstruction();", "public Upcall(ORBInstance orbInstance, UpcallReturn upcallReturn,\n org.apache.yoko.orb.OCI.ProfileInfo profileInfo,\n org.apache.yoko.orb.OCI.TransportInfo transportInfo, int requestId,\n String op, org.apache.yoko.orb.CORBA.InputStream in,\n org.omg.IOP.ServiceContext[] requestSCL) {\n orbInstance_ = orbInstance;\n upcallReturn_ = upcallReturn;\n profileInfo_ = profileInfo;\n transportInfo_ = transportInfo;\n reqId_ = requestId;\n op_ = op;\n in_ = in;\n requestSCL_ = requestSCL;\n servant_ = null;\n poa_ = null;\n postinvokeCalled_ = false;\n\n userEx_ = false; // Java only\n\n logger.fine(\"Creating upcall request for operation \" + op + \" and request id \" + requestId); \n in._OB_ORBInstance(orbInstance_);\n }", "SomePlus createSomePlus();", "public final void rule__XConstructorCall__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9472:1: ( ( 'new' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9473:1: ( 'new' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9473:1: ( 'new' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9474:1: 'new'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXConstructorCallAccess().getNewKeyword_1()); \n }\n match(input,55,FOLLOW_55_in_rule__XConstructorCall__Group__1__Impl19097); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXConstructorCallAccess().getNewKeyword_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void createCallgraph() {\n final DirectedGraph<ICallgraphNode, ICallgraphEdge> graph =\n m_module.getContent().getNativeCallgraph();\n\n final List<FunctionBlock> blocks = new ArrayList<FunctionBlock>();\n final List<FunctionEdge> edges = new ArrayList<FunctionEdge>();\n\n final HashMap<ICallgraphNode, FunctionBlock> blockMap =\n new HashMap<ICallgraphNode, FunctionBlock>();\n\n final HashMap<INaviFunction, Function> functionMap = new HashMap<INaviFunction, Function>();\n\n for (final Function function : m_functions) {\n functionMap.put(function.getNative(), function);\n }\n\n for (final ICallgraphNode block : graph.getNodes()) {\n final FunctionBlock newBlock = new FunctionBlock(functionMap.get(block.getFunction()));\n\n blockMap.put(block, newBlock);\n\n blocks.add(newBlock);\n }\n\n for (final ICallgraphEdge edge : graph.getEdges()) {\n final FunctionBlock source = blockMap.get(edge.getSource());\n final FunctionBlock target = blockMap.get(edge.getTarget());\n\n edges.add(new FunctionEdge(source, target));\n }\n\n m_callgraph = new Callgraph(blocks, edges);\n }", "static void libCall(Token t, String s) {\n\topCode.put(t, \"invokestatic sal/Library/\"+s.replace(\"~\",\"Ljava.lang.String;\"));\n}", "public void translateInstantiation( MethodTranslator method, New newInsn );", "public java.lang.Object callMethod (Symbol methodName, java.lang.Object[] args, int timeOut)\n throws G2AccessException;", "Lab create();", "public void constructorReturned(Spy spy, String constructionInfo);", "protected abstract AbstractIncomingEmailCallable<T> createCallable(Message message);", "T newInstance(Object... args);", "public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}", "Call createVideoCall(Contact callee)\n throws OperationFailedException;", "@Test\n\tpublic void testCreateCall_5()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub((URL) null, new DeployWSServiceLocator());\n\n\t\tCall result = fixture.createCall();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public CreateRemoteClassic<Msg, Ref> infraCreate();", "public Snippet visit(MethodCallStatementInConstructor n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\", \"\", null, false);;\n\t\t\tSnippet f0 = n.methodCallInConstructor.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp + \";\";\n\t\t\ttPlasmaCode+=generateTabs(blockDepth)+_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public ActiveCall(final String caller, final String callee, final Long timeStart) {\n\tsuper(caller, callee);\n\tthis.timeStart = timeStart;\n }", "Commands createCommands();", "public void compileSubroutine() throws DOMException, CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString keyword, returnType;\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\n\t\tElement parentXML = document.createElement(\"subroutineDec\");\n\n\t\tsymTable.startSubroutine();\n\n\t\t// method/constructor/funtion\n\t\tele = createXMLnode(tokenType);\n\t\tkeyword = jTokenizer.returnTokenVal();\n\t\tparentXML.appendChild(ele);\n\n\t\tif (keyword.equals(\"method\")) {\n\n\t\t\t// argument 0 for a method is always a \"this\" object of the present class\n\t\t\tsymTable.define(\"this\", className, \"argument\");\n\t\t}\n\n\t\t// Return type of the subroutine\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\treturnType = token;\n\t\tele = createXMLnode(tokenType);\n\t\tparentXML.appendChild(ele);\n\n\t\t// Name of the subroutine\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\tsubroutineName = token;\n\t\tele = createXMLnode(tokenType);\n\t\tparentXML.appendChild(ele);\n\n\t\t// The character \"(\"\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\tele = createXMLnode(tokenType);\n\t\tparentXML.appendChild(ele);\n\n\t\t// the list of parameters\n\t\tparentXML.appendChild(compileParameterList());\n\n\t\t// the symbol \")\"\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tparentXML.appendChild(ele);\n\n\t\t// Body of subroutine\n\t\tElement body = document.createElement(\"subroutineBody\");\n\t\tparentXML.appendChild(body);\n\n\t\t// Character \"{\"\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tbody.appendChild(ele);\n\n\t\t// The body of the subroutine that contains declarations and statements\n\t\tjTokenizer.advance();\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\tboolean declared = false;\n\t\twhile (!token.equals(\"}\")) {\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\n\t\t\t// XML for variable declarations inside the funtion\n\t\t\tif (token.equals(\"var\")) {\n\t\t\t\tbody.appendChild(compileVarDec());\n\t\t\t\tjTokenizer.advance();\n\t\t\t}\n\n\t\t\t// XML for statements inside the function, and the declaration\n\t\t\telse if (token.matches(\"let|if|while|do|return\")) {\n\n\t\t\t\t// If the first statement has been encountered,\n\t\t\t\t// Variable declaration has ended. Function Declaration\n\t\t\t\t// can be written now\n\t\t\t\tif (!declared) {\n\n\t\t\t\t\t// Writing the VM code for function declaration\n\t\t\t\t\twriter.writeFunction(className + \".\" + subroutineName, symTable.count.get(\"local\"));\n\n\t\t\t\t\tif (keyword.equals(\"method\")) {\n\t\t\t\t\t\t// If the subroutine is a method\n\t\t\t\t\t\twriter.writePush(\"argument\", 0);\n\t\t\t\t\t\twriter.writePop(\"pointer\", 0);\n\t\t\t\t\t} else if (keyword.equals(\"constructor\")) {\n\t\t\t\t\t\t// If subroutine is a constructor\n\t\t\t\t\t\twriter.writePush(\"constant\", symTable.count.get(\"this\"));\n\t\t\t\t\t\twriter.writeCall(\"Memory.alloc\", 1);\n\t\t\t\t\t\twriter.writePop(\"pointer\", 0);\n\t\t\t\t\t}\n\t\t\t\t\tdeclared = true;\n\t\t\t\t}\n\t\t\t\t// Write the VM code for the statements after variable declaration\n\t\t\t\tbody.appendChild(compileStatements());\n\t\t\t}\n\n\t\t}\n\n\t\t// Closing char \"}\"\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tbody.appendChild(ele);\n\n\t\troot.appendChild(parentXML);\n\t}", "Parcelle createParcelle();" ]
[ "0.72287875", "0.68710935", "0.6642861", "0.62845594", "0.6253281", "0.6112726", "0.6102961", "0.60526145", "0.5877095", "0.5877095", "0.5857039", "0.58031934", "0.5744403", "0.573939", "0.5731038", "0.57096547", "0.57096547", "0.57062936", "0.5702379", "0.5686524", "0.56820685", "0.5681685", "0.5628325", "0.5601004", "0.55023813", "0.55012214", "0.5496311", "0.54945755", "0.5468699", "0.54494625", "0.5448698", "0.54216087", "0.54193074", "0.54086936", "0.53574866", "0.5355898", "0.53540844", "0.53454673", "0.53238976", "0.53181577", "0.53135216", "0.53095615", "0.53095615", "0.53095615", "0.5298138", "0.5298138", "0.5298138", "0.5292428", "0.52854735", "0.52822566", "0.52800757", "0.52721286", "0.52659637", "0.526234", "0.52538943", "0.5248373", "0.52370316", "0.52323884", "0.52141935", "0.5174208", "0.5171816", "0.51606065", "0.51514095", "0.5137032", "0.5129011", "0.51157016", "0.51083905", "0.510307", "0.5097289", "0.5097221", "0.5094355", "0.5086885", "0.50820166", "0.5070517", "0.5061643", "0.50514954", "0.50489354", "0.50360924", "0.5032912", "0.5029198", "0.5002474", "0.4996962", "0.49816418", "0.4980517", "0.49765685", "0.49717188", "0.4965819", "0.49656707", "0.49632868", "0.4959658", "0.49579188", "0.4952672", "0.4950634", "0.49490947", "0.49477392", "0.49446014", "0.49402076", "0.4930697", "0.4930609", "0.49262705", "0.4923349" ]
0.0
-1
Set the ts parameter IN value to the routine
public void setTs(LocalDateTime value) { setValue(TS, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTs(long value) {\n this.ts = value;\n }", "void setStaStart(double staStart);", "public void setSecond(T tt) {\n\t\t\tthis.t = tt;\n\t\t}", "public void setTimeStamp(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTimeStampTracker = true;\r\n } else {\r\n localTimeStampTracker = false;\r\n \r\n }\r\n \r\n this.localTimeStamp=param;\r\n \r\n\r\n }", "@Override\n public void ptt(int value, int timestamp) {\n }", "public void setParametr(double p) {\n parametr = p; // додано 26.12.2011\n timeServ = parametr; // 20.11.2012\n\n }", "public void setTime(double time) {_time = time;}", "void setStation(double station);", "void setParameter(String name, String value);", "public void set(float signal);", "public void setTimeStamp(String ts) {\r\n dateFormatter = new SimpleDateFormat(ts);\r\n }", "public void setValue(int param1Int) {\n/* 294 */ this.s.setValue(-param1Int);\n/* */ }", "public void setStartTime(long ts) {\n\t\tthis.startTime = ts;\t\t\n\t}", "void setParameter(String name, Object value);", "public void setSecond(V second) {\r\n\t\tthis.second = second;\r\n\t}", "void setStaEnd(double staEnd);", "@Override\n\tpublic void tick(TrafficSignal TS) {\n\t\t\n\t}", "public void setParameter(String parName, Object parVal) throws HibException ;", "public void sett(int pos, T x);", "public void setTimeStart(long ts)\n {\n this.timeStart = (ts > 0L)? ts : -1L;\n }", "public void setParameter(short param) throws TFTPPacketException;", "public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }", "@Override\n public void setTestSessionModifyingParam() {\n sessionModifingParams.addParameter(testVT);\n }", "void setTime(final int time);", "protected void onSetOnTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void setParamValue(String label, double value);", "public com.example.DNSLog.Builder setTs(long value) {\n validate(fields()[7], value);\n this.ts = value;\n fieldSetFlags()[7] = true;\n return this;\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "void setTimeInForce(TimeInForce inTimeInForce);", "public void setParam(String paramName, double value);", "public void presetTime(long tick,int ento){\r\n\r\n\t}", "public void setTime(){\r\n \r\n }", "void setValue(T value);", "void setValue(T value);", "public void setSignal(double signal) {_signal = signal;}", "@Override\n\tpublic void setStartTime(float t) \n\t{\n\t\t_tbeg = t;\n\t}", "public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }", "@Override\r\n\tpublic void preExcute(long arg0) {\n\t\tstartTime = arg0;\r\n\r\n\t}", "public void setSecond(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setSecond(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setSecond(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setSecond(int):void\");\n }", "@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }", "public void setTime(int t){\r\n\t\t\t\ttime = t;\r\n\t\t\t}", "public void setValue(S s) { value = s; }", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "public void setParamValue(String label, Object value);", "public void setSecond(double value) {\n this.second = value;\n }", "public void set(final long timeValue) {\n stamp = timeValue;\n }", "public void setParamValue(String label, int value);", "protected void setTimestamp(long time) \n {\n\t\tlTimestamp = time;\n\t}", "void setTick(int tick);", "public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {\n currentPreparedStatement.setTimestamp(parameterIndex, x, cal);\n\n }", "public void setSetpoint(double setpoint);", "public void setGeneric(T t)\t\t//setting a generic var\n\t{\n\t\t\n\t\tthis.t=t;\n\t}", "@TmfSignalHandler\n public void timestampFormatUpdated(TmfTimestampFormatUpdateSignal signal) {\n setValue(getValue());\n }", "void setTemp(String name, Object value);", "public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }", "public abstract void setSpeed(int sp);", "protected void onSetDailyTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void setDateTrx (Timestamp DateTrx)\n{\nif (DateTrx == null) throw new IllegalArgumentException (\"DateTrx is mandatory\");\nset_Value (\"DateTrx\", DateTrx);\n}", "public void setOperTime(java.lang.String param) {\r\n localOperTimeTracker = param != null;\r\n\r\n this.localOperTime = param;\r\n }", "public void setOperTime(java.lang.String param) {\r\n localOperTimeTracker = param != null;\r\n\r\n this.localOperTime = param;\r\n }", "@Override\n\tprotected void setValue(String name, TipiValue tv) {\n\t}", "public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }", "public abstract void setDate(Timestamp uneDate);", "void setTempo(int tempo);", "public Function setParameter(int index, Function var) throws IndexOutOfBoundsException;", "Statement setParameter(String name, Object param);", "public void setParamValue(int i, Object value);", "public void setSpid(int param){\n localSpidTracker = true;\n \n this.localSpid=param;\n \n\n }", "public void setParam0(boolean param){\n \n // setting primitive attribute tracker to true\n \n if (false) {\n localParam0Tracker = false;\n \n } else {\n localParam0Tracker = true;\n }\n \n this.localParam0=param;\n \n\n }", "public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {\n currentPreparedStatement.setTime(parameterIndex, x, cal);\n\n }", "public void set(double val);", "protected void onSetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "protected void onSetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "protected abstract void setSpl();", "public abstract void setSecondsPerUpdate(float secs);", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public void setParam(String paramName, String value);", "void set(T t);", "void setValue(V value);", "public static void setCustomMethodParameter(String key, String value) {\n if (active) {\n TransactionAccess.setMethodParameter(key, value);\n }\n }", "public void setSTS( Integer STS )\n {\n this.STS = STS;\n }", "private void setParameterToStatement(CallableStatement callableStatement,\n\t\t\tint index, String value, int dataType, String paramType)\n\t\t\tthrows SQLException {\n\t\tLOGGER.info(\"index = [\" + index + \"], dataType = [\" + dataType\n\t\t\t\t+ \"], value = [\" + value + \"], paramType = [\" + paramType + \"]\");\n\n\t\tif (paramType.equalsIgnoreCase(\"in\")\n\t\t\t\t|| paramType.equalsIgnoreCase(\"inout\")) {\n\t\t\tif (value != null) {\n\t\t\t\tcallableStatement.setString(index, value);\n\t\t\t} else {\n\t\t\t\tcallableStatement.setNull(index, dataType);\n\t\t\t}\n\t\t} else if (paramType.equalsIgnoreCase(\"out\")) {\n\t\t\tcallableStatement.registerOutParameter(index, dataType);\n\t\t}\n\t\tif (paramType.equalsIgnoreCase(\"inout\")) {\n\t\t\tcallableStatement.registerOutParameter(index, dataType);\n\t\t}\n\t}", "void setTimestamp(int index, Timestamp value, Calendar cal)\n throws SQLException;", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "@Override\n public boolean setParameter(String parameterName, double value) {\n return false;\n }", "public void changeStartTimeTo(long t) {\n\t\tm_startTime = t;\n\t\tif( m_privateNotification != null ) {\n\t\t\tString content = \"changeStartOfSignals:\"+Long.toString(t)+\";\";\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSCanvas\", content);\n\t\t}\n\t}", "public void set(){\n if (getRhs().isResolved() && getRhs().isSimpleValue()){\n getParameter().setExpression((ArchSimpleExpressionSymbol) getRhs());\n }\n else {\n throw new IllegalStateException(\"The value of the parameter is set to a sequence or the expression is not resolved. This should never happen.\");\n }\n }", "public void mo56529a(T t) {\n this.f96455c = t;\n }", "Statement setParameter(int index, Object param);", "public void setSecond(int second) \n { \n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"second must be 0-59\");\n\n this.second = second; \n }", "private void setSynthesizerParam(SettingParams params) {\n if (mSynthesizer == null)\n return;\n //清除所有参数\n mSynthesizer.setParameter(SpeechConstant.PARAMS, null);\n //设置合成引擎\n mSynthesizer.setParameter(SpeechConstant.ENGINE_TYPE, SpeechConstant.TYPE_CLOUD);\n //设置音调\n mSynthesizer.setParameter(SpeechConstant.PITCH, \"50\");\n //设置播放器音频流类型\n mSynthesizer.setParameter(SpeechConstant.STREAM_TYPE, \"3\");\n //设置播放合成音频打断音乐播放,默认为true\n mSynthesizer.setParameter(SpeechConstant.KEY_REQUEST_FOCUS, \"true\");\n //设置合成发言人\n mSynthesizer.setParameter(SpeechConstant.VOICE_NAME, params.getVoiceName());\n //设置语速\n mSynthesizer.setParameter(SpeechConstant.SPEED, params.getVoiceSpeed() + \"\");\n //设置音量\n mSynthesizer.setParameter(SpeechConstant.VOLUME, params.getVoiceVolume() + \"\");\n }", "public void time(int value) \n{\n runtimes = value;\n}", "public void setSetpoint(double setpoint) {\n \tthis.CTCSpeed = setpoint;\n }", "void simulationSpeedChange(int value);" ]
[ "0.62695366", "0.62150526", "0.615537", "0.6105196", "0.5988887", "0.5947909", "0.5752635", "0.57376194", "0.5719847", "0.5709217", "0.5678104", "0.5616959", "0.5612471", "0.5598708", "0.5564339", "0.5548879", "0.5534046", "0.5515244", "0.55123794", "0.5496988", "0.54967034", "0.54956096", "0.54932284", "0.5490919", "0.54881275", "0.54720247", "0.5465586", "0.5453766", "0.5453766", "0.5453766", "0.5453766", "0.5444476", "0.5438427", "0.5391277", "0.5388301", "0.5387845", "0.5387845", "0.537197", "0.53695685", "0.5334331", "0.5332357", "0.53284246", "0.53199553", "0.5312855", "0.5308647", "0.5299319", "0.5293816", "0.5270867", "0.5251216", "0.5245384", "0.5242971", "0.52419883", "0.5239622", "0.5239409", "0.52374876", "0.52270126", "0.5224263", "0.5220082", "0.5215786", "0.52155495", "0.521298", "0.5207043", "0.5207043", "0.52001077", "0.5199686", "0.5195565", "0.51909405", "0.51896065", "0.51801074", "0.5179022", "0.51758236", "0.5168475", "0.51658505", "0.51618284", "0.51616585", "0.51616585", "0.5149999", "0.51365584", "0.513605", "0.5128537", "0.5123123", "0.51224023", "0.51154345", "0.5114297", "0.5112986", "0.51125973", "0.5112085", "0.511075", "0.511075", "0.511075", "0.50973696", "0.5094736", "0.5090909", "0.5090027", "0.50831044", "0.50821984", "0.50776094", "0.50588757", "0.50574356", "0.50534266" ]
0.56796074
10
Constructor, creates a scene, a stage, and then set the stage to that scene specifically for creating triangles
public TriangleVisualizer(String rulesClass, Map<Integer, String> names, int numPossibleStates) { super(rulesClass, names, numPossibleStates); pointUp = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void initScene() {\n setupCamera(0xff888888);\n\n /*\n * Create a Cube and display next to the cube\n * */\n setupCube();\n\n\n /*\n * Create a Sphere and place it initially 4 meters next to the cube\n * */\n setupSphere();\n\n\n /*\n * Create a Plane and place it initially 2 meters next to the cube\n * */\n setupPlane();\n setupImage();\n setupText();\n\n }", "protected void buildScene() {\n Geometry cube1 = buildCube(ColorRGBA.Red);\n cube1.setLocalTranslation(-1f, 0f, 0f);\n Geometry cube2 = buildCube(ColorRGBA.Green);\n cube2.setLocalTranslation(0f, 0f, 0f);\n Geometry cube3 = buildCube(ColorRGBA.Blue);\n cube3.setLocalTranslation(1f, 0f, 0f);\n\n Geometry cube4 = buildCube(ColorRGBA.randomColor());\n cube4.setLocalTranslation(-0.5f, 1f, 0f);\n Geometry cube5 = buildCube(ColorRGBA.randomColor());\n cube5.setLocalTranslation(0.5f, 1f, 0f);\n\n rootNode.attachChild(cube1);\n rootNode.attachChild(cube2);\n rootNode.attachChild(cube3);\n rootNode.attachChild(cube4);\n rootNode.attachChild(cube5);\n }", "@Override\r\n public void start(Stage primaryStage) throws Exception{\n primaryStage.setTitle(\"Color switch\");\r\n Gameplay obj1 = new Gameplay();\r\n obj1.mainmenu(primaryStage);\r\n// pane.getChildren().add(new Polygon(10,20,30,10,20,30));\r\n\r\n }", "public Scene() {}", "private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }", "@Override\n public void start (Stage stage) throws IOException {\n init.start(stage);\n myScene = view.makeScene(50,50);\n stage.setScene(myScene);\n stage.show();\n }", "public void createScene();", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}", "public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }", "@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"Lesson3.fxml\"));\n \n \n // Create Scene with background Color\n Scene scene = new Scene(root, 700, 350, Color.LIGHTYELLOW);\n \n // set scene on stage with title\n stage.setTitle(\"Lesson 3 FXML\");\n stage.setScene(scene);\n stage.show();\n }", "@Override\r\n\tpublic void start(Stage stage) {\n\r\n scenes.put(SceneName.MAIN, new MainView(stage).getScene());\r\n scenes.put(SceneName.SCENE1, new ViewOne(stage).getScene());\r\n/*\t\tscenes.put(SceneName.SCENE2, new ViewTwo(stage).getScene());\r\n\t\tscenes.put(SceneName.SCENE3, new ViewThree(stage).getScene());\r\n*/\r\n\r\n\t\t// Start with the main scene\r\n\t\tstage.setScene(scenes.get(SceneName.MAIN));\r\n\t\tstage.setTitle(\"Multi-Scene Demo\");\r\n\t\tstage.show();\r\n\t}", "@Override\n public void start(Stage stage){\n // set the stage\n this.stage = stage;\n\n // set the scenes\n mainScene();\n inputScene();\n\n // set the stage attributes\n stage.setTitle(\"Maze solver\");\n stage.setWidth(VisualMaze.DISPLAY_WIDTH);\n stage.setHeight(VisualMaze.DISPLAY_HEIGHT + 200);\n stage.setScene(main);\n\n // display the app\n stage.show();\n }", "void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}", "public static Scene scene3() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene3\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\t\t\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game). \r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Add light sources:\r\n\t\tCutoffSpotlight cutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 45.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(1.0,0.6,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(-4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,1.0,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(0.0, 4.0, 0.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,0.6,1.0));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.2));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tSideMenu sidemenu = new SideMenu(canvas);\n\t\tgridpane.add(sidemenu, 0, 0);\n\t\tgridpane.add(canvas, 1, 0);\n\t\t\n\t\tScene scene = new Scene(gridpane);\n\t\t\n\t\tstage.setScene(scene);\n\t\tstage.sizeToScene();\n\t\t\n\t\tstage.setTitle(\"Make your own Dot Drawing - By Joeri\");\n\t\tstage.show();\n\t\t\n\t\tstage.setMinWidth(stage.getWidth());\n\t\tstage.setMinHeight(stage.getHeight());\n\t}", "@Override\n public void start( Stage primaryStage ) throws Exception {\n primaryStage.setTitle(\"Battleship\");\n primaryStage.setScene(createScene());\n primaryStage.show();\n }", "public void start(Stage stage) {\r\n // Setting our primaryStage variable to the stage given to us by init()\r\n primaryStage = stage;\r\n // Retrieving the primary scene (the first thing we want the user to see)\r\n Scene primaryScene = getPrimaryScene();\r\n // Setting the title of the stage, basically what the window says on the top left\r\n primaryStage.setTitle(\"SeinfeldMemeCycler\");\r\n // Setting the scene\r\n primaryStage.setScene(primaryScene);\r\n // Displaying the stage\r\n primaryStage.show();\r\n }", "public Render(Scene scene1) {\n scene = scene1;\n }", "private void initScene() {\n scene = new idx3d_Scene() {\n\n @Override\n public boolean isAdjusting() {\n return super.isAdjusting() || isAnimating() || isInStartedPlayer() || AbstractCube7Idx3D.this.isAdjusting();\n }\n\n @Override\n public void prepareForRendering() {\n validateAlphaBeta();\n validateScaleFactor();\n validateCube();\n validateStickersImage();\n validateAttributes(); // must be done after validateStickersImage!\n super.prepareForRendering();\n }\n @Override\n\t\tpublic /*final*/ void rotate(float dx, float dy, float dz) {\n super.rotate(dx, dy, dz);\n fireStateChanged();\n }\n };\n scene.setBackgroundColor(0xffffff);\n\n scaleTransform = new idx3d_Group();\n scaleTransform.scale(0.018f);\n\n for (int i = 0; i < locationTransforms.length; i++) {\n scaleTransform.addChild(locationTransforms[i]);\n }\n alphaBetaTransform = new idx3d_Group();\n alphaBetaTransform.addChild(scaleTransform);\n scene.addChild(alphaBetaTransform);\n\n scene.addCamera(\"Front\", idx3d_Camera.FRONT());\n scene.camera(\"Front\").setPos(0, 0, -4.9f);\n scene.camera(\"Front\").setFov(40f);\n\n scene.addCamera(\"Rear\", idx3d_Camera.FRONT());\n scene.camera(\"Rear\").setPos(0, 0, 4.9f);\n scene.camera(\"Rear\").setFov(40f);\n scene.camera(\"Rear\").roll((float) Math.PI);\n\n //scene.environment.ambient = 0x0;\n //scene.environment.ambient = 0xcccccc;\n scene.environment.ambient = 0x777777;\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(0.2f,-0.5f,1f),0x888888,144,120));\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(1f,-1f,1f),0x888888,144,120));\n // scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(1f,1f,1f),0x222222,100,40));\n //scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(-1f,1f,1f),0x222222,100,40));\n // scene.addLight(\"Light3\",new idx3d_Light(new idx3d_Vector(-1f,2f,1f),0x444444,200,120));\n scene.addLight(\"KeyLight\", new idx3d_Light(new idx3d_Vector(1f, -1f, 1f), 0xffffff, 0xffffff, 100, 100));\n scene.addLight(\"FillLightRight\", new idx3d_Light(new idx3d_Vector(-1f, 0f, 1f), 0x888888, 50, 50));\n scene.addLight(\"FillLightDown\", new idx3d_Light(new idx3d_Vector(0f, 1f, 1f), 0x666666, 50, 50));\n\n if (sharedLightmap == null) {\n sharedLightmap = scene.getLightmap();\n } else {\n scene.setLightmap(sharedLightmap);\n }\n }", "private void createScene() {\r\n imageView.setFitWidth(400);\r\n imageView.setFitHeight(300);\r\n\r\n Scene scene = new Scene(rootScene(), 700, 600);\r\n\r\n primaryStage.setTitle(TITLE);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n }", "public gameScene_Model(Stage primaryStage){\n this.primaryStage = primaryStage;\n background = new MyStage();\n this.scene = new Scene(background,600,800);\n animal = new Animal(\"file:src/FroggerApp/Images_File/froggerUp.png\");\n }", "public void start(Stage stage) {\n stage.setScene(\n //create scene with root and size 250 x 100\n new Scene(\n //add circle to a new Group named root\n new Group(\n //create circle of radius = 30 at x=40, y=40\n new Circle(40, 40, 30)\n ), 250, 100)\n );\n stage.setTitle(\"My JavaFX Application\"); //set the stage\n stage.show();\t\t\t\t\t\t\t\t //made stage visible\n }", "@Override\n public void start(Stage primaryStage) {\n\n // Creates the scene and displays it to the main window\n Scene withDrawPaneSetup = new Scene(withDrawPaneSetup(primaryStage), 1024, 768);\n primaryStage.setScene(withDrawPaneSetup);\n }", "public static void showPolygon(Stage primaryStage) {\n Scene scene = new Scene(new MyPolygon(), 400, 400);\n primaryStage.setTitle(\"ShowPolygon\"); // Set the stage title\n primaryStage.setScene(scene); // Place the scene in the stage\n primaryStage.show(); // Display the stage\n }", "public void start(Stage myStage) { \n \n System.out.println(\"Inside the start() method.\"); \n \n // Give the stage a title. \n myStage.setTitle(\"JavaFX Skeleton.\"); \n \n // Create a root node. In this case, a flow layout \n // is used, but several alternatives exist. \n FlowPane rootNode = new FlowPane(); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 300, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n // Show the stage and its scene. \n myStage.show(); \n }", "public void setScene(Scene scene){\n this.scene = scene;\n }", "private void buildScene() {\n for (int i = 0; i < Layer.LAYERCOUNT.ordinal(); i++) {\n SceneNode layer = new SceneNode();\n sceneLayers[i] = layer;\n\n sceneGraph.attachChild(layer);\n }\n\n // Prepare the tiled background\n Texture texture = textures.getTexture(Textures.DESERT);\n IntRect textureRect = new IntRect(worldBounds);\n texture.setRepeated(true);\n\n // Add the background sprite to the scene\n SpriteNode backgroundSprite = new SpriteNode(texture, textureRect);\n backgroundSprite.setPosition(worldBounds.left, worldBounds.top);\n sceneLayers[Layer.BACKGROUND.ordinal()].attachChild(backgroundSprite);\n\n // Add player's aircraft\n playerAircraft = new Aircraft(Aircraft.Type.EAGLE, textures);\n playerAircraft.setPosition(spawnPosition);\n playerAircraft.setVelocity(40.f, scrollSpeed);\n sceneLayers[Layer.AIR.ordinal()].attachChild(playerAircraft);\n\n // Add two escorting aircrafts, placed relatively to the main plane\n Aircraft leftEscort = new Aircraft(Aircraft.Type.RAPTOR, textures);\n leftEscort.setPosition(-80.f, 50.f);\n playerAircraft.attachChild(leftEscort);\n\n Aircraft rightEscort = new Aircraft(Aircraft.Type.RAPTOR, textures);\n rightEscort.setPosition(80.f, 50.f);\n playerAircraft.attachChild(rightEscort);\n }", "@Override\n public final void start(final Stage primaryStage) {\n Scene scene = new Scene(getPane(), PANE_WIDTH, PANE_HEIGHT);\n primaryStage.setTitle(\"Tic-Tak-Toe\"); // Set the stage title.\n primaryStage.setScene(scene); // Place the scene in the stage.\n primaryStage.show(); // Display the stage.\n }", "public void start(Stage stage) {\n game = new Game();\n\n Scene gameScene = new Scene(game.getVisual().getRoot(), MainGUI.WIDTH, MainGUI.HEIGHT);\n gameScene.setOnKeyPressed(new PressHandler());\n gameScene.setOnKeyReleased(new ReleaseHandler());\n\n createMenu(stage, gameScene);\n Scene menuScene = new Scene(root, MainGUI.WIDTH, MainGUI.HEIGHT);\n stage.setScene(menuScene);\n\n }", "void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"Scene.fxml\"));\n primaryStage.setTitle(\"Project 3\");\n primaryStage.setScene(new Scene(root, 600, 600));\n primaryStage.show();\n }", "public Scene scene() {\n AnchorPane anchorPane = new AnchorPane();\n\n Pane track = raceTrack.trackpainting();\n\n AnchorPane.setTopAnchor(track, 40.0);\n AnchorPane.setLeftAnchor(track, 40.0);\n\n determineStartingLocation(carOne, carTwo, carThree);\n\n carPosition(carOne);\n carPosition(carTwo);\n carPosition(carThree);\n\n AnchorPane.setTopAnchor(btnStartRace, 480.0);\n AnchorPane.setLeftAnchor(btnStartRace, 740.0);\n\n AnchorPane.setTopAnchor(btnEndRace, 480.0);\n AnchorPane.setLeftAnchor(btnEndRace, 730.0);\n\n AnchorPane.setTopAnchor(txtWarning, 600.0);\n AnchorPane.setLeftAnchor(txtWarning, 610.0);\n\n anchorPane.setBackground(\n new Background(new BackgroundFill(Color.rgb(0, 132, 0),\n CornerRadii.EMPTY, Insets.EMPTY)));\n\n anchorPane.getChildren().addAll(track, carOne, carTwo, carThree, btnStartRace, btnEndRace, txtWarning);\n\n Scene scene = new Scene(anchorPane, 1580, 1030);\n return scene;\n }", "public void start(Stage stage) {\n Layout layout = new Layout();\n Scene scene = new Scene(layout, 400, 400); \n stage.setScene(scene);\n layout.bindToScene(scene);\n new AppController(layout);\n stage.show();\n showInstructions();\n }", "public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }", "public DraftKit_GUI(Stage initPrimaryStage) {\n primaryStage = initPrimaryStage;\n }", "@Override\r\n\tpublic void start(Stage stage) throws Exception {\r\n\t\t\r\n\t\tthis.stage = stage;\r\n\t\t\r\n\t\tstage.setTitle(windowName);\r\n\r\n\t\tPlatform.setImplicitExit(false);\r\n\r\n\t\tFXMLLoader loader = new FXMLLoader();\r\n\r\n\t\tloader.setClassLoader(this.getClass().getClassLoader());\r\n\t\t\r\n\t\tParent box = loader.load(new ByteArrayInputStream(fxml.getBytes()));\r\n\t\t\r\n\t\tcontroller = loader.getController();\r\n\t\t\r\n\t\tcontroller.setGUI(this);\r\n\r\n\t\tscene = new Scene(box);\r\n\t\t\r\n\t\tscene.setFill(Color.TRANSPARENT);\r\n\r\n\t\tif (this.customTitleBar)\r\n\t\t\tstage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\tif (this.css != null)\r\n\t\t\tscene.getStylesheets().add(this.css.toExternalForm());\r\n\t\tstage.setScene(scene);\r\n\t\t\r\n\t\tstage.setResizable(false);\r\n\r\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\r\n\r\n\t @Override\r\n\t public void handle(WindowEvent event) {\r\n\t Platform.runLater(new Runnable() {\r\n\r\n\t @Override\r\n\t public void run() {\r\n\t endScript();\r\n\t }\r\n\t });\r\n\t }\r\n\t });\r\n\t\t\r\n\t}", "private void initJFX(JFXPanel fxPanel) {\n Group globalRoot = new Group();\n Scene scene = new Scene(globalRoot, getWidth(), getHeight());\n scene.setFill(Color.WHITE);\n\n Group root3D = new Group();\n SubScene scene3D = new SubScene(root3D, getWidth(), getHeight(), true, SceneAntialiasing.BALANCED);\n scene3D.setFill(convertToJFXColour(AIRFIELD_COLOUR));\n globalRoot.getChildren().add(scene3D);\n\n createScene(globalRoot, root3D);\n initCamera(scene3D, root3D);\n\n scene.getStylesheets().add(getClass().getResource(\"customstyles.css\").toExternalForm());\n\n fxPanel.setScene(scene);\n }", "@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }", "public static Scene scene2() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene2\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initAmbient(new Vec(0.4))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game).\r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t// Add lighting condition:\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.7));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "private void createFXScene() {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"toolBarFXML.fxml\"));\n Scene scene = new Scene(root, Color.LIGHTGREY);\n fxPanel.setScene(scene);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n }\n\n }", "@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}", "public static void setScene() {\n\n Shape ground = new Plane(vec3(0.0, -1.0, 0.0), vec3(0, 1, -0.2), new Diffuse(new Vec3(1,1,1), white));\n \n /* Shape globe1 = new Sphere(vec3(0.0, 2, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe2 = new Sphere(vec3(2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe3 = new Sphere(vec3(-2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n*/\n Shape globe1T = new Sphere(vec3(0.0, 2, -2.0), 0.3, new Diffuse(new Vec3(1,1,1), white));\n // Shape globe2T = new Sphere(vec3(-0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1),yellow));\n // Shape globe3T = new Sphere(vec3(0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1), yellow));\n\n \n \n Shape globe4 = new Sphere(vec3(0.0, 2, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe5 = new Sphere(vec3(2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe6 = new Sphere(vec3(-2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n \n Shape globe7 = new Sphere(vec3(0.0, 2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe8 = new Sphere(vec3(2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe9 = new Sphere(vec3(-2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe7D = new Sphere(vec3(0.0, -2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n\n Shape globeC = new Sphere(vec3(0.0, 0.0, -6.0), 1.0, new Diffuse(new Vec3(1,1,1), red));\n \n ArrayList<Shape> shapes = new ArrayList<>();\n shapes.add(bg);\n shapes.add(ground);\n shapes.add(globe1T);\n // shapes.add(globe2T);\n // shapes.add(globe3T);\n //shapes.add(globe4);\n //shapes.add(globe5);\n shapes.add(globe7);\n shapes.add(globe8);\n shapes.add(globe9);\n shapes.add(globe7D);\n shapes.add(globeC);\n gr = new Group(shapes);\n /////////////////////////////--------------------------------------\n \n \n }", "@Override\r\n\tpublic void start(Stage s) throws Exception {\n\t\tc=new Container();\r\n\t\tthis.st=s;\r\n\t\tc.setFs(new FirstScreen(st,c));\r\n\t\tthis.sc=new Scene(c.getFs(), 800,600);\r\n\t\tst.setScene(sc);\r\n\t\tst.setTitle(\"Main Window\");\r\n\t\tst.show();\r\n\t}", "public void start(Stage myStage) {\n myStage.setTitle(\"Character Recognizer\");\r\n\r\n // Create the HBox\r\n HBox rootNode = new HBox(10);\r\n rootNode.setPadding(new Insets(10, 10, 10, 10));\r\n\r\n //Initialize the Grid Canvas\r\n GridCanvas grid = new GridCanvas();\r\n\r\n //Initialize the Recognizer Controller\r\n RecognizerController controller = new RecognizerController(grid);\r\n\r\n // Create a scene.\r\n Scene myScene = new Scene(rootNode);\r\n rootNode.getChildren().addAll(controller, grid);\r\n\r\n // Set the scene on the stage\r\n myStage.setScene(myScene);\r\n\r\n // Parametrize and show the stage and its scene\r\n myStage.sizeToScene();\r\n myStage.setResizable(false);\r\n myStage.show();\r\n }", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tMain.stg = stage;\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"/stylesheets/MainMenu.fxml\"));\n\t\tstage.setTitle(BowmanConstants.GAME_TITLE);\n\t\tstage.setScene(new Scene(root, BowmanConstants.MENU_WIDTH, BowmanConstants.MENU_HEIGHT));\n\t\tstage.show();\n\t\tinit_settings();\n\t}", "private void start (final Stage stage) throws IOException{\n Parent pa = FXMLLoader.load(getClass().getResource(\"/toeicapp/EditQuestion.fxml\"));\n Scene scene = new Scene(pa);\n scene.setFill(Color.TRANSPARENT);\n stage.setTitle(\"Cập nhật Câu hỏi\"); \n stage.setScene(scene);\n stage.show();\n }", "public void create() {\n\t\t// TODO Auto-generated method stub\n\t\tskin = new Skin(Gdx.files.internal(\"uiskin.json\"));\n\t\tstage = new Stage();\n\t\tfinal TextButton playButton = new TextButton(\"Play\", skin, \"default\"); // Creates button with label \"play\"\n\t\tfinal TextButton leaderboardButton = new TextButton(\"Leaderboards\", skin, \"default\"); // Creates button with\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// label \"leaderboards\"\n\t\tfinal TextButton optionsButton = new TextButton(\"Options\", skin, \"default\"); // Creates button with label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"options\"\n\t\tfinal TextButton userInfoButton = new TextButton(\"User Info\", skin, \"default\");// Creates button with label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"User Info\"\n\t\tfinal TextButton quitGameButton = new TextButton(\"Exit Game\", skin, \"default\");\n\n\t\t// Three lines below this set the widths of buttons using the constant widths\n\t\tplayButton.setWidth(Gdx.graphics.getWidth() / 3);\n\t\tleaderboardButton.setWidth(playButton.getWidth());\n\t\toptionsButton.setWidth(playButton.getWidth());\n\t\tuserInfoButton.setWidth(playButton.getWidth());\n\t\tquitGameButton.setWidth(playButton.getWidth());\n\n\t\t// Set the heights using constant height\n\t\tplayButton.setHeight(Gdx.graphics.getHeight() / 15);\n\t\tleaderboardButton.setHeight(playButton.getHeight());\n\t\toptionsButton.setHeight(playButton.getHeight());\n\t\tuserInfoButton.setHeight(playButton.getHeight());\n\t\tquitGameButton.setHeight(playButton.getHeight());\n\n\t\t// Sets positions for buttons\n\t\tplayButton.setPosition(Gdx.graphics.getWidth() / 20, Gdx.graphics.getHeight() / 3);\n\t\tleaderboardButton.setPosition(playButton.getX(), playButton.getY() - leaderboardButton.getHeight());\n\t\toptionsButton.setPosition(playButton.getX(), leaderboardButton.getY() - optionsButton.getHeight());\n\t\tuserInfoButton.setPosition(playButton.getX(), optionsButton.getY() - userInfoButton.getHeight());\n\t\tquitGameButton.setPosition(playButton.getX(), userInfoButton.getY() - quitGameButton.getHeight());\n\n\t\t// User Info Name and sign in/ sign out button at the top of the screen\n\t\tfinal Label userInfoLabel = new Label(\"HI GUYS: \" + Constants.user, skin, \"default\");\n\t\tfinal TextButton userSignButton = new TextButton(\"singin/out\", skin, \"default\");\n\t\tuserSignButton.setHeight(Gdx.graphics.getHeight() / 40);\n\t\tuserSignButton.setPosition(Gdx.graphics.getWidth() - userSignButton.getWidth(),\n\t\t\t\tGdx.graphics.getHeight() - userSignButton.getHeight());\n\t\tif (Constants.userID == 0)\n\t\t\tuserSignButton.setText(\"Sign In\");\n\t\telse\n\t\t\tuserSignButton.setText(\"Sign Out\");\n\t\tuserSignButton.addListener(new ClickListener() { // When Sign in/Sing out is pressed in the top right\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tif (Constants.userID == 0) { // If no one is signed in\n\t\t\t\t\tdispose();\n\t\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\t\t\t\t} else { // If a user is currently signed in\n\t\t\t\t\tConstants.userID = 0;\n\t\t\t\t\tConstants.user = \"Temporary User\";\n\t\t\t\t\tcreate();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tuserInfoLabel.setHeight(userSignButton.getHeight());\n\t\tuserInfoLabel.setPosition(Gdx.graphics.getWidth() - userInfoLabel.getWidth() - userSignButton.getWidth(),\n\t\t\t\tGdx.graphics.getHeight() - userInfoLabel.getHeight());\n\t\tstage.addActor(userInfoLabel);\n\t\tstage.addActor(userSignButton);\n\n\t\tplayButton.addListener(new ClickListener() { // This tells button what to do when clicked\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new LobbyScreen(game)); // Switch over to lobby screen\n\t\t\t}\n\t\t});\n\n\t\tleaderboardButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new LeaderboardScreen(game)); // Switch over to leaderboard screen\n\t\t\t}\n\t\t});\n\n\t\toptionsButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t// Do some stuff when clicked\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new OptionsScreen(game));\n\n\t\t\t}\n\t\t});\n\n\t\tuserInfoButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\n\t\t\t}\n\t\t});\n\n\t\tquitGameButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t});\n\n\t\t// Adds all buttons to stage to be rendered\n\t\tstage.addActor(playButton);\n\t\tstage.addActor(leaderboardButton);\n\t\tstage.addActor(optionsButton);\n\t\tstage.addActor(userInfoButton);\n\t\tstage.addActor(quitGameButton);\n\n\t\tGdx.input.setInputProcessor(stage);\n\t}", "public void setupScene() {\n\t\tplayScene = new Scene(new Group());\n\t\tupdateScene(playScene);\n\t\twindow.setScene(playScene);\n\t\twindow.show();\n\t}", "@Override\n public void start(Stage primaryStage) {\n\n pStage = primaryStage;\n\n try {\n\n\n Parent root = FXMLLoader.load(getClass().getResource(\"/GUI.fxml\"));\n\n Scene scene = new Scene(root, 600, 400);\n\n primaryStage.setTitle(\"Shopper 5000 Ultimate\");\n\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.show();\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n public void start(Stage stage){\n Text msg = new Text(\"Hola JavaFX\");\r\n \r\n //toplevel node\r\n VBox root = new VBox();\r\n \r\n //add the child node to VBox root node\r\n root.getChildren().add(msg);\r\n \r\n //Create a scene\r\n Scene scene = new Scene(root, 300, 50);\r\n \r\n //set the scene to the stage\r\n stage.setScene(scene);\r\n \r\n //set a title for the stage\r\n stage.setTitle(\"Hola Aplicación JavaFX\");\r\n \r\n //show the stage\r\n stage.show();\r\n }", "public void start(Stage selectionStage) {\n Button Stage1Btn = new Button();\n Stage1Btn.setText(\"Stage 1\");\n Stage1Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage1Btn.setPrefSize(150,150);\n Stage1Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage1 gs1= new GameStage1();\n Stage gameStage = new Stage();\n gs1.start(gameStage);\n }\n });\n \n //Create button link to Stage 2\n Button Stage2Btn = new Button();\n Stage2Btn.setText(\"Stage 2\");\n Stage2Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage2Btn.setPrefSize(150,150);\n Stage2Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage2 gs2= new GameStage2();\n Stage gameStage2 = new Stage();\n gs2.start(gameStage2);\n }\n });\n \n //Create button link to Stage 3\n Button Stage3Btn = new Button();\n Stage3Btn.setText(\"Stage 3\");\n Stage3Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage3Btn.setPrefSize(150,150);\n Stage3Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage3 gs3= new GameStage3();\n Stage gameStage3 = new Stage();\n gs3.start(gameStage3);\n }\n });\n \n //Create button link to Stage 4\n Button Stage4Btn = new Button();\n Stage4Btn.setText(\"Stage 4\");\n Stage4Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage4Btn.setPrefSize(150,150);\n Stage4Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage4 gs4= new GameStage4();\n Stage gameStage4 = new Stage();\n gs4.start(gameStage4);\n }\n });\n \n //Create button link to Stage 5\n Button Stage5Btn = new Button();\n Stage5Btn.setText(\"Stage 5\");\n Stage5Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage5Btn.setPrefSize(150,150);\n Stage5Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage5 gs5= new GameStage5();\n Stage gameStage5 = new Stage();\n gs5.start(gameStage5);\n }\n });\n //Create a HBox to insert multiple button and arrange them horizontally\n HBox mainBtn = new HBox();\n mainBtn.setPadding(new Insets(15, 12, 15, 12));\n mainBtn.setSpacing(10);\n mainBtn.setAlignment(Pos.CENTER);\n \n //Create Main Menu button\n Button MainMenuBtn = new Button();\n MainMenuBtn.setText(\"Main Menu\");\n MainMenuBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n MainMenuBtn.setPrefSize(300,80);\n MainMenuBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert MainMenuAlert = new Alert(Alert.AlertType.CONFIRMATION);\n MainMenuAlert.initStyle(StageStyle.UTILITY);\n MainMenuAlert.setTitle(\"Confirmation\");\n MainMenuAlert.setHeaderText(\"Do you want to back to Main Menu?\");\n MainMenuAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = MainMenuAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n selectionStage.close();\n MainScreenStage mss = new MainScreenStage();\n mss.start(selectionStage);\n// if user chose OK this window will closed and Main Interface will opened\n } \n });\n\n //Create button to close program\n Button QuitBtn = new Button();\n QuitBtn.setText(\"Quit Game\");\n QuitBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n QuitBtn.setPrefSize(300,80);\n QuitBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert QuitAlert = new Alert(Alert.AlertType.CONFIRMATION);\n QuitAlert.initStyle(StageStyle.UTILITY);\n QuitAlert.setTitle(\"Confirmation\");\n QuitAlert.setHeaderText(\"Do you want to quit game?\");\n QuitAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = QuitAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n Platform.exit();// ... user chose OK\n } else {\n // ... user chose CANCEL or closed the dialog\n }\n\n });\n //Create HBox to add button\n HBox selectionBtns = new HBox();\n selectionBtns.setSpacing(10);\n selectionBtns.setAlignment(Pos.CENTER);\n selectionBtns.getChildren().addAll(Stage1Btn, Stage2Btn, Stage3Btn, Stage4Btn, Stage5Btn);\n mainBtn.getChildren().addAll(MainMenuBtn,QuitBtn);\n \n BorderPane root = new BorderPane();\n root.setCenter(selectionBtns);\n root.setBottom(mainBtn);\n \n Scene scene = new Scene(root, 1200, 800);\n \n selectionStage.setTitle(\"Shapes\");\n selectionStage.setScene(scene);\n selectionStage.show();\n }", "public Game(Stage s){\n\t\tmyStage = s;\n\t}", "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 }", "@Override\r\n public void start(Stage primaryStage) {\n VFlow flow = FlowFactory.newFlow();\r\n\r\n // make it visible\r\n flow.setVisible(true);\r\n\r\n // create two nodes:\r\n // one leaf node and one subflow which is returned by createNodes\r\n createFlow(flow, 3, 6);\r\n\r\n // show the main stage/window\r\n showFlow(flow, primaryStage, \"VWorkflows Tutorial 05: View 1\");\r\n }", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tStackPane pane = new StackPane();\n\t\tScene scene = new Scene(pane);\n\t\tfirstLevel();\n\t\tpane.getChildren().add(mRoot);\n\t\tstage.setScene(scene);\n\t\t\n\t\t\n\t}", "public void createChequeStage(){\n chequeStage = new Stage();\n BorderPane chequePageBp = new BorderPane();\n \n String headerTextMain = \"Cheque Account\";\n setBorderPaneTop(chequePageBp, headerTextMain, chequeStage);\n setBorderPaneCenterCheque(chequePageBp);\n setBorderPaneBottomCheque(chequePageBp, chequeStage);\n \n Scene sceneCheque = new Scene(chequePageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneCheque.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n chequeStage.setTitle(bankName);\n chequeStage.setScene(sceneCheque);\n }", "@Override\n\tpublic void createScene()\n\t\n\t{\n\t loading = new Sprite (0,0,resourceManager.loadingRegion,vbo); // тупо ставим спрайт с картинкой\n\t\tattachChild(loading);\n\t}", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tinstance = this;\n\t\tmainStage = stage;\n\t\tHemsProps.init(hemsPropsPath);\n\t\t\n\t\t//decide if data upload mode or normal production\n\t\tif (!IS_DATA_UPLOAD_MODE) {\n\t\t\tstage.setScene(createScene(loadMainPane()));\n\t\t\tstage.setTitle(windowTitle);\n\t\t\tstage.show();\n\n\t\t} else {\n\t\t\tDataCreator();\n\t\t}\n\t}", "@Override\n public void start(Stage stage) {\n\n ModelImpl model = new ModelImpl(PuzzleLibrary.create());\n ControllerImpl controller = new ControllerImpl(model);\n Clues clues = model.GetClues();\n PuzzelView puzzle = new PuzzelView(controller, model, stage);\n model.addObserver(puzzle);\n stage.setScene(puzzle.getScene());\n stage.show();\n\n // GridPane g = new GridPane();\n // Scene scene = new Scene(g, 1000, 1000);\n // scene.getStylesheets().add(\"style/stylesheet.css\");\n // stage.setScene(scene);\n\n }", "@Override\n public void start(Stage stage) throws IOException {\n logInfo();\n\n scene = new Scene(loadFXML(\"mainView\"));\n stage.setScene(scene);\n stage.setTitle(\"OzoMorph\");\n stage.show();\n }", "public void setStage(Stage stage) {\r\n this.stage = stage;\r\n }", "@Override\n public void start(final Stage stage) {\n\tLabel label = new Label(\" The key to making programs fast\\n\" +\n\t\t\t\" is to make them do practically nothing.\\n\" +\n\t\t\t\" -- Mike Haertel\");\t\n\tCircle circle = new Circle(160, 120, 30);\n\tPolygon polygon = new Polygon(160, 120, 200, 220, 120, 220);\n\tGroup group = new Group(label, circle, polygon);\n Scene scene = new Scene(group,320,240);\n stage.setScene(scene);\n\tstage.setTitle(\"CS 400: The Key\");\n stage.show();\n }", "public void createNodes() {\n\n //Current wave text\n currentWaveText = new Text();\n currentWaveText.setY(50);\n currentWaveText.setX(Constants.GAME_WIDTH / 2 - 150);\n currentWaveText.setTextAlignment(TextAlignment.LEFT);\n currentWaveText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 36));\n currentWaveText.setFill(Color.TOMATO);\n currentWaveText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(currentWaveText);\n\n //Health bar\n healthBar = new Rectangle(healthBarMaxWidth, healthBarMaxHeight, Color.LIMEGREEN);\n healthBar.setY(10);\n healthBar.setX(10);\n\n FXGL.getGameScene().addUINode(healthBar);\n\n //Health bar background\n healthBackground = new Rectangle(healthBarMaxWidth, healthBarMaxHeight);\n healthBackground.setY(10);\n healthBackground.setX(10);\n healthBackground.setFill(Color.TRANSPARENT);\n healthBackground.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(healthBackground);\n\n //Amount of ammo text\n amountOfAmmoText = new Text(10, 100, \"\");\n amountOfAmmoText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 24));\n amountOfAmmoText.setFill(Color.LIMEGREEN);\n amountOfAmmoText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(amountOfAmmoText);\n\n //Active weapon text\n activeWeaponText = new Text(10, 70, \"\");\n activeWeaponText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 24));\n activeWeaponText.setFill(Color.LIMEGREEN);\n activeWeaponText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(activeWeaponText);\n\n //Reloading text\n reloadingText = new Text(10, 130, \"\");\n reloadingText.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 24));\n reloadingText.setFill(Color.LIMEGREEN);\n reloadingText.setStroke(Color.BLACK);\n\n FXGL.getGameScene().addUINode(reloadingText);\n update();\n }", "public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\t\n\t\tSystem.out.println(\"The game begins now...\");\n\t\tBoardConfig boardConfig = new BoardConfig(new XY(25, 25));\n\n\t\tBoard board = new Board(boardConfig);\n\n\t\tState state = new State(board);\n\n\t\tFxUI fxUI = FxUI.createInstance(boardConfig.getSize());\n\n\t\tfinal Game game = new GameImpl(state);\n\n\t\tgame.setUi(fxUI);\n\n\t\tfxUI.setGameImpl((GameImpl) game);\n\n\t\tprimaryStage.setScene(fxUI);\n\t\tprimaryStage.setTitle(\"Welcome to the virtual world of Squirrels.\");\n\t\tprimaryStage.setAlwaysOnTop(true);\n\t\tfxUI.getWindow().setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent evt) {\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\n\t\t});\n\t\tprimaryStage.show();\n\n\t\tstartGame(game);\n\t}", "@Override\r\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"ui/main.fxml\")); //FXMLLoader.load(Utilities.getResourceURL(\"ui/main.fxml\"));\r\n primaryStage.setTitle(\"Custom Groovy Game Engine\");\r\n primaryStage.setScene(new Scene(root, 960, 480));\r\n primaryStage.show();\r\n }", "@Override\n public void create() {\n tex = new Texture(Gdx.files.internal(\"data/scene.png\"));\n\n //important since we aren't using some uniforms and attributes that SpriteBatch expects\n ShaderProgram.pedantic = false;\n\n //print it out for clarity\n System.out.println(\"Vertex Shader:\\n-------------\\n\\n\" + VERT);\n System.out.println(\"\\n\");\n System.out.println(\"Fragment Shader:\\n-------------\\n\\n\" + FRAG);\n\n shader = new ShaderProgram(VERT, FRAG);\n if (!shader.isCompiled()) {\n System.err.println(shader.getLog());\n System.exit(0);\n }\n if (shader.getLog().length() != 0)\n System.out.println(shader.getLog());\n\n\n batch = new SpriteBatch(1000, shader);\n batch.setShader(shader);\n\n cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n cam.setToOrtho(false);\n }", "@Override\n\tpublic void start(Stage stage) throws Exception \n\t{\n\n /* Game initialisation */\n Position.maxX = 520;\n \n\t\tGame game = new Game(new LinkedList<PlayerInterface>(), 600, 600);\n\n\n\t\t/* GUI initialisation */\n\t\t\n\t\t// Nom de la fenetre\n stage.setTitle(\"BalleAuPrisonnier\");\n\n Group root = new Group();\n Scene scene = new Scene(root);\n \n // On cree le terrain de jeu et on l'ajoute a la racine de la scene\n Field gameField = new Field(scene, game);\n root.getChildren().add(gameField);\n for(PlayerInterface p : gameField.game.getJoueurs()){\n \troot.getChildren().add(((GraphicPlayer)p).sprite);\n }\n\n // On ajoute la scene a la fenetre et on affiche\n stage.setScene(scene);\n stage.show();\n\t}", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "protected Scene(Kroy game)\n {\n table = new Table();\n background = new NinePatchDrawable(new NinePatch(new Texture(\"Grey.png\"), 3, 3, 3, 3));\n skin = new Skin(Gdx.files.internal(\"uiskin.json\"));\n stageBatch = game.batch;\n Viewport viewport = new ScreenViewport(new OrthographicCamera());\n stage = new Stage(viewport, stageBatch);\n table.setBackground(background);\n }", "@Override\n public void start(Stage primaryStage) throws Exception {\n primaryStage.setScene(ClientPort(primaryStage));\n primaryStage.show();\n }", "public void renderScene() {\n\t\tscene.ready=false;\n\t\tscene.num_points=0;\n\t\tscene.num_triangles=0;\n\t\tscene.num_tri_vertices=0;\n\t\tscene.list_of_triangles.clear(); // reset the List of Triangles (for z-sorting purposes)\n\t\tscene.num_objects_visible=0;\n\t\ttotal_cost=0;\n\t\tupdateLighting();\n\t\tfor (int i=0; i<num_vobjects;i++) {\n\t\t\tif (vobject[i].potentially_visible) {\n\t\t\t\tif (checkVisible(i)) {\n\t\t\t\t\tscene.num_objects_visible++;\n\t\t\t\t\tcalculateRelativePoints(i);\n\t\t\t\t\tif (scene.dot_field) {defineDots(i);} \n\t\t\t\t\tif (scene.wireframe) {defineTriangles(i);}\n\t\t\t\t\tif (scene.solid_poly) {defineTriangles(i);}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tif (scene.z_sorted) {Collections.sort(scene.list_of_triangles);}\n\t\tscene.ready=true;\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception {\n\n // set up window.\n primaryStage.setWidth(600);\n primaryStage.setHeight(400);\n primaryStage.setResizable(false);\n\n // set up scenes.\n FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource(\"FXML/mainMenuLayout.fxml\"));\n Scene mainMenuScene = new Scene(mainMenuLoader.load());\n FXMLLoader gameLoader = new FXMLLoader(getClass().getResource(\"FXML/gameLayout.fxml\"));\n Scene gameScene = new Scene(gameLoader.load());\n\n // set the main menu to load into the game.\n MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController();\n mainMenuController.setGameScene(gameScene);\n\n primaryStage.setScene(mainMenuScene);\n\n primaryStage.show();\n\n }", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "public GameState(Stage stage, Group root, Scene scene, StateManager stateManager) {\n game = GameLoop.getInstance(root, scene, stateManager);\n game.start();\n stage.setScene(scene);\n stage.setFullScreen(true);\n }", "public Scene(String name) {\r\n\t\tthis.name = name;\r\n\t}", "@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"calories.fxml\"));\n stage.setTitle(\"Calories\");\n stage.setScene(new Scene(root,400,700));\n stage.getScene().getStylesheets().add(getClass().getResource(\"styles.css\").toExternalForm());\n stage.show();\n }", "public static Scene scene7() {\r\n\t\tPoint cameraPosition = new Point(-3.0, 1.0, 6.0);\r\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */cameraPosition,\r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0),\r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene7\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initBackgroundColor(new Vec(0.01,0.19,0.22))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(3);\r\n\r\n\t\tShape plainShape = new Plain(new Vec(0.0,-4.3,0.0), new Point(0.0, -4.3, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial()\r\n\t\t\t\t.initKa(new Vec(0.11,0.09,0.02)).initReflectionIntensity(0.1);\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\tShape transparentSphere = new Sphere(new Point(1.5, 0, -3.5), 4);\r\n\t\tMaterial transparentSphereMat = Material.getGlassMaterial(true)\r\n\t\t\t\t.initRefractionIntensity(0.8).initRefractionIndex(1.35).initReflectionIntensity(0.4);\r\n\t\tSurface transparentSphereSurface = new Surface(transparentSphere, transparentSphereMat);\r\n\t\tfinalScene.addSurface(transparentSphereSurface);\r\n\r\n\t\tPoint sunPosition = new Point(0, 3, -45);\r\n\t\tShape sunDome = new Dome(sunPosition, 8, new Vec(0, 1, 0));\r\n\t\tMaterial sunDomeMat = Material.getMetalMaterial().initKa(new Vec(0.95,0.84,0.03));\r\n\t\tSurface sunDomeSurface = new Surface(sunDome, sunDomeMat);\r\n\t\tfinalScene.addSurface(sunDomeSurface);\r\n\r\n\t\tVec sunDirection = cameraPosition.sub(sunPosition);\r\n\t\tLight sunLight = new DirectionalLight(sunDirection, new Vec(0.95,0.84,0.03));\r\n\t\tfinalScene.addLightSource(sunLight);\r\n\r\n\t\treturn finalScene;\r\n\t}", "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}", "View(Stage stage, Model model,Player player) {\n this.model = model;\n this.stage = stage;\n battleRoot = new BattleRoot(SCREEN_SIZE_X, SCREEN_SIZE_Y,player);\n playingScene = new Scene(battleRoot);\n this.stage.setScene(this.playingScene);\n// battleRoot.getChildren().addAll(textFieldRoot, enemysPlayFieldRoot, playFieldRoot, handCommand);\n }", "@Test\n\tvoid testInitStage() {\n\t\tstage.initStage();\n\t\tassertEquals(400, (stage.getBoxes().get(0).getX()));\n\t\tassertEquals(250, (stage.getBoxes().get(0).getY()));\n\t\tassertEquals(250, stage.getCoins().get(0).getX());\n\t\tassertEquals(210, stage.getCoins().get(0).getY());\n\t\tassertEquals(40, stage.getCat().getX());\n\t\tassertEquals(250, stage.getCat().getY());\n\t\tassertEquals(600, stage.getGhosts().get(0).getX());\n\t\tassertEquals(210, stage.getGhosts().get(0).getY());\n\t\tassertEquals(400, stage.getBird().getX());\n\t\tassertEquals(160, stage.getBird().getY());\n\n\t}", "private void setupStage(Scene scene) {\n SystemTray.create(primaryStage, shutDownHandler);\n\n primaryStage.setOnCloseRequest(event -> {\n event.consume();\n stop();\n });\n\n\n // configure the primary stage\n primaryStage.setTitle(bisqEnvironment.getRequiredProperty(AppOptionKeys.APP_NAME_KEY));\n primaryStage.setScene(scene);\n primaryStage.setMinWidth(1020);\n primaryStage.setMinHeight(620);\n\n // on windows the title icon is also used as task bar icon in a larger size\n // on Linux no title icon is supported but also a large task bar icon is derived from that title icon\n String iconPath;\n if (Utilities.isOSX())\n iconPath = ImageUtil.isRetina() ? \"/images/[email protected]\" : \"/images/window_icon.png\";\n else if (Utilities.isWindows())\n iconPath = \"/images/task_bar_icon_windows.png\";\n else\n iconPath = \"/images/task_bar_icon_linux.png\";\n\n primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(iconPath)));\n\n // make the UI visible\n primaryStage.show();\n }", "public Tela(Stage stage, Screen screen, int numTela) {\n this.stage = stage;\n this.numTela = numTela;\n construir(screen);\n }", "private void setup() throws IOException {\n stage = new Stage();\n\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"FormInput.fxml\"));\n loader.setController(this);\n\n Scene scene = new Scene(loader.load());\n stage.setScene(scene);\n }", "@Override\r\n\tpublic void start(final Stage stagew) throws Exception {\n\t\tpane\t=\tnew\tAnchorPane();\r\n\t\tpane.setPrefSize(800, 600);\r\n\t\tScene scene = new Scene(pane);\r\n\t\tstagew.setScene(scene);\r\n\t\tstagew.setResizable(false);\r\n\t\t\r\n\t\t\r\n\t\tBackgroundImage backg= new BackgroundImage(new Image(\"https://i2.wp.com/obscenidadedigital.com/wp-content/uploads/2017/10/gradiente.png\",900,800,false,true),\r\n\t\tBackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\r\n\t\tBackgroundSize.DEFAULT);\r\n\t\t//then you set to your node\r\n\t\tpane.setBackground(new Background(backg));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tTextField CodFornecedor = new TextField(\"Codigo Do Fornecedor\");\r\n\t\tCodFornecedor.setLayoutX(20);\r\n\t\tCodFornecedor.setLayoutY(190);\r\n\t\t\r\n\t\tTextField NomeFornecedor = new TextField(\"Nome\");\r\n\t\tNomeFornecedor.setLayoutX(250);\r\n\t\tNomeFornecedor.setLayoutY(190);\r\n\t\t\r\n\t\t\r\n\t\tTextField CNPJFornecedor = new TextField(\"CNPJ\");\r\n\t\tCNPJFornecedor.setLayoutX(20);\r\n\t\tCNPJFornecedor.setLayoutY(250);\r\n\t\t\r\n\t\t\r\n\t\tTextField PrecoprodutoFornecedor = new TextField(\"Preço Do Produto\");\r\n\t\tPrecoprodutoFornecedor.setLayoutX(250);\r\n\t\tPrecoprodutoFornecedor.setLayoutY(250);\r\n\t\t\r\n\t\t\r\n\t\tTextField descricaoProduto = new TextField(\"Descriçao do produto\");\r\n\t\tdescricaoProduto.setLayoutX(20);\r\n\t\tdescricaoProduto.setLayoutY(310);\r\n\t\t\r\n\t\tTextField quantidadeProduto = new TextField(\"Quantidade do produto\");\r\n\t\tquantidadeProduto.setLayoutX(250);\r\n\t\tquantidadeProduto.setLayoutY(310);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//botao\r\n\t\t\r\n\t\tButton btSalvarFD = new Button(Strings.botaoSalvar);\r\n\t\tbtSalvarFD.setTextFill(Color.DARKSLATEGREY);\r\n\t\tbtSalvarFD.setFont(Font.font(\"verdana\", FontWeight.BOLD, 25));\r\n\t\tbtSalvarFD.setLayoutX(750);\r\n\t\tbtSalvarFD.setLayoutY(580);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btvoltar = new Button(\"Voltar\");\r\n\t\tbtvoltar.setTextFill(Color.DARKSLATEGREY);\r\n\t\tbtvoltar.setFont(Font.font(\"verdana\", FontWeight.BOLD, 15));\r\n\t\tbtvoltar.setLayoutX(20);\r\n\t\tbtvoltar.setLayoutY(600);\r\n\t\t\r\n\t\t\r\n\t\tpane.getChildren().addAll(btSalvarFD,btvoltar,CodFornecedor,NomeFornecedor,CNPJFornecedor,PrecoprodutoFornecedor,descricaoProduto,quantidadeProduto);\r\n\t\t\r\n\t\tbtvoltar.setOnAction(e -> handle(stagew));\r\n\t\tbtSalvarFD.setOnAction(e -> btsalvarfd(stagew) );\r\n\t\t\r\n\t\tstagew.show();\r\n\t\t\r\n\t}", "private void mainScene(){\n // create maze load and route load/save buttons\n Button loadMazeButton = new Button(\"Load Maze\");\n loadMazeButton.setStyle(buttonStyle);\n loadMazeButton.setMinHeight(50);\n loadMazeButton.setMinWidth(170);\n Button loadRouteButton = new Button(\"Load Route\");\n loadRouteButton.setStyle(buttonStyle);\n loadRouteButton.setMinHeight(50);\n loadRouteButton.setMinWidth(170);\n Button saveRouteButton = new Button(\"Save Route\");\n saveRouteButton.setStyle(buttonStyle);\n saveRouteButton.setMinHeight(50);\n saveRouteButton.setMinWidth(170);\n\n // organise them in a HBox\n HBox routeBox = new HBox();\n routeBox.setAlignment(Pos.CENTER);\n routeBox.setSpacing(10);\n routeBox.setPadding(new Insets(10.0));\n routeBox.getChildren().addAll(\n loadMazeButton, loadRouteButton, saveRouteButton\n );\n\n // create maze display and display it in a VBox\n vMaze = null;\n tileBox = new VBox();\n tileBox.setAlignment(Pos.CENTER);\n tileBox.setBackground(new Background(\n new BackgroundFill(\n Color.rgb(176,188,60),\n CornerRadii.EMPTY,\n Insets.EMPTY\n )\n ));\n\n // which further goes into a HBox\n // this creates two layers of background: the interior\n // of the maze and the exterior to the left and right\n HBox tileBackground = new HBox();\n tileBackground.setAlignment(Pos.CENTER);\n tileBackground.setMinHeight(VisualMaze.DISPLAY_HEIGHT);\n tileBackground.setMinWidth(VisualMaze.DISPLAY_WIDTH);\n tileBackground.getChildren().add(tileBox);\n\n // create step button and label for messages\n Button stepButton = new Button(\"Next Step\");\n stepButton.setMinHeight(50);\n stepButton.setMinWidth(80);\n stepButton.setStyle(buttonStyle);\n mainMessage = new Label();\n mainMessage.setFont(new Font(\"Arial\", 30));\n mainMessage.setTextFill(Color.web(\"#c4bd52\"));\n mainMessage.setContentDisplay(ContentDisplay.CENTER);\n\n // and organise them on a borderpane\n BorderPane stepBox = new BorderPane();\n stepBox.setPadding(new Insets(10.0));\n stepBox.setRight(stepButton);\n stepBox.setLeft(mainMessage);\n\n // load all containers on a root container\n VBox root = new VBox();\n root.setAlignment(Pos.CENTER);\n root.setBackground(new Background(\n new BackgroundFill(\n Color.rgb(80,76,76),\n CornerRadii.EMPTY,\n Insets.EMPTY\n )\n ));\n root.getChildren().addAll(routeBox, tileBackground, stepBox);\n \n // set the main scene\n main = new Scene(root);\n\n // set the button events\n stepButton.setOnAction(e->{nextStep();});\n loadMazeButton.setOnAction(e->{requestInput(RequestType.MAZE);});\n loadRouteButton.setOnAction(e->{requestInput(RequestType.LROUTE);});\n saveRouteButton.setOnAction(e->{requestInput(RequestType.SROUTE);});\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}", "private void initializeGUIComponents() {\n\t\tmyScene = new Scene(myRoot);\n ButtonConditionManager.getInstance().beginListeningToScene(myScene);\n\t\tmyStage.setTitle(\"MY PLAYER VIEW\");\n\t\tmyStage.setScene(myScene);\n\t\tmyStage.show();\n\t\tmyCanvas = new GameCanvas();\n\t\tmyRoot.getChildren().add(myCanvas.getNode());\n\t\tmyCanvas.getNode().toBack();\n\t}", "public void start(Stage primaryStage2) throws FileNotFoundException, NoSuchObjectException {\n primaryStage = primaryStage2;\n myGameOverView = new GameOverView(language, primaryStage);\n primaryStage2.setScene(buildScene());\n }", "public Stage_3()\n {\n super();\n super.stageLevel = 3;\n\n this.designAttributes = new DesignAttributes();\n this.drawingPanel = new DrawingPanel();\n this.drawingPanel.setBackground(Color.BLACK);\n this.drawingPanel.setFocusable(true);\n \n // Set up the JButtons\n section1 = new JButton();\n section2 = new JButton();\n section3 = new JButton();\n batButton = new JButton();\n dagButton = new JButton();\n macButton = new JButton();\n \n this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), \"Escape\");\n // Customized Action for pressing Escape\n Action escapeAction = new AbstractAction()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n CardLayout cl = (CardLayout) (PanelManager.menuCardPanel.getLayout());\n cl.show(PanelManager.menuCardPanel, \"MIDGAMEMENU\");\n }\n };\n \n // Adding an escape action map to the action map\n this.getActionMap().put(\"Escape\", escapeAction);\n \n updateStagePlayer();\n\n add(this.drawingPanel);\n }", "public void setScene(Node scene) {\r\n\t\tthis.scene = scene;\r\n\t}", "@Override\n public void show() {\n stage = new Stage(new FitViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT), batch);\n Gdx.input.setInputProcessor(stage);\n\n background = game.getAssetManager().get(\"startscreen.png\");\n bgViewPort = new StretchViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT);\n\n fonts = new Fonts();\n fonts.createSmallestFont();\n fonts.createSmallFont();\n fonts.createMediumFont();\n fonts.createLargeFont();\n fonts.createTitleFont();\n\n createButtons();\n }", "@Override\n public void start(Stage stage) {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/fxml/scnLogIn.fxml\"));\n Parent root = loader.load();\n Scene scene = new Scene(root);\n stage.setScene(scene);\n stage.setTitle(\"Log in\");\n stage.show();\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "public LaserCanvas()\r\n\t{\r\n\t\tsuper();\r\n\t\t\r\n\t\tgame = new LaserTutor();\r\n\t\t\r\n\t\tgame.initialize( );\r\n\t}", "@Override\n public void start(Stage stage) throws Exception {\n LaunchOptions options = new LaunchOptions(false);\n if (options.skipLauncher) {\n log.warn(\"Launcher was skipped\");\n launchGame(options);\n } else {\n stage.setScene(new Launcher(stage, options));\n stage.centerOnScreen();\n stage.show();\n }\n }", "public static Scene scene8() {\r\n\t\t// Define basic properties of the scene\r\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0),\r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0),\r\n\t\t\t\t\t\t/*Distance to plain =*/ 1.5)\r\n\t\t\t\t.initName(\"scene8\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initBackgroundColor(new Vec(0.81,0.93,1))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(3);\r\n\t\t// Add Surfaces to the scene.\r\n\r\n\t\tShape plainShape = new Plain(new Vec(0.0,-1,0.0), new Point(0.0, -1, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial().initKa(new Vec(0.2)).initReflectionIntensity(0.1);\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\tShape transparentSphere = new Sphere(new Point(0, 10, -25), 10);\r\n\t\tMaterial transparentSphereMat = Material.getGlassMaterial(false)\r\n\t\t\t\t.initRefractionIndex(0).initReflectionIntensity(0.4).initKs(new Vec(1.0)).initKd(new Vec(0));\r\n\t\tSurface transparentSphereSurface = new Surface(transparentSphere, transparentSphereMat);\r\n\t\tfinalScene.addSurface(transparentSphereSurface);\r\n\r\n\t\tdouble[] radiuses = new double[] { 0.3, 0.8, 1, 1.5, 2, 1.4, 0.2, 0.9, 1.2, 2.1 };\r\n\r\n\t\tfor (int i = -10; i < 10; i+=3) {\r\n\t\t\tint sphereCenterZ = -5 + (int)(Math.random() * 3);\r\n\t\t\tint radiusIndex = (int)(Math.random() * 10);\r\n\t\t\tdouble radius = radiuses[radiusIndex];\r\n\t\t\tShape distantSphere1 = new Sphere(new Point(i, radiuses[radiusIndex] - 1, sphereCenterZ), radius);\r\n\t\t\tMaterial distantSphere1Mat = Material.getRandomMaterial();\r\n\t\t\tSurface distantSphere1Surface = new Surface(distantSphere1, distantSphere1Mat);\r\n\t\t\tfinalScene.addSurface(distantSphere1Surface);\r\n\t\t}\r\n\r\n\t\t// Add light sources:\r\n\t\tLight dirLight = new DirectionalLight(new Vec(-4.0, -1.0, -2.5), new Vec(0.3));\r\n\t\tfinalScene.addLightSource(dirLight);\r\n\r\n\t\tdirLight = new DirectionalLight(new Vec(-4.0, -1.0, -2.5), new Vec(0.3));\r\n\t\tfinalScene.addLightSource(dirLight);\r\n\r\n\t\treturn finalScene;\r\n\t}", "public Stage() {\n\n for (int i = 0; i < 20; i++) { // Generate the basic grid array\n ArrayList<Cell> cellList = new ArrayList<Cell>();\n cells.add(cellList);\n for (int j = 0; j < 20; j++) {\n cells.get(i).add(new Cell(10 + 35 * i, 10 + 35 * j));\n }\n }\n\n for (int i = 0; i < cells.size(); i++) { // Generate the list of environment blocks\n ArrayList<Environment> envList = new ArrayList<Environment>();\n environment.add(envList);\n for (int j = 0; j < cells.size(); j++) {\n int cellGenerator = (int) (Math.random() * 100) + 1;\n environment.get(i).add(generateCell(cellGenerator, cells.get(i).get(j)));\n }\n }\n\n grid = new Grid(cells, environment); // Initialise the grid with the generated cells array\n }", "@Override\n public void start(Stage primaryStage)\n throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {\n makeMainGrid();\n Scene myHomeScene = new Scene(myMainGrid, WINDOW_WIDTH, WINDOW_HEIGHT);\n primaryStage.setScene(myHomeScene);\n primaryStage.show();\n }" ]
[ "0.688465", "0.6864878", "0.6862745", "0.68496794", "0.6832787", "0.6803148", "0.67884266", "0.677067", "0.67467296", "0.6655562", "0.6654083", "0.6605543", "0.65841496", "0.6456098", "0.645548", "0.6431936", "0.64037114", "0.6394928", "0.6376711", "0.63695604", "0.63354325", "0.6296894", "0.6291592", "0.6289574", "0.62893873", "0.6267248", "0.62540174", "0.6245644", "0.6244958", "0.62397313", "0.6236203", "0.62080705", "0.6149854", "0.61453205", "0.61291105", "0.61170495", "0.6116984", "0.6116738", "0.6102983", "0.6102337", "0.6101862", "0.60910285", "0.608825", "0.60672563", "0.6066117", "0.6049987", "0.60407656", "0.60407245", "0.604058", "0.60305035", "0.6023401", "0.60222226", "0.60165036", "0.6004562", "0.5999899", "0.5997749", "0.59853816", "0.5984228", "0.597711", "0.59724474", "0.59670484", "0.5947748", "0.5946874", "0.5946385", "0.59449893", "0.5934233", "0.59331506", "0.5928826", "0.5928156", "0.58965844", "0.58947563", "0.58947563", "0.58928657", "0.58884007", "0.58837485", "0.5881753", "0.58722466", "0.587163", "0.5859872", "0.5858925", "0.58550906", "0.5848169", "0.5834675", "0.58321357", "0.581669", "0.5815239", "0.5815096", "0.58121353", "0.5811076", "0.5807863", "0.57985216", "0.57981104", "0.579079", "0.57835555", "0.57814085", "0.57766956", "0.57713234", "0.57582015", "0.5755082", "0.5753077", "0.5752793" ]
0.0
-1
move to the next row, update y position depending on if the triangles touch at the tip or side, reset x position, reset column number, and update the direction the triangle points
@Override protected void moveToNextRow(){ incrementRow(); resetXPos(); if(getRow()%2 == 1){ incrementYPos(getHeight()+getHeight()); } resetCol(); setPointDirection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void moveNext(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == (tracker.getMaxColumns() - 1)) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() + 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(0);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() + 1);\n\t\t }//end if-else\n\t }", "private void advanceRow(){\n\t\tfaceBackwards();\n\t\twhile(frontIsClear()){\n\t\t\tmove();\n\t\t}\n\t\tturnRight();\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "public void traspose() {\n for (int row = 0; row < this.numberOfRows(); row++) {\n for (int col = row; col < this.numberOfCols(); col++) {\n double value = this.get(row, col);\n this.set(row, col, this.get(col, row));\n this.set(col, row, value);\n }\n }\n }", "private void movePrevious(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == 0) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() - 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getMaxColumns() - 1);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() - 1);\n\t\t }//end if-else\n\t }", "private boolean createLine() {\n boolean lineFinished = false;\n\n //tempPiece = gridPieces.get(getGridPiece(touchPos));\n lineVector = touchPos;\n\n\n if (origin.row == orOpActive.row) {\n if (Math.abs(lineVector.x - origin.rectangle.x) > Math.abs(orOpActive.rectangle.x - origin.rectangle.x)) {\n tempPiece = orOpActive;\n } else {\n lineVector.y = origin.rectangle.y;\n tempPiece = game.gridPieces[game.getGridPiece(lineVector)];\n }\n // Right\n if (origin.column < tempPiece.column) {\n for (int i = origin.column + 1; i <= tempPiece.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_TEMP);\n }\n // Left\n } else {\n for (int i = tempPiece.column; i < origin.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_TEMP);\n }\n }\n } else {\n if (Math.abs(lineVector.y - origin.rectangle.y) > Math.abs(orOpActive.rectangle.y - origin.rectangle.y)) {\n tempPiece = orOpActive;\n } else {\n lineVector.x = origin.rectangle.x;\n tempPiece = game.gridPieces[game.getGridPiece(lineVector)];\n }\n // Up\n if (origin.row < tempPiece.row) {\n for (int i = origin.row + 1; i <= tempPiece.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_TEMP);\n }\n // Down\n } else {\n for (int i = tempPiece.row; i < origin.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_TEMP);\n }\n }\n }\n\n if (getDirectNeighbors(orOpActive).contains(game.gridPieces[game.getGridPiece(lineVector)])) {\n lineFinished = true;\n }\n\n if(checkFingerFling()) {\n lineFinished = true;\n }\n\n return lineFinished;\n }", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }", "public void moveUp()\n\t{\n\t\trow++;\n\t}", "private void moveParts() {\n int counter = 0;\n\n while (counter < snake.getSize() - 1) {\n Field previous = snake.getCell(counter);\n Field next = snake.getCell(counter + 1);\n\n next.setPreviousX(next.getX());\n next.setPreviousY(next.getY());\n\n next.setX(previous.getPreviousX());\n next.setY(previous.getPreviousY());\n\n fields[previous.getY()][previous.getX()] = previous;\n fields[next.getY()][next.getX()] = next;\n\n counter++;\n\n }\n }", "public void step() {\n\n if (n8) {\n // Your code here\n \n \n //by here, after your code, the cellsNext array should be updated properly\n }\n\n if (!n8) { // neighbours-4\n // your code here\n\n //by here, after your code, the cellsNext array should be updated properly\n }\n\n // Flip the arrays now.\n stepCounter++;\n\ttmp = cellsNow;\n cellsNow = cellsNext;\n\tcellsNext = tmp;\n\n }", "void move(int row, int col) {\n\n int rowdiff = row - this._row; int coldiff = col - this.column;\n if (((Math.abs(rowdiff)) > 1) || (Math.abs(coldiff)) > 1);\n || (row >= _side) || (col >= _side) || (row < 0) || (col < 0);\n || ((Math.abs(coldiff)) == 1) && ((Math.abs(rowdiff)) == 1))); {\n throw new java.lang.IllegalArgumentException();\n } \n else if (rowdiff == 1) && (coldiff == 0)//up method\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(2)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(2))) {\n up_method(cube)\n } else if (isPaintedFace(2) == true) {\n _facePainted[2] == false\n grid[row][col] == true\n up_method(cube)\n }\n else {\n _facePainted[2] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if ((rowdiff == -1) && (coldiff == 0)) //down method\n\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(4)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(4))) {\n up_method(cube)\n } else if (isPaintedFace(4) == true) {\n _facePainted[4] == false\n grid[row][col] == true\n up_method(cube)\n } else {\n _facePainted[4] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if (rowdiff == 0) && (coldiff == -1) { //left method\n if (((isPaintedSquare(row, col) && isPaintedFace(5)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(5))) {\n up_method(cube)\n } else if (isPaintedFace(5) == true) {\n _facePainted[5] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[5] == true\n grid[row][col] == false \n up_method(cube)}\n }\n else if ((rowdiff == 0) && (coldiff == 1)) { //right method\n if (((isPaintedSquare(row, col) && isPaintedFace(6)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(6))) {\n up_method(cube)\n } else if (isPaintedFace(6) == true) {\n _facePainted[6] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[6] == true\n grid[row][col] == false \n up_method(cube)\n \n }\n }\n\n\n }", "private void createFinalLine() {\n //Up\n if (orOpActive.row > origin.row) {\n for (int i = origin.row + 1; i <= orOpActive.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n\n //Down\n if (orOpActive.row < origin.row) {\n for (int i = origin.row - 1; i >= orOpActive.row; i--) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n //Right\n if (orOpActive.column > origin.column) {\n for (int i = origin.column + 1; i <= orOpActive.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n //Left\n if (orOpActive.column < origin.column) {\n for (int i = origin.column - 1; i >= orOpActive.column; i--) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n }", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "private void doNextRow(){\n\t\tmove();\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\t\n\t}", "public void move() {\r\n if(direction == 1) {\r\n if(userRow < grid.getNumRows() - 1) {\r\n userRow++;\r\n handleCollision(userRow, 1);\r\n }\r\n } else if(direction == -1) {\r\n if(userRow > 0) {\r\n userRow--;\r\n handleCollision(userRow, 1);\r\n }\r\n }\r\n }", "protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }", "private void update(final Grid grid, final int rowIndex, final int clumnIndex, final GeneralPath path) {\n Side prevSide = null; // was: NONE\n int r = rowIndex;\n int c = clumnIndex;\n final Cell start = grid.getCellAt(r, c);\n float[] pt = start.getXY(PathGenerator.firstSide(start, prevSide));\n float x = c + pt[0]; // may throw NPE\n float y = r + pt[1]; // likewise\n path.moveTo(x, y); // prepare for a new sub-path\n\n pt = start.getXY(secondSide(start, prevSide));\n float xPrev = c + pt[0];\n float yPrev = r + pt[1];\n\n prevSide = nextSide(start, prevSide);\n switch (prevSide) {\n case BOTTOM:\n r--;\n break;\n case LEFT:\n c--;\n break;\n case RIGHT:\n c++;\n break;\n case TOP:\n r++; // fall through\n break;\n default:\n break;\n }\n start.clear();\n\n Cell currentCell = grid.getCellAt(r, c);\n while (!start.equals(currentCell)) { // we want object reference equality\n pt = currentCell.getXY(secondSide(currentCell, prevSide));\n x = c + pt[0];\n y = r + pt[1];\n if (Math.abs(x - xPrev) > PathGenerator.EPSILON && Math.abs(y - yPrev) > PathGenerator.EPSILON) {\n path.lineTo(x, y);\n }\n xPrev = x;\n yPrev = y;\n prevSide = nextSide(currentCell, prevSide);\n switch (prevSide) {\n case BOTTOM:\n r--;\n break;\n case LEFT:\n c--;\n break;\n case RIGHT:\n c++;\n break;\n case TOP:\n r++;\n break;\n default:\n // System.out.println(\n // \"update: Potential loop! Current cell = \" + currentCell + \", previous side = \" + prevSide);\n break;\n }\n currentCell.clear();\n currentCell = grid.getCellAt(r, c);\n }\n\n path.closePath();\n }", "protected void moveRow (int row)\r\n {\r\n int move = 0;\r\n \r\n if (row < _currentRow)\r\n { move = _currentRow - row; }\r\n \r\n else if (row > _currentRow)\r\n { move = row - _currentRow; }\r\n \r\n _currentRow = row;\r\n }", "public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse if(x-curX>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX+GameSystem.GRID_SIZE;\n\t\t\txGridNearest++;\n\t\t}\n\t\telse if(curY-y>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY-GameSystem.GRID_SIZE;\n\t\t\tyGridNearest--;\n\t\t}\n\t\t//sets the last completely arrived location grid\n\t\tif(y-yTemp>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp+GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY++;\n\t\t}\n\t\telse if(xTemp-x>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp-GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX--;\n\t\t}\n\t\telse if(x-xTemp>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp+GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX++;\n\t\t}\n\t\telse if(yTemp-y>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp-GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY--;\n\t\t}\n\t\t//only updates nextX and nextY when the move buttons are being pressed down\n\t\t/*\n\t\tif(movable){\n\t\t\tif(direction.equals(\"right\")){\n\t\t\t\t\tnextX=lastX+1;\n\t\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"left\")){\n\t\t\t\tnextX=lastX-1;\n\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"up\")){\n\t\t\t\tnextY=lastY-1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t\telse if(direction.equals(\"down\")){\n\t\t\t\tnextY=lastY+1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t}", "private int goToNextRow(int x, int y, int[] borders) {\n System.out.println(\"down\" + x + \":\"+ y);\n// if(Math.floor(diameter) == 1) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// return y;\n// }\n//\n// while((millingPathArr[x][y - overlappingVar]==0 || millingPathArr[x][y - overlappingVar + 1]==0) && !(y > borders[2])) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// }\n for(int i = 0; i < (diameter/2) ; i++) {\n int z = highestLayerImg[x][y];\n //System.out.println(y);\n if(y > borders[2]) {\n break;\n }\n millingPath.add(new BL_Pixel(x, y, z));\n millingPathArr[x][y] = 2; //used for going to next row\n y++;\n }\n //System.out.println(\"down\");\n return y;\n }", "private void moveTile()\n {\n int[] moveIndices = null;\n \n int sourceRow = moveIndices[0];\n int sourceCol = moveIndices[1];\n int destRow = moveIndices[2] - 1;\n int destCol = moveIndices[3];\n \n if (sourceRow == 0) \n {\n try\n {\n game.playTileFromHand(sourceCol, destRow, destCol);\n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n else\n {\n sourceRow--;\n try\n {\n game.moveTileInBoard(sourceRow, sourceCol, destRow, destCol); \n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n }", "private boolean moveToNextCell() {\r\n positionInArray++;\r\n while (positionInArray < data.length && data[positionInArray] == null) {\r\n positionInArray++;\r\n }\r\n return positionInArray < data.length;\r\n }", "public static void changePosition() {\n int direction;\n int speed;\n int newTopX;\n int newTopY;\n\n for (int i = 0; i < numShapes; ++i) {\n direction = moveDirection[i];\n speed = moveSpeed[i];\n newTopX = xTopLeft[i];\n newTopY = yTopLeft[i];\n\n //the switch uses the direction the speed should be applied to in order to find the new positions\n switch (direction) {\n case 0 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n }\n //upper left 135 degrees\n case 1 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 2 -> {\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n //upper right 45 degrees\n case 3 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 4 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n }\n //bottom right 315 degrees\n case 5 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n case 6 -> {\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n //bottom left 225 degrees\n case 7 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n }\n }\n }", "public void next(){\n\t\tboolean[][] newBoard = new boolean[rows][columns]; //create a temporary board, same size as real game board\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tnewBoard[i][j] = false; //set all to false\n\t\t\t}\n\t\t}\n\t\tint cellCounter = 0;\n\t\tfor (int i = (rows - 1); i >= 0; i--) {\n\t\t\tfor (int j = (columns - 1); j >= 0; j--) { //iterate through the game board\n\t\t\t\tfor (int k = (i - 1); k < (i + 2); k++) {\n\t\t\t\t\tfor (int m = (j - 1); m < (j + 2); m++) {//iterate around the testable element\n\t\t\t\t\t\tif (!(k == i && m == j)) {\n\t\t\t\t\t\t\tif (!((k < 0 || k > (rows - 1)) || (m < 0 || m > (columns - 1)))) { //if not out of bounds and not the original point\n\t\t\t\t\t\t\t\tif (theGrid[k][m]) {\n\t\t\t\t\t\t\t\t\tcellCounter++; //if a cell is alive at the surrounding point, increase the counter\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\tif (cellCounter == 3 || cellCounter == 2 && theGrid[i][j]) { //if meets the criteria\n\t\t\t\t\tnewBoard[i][j] = true; //create on new board\n\t\t\t\t}\n\t\t\t\tcellCounter = 0; //reset cell counter\n\t\t\t}\n\t\t}\n\t\t//transpose onto new grid\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(newBoard[i][j]){ //read temp board, set temp board data on real game board\n\t\t\t\t\ttheGrid[i][j] = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttheGrid[i][j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void updatePointsPosition() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tfromPoint.setX((int) (getX() + this.getBounds().getWidth()\n\t\t\t\t\t+ HORIZONTAL_OFFSET));\n\t\t\tfromPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataFromPointInfo.yShift));\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\ttoPoint.setX((int) (getX() - HORIZONTAL_OFFSET));\n\t\t\ttoPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataToPointInfo.yShift));\n\t\t}\n\t}", "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 }", "private void setHeadPositions(int nextPositionX, int nextPositionY, int currentPX, int currentPositionY) {\n snake.getCell(0).setPreviousX(currentPX);\n snake.getCell(0).setPreviousY(currentPositionY);\n snake.getCell(0).setX(nextPositionX);\n snake.getCell(0).setY(nextPositionY);\n }", "public final void nextRow() {\n this.line++;\n }", "void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }", "public void decrementRow() {\n setRowAndColumn(Math.max(row - 1, 0), column);\n }", "public void minotaurMove(boolean[][] maze, Player p){\r\n int distRow = _curPos.getRow() - p.getPlayerPosition().getRow();\r\n int distCol = _curPos.getCol() - p.getPlayerPosition().getCol();\r\n if(_curPos.getRow()== 0 && _curPos.getCol()==14) {\r\n _curPos = new Position(0,14);\r\n }\r\n else {\r\n if(distRow > 0){\r\n if(!maze[_curPos.getRow() - 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n else{\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else{\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n }\r\n }\r\n else if(distRow == 0){\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow() + 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n else if(!maze[_curPos.getRow() - 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n else{\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n }\r\n else{\r\n if(!maze[_curPos.getRow() + 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n else{\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else{\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n }\r\n }\r\n }\r\n }", "private void moveEnemyArrows(){\n\t\tint i,j;\n\t\tfor(i=0;i<enemy_num;i++){\n\t\t\tfor(j=0;j<enemy_arrow_num[i];j++){\n\t\t\t\tenemy_arrows[i][j][0] = enemy_arrows[i][j][0]+enemy_arrows[i][j][2];\n\t\t\t\tenemy_arrows[i][j][1] = enemy_arrows[i][j][1]+enemy_arrows[i][j][3];\n\t\t\t}\n\t\t}\n\t}", "void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }", "private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }", "public void moveRowRelative(int rows) throws SQLException {\n/* 327 */ notSupported();\n/* */ }", "private void moveSnake() { \r\n for (int i = length; i > 0; i--) {\r\n snake[i].row = snake[i-1].row;\r\n snake[i].column = snake[i-1].column; \r\n snake[i].direction = snake[i-1].direction; \r\n }\r\n if (snake[HEAD].direction == UP) snake[HEAD].row--;\r\n else if (snake[HEAD].direction == DOWN) snake[HEAD].row++;\r\n else if (snake[HEAD].direction == LEFT) snake[HEAD].column--;\r\n else if (snake[HEAD].direction == RIGHT) snake[HEAD].column++;\r\n }", "private int rowChange ( int direction ) {\n\t\tswitch ( direction ) {\n\n\t\tcase Direction.NORTH:\n\t\tcase Direction.NE:\n\t\tcase Direction.NW:\n\t\t\treturn -1;\n\n\t\tcase Direction.SOUTH:\n\t\tcase Direction.SE:\n\t\tcase Direction.SW:\n\t\t\treturn 1;\n\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t}", "public void moveTileForward()\n {\n if(!(activeTile+1 > tiles.length-1) && tiles[activeTile+1] != null)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile+1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile+1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile+1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile+1].getEndColor());\n \n tiles[activeTile+1].setTileLevel(tiles[activeTile+1].getTileLevel()-1);\n tiles[activeTile] = tiles[activeTile+1];\n previews[activeTile] = previews[activeTile+1];\n previewGradients[activeTile] = previewGradients[activeTile+1];\n previewHover[activeTile] = previewHover[activeTile+1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()+1);\n tiles[activeTile+1] = tmpTile;\n tiles[activeTile+1].setStartColor(tiles[activeTile+1].getStartColor());\n previews[activeTile+1] = tmpPreview;\n previewGradients[activeTile+1] = tmpPreviewGradients;\n previewHover[activeTile+1] = tmpPreviewHover;\n \n activeTile += 1;\n createPreviewGradients();\n }\n }", "private Integer movePrey(PredatorPreyCell cell, Grid<Integer> grid, Coordinates coordinates) {\n\t\tcell.tickBreedingTimer();\n\t\tArrayList<Cell<Integer>> neighbors = ((PredatorPreyCell)cell).getNeighbors();\n\t\tfor(Cell<Integer> neighborCell : neighbors) {\n\t\t\tPredatorPreyCell neighbor = (PredatorPreyCell) neighborCell;\n\t\t\tif(neighbor.getValue() == EMPTY &&\n\t\t\t (neighbor.getNewValue() == null || neighbor.getNewValue() == EMPTY) &&\n\t\t\t neighbor.getCoordinates() != null) {\n\t\t\t\treturn swap(cell, neighbor);\n\t\t\t}\n\t\t}\n\t\treturn PREY;\n\t}", "public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }", "public boolean moveForward(){\n \n int[] last = (int[]) this.snake.elementAt(this.snake.size() -1);\n int[] sLast = (int[]) this.snake.elementAt(this.snake.size() -2);\n int[] diff = new int[2];\n int[] diff2 = new int[2];\n \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n \n //left\n if( direction == 1){\n diff2[0]--;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff = diff2; \n }\n \n //down\n }else if(direction == 2){\n \n diff2[1]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n //System.out.println(\"first one: \" + diff[0] + \", \" + diff[1]);\n }\n \n //right\n }else if(direction == 3){\n diff2[0]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n \n //up\n }else if(direction == 4){\n \n diff2[1]--;\n //System.out.println(\"\" + diff[0] + \", \" + diff[1]);\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n }else{ \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n }\n \n int[] newPoint = new int[2];\n newPoint[0] = last[0] + diff[0];\n newPoint[1] = last[1] + diff[1];\n \n //if it hits the snake itself\n boolean hits = false;\n Enumeration enu = this.snake.elements();\n int[] temp = new int[2];\n while(enu.hasMoreElements()){\n temp = (int[]) enu.nextElement();\n if(temp[0] == newPoint[0] && temp[1] == newPoint[1]){\n hits = true; \n }\n }\n if(hits){\n return false; \n }\n //if it hits the wall\n if( newPoint[0] >50 || newPoint[0] <0 || newPoint[1] >50 || newPoint[1] <0){\n return false; \n }else{\n if(newPoint [0] == this.apple[0] && newPoint[1] == this.apple[1]){\n this.snake.add(newPoint);\n this.ateApple();\n }else{\n this.snake.add(newPoint);\n this.snake.remove(0);\n \n \n }\n return true;\n }\n }", "@Override\n public void handle(long now) {\n OneIteration();\n if (current.getRow() == ia && current.getCol() == ja) {\n drawPath();\n this.stop();\n }\n }", "public void advance()\n\t{\n\t\t//calling copy function\n\t\tcopy(); \n\t\t//for loop for row \n\t\tfor(int row =0; row<this.currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column =0; column<this.currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//if statements to implement 2D CA rules\n\t\t\t\tif (column == 0 && row == 0)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row+1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column +1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == 0 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row][column - 1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column - 1];\n\t\t\t\t\telse if (currentVersion[row+1][column] == currentVersion [row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == 0 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row][column-1] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == currentVersion.length-1 && column == 0)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row -1][column]; \n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row > 0 && column ==0 && row < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\tif(currentVersion[row][column+1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif(row == currentVersion.length-1 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(row == currentVersion.length-1 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1]; \n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\t\n\t\t\t\tif(row>0 && row < currentVersion.length-1 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif (currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column]; \n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif(row>0 && row < currentVersion.length-1 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif (currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column]; \n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0;\n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t//passing new nextVersion array to currentVersion array\n\tsetUniverse(nextVersion);\n\t}", "public void absMoveToFirstRowAt(int index) {\n if ((index <= 0) || (index >= getModel().getRowCount())) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n\n // Move the rows above the index row down one.\n System.arraycopy(va, 0, va, 1, index);\n\n va[0] = vTemp;\n\n //_printTableRow(0, va[0]);\n setRows(va);\n }", "public void moveDown()\n\t{\n\t\trow--;\n\t}", "@Override\n protected void moveOver(){\n incrementXPos(getWidth()/2);\n if(pointUp){\n incrementYPos(-1*getHeight());\n } else {\n incrementYPos(getHeight());\n }\n incrementCol();\n setPointDirection();\n }", "public void move(int dir) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint nextX = x[i] + dir;\n\t\t\tif (nextX < 0 || nextX >= 10)\n\t\t\t\treturn;\n\t\t\tif (Tetris.game.grid[nextX][y[i]] != 0)\n\t\t\t\treturn;\n\t\t}\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tx[i] += dir;\n\t}", "private void shiftLeftAnimal(int row) {\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tmainMatrix.highlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t\tshiftLeftSc.highlight(0);\r\n\t\tshiftLeftSc.highlight(9);\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.highlight(1);\r\n\t\tshiftLeftSc.highlight(7);\r\n\t\t//initialize element that shows current state of loop variable\r\n\t\tiText.setText(\"i = 0\", new TicksTiming(0), new TicksTiming(0));\r\n\t\tiText.show();\r\n\t\thighlightText(iText);\r\n\t\t//loop for shifts\r\n\t\tfor (int i = 0; i < row; i++) {\r\n\t\t\tlang.nextStep();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.unhighlight(1);\r\n\t\t\tshiftLeftSc.unhighlight(7);\r\n\t\t\tshiftLeftSc.highlight(2);\r\n\t\t\tunhighlightText(iText);\r\n\t\t\ttmpText.show();\r\n\t\t\ttmpMatrix.show();\r\n\t\t\t\r\n\t\t\t//add lines to swap values through the matrix. This is where the action happens!\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(2);\r\n\t\t\tshiftLeftSc.highlight(3);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"mainMatrix[\" + row + \"][1]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(3);\r\n\t\t\tshiftLeftSc.highlight(4);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][1]\\\" and \\\"mainMatrix[\" + row + \"][2]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(4);\r\n\t\t\tshiftLeftSc.highlight(5);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][2]\\\" and \\\"mainMatrix[\" + row + \"][3]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(5);\r\n\t\t\tshiftLeftSc.highlight(6);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][3]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\r\n\t\t\tlang.nextStep();\r\n\t\t\ttmpText.hide();\r\n\t\t\ttmpMatrix.hide();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.highlight(1);\r\n\t\t\tshiftLeftSc.highlight(7);\r\n\t\t\tshiftLeftSc.unhighlight(6);\r\n\t\t\tiText.setText(\"i = \" + (i + 1), new TicksTiming(0), new TicksTiming(0));\r\n\t\t\thighlightText(iText);\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.unhighlight(1);\r\n\t\tshiftLeftSc.unhighlight(7);\r\n\t\tshiftLeftSc.highlight(8);\r\n\t\tunhighlightText(iText);\r\n\t\tiText.hide();\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(8);\r\n\t\tmainMatrix.unhighlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t}", "public void nextRow(int minimumOffset) {\n\t\tarrangeCurrentRow();\n\n\t\t// Step 4 : Profit\n\n\t\t// Increment the Y position\n\t\tSystem.out.println(this.currentYPosition);\n\t\tsetCurrentYPosition(Math.max(this.currentYPosition + minimumOffset,\n\t\t\t\tthis.currentYPosition + getCurrentRowHeight()));\n\t\tSystem.out.println(this.currentYPosition);\n\n\t\t// Clear current row buffer\n\t\tthis.currentRow.clear();\n\n\t\tint theoreticalMaxWidth = 99999999;\n\n\t\t// Update left and right offsets occupied by previous floats for this\n\t\t// row, as well as the row max width\n\t\tint x = this.box.getAbsoluteX() + this.box.marginLeft + this.box.paddingLeft;\n\t\tint y = this.box.getAbsoluteY() + getCurrentY() + this.box.marginTop\n\t\t\t\t+ this.box.paddingTop;\n\t\tint currentRowAbsoluteY = this.box.getAbsoluteY() + this.currentYPosition\n\t\t\t\t+ this.box.marginTop + this.box.paddingTop;\n\t\tint workMaxWidth = this.box.parent.contentWidth - this.box.marginLeft\n\t\t\t\t- this.box.marginRight - this.box.paddingLeft - this.box.paddingRight;\n\n\t\tif (this.box.contentWidth > 0) {\n\t\t\tworkMaxWidth = this.box.contentWidth;\n\t\t}\n\n\t\tthis.currentRowLeftFloatOccupiedSpace = this.floats.leftIntersectionPoint(x,\n\t\t\t\tcurrentRowAbsoluteY, workMaxWidth, this.box);\n\t\tint rightPoint = this.floats.rightIntersectionPoint(x, currentRowAbsoluteY,\n\t\t\t\tworkMaxWidth, this.box);\n\t\tthis.currentRowRightFloatOccupiedSpace = workMaxWidth - rightPoint;\n\t\t// currentRowMaxWidth = rightPoint - currentRowLeftFloatOccupiedSpace ;\n\t\tthis.currentRowMaxWidth = getMaxRowWidth(this.currentYPosition);\n\n\t\t// Other init stuff\n\t\tthis.startXPosition = this.floats.leftIntersectionPoint(x, y,\n\t\t\t\ttheoreticalMaxWidth, this.box);\n\t\tthis.currentXPosition = this.startXPosition;\n\n\t\tthis.rowHeightFloats = Integer.MAX_VALUE;\n\t\tthis.rowHeightNoFloats = 0;\n\n\t\tthis.leftFloatsCount = this.rightFloatsCount = 0;\n\t\tthis.hasClearRight = false;\n\n\t\tthis.nextChildFromSavedElements = true;\n\t\tthis.currentRowHasOnlyFloats = true;\n\n\t\tSystem.out.println(\"THIS ROW WIDTH: \" + this.currentRowMaxWidth);\n\n\t}", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "public void moveVertex() {\r\n\t\tPriorityQueue<Vertex2D> pq = new PriorityQueue<Vertex2D>(3,(a,b) -> a.id - b.id);\r\n\t\tpq.add(this); pq.add(this.previous); pq.add(this.next);\r\n\t\t\r\n\t\tsynchronized(pq.poll()) {\r\n\t\t\tsynchronized(pq.poll()) {\r\n\t\t\t\tsynchronized(pq.poll()) {\r\n\t\t\t\t\t//Actually move the vertex \"this\"\r\n\t\t\t\t\tdouble r1 = Star.rnd.nextDouble();\r\n\t\t\t\t\tdouble r2 = Star.rnd.nextDouble();\r\n\t\t\t\t\tdouble newX = (1 - Math.sqrt(r1)) * previous.x + (Math.sqrt(r1) * (1 - r2)) * this.x + (Math.sqrt(r1) * r2) * next.x;\r\n\t\t\t\t\tdouble newY = (1 - Math.sqrt(r1)) * previous.y + (Math.sqrt(r1) * (1 - r2)) * this.y + (Math.sqrt(r1) * r2) * next.y;\r\n\t\t\t\t\tthis.x = newX;\r\n\t\t\t\t\tthis.y = newY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void moveSnake()\r\n\r\n\t{\r\n\r\n\t\t//Get the lower & upper limit for the last row of the board. \r\n\t\t// e.g. for a 20x20 board, these values would be 380 & 400 respectively\r\n\t\tint lowerLimitOfLastRow = numOfBoardRows*numOfBoardCols-numOfBoardCols;\r\n\t\tint upperLimitOfLastRow = numOfBoardRows*numOfBoardCols;\r\n\r\n\t\t//Loop through all snakes to update their location\r\n\t\tfor(Snake s: snakes)\r\n\t\t{\r\n\t\t\t//Do nothing if snake is not alive\r\n\t\t\tif(!s.isSnakeAlive())\r\n\t\t\t\tcontinue;\r\n\t\t\t//Move the snake number of cells depending on its current speed. i.e. \r\n\t\t\t// snake with minimum/default speed will move only one cell while with maximum speed will move 4 cells during the same time. \r\n\t\t\tfor(int i=s.getSnakeSpeed().getValue(); i<= SnakeSpeed.DEFAULT.getValue(); i=i*2)\r\n\t\t\t{\r\n\t\t\t\tint lastCellLocation = -1;\r\n\t\t\t\tSnakeDirection sd = s.getSnakeDirection();\r\n\t\t\t\tArrayList<Integer> scells = s.getSnakeCells();\r\n\r\n\t\t\t\tif(s.getSnakeIndex() == snakeIndex)\r\n\t\t\t\t{\r\n\t\t\t\t\tlastCellLocation = scells.get(scells.size()-1);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Move the cells forward except the first one\r\n\t\t\t\tfor(int j=scells.size()-1;j>0;j--)\r\n\t\t\t\t{\r\n\t\t\t\t\tscells.set(j, scells.get(j-1)); \r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Update the first cell based on the current direction of the snake\r\n\t\t\t\tif(sd == SnakeDirection.DOWN)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the cell in the same column but first row when the current cell is in the last row \r\n\t\t\t\t\tif(scells.get(0) >= lowerLimitOfLastRow && scells.get(0) < upperLimitOfLastRow)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - lowerLimitOfLastRow);\r\n\t\t\t\t\t//Else, Set the value of first cell as the cell under the current cell in the next row \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + numOfBoardCols);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.UP)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the cell in the same column but last row when the current cell is in the first row \r\n\t\t\t\t\tif(scells.get(0) >= 0 && scells.get(0) < numOfBoardCols)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + lowerLimitOfLastRow);\r\n\t\t\t\t\t//Else, Set the value of first cell as the cell above the current cell in the next row \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - numOfBoardCols);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.RIGHT)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the current cell value minus the number of columns when the current cell is in the last column \r\n\t\t\t\t\tif(scells.get(0)%numOfBoardCols == numOfBoardCols - 1)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - (numOfBoardCols - 1));\r\n\t\t\t\t\t//Else, Set the value of first cell as the current value incremented by one \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + 1);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.LEFT)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the current cell value plus the number of columns when the current cell is in the first column \r\n\t\t\t\t\tif(scells.get(0)%numOfBoardCols == 0)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + numOfBoardCols -1);\r\n\t\t\t\t\t//Else, Set the value of first cell as the current value decremented by one \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - 1);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Update snake length & food cells if its the current player's snake and there's a food item at the same location as snake's head\r\n\t\t\t\tif(s.getSnakeIndex() == snakeIndex) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(foodCells.contains(scells.get(0)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tscells.add(lastCellLocation);\r\n\t\t\t\t\t\tfoodCells.remove(scells.get(0));\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\ts.setSnakeCells(scells);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//refresh the board to send/receive latest snakeProtocol object between client/server and also update the board\r\n\t\trefreshBoard();\r\n\t}", "public void setPositionRow(int value){this.positionRow = value;}", "public void setNextDirectionAndTick(Snake enemy, BonusTile bonusTile) {\n\t\tcollision = false;\n\n\t\tList<Tile> nextTilesStraight = new ArrayList<>();\n\t\tList<Tile> nextTilesLeft = new ArrayList<>();\n\t\tList<Tile> nextTilesRight = new ArrayList<>();\n\t\t/**\n\t\t * every ciclus for one side... better that one ciclus for all sides..\n\t\t */\n\t\tswitch (direction) {\n\t\tcase DOWN:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight\n\t\t\t\t\t\t.add(new CollisionTile(Math.round(head.getX()), (head.getY()) + GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(head.getX() + GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(head.getX() - GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase UP:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight.add(new CollisionTile(head.getX(), head.getY() - GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(head.getX() - GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(head.getX() + GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight.add(new CollisionTile(head.getX() - GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(Math.round(head.getX()), (head.getY()) - GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(Math.round(head.getX()), (head.getY()) + GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase RIGHT:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight.add(new CollisionTile(head.getX() + GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(Math.round(head.getX()), (head.getY()) + GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(Math.round(head.getX()), (head.getY()) - GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t// next step colison\n\t\tcollision = collisonCheck(nextTilesStraight, enemy);\n\t\t// right tiles colision\n\t\tboolean colisonRight = collisonCheck(nextTilesRight, enemy);\n\t\t// left ties colision\n\t\tboolean colisonLeft = collisonCheck(nextTilesLeft, enemy);\n\n\t\t// if not colision go for the bonus\n\t\tif (!collision) {\n\t\t\tint x = head.getX() - bonusTile.getX();\n\t\t\tint y = head.getY() - bonusTile.getY();\n\t\t\t// can change direction if not 180 degree\n\t\t\tif (x > 0 && direction != Direction.RIGHT) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.UP && !colisonLeft || direction == Direction.DOWN && !colisonRight) {\n\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t}\n\t\t\t\t// can change direction if not 180 degree\n\t\t\t} else if (x < 0 && direction != Direction.LEFT) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.UP && !colisonRight || direction == Direction.DOWN && !colisonLeft) {\n\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\t// can change direction if not 180 degree\n\t\t\t} else if (y < 0 && direction != Direction.UP) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.RIGHT && !colisonRight || direction == Direction.LEFT && !colisonLeft) {\n\t\t\t\t\tdirection = Direction.DOWN;\n\t\t\t\t}\n\t\t\t\t// can change direction if not 180 degree\n\t\t\t} else if (y > 0 && direction != Direction.DOWN) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.RIGHT && !colisonLeft || direction == Direction.LEFT && !colisonRight) {\n\t\t\t\t\tdirection = Direction.UP;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if colision try fix it\n\t\tif (collision) {\n\t\t\t// by direction can try fix collision\n\t\t\tswitch (direction) {\n\t\t\tcase DOWN:\n\t\t\t\tif (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t} else if (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tSystem.out.println(2);\n\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tif (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t} else if (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tSystem.out.println(4);\n\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LEFT:\n\t\t\t\tif (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tdirection = Direction.UP;\n\t\t\t\t} else if (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tSystem.out.println(6);\n\t\t\t\t\tdirection = Direction.DOWN;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tif (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tdirection = Direction.DOWN;\n\t\t\t\t} else if (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tdirection = Direction.UP;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * and finally tick\n\t\t */\n\t\ttick();\n\t}", "public boolean up() {\r\n if( row <= 0 ) return false;\r\n --row;\r\n return true;\r\n }", "private void advance() {\n if (currColumn == 8) {\n currColumn = 0;\n currRow++;\n }\n else {\n currColumn++;\n }\n if (!(currRow == 9 && currColumn == 0)) {\n if (startingBoard[currRow][currColumn] != 0) {\n advance();\n }\n }\n }", "private void backward() {\n index--;\n if(column == 0) {\n line--;\n linecount = column = content.getColumnCount(line);\n }else{\n column--;\n }\n }", "static void TwoDimTrav(int[][] arr, int row, int col){\n\n int[] dr = new int[]{ -1, 1, 0, 0};\n int[] dc = new int[]{ 0, 0, 1, -1};\n\n for(int i = 0; i < 4; i++){\n int newRow = row + dr[i];\n int newCol = col + dc[i];\n\n if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n continue;\n\n // do your code here\n\n }\n\n // All Directions\n // North, South, East, West, NW NE SW SE\n // dr = [ -1, 1, 0, 0 -1, -1, 1, 1 ]\n // dc = [ 0, 0, 1, -1 -1, 1, 1, -1 ]\n\n// int[] dr = new int[]{ -1, 1, 0, 0, -1, -1, 1, 1};\n// int[] dc = new int[]{ 0, 0, 1, -1, -1, 1, -1, 1};\n//\n// for(int i = 0; i < 8; i++){\n// int newRow = row + dr[i];\n// int newCol = col + dc[i];\n//\n// if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n// continue;\n//\n// // do your code here\n//\n// }\n }", "@Override\r\n\tpublic void nextStep() {\n\t\tif (this.oldX == this.coord.x && this.oldY == this.coord.y) { \r\n\t\t\tthis.currentPoint = (int) (Math.random()*this.patrol.size());\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\r\n\t\t}\r\n\r\n\t\t// target point reached, make new random target point\r\n\t\tif (this.targetX == this.coord.x && this.targetY == this.coord.y) {\r\n\t\t\tif (this.currentPoint < patrol.size() - 1)\r\n\t\t\t\tthis.currentPoint++;\r\n\t\t\telse\r\n\t\t\t\tthis.currentPoint = 0;\r\n\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\t\t}\r\n\t\tint step = (this.speed == Speed.fast ? 8 : 4);\r\n\t\t// int stepX = (int) (1 + Math.random() * step);\r\n\t\t// int stepY = (int) (1 + Math.random() * step);\r\n\t\tint x0 = (int) (this.coord.getX());\r\n\t\tint y0 = (int) (this.coord.getY());\r\n\r\n\t\tint dx = this.targetX - x0;\r\n\t\tint signX = Integer.signum(dx); // get the sign of the dx (1-, 0, or\r\n\t\t\t\t\t\t\t\t\t\t// +1)\r\n\t\tint dy = this.targetY - y0;\r\n\t\tint signY = Integer.signum(dy);\r\n\t\tthis.nextX = x0 + step * signX;\r\n\t\tthis.nextY = y0 + step * signY;\r\n\t\tthis.oldX = this.coord.x;\r\n\t\tthis.oldY = this.coord.y;\r\n\t\t// System.err.println(\"targetX,targetY \"+targetX+\" \"+targetY);\r\n\t}", "public void step()\n {\n\t int rows = grid.length-1;\n\t int cols = grid[0].length-1;\n\t int direction = (int) (Math.random()*3);\n\t direction--;\n\t int row = (int) (Math.random()*rows);\n\t //System.out.println(row);\n\t int col = (int) (Math.random()*cols);\n\t //System.out.println(col);\n\t if(grid[row][col] == SAND && (grid[row+1][col] == EMPTY || grid[row+1][col] == WATER)) {\n\t\t grid[row+1][col] = SAND;\n\t\t grid[row][col] = EMPTY;\n\t }\n\t if(grid[row][col] == WATER && grid[row+1][col] == EMPTY) {\n\t\t if(col != 0) {\n\t\t\t grid[row+1][col+direction] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t\t else {\n\t\t\t grid[row+1][col] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t }\n }", "private void move() {\n\n for (int z = snakeLength; z > 0; z--) {\n xLength[z] = xLength[(z - 1)];\n yLength[z] = yLength[(z - 1)];\n }\n\n if (left) {\n xLength[0] -= elementSize;\n }\n\n if (right) {\n xLength[0] += elementSize;\n }\n\n if (up) {\n yLength[0] -= elementSize;\n }\n\n if (down) {\n yLength[0] += elementSize;\n }\n }", "private void drawWaypoints() {\r\n\t\tint x1 = (width - SIZE_X) / 2;\r\n\t\tint y1 = (height - SIZE_Y) / 2;\r\n\r\n\t\tfloat scissorFactor = (float) _resolutionResolver.getScaleFactor() / 2.0f;\r\n\r\n\t\tint glLeft = (int) ((x1 + 10) * 2.0f * scissorFactor);\r\n\t\tint glWidth = (int) ((SIZE_X - (10 + 25)) * 2.0f * scissorFactor);\r\n\t\tint gluBottom = (int) ((this.height - y1 - SIZE_Y) * 2.0f * scissorFactor);\r\n\t\tint glHeight = (int) ((SIZE_Y) * 2.0f * scissorFactor);\r\n\r\n\t\tGL11.glEnable(GL11.GL_SCISSOR_TEST);\r\n\t\tGL11.glScissor(glLeft, gluBottom, glWidth, glHeight);\r\n\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glScalef(_textScale, _textScale, _textScale);\r\n\r\n\t\t_startCell = getStartCell();\r\n\t\t_cellStartX = (int) (((float) x1 + (float) 13) / _textScale);\r\n\t\t_cellStartY = (int) (((float) y1 + (float) 22) / _textScale);\r\n\r\n\t\tint x2 = _cellStartX;\r\n\t\tint y2 = _cellStartY + (int) ((float) 0 * (float) CELL_SIZE_Y / _textScale);\r\n\r\n\t\tImmutableList<UltraTeleportWaypoint> list = UltraTeleportWaypoint.getWaypoints();\r\n\t\tfor (int i = 0; i < 2; ++i) {\r\n \t\tfor (int j = 0; j < list.size() && j < MAX_CELL_COUNT; ++j) {\r\n\r\n \t\t\tint x = _cellStartX;\r\n \t\t\tint y = _cellStartY + (int) ((float) j * (float) CELL_SIZE_Y / _textScale);\r\n\r\n \t\t\tdouble posX = list.get(j + _startCell).getPos().getX();\r\n \t\t\tdouble posY = list.get(j + _startCell).getPos().getY();\r\n \t\t\tdouble posZ = list.get(j + _startCell).getPos().getZ();\r\n\r\n \t\t\tString strX = String.format(\"x: %4.1f\", posX);\r\n \t\t\tString strY = String.format(\"y: %4.1f\", posY);\r\n \t\t\tString strZ = String.format(\"z: %4.1f\", posZ);\r\n \t\t\tString text = strX + \" \" + strY + \" \" + strZ;\r\n\r\n \t\t\tif (i == 0) {\r\n \t\t\t this.fontRendererObj.drawStringWithShadow(text, x + 18, y, list.get(j).getColor());\r\n\r\n \t\t\t boolean selected = j + _startCell < _selectedList.size() ? _selectedList.get(j + _startCell) : false;\r\n\r\n \t\t\t GL11.glPushMatrix();\r\n GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);\r\n \t\t\t this.mc.renderEngine.bindTexture(selected ? BUTTON_ON_RESOURCE : BUTTON_OFF_RESOURCE);\r\n \t\t\t HubbyUtils.drawTexturedRectHelper(0, x + CELL_SIZE_X + 18, y - 3, 16, 16, 0, 0, 256, 256);\r\n \t\t\t GL11.glPopMatrix();\r\n \t\t\t}\r\n \t\t\telse if (i == 1) {\r\n \t\t\t\tBlockPos pos = new BlockPos((int)posX, (int)posY - 1, (int)posZ);\r\n \t\t\t Block block = Minecraft.getMinecraft().theWorld.getBlockState(pos).getBlock();\r\n \t\t\tif (block != null) {\r\n \t\t\t Item itemToRender = Item.getItemFromBlock(block);\r\n \t\t\t itemToRender = itemToRender != null ? itemToRender : Item.getItemFromBlock((Block)Block.blockRegistry.getObjectById(3));\r\n \t\t\t ItemStack is = new ItemStack(itemToRender, 1, 0);\r\n \t\t\t _itemRender.renderItemAndEffectIntoGUI(is, x - 1, y - 3);\r\n \t _itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, is, x - 1, y - 3, \"\"); // TODO: is the last param correct?\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t}\r\n\r\n\t\tGL11.glPopMatrix();\r\n\t\tGL11.glDisable(GL11.GL_SCISSOR_TEST);\r\n\t}", "public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }", "public synchronized void moveDown(){\n if (!this.isAtBottom()){\n for (int j = 1; j < 25; j++){\n for (int i = 1; i < 13; i++){\n if (this.movable[i][j]){\n this.map[i][j - 1] = this.map[i][j];\n this.movable[i][j - 1] = this.movable[i][j];\n this.colors[i][j - 1] = this.colors[i][j];\n\n this.map[i][j] = false;\n this.movable[i][j] = false;\n this.colors[i][j] = null;\n\n }\n }\n }\n }\n this.piecePositionY--;\n repaint();\n }", "private void resetPosition() {\n for (int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[0].length; j++) {\n if (!board[i][j]) {\n rowPos = i;\n columnPos = j;\n return;\n }\n }\n }\n }", "public void updateLinesAndGrid() {\n\t\tutilities.redrawAllLines(0, false);\n\t\ttableDisplay.setGrid(utilities.getOrderedWayPoints());\n\t}", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }", "void move(View view,int pos)\n {\n int incoming_row=pos/4;\n int incoming_column=pos%4;\n\n //here the move need to be left , right ,bottom and top ,but not side ways\n //also movement should be to immediate block and not at some distant block in the grid\n //for eg. ball at 0x0 should be only permitted to 0x1 and 1x0 and no where else\n if((incoming_row==row_curent+1 && incoming_column==column_current) ||\n (incoming_row==row_curent-1 && incoming_column==column_current) ||\n (incoming_column==column_current+1 && incoming_row==row_curent) ||\n (incoming_column==column_current-1 && incoming_row==row_curent)) {\n\n //Based on successful block selection we need to move the ball to the selected position\n //by setting its parameters\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(100, 100);\n lp.setMargins((int) view.getX() + view.getWidth() / 10, (int) view.getY() + view.getHeight() / 10, 0, 0);\n redball.setLayoutParams(lp);\n\n //Now that ball has moved to the new position, we need to update the current row and current column\n row_curent = incoming_row;\n column_current = incoming_column;\n\n //to remove the visted nodes\n view.setVisibility(View.GONE);\n\n //when we traverse through we need to add or subtract the values of grid to life of the ball (HP)\n //if the value of text field is not 100 move go through this if loop\n if(Float.parseFloat(((TextView)view.findViewById(R.id.item_text)).getText().toString())!=100f) {\n hp_value = hp_value + Float.parseFloat(((TextView) view.findViewById(R.id.item_text)).getText().toString());\n\n //This is cool feature , every time you land on a negative value on grid phone will vibrate\n if(Float.parseFloat(((TextView)view.findViewById(R.id.item_text)).getText().toString())<0f)\n {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));\n } else {\n //deprecated in API 26\n v.vibrate(500);\n }\n\n }\n }\n //we reached the goal that is 100\n else {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(won);\n toast.show();\n resetValues();\n }\n\n }\n else\n {\n //To handle far away and side ways hop\n Toast.makeText(MainActivity.this, \"Sorry , can't hop side ways or far away field\", Toast.LENGTH_SHORT).show();\n }\n }", "public void swapRows(int pos1, int pos2) {\n\n for (int i = 0; i < columns.length; i++) {\n Object Obj1 = columns[i].getRow(pos1);\n columns[i].setRow(columns[i].getRow(pos2), pos1);\n columns[i].setRow(Obj1, pos2);\n\n // swap missing values.\n boolean missing1 = columns[i].isValueMissing(pos1);\n boolean missing2 = columns[i].isValueMissing(pos2);\n columns[i].setValueToMissing(missing2, pos1);\n columns[i].setValueToMissing(missing1, pos2);\n\n }\n }", "public CellCoord nextRow() {\n return new CellCoord(column, row + 1);\n }", "void moveHandleToPointInTraceVertically(int where);", "public void moveDownRows(int[] rows)throws IndexOutOfBoundsException{\r\n if (rows.length > 0){\r\n CoverFooterItemType tmp_element;\r\n //no moveup if i'm selecting the first elemento in the table\r\n if (rows[rows.length-1] < (data.size()-1)){\r\n tmp_element = (CoverFooterItemType)data.get(rows[rows.length-1]+1);\r\n for (int i=(rows.length-1); i>=0; i--){ \r\n if (rows[rows.length-1] < (data.size()-1)){\r\n data.set(rows[i]+1, data.get(rows[i]));\r\n }\r\n }\r\n data.set(rows[0], tmp_element);\r\n }\r\n if (rows[rows.length-1] < (data.size()-1)){\r\n fireTableRowsUpdated(rows[0], rows[rows.length-1]+1);\r\n }\r\n }\r\n }", "void drawCurrentToTemp() {\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addTempBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }", "public void step() {\n\t\t// calculate new values\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = cells[x + (y * gridX)];\n\t\t\t\tCell newCell = newCells[x + (y * gridX)];\n\n\t\t\t\tint neighborCount = sameNeighborCount(x, y);\n\n\t\t\t\tif (c.isActive) {\n\t\t\t\t\tif (neighborCount < 2) {\n\t\t\t\t\t\t// all alone, die of loneliness\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t\telse if (neighborCount > 3) {\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Dead cells can be reborn if surrounded by enough neighbors of the same\n\t\t\t\t\t// color. The cell will be reborn using the most prominent color.\n\t\t\t\t\tint populousColor = mostPopulousColor(x, y);\n\t\t\t\t\tif (populousColor > Integer.MIN_VALUE) {\n\t\t\t\t\t\tnewCell.isActive = true;\n\t\t\t\t\t\tnewCell.cellColor = populousColor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update to new state\n\t\tfor (int i = 0; i < cells.length; i++) {\n\t\t\tcells[i].isActive = newCells[i].isActive;\n\t\t\tcells[i].cellColor = newCells[i].cellColor;\n\t\t}\n\t}", "void goOverLines() {\n\t\t//checking every vertical line if there is some number that has only one number available\n\t\t//for every number\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t//for every line\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t//for every square\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tint tempK = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[j][k][i] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t\ttempK = k;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tmoveQueue.add(new int[] {j, tempK, (i + 1)});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//checking every vertical line if there is some number that has only one number available\n\t\t//for every number\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t//for every line\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t//for every square\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tint tempK = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[k][j][i] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t\ttempK = k;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tmoveQueue.add(new int[] {tempK, j, (i + 1)});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!moveQueue.isEmpty()) {\n\t\t\tdoMove();\n\t\t}\n\t}", "public void nextLevelTogo() {\n if (this.myClearedLines % 2 == 0) {\n myLinesToGo = 2;\n } else {\n myLinesToGo = 1;\n }\n }", "private void setPathLine(Position prevPos, Position newPos) {\n\t\t//Grid coordinates\n\t\tint xStart = prevPos.getX();\n\t\tint yStart = prevPos.getY();\n\t\tint xEnd = newPos.getX();\n\t\tint yEnd = newPos.getY();\n\t\t\n\t\t//Set width/height in pixels of screen dimension\n\t\tfloat xF = (xEnd*PIXEL_WIDTH);\n\t\tfloat yF = (yEnd*PIXEL_HEIGHT);\n\t\t\n\t\t//Check that this grid IS free (ie 0) to draw a path\n\t\tif (checkPathCo(newPos) == 0) {\n\t\t\tsPath.lineTo(xF, yF);\n\t\t\tsetPathCo(newPos,1);\n\t\t\twhile (xStart != xEnd)\n\t\t\t{ //set everything in between as 1 ie undroppable\n\t\t\t\tPosition tmpPos = new Position(xStart, yEnd);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tif (xStart < xEnd)\n\t\t\t\t\txStart++;\n\t\t\t\telse\n\t\t\t\t\txStart--;\n\t\t\t}\n\t\t\t\n\t\t\twhile(yStart < yEnd)\n\t\t\t{ //same as x above\n\t\t\t\tPosition tmpPos = new Position(xEnd,yStart);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tyStart++;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void doFirstRow(){\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\n\t}", "void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}", "void makeMove(int row, int col, int nextRow, int nextCol) {\r\n int temp = checks[row][col];\r\n checks[nextRow][nextCol] = temp;\r\n checks[row][col] = 0;\r\n if (Math.abs(nextRow - row) == 2){\r\n removePiece(nextRow, nextCol,row, col);\r\n }\r\n checkKing(nextRow,nextCol);\r\n }", "public static void main(String[] args) {\n int[][] inp = new int[][] {\n {1,2,3},\n {5,6,7},\n {9,10,11}};\n \n int temp;\n \n\t for(int i = inp.length-1,j=0; i>=0 ; i--,j=0)\n {\n System.out.print(inp[i][j] + \" \");\n\t\t \n temp = i; // store old row where we started \n \n\t\t while(i+1 < inp.length && j+1 < inp[0].length)\n {\n System.out.print(inp[i+1][j+1] + \" \"); // keep print right diagonal\n i++;j++;\n }\n \n\t\t i = temp; // restore old row\n \n\t\t System.out.println();\n\t\t \n\t\t // special case - when we switch from processing row to processing column\n if(i == 0)\n {\n\t\t\t // now, column will go from 1 to inp[0].length-1\n\t\t\t \n for (int k = 1; k < inp[0].length; k++) {\n\n\t\t\t\t temp = k; // save old column\n \n\t\t\t\t System.out.print(inp[i][k] + \" \");\n\t\t\t\t \n\t\t\t\t // keep getting right diagonal\n while (i + 1 < inp.length && k + 1 < inp[0].length) {\n System.out.print(inp[i + 1][k + 1] + \" \");\n i++;\n k++;\n }\n \n\t\t\t\t k = temp;\n \n\t\t\t\t i = 0;\n \n\t\t\t\t System.out.println();\n\n }\n }\n }\n \n }", "public void play(int direction)\r\n {\r\n int temp = 0; \r\n boolean moved = false;\r\n if (direction == LEFT_INPUT ) {\r\n for (int q = 0;q < 4; q++) { \r\n for (int i = 0; i < grid.length;i++){ \r\n if (grid[i][q] > 0 && q != 0){ \r\n for (int sum = q - 1; sum >= 0; sum--) {\r\n if (sum >= 0 && grid[i][sum] == grid[i][q]) {\r\n gui.clearSlot(i, q);\r\n currentScore = (long) Math.pow(2, grid[i][q]) + currentScore;\r\n gui.setScore(currentScore);\r\n moved = true;\r\n gui.setNewSlotBySlotIndex(i, sum, ++grid[i][q]);\r\n if (grid[i][q] == winningLevel+1){ highS(high); gui.showGameWon();}\r\n temp = grid[i][q];\r\n grid[i][q] = 0;\r\n grid[i][sum] = temp;\r\n break;\r\n } else if (sum >= 0 && grid[i][sum] != 0){\r\n break;\r\n }}\r\n for (int r = 0; grid[i][q] > 0 && r < q; r++){\r\n if (grid[i][r] == 0) {\r\n gui.clearSlot(i,q);\r\n gui.setNewSlotBySlotIndex(i,r,grid[i][q]);\r\n temp = grid[i][q];\r\n grid[i][q] = 0; \r\n grid[i][r] = temp;\r\n moved = true;\r\n break;\r\n }}}}} \r\n \r\n } else if (direction == DOWN_INPUT) {\r\n \r\n for (int i = grid.length - 1; i >= 0; i--) {\r\n for (int q = 0; q < grid[i].length; q++) {\r\n if (grid[i][q] > 0) {\r\n for (int sum = i + 1; sum <= 3; sum++) {\r\n if (sum >= 0 && grid[sum][q] == grid[i][q]) {\r\n gui.clearSlot(i, q);\r\n currentScore = (long) Math.pow(2, grid[i][q]) + currentScore;\r\n gui.setScore(currentScore);\r\n moved = true;\r\n gui.setNewSlotBySlotIndex(sum, q, ++grid[i][q]);\r\n if (grid[i][q] == winningLevel+1) {highS(high); gui.showGameWon();}\r\n temp = grid[i][q];\r\n grid[i][q] = 0;\r\n grid[sum][q] = temp;\r\n break;\r\n } else if (sum >= 0 && grid[sum][q] != 0)\r\n break;\r\n }\r\n for (int r = 3; grid[i][q] > 0 && r > i; r--)\r\n if (grid[r][q] == 0) {\r\n gui.clearSlot(i, q);\r\n gui.setNewSlotBySlotIndex(r, q, grid[i][q]);\r\n temp = grid[i][q];\r\n moved = true;\r\n grid[i][q] = 0;\r\n grid[r][q] = temp;\r\n break;\r\n }}}} \r\n \r\n } else if (direction == RIGHT_INPUT){\r\n \r\n for (int q = 3; q >= 0; q--) {\r\n for (int i = 0; i < grid.length; i++) {\r\n if (grid[i][q] > 0) {\r\n for (int sum = q + 1; sum <= 3; sum++) {\r\n if (sum >= 0 && grid[i][sum] == grid[i][q]) {\r\n gui.clearSlot(i, q);\r\n currentScore = (long) Math.pow(2, grid[i][q]) + currentScore;\r\n gui.setScore(currentScore);\r\n moved = true;\r\n gui.setNewSlotBySlotIndex(i, sum, ++grid[i][q]);\r\n if (grid[i][q] == winningLevel+1) {highS(high); gui.showGameWon();}\r\n temp = grid[i][q];\r\n grid[i][q] = 0;\r\n grid[i][sum] = temp;\r\n break;\r\n } else if (sum >= 0 && grid[i][sum] != 0)\r\n break;\r\n }\r\n for (int r = 3; grid[i][q] > 0 && r > q; r--)\r\n if (grid[i][r] == 0) {\r\n gui.clearSlot(i, q);\r\n gui.setNewSlotBySlotIndex(i, r, grid[i][q]);\r\n temp = grid[i][q];\r\n moved = true;\r\n grid[i][q] = 0;\r\n grid[i][r] = temp;\r\n break;\r\n }}}} \r\n \r\n } else if (direction == UP_INPUT) {\r\n \r\n for (int i = 0; i < grid.length; i++) {\r\n for (int q = 0; q < grid[i].length; q++) {\r\n if (grid[i][q] > 0) {\r\n for (int sum = i - 1; sum >= 0; sum--) {\r\n if (sum >= 0 && grid[sum][q] == grid[i][q]) {\r\n gui.clearSlot(i, q);\r\n currentScore = (long) Math.pow(2, grid[i][q]) + currentScore;\r\n gui.setScore(currentScore);\r\n moved = true;\r\n gui.setNewSlotBySlotIndex(sum, q, ++grid[i][q]);\r\n if (grid[i][q] == winningLevel+1) {highS(high); gui.showGameWon();}\r\n temp = grid[i][q];\r\n grid[i][q] = 0;\r\n grid[sum][q] = temp;\r\n break;\r\n } else if (sum >= 0 && grid[sum][q] != 0)\r\n break;\r\n }\r\n for (int r = 0; grid[i][q] > 0 && r < i; r++)\r\n if (grid[r][q] == 0) {\r\n gui.clearSlot(i, q);\r\n gui.setNewSlotBySlotIndex(r, q, grid[i][q]);\r\n temp = grid[i][q];\r\n moved = true;\r\n grid[i][q] = 0;\r\n grid[r][q] = temp;\r\n break;\r\n }}}} \r\n } else if (direction == S_INPUT) {\r\n int save = gui.saveGame();\r\n if (save == 0) {\r\n try {\r\n BufferedWriter out = new BufferedWriter(new FileWriter(\"load.txt\"));\r\n out.write(\"1\");\r\n out.newLine();\r\n for (int i = 0; i < grid.length; i++){\r\n for (int q = 0; q < grid[i].length; q++){\r\n out.write(\"\"+grid[i][q]);\r\n out.newLine();\r\n }}\r\n if (high == currentScore) highS(high);\r\n out.write(\"\"+currentScore);\r\n out.close();\r\n } catch (IOException iox) {\r\n System.out.println(\"Problem with files\" );\r\n }}}\r\n else if (direction == R_INPUT) {\r\n try {\r\n BufferedWriter out = new BufferedWriter(new FileWriter(\"load.txt\"));\r\n out.write(\"0\");\r\n out.newLine();\r\n for (int i = 0; i < grid.length; i++){\r\n for (int q = 0; q < grid[i].length; q++){\r\n out.write(\"0\");\r\n out.newLine();\r\n }}\r\n out.write(\"0\");\r\n out.close();\r\n gui.restSave();\r\n } catch (IOException iox) {\r\n System.out.println(\"Problem with files\" );\r\n }}\r\n else if (direction == H_INPUT) {\r\n gui.highScore(high,currentScore);\r\n }\r\n else if (direction == K_INPUT){\r\n gui.clearSlot(3, 3);\r\n gui.clearSlot(3, 2);\r\n grid[3][3] = 10;\r\n grid[3][2] = 10;\r\n gui.setNewSlotBySlotIndex(3, 3, grid[3][3]);\r\n gui.setNewSlotBySlotIndex(3, 2, grid[3][2]);\r\n }\r\n \r\n int counter = 0;\r\n boolean check = false;\r\n if (moved == false) {\r\n for (int i = 0;i<grid.length;i++){\r\n for(int q =0; q<grid[i].length;q++){\r\n if (i != 0) if (grid[i][q] == grid[i-1][q]) {check = true; break;} // Up\r\n if (q != 3) if (grid[i][q]==grid[i][q+1]){check = true; break;} // Right\r\n if (grid[i][q]>0) counter = counter + 1;\r\n }}\r\n for (int i = 3;i>=0;i--){\r\n for(int q =3; q>=0;q--){\r\n if (i != 0) if (grid[i][q] == grid[i-1][q]){check = true; break;} // Down\r\n if (q != 3) if (grid[i][q]==grid[i][q+1]) {check = true; break;} // Left\r\n if (grid[i][q]>0) counter = counter + 1;\r\n }}}\r\n if (counter == 32) {\r\n highS(high);\r\n gui.showGameOver();\r\n }\r\n \r\n newSlot(moved,check);\r\n // TO DO: implement the action to be taken after an arrow key of the\r\n // specified direction is pressed.\r\n }", "public int resetToNextPoint() {\n if (curPointIndex + 1 >= numPoints)\n return ++curPointIndex;\n int diff = curPointIndex ^ (curPointIndex + 1);\n int pos = 0; // Position of the bit that is examined.\n while ((diff >> pos) != 0) {\n if (((diff >> pos) & 1) != 0) {\n cachedCurPoint[0] ^= 1 << (outDigits - numCols + pos);\n for (int j = 1; j <= dim; j++)\n cachedCurPoint[j] ^= genMat[(j-1) * numCols + pos];\n }\n pos++;\n }\n curCoordIndex = 0;\n return ++curPointIndex;\n }", "public void doStep() {\n\t\ttry {\n\t\t\tLifeMatrix newMatrix = new LifeMatrix(_numRows, _numColumns);\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\tupdateCell(_matrix, newMatrix, row, column);\n\t\t\t\t}\n\t\t\t}\n\t\t\t_matrix = newMatrix; // update to the new matrix (the old one is discarded)\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t\tSystem.out.println(\"Unexpected Error in doStep()\");\n\t\t}\n\t}", "void moveHandleToPointInTraceHorizontally(int where);", "private void drawColumn(int startX, int startY, int n, int height, boolean isRGBTri) {\n\t\twhile(startY < this.getPictureHeight()) {\n\t\t\tint[] newPoint = this.drawUprightTriangle(startX, startY, n, height, isRGBTri);\n\t\t\tthis.drawUpsideDownTriangle(startX, startY, n, height, isRGBTri);\n\t\t\tstartY = newPoint[1];\n\t\t}\n\t}", "private void nextPosition()\n\t{\n\t\tdouble playerX = Game.player.getX();\n\t\tdouble playerY = Game.player.getY();\n\t\tdouble diffX = playerX - x;\n\t\tdouble diffY = playerY - y;\n\t\tif(Math.abs(diffX) < 64 && Math.abs(diffY) < 64)\n\t\t{\n\t\t\tclose = true;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tclose = false;\n\t\t}\n\t\tif(close)\n\t\t{\n\t\t\tattackPlayer();\n\t\t} \n\t\telse if(alarm.done())\n\t\t{\n\t\t\tdirection = Math.abs(random.nextInt() % 360) + 1;\n\t\t\talarm.setTime(50);\n\t\t}\n\t\thspd = MathMethods.lengthDirX(speed, direction);\n\t\tvspd = MathMethods.lengthDirY(speed, direction);\n\t\tif(hspd > 0 && !flippedRight)\n\t\t{\n\t\t\tflippedRight = true;\n\t\t\tsetEnemy();\n\t\t} \n\t\telse if(hspd < 0 && flippedRight)\n\t\t{\n\t\t\tflippedRight = false;\n\t\t\tsetEnemy();\n\t\t}\n\t\tmove();\n\t\talarm.tick();\n\t\tshootTimer.tick();\n\t}", "public void moveLeft()\n\t{\n\t\tcol--;\n\t}", "void dragLines() {\n\t\t// calculate the offset made by mouseDrag -- subtract beginOffsetP from\n\t\t// P\n\t\toffsetP = PVector.sub(P, beginOffsetP);\n\n\t\tfor (int i = 0; i < amount; i++)\n\t\t\tline[i].drag();\n\t}", "public void AdvancePos() {\n \tswitch (data3d.TrackDirection){\n \tcase 0:\n \tc2.PositionValue += 1;\n \tc2.PositionValue = (c2.PositionValue % c2.getMaxPos());\n \tbreak;\n \tcase 1:\n \tc3.PositionValue += 1;\n \tc3.PositionValue = (c3.PositionValue % c3.getMaxPos());\n \tbreak;\n \tcase 2:\n \tc1.PositionValue += 1;\n \tc1.PositionValue = (c1.PositionValue % c1.getMaxPos());\n \tbreak;\n \tcase 3:\n \tdata3d.setElement((data3d.ActiveElement + 1) % data3d.Elements);\n \tcase 4:\n \tdata3d.setTime((data3d.ActiveTime + 1) % data3d.Times);\n \t}\n }", "public void moveRight() {\n this.position.addColumn(1);\n }", "public void flip(int x, int y){\n\t\tPiece temp = grid[x][y];\n\t\tint tempRepeats; //used to work out how many times in a diagonal to go\n\t\ttry{\n\t\t\t//UP\n\t\t\tfor (int i = 0;i < y; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x][y-i-1] == null || grid[x][y-i-1] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x][y-i-1] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x][y-(j+1)] = grid[x][y-(j+1)].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//DOWN\n\t\t\tfor (int i = 0;i < grid.length - y - 1; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x][y+i+1] == null || grid[x][y+i+1] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x][y+i+1] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x][y+(j+1)] = grid[x][y+(j+1)].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//LEFT\n\t\t\tfor (int i = 0;i < x; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x-(i+1)][y] == null || grid[x-(i+1)][y] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x-(i+1)][y] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x-(j+1)][y] = grid[x-(j+1)][y].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//RIGHT\n\t\t\tfor (int i = 0;i < grid.length - x - 1; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x+(i+1)][y] == null || grid[x+(i+1)][y] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x+(i+1)][y] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x+(j+1)][y] = grid[x+(j+1)][y].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Top left\n\t\t\tif(x < y){\n\t\t\t\ttempRepeats = x;\n\t\t\t} else {\n\t\t\t\ttempRepeats = y;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x-(i+1)][y-(i+1)] == null || grid[x-(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x-(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x-(j+1)][y-(j+1)] = grid[x-(j+1)][y-(j+1)].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//top right\n\t\t\t\n\t\t\tif(grid.length - x < y){\n\t\t\t\ttempRepeats = grid.length - x - 1;\n\t\t\t} else {\n\t\t\t\ttempRepeats = y - 1;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x+(i+1)][y-(i+1)] == null || grid[x+(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x+(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x+(j+1)][y-(j+1)] = grid[x+(j+1)][y-(j+1)].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t//down Right\n\t\t\tif(grid.length - x < grid.length - y){\n\t\t\t\ttempRepeats = grid.length - x - 1;\n\t\t\t} else {\n\t\t\t\ttempRepeats = grid.length - y - 1;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x+(i+1)][y+(i+1)] == null || grid[x+(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x+(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x+(j+1)][y+(j+1)] = grid[x+(j+1)][y+(j+1)].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//down Left\n\t\t\tif(x < grid.length - y){\n\t\t\t\ttempRepeats = x;\n\t\t\t} else {\n\t\t\t\ttempRepeats = grid.length - y - 1;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x-(i+1)][y+(i+1)] == null || grid[x-(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x-(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x-(j+1)][y+(j+1)] = grid[x-(j+1)][y+(j+1)].flip();\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\tfinally {\n\n\t\t}\n\t}", "private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }", "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "public void setCellToPath(int pos){//how to check for the end???\n\t\t\n\t\tif(pos<0||pos>width*height-1||getCompletePath())\n\t\t\treturn;// the position entered is not valid or the path has already been completed\n\t\t\n\t\telse if(temp.isEmpty()){//no path tile have been defined\n\t\t\tif(currentPos<0){//start hasn't been placed\t\t\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\n\t\t\t\tsetEntryPoint(currentPath);\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint d = currentPath.getDirection(pos);\n\t\t\t\tif (d<0||d>=4)\n\t\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\tPathType type =Map.createPathTileOfType(d, caseEdge);\n\t\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\t\n\t\t\t\t//fix direction of tile\n\t\t\t\tif(p.getEntry()==pos)\n\t\t\t\t\tp.rotate();\n\t\t\t\t//validate spot (for entry/exit)\n\t\t\t\t\n\t\t\t\t//set as Path entry point \n\t\t\t\tp.setStart();\n\t\t\t\tsetEntryPoint(p);\n\t\t\t\t\n\t\t\t\t//add to grid and list\n\t\t\t\tp.storePathTile();\n\n\t\t\t\t//update current\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\t\t\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif (getGrid(pos/width, pos%width)!=null)\n\t\t\t\tif(getGrid(pos/width, pos%width).isPath())\n\t\t\t\t\treturn;//causes intersection\n\t\t\t\n\t\t\tint dExit = currentPath.getDirection(pos);\n\t\t\tint lastPos= temp.peekLast().getPos();\n\t\t\tint dEntry= currentPath.getDirection(lastPos);\n\n\t\t\t\n\t\t\tif (dExit<0||dExit>3||dEntry<0||dEntry>3)\n\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\n\t\t\t\n\t\t\tPathType type =Map.createPathTileOfType(dExit,dEntry);\n\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\n\t\t\t//fix direction of tile\n\t\t\tif(p.getEntry()==pos)\n\t\t\t\tp.rotate();\n\t\t\t\n\t\t\tif(!inValidSpot(p))\n\t\t\t\treturn; //\n\t\t\t\n\t\t\t//add to grid and list\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\t//update current\n\t\t\tcurrentPos=pos;\n\t\t\tcurrentPath=new Path(currentPos);\t\n\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t}\n\t}", "private Cell[][] updateCellLocation(Cell[][] grid) {\n\n //Iterate through the grid\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n grid[x][y].setXCord(x); //Set the new X co-ordinate\n grid[x][y].setYCord(y); //Set the new Y co-ordinate\n }\n }\n\n return grid;\n }", "private void moveLastPart() {\n Field lastPart = snake.getCell(snake.getSize() - 1);\n fields[lastPart.getY()][lastPart.getX()] = lastPart;\n fields[lastPart.getPreviousY()][lastPart.getPreviousX()] = null;\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 }" ]
[ "0.6575142", "0.6554504", "0.6037747", "0.5999154", "0.59448177", "0.58763015", "0.5857792", "0.5846045", "0.57790345", "0.57691365", "0.5739374", "0.5726961", "0.57051915", "0.56965476", "0.5691372", "0.56735766", "0.5667497", "0.56386983", "0.5637216", "0.56134033", "0.5566632", "0.55226564", "0.5478103", "0.5476893", "0.5464567", "0.5458002", "0.5453228", "0.5452971", "0.54309154", "0.5430119", "0.5429831", "0.542289", "0.5422584", "0.5416889", "0.539359", "0.53926104", "0.5388225", "0.53838766", "0.53786707", "0.53636163", "0.53410894", "0.5338705", "0.53260624", "0.53136575", "0.530666", "0.5298415", "0.52889866", "0.52870256", "0.52712", "0.5269463", "0.52690214", "0.52639115", "0.5250925", "0.5243999", "0.5238575", "0.52249837", "0.5224935", "0.5223664", "0.52188253", "0.52161694", "0.5194603", "0.51940846", "0.51912403", "0.51905566", "0.51675797", "0.51658684", "0.5165283", "0.5163342", "0.5159311", "0.5159265", "0.5155146", "0.5152189", "0.51495504", "0.5141752", "0.5139284", "0.51348764", "0.5131329", "0.51192284", "0.51182395", "0.5118014", "0.5116308", "0.5114247", "0.51129365", "0.5108658", "0.5090757", "0.5086757", "0.50860775", "0.50813246", "0.5081177", "0.50727993", "0.50695634", "0.50690544", "0.50664127", "0.5066091", "0.5062857", "0.50541276", "0.5047953", "0.50464296", "0.50412107", "0.50386554" ]
0.7512361
0
move to the next column set the x and y position to the "point" of the triangle by incrementing the x position to half the width of the triangle, and incrementing/decrementing the y position by the height of the triangle update point direction for the new triangle
@Override protected void moveOver(){ incrementXPos(getWidth()/2); if(pointUp){ incrementYPos(-1*getHeight()); } else { incrementYPos(getHeight()); } incrementCol(); setPointDirection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void moveToNextRow(){\n incrementRow();\n resetXPos();\n if(getRow()%2 == 1){\n incrementYPos(getHeight()+getHeight());\n }\n resetCol();\n setPointDirection();\n }", "private void moveNext(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == (tracker.getMaxColumns() - 1)) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() + 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(0);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() + 1);\n\t\t }//end if-else\n\t }", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "private void drawColumn(int startX, int startY, int n, int height, boolean isRGBTri) {\n\t\twhile(startY < this.getPictureHeight()) {\n\t\t\tint[] newPoint = this.drawUprightTriangle(startX, startY, n, height, isRGBTri);\n\t\t\tthis.drawUpsideDownTriangle(startX, startY, n, height, isRGBTri);\n\t\t\tstartY = newPoint[1];\n\t\t}\n\t}", "public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }", "private void advanceRow(){\n\t\tfaceBackwards();\n\t\twhile(frontIsClear()){\n\t\t\tmove();\n\t\t}\n\t\tturnRight();\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}", "protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }", "public void stepForwad() {\n\t\t\t\n\t\t\tswitch(this.direction) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tthis.x = (this.worldWidth + this.x)%this.worldWidth;\n\t\t\tthis.y = (this.worldHeight + this.y)%this.worldHeight;\n\t\t}", "public void moveUp()\n\t{\n\t\trow++;\n\t}", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }", "public void moveRight() {\n this.position.addColumn(1);\n }", "public void incremetColumn() {\n setRowAndColumn(row, column + 1);\n }", "public void traspose() {\n for (int row = 0; row < this.numberOfRows(); row++) {\n for (int col = row; col < this.numberOfCols(); col++) {\n double value = this.get(row, col);\n this.set(row, col, this.get(col, row));\n this.set(col, row, value);\n }\n }\n }", "public void moveLeft()\n\t{\n\t\tcol--;\n\t}", "public void triangulo() {\n fill(0);\n stroke(255);\n strokeWeight(5);\n triangle(width/2, 50, height+100, 650, 350, 650);\n //(width/2, height-100, 350, 150, 900, 150);\n }", "public void moveTo(Point point){\n updateUndoBuffers(new LinkedList<>());\n xPos = point.getMyX()+myGrid.getWidth()/ HALF;\n yPos = myGrid.getHeight()/ HALF-point.getMyY();\n }", "@Override\r\n\tpublic String moveForth() {\n\t\tif((0<=x && x<=50) && (0<=y && y<=10) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (40<=y && y<=50) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<=y && y<=50) && (0<z && z<=10))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=10) && (0<=y && y<=50) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<=y && y<=50) && (40<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\telse if((40<=x && x<=50) && (0<=y && y<=50) && (0<z && z<=50))\r\n\t\t{\r\n\t\t\tz--;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "void moveHandleToPointInTraceHorizontally(int where);", "private void createFinalLine() {\n //Up\n if (orOpActive.row > origin.row) {\n for (int i = origin.row + 1; i <= orOpActive.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n\n //Down\n if (orOpActive.row < origin.row) {\n for (int i = origin.row - 1; i >= orOpActive.row; i--) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n //Right\n if (orOpActive.column > origin.column) {\n for (int i = origin.column + 1; i <= orOpActive.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n //Left\n if (orOpActive.column < origin.column) {\n for (int i = origin.column - 1; i >= orOpActive.column; i--) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n }", "void move(int row, int col) {\n\n int rowdiff = row - this._row; int coldiff = col - this.column;\n if (((Math.abs(rowdiff)) > 1) || (Math.abs(coldiff)) > 1);\n || (row >= _side) || (col >= _side) || (row < 0) || (col < 0);\n || ((Math.abs(coldiff)) == 1) && ((Math.abs(rowdiff)) == 1))); {\n throw new java.lang.IllegalArgumentException();\n } \n else if (rowdiff == 1) && (coldiff == 0)//up method\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(2)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(2))) {\n up_method(cube)\n } else if (isPaintedFace(2) == true) {\n _facePainted[2] == false\n grid[row][col] == true\n up_method(cube)\n }\n else {\n _facePainted[2] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if ((rowdiff == -1) && (coldiff == 0)) //down method\n\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(4)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(4))) {\n up_method(cube)\n } else if (isPaintedFace(4) == true) {\n _facePainted[4] == false\n grid[row][col] == true\n up_method(cube)\n } else {\n _facePainted[4] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if (rowdiff == 0) && (coldiff == -1) { //left method\n if (((isPaintedSquare(row, col) && isPaintedFace(5)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(5))) {\n up_method(cube)\n } else if (isPaintedFace(5) == true) {\n _facePainted[5] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[5] == true\n grid[row][col] == false \n up_method(cube)}\n }\n else if ((rowdiff == 0) && (coldiff == 1)) { //right method\n if (((isPaintedSquare(row, col) && isPaintedFace(6)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(6))) {\n up_method(cube)\n } else if (isPaintedFace(6) == true) {\n _facePainted[6] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[6] == true\n grid[row][col] == false \n up_method(cube)\n \n }\n }\n\n\n }", "public void moveVertex() {\r\n\t\tPriorityQueue<Vertex2D> pq = new PriorityQueue<Vertex2D>(3,(a,b) -> a.id - b.id);\r\n\t\tpq.add(this); pq.add(this.previous); pq.add(this.next);\r\n\t\t\r\n\t\tsynchronized(pq.poll()) {\r\n\t\t\tsynchronized(pq.poll()) {\r\n\t\t\t\tsynchronized(pq.poll()) {\r\n\t\t\t\t\t//Actually move the vertex \"this\"\r\n\t\t\t\t\tdouble r1 = Star.rnd.nextDouble();\r\n\t\t\t\t\tdouble r2 = Star.rnd.nextDouble();\r\n\t\t\t\t\tdouble newX = (1 - Math.sqrt(r1)) * previous.x + (Math.sqrt(r1) * (1 - r2)) * this.x + (Math.sqrt(r1) * r2) * next.x;\r\n\t\t\t\t\tdouble newY = (1 - Math.sqrt(r1)) * previous.y + (Math.sqrt(r1) * (1 - r2)) * this.y + (Math.sqrt(r1) * r2) * next.y;\r\n\t\t\t\t\tthis.x = newX;\r\n\t\t\t\t\tthis.y = newY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void goToXY(float x, float y) {\n float oldX, oldY;\n oldX = pos.x;\n oldY = pos.y; \n pos.x = x; \n pos.y = y;\n if (penDown) {\n pen.beginDraw();\n pen.line(oldX,oldY,pos.x,pos.y);\n pen.endDraw();\n }\n }", "public CellCoord nextColumn() {\n return new CellCoord(column + 1, row);\n }", "private void movePrevious(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == 0) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() - 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getMaxColumns() - 1);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() - 1);\n\t\t }//end if-else\n\t }", "public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}", "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }", "public int snapToGridVertically(int p)\r\n {\r\n return p;\r\n }", "public void moveRight()\n\t{\n\t\tcol++;\n\t}", "public void moveForward()\r\n\t{\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading-90))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading-90))*distance;\r\n\t\t}\r\n\t}", "public void move() {\n\t\tx+= -1;\n\t\tif (x < 0) {\n\t\t\tx = (processing.width - 1);\n\t\t}\n\t\ty+= 1;\n\t\tif (y > processing.height-1)\n\t\t\ty=0;\n\t}", "private int goToNextRow(int x, int y, int[] borders) {\n System.out.println(\"down\" + x + \":\"+ y);\n// if(Math.floor(diameter) == 1) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// return y;\n// }\n//\n// while((millingPathArr[x][y - overlappingVar]==0 || millingPathArr[x][y - overlappingVar + 1]==0) && !(y > borders[2])) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// }\n for(int i = 0; i < (diameter/2) ; i++) {\n int z = highestLayerImg[x][y];\n //System.out.println(y);\n if(y > borders[2]) {\n break;\n }\n millingPath.add(new BL_Pixel(x, y, z));\n millingPathArr[x][y] = 2; //used for going to next row\n y++;\n }\n //System.out.println(\"down\");\n return y;\n }", "private void moveParts() {\n int counter = 0;\n\n while (counter < snake.getSize() - 1) {\n Field previous = snake.getCell(counter);\n Field next = snake.getCell(counter + 1);\n\n next.setPreviousX(next.getX());\n next.setPreviousY(next.getY());\n\n next.setX(previous.getPreviousX());\n next.setY(previous.getPreviousY());\n\n fields[previous.getY()][previous.getX()] = previous;\n fields[next.getY()][next.getX()] = next;\n\n counter++;\n\n }\n }", "public void step() {\n\t\tint step = rand.nextInt(2);\n\t\t\n\t\tif (step==0) {\n\t\t\t\n\t\t\tPoint moveRight = new Point(++x,y);\n\t\t\t\n\t\t\tif(x<=size-1) {\n\t\t\t\tpath.add(moveRight);\n\t\t\t}\n\t\t\telse --x;\n\t\t}\n\t\telse { \n\t\t\tPoint topStep = new Point(x,--y);\n\t\t\t\n\t\t\tif(y>=0) {\n\t\t\t\tpath.add(topStep);\n\t\t\t}\n\t\t\telse ++y;\n\t\t}\n\t\tif (x==size-1 && y==0) {\n\t\t\tsetDone(true);\n\t\t}\n\t\t\n\t\t\n\t}", "public void loopThroughEdge()\n {\n int margin = 2;\n\n if (getX() < margin) //left side\n { \n setLocation(getWorld().getWidth()+ margin, getY());\n }\n else if (getX() > getWorld().getWidth() - margin) //right side\n {\n setLocation(margin, getY());\n }\n\n if (getY() < margin) //top side\n { \n setLocation(getX(), getWorld().getHeight() - margin);\n }\n else if(getY() > getWorld().getHeight() - margin) //bottom side\n { \n setLocation(getX(), margin);\n }\n }", "private void backward() {\n index--;\n if(column == 0) {\n line--;\n linecount = column = content.getColumnCount(line);\n }else{\n column--;\n }\n }", "void moveHandleToPointInTraceVertically(int where);", "public final void nextRow() {\n this.line++;\n }", "public void AdvancePos() {\n \tswitch (data3d.TrackDirection){\n \tcase 0:\n \tc2.PositionValue += 1;\n \tc2.PositionValue = (c2.PositionValue % c2.getMaxPos());\n \tbreak;\n \tcase 1:\n \tc3.PositionValue += 1;\n \tc3.PositionValue = (c3.PositionValue % c3.getMaxPos());\n \tbreak;\n \tcase 2:\n \tc1.PositionValue += 1;\n \tc1.PositionValue = (c1.PositionValue % c1.getMaxPos());\n \tbreak;\n \tcase 3:\n \tdata3d.setElement((data3d.ActiveElement + 1) % data3d.Elements);\n \tcase 4:\n \tdata3d.setTime((data3d.ActiveTime + 1) % data3d.Times);\n \t}\n }", "void moveTo(int dx, int dy);", "protected void moveRow (int row)\r\n {\r\n int move = 0;\r\n \r\n if (row < _currentRow)\r\n { move = _currentRow - row; }\r\n \r\n else if (row > _currentRow)\r\n { move = row - _currentRow; }\r\n \r\n _currentRow = row;\r\n }", "@Override\n public void onDrawFrame(GL10 gl) {\n // Clear color and depth buffers using clear-value set earlier\n gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\n \n // You OpenGL|ES rendering code here\n // ......\n gl.glLoadIdentity(); // Reset model-view matrix\n gl.glTranslatef(-((float) triangles.get(5)[0].x()+1.0f),-((float) triangles.get(5)[0].y()+1.0f),0.0f);\n Log.i(\"dd\",\"\"+triangles.get(0)[0].x() + \" \"+ triangles.get(0)[0].y()+\" \"+ triangles.get(0)[0].z());\n for(int i=0;i<triangles.size();i++){\n \t\n \tfloat[] vertices=new float[] {\n \t\t(float) triangles.get(i)[0].x(),(float) triangles.get(i)[0].y(),(float) triangles.get(i)[0].z()\t , //first point\n \t\t(float) triangles.get(i)[1].x(),(float) triangles.get(i)[1].y(),(float) triangles.get(i)[1].z()\t , //second point\n \t\t(float) triangles.get(i)[2].x(),(float) triangles.get(i)[2].y(),(float) triangles.get(i)[2].z()\t //third point\n \t };\n \t triangle=new Triangle(vertices);\n \t triangle.draw(gl); // Draw triangle \n }\n /* gl.glLoadIdentity(); // Reset model-view matrix\n gl.glTranslatef(-5.0f,-6.0f,-2.0f);\n float[] vertices = { // Vertices of the triangle\n \t 5.0f, 6.0f, 1.0f, // 0. top\n \t 3.0f, 0.0f, 0.0f, // 1. left-bottom\n \t 7.0f, 0.0f, 0.0f // 2. right-bottom\n \t };\n triangle=new Triangle(vertices);\n triangle.draw(gl); */\n\n }", "public void moveRight() {\n\t\tif (x1 < 24 && x2 < 24 && x3 < 24 && x4 < 24) {\n\t\t\tclearPiece();\n\t\t\tx1 += 1;\n\t\t\tx2 += 1;\n\t\t\tx3 += 1;\n\t\t\tx4 += 1;\n\t\t\tsetPiece();\n\t\t\trepaint();\n\t\t}\n\t}", "void sideStep(float steps) {\n _rotVector.rotate(PI / 2);\n _x += _rotVector.x * steps;\n _y += _rotVector.y * steps;\n _rotVector.rotate(-PI / 2);\n }", "public abstract void moveTo(double x, double y);", "private void updatePointsPosition() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tfromPoint.setX((int) (getX() + this.getBounds().getWidth()\n\t\t\t\t\t+ HORIZONTAL_OFFSET));\n\t\t\tfromPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataFromPointInfo.yShift));\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\ttoPoint.setX((int) (getX() - HORIZONTAL_OFFSET));\n\t\t\ttoPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataToPointInfo.yShift));\n\t\t}\n\t}", "private void update(final Grid grid, final int rowIndex, final int clumnIndex, final GeneralPath path) {\n Side prevSide = null; // was: NONE\n int r = rowIndex;\n int c = clumnIndex;\n final Cell start = grid.getCellAt(r, c);\n float[] pt = start.getXY(PathGenerator.firstSide(start, prevSide));\n float x = c + pt[0]; // may throw NPE\n float y = r + pt[1]; // likewise\n path.moveTo(x, y); // prepare for a new sub-path\n\n pt = start.getXY(secondSide(start, prevSide));\n float xPrev = c + pt[0];\n float yPrev = r + pt[1];\n\n prevSide = nextSide(start, prevSide);\n switch (prevSide) {\n case BOTTOM:\n r--;\n break;\n case LEFT:\n c--;\n break;\n case RIGHT:\n c++;\n break;\n case TOP:\n r++; // fall through\n break;\n default:\n break;\n }\n start.clear();\n\n Cell currentCell = grid.getCellAt(r, c);\n while (!start.equals(currentCell)) { // we want object reference equality\n pt = currentCell.getXY(secondSide(currentCell, prevSide));\n x = c + pt[0];\n y = r + pt[1];\n if (Math.abs(x - xPrev) > PathGenerator.EPSILON && Math.abs(y - yPrev) > PathGenerator.EPSILON) {\n path.lineTo(x, y);\n }\n xPrev = x;\n yPrev = y;\n prevSide = nextSide(currentCell, prevSide);\n switch (prevSide) {\n case BOTTOM:\n r--;\n break;\n case LEFT:\n c--;\n break;\n case RIGHT:\n c++;\n break;\n case TOP:\n r++;\n break;\n default:\n // System.out.println(\n // \"update: Potential loop! Current cell = \" + currentCell + \", previous side = \" + prevSide);\n break;\n }\n currentCell.clear();\n currentCell = grid.getCellAt(r, c);\n }\n\n path.closePath();\n }", "@Override\n protected final void arrow(final SnipeData v) {\n if (this.point == 1) {\n this.firstPoint[0] = this.getTargetBlock().getX();\n this.firstPoint[1] = this.getTargetBlock().getZ();\n this.firstPoint[2] = this.getTargetBlock().getY();\n v.sendMessage(ChatColor.GRAY + \"First point\");\n v.sendMessage(\"X:\" + this.firstPoint[0] + \" Z:\" + this.firstPoint[1] + \" Y:\" + this.firstPoint[2]);\n this.point = 2;\n } else if (this.point == 2) {\n this.secondPoint[0] = this.getTargetBlock().getX();\n this.secondPoint[1] = this.getTargetBlock().getZ();\n this.secondPoint[2] = this.getTargetBlock().getY();\n if ((Math.abs(this.firstPoint[0] - this.secondPoint[0]) * Math.abs(this.firstPoint[1] - this.secondPoint[1]) * Math.abs(this.firstPoint[2] - this.secondPoint[2])) > 5000000) {\n v.sendMessage(ChatColor.DARK_RED + \"Area selected is too large. (Limit is 5,000,000 blocks)\");\n this.point = 1;\n } else {\n v.sendMessage(ChatColor.GRAY + \"Second point\");\n v.sendMessage(\"X:\" + this.secondPoint[0] + \" Z:\" + this.secondPoint[1] + \" Y:\" + this.secondPoint[2]);\n this.point = 3;\n }\n } else if (this.point == 3) {\n this.pastePoint[0] = this.getTargetBlock().getX();\n this.pastePoint[1] = this.getTargetBlock().getZ();\n this.pastePoint[2] = this.getTargetBlock().getY();\n v.sendMessage(ChatColor.GRAY + \"Paste Reference point\");\n v.sendMessage(\"X:\" + this.pastePoint[0] + \" Z:\" + this.pastePoint[1] + \" Y:\" + this.pastePoint[2]);\n this.point = 1;\n\n this.stencilSave(v);\n }\n }", "private void pointer(Graphics image,int x,int y,int height,int b,int dir) {\n\n\t\tint[] xt=new int[3];\n\t\tint[] yt=new int[3];\n\n\t\tif(dir==0) {\n\t\t\txt[0]=x;\n\t\t\txt[1]=xt[2]=x+height;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=y+b/2;\n\t\t\tyt[2]=y-b/2;\n\t\t} else {\n\t\t\txt[0]=x;\n\t\t\txt[1]=x+b/2;\n\t\t\txt[2]=x-b/2;\n\t\t\tyt[0]=y;\n\t\t\tyt[1]=yt[2]=y-height;\n\t\t}\n\t\timage.fillPolygon(xt,yt,3);\n\t}", "public static void changePosition() {\n int direction;\n int speed;\n int newTopX;\n int newTopY;\n\n for (int i = 0; i < numShapes; ++i) {\n direction = moveDirection[i];\n speed = moveSpeed[i];\n newTopX = xTopLeft[i];\n newTopY = yTopLeft[i];\n\n //the switch uses the direction the speed should be applied to in order to find the new positions\n switch (direction) {\n case 0 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n }\n //upper left 135 degrees\n case 1 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 2 -> {\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n //upper right 45 degrees\n case 3 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 4 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n }\n //bottom right 315 degrees\n case 5 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n case 6 -> {\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n //bottom left 225 degrees\n case 7 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n }\n }\n }", "public void stepForward() {\n\t\tposition = forwardPosition();\n\t}", "public void move() {\r\n if(direction == 1) {\r\n if(userRow < grid.getNumRows() - 1) {\r\n userRow++;\r\n handleCollision(userRow, 1);\r\n }\r\n } else if(direction == -1) {\r\n if(userRow > 0) {\r\n userRow--;\r\n handleCollision(userRow, 1);\r\n }\r\n }\r\n }", "void setStepCounterTileXY();", "void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}", "void incrementColumnIndex();", "void incrementColumnIndex();", "protected abstract void moveTo(final float x, final float y);", "public void moveDown()\n\t{\n\t\trow--;\n\t}", "private void moveEnemyArrows(){\n\t\tint i,j;\n\t\tfor(i=0;i<enemy_num;i++){\n\t\t\tfor(j=0;j<enemy_arrow_num[i];j++){\n\t\t\t\tenemy_arrows[i][j][0] = enemy_arrows[i][j][0]+enemy_arrows[i][j][2];\n\t\t\t\tenemy_arrows[i][j][1] = enemy_arrows[i][j][1]+enemy_arrows[i][j][3];\n\t\t\t}\n\t\t}\n\t}", "private Loc nextPoint(Loc l, String direction) {\n\t\tif (direction.equals(\"down\")) {\n\t\t\t// Is at bottom?\n\t\t\t// System.out.println(\"p.getx= \" + l.row);\n\t\t\tif (l.row >= matrixHeight - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row + 1, l.col);\n\t\t} else if (direction.equals(\"left\")) {\n\t\t\tif (l.col <= 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row, l.col - 1);\n\t\t} else { // right\n\t\t\tif (l.col >= matrixWidth - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row, l.col + 1);\n\t\t}\n\t}", "public void addCol( int before ) {\n\t\tint size = rows * (cols+1);\n\t\tfloat[] x = new float[size];\n\t\tfloat[] y = new float[size];\n\n\t\tcols++;\nint i = 0;\nint j = 0;\n\t\tfor (int row = 0; row < rows; row++) {\n//\t\t\tint i = row*(cols-1);\n//\t\t\tint j = row*cols;\n\t\t\tfor (int col = 0; col < cols; col++) {\n\t\t\t\tif ( col == before ) {\n\t\t\t\t\tx[j] = (xGrid[i]+xGrid[i-1])/2;\n\t\t\t\t\ty[j] = (yGrid[i]+yGrid[i-1])/2;\n\t\t\t\t} else {\n\t\t\t\t\tx[j] = xGrid[i];\n\t\t\t\t\ty[j] = yGrid[i];\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\txGrid = x;\n\t\tyGrid = y;\n\t}", "public void moveTileForward()\n {\n if(!(activeTile+1 > tiles.length-1) && tiles[activeTile+1] != null)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile+1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile+1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile+1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile+1].getEndColor());\n \n tiles[activeTile+1].setTileLevel(tiles[activeTile+1].getTileLevel()-1);\n tiles[activeTile] = tiles[activeTile+1];\n previews[activeTile] = previews[activeTile+1];\n previewGradients[activeTile] = previewGradients[activeTile+1];\n previewHover[activeTile] = previewHover[activeTile+1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()+1);\n tiles[activeTile+1] = tmpTile;\n tiles[activeTile+1].setStartColor(tiles[activeTile+1].getStartColor());\n previews[activeTile+1] = tmpPreview;\n previewGradients[activeTile+1] = tmpPreviewGradients;\n previewHover[activeTile+1] = tmpPreviewHover;\n \n activeTile += 1;\n createPreviewGradients();\n }\n }", "private void movePoint(ArrayList<Point2D.Double> polygon)\n\t{\t\n\t\tfor(int i = 0; i < polygon.size(); ++i)\n\t\t{\n\t\t\tint a = i + 1;\n\t\t\t\n\t\t\t//makes sure we dont try and compare an index that is not there\n\t\t\tif(a > polygon.size() - 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(pastLine(polygon.get(i), polygon.get(a), currentPoint, moveVec))\n\t\t\t{\t\n\t\t\t\t//counts the number of hits\n\t\t\t\t++hitCount;\n\t\t\t\t//create the norm vector of the wall\n\t\t\t\tPoint2D.Double normalVec = calcNormVec(polygon.get(i).getX(), polygon.get(a).getX(), \n\t\t\t\t\t\tpolygon.get(i).getY(), polygon.get(a).getY());\n\t\t\t\t//gets the unit vec\n\t\t\t\tnormalVec = calcUnitVec(normalVec);\n\t\t\t\t//get the reflection vec\n\t\t\t\tPoint2D.Double reflectionVec = calcReflection(normalVec, moveVec);\n\t\t\t\t//set the old moving vec to the new refelction vec\n\t\t\t\tmoveVec = reflectionVec;\n\t\t\t\t//only allow shape 4 to randomly change the speed after collision\n\t\t\t\tif(shape4)\n\t\t\t\t{\n\t\t\t\t\trandNum = r.nextInt(200 + 1 - 1) + 1;\n\t\t\t\t\trandNum = randNum / 100;\n\t\t\t\t\t//set the movement vecs components\n\t\t\t\t\tmoveVec.setLocation(moveVec.getX() * randNum, moveVec.getY() * randNum);\n\t\t\t\t}\n\t\t\t\t//change the color randomly on a bounce\n\t\t\t\tchangeShapeColor(r.nextInt(255-0) + 0,r.nextInt(255-0), r.nextInt(255-0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//set the current location of the point;\n\t\tcurrentPoint.setLocation(currentPoint.getX() + moveVec.getX(), currentPoint.getY() + moveVec.getY());\n\t}", "void step () {\n if (gameOver)\n return;\n if (!isFalling) {\n // if last piece finished falling, spawn a new one\n spawnNewPiece();\n // if it can't move, game over\n if (!canMove(currentRow + 1, currentColumn)) {\n endGame();\n }\n updateView();\n }\n else if (canMove(currentRow + 1, currentColumn)) {\n currentRow += 1;\n updateView();\n } else {\n // the piece fell!\n isFalling = false;\n // draw current shape to the board\n drawCurrentToBoard();\n currentPiece.blocks = new int[currentPiece.blocks.length][currentPiece.blocks[0].length];\n increaseScore(board.clearFullRows(this));\n }\n }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "@Override\r\n\tpublic void nextStep() {\n\t\tif (this.oldX == this.coord.x && this.oldY == this.coord.y) { \r\n\t\t\tthis.currentPoint = (int) (Math.random()*this.patrol.size());\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\r\n\t\t}\r\n\r\n\t\t// target point reached, make new random target point\r\n\t\tif (this.targetX == this.coord.x && this.targetY == this.coord.y) {\r\n\t\t\tif (this.currentPoint < patrol.size() - 1)\r\n\t\t\t\tthis.currentPoint++;\r\n\t\t\telse\r\n\t\t\t\tthis.currentPoint = 0;\r\n\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\t\t}\r\n\t\tint step = (this.speed == Speed.fast ? 8 : 4);\r\n\t\t// int stepX = (int) (1 + Math.random() * step);\r\n\t\t// int stepY = (int) (1 + Math.random() * step);\r\n\t\tint x0 = (int) (this.coord.getX());\r\n\t\tint y0 = (int) (this.coord.getY());\r\n\r\n\t\tint dx = this.targetX - x0;\r\n\t\tint signX = Integer.signum(dx); // get the sign of the dx (1-, 0, or\r\n\t\t\t\t\t\t\t\t\t\t// +1)\r\n\t\tint dy = this.targetY - y0;\r\n\t\tint signY = Integer.signum(dy);\r\n\t\tthis.nextX = x0 + step * signX;\r\n\t\tthis.nextY = y0 + step * signY;\r\n\t\tthis.oldX = this.coord.x;\r\n\t\tthis.oldY = this.coord.y;\r\n\t\t// System.err.println(\"targetX,targetY \"+targetX+\" \"+targetY);\r\n\t}", "private void moveForward(double length) {\n\t\tsens.setXPos(sens.getXPos() + (Math.cos(Math.toRadians(sens.getDirection())) * length));\n\t\tsens.setYPos(sens.getYPos() + (Math.sin(Math.toRadians(sens.getDirection())) * length));\n\t}", "public void step() {\n\n if (n8) {\n // Your code here\n \n \n //by here, after your code, the cellsNext array should be updated properly\n }\n\n if (!n8) { // neighbours-4\n // your code here\n\n //by here, after your code, the cellsNext array should be updated properly\n }\n\n // Flip the arrays now.\n stepCounter++;\n\ttmp = cellsNow;\n cellsNow = cellsNext;\n\tcellsNext = tmp;\n\n }", "public static void move() {\r\n\t\t\r\n\t\tif (ths.page == 1) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public void takeStep() {\n \t//System.out.println(\"\"+Math.abs(rmd.nextInt()%4));\n \tswitch(rmd.nextInt(4)){\t\n \tcase 0:\n \t\tcurPoint = curPoint.translate(-stepSize, 0);//go right\n \t\tbreak;\n \tcase 1:\n \t\tcurPoint = curPoint.translate(0, stepSize);//go down\n \t\tbreak;\n \tcase 2:\n \t\tcurPoint = curPoint.translate(stepSize, 0);//go left\n \t\tbreak;\n \tcase 3:\n \t\tcurPoint = curPoint.translate(0, -stepSize);//go up\n \t\tbreak;\n \t}\n }", "private void setPathLine(Position prevPos, Position newPos) {\n\t\t//Grid coordinates\n\t\tint xStart = prevPos.getX();\n\t\tint yStart = prevPos.getY();\n\t\tint xEnd = newPos.getX();\n\t\tint yEnd = newPos.getY();\n\t\t\n\t\t//Set width/height in pixels of screen dimension\n\t\tfloat xF = (xEnd*PIXEL_WIDTH);\n\t\tfloat yF = (yEnd*PIXEL_HEIGHT);\n\t\t\n\t\t//Check that this grid IS free (ie 0) to draw a path\n\t\tif (checkPathCo(newPos) == 0) {\n\t\t\tsPath.lineTo(xF, yF);\n\t\t\tsetPathCo(newPos,1);\n\t\t\twhile (xStart != xEnd)\n\t\t\t{ //set everything in between as 1 ie undroppable\n\t\t\t\tPosition tmpPos = new Position(xStart, yEnd);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tif (xStart < xEnd)\n\t\t\t\t\txStart++;\n\t\t\t\telse\n\t\t\t\t\txStart--;\n\t\t\t}\n\t\t\t\n\t\t\twhile(yStart < yEnd)\n\t\t\t{ //same as x above\n\t\t\t\tPosition tmpPos = new Position(xEnd,yStart);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tyStart++;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void moveToPoint(double x, double y, double z);", "public void move(){\n x+=xDirection;\n y+=yDirection;\n }", "@Override\r\n\tpublic void moveTo(float x, float y) {\n\t\t\r\n\t}", "private void addLastValueToTable(){\n\t\t//System.out.println(theModelColumn.size()-1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getX(), theModelColumn.size()-1, 0);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getY(), theModelColumn.size()-1, 1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getWidth(), theModelColumn.size()-1, 2);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getHeight(), theModelColumn.size()-1, 3);\n\t}", "private void setHeadPositions(int nextPositionX, int nextPositionY, int currentPX, int currentPositionY) {\n snake.getCell(0).setPreviousX(currentPX);\n snake.getCell(0).setPreviousY(currentPositionY);\n snake.getCell(0).setX(nextPositionX);\n snake.getCell(0).setY(nextPositionY);\n }", "public void setPositionColumn(int value){this.positionColumn = value;}", "public void absMoveToFirstRowAt(int index) {\n if ((index <= 0) || (index >= getModel().getRowCount())) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n\n // Move the rows above the index row down one.\n System.arraycopy(va, 0, va, 1, index);\n\n va[0] = vTemp;\n\n //_printTableRow(0, va[0]);\n setRows(va);\n }", "public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }", "void redrawArrow(double newVal) {\n\n if (curPos.equals(Position.NEGATIVE) && newVal > 0) {\n startYProperty().set(startYProperty().get() - 2 * Point.RADIUS);\n curPos = Position.POSITIVE;\n } else if (curPos.equals(Position.POSITIVE) && newVal < 0) {\n startYProperty().set(startYProperty().get() + 2 * Point.RADIUS);\n curPos = Position.NEGATIVE;\n }\n\n setEndY(getStartY() - BASE_LENGTH * (newVal) / getAbsMax());\n drawTriangle(newVal);\n }", "public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}", "public void wrap(){\n\t\tif(this.y_location >=99){\n\t\t\tthis.y_location = this.y_location%99;\n\t\t}\n\t\telse if(this.y_location <=0){\n\t\t\tthis.y_location = 99 - (this.y_location%99);\n\t\t}\n\t\tif(this.x_location >= 99){\n\t\t\tthis.x_location = this.x_location%99;\n\t\t}\n\t\telse if(this.x_location <=0){\n\t\t\tthis.x_location = 99-(this.x_location%99);\n\t\t}\n\t}", "private void drawTriangle(double newVal) {\n\n triangle.getPoints().clear();\n triangle.getPoints().addAll(getEndX(), getEndY(), getEndX() - Point.RADIUS / 2.0,\n getEndY() + Point.RADIUS * 5 / 4.0 * (newVal) / (getAbsMax()), getEndX() + Point.RADIUS / 2.0,\n getEndY() + Point.RADIUS * 5 / 4.0 * (newVal) / getAbsMax());\n\n }", "abstract void setDirection(double x, double y, double z);", "public int resetToNextPoint() {\n if (curPointIndex + 1 >= numPoints)\n return ++curPointIndex;\n int diff = curPointIndex ^ (curPointIndex + 1);\n int pos = 0; // Position of the bit that is examined.\n while ((diff >> pos) != 0) {\n if (((diff >> pos) & 1) != 0) {\n cachedCurPoint[0] ^= 1 << (outDigits - numCols + pos);\n for (int j = 1; j <= dim; j++)\n cachedCurPoint[j] ^= genMat[(j-1) * numCols + pos];\n }\n pos++;\n }\n curCoordIndex = 0;\n return ++curPointIndex;\n }", "private void advance() {\n if (currColumn == 8) {\n currColumn = 0;\n currRow++;\n }\n else {\n currColumn++;\n }\n if (!(currRow == 9 && currColumn == 0)) {\n if (startingBoard[currRow][currColumn] != 0) {\n advance();\n }\n }\n }", "public void decrementColumn() {\n setRowAndColumn(row, Math.max(column - 1, 0));\n }", "public void decrementRow() {\n setRowAndColumn(Math.max(row - 1, 0), column);\n }", "private int xyTo1DAfterwards(int x, int y) {\n validate(x, width);\n validate(y, height);\n return !isTransposed ? x + (width - 1) * y : y + x * (height - 1);\n }", "public void rotateCCW(){\n rotState = (rotState + 3) % 4;\n for (int i = 0; i < tiles.length; ++i){\n tiles[i] = new Point(tiles[i].y , -tiles[i].x);\n }\n }", "public void move(int dir) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint nextX = x[i] + dir;\n\t\t\tif (nextX < 0 || nextX >= 10)\n\t\t\t\treturn;\n\t\t\tif (Tetris.game.grid[nextX][y[i]] != 0)\n\t\t\t\treturn;\n\t\t}\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tx[i] += dir;\n\t}", "private void move() {\n\n for (int z = snakeLength; z > 0; z--) {\n xLength[z] = xLength[(z - 1)];\n yLength[z] = yLength[(z - 1)];\n }\n\n if (left) {\n xLength[0] -= elementSize;\n }\n\n if (right) {\n xLength[0] += elementSize;\n }\n\n if (up) {\n yLength[0] -= elementSize;\n }\n\n if (down) {\n yLength[0] += elementSize;\n }\n }", "public void step()\n {\n\t int rows = grid.length-1;\n\t int cols = grid[0].length-1;\n\t int direction = (int) (Math.random()*3);\n\t direction--;\n\t int row = (int) (Math.random()*rows);\n\t //System.out.println(row);\n\t int col = (int) (Math.random()*cols);\n\t //System.out.println(col);\n\t if(grid[row][col] == SAND && (grid[row+1][col] == EMPTY || grid[row+1][col] == WATER)) {\n\t\t grid[row+1][col] = SAND;\n\t\t grid[row][col] = EMPTY;\n\t }\n\t if(grid[row][col] == WATER && grid[row+1][col] == EMPTY) {\n\t\t if(col != 0) {\n\t\t\t grid[row+1][col+direction] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t\t else {\n\t\t\t grid[row+1][col] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t }\n }", "public void moveRight()\n\t{\n\t\tx = x + STEP_SIZE;\n\t}", "public void display()\n {\n if(corner == 1)\n {\n moveTo(new Location(0,0));\n setDirection(135);\n }\n else if(corner == 2)\n {\n moveTo(new Location(0,9));\n setDirection(225);\n }\n else if(corner == 3)\n {\n moveTo(new Location(9,9));\n setDirection(315);\n }\n else if(corner == 4)\n {\n moveTo(new Location(9,0));\n setDirection(45);\n }\n }", "public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}", "static Point getNextPoint(Point cur)\n\t{\n\t\tint y = cur.y;\n\t\tint x = cur.x;\n\n\t\t// reached end of column, got to next row\n\t\tif (++x > 8)\n\t\t{\n\t\t\tx = 0;\n\t\t\t++y;\n\t\t}\n\t\t\n\t\tif (y < 9)\n\t\t\treturn new Point(y, x);\n\n\t\treturn null; // reached end of grid\n\t}", "public void move() {\n switch (dir) {\n case 1:\n this.setX(getX() + this.speed);\n moveHistory.add(new int[] {getX() - this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 2:\n this.setY(getY() - this.speed);\n moveHistory.add(new int[] {getX(), getY() + this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 3:\n this.setX(getX() - this.speed);\n moveHistory.add(new int[] {getX() + this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 4:\n this.setY(getY() + this.speed);\n moveHistory.add(new int[] {getX(), getY() - this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n default:\n break;\n }\n }", "private void doNextRow(){\n\t\tmove();\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\t\n\t}", "public void nextLevelTogo() {\n if (this.myClearedLines % 2 == 0) {\n myLinesToGo = 2;\n } else {\n myLinesToGo = 1;\n }\n }" ]
[ "0.7462324", "0.6370375", "0.627062", "0.6135186", "0.6056984", "0.6043757", "0.59741503", "0.59604806", "0.5815997", "0.5775329", "0.57133555", "0.5686991", "0.56585", "0.5650907", "0.56035334", "0.55964005", "0.5588109", "0.5564456", "0.5483639", "0.54725224", "0.5458729", "0.54580164", "0.54393196", "0.54361916", "0.5430686", "0.5423575", "0.5417536", "0.5411948", "0.5404059", "0.5403597", "0.5400631", "0.53956956", "0.5390959", "0.53521836", "0.53492635", "0.5337575", "0.53158873", "0.5294212", "0.5289329", "0.5288909", "0.5286604", "0.528458", "0.5280867", "0.5266688", "0.5264361", "0.5254864", "0.5254811", "0.52507967", "0.5246934", "0.5234068", "0.52305245", "0.52299607", "0.52272785", "0.5220444", "0.52185446", "0.52185446", "0.5212275", "0.51974344", "0.5185558", "0.5185188", "0.5182582", "0.5176305", "0.5175366", "0.5174996", "0.51674974", "0.5165068", "0.51638967", "0.51621234", "0.51570404", "0.51536316", "0.51489675", "0.51406837", "0.51396614", "0.5129955", "0.51268816", "0.5123407", "0.51221234", "0.5118879", "0.5118462", "0.51182187", "0.51126623", "0.51086825", "0.50862503", "0.5083276", "0.5081259", "0.5081093", "0.50774235", "0.5077031", "0.5075099", "0.5063632", "0.50608146", "0.50549173", "0.5044879", "0.50446236", "0.5044241", "0.50383496", "0.50352114", "0.5032998", "0.5030701", "0.50267506" ]
0.5386984
33
make a Double array of all the points of the triangle
@Override protected Double[] getCorners(){ return new Double[]{ //leftmost point getXPos(), getYPos(), //rightmost point getXPos() + getWidth(), getYPos(), //middle point getXPos() + getWidth() / 2, getYPos() + getHeight() * getThirdTriangleYPoint(pointUp) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double[] makePolygon() {\n double[] polygon = new double[POINTS*2];\n \n for (int i = 0; i < POINTS; i++) {\n double a = i * Math.PI * 2.0 / POINTS;\n polygon[2*i] = Math.cos(a);\n polygon[2*i+1] = Math.sin(a);\n }\n \n return polygon;\n }", "public org.astrogrid.stc.coords.v1_10.beans.Double3Type[] xgetPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n org.astrogrid.stc.coords.v1_10.beans.Double3Type[] result = new org.astrogrid.stc.coords.v1_10.beans.Double3Type[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public double[] toArray() {\n\t\treturn new double[] {x, y, z};\n\t}", "public double[] GetPointArray() {\n return PointArray;\n }", "public abstract double[] toDoubleArray();", "public PointList calculateTrianglePoints(Rectangle r)\r\n\t{\r\n\t\tPointList points = new PointList(3);\r\n\t\t\r\n\t\tpoints.addPoint(new Point(r.x + (r.width-1) / 2, r.y));\r\n\t\tpoints.addPoint(new Point(r.x, r.y + r.height-1));\r\n\t\tpoints.addPoint(new Point(r.x + r.width-1, r.y + r.height-1));\r\n\r\n\t\treturn points;\r\n\t}", "public float[] getNormals(float[] input) {\n\t\tVector<Float> result = new Vector<Float>();\n\t\t//get the three vertices of the triangle and calculate vector normal\n\t\tfor (int i = 0; i < input.length; i += 9) {\n\t\t\tPoint3D a = new Point3D(input[i], input[i + 1], input[i + 2]);\n\t\t\tPoint3D b = new Point3D(input[i + 3], input[i + 4], input[i + 5]);\n\t\t\tPoint3D c = new Point3D(input[i + 6], input[i + 7], input[i + 8]);\n\t\t\tPoint3D p1 = a.minus(b);\n\t\t\tPoint3D p2 = a.minus(c);\n\n\t\t\tVector3D e1 = new Vector3D(p1);\n\t\t\tVector3D e2 = new Vector3D(p2);\n\t\t\tVector3D n = e1.cross(e2).normalize();\n\t\t\t//add normal's components to the result array\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tresult.add((float) n.getX());\n\t\t\t\t// System.out.print(n.getX());\n\t\t\t\tresult.add((float) n.getY());\n\t\t\t\t// System.out.print(n.getY());\n\t\t\t\tresult.add((float) n.getZ());\n\t\t\t\t// System.out.print(n.getZ());\n\t\t\t\t// System.out.println();\n\t\t\t}\n\n\t\t}\n\t\treturn ArrayUtils.toPrimitive(result.toArray(new Float[0]));\n\n\t}", "public abstract double[] getasDouble(int tuple);", "private static final double[][] doubleArray2d (final List points) {\n final int m = points.size();\n final int n = ((List) points.get(0)).size();\n final double[][] a = new double[m][n];\n for (int i=0;i<m;i++) {\n final List row = (List) points.get(i);\n for (int j=0;j<n;j++) {\n a[i][j] = ((Number) row.get(j)).doubleValue(); } }\n return a; }", "public java.util.List[] getPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n java.util.List[] result = new java.util.List[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getListValue();\n return result;\n }\n }", "public double[] toDoubleArray(double[] array) {\n\t\tif (array == null) {\n\t\t\tarray = new double[point.length];\n\t\t}\n\t\tSystem.arraycopy(point, 0, array, 0, point.length);\n\t\treturn array;\n\t}", "public List<double[]> calculateCurvature(){\n List<double[]> values = new ArrayList<>();\n\n\n for(Node3D node: mesh.nodes){\n List<Triangle3D> t_angles = node_to_triangle.get(node);\n //all touching triangles.\n if(t_angles==null) continue;\n\n double[] curvature = getNormalAndCurvature(node, t_angles);\n double[] pt = node.getCoordinates();\n double mixedArea = calculateMixedArea(node);\n values.add(new double[]{\n pt[0], pt[1], pt[2],\n curvature[3],\n curvature[0], curvature[1], curvature[2],\n mixedArea\n });\n\n\n }\n return values;\n }", "public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }", "BigDecimal[][] toTriangular();", "double[] getOrigin();", "public abstract double[] getVector(int[] location);", "public double[] getCoordinates(){\n\t\tdouble[] coord = new double[2];\n\t\tdouble xcoord = (double)position[0]/9;\n\t\tdouble zcoord = (double)position[1]/9;\n\t\tcoord[0] = xcoord;\n\t\tcoord[1] = zcoord;\t\t\n\t\treturn coord;\n\t}", "public Point2D[] getPoint2DArray() { \n \n double x1=0; \n double y1=0; \n double x2=0; \n double y2=0; \n \n double x0; \n double y0; \n double x3; \n double y3; \n \n int samples_interval = Math.round(samples / (points.length-1)); \n Point2D[] points_return = new Point2D[samples]; \n int pos_return = 0; //we'll store the pointer in the points_return array here. \n //We iterate between the different given points, \n //calculating the Bezier curves between them \n for(int i=0; i < points.length-1; i++){ \n //the last period may have a different number of samples in order to fit the sample value \n if(i == points.length-2){ \n samples_interval = samples - (samples_interval*(points.length-2)); \n } \n x1=points[i].getX(); \n x2=points[i+1].getX(); \n y1=points[i].getY(); \n y2=points[i+1].getY(); \n if(i>0){ \n x0=points[i-1].getX(); \n y0=points[i-1].getY(); \n }else { \n x0 = x1 - Math.abs(x2 - x1); \n y0 = y1; \n } \n if(i < points.length -2){ \n x3=points[i+2].getX(); \n y3=points[i+2].getY(); \n } else { \n x3 = x1 + 2*Math.abs(x1 - x0); \n y3 = y1; \n } \n Point2D[] points_bezier = CalculateBezierCurve(x0,y0,x1,y1,x2,y2,x3,y3, samples_interval); \n //Fill the return array \n for(int j = 0 ; j < points_bezier.length; j++){ \n points_return[pos_return] = new Point2D.Double(points_bezier[j].getX(),points_bezier[j].getY()); \n pos_return++; \n } \n \n } \n \n\n return points_return; \n}", "private Point[] getPointArray()\n\t{\n\t\treturn this.pointArray; // This should probably be a copy, to maintain security (?)\n\t}", "@Nonnull\n public double [] getDoublePivot ()\n {\n final double [] vals = new double [m_nRows];\n for (int i = 0; i < m_nRows; i++)\n vals[i] = m_aPivot[i];\n return vals;\n }", "public static double penteTriangle(double n[]){\r\n\t\tdouble pente;\r\n\t\tpente=0;\r\n\t\tdouble[] k;\r\n\t\tk = new double[3];\r\n\t\tk[0]=0;\r\n\t\tk[1]=0;\r\n\t\tk[2]=1;\r\n\t\t\r\n\t\tdouble nScalairek = produitScalaire(n,k);\r\n\t\tpente = Math.acos(nScalairek) ;\r\n\t\tpente = Math.toDegrees(pente);\r\n\t\treturn\tpente;\t\r\n\t}", "public void getSeriesForPoints(){\n\n int lenght = cluster_polygon_coordinates.length;\n\n x_latitude = new Number[lenght];\n y_longitude = new Number[lenght];\n\n //x_latitude[lenght-1] = cluster_polygon_coordinates[0].x;\n //y_longitude[lenght-1] = cluster_polygon_coordinates[0].y;\n for (int i=0;i<lenght;i++) {\n\n x_latitude[i] = cluster_polygon_coordinates[i].x;\n y_longitude[i] = cluster_polygon_coordinates[i].y;\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].x));\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].y));\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].z));\n }\n\n }", "public double[] vectorTo(double[] pt){\n double[] vecToLight = new double[3];\n vecToLight[0] = pos[0] - pt[0];\n vecToLight[1] = pos[1] - pt[1];\n vecToLight[2] = pos[2] - pt[2];\n return vecToLight;\n }", "private static Object[] fillTriangleAttrArray(NamedNodeMap attr) {\n ArrayList<Object> attrList = new ArrayList<>();\n attrList.add(attr.getNamedItem(SIDE_A) == null ?\n null : new BigDecimal(attr.getNamedItem(SIDE_A).getNodeValue()));\n attrList.add(attr.getNamedItem(SIDE_B) == null ?\n null : new BigDecimal(attr.getNamedItem(SIDE_B).getNodeValue()));\n attrList.add(attr.getNamedItem(SIDE_C) == null ?\n null : new BigDecimal(attr.getNamedItem(SIDE_C).getNodeValue()));\n\n if (attr.getNamedItem(TYPE) != null) {\n String triangleTypeAttr = attr.getNamedItem(TYPE).getNodeValue();\n switch (triangleTypeAttr) {\n case ISOSCELES_TYPE:\n attrList.add(Triangle.TYPE_ISOSCELES);\n break;\n case EQUILATERAL_TYPE:\n attrList.add(Triangle.TYPE_EQUILATERAL);\n break;\n default:\n attrList.add(Triangle.TYPE_COMMON);\n break;\n }\n }\n\n return attrList.toArray();\n }", "public double[] toArray() {\n\t\treturn acc.toArray();\n\t}", "public double[] getDoubleList();", "double[][] asDouble();", "public double[] toArray() \r\n\t{ \r\n\t\treturn Arrays.copyOf(storico, storico.length) ; \r\n\t}", "public static vtkPoints createPoints(double[] points)\n\t{\n\t\tvtkPoints vtkPoints = new vtkPoints();\n\t\tvtkDoubleArray d = new vtkDoubleArray();\n\t\td.SetJavaArray(points);\n\t\td.SetNumberOfComponents(3);\n\t\tvtkPoints.SetData(d);\n\t\tdelete(d);\n\t\treturn vtkPoints;\n\t}", "public abstract Vector2[] getVertices();", "public org.astrogrid.stc.coords.v1_10.beans.Double3Type xgetPointArray(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Double3Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Double3Type)get_store().find_element_user(POINT$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n return (org.astrogrid.stc.coords.v1_10.beans.Double3Type)target;\n }\n }", "public IntPoint[] getVertices() {\n\t\treturn PointArrays.copy(vertices);\n\t}", "public Polygon getPoints() {\n\t\tPolygon points = new Polygon();\n\t\t// Each side of the diamond needs to be DIM pixels long, so there\n\t\t// is more maths this time, involving triangles and that Pythagoras\n\t\t// dude... \n\t\tint radius = this.size * (DIM / 2);\n\t\tint hypotenuse = (int)Math.hypot(radius, radius);\n\t\t// Four points where order is important - screwing up here does\n\t\t// not produce a shape of any sort...\n\t\tpoints.addPoint(this.x, this.y - hypotenuse); // top\n\t\tpoints.addPoint(this.x - hypotenuse, this.y); // left\n\t\tpoints.addPoint(this.x, this.y + hypotenuse); // bottom\t\t\n\t\tpoints.addPoint(this.x + hypotenuse, this.y); // right\n\t\treturn points;\n\t}", "public Array<Point> allOuterPoints() {\r\n \tArray<Point> innerPoints = innerPiece.getPoints();\r\n Array<Point> outerPoints = new Array<Point>();\r\n for (Point inner : innerPoints) {\r\n outerPoints.add(toOuterPoint(inner));\r\n }\r\n return outerPoints;\r\n }", "public float[] array() {\r\n\t\treturn new float[] { x, y, z };\r\n\t}", "public Point2D[] getGivenPoints(){ \n return this.points; \n }", "public Vector2f[] generatePatch(){\n\t\tVector2f[] vertices = new Vector2f[16];\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0);\n\t\tvertices[index++] = new Vector2f(0.333f,0);\n\t\tvertices[index++] = new Vector2f(0.666f,0);\n\t\tvertices[index++] = new Vector2f(1,0);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.333f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.333f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.333f);\n\t\tvertices[index++] = new Vector2f(1,0.333f);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.666f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.666f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.666f);\n\t\tvertices[index++] = new Vector2f(1,0.666f);\n\t\n\t\tvertices[index++] = new Vector2f(0,1);\n\t\tvertices[index++] = new Vector2f(0.333f,1);\n\t\tvertices[index++] = new Vector2f(0.666f,1);\n\t\tvertices[index++] = new Vector2f(1,1);\n\t\t\n\t\treturn vertices;\n\t}", "public ArrayDouble getRecordValues(State state) {\n return new ArrayDouble(opensimSimulationJNI.ExpressionBasedPointToPointForce_getRecordValues(swigCPtr, this, State.getCPtr(state), state), true);\n }", "public double[][] getDistances() {\n calculateDistances();\n\n int numPoints = getNumPoints();\n double[][] temp = new double[numPoints][numPoints];\n\n for (int i = 0; i < numPoints; i++) {\n for (int j = 0; j < numPoints; j++) {\n temp[i][j] = getDistance(i, j);\n }\n }\n\n return temp;\n }", "public ArrayList<Point> getTrios(final LineData lineData) {\n\t\treturn lineData.getPoints();\n\t}", "void computeTriangleNormals();", "public float[] getVector() {\r\n\t\t\r\n\t\tfloat array[]=new float[12];\r\n\t\tint index=-1;\r\n\t\t\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\t++index;\r\n\t\t\t\tarray[index]=thecounts[i][j]; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}", "public int[] getXPoints ()\n\t{\n\t\tint xPoints [] = {xDimension1, xDimension2, xDimension3};\n\t\treturn xPoints;\n\t}", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "double[][] asArray(){\n double[][] array_to_return = new double[this.rows][this.cols];\n for(int i=0; i<this.rows; i++){\n for(int j=0; j<this.cols; j++) array_to_return[i][j] = this.data[i*this.cols + j];\n }\n\n return array_to_return;\n }", "public Triangle (double x1,double y1,double x2, double y2,double x3,double y3)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(x3,y3);\r\n }", "private Vector2[] getRotatedPoints() {\n Vector2[] points = new Vector2[4]; //Four points of the square\n points[0] = new Vector2(position.getX() - SIZE / 2, position.getY() - SIZE / 2); //TOP LEFT\n points[1] = new Vector2(position.getX() + SIZE / 2, position.getY() - SIZE / 2); //TOP RIGHT\n points[2] = new Vector2(position.getX() + SIZE / 2, position.getY() + SIZE / 2); //BOTTOM RIGHT\n points[3] = new Vector2(position.getX() - SIZE / 2, position.getY() + SIZE / 2); //BOTTOM LEFT\n for (int i = 0; i < points.length; i++) {\n points[i] = rotatePoint(points[i], position, angle); //Rotate the points based on the angle of the dice\n }\n return points;\n }", "double[] getReferenceValues();", "private Data[] getDoubles(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataDouble(value)\n\t\t: new DataArrayOfDoubles(new double[] { value, value });\n\t\t\treturn data;\n\t}", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "public abstract int[] getCoords();", "public double[] randv()\n\t{\n\t\tdouble p = a * (1.0 - e * e);\n\t\tdouble cta = Math.cos(ta);\n\t\tdouble sta = Math.sin(ta);\n\t\tdouble opecta = 1.0 + e * cta;\n\t\tdouble sqmuop = Math.sqrt(this.mu / p);\n\n\t\tVectorN xpqw = new VectorN(6);\n\t\txpqw.x[0] = p * cta / opecta;\n\t\txpqw.x[1] = p * sta / opecta;\n\t\txpqw.x[2] = 0.0;\n\t\txpqw.x[3] = -sqmuop * sta;\n\t\txpqw.x[4] = sqmuop * (e + cta);\n\t\txpqw.x[5] = 0.0;\n\n\t\tMatrix cmat = PQW2ECI();\n\n\t\tVectorN rpqw = new VectorN(xpqw.x[0], xpqw.x[1], xpqw.x[2]);\n\t\tVectorN vpqw = new VectorN(xpqw.x[3], xpqw.x[4], xpqw.x[5]);\n\n\t\tVectorN rijk = cmat.times(rpqw);\n\t\tVectorN vijk = cmat.times(vpqw);\n\n\t\tdouble[] out = new double[6];\n\n\t\tfor (int i = 0; i < 3; i++)\n\t\t{\n\t\t\tout[i] = rijk.x[i];\n\t\t\tout[i + 3] = vijk.x[i];\n\t\t}\n\n\t\treturn out;\n\t}", "static double[][] makeTestData() {\n double[][] data = new double[21][2];\n double xmax = 5;\n double xmin = -5;\n double dx = (xmax - xmin) / (data.length -1);\n for (int i = 0; i < data.length; i++) {\n double x = xmin + dx * i;\n double y = 2.5 * x * x * x - x * x / 3 + 3 * x;\n data[i][0] = x;\n data[i][1] = y;\n }\n return data;\n }", "public TriangleObject (double[][][] t) {\n\tfor (double[][] i: t) {\n Triangle in = new Triangle(i);\n\t\ttriangles.add(in); //You need to instantiate a new triangle to satsify this ^^\n\t}\n }", "public double[] getHilbertArray( double[][] data )\n {\n // log_e( 2 ) * log_2( x ) = log_e( x ) ==> log_2( x ) = log_e( x ) / log_e( 2 )\n int pos = -1;\n int size = Math.max( data.length, data[ 0 ].length );\n double log_2 = Math.ceil( Math.log( size ) / Math.log( 2 ) );\n size = (int) Math.pow( 2.0, log_2 );\n double[] curve = new double[ size * size ];\n\n for( int i=0; i<size; i++ )\n {\n for( int j=0; j<size; j++ )\n {\n pos = getHilbertDistance( i, j, size );\n if( i >= data.length || j >= data[ 0 ].length )\n {\n curve[ pos ] = -1.0;\n }\n else\n {\n curve[ pos ] = data[ i ][ j ];\n }\n }\n }\n\n return curve;\n }", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }", "public void addPoint(double[] point);", "public List<ga_Triangle2D> tesselatePolygon(ga_Polygon poly);", "@Override\n\tpublic double[] toDoubleArray() {\n\t\treturn null;\n\t}", "public Point[] getCoordinates() {\n Point[] temp = new Point[segments.length];\n for (int i = 0; i < segments.length; i++) {\n temp[i] = segments[i].getCoordinates();\n }\n return temp;\n }", "@Override\r\n default Vector3[] getPoints(int amount) {\r\n if (amount < 0) throw new IllegalArgumentException(\"amount < 0\");\r\n if (amount == 0) return new Vector3[0];\r\n if (amount == 1) return new Vector3[] {getOrigin()};\r\n if (amount == 2) return new Vector3[] {getOrigin(), getEnd()};\r\n\r\n int t = amount - 1, i = 0;\r\n Vector3[] result = new Vector3[amount];\r\n\r\n Iterator<Vector3> iter = intervalIterator(getLengthSquared() / t*t);\r\n while (iter.hasNext())\r\n result[i++] = iter.next();\r\n\r\n return result;\r\n }", "public List<Triangle2D> tesselatePolygon(Polygon2D poly);", "PVector[] _getPoints() {\n PVector cen = _getCenter();\n \n PVector[] points = new PVector[_hitbox.length];\n float angle = _rotVector.heading();\n for(int i = 0; i < _hitbox.length; i++) {\n points[i] = new PVector(_hitbox[i].x, _hitbox[i].y);\n points[i].rotate(angle);\n points[i].x += cen.x;\n points[i].y += cen.y;\n }\n return points;\n }", "public static float[] createTriangleData(float width, float height, float transX, float transY) {\n float[] data = new float[3 * 3];\n float w = width * 0.5f;\n float h = height * 0.5f;\n\n data[0] = -w + transX;\n data[1] = -h + transY;\n data[2] = 0;\n\n data[3] = +w + transX;\n data[4] = -h + transY;\n data[5] = 0;\n\n data[6] = 0 + transX;\n data[7] = +h + transY;\n data[8] = 0;\n\n return data;\n }", "public static ArrayList<Triangle> Triangulation(ArrayList<Point> points){\n\t\t\n\t\t\n\t\t\n\t\tpoints.sort(new PointComperator());\n\t\tpoints.add(MainFrame.buutomLeft);\n\t\tStack<Point> CH= new Stack<Point>();\n\t\tArrayList<Triangle> T=new ArrayList<Triangle>();\n\t\tCH.push(MainFrame.buutomLeft);\n\t\tCH.push(points.get(0));\n\t\tCH.push(points.get(1));\n\t\t\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tPoint curr=points.get(i);\n\t\t\tif(Orient(CH.get(CH.size()-2),CH.peek(), curr))\n\t\t\t{\n\t\t\t\tT.add(new Triangle(curr, CH.peek(), MainFrame.buutomLeft));\n\t\t\t\tCH.push(curr);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tT.add(new Triangle(CH.peek(), curr, MainFrame.buutomLeft));\n\n\t\t\t\twhile(!Orient(CH.get(CH.size()-2),CH.peek(),curr)) {\n\t\t\t\t\tPoint temp = CH.pop();\n\t\t\t\t\tT.add(new Triangle(temp, CH.peek(), curr));\n\t\t\t\t}\n\t\t\t\tCH.push(curr);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn T;\n\t}", "public static PointD[] fillData() {\n ArrayList<PointD> vals = new ArrayList();\n while (scn.hasNextLine()) {\n String[] xandy = scn.nextLine().split(\"\\\\s*,\\\\s*\");\n vals.add(new PointD(Double.parseDouble(xandy[0]), Double.parseDouble(xandy[1])));\n }\n PointD[] vals2 = new PointD[vals.size()];\n for (int x = 0; x < vals.size(); x++) {\n vals2[x] = vals.get(x);\n }\n return vals2;\n }", "public double[] getAsDoubles() {\n return (double[])data;\n }", "public double[] coeff();", "public double[] getArray(){\n\t\t\treturn anArray; //FAIL\n\t\t}", "public double[] getNormal(int index){\n Node3D node = mesh.nodes.get(index);\n return calculateMeanNormal(node, node_to_triangle.get(node));\n }", "public int[] getX(){\n \t int[] arr = new int[12];\n \t double[] arrx = getXLocal();\n \t double[] arry = getYLocal();\n \t for (int i=0; i<getNumOfSides(); i++){\n \t\t arr[i]= (int) Math.round(arrx[i]*Math.cos(getTheta())\n \t\t-arry[i]*Math.sin(getTheta())+getXc());\n \t }\n \t return arr;}", "private static double[] toArray(ArrayList<Double> dbls) {\n double[] r = new double[dbls.size()];\n int i = 0;\n for( double d:dbls ) r[i++] = d;\n return r;\n }", "@Override\n public Point2D.Double point(int i, double t, double[] xpoints, double[] ypoints) {\n double px = 0;\n double py = 0;\n for (int j = 0; j <= 3; j++) {\n px += b(j, t) * xpoints[i + j];\n py += b(j, t) * ypoints[i + j];\n }\n return new Point2D.Double(px, py);\n }", "@Override\n\tpublic double[] getDx() {\n\t double object[] = new double[2];\n\t for(int i = 0; i < x.length; i++){\n\t object[0] += theta[0] + theta[1] * x[i] - y[i];\n\t object[1] += (theta[0] + theta[1] * x[i] - y[i])*x[i];\n\t }\n\t theta[0] -= eta * object[0];\n\t theta[1] -= eta * object[1];\n\n\t return theta;\n }", "protected ArrayList<DataToPoint> getToPoints() {\n\t\treturn toPoints.stream().map(e -> e.toPoint)\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\n\t}", "public int[] getHilbertArrayList( int[][] data )\n {\n int[] curve = new int[ data.length * data.length ];\n\n for( int i=0; i<data.length; i++ )\n {\n for( int j=0; j<data[ i ].length; j++ )\n {\n curve[ getHilbertDistance( i, j, data.length ) ] = data[ i ][ j ];\n }\n }\n\n return curve;\n }", "public Vecteur[] getPoints() {\n Vecteur[] points = {this.OA, this.OB};\n return points;\n }", "@Override\n\tpublic double[] getCoordinates() {\n\t\tdouble[] coordinates = { x1, y2, x2, y1 };\n\t\treturn coordinates;\n\t}", "public String[][] getDoubleStrings() {\n int numPoints = getNumPoints();\n String[][] ret = new String[numPoints][dimensions];\n\n for (int i = 0; i < numPoints; i++) {\n double[] tempPoint = getPoint(i).getVector();\n\n for (int j = 0; j < tempPoint.length; j++) {\n ret[i][j] = Double.toString(tempPoint[j]);\n }\n }\n\n return ret;\n }", "public Vector2f[] getNormalisedVertexPositions() {\n Vertex3D[] vertices = mesh.getModel().getVertices();\n // Get Array of X and Y offsets for all vertices\n Vector2f[] vertexPositions = new Vector2f[vertices.length];\n for (int i = 0; i < vertices.length; i++) {\n Vector3f vertexPosition = vertices[i].getPosition();\n vertexPositions[i] = new Vector2f(vertexPosition.getX(), vertexPosition.getY());\n }\n\n // Add vertex positions to position in order to get their OpenGl coordinates\n for (int i = 0; i < vertexPositions.length; i++) {\n vertexPositions[i] = Vector2f.add(position, vertexPositions[i]);\n vertexPositions[i] = Vector2f.divide(\n vertexPositions[i],\n new Vector2f(Window.getSpanX(), Window.getSpanY()));\n }\n\n return vertexPositions;\n }", "public double[] getArray(){\n\t\t\tdouble[] temp = new double[count];\n\t\t\tfor (int i = 0; i < count; i++){\n\t\t\t\ttemp[i] = anArray[i];\n\t\t\t}\n\t\t\treturn temp;\n\t\t}", "public abstract double[] getLowerBound();", "public double[] getValues(Array2D input) {\n\t\treturn listToDArray( getValuesD(input) );\n\t}", "public double[] getData(){\r\n\t\t//make a deeeeeep copy of data\r\n\t\tdouble[] returnData = new double[this.data.length];\r\n\t\t\r\n\t\t//fill with data values\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\treturnData[i] = this.data[i];\r\n\t\t}\r\n\t\t//return a ref to my deep copy\r\n\t\treturn returnData;\r\n\t}", "public double[] getCoordinates() {\n\t\treturn coordinateTools.localToCoordinates(this);\n\t}", "public Position[] ConvertToBezierForm(Position P, Position[] V){\r\n\r\n\t int \ti, j, k, m, n, ub, lb;\t\r\n\t int \trow, column;\t\t/* Table indices\t\t*/\r\n\t Position[] c = new Position[DEGREE+1];\t\t/* V(i)'s - P\t\t\t*/\r\n\t Position[] d = new Position[DEGREE];\t\t/* V(i+1) - V(i)\t\t*/\r\n\t Position[] \tw;\t\t\t/* Ctl pts of 5th-degree curve */\r\n\t double[][] cdTable = new double[3][4];\t\t/* Dot product of c, d\t\t*/\r\n\t double[][] z = {\t/* Precomputed \"z\" for cubics\t*/\r\n\t\t{1.0, 0.6, 0.3, 0.1},\r\n\t\t{0.4, 0.6, 0.6, 0.4},\r\n\t\t{0.1, 0.3, 0.6, 1.0},\r\n\t };\r\n\r\n\r\n\t /*Determine the c's -- these are vectors created by subtracting*/\r\n\t /* point P from each of the control points\t\t\t\t*/\r\n\t for (i = 0; i <= DEGREE; i++) {\r\n\t\t\tc[i] = V2Sub(V[i], P);\r\n\t }\r\n\t /* Determine the d's -- these are vectors created by subtracting*/\r\n\t /* each control point from the next\t\t\t\t\t*/\r\n\t for (i = 0; i <= DEGREE - 1; i++) { \r\n\t\t\td[i] = V2ScaleII(V2Sub(V[i+1], V[i]), 3.0);\r\n\t }\r\n\r\n\t /* Create the c,d table -- this is a table of dot products of the */\r\n\t /* c's and d's\t\t\t\t\t\t\t*/\r\n\t for (row = 0; row <= DEGREE - 1; row++) {\r\n\t\t\tfor (column = 0; column <= DEGREE; column++) {\r\n\t\t \tcdTable[row][column] = V2Dot(d[row], c[column]);\r\n\t\t\t}\r\n\t }\r\n\r\n\t /* Now, apply the z's to the dot products, on the skew diagonal*/\r\n\t /* Also, set up the x-values, making these \"points\"\t\t*/\r\n\t w = new Position[W_DEGREE + 1];\r\n\t for (i = 0; i <= W_DEGREE; i++) {\r\n\t\t\tw[i] = new Position((double)(i)/W_DEGREE, 0.0);\r\n\t }\r\n\r\n\t n = DEGREE;\r\n\t m = DEGREE-1;\r\n\t for (k = 0; k <= n + m; k++) {\r\n\t\t\tlb = Math.max(0, k - m);\r\n\t\t\tub = Math.min(k, n);\r\n\t\t\tfor (i = lb; i <= ub; i++) {\r\n\t\t \tj = k - i;\r\n\t\t \tw[i+j] = new Position(w[i+j].getX(), w[i+j].getY() + cdTable[j][i] * z[j][i]);\r\n\t\t\t}\r\n\t }\r\n\r\n\t return (w);\r\n\t}", "public double[] getDoubleArray() {\r\n\t\treturn (value.getDoubleArray());\r\n\t}", "public abstract float[] getasFloat(int tuple);", "public abstract List<Point2D> getInterpolatedPoints();", "public ArrayList<Triangle> getOccluderVertexData();", "private static double[] toPrimitive(Double[] objectDoubles) {\n \tdouble[] primDoubles = new double[objectDoubles.length];\n \tfor(int i = 0; i < objectDoubles.length; i++) {\n \t\tprimDoubles[i] = objectDoubles[i].doubleValue();\n \t}\n \t\n \treturn primDoubles;\n }", "public double[] angles()\n {\n double[] res = new double[3];\n PdVector.angle(res, p1, p2, p3);\n return res;\n }", "public static List<List<Integer>> triangleTriplets(List<Integer> data) {\n\t\tList<List<Integer>> output = new ArrayList<>();\n\t\tif (data == null || data.size() < 3) {\n\t\t\treturn output;\n\t\t}\n\t\tdata.sort( (a, b) -> a - b);\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tfor (int j = i + 1; j < data.size(); j++) {\n\t\t\t\tfor (int k = j + 1; k < data.size(); k++) {\n\t\t\t\t\tint a = data.get(i);\n\t\t\t\t\tint b = data.get(j);\n\t\t\t\t\tint c = data.get(k);\n\t\t\t\t\tif (isTriangle(a, b, c)) {\n\t\t\t\t\t\toutput.add(Arrays.asList(a, b, c));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}", "public double getPoints()\r\n {\r\n return points;\r\n }", "public double[] ds() {\n double rval[] = new double[size()];\n for (int i = 0; i < rval.length; i++) {\n rval[i] = get(i) == null ? Double.NaN : get(i).doubleValue();\n }\n\n return rval;\n }", "public Vector[] getCardinalPoints(){\r\n\t\tVector[] ret = new Vector[4];\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tret[i] = getPosition().add(new Vector(dx[i] * Tile.SIZE, dy[i] * Tile.SIZE));\r\n\t\treturn ret;\r\n\t}", "void drawPointArr(Graphics2D g2d, ArrayList<Point2D.Double> l){\r\n\t\tfor(int i=0; i<l.size()-1; i++){\r\n\t\t\tLine2D.Double line=new Line2D.Double(l.get(i), l.get(i+1));\r\n\t\t\tg2d.draw(line);\r\n\t\t}\r\n\r\n\t}", "public double[] asArray() {\n final double[] result = new double[COMPONENTS];\n asArray(result);\n return result;\n }", "public static double[] getXVector(double[][] arr)\n\t{\n\t\tdouble[] temp = new double[arr.length];\n\n\t\tfor(int i=0; i<temp.length; i++)\n\t\t\ttemp[i] = arr[i][0];\n\n\t\treturn temp;\t\t\n\t}", "public double[] getDoubles()\r\n {\r\n return resultDoubles;\r\n }" ]
[ "0.6604535", "0.6602685", "0.6579462", "0.6545369", "0.6521145", "0.63004875", "0.6300247", "0.62512285", "0.6173004", "0.6064725", "0.60131663", "0.5972956", "0.59534234", "0.59315944", "0.5916257", "0.59022605", "0.58613575", "0.5859262", "0.58536565", "0.58410066", "0.5818705", "0.5818302", "0.5800876", "0.5796873", "0.5788076", "0.57878387", "0.5750743", "0.57142025", "0.5712234", "0.56962085", "0.5692803", "0.5674852", "0.5659138", "0.5645192", "0.5644615", "0.5638874", "0.5588128", "0.5579351", "0.5578923", "0.55768096", "0.55710495", "0.5562168", "0.5560897", "0.5559143", "0.55321556", "0.5522449", "0.5507663", "0.55049646", "0.54978305", "0.5493783", "0.5491808", "0.5490269", "0.54748744", "0.5470547", "0.5457946", "0.54541504", "0.5444654", "0.54259586", "0.5421533", "0.54021484", "0.539461", "0.5393424", "0.5392279", "0.53881687", "0.53867555", "0.53758776", "0.53683966", "0.5354053", "0.53531116", "0.53510165", "0.53508997", "0.53488076", "0.53365594", "0.533653", "0.53326076", "0.5332019", "0.53282434", "0.5325545", "0.532533", "0.53120315", "0.5298574", "0.5292581", "0.52874124", "0.528355", "0.528308", "0.5281475", "0.5281183", "0.5279767", "0.5279603", "0.52753204", "0.5271577", "0.5260323", "0.5251449", "0.52470267", "0.5246284", "0.5246118", "0.5241296", "0.5240569", "0.52379435", "0.5233915" ]
0.5351629
69
reset all of the variables that we need to reset
@Override protected void resetVariables(){ super.resetVariables(); pointUp = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reset() {\n errors.clear();\n variables.clear();\n }", "void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }", "public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variableList.clear();\n\t\tthis.prefixMap.clear();\n\t}", "public void resetVariables() {\n\t\tArrays.fill(variables, 0.0);\n\t}", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "public void reset() {\n\t\tvar.clear();\n\t\tname.clear();\n\t}", "private void reset() {\n }", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "private void resetAll() // resetAll method start\n\t{\n\t\theader.reset();\n\t\tdebit.reset();\n\t\tcredit.reset();\n\t}", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "protected void reset() {\n\t\t}", "public static void variableReset() {\n\t\tLogic.pieceJumped = 0;\n\t\tLogic.bool = false;\n\t\tLogic.curComp = null;\n\t\tLogic.prevComp = null;\n\t\tLogic.jumpedComp = null;\n\t\tLogic.ydiff = 0;\n\t\tLogic.xdiff = 0;\n\t\tLogic.jumping = false;\n\t\tmultipleJump = false;\n\t\t\n\t}", "public void resetVariables() {\n this.name = \"\";\n this.equipLevel = 0;\n this.cpuCost = 0;\n this.bankDamageModifier = 1.0f;\n this.redirectDamageModifier = 1.0f;\n this.attackDamageModifier = 1.0f;\n this.ftpDamageModifier = 1.0f;\n this.httpDamageModifier = 1.0f;\n this.attackDamage = 0.0f;\n this.pettyCashReducePct = 1.0f;\n this.pettyCashFailPct = 1.0f;\n this.dailyPayChangeFailPct = 1.0f;\n this.dailyPayChangeReducePct = 1.0f;\n this.stealFileFailPct = 1.0f;\n this.installScriptFailPct = 1.0f;\n }", "public void resetValues() {\n\t\tJavaValue[] publicJavaValues = this.publicVariables.values().toArray(new JavaValue[this.publicVariables.size()]);\n\t\tJavaValue[] privateJavaValues = this.privateVariables.values().toArray(new JavaValue[this.privateVariables.size()]);\n\n\t\tfor(int i = 0; i < publicJavaValues.length; i++) {\n\t\t\tpublicJavaValues[i].reset();\n\t\t}\n\n\t\tfor(int i = 0; i < privateJavaValues.length; i++) {\n\t\t\tprivateJavaValues[i].reset();\n\t\t}\n\t}", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void reset () {}", "private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }", "public void reset() {\n\n\t}", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "void reset()\n {\n reset(values);\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "@Override\n public void resetAllValues() {\n }", "public void reset() {\n\r\n\t}", "private void reset() {\n \t resultCount =0;\n\t searchStatus = 0;\n\t resultSetStatus = 0;\n\t errorCode = 0;\n\t errorMsg = \"None provided\";\n\t Present = null;\n\t dbResults = null;\n oclc7= null;\n oclc8 = null;\n requestLength=0;\n responseLength=0;\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }", "public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}", "public final synchronized void reset() {\n\t\tnumTypes = numCoords = 0;\n\t}", "public void resetAll() {\n reset(getAll());\n }", "private void resetParameters() {\n\t\twKeyDown = false;\n\t\taKeyDown = false;\n\t\tsKeyDown = false;\n\t\tdKeyDown = false;\n\t\tmouseDown = false;\n\t\t// reset mouse\n\t\tMouse.destroy();\n\t\ttry {\n\t\t\tMouse.create();\n\t\t} catch (LWJGLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t// resets the player's hp\n\t\tplayer.setHP(1000);\n\t\t// resets the player's position\n\t\tplayer.setX(initPlayerX);\n\t\tplayer.setY(initPlayerY);\n\t\t// the game is not over\n\t\tgameOver = false;\n\t\tstopDrawingPlayer = false;\n\t\tgameWon = false;\n\t\t// clears the entity arraylists\n\t\tenemy.clear();\n\t\tbullet.clear();\n\t\tenemy_bullet.clear();\n\t\tpowerup.clear();\n\t\texplosion.clear();\n\t\t// cash and totalCash are 0\n\t\tcash = 0;\n\t\ttotalCash = 0;\n\t\t// bullet is activated, upgraded weapons are not activated\n\t\tbulletShot = true;\n\t\tdoubleShot = false;\n\t\tlaserShot = false;\n\t\t// boss\n\t\tbossSpawned = false;\n\t\tbossMovement = 3;\n\t\tbossExplosionNum = 0;\n\t}", "void Reset() {\n lq = 0;\n ls = 0;\n }", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "public void resetAll() {\n this.mEntryAlias = null;\n this.mEntryUid = -1;\n this.mKeymasterAlgorithm = -1;\n this.mKeymasterPurposes = null;\n this.mKeymasterBlockModes = null;\n this.mKeymasterEncryptionPaddings = null;\n this.mKeymasterSignaturePaddings = null;\n this.mKeymasterDigests = null;\n this.mKeySizeBits = 0;\n this.mSpec = null;\n this.mRSAPublicExponent = null;\n this.mEncryptionAtRestRequired = false;\n this.mRng = null;\n this.mKeyStore = null;\n }", "public static void resetAll() {\n uniqueBigDecimal = new BigDecimal(\"100\");\n oneBigDecimal = new BigDecimal(1);\n uniqueBigInteger = new BigInteger(\"100\");\n oneBigInteger = new BigInteger(\"1\");\n uniqueByte = new Byte(\"0\");\n uniqueFloat = new Float(100);\n uniqueDouble = new Double(100);\n uniqueInteger = new Integer(100);\n uniqueLong = new Long(\"100\");\n uniqueShort = new Short(\"10\");\n uniqueCal = null;\n // charPosition = 0;\n // lastString = new int[NUM_CHARS];\n }", "void reset() ;", "public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}", "public synchronized void reset() {\n }", "private void resetAll() {\n\t\tif(mu1 != null)\n\t\t\tmodel.getView().reset(mu1);\n\t\tmu1 = null;\n\t\t\n\t\tif(mu2 != null)\n\t\t\tmodel.getView().reset(mu2);\n\t\tmu2 = null;\n\t\t\n\t\tif(functionWord != null)\n\t\t\tmodel.getView().reset(functionWord);\n\t\tfunctionWord = null;\n\t\t\n\t\tmodel.getSGCreatingMenu().reset();\n\t}", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\n\t}", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "public void reset() {\r\n textArea1.appendText(\"\\n --- Setting all \" + name + \" variables to null\");\r\n textArea1.setForeground(Color.red);\r\n \r\n\r\n Enumeration enum2 = variableList.elements() ;\r\n while(enum2.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum2.nextElement() ;\r\n temp.setValue(null) ;\r\n }\r\n }", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "public void reset() {\n\n }", "public static void reset()\r\n {\r\n errorCount = 0;\r\n warningCount = 0;\r\n }", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "public void resetLocals()\n {\n maxLocalSize = 0;\n localCnt = localIntCnt = localDoubleCnt = localStringCnt = localItemCnt = 0;\n locals = lastLocal = new LocalVariable(null, null, null);\n }", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}" ]
[ "0.8379351", "0.823298", "0.8182319", "0.8133742", "0.810848", "0.8026295", "0.8001973", "0.79761225", "0.79655576", "0.79603237", "0.7942287", "0.7942036", "0.79112315", "0.7871278", "0.7811741", "0.7803175", "0.7796545", "0.77705634", "0.7768698", "0.7758958", "0.775697", "0.7749894", "0.7749894", "0.7749894", "0.7749894", "0.77478683", "0.7744068", "0.7740232", "0.7739915", "0.7725641", "0.7723471", "0.7723471", "0.77222526", "0.7685139", "0.7682379", "0.7667542", "0.7667542", "0.7667542", "0.7667542", "0.7659793", "0.7639419", "0.7633994", "0.763115", "0.76209927", "0.7619226", "0.76182556", "0.7617856", "0.7597599", "0.7591907", "0.7588753", "0.7583586", "0.75693417", "0.75659627", "0.75612986", "0.75584114", "0.75544274", "0.7553784", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7543017", "0.7522555", "0.7519374", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7516894", "0.7514802", "0.7507944", "0.7506407", "0.75007635", "0.75007635", "0.75007635", "0.75007635" ]
0.0
-1
Created by zengchao on 2020/8/17.
public interface BookMapper { List<Book> selectList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\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 comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {}", "Petunia() {\r\n\t\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() { \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "private UsineJoueur() {}", "public void mo38117a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo4359a() {\n }", "public void mo6081a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "Consumable() {\n\t}", "@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 public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "private MApi() {}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private TMCourse() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}" ]
[ "0.60354203", "0.59415275", "0.5615929", "0.5615929", "0.56067944", "0.55847865", "0.55435777", "0.5519293", "0.55065393", "0.54905", "0.5488055", "0.54860723", "0.5473072", "0.5458288", "0.5457532", "0.5457532", "0.5457532", "0.5457532", "0.5457532", "0.5457532", "0.54560834", "0.5453525", "0.5452192", "0.5426389", "0.54263633", "0.5403229", "0.5393706", "0.5389235", "0.53799367", "0.5374051", "0.5368218", "0.5347138", "0.5346653", "0.53168714", "0.53168714", "0.5311769", "0.53065497", "0.530636", "0.52808964", "0.52808964", "0.52808964", "0.5274544", "0.5273147", "0.52726454", "0.52726454", "0.5267649", "0.5264426", "0.5264091", "0.5263617", "0.52540874", "0.5247162", "0.5247162", "0.5247162", "0.5247162", "0.5247162", "0.5242998", "0.52386516", "0.523441", "0.52236015", "0.52152616", "0.52152616", "0.52152616", "0.521031", "0.5205728", "0.52043813", "0.5198585", "0.51964897", "0.51929724", "0.51882106", "0.517176", "0.517176", "0.517176", "0.517176", "0.517176", "0.517176", "0.517176", "0.51694", "0.51688933", "0.51688933", "0.5159957", "0.5159957", "0.5159957", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51557976", "0.51532817", "0.51504105", "0.5133039", "0.5133039", "0.5133039", "0.5130584", "0.51179916", "0.5117267", "0.5112014" ]
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static MoreAppsFragment newInstance(String param1, String param2) { MoreAppsFragment fragment = new MoreAppsFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public CuartoFragment() {\n }", "public StintFragment() {\n }", "public ExploreFragment() {\n\n }", "public RickAndMortyFragment() {\n }", "public FragmentMy() {\n }", "public LogFragment() {\n }", "public FeedFragment() {\n }", "public HistoryFragment() {\n }", "public HistoryFragment() {\n }", "public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }", "public WkfFragment() {\n }", "public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment(){}", "public WelcomeFragment() {}", "public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }", "public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public progFragment() {\n }", "public HeaderFragment() {}", "public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }", "public EmployeeFragment() {\n }", "public Fragment_Tutorial() {}", "public NewShopFragment() {\n }", "public FavoriteFragment() {\n }", "public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }", "public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }", "public CreateEventFragment() {\n // Required empty public constructor\n }", "public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}", "public NoteActivityFragment() {\n }", "public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }", "public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public EventHistoryFragment() {\n\t}", "public HomeFragment() {}", "public PeopleFragment() {\n // Required empty public constructor\n }", "public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public VantaggiFragment() {\n // Required empty public constructor\n }", "public AddressDetailFragment() {\n }", "public ArticleDetailFragment() { }", "public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }", "public RegisterFragment() {\n }", "public EmailFragment() {\n }", "public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }", "public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }", "public ForecastFragment() {\n }", "public FExDetailFragment() {\n \t}", "public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }", "public TripNoteFragment() {\n }", "public ItemFragment() {\n }", "public NoteListFragment() {\n }", "public CreatePatientFragment() {\n\n }", "public DisplayFragment() {\n\n }", "public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment() {\n\n }", "public BackEndFragment() {\n }", "public CustomerFragment() {\n }", "public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public static Fragment newInstance() {\n return new SettingsFragment();\n }", "public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }", "public PeersFragment() {\n }", "public TagsFragment() {\n }", "public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }", "public HomeSectionFragment() {\n\t}", "public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }", "public PersonDetailFragment() {\r\n }", "public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public VehicleFragment() {\r\n }", "public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}", "public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }", "public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public PlaylistFragment() {\n }", "public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }", "public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }" ]
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.6646188", "0.66410166", "0.6640725", "0.6634425", "0.66188246", "0.66140765", "0.6608169", "0.66045964", "0.65977716", "0.6592119", "0.659137", "0.65910816", "0.65830594", "0.65786606", "0.6562876", "0.65607685", "0.6557126", "0.65513307", "0.65510213", "0.65431285", "0.6540448", "0.65336084", "0.6532555", "0.6528302", "0.6524409", "0.652328", "0.6523149", "0.6516528", "0.65049976", "0.6497274", "0.6497235", "0.64949715", "0.64944136", "0.6484968", "0.6484214", "0.64805835", "0.64784926", "0.64755154", "0.64710265", "0.6466466", "0.6457089", "0.645606", "0.6454554", "0.6452161", "0.64520335", "0.6450325", "0.64488834", "0.6446765", "0.64430225", "0.64430225", "0.64430225", "0.64420956", "0.6441306", "0.64411277", "0.6438451", "0.64345145", "0.64289486", "0.64287597", "0.6423755", "0.64193285", "0.6418699", "0.6414679", "0.6412867", "0.6402168", "0.6400724", "0.6395624", "0.6395109", "0.6391252", "0.63891554", "0.63835025", "0.63788056", "0.63751805", "0.63751805", "0.63751805", "0.6374796", "0.63653135", "0.6364529", "0.6360922", "0.63538784", "0.6351111", "0.635067" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { moreAppsView = inflater.inflate(R.layout.fragment_more_apps, container, false); initToolBar(); moreAppsRecyclerView = (RecyclerView) moreAppsView.findViewById(R.id.more_apps_list); MoreAppsAdapter moreAppsAdapter = new MoreAppsAdapter(getActivity(), getData(), getURLHash()); moreAppsRecyclerView.setAdapter(moreAppsAdapter); moreAppsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); RecyclerView.ItemDecoration itemDecoration = new DividerItemDecoration(getActivity(), LinearLayoutManager.VERTICAL); moreAppsRecyclerView.addItemDecoration(itemDecoration); moreAppsRecyclerView.setItemAnimator(new DefaultItemAnimator()); return moreAppsView; }
{ "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
TODO Autogenerated method stub
@Override public Employee findById(int id) { List<Employee> employeeList= listEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList()); return (Employee)employeeList.get(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 List<Employee> findAllEmployee() { 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
rescale coordinates and turn on animation mode
public static void main(String[] args) { StdDraw.setXscale(0, 32768); StdDraw.setYscale(0, 32768); StdDraw.show(0); StdDraw.setPenRadius(0.005); // make the points a bit larger // read in the input String filename = args[0]; In in = new In(filename); int N = in.readInt(); Point[] pList = new Point[N]; for (int i = 0; i < N; i++) { int x = in.readInt(); int y = in.readInt(); Point p = new Point(x, y); p.draw(); pList[i] = p; } Arrays.sort(pList); // create an auxiliary array for sorting points by slope Point[] aux = new Point[N]; for (int i = 0; i < N - 3; i++) { for (int j = i; j < N; j++) { aux[j] = pList[j]; } // sort points other than i by slope Arrays.sort(aux, i + 1, N, aux[i].SLOPE_ORDER); int countSameSlope = 1; String result = aux[i] + " -> "; for (int k = i + 1; k < N - 1; k++) { if (Double.compare(aux[i].slopeTo(aux[k]), aux[i].slopeTo(aux[k + 1])) == 0) { result += aux[k] + " -> "; countSameSlope++; } else if (countSameSlope >= 3) { result += aux[k]; StdOut.println(result); aux[i].drawTo(aux[k]); result = aux[i] + " -> "; countSameSlope = 1; } else { result = aux[i] + " -> "; countSameSlope = 1; } } // handle the case in which the last 3 or more points are collinear // with point i if (countSameSlope >= 3) { result += aux[N - 1]; StdOut.println(result); aux[i].drawTo(aux[N - 1]); } } // display to screen all at once StdDraw.show(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rescale() {\n this.affineTransform = AffineTransform.getScaleInstance(this.zoom,\n this.zoom);\n int width = (int) ((this.board.getWidth() * 32) * this.zoom);\n int height = (int) ((this.board.getHeight() * 32) * this.zoom);\n this.setPreferredSize(new Dimension(width, height));\n this.repaint();\n }", "public void rescale()\r\n\t{\n\t}", "@Override\n public void onAnimationEnd(Animator animation) {\n ViewGroup.LayoutParams lp = LifeLabActivity.this.anim_view.getLayoutParams();\n lp.width = view.getWidth();\n lp.height = view.getHeight();\n LifeLabActivity.this.anim_view.setLayoutParams(lp);\n LifeLabActivity.this.anim_view.setX(view.getX());\n LifeLabActivity.this.anim_view.setY(view.getY());\n LifeLabActivity.this.anim_view.setVisibility(View.VISIBLE);\n LifeLabActivity.this.anim_view.post(new Runnable() {\n @Override\n public void run() {\n AnimatorSet as = new AnimatorSet();\n ValueAnimator x = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"x\", LifeLabActivity.this.anim_view.getX(), 0);\n ValueAnimator y = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"y\", LifeLabActivity.this.anim_view.getY(), 0);\n float x0 = LifeLabActivity.this.anim_view.getScaleX();\n float y0 = LifeLabActivity.this.anim_view.getScaleY();\n float sx = (float) Utils.getScreenWidthPx(LifeLabActivity.this) / (float) LifeLabActivity.this.anim_view.getWidth();\n ValueAnimator scalex = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"scaleX\", x0, x0 * sx * 2);\n //Log.d(TAG, String.format(\"run X: %f, %f\", x0, x0 * sx));\n float sy = (float) Utils.getScreenHeightPx(LifeLabActivity.this) / (float) LifeLabActivity.this.anim_view.getHeight();\n //Log.d(TAG, String.format(\"screenH: %d, viewH:%d\", Utils.getScreenHeightPx(LifeLabActivity.this), LifeLabActivity.this.anim_view.getHeight()));\n //Log.d(TAG, String.format(\"y0: %f, sy: %f, y1: %f\", y0, sy, y0 * sy));\n ValueAnimator scaley = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"scaleY\", y0, y0 * sy * 6);\n //Log.d(TAG, String.format(\"run Y: %f, %f\", x0, y0 * sy));\n as.play(x).with(scalex).with(y).with(scaley);\n //as.play(x).with(y);\n as.setDuration(300);\n as.addListener(new Animator.AnimatorListener() {\n @Override\n public void onAnimationStart(Animator animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animator animation) {\n View x = LifeLabActivity.this.anim_view;\n //Log.d(TAG, String.format(\"onAnimationEnd: %f %f %d %d\", x.getX(), x.getY(), x.getWidth(), x.getHeight()));\n Intent intent = new Intent(LifeLabActivity.this, LifeLabItemActivity.class);\n intent.putExtra(LifeLabItemActivity.LIFELAB_COLLECTION, lc);\n LifeLabActivity.this.startActivityForResult(intent, 0);\n }\n\n @Override\n public void onAnimationCancel(Animator animation) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animator animation) {\n\n }\n });\n as.start();\n\n }\n });\n }", "private void autoZoom(boolean animate) {\n //auto-zoom\n float scale = getNewScale();\n PointF center = getCenterOfCropRect();\n if (animate) {\n animateScaleAndCenter(scale, center)\n .withDuration(300)\n .withInterruptible(false)\n .start();\n } else {\n setScaleAndCenter(scale, center);\n }\n }", "@Override\n\tpublic void anim(float pos) {\n\t\tif (isReadyAnim(pos)) {\n\t\t\tfloat value = interpolator(pos);\n\t\t\tview.setScaleX(value);\n\t\t\tview.setScaleY(value);\n\t\t}\n\t}", "public void resetTransform() {\n this.mView.setScaleX(1.0f);\n this.mView.setScaleY(1.0f);\n this.mView.setTranslationX(0.0f);\n this.mView.setTranslationY(0.0f);\n }", "private void updateScale() {\n target.setScaleX(scaleValue);\n target.setScaleY(scaleValue);\n }", "private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }", "public void refreshPosition() {\n\n this.setTransform(getTransform());\n }", "void reconfigure() {\n computePosition(_primaryPlot.getScreenCoords(findCurrentCenterPoint()), false);\n }", "@Override\n\tpublic void renderAnimation(RenderEvent event, int x, int y)\n\t{\n\t\t// Update the current frame\n\t\tselectFrame();\n\t\tif (isFinished)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t// Get the actual image\n\t\tBufferedImage img =\n\t\t\t\tGraphicsManager.getResManager().getRes(currFramePath);\n\t\tint imgWidth = this.imgWidth;\n\t\tint imgHeight = this.imgHeight;\n\t\t// Width needs to be scaled\n\t\tif (specialWidth == SpecialDimension.SCALE)\n\t\t{\n\t\t\t// Use both original image dimensions\n\t\t\tif (specialHeight == SpecialDimension.SCALE || specialHeight == SpecialDimension.ORIGINAL)\n\t\t\t{\n\t\t\t\timgWidth = img.getWidth();\n\t\t\t\timgHeight = img.getHeight();\n\t\t\t}\n\t\t\t// Scale only the width\n\t\t\telse\n\t\t\t{\n\t\t\t\timgWidth = imgHeight * img.getWidth() / img.getHeight();\n\t\t\t}\n\t\t}\n\t\t// Height needs to be scaled\n\t\telse if (specialHeight == SpecialDimension.SCALE)\n\t\t{\n\t\t\t// Use both original image dimensions\n\t\t\tif (specialWidth == SpecialDimension.ORIGINAL)\n\t\t\t{\n\t\t\t\t\n\t\t\t\timgWidth = img.getWidth();\n\t\t\t\timgHeight = img.getHeight();\n\t\t\t}\n\t\t\t// Scale only the height\n\t\t\telse\n\t\t\t{\n\t\t\t\timgHeight = imgWidth * img.getHeight() / img.getWidth();\n\t\t\t}\n\t\t}\n\t\t// Use the original image width\n\t\telse if (specialWidth == SpecialDimension.ORIGINAL)\n\t\t{\n\t\t\timgWidth = img.getWidth();\n\t\t\t// Use the original image height\n\t\t\tif (specialHeight == SpecialDimension.ORIGINAL)\n\t\t\t{\n\t\t\t\timgHeight = img.getHeight();\n\t\t\t}\n\t\t}\n\t\t// Use the original image height\n\t\telse if (specialHeight == SpecialDimension.ORIGINAL)\n\t\t{\n\t\t\timgHeight = img.getHeight();\n\t\t}\n//\t\tSystem.out.print(\"Original Width:\");\n//\t\tSystem.out.print(img.getWidth());\n//\t\tSystem.out.print(\", Original Height:\");\n//\t\tSystem.out.println(img.getHeight());\n//\t\t// Print special stuff\n//\t\tSystem.out.print(\"Spec. Width:\" + specialWidth.toString());\n//\t\tSystem.out.println(\", Spec. Height:\" + specialHeight.toString());\n//\t\t// Print calculated dims\n//\t\tSystem.out.print(\"Width:\");\n//\t\tSystem.out.print(imgWidth);\n//\t\tSystem.out.print(\", Height:\");\n//\t\tSystem.out.println(imgHeight);\n\t\t// Reset back to actual image size for testing\n\t\timgWidth = img.getWidth();\n\t\timgHeight = img.getHeight();\n\t\t// Draw the current frame\n\t\tif (centerOverCoords)\n\t\t{\n\t\t\tImageDrawer.drawGraphic(\n\t\t\t\t\tevent.getGC(),\n\t\t\t\t\timg,\n\t\t\t\t\tx-imgWidth/2,\n\t\t\t\t\ty-imgHeight/2,\n\t\t\t\t\timgWidth,\n\t\t\t\t\timgHeight\n\t\t\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tImageDrawer.drawGraphic(\n\t\t\t\t\tevent.getGC(),\n\t\t\t\t\timg,\n\t\t\t\t\tx,\n\t\t\t\t\ty,\n\t\t\t\t\timgWidth,\n\t\t\t\t\timgHeight\n\t\t\t\t\t);\n\t\t}\n\t}", "public void setTransform(float a11, float a12, float a21, float a22, float x, float y);", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "public void handle(ActionEvent ae) {\n scaleFactor += 0.1; \n if(scaleFactor > 2.0) scaleFactor = 0.4; \n \n scale.setX(scaleFactor); \n scale.setY(scaleFactor); \n \n }", "public void go_to_scale_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_scale, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "void rescaleIndicators(float magnification) {\n // if cellSize is 1\n boolean regenerate = scaleInterval((float) canvas.getMagnification());\n // System.out.println(\"regenerate = \" + regenerate);\n if (regenerate) {\n if (orient != null && anisotropy != null) {\n generateAreasAndIndicators();\n }\n }\n lastMagnification = magnification;\n }", "private void applyTransform() {\n GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F);\n GlStateManager.translate(offsetX, offsetY - 26, offsetZ);\n }", "@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }", "private void onScaleClick() {\n PropertyValuesHolder scaleXHolder = PropertyValuesHolder.ofFloat(\"scaleX\", 1.5f);\r\n PropertyValuesHolder scaleYHolder = PropertyValuesHolder.ofFloat(\"scaleY\", 1.5f);\r\n Animator scaleAnimator = ObjectAnimator.ofPropertyValuesHolder(\r\n animatedView, scaleXHolder, scaleYHolder);\r\n scaleAnimator.setDuration(animationDuration);\r\n scaleAnimator.setInterpolator(new AccelerateDecelerateInterpolator());\r\n scaleAnimator.start();\r\n }", "public void updateTransform() {\n \t\tif (viewBox != null) {\n \t\t\tOMSVGRect bbox = ((SVGRectElement)viewBox.getElement()).getBBox();\n //\t\t\tGWT.log(\"bbox = \" + bbox.getDescription());\n \t\t\tfloat d = (float)Math.sqrt((bbox.getWidth() * bbox.getWidth() + bbox.getHeight() * bbox.getHeight()) * 0.25) * scale * 2;\n //\t\t\tGWT.log(\"d = \" + d);\n \t\t\n \t\t\t// Compute the actual canvas size. It is the max of the window rect\n \t\t\t// and the transformed bbox.\n \t\t\tfloat width = Math.max(d, windowRect.getWidth());\n \t\t\tfloat height = Math.max(d, windowRect.getHeight());\n //\t\t\tGWT.log(\"width = \" + width);\n //\t\t\tGWT.log(\"height = \" + height);\n \n \t\t\t// Compute the display transform to center the image in the\n \t\t\t// canvas\n \t\t\tOMSVGMatrix m = svg.createSVGMatrix();\n \t\t\tfloat cx = bbox.getCenterX();\n \t\t\tfloat cy = bbox.getCenterY();\n \t\t\tm = m.translate(0.5f * (width - bbox.getWidth()) -bbox.getX(), 0.5f * (height - bbox.getHeight()) -bbox.getY())\n \t\t\t.translate(cx, cy)\n \t\t\t.rotate(angle)\n \t\t\t.scale(scale)\n \t\t\t.translate(-cx, -cy);\n \t\t\t((ISVGTransformable)xformGroup).getTransform().getBaseVal().getItem(0).setMatrix(m);\n \t\t\t((ISVGTransformable)modelGroup.getTwinWrapper()).getTransform().getBaseVal().getItem(0).setMatrix(m);\n //\t\t\tGWT.log(\"m=\" + m.getDescription());\n \t\t\tsvg.getStyle().setWidth(width, Unit.PX);\n \t\t\tsvg.getStyle().setHeight(height, Unit.PX);\n \t\t}\n \t}", "private void controlResized() {\n disposeBackBuffer();\n initializeBackBuffer();\n\n redraw();\n }", "public void beginScaling() {\n xScale = 1.0f;\n yScale = 1.0f;\n }", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }", "private void animateToStartMatrix() {\n\n final Matrix beginMatrix = new Matrix(getImageMatrix());\n beginMatrix.getValues(matrixValues);\n\n //difference in current and original values\n final float xsdiff = startValues[Matrix.MSCALE_X] - matrixValues[Matrix.MSCALE_X];\n final float ysdiff = startValues[Matrix.MSCALE_Y] - matrixValues[Matrix.MSCALE_Y];\n final float xtdiff = startValues[Matrix.MTRANS_X] - matrixValues[Matrix.MTRANS_X];\n final float ytdiff = startValues[Matrix.MTRANS_Y] - matrixValues[Matrix.MTRANS_Y];\n\n ValueAnimator anim = ValueAnimator.ofFloat(0, 1f);\n anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n\n final Matrix activeMatrix = new Matrix(getImageMatrix());\n final float[] values = new float[9];\n\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float val = (Float) animation.getAnimatedValue();\n activeMatrix.set(beginMatrix);\n activeMatrix.getValues(values);\n values[Matrix.MTRANS_X] = values[Matrix.MTRANS_X] + xtdiff * val;\n values[Matrix.MTRANS_Y] = values[Matrix.MTRANS_Y] + ytdiff * val;\n values[Matrix.MSCALE_X] = values[Matrix.MSCALE_X] + xsdiff * val;\n values[Matrix.MSCALE_Y] = values[Matrix.MSCALE_Y] + ysdiff * val;\n activeMatrix.setValues(values);\n setImageMatrix(activeMatrix);\n }\n });\n anim.setDuration(RESET_DURATION);\n anim.start();\n }", "public void updateScale()\n {\n // get scale from world presenter\n s2 = (cam.getScale());\n //Convert to English Miles if appropriate\n if( !SettingsScreen.getUnits() ) s2 *= 0.60934;\n s1 = s2/2;\n repaint();\n }", "@Override\n\tpublic void update() {\n\t\t\n\t\tif(!this.explShowing)\n\t\t{\n\t\t\tx+= dx;\n\t\t\ty+= dy;\n\t\n\t\t\tif(x < 0)\n\t\t\t{\n\t\t\t\tx = 0;\n\t\t\t\tdx = dx *-1;\n\t\t\t}\n\t\t\telse\n\t\t\tif(x + w > MainGame.getInstance().X_WORLD_END)\n\t\t\t{\n\t\t\t\tx = MainGame.getInstance().X_WORLD_END - w ;\n\t\t\t\tdx = dx *-1;\t\n\t\t\t}\n\t\n\t\t\tif(y < 0)\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t\telse\n\t\t\tif(y + h > MainGame.getInstance().Y_WORLD_END)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t\t\n\t\ts.update();\n\t\n\t\tif(this.explShowing)\n\t\t{\n\t\t\tif(expl.isHasFinished())\n\t\t\t{\n\t\t\t\texplShowing = false;\n\t\t\t\ts = this.normalImage;\n\t\t\t\tthis.x = this.xStart;\n\t\t\t\tthis.y = this.yStart;\n\t\t\t\ts.setX(this.xStart);\n\t\t\t\ts.setY(this.yStart);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//s.setX(x);\n\t\t//s.setY(y);\n\t\t\n\t\tthis.rect.setFrame(getX(),getY(),getW(),getH());\t\n\t}", "@Override public void update(float dt)\n\t{\n\t\tthis.setScale((this.getScale().getX() + 0.1f) * 0.99f, (this.getScale().getY() + 0.1f) * 0.99f);\n\n\n\t}", "@Override\n\tpublic void handleScale(float scale, int moveYDistance) {\n\t\t scale = 0.6f + 0.4f * scale;\n//\t ViewCompat.setScaleX(mMoocRefreshView, scale);\n//\t ViewCompat.setScaleY(mMoocRefreshView, scale);\n\t}", "private void reloadCanvas(float scale) {\n mScale = scale;\n updateImageSize(mScale);\n }", "@Override\n protected void executeTween_II(float executionPercent){\n\n attachedTo.applyTransform(scaleTransform);\n }", "private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}", "protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}", "public void animationTrans() {\n float unitAngle;\n if (type == CIRCLE) {\n unitAngle = (float) 360 / defaultCount;\n } else {\n unitAngle = 45f;\n }\n final float oldAngle = mAngle;\n float nAngle = mAngle % actualAngle;\n float gapAngle = (float) (nAngle / unitAngle) - (int) (nAngle / unitAngle);\n\n final float willAngle;\n if (type == CIRCLE) {\n willAngle = (float) ((0.5 - gapAngle) * unitAngle);\n } else {\n if (gapAngle < 0.5) {\n willAngle = (float) ((0 - gapAngle) * unitAngle);\n } else {\n willAngle = (float) ((1 - gapAngle) * unitAngle);\n }\n }\n Animation a = new Animation() {\n\n @Override\n protected void applyTransformation(float interpolatedTime, Transformation t) {\n\n mAngle = oldAngle + willAngle * interpolatedTime;\n\n requestLayout();\n }\n\n @Override\n public boolean willChangeBounds() {\n return true;\n }\n };\n\n a.setDuration(200);\n startAnimation(a);\n }", "public void animate()\n\t{\n\t\tanimation.read();\n\t}", "protected void update() {\n setWidth(gridSize);\n setHeight(gridSize);\n\n switch(direction) {\n case UP:\n setRotate(0.0);\n break;\n case RIGHT:\n setRotate(90.0);\n break;\n case DOWN:\n setRotate(180.0);\n break;\n case LEFT:\n setRotate(270.0);\n break;\n }\n\n setLayoutX(position.getX() * gridSize);\n setLayoutY(position.getY() * gridSize);\n }", "private void characterLocationAnimations() {\n if (animationToggle) {\n changeCharacterLocations();\n }\n animationToggle = !animationToggle;\n }", "@Override\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n renderer.setTimeScaler(renderer.getTimeScaler() + 0.1f);\r\n }", "public void setRescale(double x, double y) {\n scaleX = x;\n scaleY = y;\n System.out.println(\"Rescale \" + x + \" \" + y);\n }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}", "public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}", "public void setAnimation()\n {\n if(speed<0)\n {\n if(animationCount % 4 == 0)\n animateLeft();\n }\n else\n {\n if(animationCount % 4 == 0)\n animateRight();\n }\n }", "@Override\n public void animate() {\n }", "public void setTransform(AffineTransform transform)\n/* */ {\n/* 202 */ AffineTransform old = getTransform();\n/* 203 */ this.transform = transform;\n/* 204 */ setDirty(true);\n/* 205 */ firePropertyChange(\"transform\", old, transform);\n/* */ }", "private void reloadCanvas() {\n reloadCanvas(1f);\n }", "public void updateAnimation() {\n\t\tif (anim < 1000) {\n\t\t\tanim++;\n\t\t} else anim = 0;\n\t}", "private void setView( boolean reset_zoom )\n {\n float azimuth = getAzimuthAngle();\n float altitude = getAltitudeAngle();\n float distance = getDistance();\n\n float r = (float)(distance * Math.cos( altitude * Math.PI/180.0 ));\n\n float x = (float)(r * Math.cos( azimuth * Math.PI/180.0 ));\n float y = (float)(r * Math.sin( azimuth * Math.PI/180.0 ));\n float z = (float)(distance * Math.sin( altitude * Math.PI/180.0 ));\n\n float vrp[] = getVRP().get();\n \n setCOP( new Vector3D( x + vrp[0], y + vrp[1], z + vrp[2] ) );\n\n apply( reset_zoom );\n }", "public void animate() {\n // change our angle of view\n mRenderer.setAngle(mRenderer.getAngle() + 1.2f);\n\n if (mCurrentAktieCubeLayer == null) {\n int layerID = mRandom.nextInt(9);\n mCurrentAktieCubeLayer = mAktieCubeLayers[layerID];\n mCurrentLayerPermutation = mLayerPermutations[layerID];\n mCurrentAktieCubeLayer.startAnimation();\n boolean direction = mRandom.nextBoolean();\n int count = mRandom.nextInt(3) + 1;\n\n count = 1;\n direction = false;\n mCurrentAngle = 0;\n if (direction) {\n mAngleIncrement = (float)Math.PI / 50;\n mEndAngle = mCurrentAngle + ((float)Math.PI * count) / 2f;\n } else {\n mAngleIncrement = -(float)Math.PI / 50;\n mEndAngle = mCurrentAngle - ((float)Math.PI * count) / 2f;\n }\n }\n\n mCurrentAngle += mAngleIncrement;\n\n if ((mAngleIncrement > 0f && mCurrentAngle >= mEndAngle) ||\n (mAngleIncrement < 0f && mCurrentAngle <= mEndAngle)) {\n mCurrentAktieCubeLayer.setAngle(mEndAngle);\n mCurrentAktieCubeLayer.endAnimation();\n mCurrentAktieCubeLayer = null;\n\n // adjust mPermutation based on the completed layer rotation\n int[] newPermutation = new int[27];\n for (int i = 0; i < 27; i++) {\n newPermutation[i] = mPermutation[mCurrentLayerPermutation[i]];\n }\n mPermutation = newPermutation;\n updateLayers();\n\n } else {\n mCurrentAktieCubeLayer.setAngle(mCurrentAngle);\n }\n }", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "public void applyTransform() {\n\t\tglRotatef(xaxisrot, 1.0f, 0.0f, 0.0f);\n\t\tglRotatef(yaxisrot, 0.0f, 1.0f, 0.0f);\n\t\tglRotatef(tilt, 0.0f, 0.0f, 1.0f);\n\t\tglTranslatef(-pos.geti(), -pos.getj(), -pos.getk());\n\t}", "private final void m48032c(boolean z) {\n clearAnimation();\n int selectColor = z ? getSelectColor() : getUnselectedColor();\n AnimatorListener a = mo11151a(z);\n z = z ? true : true;\n getViewToAnimate().setColorFilter(selectColor, Mode.SRC_ATOP);\n ViewPropertyAnimator animate = animate();\n animate.scaleX(z);\n animate.scaleY(z);\n C2668g.a(animate, \"animation\");\n animate.setInterpolator((TimeInterpolator) this.f38948b);\n if (a != null) {\n animate.setListener(a);\n }\n animate.start();\n }", "public void updateTransformMatrix(float[] fArr) {\n boolean z;\n float f;\n float f2;\n boolean z2 = true;\n if (!this.mVideoStabilizationCropped || !ModuleManager.isVideoModule()) {\n f2 = 1.0f;\n f = 1.0f;\n z = false;\n } else {\n f2 = MOVIE_SOLID_CROPPED_X * 1.0f;\n f = MOVIE_SOLID_CROPPED_Y * 1.0f;\n z = true;\n }\n if (this.mNeedCropped) {\n f2 *= this.mScaleX;\n f *= this.mScaleY;\n z = true;\n }\n if (this.mDisplayOrientation == 0) {\n z2 = z;\n }\n if (z2) {\n Matrix.translateM(fArr, 0, 0.5f, 0.5f, 0.0f);\n Matrix.rotateM(fArr, 0, (float) this.mDisplayOrientation, 0.0f, 0.0f, 1.0f);\n Matrix.scaleM(fArr, 0, f2, f, 1.0f);\n Matrix.translateM(fArr, 0, -0.5f, -0.5f, 0.0f);\n }\n }", "public void setTransform(Transform transform);", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "private void setAnimation(View viewToAnimate, int position) {\n if (position > lastPosition) {\n ScaleAnimation anim = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n anim.setDuration(new Random().nextInt(501));//to make duration random number between [0,501)\n viewToAnimate.startAnimation(anim);\n lastPosition = position;\n }\n }", "protected void updateScales() {\n hscale = 1f;\n vscale = 1f;\n viewData.setHscale(hscale);\n viewData.setVscale(vscale);\n }", "@FXML\n void zInPressed(ActionEvent event) {\n\t\tcanvas.setScaleX(canvas.getScaleX()*1.1);\n\t\tcanvas.setScaleY(canvas.getScaleY()*1.1);\n }", "private void toggleResizeMode() {\n\n CURRENT_RESIZE_MODE = CURRENT_RESIZE_MODE + 1;\n if (CURRENT_RESIZE_MODE >= RESIZE_MODE.size()) {\n CURRENT_RESIZE_MODE = 0;\n }\n AppPref.getInstance().setResizeMode(CURRENT_RESIZE_MODE);\n simpleExoPlayerView.setResizeMode((Integer) RESIZE_MODE.keySet().toArray()[CURRENT_RESIZE_MODE]);\n btn_screen.setImageResource(RESIZE_MODE.get(CURRENT_RESIZE_MODE));\n }", "@Override\n public void transformCanvas(Canvas canvas, float percentOpen) {\n float scale = (float) (1 - percentOpen * 0.25);\n canvas.scale(scale, scale, 0, canvas.getHeight() / 2);\n }", "@Override\r\n\t\t \t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t \t\t\t\t webview.startAnimation(MyAnimations.getScaleAnimation(0.0f,\r\n\t\t \t\t\t\t\t\t1.0f, 1.0f, 1.0f, 300));\r\n\t\t \t\t\t}", "@Override\r\n\t\t \t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t \t\t\t\t webview.startAnimation(MyAnimations.getScaleAnimation(0.0f,\r\n\t\t \t\t\t\t\t\t1.0f, 1.0f, 1.0f, 300));\r\n\t\t \t\t\t}", "public void animate() {\n\t\t\n\t\t// already exploded\n\t\tif (disabled > explodeTime) {\n\t\t\treturn;\n\t\t} // if\n\n\t\t// exploding now\n\t\tif (disabled > 0) {\n\t\t\tsphere.explode();\n\t\t\tdisabled++;\n\t\t\treturn;\n\t\t} // if\n\t\t\n\t\t// move sphere and this\n\t\tlocation.add(movement);\n\t\tsphere.move(movement);\n\t\t\n\t\t// bounce back if too far out\n\t\tif(location.distance(new Tuple(0, 0, 0)) > FIELD_SIZE) {\n\t\t\tmovement.scale(-1, -1, -1);\n\t\t} // if\n\t}", "public void onBoundsResolved()\n {\n updateTransform();\n }", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getSource() instanceof Timer) {\r\n if (animatedPos == canvas.size() - 1)\r\n animatedDir = -1;\r\n if (animatedPos == 0)\r\n animatedDir = 1;\r\n animatedPos += animatedDir;\r\n repaint();\r\n }\r\n }", "public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }", "@Override\n\t\t\tpublic void transformCanvas(Canvas canvas, float percentOpen) {\n\t\t\t\tfloat scale = (float) (1 - percentOpen * 0.25);\n canvas.scale(scale, scale, canvas.getWidth()/2, canvas.getHeight()/2); \n\t\t\t}", "void reDraw();", "@Override\r\n public void paint(Graphics g) {\r\n if (canvas.size() > animatedPos && animatedPos >= 0) {\r\n Graphics2D g2d = (Graphics2D)g;\r\n double nw = getSize().getWidth();\r\n double nh = getSize().getHeight();\r\n double w = (double)canvas.get(animatedPos).getWidth();\r\n double h = (double)canvas.get(animatedPos).getHeight();\r\n if (nw == w && nh == h)\r\n g2d.drawImage(canvas.get(animatedPos), null, null);\r\n else {\r\n // Resampling image to real dialog's dimensions\r\n AffineTransform at = new AffineTransform();\r\n at.scale(nw / w, nh / h);\r\n AffineTransformOp scaleOp = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\r\n BufferedImage after = scaleOp.filter(canvas.get(animatedPos), null);\r\n g2d.drawImage(after, null, null);\r\n }\r\n }\r\n }", "public void animate(){\n\n if (ra1.hasStarted() && ra2.hasStarted()) {\n\n// animation1.cancel();\n// animation1.reset();\n// animation2.cancel();\n// animation2.reset();\n gear1Img.clearAnimation();\n gear2Img.clearAnimation();\n initializeAnimations(); // Necessary to restart an animation\n button.setText(R.string.start_gears);\n }\n else{\n gear1Img.startAnimation(ra1);\n gear2Img.startAnimation(ra2);\n button.setText(R.string.stop_gears);\n }\n }", "public void actualiza() {\n //Determina el tiempo que ha transcurrido desde que el Applet inicio su ejecución\n long tiempoTranscurrido = System.currentTimeMillis() - tiempoActual;\n \n //Guarda el tiempo actual\n \t tiempoActual += tiempoTranscurrido;\n \n //Actualiza la animación con base en el tiempo transcurrido\n if (direccion != 0) {\n barril.actualiza(tiempoTranscurrido);\n }\n \n \n //Actualiza la animación con base en el tiempo transcurrido para cada malo\n if (click) {\n banana.actualiza(tiempoTranscurrido);\n }\n \n \n \n \n //Actualiza la posición de cada malo con base en su velocidad\n //banana.setPosY(banana.getPosY() + banana.getVel());\n \n \n \n if (banana.getPosX() != 50 || banana.getPosY() != getHeight() - 100) {\n semueve = false;\n }\n \n if (click) { // si click es true hara movimiento parabolico\n banana.setPosX(banana.getPosX() + banana.getVelX());\n banana.setPosY(banana.getPosY() - banana.getVelY());\n banana.setVelY(banana.getVelY() - gravity);\n }\n \n if (direccion == 1) { // velocidad de las barrils entre menos vidas menor el movimiento\n barril.setPosX(barril.getPosX() - vidas - 2);\n }\n \n else if (direccion == 2) {\n barril.setPosX(barril.getPosX() + vidas + 2);\n }\n }", "private EnlargeCanvas() {\n }", "public void toggleAxes() {\r\n\t\tisAxes = !isAxes;\r\n\t}", "private void scaleFab() {\n fabAdd.animate().alpha(0.0f);\n fabAdd.animate().translationYBy(80f);\n fabAdd.setClickable(false);\n\n textFabAdd.animate().alpha(0.0f);\n textFabAdd.animate().translationYBy(80f);\n\n fabDelete.animate().alpha(0.0f);\n fabDelete.animate().translationYBy(80f);\n fabDelete.setClickable(false);\n\n textFabDelete.animate().alpha(0.0f);\n textFabDelete.animate().translationYBy(80f);\n }", "void startAnimation();", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "private void update() {\n if (_dirty) {\n _fmin = _clips.getClipMin();\n _fmax = _clips.getClipMax();\n _fscale = 256.0f/(_fmax-_fmin);\n _flower = _fmin;\n _fupper = _flower+255.5f/_fscale;\n _dirty = false;\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tAnimation alpha=AnimationUtils.loadAnimation(MainActivity.this,\n\t\t\t\t\t\tR.anim.scale_animation);\n\t\t\t\ttv.startAnimation(alpha);\n\t\t\t}", "@Override\n\tprotected void setupAnimation(View view) {\n\t\tgetAnimatorSet().playTogether(\n\t\t\t\tObjectAnimator.ofFloat(view, \"scaleX\", 0.0f, 0.8f, 1.0f).setDuration(mDuration),\n\t\t\t\tObjectAnimator.ofFloat(view, \"scaleY\", 0.0f, 0.4f, 1.0f).setDuration(mDuration),\n\t\t\t\tObjectAnimator.ofFloat(view, \"alpha\", 0.0f, 1.0f).setDuration(mDuration),\n\t\t\t\tObjectAnimator.ofFloat(view, \"ratation\", 180.0f, 90.0f, 0.0f).setDuration(mDuration*3/2)\n\t\t\t\t);\n\t}", "@Override\n public void transformCanvas(Canvas canvas, float percentOpen) {\n float scale = (float) (percentOpen * 0.25 + 0.75);\n canvas.scale(scale, scale, 0, canvas.getHeight() / 2);\n }", "public void zoomIn() { zoomIn(1); }", "public void transform() {\n final var bounds = getParentBounds();\n transform( bounds.width, bounds.height );\n }", "public void reconstruct ()\n\t{\n\t\tsuper.reconstruct ();\t//calls the superclass's reconstruct method\n\t\txDimension1 = rXD1;\n\t\txDimension2 = rXD2;\n\t\txDimension3 = rXD3;\n\t\t\n\t\tyDimension1 = rYD1;\n\t\tyDimension2 = rYD2;\n\t\tyDimension3 = rYD3;\n\t\t\n\t\tturnInt = 0;\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "@Override\n public void recalculatePositions() { \n \n }", "private void prepareAnimations() {\n scaleTo0Overshot = AnimationUtils.loadAnimation(this, R.anim.scale_100_to_0_anticipate);\n scaleTo0Overshot.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n //do nothing\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n fab.setVisibility(View.GONE);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n //do nothing\n }\n });\n\n scaleTo100Overshot = AnimationUtils.loadAnimation(this, R.anim.scale_0_to_100_overshot);\n scaleTo100Overshot.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n fab.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n //do nothing\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n //do nothing\n }\n });\n }", "public void setScaleY(double aValue)\n{\n if(aValue==getScaleY()) return;\n repaint();\n firePropertyChange(\"ScaleY\", getRSS().scaleY, getRSS().scaleY = aValue, -1);\n}", "@Override\n\t public void update() {\n\t \tif (getNode().getTranslateX() != 0 || getNode().getTranslateY() != 0) {\n\t \t\tsetState(SpriteState.ANIMATION_ACTIVE);\n\t\t \tupdateVelocity();\n\t\t \tgetNode().setTranslateX(getNode().getTranslateX() - getvX());\n\t\t \tgetNode().setTranslateY(getNode().getTranslateY() - getvY());\n\t\t if (getNode().getTranslateX() == 0 && getNode().getTranslateY() == 0) {\n\t\t \t\tsetState(SpriteState.IDLE);\n\t\t }\n\t \t}\n\t \t\n\t getNode().setLayoutX(getxPos());\n\t getNode().setLayoutY(getyPos());\n\t }", "public void zoomOut() { zoomOut(1); }", "void setAnimation(Animation animation) {\n prevHeight = spriteHeight;\n currAnimation = animation;\n spriteWidth = animation.getSpriteWidth();\n spriteHeight = animation.getSpriteHeight();\n }", "@Override\n public void update() {\n// if (anim > 10000) anim = 0;\n// else anim++;\n setMousePossition();\n if (feildIsRightClicked()) {\n renderClicks = true;\n cannon.FireCannon();\n }\n else renderClicks = false;\n for (int i = 0; i < projectiles.size(); i++) {\n if (projectiles.get(i).isRemoved()) projectiles.remove(i);\n else projectiles.get(i).update();\n }\n }", "public void relocateToPoint(boolean isUserClick){\n// System.out.println(\"Scene x: \"+point.getX()+\", y: \"+point.getY());\n// System.out.println(\"Local x: \"+getParent().sceneToLocal(point).getX()+\", y: \"+getParent().sceneToLocal(point).getY());\n// System.out.println(\"Relocate x: \"+(getParent().sceneToLocal(point).getX() - (getWidth() / 2))+\", y: \"+(getParent().sceneToLocal(point).getY() - (getHeight() / 2)));\n// System.out.println(getBoundsInLocal().getWidth());\n// System.out.println(widthProperty());\n\n if (isUserClick) {\n double new_x=getParent().sceneToLocal(x,y).getX();\n double new_y=getParent().sceneToLocal(x,y).getY();\n setX(new_x);\n setY(new_y);\n relocate(\n// (getParent().sceneToLocal(x,y).getX() - (widthCountry / 2)),\n// (getParent().sceneToLocal(x,y).getY() - (heightCountry / 2))\n new_x,new_y\n );\n } else {\n relocate(x,y);\n }\n\n\n }", "public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}", "private void setAnimation(View viewToAnimate, int position) {\n if (position > lastPosition) {\n Animation animation;\n if (position % 2 == 0) {\n animation = AnimationUtils.loadAnimation(getContext(), R.anim.zoom_back_in);\n } else {\n animation = AnimationUtils.loadAnimation(getContext(), R.anim.zoom_forward_in);\n }\n\n viewToAnimate.startAnimation(animation);\n lastPosition = position;\n }\n }", "public void zoomIn() {\r\n \t\tgraph.setScale(graph.getScale() * 1.25);\r\n \t}", "private void fixView(final float newX, final float newY) {\n final float x = this.worldView.getX();\n final float y = this.worldView.getY();\n final float scale = this.worldView.getScale();\n final int width = this.worldView.getMasterImage().getWidth();\n final int height = this.worldView.getMasterImage().getHeight();\n\n float updatedX = Math.max(0, newX);\n float updatedY = Math.max(0, newY);\n\n\n if (width * scale + x > width) {\n updatedX = width - (width * scale);\n }\n if (height * scale + y > height) {\n updatedY = height - (height * scale);\n }\n\n this.worldView.setX(updatedX);\n this.worldView.setY(updatedY);\n\n }", "private void rerunAnimation() {\n transition.playFromStart();\r\n}", "public void scaleAnimetion(SpriteBatch batch){\n }", "private void moveCameraToPolygon( boolean animate ) {\n \t\tif ( this.markers.isEmpty() ) {\n \t\t\treturn;\n \t\t}\n \n \t\tfinal LatLngBounds.Builder builder = LatLngBounds.builder();\n \t\tfor ( GPSLatLng pos : this.area.getPolygon().getPoints() ) {\n \t\t\tbuilder.include( this.convertLatLng( pos ) );\n \t\t}\n \n \t\tthis.moveCameraToPolygon( builder, animate );\n \t}", "@Override\n\tpublic void move_x() {\n\t\tif(mX < 0){\n\t \tdirection *= -1 ;\n\t \t setScale(-1, 1);\n\t }else if (mX > activity.getCameraWidth()-64){\n\t \tdirection *= -1 ;\n\t \tsetScale(1, 1);\n\t } \n\t\tmove_x(direction);\n\t}", "public void mo5968e() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{-((float) C1413m.f5711i.getHeight()), 0.0f}).setDuration(240);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{0.0f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f}).setDuration(240);\n duration.start();\n duration2.start();\n long j = (long) 160;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5438qa, \"alpha\", new float[]{1.0f, 0.0f}).setDuration(j).start();\n duration.addListener(new C1302Xa(this));\n }" ]
[ "0.6619501", "0.6260555", "0.62340385", "0.6104657", "0.61012423", "0.605866", "0.6031077", "0.595504", "0.5927886", "0.59125775", "0.58691466", "0.58380514", "0.580549", "0.5766119", "0.5758096", "0.5755019", "0.5749516", "0.57367617", "0.57134354", "0.57078", "0.57035", "0.57011026", "0.5690128", "0.5679011", "0.56785524", "0.56557804", "0.5637328", "0.5629599", "0.5624682", "0.5619099", "0.5593855", "0.5592325", "0.55904233", "0.5589809", "0.55758876", "0.5573227", "0.5572115", "0.5558076", "0.5543682", "0.549976", "0.5492813", "0.54839975", "0.5483879", "0.54788136", "0.54516196", "0.5448225", "0.54464287", "0.54456943", "0.54438496", "0.5437989", "0.5435609", "0.54328614", "0.5430463", "0.54204005", "0.5418047", "0.54164964", "0.5406328", "0.53987783", "0.5381553", "0.5366109", "0.5366109", "0.53639704", "0.53634953", "0.5359039", "0.5352144", "0.53343296", "0.53303516", "0.5325118", "0.5323316", "0.531948", "0.5312043", "0.5308638", "0.5296492", "0.5295676", "0.5293752", "0.52867436", "0.5284127", "0.52783006", "0.52703875", "0.5263802", "0.5263581", "0.52631485", "0.52589285", "0.52545154", "0.52510846", "0.5232328", "0.5231228", "0.5230858", "0.5221568", "0.52165717", "0.5215707", "0.5214214", "0.52128303", "0.5211489", "0.5201879", "0.52016", "0.51974076", "0.5197093", "0.5195019", "0.51890033", "0.51879233" ]
0.0
-1
create fiveelement Employee array
public static void main(String[] args) { Employee[] employees = new Employee[5]; // initialize array with Employees employees[0] = new SalariedEmployee( "John", "Smith", "111-11-1111", 800.00); employees[1] = new HourlyEmployee( "Karen", "Price", "222-22-2222", 16.75, 40); employees[2] = new CommissionEmployee( "Sue", "Jones", "333-33-3333", 10000, .06); employees[3] = new BasePlusCommissionEmployee( "Bob", "Lewis", "444-44-4444", 5000, .04, 300); employees[4] = new PieceWorker( "Victor", "Figueroa", "555-555-5555", 90, 100); System.out.println("Employees processed polymorphically:\n"); // generically process each element in array employees for (Employee currentEmployee : employees) { System.out.println(currentEmployee); // invokes toString System.out.printf("earned $%,.2f\n\n", currentEmployee.earnings()); } // end for }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CreateUser[] createArrayOfEmployeeNames(){\n\n CreateUser[] arr1 = new CreateUser[5];\n\n for (int i=0; i < arr1.length; i++){\n int age = (int) Math.random()* 100;\n String name = \"John\"+i;\n arr1[i] = new CreateUser(age, name); // create random peop;e w/ ages\n\n }\n\n return arr1;\n }", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "private Employee[] readEmployees() {\n Employee[] employees = null;\n \n try (DataInputStream inputStream = new DataInputStream(new FileInputStream(\"employeeBinary.dat\"))) {\n int numEmployees = inputStream.readInt();\n employees = new Employee[numEmployees];\n \n int length;\n String name;\n String dateString;\n LocalDate date;\n Double salary;\n \n for (int n = 0; n < numEmployees; ++n) {\n length = inputStream.readInt();\n name = readFixedString(length, inputStream);\n length = inputStream.readInt();\n dateString = readFixedString(length, inputStream);\n date = LocalDate.parse(dateString);\n salary = inputStream.readDouble();\n Employee temp = new Employee(name, salary, date);\n employees[n] = temp;\n }\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n return employees;\n }", "@DataProvider(name = \"employee\")\n public Object[][] getEmployee() {\n return new Object[][] {{generateEmployee()}};\n }", "@Deprecated\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee[] getEmployeeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> targetList = new java.util.ArrayList<andrewNamespace.xsdconfig.EmployeeDocument.Employee>();\r\n get_store().find_all_element_users(EMPLOYEE$0, targetList);\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee[] result = new andrewNamespace.xsdconfig.EmployeeDocument.Employee[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public Employee[] getAllEmployees() {\n List<Employee> emps = new ArrayList<>();\n // Iterate through the memory array and find Employee objects\n for (Employee e : employeeArray) {\n if (e != null) {\n emps.add(e);\n }\n }\n return emps.toArray(new Employee[0]);\n }", "public Company(int size) {\n employees = new Person[size];\n }", "public String[][] getVendorEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof VendorCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public Employee[] getAll() {\n\t\tEmployee[] empArray = new Employee[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++) \n\t\t\tempArray[i] = list.get(i);\n\t\t\t\n\t\treturn empArray;\n\t}", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee getEmployeeArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().find_element_user(EMPLOYEE$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public static Employee[] getAllEmployeesDetails(Connection conn) {\n\t\tEmployee [] empArray = new Employee[11];\n//\t\tWe are now creating a second option method and showing all the employees details in it\n\t\ttry {\n\t\t\t// Create the SQL query string which uses the \"getEmployeeCount\" stored procedure in the employee \n\t\t\tString sql = \"CALL getAllEmployeesDetails()\";\n\t\t\t// Create a new SQL statement \n\t\t\tStatement st = conn.createStatement();\n\t\t\t// Create a new results set which store the value returned by the when the SQL statement is executed \n\t\t\tResultSet rs = st.executeQuery(sql); \n\t\t\t// While there are still elements in the results set\n\t\t\tint i=0;\n//\t\t\twe are running a while loop and storing all the sql results in the main constructor\n\t\t\twhile (rs.next()) {\n\t\t\t\tempArray[i++] = new Employee(rs.getInt(\"emp_no\"), rs.getDate(\"birth_date\"), rs.getString(\"first_name\"),rs.getString(\"last_name\"), rs.getString(\"gender\"), rs.getDate(\"hire_date\"));\n\t\t\t}\n\t\t\t// close the results set\n\t\t\trs.close(); \n\t\t\t// close the statement\n\t\t\tst.close(); \n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\tSystem.out.println(\"Error in getAllEmployeesDetails\");\n\t\t\te.printStackTrace();\n\t\t}\n//\t\treturn the array\n\t\treturn empArray;\n\t}", "public String[][] getResearchEmployeeData() {\r\n\t\tint p = 0;\r\n\t\tString [][] employees = new String[companyDirectory.size()][4];\r\n\t\tfor(int i = 0; i < companyDirectory.size(); i++) {\r\n\t\t\tif(companyDirectory.get(i) instanceof ResearchCompany) {\r\n\t\t\t for(int j = 0; j < companyDirectory.get(i).getLocations().size();j++) {\r\n\t\t\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++ ) {\r\n\t\t\t\t\t employees[p][0] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getFirstName();\r\n\t\t\t\t\t employees[p][1] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getLastName();\r\n\t\t\t\t\t employees[p][2] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId();\r\n\t\t\t\t\t employees[p][3] = companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getEmail();\r\n\t\t\t\t\t p++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn employees;\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"How many employees would you like to type numbers for?\");\n Scanner emp_id_in = new Scanner(System.in);\n int emp_in = emp_id_in.nextInt();\n Employee EmployeeArr[] = new Employee[emp_in]; // should be size of the scanned input\n for (int i = 0; i < EmployeeArr.length; i++) {\n // Employee number\n System.out.println(\"Please enter the employees ID number(Enter a number from 0 to 999999)\");\n Scanner emp_id_scanner = new Scanner(System.in);\n int emp_id = emp_id_scanner.nextInt();\n // First\n System.out.println(\"Please enter the employees first name:\");\n Scanner first_name_scanner = new Scanner(System.in);\n String first_name = first_name_scanner.nextLine();\n // Last\n System.out.println(\"Please enter the employees last name:\");\n Scanner last_name_scanner = new Scanner(System.in);\n String last_name = last_name_scanner.nextLine();\n // Push entries into Name class\n Name name_obj = new Name();\n name_obj.get_employee_name(emp_id, first_name, last_name);\n //Street\n System.out.println(\"Please enter the employee's street name: \");\n Scanner street_name_scanner = new Scanner(System.in);\n String street_name = street_name_scanner.nextLine();\n // City\n System.out.println(\"Please enter the employee's city: \");\n Scanner city_name_scanner = new Scanner(System.in);\n String city_name = city_name_scanner.nextLine();\n // State\n System.out.println(\"Please enter the employee's state: \");\n Scanner state_name_scanner = new Scanner(System.in);\n String state_name = state_name_scanner.nextLine();\n System.out.println(\">>>>>>>>>>\" + state_name.split(\"\").length);\n // Zip\n System.out.println(\"Please enter the employee's zip code\");\n Scanner zip_code_scanner = new Scanner(System.in);\n int zip_code = zip_code_scanner.nextInt();\n // Push entries into Address class\n Address address_obj = new Address();\n address_obj.get_address_data(street_name, city_name, state_name, zip_code);\n // hire month\n System.out.println(\"Please enter the month the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner month_scanner = new Scanner(System.in);\n int month = month_scanner.nextInt();\n // hire day\n System.out.println(\"Please enter the day the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner day_scanner = new Scanner(System.in);\n int day = day_scanner.nextInt();\n // hire year\n System.out.println(\"Please enter the year the employee was hired: \");\n Scanner year_scanner = new Scanner(System.in);\n int year = year_scanner.nextInt();\n // Push data into Date class\n Date date_obj = new Date();\n date_obj.get_date_data(month, day, year);\n // Push data into employee class\n EmployeeArr[i] = new Employee();\n EmployeeArr[i].get_employee_information(name_obj.employee_number, name_obj.employee_first, name_obj.employee_last, address_obj.street, address_obj.zip_code,\n address_obj.city, address_obj.state, date_obj.hire_month, date_obj.hire_day, date_obj.hire_year);\n\n }\n // Show the data\n for (int j = 0; j < EmployeeArr.length; j++) {\n EmployeeArr[j].show_dat();\n }\n }", "public static void printEmployeeArray(CreateUser[] arr){\n\n for (int i=0; i < arr.length; i++){\n System.out.println(\"User:\");\n System.out.println(arr[i]); // name\n }\n\n }", "public ElectricitySystemRecord[][] eleList(ArrayList<ElectricitySystemRecord> elelist){\n\t\tif(elelist == null){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\tElectricitySystemRecord[][] list = new ElectricitySystemRecord[(int)Math.ceil((double)elelist.size()/(double)5)][5];\n\t\t\tint i;\n\t\t\tint j = 0;\n\t\t\tint count = 0;\n\t\t\tSystem.out.println(\"length: \" + elelist.size());\n\t\t\tfor(i = 0 ; i < elelist.size() ; i++){\n\t\t\t\tif( i < 5 ){\n\t\t\t\t\tlist[j][i] = (ElectricitySystemRecord)elelist.get(i);\n\t\t\t\t\tif(i == 4){\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tlist[j][i % 5] = elelist.get(i);\n\t\t\t\t\tcount++;\n\t\t\t\t\tif( count == 5){\n\t\t\t\t\t\tj++;\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn list;\t\n\t\t}\n\t\n\t}", "public static void main (String[] args){\n Empleado[] listaEmpleados = new Empleado[10];\n \n //Asignamos objetos a cada posición\n listaEmpleados[0] = new Empleado(\"Manuel\", \"30965835V\");\n listaEmpleados[1] = new Empleado(\"Miguel\", \"30965835V\");\n listaEmpleados[2] = new Empleado(\"Pedro\", \"30965835V\");\n listaEmpleados[3] = new Empleado(\"Samuel\", \"30965835V\");\n listaEmpleados[4] = new Empleado(\"Vanesa\", \"30965835V\");\n listaEmpleados[5] = new Empleado(\"Alberto\", \"30965835V\");\n listaEmpleados[6] = new Empleado(\"Roberto\", \"30965835V\");\n listaEmpleados[7] = new Empleado(\"Carlos\", \"30965835V\");\n listaEmpleados[8] = new Empleado(\"Ernesto\", \"30965835V\");\n listaEmpleados[9] = new Empleado(\"Javier\", \"30965835V\");\n\n /*Empleado[] empleados = {\n empleado1, empleado2, empleado3, null,null,null, null,\n null,null,null\n }*/\n \n //Imprimimos el array sin ordenar\n imprimeArrayPersona(listaEmpleados);\n \n //Creamos el objeto de la empresa\n Empresa empresa0 = new Empresa(\"Indra\", listaEmpleados);\n \n //Usamos la clase array para ordenar el array de mayor a menos\n Arrays.sort(listaEmpleados);\n\n //Imprimimos de nuevo el array\n imprimeArrayPersona(listaEmpleados);\n \n //Imprimimos la empresa\n System.out.println(empresa0);\n \n //Guardamos en un string la lista de nombres de un objeto empresa\n String listado = Empresa.listaEmpleado(empresa0.empleado).toString();\n \n System.out.println(listado);//Imprimimos el listado como un string\n \n //Imprimimos el array de los nombres de los empleados de la empresa\n System.out.println(Arrays.toString(Empresa.listaEmpleadoArray(listado)));\n \n //Método que imprime los empleados de una empresa separados por comas\n Empresa.listaEmpleado(listado);\n \n /*Empresa[] listaEmpresa = new Empresa[4];\n \n listaEmpresa[0] = new Empresa(\"Intel\", listaEmpleados);\n listaEmpresa[1] = new Empresa(\"AMD\", listaEmpleados);\n listaEmpresa[2] = new Empresa(\"Asus\", listaEmpleados);\n listaEmpresa[3] = new Empresa(\"Shaphire\", listaEmpleados);\n System.out.println(Arrays.toString(listaEmpresa));\n Arrays.sort(listaEmpresa);\n System.out.println(Arrays.toString(listaEmpresa));*/\n \n \n }", "@Override\n\tpublic ArrayList<Object[]> tousEmplo() {\n\t\tfor (Employe emplo : treeMap.values()) {\n\t\t\tObject[] aux = { emplo.getId(), emplo.getNom(), emplo.getPrenom(),\n\t\t\t\t\templo.getDate_N(), emplo.getSexe(), emplo.getRue(),\n\t\t\t\t\templo.getNumero(), emplo.getVille(), emplo.getPay(),\n\t\t\t\t\templo.getTelef(), emplo.getClass().getName().substring(13) };\n\t\t\tarray.add(aux);\n\t\t}\n\t\treturn array;\n\t}", "public String[][] displayEmployee() {\r\n\t\t\t\t\r\n\t\t// Print the employee numbers for the employees stored in each bucket's ArrayList,\r\n\t\t// starting with bucket 0, then bucket 1, and so on.\r\n \r\n if (numInHashTable > 0){\r\n dataTable = new String[numInHashTable][5];\r\n int q = 0;\r\n \r\n for (ArrayList<EmployeeInfo> bucket : buckets){\r\n for (int i = 0; i < bucket.size(); i++){\r\n EmployeeInfo theEmployee = bucket.get(i);\r\n \r\n //display specfically for a PTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof PTE) {\r\n PTE thePTE = (PTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"PTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(thePTE.calcNetAnnualIncome()); \r\n q++;\r\n }\r\n \r\n //display specfically for a FTE (All the general attributes plus the specifc ones)\r\n if (theEmployee instanceof FTE){\r\n FTE theFTE = (FTE) theEmployee;\r\n dataTable[q][0] = Integer.toString(theEmployee.getEmpNum());\r\n dataTable[q][1] = \"FTE\";\r\n dataTable[q][2] = theEmployee.getFirstName();\r\n dataTable[q][3] = theEmployee.getLastName();\r\n dataTable[q][4] = Double.toString(theFTE.calcNetAnnualIncome());\r\n q++;\r\n } \r\n }\r\n }\r\n }\r\n return dataTable;\r\n }", "public static void createArrayOfEvens()\n {\n int[] evens = new int[10];\n \n \n /*\n * Set all the values of the elements in teh array to the first ten positive even integers.\n * \n * \"length\" is used to query the number of elements in the array.\n * \n * square brackets are used to reference a specific element of the array.\n */\n for(int i = 0; i < evens.length; i++)\n {\n evens[ i ] = (i + 1) * 2;\n }\n \n // print the array's elements\n for(int i = 0; i < evens.length; i++)\n {\n System.out.println(i + \": \" + evens[i] );\n }\n \n System.out.println( evens ); // prints the reference to the array\n }", "public static void generarEmpleados() {\r\n\t\tEmpleado e1 = new Empleado(100,\"34600001\",\"Oscar Ugarte\",new Date(), 20000.00, 2);\r\n\t\tEmpleado e2 = new Empleado(101,\"34600002\",\"Maria Perez\",new Date(), 25000.00, 4);\r\n\t\tEmpleado e3 = new Empleado(102,\"34600003\",\"Marcos Torres\",new Date(), 30000.00, 2);\r\n\t\tEmpleado e4 = new Empleado(1000,\"34600004\",\"Maria Fernandez\",new Date(), 50000.00, 7);\r\n\t\tEmpleado e5 = new Empleado(1001,\"34600005\",\"Augusto Cruz\",new Date(), 28000.00, 3);\r\n\t\tEmpleado e6 = new Empleado(1002,\"34600006\",\"Maria Flores\",new Date(), 35000.00, 2);\r\n\t\tlistaDeEmpleados.add(e1);\r\n\t\tlistaDeEmpleados.add(e2);\r\n\t\tlistaDeEmpleados.add(e3);\r\n\t\tlistaDeEmpleados.add(e4);\r\n\t\tlistaDeEmpleados.add(e5);\r\n\t\tlistaDeEmpleados.add(e6);\r\n\t}", "public static void createArrayOfEvens(){\n\n int[] evens = new int[10];\n\n for (int i = 0; i < evens.length; i++) {\n evens[i] = (i + 1) * 2;\n }\n\n System.out.println(evens);\n\n for (int i = 0; i < evens.length; i++) {\n System.out.println(i + \": \" + evens[i]);\n }\n }", "public static void main(String[] args) {\n EmpClass[] obj = new EmpClass[4];\n int i;\n for(i=0;i<=obj.length;i++) {\n\n obj[i]=new EmpClass(1,\"AG\");\n\n obj[i].getData();\n obj[i].putData();\n }\n /* for (i=0;i<=3;i++) {\n obj.getData();\n obj.putData();\n }*/\n // obj.putData();\n }", "public static void main(String[] args) {\n \n empleado[] misEmpleados=new empleado[3];\n //String miArray[]=new String[3];\n \n misEmpleados[0]=new empleado(\"paco gomez\",123321,1998,12,12);\n misEmpleados[1]=new empleado(\"Johana\",28500,1998,12,17);\n misEmpleados[2]=new empleado(\"sebastian\",98500,1898,12,17);\n \n /*for (int i = 0; i < misEmpleados.length; i++) {\n misEmpleados[i].aumentoSueldo(10);\n \n }\n for (int i = 0; i < misEmpleados.length; i++) {\n System.out.println(\"nombre :\" + misEmpleados[i].dameNombre() + \" sueldo \" + misEmpleados[i].dameSueldo()+ \" fecha de alta \"\n + misEmpleados[i].dameContrato());\n }*/\n \n for (empleado e:misEmpleados) {\n e.aumentoSueldo(10);\n \n }\n for (empleado e:misEmpleados) {\n System.out.println(\"nombre :\" + e.dameNombre() + \" sueldo \" + e.dameSueldo()+ \" fecha de alta \"\n + e.dameContrato());\n \n }\n \n }", "public void sortEmployeeArray()\n\t {\n\t\t\tEmployee employeeTmp = new Employee();\n\t for(int i = 0; i < numOfEmployees - 1; i++)\n\t {\n\t for(int j = 0; j < numOfEmployees - 1; j++)\n\t {\n\t if (employeeData[j].getEmployeeNumber() > employeeData[j+1].getEmployeeNumber())\n\t {\n\t \temployeeTmp = employeeData[j+1];\n\t \temployeeData[j+1] = employeeData[j];\n\t \temployeeData[j] = employeeTmp;\n\t }\n\t }\n\t }\n\n\t }", "public static HashSet<Employee> addEmployeeDetails(int size) {\n\t\tint count = 1;\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\t\tEmployee emp = null;\n\t\tHashSet<Employee> hashLists = new HashSet<>();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\temp = new Employee();\n\n\t\t\tSystem.out.println(\"Enter the \" + count + \" Employee Details\");\n\t\t\tSystem.out.println(\"Enter the Employee id\");\n\t\t\temp.setEmpId(scan.nextInt());\n\t\t\tSystem.out.println(\"Enter the Employee name\");\n\t\t\temp.setEmpName(scan.next());\n\t\t\tSystem.out.println(\"Enter the Employee age\");\n\t\t\temp.setEmpAge(scan.nextInt());\n\t\t\tSystem.out.println(\"Enter the Employee salary\");\n\t\t\temp.setEmpSalary(scan.nextInt());\n\t\t\thashLists.add(emp);\n\t\t\tcount++;\n\t\t}\n\t\treturn hashLists;\n\n\t}", "public static void main(String[] args) {\n\r\n\t\tEmployee employees[] = new Employee[4];\r\n\r\n\t\temployees[0] = new HourlyEmployee(1, \"Jim\", \"Halpert\", 52, 25.99);\r\n\t\temployees[1] = new SalariedEmployee(2, \"Pam\", \"Beesly\", 3000);\r\n\t\temployees[2] = new CommissionEmployee(3, \"Michael\", \"Scott\", 0.08, 2000, 85000);\r\n\t\temployees[3] = new CommissionEmployee(4, \"Oscar\", \"Martinez\", 0.02, 1400, 62000);\r\n\r\n\t\t// For loop in array, and toString method, to display employees and salaries\r\n\r\n\t\tfor (int i = 0; i < employees.length; i++) {\r\n\t\t\tSystem.out.println(employees[i]);\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tEmployee employee = new Employee(2222, \"Sagar\");\n\t\tEmployee employee1 = new Employee(2222, \"Umesh\");\n\t\tArrayList<Employee> a4 = new ArrayList<Employee>();\n\t\ta4.add(employee);\n\t\ta4.add(employee1);\n\t\t\n\t//\ta4.add(Employee);\n\t\t\n\t\tfor (Employee employee21:a4)\n\t\t{\n\t\t\tSystem.out.println(\"Employee details :\"+employee21.eId+employee21.eName);\n\t\t}\n\t\t\n\t\tArrayList<Employee> a5 = new ArrayList<Employee>();\n\t\t\n\t\ta5.addAll(a4);\n\t\t\n\t\t//System.out.println(a5);\n\t\tfor (Employee employee231:a5)\n\t\t{\n\t\t\tSystem.out.println(\"Employee details :\"+employee231.eId+employee231.eName);\n\t\t}\n\t\t\n\t}", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public Manager(Employee[] employees) {\n\t\tsuper();\n\t\tthis.employees = employees;\n\t}", "public Vector<Employees> getEmployees() {\n\t\t\tVector<Employees> v = new Vector<Employees>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"select * from employees_details order by employees_pf\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tint drive = rs.getInt(3);\n\t\t\t\t\tEmployees employee = new Employees(file_num, name, drive);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(employee);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "public static void main(String[] args) {\n\n ArrayPractice[] ar= new ArrayPractice[1];\n ar[0]=new ArrayPractice(99,\"vivek\",\"prodct\");\n for (Object o:ar) {\n ar[0].employeeInfo();\n\n }\n\n\n\n// int[][] arr = {{2, 3}, {2, 5}, {2, 34}, {2, 5}};\n//\n//\n// for (int[] temp : arr) {\n// for (int n : temp) {\n// System.out.println(n);\n// }\n//\n// }\n// int[][] arrr = new int[4][4];\n// System.out.println(arrr[0].length);\n// String[] name = {\"Vivek\", \"Atin\"};\n//\n// greet(\"Vivek\", \"Atin\");\n// }\n// public static void greet(String... name) {\n// for(String n:name){\n// System.out.println(\"hello\"+n);\n// }\n\n\n\n\n// }\n// public class student{\n// String name;\n// Int id;\n// Int age;\n// String major;\n// float gpa;\n// public void studenDetails(){\n// studenDetails=new studentDetails();\n\n\n }", "public void bulkAdd(){\n employees.add(new Employee(23.0, 15000.0, \"Shayan\"));\n employees.add(new Employee(22.0, 60000.0, \"Rishabh\"));\n employees.add(new Employee(23.0, 45000.0, \"Ammar\"));\n employees.add(new Employee(25.0, 30000.0, \"Fahad\"));\n employees.add(new Employee(21.0, 50000.0, \"Ankur\"));\n }", "public static void main(String[] args) {\n Employ obj1 = new Janani(1, \"Janani\", 757438);\n Employ obj2 = new Raghu(2, \"Raghu\", 73647);\n Employ[] arrEmploy = new Employ[]{obj1,obj2};\n for (Employ employ : arrEmploy) {\n System.out.println(employ);\n }\n }", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public Employee[] getEmployeesList() {\n\t\treturn employees;\n\t}", "public void setEmployeeArray(andrewNamespace.xsdconfig.EmployeeDocument.Employee[] employeeArray)\r\n {\r\n check_orphaned();\r\n arraySetterHelper(employeeArray, EMPLOYEE$0);\r\n }", "public void setEmployeeArray(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee employee)\r\n {\r\n generatedSetterHelperImpl(employee, EMPLOYEE$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);\r\n }", "public Employee[] findEmployeesByAddress(Employee[] ea, String addr){\n\t\tEmployee[] temp = new Employee[ea.length];\n\t\tEmployee[] result = null;\n\t\tint count = 0;\n\t\t\n\t\tint[] index = new int[ea.length];\n\t\t\n\t\tfor(int i = 0; i < ea.length; i++){\n\t\t\tif(ea[i].getAddress().equals(addr)){\n\t\t\t\ttemp[i] = ea[i];\n\t\t\t} else {\n\t\t\t\tindex[i] = i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tint a = count;\n\t\tresult = new Employee[ea.length-a];\n\t\tfor(int i = 0; i < ea.length; i++){\n\t\t\tif(i == index[i])\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\telse if( i >= result.length)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\telse{\n\t\t\t\tresult[i] = ea[i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn result;\n\t}", "public EmployeeMain() {\n employeeSalary_2015 = new ArrayList<Employee>();\n employeeSalary_2014 = new ArrayList<Employee>();\n }", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "@DataProvider(name=\"empDataProviderExcel\")\n\tString [][]getEmpDataFromExcel() throws IOException{\n\t\tString dataSheetPath = System.getProperty(\"user.dir\")+\"/testDataAndTestCases/API_TestCases.xlsx\";\n\t\tString sheetName = \"EmployeeTestData\";\n\t\t\n\t\tint rowCount = XLUtills.getRowCount(dataSheetPath, sheetName);\n\t\tint colCount = XLUtills.getCellCount(dataSheetPath, sheetName, rowCount);\n\t\t\t\t\n\t\tString [][]empData = new String[rowCount][colCount];\n\t\t\n\t\tfor(int i = 1; i <= rowCount; i++) {\n\t\t\tfor(int j = 0; j < colCount; j++) {\n\t\t\t\tempData[i-1][j] = XLUtills.getCellData(dataSheetPath, sheetName, i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn empData;\n\t}", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "private static Employee[] addEmployee(Employee[] products, Employee productToAdd) {\n Employee[] newEmployee = new Employee[products.length + 1];\n System.arraycopy(products, 0, newEmployee, 0, products.length);\n newEmployee[newEmployee.length - 1] = productToAdd;\n\n return newEmployee;\n }", "Array createArray();", "public static void main(String[] args) {\n\t\t\r\n\t\tint[][] employeeArray = { {2,4,3,4,5,8,8},\r\n\t\t\t\t\t\t\t\t {7,3,4,3,3,4,4},\r\n\t\t\t\t\t\t\t\t {3,3,4,3,3,2,2},\r\n\t\t\t\t\t\t\t\t {9,3,4,7,3,4,1},\r\n\t\t\t\t\t\t\t\t {3,5,4,3,6,3,8},\r\n\t\t\t\t\t\t\t\t {3,4,4,6,3,4,4},\r\n\t\t\t\t\t\t\t\t {3,7,4,8,3,8,4},\r\n\t\t\t\t\t\t\t\t {6,3,5,9,2,7,9}};\r\n\t\t\r\n\t\t//create a new single array to hold all the sums\r\n\t\t\r\n\t\tint[] hoursArray = new int[8];\t\t\t\r\n\t\t\r\n\t\t//loop to add all the elements of the columns \r\n\t\tfor(int i = 0; i < employeeArray.length; i++)\r\n\t\t\t\r\n\t\t\tfor(int j = 0; j < employeeArray[i].length; j++) \r\n\t\t\t\t\r\n\t\t\t\thoursArray[i] += employeeArray[i][j];\r\n\t\t\t\r\n\r\n\t}", "public EmployeeWageBuilder() {\n\t\tcompanyEmpWageArrayList = new ArrayList<>();\n\t\tcompanyEmpWageMap = new HashMap<>();\n\n\tprivate int numOfCompany = 0;\n\tprivate CompanyEmpWage[] companyEmpWageArray;\n\tprivate ArrayList<CompanyEmpWage> companyEmpWageArrayList;\n\n\n\t// created array of type CompanyEmpWage\n\tpublic EmployeeWageBuilder() {\n\t\tcompanyEmpWageArray = new CompanyEmpWage[5];\n\n\t\tcompanyEmpWageArrayList = new ArrayList<>();\n\n\n\t}", "private void writeData(Employee[] employees, DataOutput out) throws IOException {\n // write number of employees\n out.writeInt(employees.length);\n\n for (Employee e : employees) {\n out.writeInt(e.getName().length());\n out.writeChars(e.getName());\n out.writeInt(e.getHireDay().toString().length());\n out.writeChars(e.getHireDay().toString());\n out.writeDouble(e.getSalary());\n }\n }", "public static void main(String[] args) {\nScanner ttt=new Scanner(System.in);\r\nint pp;\r\nout.println(\"Enter the no. of Employees \");\r\npp=ttt.nextInt();\r\n\t\tEmployeeArr[] emp=new EmployeeArr[pp];\r\n\t\t\r\n\t\tint i;\r\n\t\tfor(i=0;i<emp.length;i++) {\r\n\t\t\temp[i]=new EmployeeArr();\r\n\t\t\tout.print(\"Enter \");\r\n\t\t\tout.print(i+1+\" \");\r\n\t\t\temp[i].get();\r\n\t\t}\r\n\t\tfor(int j=0;j<emp.length;j++) {\r\n\t\t\tout.print(j+1+\" \");\r\n\t\t\temp[j].show();\r\n\t\t}\r\n\t\t EmployeeArr temp=new EmployeeArr();\r\n\t\tfor(int k=0;k<emp.length;k++) {\r\n\t\t\tfor(int m=1;m<emp.length;m++) {\r\n\t\t\t\tif(emp[k].id >emp[m].id){\r\n\t\t\t\t\ttemp=emp[k];\r\n\t\t\t\t\temp[k]=emp[m];\r\n\t\t\t\t\temp[m]=temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tout.println(\"Sorted array are \");\r\n\t\tfor(int l=0;l<emp.length;l++) {\r\n\t\t\tout.print(l+1+\" \");\r\n\t\t\temp[l].show();\r\n\t\t}\r\n\t}", "public void setEmployees(ArrayList<Employee> employees) { \r\n this.employees = employees;\r\n }", "public ArrayListEmployee5(int id,String name,String address,float salary) {\n this.id = id;\n this.name = name;\n this.address = address;\n this.salary = salary;\n }", "public static void main(String[] args) {\n\t\tPerson[] employees = new Employee[10];\n\t\tPerson[] managers = new Manager[10];\n\t\t\n\t\temployees[1] = new Manager();\n\t\t\n\t\t/*\n\t\t * This is an invalid scenario as the whole point of generics is to provide type safety\n\t\t */\n\t\t//List<Person> personList = new ArrayList<Employee>();\n\t\t//personList.add( new Manager());\n\n\t}", "public String[][] getEmployeeDirectory() {\n\t\tString [][] directory = new String[users.size()][3];\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tUser s = users.get(i);\n\t\t\tdirectory[i][0] = s.getFirstName();\n\t\t\tdirectory[i][1] = s.getLastName();\n\t\t\tdirectory[i][2] = s.getId();\n\t\t}\n\t\treturn directory;\n\t}", "public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }", "@Logging\n\tprivate List<Employee> getEmployee(List<String> aFileList) {\n\t\t\n\t\tList<Employee> aEmployeList = aFileList.stream()\n\t\t\t\t.skip(1) // skip the header line\n\t\t\t\t.map(line -> line.split(\",\")) // transform each line to an array\n\t\t\t\t.map(employeeData -> new Employee(Long.parseLong(employeeData[0]), employeeData[1], employeeData[2],\n\t\t\t\t\t\temployeeData[3], employeeData[4])) // transform each array to an entity\n\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\treturn aEmployeList;\n\t\t\n\t}", "public void create() throws Exception {\n\t\tString[] temp = new String[2];\n\t\tString thisLine;\n\t\tint indexX;\n\t\tint indexY;\n\n\t BufferedReader br = new BufferedReader(new FileReader(\"input.txt\"));\n\n\t if ((thisLine = br.readLine()) != null) {\n\t \tnumOfEmp = Integer.parseInt(thisLine);\n\t \tSystem.out.println(numOfEmp);\n\t }\n\n\t employees = new Node[numOfEmp];\n\n if ((thisLine = br.readLine()) != null) {\n\t \ttargetX = thisLine;\n\t \tSystem.out.println(targetX);\n\t }\n\n if ((thisLine = br.readLine()) != null) {\n\t \ttargetY = thisLine;\n\t \tSystem.out.println(targetY);\n\t }\n\n if ((thisLine = br.readLine()) != null) {\n\t \ttemp = thisLine.split(\" \");\n\t \tSystem.out.println(temp[0] + \" \" + temp[1]);\n\t }\n\n\t employees[0] = new Node(temp[0]);\n\t employees[1] = new Node(temp[1]);\n\t root = employees[0];\n\n\t counter = 1;\n\t employees[0].left = employees[1];\n\t employees[1].parent = employees[0];\n\n while ((thisLine = br.readLine()) != null) {\n temp = thisLine.split(\" \");\n System.out.println(temp[0] + \" \" + temp[1]);\n indexX = findEmp(temp[0]);\n indexY = findEmp(temp[1]);\n\n if (indexX == -1) {\n \tcounter++;\n indexX = counter;\n \temployees[indexX] = new Node(temp[0]);\n }\n if (indexY == -1) {\n \tcounter++;\n \tindexY = counter;\n \temployees[indexY] = new Node(temp[1]);\n }\n\n if (employees[indexX].left == null) {\n\n \temployees[indexX].left = employees[indexY];\n \temployees[indexY].parent = employees[indexX];\n }\n else if (employees[indexX].right == null) {\n\n \temployees[indexX].right = employees[indexY];\n \temployees[indexY].parent = employees[indexX];\n }\n else {\n \tthrow new EmptyStackException();\n }\n\n }\n\n\n \n\t}", "public static void main(String[] args) {\n\t\tArrayList<Empleado>listaEmpleados = new ArrayList<Empleado>();\n\t\t//listaEmpleados.ensureCapacity(12); //USAMOS ESTE MÉTODO PARA NO CONSUMIR MÁS MEMORIA QUE 12 ELEMENTOS DEL ARRAYLIST\n\t\tlistaEmpleados.add(new Empleado(\"Bra\", 17,2800));\n\t\tlistaEmpleados.add(new Empleado(\"Pan\", 15,2500));\n\t\tlistaEmpleados.add(new Empleado(\"Giru\", 10,2000));\n\t\tlistaEmpleados.add(new Empleado(\"Bra\", 17,2800));\n\t\tlistaEmpleados.add(new Empleado(\"Pan\", 15,2500));\n\t\tlistaEmpleados.add(new Empleado(\"Giru\", 10,2000));\n\t\tlistaEmpleados.add(new Empleado(\"Bra\", 17,2800));\n\t\tlistaEmpleados.add(new Empleado(\"Pan\", 15,2500));\n\t\tlistaEmpleados.add(new Empleado(\"Giru\", 10,2000));\n\t\tlistaEmpleados.add(new Empleado(\"Bra\", 17,2800));\n\t\tlistaEmpleados.add(new Empleado(\"Pan\", 15,2500));\n\t\t//PARA ELEGIR LA POSICIÓN DONDE QUEREMOS INCLUIR ELEMENTO.\n\t\tlistaEmpleados.set(5,new Empleado(\"Androide18\", 10,2000));\n\t\t\n\t\t//CORTAMOS EL EXCESO DE MEMORIA QUE ESTÁ SIN USAR\n\t\t//listaEmpleados.trimToSize();\n\t\t\n\t\t//PARA IMPRIMIR UN ELEMENTO DE ARRAYLIST EN ESPECIAL\n\t\tSystem.out.println(listaEmpleados.get(4).dameEmpleados());\n\t\t\n\t\t//IMPRIMIMOS EL TAMAÑO DEL ARRAYLIST\n\t\tSystem.out.println(\"Elementos: \" + listaEmpleados.size());\n\t\t\n\t\t/*//BUCLE FOR-EACH\n\t\tSystem.out.println(\"Elementos: \" + listaEmpleados.size());\n\t\tfor(Empleado x : listaEmpleados) {\n\t\t\tSystem.out.println(x.dameEmpleados());\n\t\t}*/\n\t\t\n\t\t/*//BUCLE FOR\n\t\tfor(int i=0;i<listaEmpleados.size();i++) {\n\t\t\t//ALAMCENAMOS EN \"e\" LOS ELEMENTOS DEL ARRAYLIST\n\t\t\tEmpleado e =listaEmpleados.get(i); \n\t\t\tSystem.out.println(e.dameEmpleados());\n\t\t}*/\n\t\t\n\t\t//GUARDAMOS LA INFORMACIÓN DEL ARRAYLIST EN UN ARRAY CONVENSIONAL Y LO RECORREMOS\n\t\t//CREAMOS ARRAY Y LE DAMOS LA LONGITUD DEL ARRAYLIST:\n\t\tEmpleado arrayEmpleados[]= new Empleado[listaEmpleados.size()];\n\t\t//COPIAMOS LA INFORMACIÓN EN EL ARRAY CONVENSIONAL:\n\t\tlistaEmpleados.toArray(arrayEmpleados);\n\t\t//RECORREMOS\n\t\tfor(int i=0;i<arrayEmpleados.length;i++) {\n\t\t\tSystem.out.println(arrayEmpleados[i].dameEmpleados());\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tEmployee e=new Employee(104, \"vik\");\r\n\t\tEmployee e1=new Employee(105, \"wik\");\r\n\t\tEmployee e2=new Employee(101, \"xik\");\r\n\t\tEmployee e3=new Employee(102, \"yik\");\r\n\t\tEmployee e4=new Employee(103, \"zik\");\r\n\t\tArrayList<Employee>al=new ArrayList<>();\r\n\t\tal.add(e);\r\n\t\tal.add(e1);\r\n\t\tal.add(e2);\r\n\t\tal.add(e3);\r\n\t\tal.add(e4);\r\n\tSystem.out.println(al);\r\n\tCollections.sort(al);// ArrayList is not ascending order so in order to do sorting we need to use .sort {its default in TreeSet so in TreeSet we don't write .sort method to sort}\r\n\tfor(Employee em:al)\r\n\t{\r\n\t\tSystem.out.println(em.getEno()+\" \"+em.getEname());\r\n\t}\r\n\t}", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public int sizeOfEmployeeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(EMPLOYEE$0);\r\n }\r\n }", "public static void main(String[] args) {\n\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\t//String fileName = \"C:\\\\Users\\\\DELL\\\\Desktop\\\\Sample Data\\\\50000 Records.csv\";\n\n//\t\tString fileName = \"C:\\\\Users\\\\DELL\\\\Desktop\\\\Sample Data\\\\Hr1m.csv\";\n\t\tString fileName = \"C:\\\\Users\\\\DELL\\\\Desktop\\\\Sample Data\\\\Hr5m.csv\";\n\t\t\n\t\t// Employee[] emp = new Employee[100];\n//\t\tEmployee[] emp = new Employee[50000];\n\t\tEmployee[] emp = new Employee[5000000];\n\t\tint bufferSize = 10240; // 10k\n\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(fileName), bufferSize)) {\n\n\t\t\tString line = br.readLine(); // Skiping first line (Extra read)\n\n\t\t\tint index = 0;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] valueArr = line.split(\",\");\n\n\t\t\t\tInteger empId = Integer.parseInt(valueArr[0]);\n\t\t\t\tString empName = valueArr[1] + \" \" + valueArr[2] + \" \" + valueArr[3] + \" \" + valueArr[4];\n\t\t\t\tLong salary = Long.parseLong(valueArr[25]);\n\t\t\t\tString gender = valueArr[5];\n\t\t\t\tString empMotherName = valueArr[8];\n\t\t\t\tLocalDate dateOfJoin = Utility.getDate(valueArr[14]);\n\n\t\t\t\temp[index++] = new Employee(empId, empName, salary, gender, empMotherName, dateOfJoin);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"Loaded file in \" + (System.currentTimeMillis() - startTime) / 1000 + \" seconds\");\n\n\t\tSystem.out.println(\"Total Employees: \" + emp.length);\n\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Top Ten Salary wise Employees \");\n\n\t\tstartTime = System.currentTimeMillis();\n\t\t\n//\t\tbubbleShort(emp);\n//\t\tselectionShort(emp);\n//\t\tinsertionShort(emp);\n\t\t\n\t\tQuickShort.sort(emp, 0, emp.length -1);\n\t\t\n\t\tSystem.out.println(\"Sorted in \" + (System.currentTimeMillis() - startTime) / 1000 + \" seconds with itration counter :: \"+Utility.counter);\n\n\t\tUtility.print(10, emp);\n\n\t}", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < employees.length; i++) {\n result.append(employees[i] + \"\\n\");\n }\n return result.toString();\n }", "public static void main(String[] args) {\n\t\tArrayList<Employeearraylist> hs = new ArrayList<>();\n\t\ths.add(new Emp(\"Poornima\",1214,\"Guntur\",30000));\n\t\ths.add(new Emp(\"vaishnavi\",1215,\"banglore\",35000));\n\t\ths.add(new Emp(\"geetha\",1216,\"kolkata\",12000));\n\t\ths.add(new Emp(\"bhavi\",1217,\"hyd\",45000));\n\t\ths.add(new Emp(\"ravi\",1218,\"pune\",56000));\n\t\n\t\tCollections.sort(e, (e1, e2) -> {\n\n\t\t\treturn (e1.name).compareTo(e2.name);\n\t\t});\n\t\tfor (Employeearraylist employee : e) {\n\t\t\tSystem.out.println(employee);\n\t\t}\n\t\tList<Integer> l = new ArrayList<Integer>();\n\t\tList<Integer> i = e.stream().filter(p -> p.salary > 70000).map(p -> p.salary).collect(Collectors.toList());\n\t\tSystem.out.println(\"salary greater than 70000\" + i);\n\t\tOptional<Integer> sal = e.stream().map(p -> p.salary).reduce((sum, salary) -> (sum + salary));\n\t\tSystem.out.println(\"sum of total employee salaries are\" + sal);\n\t\tlong se = e.stream().count();\n\t\tSystem.out.println(se);\n\n\t\t;\n\t}", "public Manager() {\n\t\tsuper();\n\t\temployees = new Employee[10];\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint[] empNums = new int[5];\r\n\t\tString[] empName = new String[5];\r\n\t\tdouble[] empSal = new double[5];\r\n\t\t\r\n\t\tfor(int i=0; i<5; i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"entert the employee number\");\r\n\t\t\tempNums[i] = sc.nextInt();\r\n\t\t\tSystem.out.println(\"Enter the employee name\");\r\n\t\t\tsc.nextLine(); \r\n\t\t\tempName[i] = sc.nextLine();\r\n\t\t\tSystem.out.println(\"Please enter your salary\");\r\n\t\t\tempSal[i]=sc.nextDouble();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tdisplay(empNums,empName,empSal);\r\n\t\tdisplay(empNums, empName);\r\n\t}", "@Override\n\t\tpublic BaoBeiBean[] newArray(int size) {\n\t\t\treturn new BaoBeiBean[size];\n\t\t}", "public List<Employee> getAllEmployee(){\n List<Employee> employee = new ArrayList<Employee>();\n employeeRepository.findAll().forEach(employee::add);\n return employee;\n }", "@DataProvider(name=\"excle\")\n\tpublic static Object[][] createaccountTest() throws IOException {\n\t\tObject content[][];\n\t\tFileInputStream file = new FileInputStream(\n\t\t\t\t\"D:\\\\Java_Workspace\\\\FinalKDDFramework\\\\Input\\\\Account.xlsx\");\n\t\tXSSFWorkbook book = new XSSFWorkbook(file);\n\t\tXSSFSheet sheet = book.getSheet(\"Sheet1\");\n\t\tint rows = sheet.getLastRowNum();\n\t\tcontent = new Object[(sheet.getLastRowNum())-1][sheet.getRow(1)\n\t\t\t\t.getLastCellNum()];\n\t\tRow row;\n\t\tSystem.out.println(\"total no of rows \" + rows);\n\t\tfor (int i = 1; i <rows; i++) \n\t\t{\n\t\t\trow = sheet.getRow(i);\n\t\t\tint cells = row.getLastCellNum();\n\t\t\tfor (int j = 0; j < cells; j++) \n\t\t\t{\n\t\t\t\tCell cell = row.getCell(j);\n\t\t\t\tif (cell.getCellTypeEnum().name().equals(\"NUMERIC\")) \n\t\t\t\t{\n\t\t\t\t\tcontent[i-1][j] = cell.getNumericCellValue();\t\n\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse if (cell.getCellTypeEnum().name().equals(\"STRING\")) \n\t\t\t\t{\n\t\t\t\t\tcontent[i-1][j] = cell.getStringCellValue();\t\n\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t/*\n\t\t * catch (FileNotFoundException e) {\n\t\t * System.out.println(\"file not found\"); e.printStackTrace(); }\n\t\t */\n\t\treturn content;\n\t}", "public void addEmployee(int noOfEmployee) {\r\n\t\tint id = 0;\r\n\t\tString name = null;\r\n\t\tString address = null;\r\n\t\t\r\n\t\tfor (int index = 0; index < noOfEmployee; index++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee id :\");\r\n\t\t\tid = input.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee name : \");\r\n\t\t\tinput.nextLine();\r\n\t\t\tname = input.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee address :\");\r\n\t\t\taddress = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (empId.contains(id)) {\r\n\t\t\t\tSystem.out.println(\"Emp ID : \"+ id +\" employee ID already exists !!!!!\");\r\n\t\t\t} else {\r\n\t\t\t\tempId.add(id);\r\n\t\t\t\temp.add(addEmployee(id, name, address));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public E[] values(){\n\t\tE[] output = (E[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; i < elem.length; i++)\n\t\t\tif (elem[i] != null){\n\t\t\t\toutput[j] = elem[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}", "private static Employee [] readFile(String fileName) {\n Employee[] employees = new Employee[0];\n try{\n File file = new File(fileName);\n try (Scanner scanner = new Scanner(file)) {\n while(scanner.hasNextLine())\n {\n StringTokenizer st = new StringTokenizer(scanner.nextLine());\n Employee employee = new Employee();\n employee.employee = st.nextToken();\n if(st.hasMoreTokens()) {\n String manager = st.nextToken();\n \n // Check if manager is not empty, if empty then last employee\n if(!\"\".equals(manager))\n employee.manager = manager;\n }\n \n employees = addEmployee(employees, employee);\n } }\n } catch (FileNotFoundException e)\n {\n }\n \n return employees;\n }", "List<Employee> allEmpInfo();", "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "E[] toArray();", "@Override\n public SortedSet<EmployeeIdentity> getEmployeeIdentities() {\n Identity identity = new Identity();\n identity.setId(OBJECT_ID);\n identity.setCode(identityCode);\n EmployeeIdentity employeeIdentity = new EmployeeIdentity(identity, this);\n employeeIdentity.setId(OBJECT_ID);\n SortedSet<EmployeeIdentity> employeeCategories = new TreeSet<EmployeeIdentity>();\n employeeCategories.add(employeeIdentity);\n return employeeCategories;\n }", "public java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> getEmployeeList()\r\n {\r\n final class EmployeeList extends java.util.AbstractList<andrewNamespace.xsdconfig.EmployeeDocument.Employee>\r\n {\r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee get(int i)\r\n { return ColleaguesImpl.this.getEmployeeArray(i); }\r\n \r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee set(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee o)\r\n {\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee old = ColleaguesImpl.this.getEmployeeArray(i);\r\n ColleaguesImpl.this.setEmployeeArray(i, o);\r\n return old;\r\n }\r\n \r\n @Override\r\n public void add(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee o)\r\n { ColleaguesImpl.this.insertNewEmployee(i).set(o); }\r\n \r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee remove(int i)\r\n {\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee old = ColleaguesImpl.this.getEmployeeArray(i);\r\n ColleaguesImpl.this.removeEmployee(i);\r\n return old;\r\n }\r\n \r\n @Override\r\n public int size()\r\n { return ColleaguesImpl.this.sizeOfEmployeeArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new EmployeeList();\r\n }\r\n }", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "public Manager(Employee[] employees, String name, String jobTitle, int level, String dept) {\n\t\tsuper(name, jobTitle, level, dept);\n\t\tthis.employees = employees;\n\t}", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "@GetMapping(\"/get_all_employees\")\n public String getAllEmployees(){\n\n Gson gsonBuilder = new GsonBuilder().create();\n List<Employee> initial_employee_list = employeeService.get_all_employees();\n String jsonFromJavaArray = gsonBuilder.toJson(initial_employee_list);\n\n return jsonFromJavaArray;\n }", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "public static void main(String[] args) {\n\t\t\n\t\tEmpleado[] misEmpleados = new Empleado[3];\n\t\t\n\t\tmisEmpleados[0] = new Empleado(\"Laura Diaz\", 85000, 2020,2,30);\n\t\tmisEmpleados[2] = new Empleado(\"Jon Snow\", 43000, 2018,10,3);\n\t\tmisEmpleados[1] = new Empleado(\"Ana Lopez\", 68000, 2010,12,3);\n\t\t\n\t\t//PRINCIPIO DE SUSTITUCIÓN\n\t\tEmpleado director_comercial = new Jefatura(\"Lau\", 40000, 2018,6,14);\n\t\t\n\t\t//Una vez hecho esto se puede utilizar la instrucción INSTANCEOF (comprobar si una instancia pertenece\n\t\t//a una clase o no).\n\t\tif (director_comercial instanceof Empleado) {\n\t\t\t\n\t\t\tSystem.out.println(\"Es de tipo Jefatura\");\n\t\t}\n\t\t\n\t\t////Ahora vamos a llamar al método de la interfaz estableceBonus\n\t\tSystem.out.println(\"El empleado \" + misEmpleados[1].dameNombre() + \" tiene un bonus de \" +\n\t\tmisEmpleados[1].estableceBonus(250.60));\n\t\t\n\t\t\n\t\t\t\t\n\t\t//ORDENAR LA MATRIZ:\n\t\t\n\t\tint control = 0;\n\t\tdo {\n\t\t\tfor (int i = 1; i < misEmpleados.length; i++) {\n\t\t\t\tcontrol = 0;\n\t\t\t\tif (misEmpleados[i-1].dameSueldo() > misEmpleados[i].dameSueldo()) {\n\t\t\t\t\tEmpleado x = misEmpleados[i-1];\n\t\t\t\t\tmisEmpleados[i-1] = misEmpleados[i];\n\t\t\t\t\tmisEmpleados[i] = x;\n\t\t\t\t\tcontrol++;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (control != 0);\n\t\n\t\t //Ahora vamos a subirles el suelo a todos un 5%. FOR para recorrer el Array\n\n\t\tfor (int i = 0; i < misEmpleados.length; i++) {\n\n\t\t\tmisEmpleados[i].subeSueldo(5);\n\t\t}\n\n\t\t// Vamos a usar otro bucle FOR para que nos imprima el pantalla a cada uno de\n\t\t// los empleados\n\n\t\tfor (int i = 0; i < misEmpleados.length; i++) {\n\n\t\t\tSystem.out.println(\"Nombre: \" + misEmpleados[i].dameNombre() + \" Sueldo: \" + \n\t\t\tmisEmpleados[i].dameSueldo() + \" Fecha de alta : \" + misEmpleados[i].dameFechaContrato());\n\t\t}\n\t\t\n\t\t\n\t\tJefatura jefe_RRHH = new Jefatura(\"Laura\", 25000, 1992, 10, 04);\n\t\t\n\t\tjefe_RRHH.estableceIncentivo(200.50);\n\t\t\n\t\tSystem.out.println(jefe_RRHH.toString());\n\t\t\n\t\t//Ahora vamos a llamar al método de la interfaz jefes (tomar decisiones)\n\t\tSystem.out.println(jefe_RRHH.tomarDecisiones(\"Contratar personal\"));\n\t\t//Ahora vamos a llamar al método de la interfaz estableceBonus\n\t\tSystem.out.println(\"El jefe de RRHH: \" + jefe_RRHH.dameNombre() + \" tiene un bonus de \" \n\t\t+ jefe_RRHH.estableceBonus(432));\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tArrayList emp =new ArrayList();\n\t\t\n\t\temp.add(\"Avinash\"); \n\t\temp.add(001);\t\t\n\t\temp.add(\"Admin\");\t\n\t\temp.add(12.7);\t\n\t\t\n\t\tSystem.out.println(emp);\n\n\t\t//Generic Array list\n\t\tArrayList emp1 =new ArrayList();\n\t\temp1.add(\"Vaibhav\"); \n\t\temp1.add(002);\t\t\n\t\temp1.add(\"CEO\");\t\n\t\temp1.add(1.7);\t\n\t\t\n\t\tSystem.out.println(emp1);\n\n\t}", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public void makeArray(){\n for (int i = 0; i<length; i++){\n departements[i] = wallList.get(i).getName();\n }\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n arrayList.clear();\n for(DataSnapshot dataSnapshot1 : snapshot.getChildren()) {\n String key = dataSnapshot1.getKey();\n if(key.length() ==20){\n EmployeeInfo test = new EmployeeInfo();\n test.setpotential((String) dataSnapshot1.child(\"potential\").getValue());\n test.setstartUpName(dataSnapshot1.child(\"startUpName\").getValue(String.class));\n test.setbuildTime(dataSnapshot1.child(\"buildTime\").getValue(String.class));\n arrayList.add(test);\n }\n }\n update();\n\n }", "public int[] getEMPLOYEEID() {\r\n return EMPLOYEEID;\r\n }", "public int[] generateArray() {\n return generateArray(5);\n }", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "public static ArrayList<Employee> getAllEmployee() throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tArrayList<Employee> employee = new ArrayList<>();\n\t\tString query = \"SELECT * FROM EMPLOYEE\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tResultSet resultSet = pStatement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\temployee.add(new Employee(resultSet.getString(\"empId\"), resultSet\n\t\t\t\t\t.getString(\"ename\")));\n\t\t}\n\t\treturn employee;\n\t}", "@Override\n\tpublic Object ReadEmployee(int n) {\n\t\tEmployees em = new Employees();\n\t\t// Le asignamos una sesion y una sentencia que en este caso es leer\n\t\t// empleado dada su ID(cuando busque el empleado debe de darnos un unico\n\t\t// resultado).\n\t\tem = (Employees) sm.obtenerSesionNueva()\n\t\t\t\t.createSQLQuery(InstruccionesSQL.COSULTAR_EMPLEADO_X_ID)\n\t\t\t\t.addEntity(Employees.class).uniqueResult();\n\n\t\treturn em;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "public void testCrearArrayEnForEspecificado(int size) {\n\t\tfor (int i = 1; i <= size; i++) { \n\t\t\tint[] array = new int[i]; //tempLocal = (size * (size + 1))/2\t\n\t\t}\n\t}", "public List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}", "public static List<Tag> createEmployeeList(List<Employee> list) {\n return list.stream().map(employee ->\n div().withClass(\"employee\").with(\n h2(employee.getName()),\n img().withSrc(employee.getImgPath()),\n p(employee.getTitle())\n )\n ).collect(Collectors.toList());\n }", "public static List<Employee> getListEmployee() throws ParserConfigurationException {\n List<Employee> listEmployees = new ArrayList<>();\n String filePath = \"src/task2/employee.xml\";\n File file = new File(filePath);\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder;\n\n try {\n docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nodeList = doc.getElementsByTagName(\"employee\");\n for (int i = 0; i < nodeList.getLength(); i++) {\n listEmployees.add(getEmployee(nodeList.item(i)));\n }\n return listEmployees;\n } catch (ParserConfigurationException | SAXException | IOException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n return null;\n }" ]
[ "0.72189695", "0.68756264", "0.664379", "0.6396597", "0.6348429", "0.6345742", "0.6337967", "0.62675023", "0.6181736", "0.61644435", "0.6132075", "0.61108273", "0.6088393", "0.60595095", "0.60587555", "0.5986997", "0.5940317", "0.5930364", "0.5884635", "0.5875344", "0.5869656", "0.58511126", "0.58474326", "0.5796552", "0.5782645", "0.5773814", "0.5765746", "0.5743131", "0.57401246", "0.5740114", "0.5732037", "0.56366783", "0.5605157", "0.55950457", "0.5594529", "0.5590387", "0.5551955", "0.5527213", "0.5516682", "0.55078703", "0.5503683", "0.5484454", "0.5461709", "0.54613096", "0.5432141", "0.5426722", "0.5404136", "0.5400365", "0.5381635", "0.5356901", "0.53358763", "0.5325734", "0.5321458", "0.531188", "0.53075767", "0.53073597", "0.52845794", "0.5284002", "0.52691275", "0.5266223", "0.52549094", "0.5247619", "0.5240836", "0.5237357", "0.52350575", "0.5226923", "0.52142006", "0.5204779", "0.5204352", "0.5203187", "0.5199263", "0.519508", "0.51902467", "0.51842755", "0.5180261", "0.51801145", "0.5169503", "0.5168721", "0.5163429", "0.5161442", "0.51550967", "0.51513433", "0.5131732", "0.51311076", "0.5117548", "0.5115979", "0.5115086", "0.5113633", "0.51115113", "0.5108546", "0.5104795", "0.5103147", "0.5101803", "0.5087343", "0.5087129", "0.50861067", "0.5086074", "0.5080059", "0.50778013", "0.5071849" ]
0.5504679
40
Check all market options
public static void CheckMarketOptions(WebDriver driver) { String[] expectedMarkets = {"Forex","Major Pairs","Minor Pairs","Smart FX","Indices","Asia/Oceania", "Europe/Africa","Middle East","Americas","OTC Indices","OTC Stocks","Germany","India","UK","US", "Commodities","Metals","Energy","Volatility Indices","Continuous Indices","Daily Reset Indices"}; WebElement element = Trade_Page.select_Market(driver); ListsUtil.CompareLists(expectedMarkets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "public void priceCheck() {\n\t\tnew WLPriceCheck().execute(\"\");\n\t}", "public void checkAuctions() {\n\n checkDutchAuctions();\n checkSecondPriceAuctions();\n }", "public boolean isSetPriceList();", "public void checkDefaultData() {\n mListForCurrencyDialog.clear();\n mListForOrganizationsDialog.clear();\n\n mPositionOfCurInList = -1;\n mPositionOfOrgInList = -1;\n for (int i = 0; i < mMainListForActions.size(); i++) {\n if (mMainListForActions.get(i).getCurrency().getShortTitle().toUpperCase().equals(mCurrencyShortForm)) {\n mPositionOfCurInList = i;\n List<OrganizationsEntity> org = mMainListForActions.get(i).getOrganizations();\n for (int j = 0; j < org.size(); j++) {\n if (org.get(j).getId().equals(mOrganizationId)) {\n mPositionOfOrgInList = j;\n }\n }\n }\n mListForCurrencyDialog.add(new RecyclerViewDataDialogList(false,\n mMainListForActions.get(i).getCurrency().getTitleUkr(),\n mMainListForActions.get(i).getCurrency().getTitleRus(),\n mMainListForActions.get(i).getCurrency().getTitleEng()));\n }\n\n if (mPositionOfCurInList == -1) {\n mPositionOfCurInList = 0;\n mCurrencyShortForm = mMainListForActions.get(0).getCurrency().getShortTitle().toUpperCase();\n }\n if (mPositionOfOrgInList == -1) {\n mPositionOfOrgInList = 0;\n mOrganizationId = mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getId();\n }\n mPreferenceManager.setConverterCurrencyShortForm(mCurrencyShortForm);\n mPreferenceManager.setConverterOrganizationId(mOrganizationId);\n mListForCurrencyDialog.get(mPositionOfCurInList).setChecked(true);\n List<OrganizationsEntity> org = mMainListForActions.get(mPositionOfCurInList).getOrganizations();\n for (int i = 0; i < org.size(); i++) {\n boolean isChecked = false;\n if (mPositionOfOrgInList == i) {\n isChecked = true;\n }\n for (CurrenciesEntity cur : org.get(i).getCurrencies()) {\n if (cur.getShortTitle().toUpperCase().equals(mCurrencyShortForm)) {\n mListForOrganizationsDialog.add(new RecyclerViewDataDialogListOrganizations(isChecked,\n org.get(i), cur));\n }\n }\n }\n getPurchaseAndSaleValue(mPositionOfCurInList, mPositionOfOrgInList);\n }", "private void setOneAllChecks() {\r\n\r\n checkIman.setEnabled(true);\r\n checkBonferroni.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n checkHochberg.setEnabled(true);\r\n checkHommel.setEnabled(true);\r\n checkHolland.setEnabled(true);\r\n checkRom.setEnabled(true);\r\n checkFinner.setEnabled(true);\r\n checkLi.setEnabled(true);\r\n\r\n }", "boolean hasExchangeprice();", "private boolean isAllTestsRun() {\n Collection<TestPackage> pkgs = getTestPackages();\n for (TestPackage pkg : pkgs) {\n if (!pkg.isAllTestsRun()) {\n return false;\n }\n }\n return true;\n }", "boolean hasAll();", "boolean hasAll();", "public static boolean runAllTests() {\r\n\r\n return testLinkedCart() && testAlphabetListConstructorIsEmpty()\r\n && testAlphabetListConstructorBadInput() && testAlphabetListAddBadInput1()&&\r\n testAlphabetListAddBadInput2()&&testAlphabetListAddBadInput2()&&\r\n testAlphabetListAdd() && testAlphabetListRemove();\r\n }", "boolean CanBuySettlement();", "private boolean setupEconomy() {\n if (getServer().getPluginManager().getPlugin(\"Vault\") == null) {\n return false;\n }\n RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);\n if (rsp == null) {\n return false;\n }\n econ = rsp.getProvider();\n return econ != null;\n }", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean isOptionsConsistentIncludingAllRequired(Integer optionId1,\n Integer optionId2);", "private void checkProducts() {\n for (JButton prodButton : productButtons) {\n if (inventoryManager.checkProductAvailability(prodButton.getText())) {\n prodButton.setEnabled(true);\n } else {\n prodButton.setEnabled(false);\n }\n }\n }", "private void setMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(true);\r\n checkShaffer.setEnabled(true);\r\n checkBergman.setEnabled(true);\r\n\r\n checkIman.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n }", "public void matchBets(MarketRunners marketRunners);", "public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "boolean hasBuyDescribe();", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public void queryAllBuyableItems(){\r\n awsAppSyncClient.query(ListBuyableItemsQuery.builder().build())\r\n .responseFetcher(AppSyncResponseFetchers.CACHE_AND_NETWORK)\r\n .enqueue(getAllBuyableItemsCallback);\r\n }", "@Test(priority=3)\r\n\tpublic void displaySalesOptions() {\r\n\t\t\r\n\t\tboolean expected=true;\r\n\t\tboolean actual=filterReturnsList.displaySalesList();\r\n\t\tassertEquals(actual, expected);\r\n\t}", "public void doClickOnUseAllCondSetsRBtn() {\n\t\tuseAllCondSetsRBtn.doClick();\n\t}", "@And(\"Check if appliances is drop down option .print true if {string} is an option.print false otherwise\")\n public void checkIfAppliancesIsDropDownOptionPrintTrueIfIsAnOptionPrintFalseOtherwise(String optionCheck) {\n\n if(allOptions.contains(optionCheck)){\n System.out.println(\"this is inside dropdown options\");\n }else {\n System.out.println(\"this is NOT dropdown options\");\n }\n }", "private void cheakIfDataIsAll(){\n\n try {\n if (categoryId.equals(\"0\")){\n categoryId = \"\";\n }\n\n if (Filter.itemMaxPrice.equals(\"all\")) {\n Filter.itemMaxPrice = \"\";\n\n }if(Filter.itemMinPrice.equals(\"all\")){\n Filter.itemMinPrice = \"\";\n\n } if(Filter.itemMinPrice.equals(\"all\")){\n Filter.itemMinPrice = \"\";\n\n }if(Filter.itemMaxArea.equals(\"all\")){\n Filter.itemMaxArea = \"\";\n\n }else if(Filter.itemMinArea.equals(\"all\")){\n Filter.itemMinArea = \"\";\n\n }if(Filter.itemMaxBedroom.equals(\"all\")){\n Filter.itemMaxBedroom = \"\";\n\n } if(Filter.itemMinBedroom.equals(\"all\")){\n Filter.itemMinBedroom = \"\";\n\n } if(Filter.itemMaxBathroom.equals(\"all\")){\n Filter.itemMaxBathroom = \"\";\n\n } if(Filter.itemMinBathroom.equals(\"all\")){\n Filter.itemMinBathroom = \"\";\n\n }if(Filter.locationOfSpinner.equals(\"all\")) {\n Filter.locationOfSpinner = \"\";\n }\n\n }catch (Exception e){}\n\n }", "private void checkCheckboxes(Order orderToLoad) {\n Map<String, CheckBox> checkBoxes = new TreeMap<>(){{\n put(\"PNEU\",pneuCB);\n put(\"OIL\",oilCB);\n put(\"BATTERY\",batCB);\n put(\"AC\",acCB);\n put(\"WIPER\",wipCB);\n put(\"COMPLETE\",comCB);\n put(\"GEOMETRY\",geoCB);\n }};\n for (String problem : orderToLoad.getProblems()) {\n if (checkBoxes.containsKey(problem)){\n checkBoxes.get(problem).setSelected(true);\n }\n }\n }", "@Test\r\n\tpublic void submit_after_test7() {\r\n\t\tSelect sel = new Select(driver.findElement(By.cssSelector(\"#searchCondition\")));\r\n\t\t\r\n\t\t//select option의 값 배열에 저장\r\n\t\tList<String> temp = new ArrayList<String>();\r\n\t\tfor(WebElement val : sel.getOptions()) {\r\n\t\t\ttemp.add(val.getText());\r\n\t\t}\r\n\t\t\r\n\t\t//예상되는 select option의 값\r\n\t\tString[] chk_sel_option = {\"Name\",\"ID111\"};\r\n\t\t\r\n\t\tassertArrayEquals(temp.toArray(), chk_sel_option);\r\n\t}", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "@Test\n\tpublic void testApplyToOptions_SetEquate_Selection() {\n\n\t\t// put the cursor on a scalar\n\t\tputCursorOnOperand(0x1004bbd, 0);\n\n\t\t// make a selection containing the scalar above.\n\t\tmakeSelection(tool, program, addr(\"1004bbd\"), addr(\"1004bc5\"));\n\n\t\tSetEquateDialog d = showSetEquateDialog();\n\n\t\tJRadioButton applyToCurrentButton =\n\t\t\t(JRadioButton) findComponentByName(d.getComponent(), \"applyToCurrent\");\n\t\tfinal JRadioButton applyToSelectionButton =\n\t\t\t(JRadioButton) findComponentByName(d.getComponent(), \"applyToSelection\");\n\t\tfinal JRadioButton applyToAllButton =\n\t\t\t(JRadioButton) findComponentByName(d.getComponent(), \"applyToAll\");\n\t\tJCheckBox overwriteExistingEquatesButton =\n\t\t\t(JCheckBox) findComponentByName(d.getComponent(), \"Overwrite\");\n\n\t\t//change as of 7.0 - dialog should come up with \"current location\" enabled.\n\t\tassertNotNull(applyToCurrentButton);\n\t\tassertTrue(applyToCurrentButton.isEnabled());\n\t\tassertFalse(applyToCurrentButton.isSelected());\n\n\t\t//have selection in this case so should be enabled but not selected\n\t\tassertNotNull(applyToSelectionButton);\n\t\tassertTrue(applyToSelectionButton.isEnabled());\n\t\tassertTrue(applyToSelectionButton.isSelected());\n\n\t\t//entire program should be enabled but not selected\n\t\tassertNotNull(applyToAllButton);\n\t\tassertTrue(applyToAllButton.isEnabled());\n\t\tassertFalse(applyToAllButton.isSelected());\n\n\t\t//overwrite existing should be visible and enabled, but not selected\n\t\tassertTrue(overwriteExistingEquatesButton.isVisible());\n\t\tassertTrue(overwriteExistingEquatesButton.isEnabled());\n\t\tassertFalse(overwriteExistingEquatesButton.isSelected());\n\n\t\t//select applyToSelection and verify that the other buttons respond accordingly\n\t\tapplyToSelectionButton.setSelected(true);\n\t\trunSwing(\n\t\t\t() -> applyToSelectionButton.getActionListeners()[0].actionPerformed(null));\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tassertFalse(applyToAllButton.isSelected());\n\t\tassertFalse(applyToCurrentButton.isSelected());\n\t\tassertTrue(applyToSelectionButton.isSelected());\n\t\tassertTrue(overwriteExistingEquatesButton.isEnabled());\n\t\tassertFalse(overwriteExistingEquatesButton.isSelected());\n\n\t\tclose(d);\n\t}", "public void verifyAllCheckBoxIsCheckOrUnCheck(boolean isCheck) {\n try {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBoxIsCheckOrUnCheck(eleToDoCheckboxRow, isCheck);\n }\n if (!checkEmptyToDoCompleteListRow) {\n if (result)\n checkAllCheckBoxIsCheckOrUnCheck(eleToDoCompleteCheckboxRow, isCheck);\n }\n Assert.assertTrue(result, \"All checkbox do not check/uncheck\");\n if (isCheck) {\n NXGReports.addStep(\"All check box are check in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"All check box are uncheck in ToDo page\", LogAs.PASSED, null);\n }\n\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: All check box are not check in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: All check box are not uncheck in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }\n }", "@When(\"verify list of options\")\n\tpublic void verify_list_of_options() {\n\t int sizeoflist = driver.findElements(By.xpath(\"//*[@class='admin-tab-menus']//child::li\")).size();\n\t\t//*[@id=\"page-content-wrapper\"]/div/div[1]/div/div[1]/ul\n\t System.out.println(\"The lists of different settings counts are: \" +sizeoflist);\n\t}", "public boolean isSomethingBuyable(GameClient game){\n for(Level l : Level.values()){\n for(ColorDevCard c : ColorDevCard.values()){\n try {\n NumberOfResources cost = dashBoard[l.ordinal()][c.ordinal()].getCost();\n cost = cost.safe_sub(game.getMe().getDiscounted());\n game.getMe().getDepots().getResources().sub(cost);\n return true;\n } catch (OutOfResourcesException | NullPointerException ignored) {}\n }\n }\n return false;\n }", "@Test(enabled = true)\n\tpublic void TC_004_contextSearch_Petrophysical_CLDB_OFDB_Links_CheckAll_All_Excel() throws Throwable {\n\t\tReporter.log(\"CLDB/OFDB Links\", true);\n\t\thomepage = new homePage(driver);\n\t\tReporter.log(\"Browser Opened\", true);\n\t\thomepage.adminViaDropDown(homepage.getCountryDropdown(), \"NETHERLANDS\");\n\t\thomepage.adminViaDropDown(homepage.getAssetDropdown(), \"Wellbore\");\n\t\thomepage.adminViaDropDown(homepage.getColumnDropdown(), \"--All Columns--\");\n\n\t\tcontextsearch contextpage = homepage.selectText(\"Anjum*\");\n\n\t\tReporter.log(\"All Fields Selected\", true);\n\t\tcontextsearch selectCLDB_OFDB_Links = contextpage.selectAllcheck().selectPetrophysical();\n\n\t\tfetchingReports fetchingReports = selectCLDB_OFDB_Links.selectreporting(\"CLDB/OFDB Links\");\n\n\t\tfetchingReports.switchWindows();\n\t\tdriver.manage().window().maximize();\n\n\t\tThread.sleep(200);\n\t\tReporter.log(\"CLDB/OFDB Links selected\", true);\n\n\t\tfetchingReports.fetchDailyWellReport(true, \"All\", \"excel\");\n\t\tThread.sleep(300);\n\t\tReporter.log(\"export options Withoutcheck\", true);\n\n\t}", "public boolean isBuyable();", "Collection<String> getAllSupportedCurrenciesByShops();", "void checkForApps();", "private boolean checkingAllArguments() {\n\t\t\n\t\t// test if the four player types have been selected\n\t\tfor(int i=0;i<allButtons.size();i++) {\n\t\t\tif(allButtons.get(i)==null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// test if the seed is in the correct format\n\t\tif(!(seed.textProperty().get().isEmpty())){\n\t\t\ttry {\n\t\t\t\tgameSeed = Long.parseLong(seed.getText());\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tmenuMessage.setText(\"Given seed is not a valid number\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t// test if for each of the players the given arguments are correct\n\t\tfor(int i = 0; i < allButtons.size(); ++i) {\n\t\t\tchar playerType = allButtons.get(i).getText().charAt(0);\n\t\t\tString argument = texts.get(2 * i + 1).getText();\n\t\t\t\n\t\t\tif(!argument.isEmpty()) {\n\t\t\t\tswitch(playerType) {\n\t\t\t\t\n\t\t\t\tcase 'S' : \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlong l = Long.parseLong(texts.get(2 * i + 1).getText());\n\t\t\t\t\t\tif(l < 9) {\n\t\t\t\t\t\t\tmenuMessage.setText(\"The iteration value must be at least 9\");\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tmenuMessage.setText(\"One of the iteration number is not a valid number\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'R' :\n\t\t\t\t\t\n\t\t\t\t\tString[] parts = StringSerializer.split(\"\\\\.\", argument); \n\t\t\t\t\t\n\t\t\t\t\tif (parts.length != 4) { \n\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tfor (String str : parts) { \n\t\t\t\t\t\tint j = Integer.parseInt(str); \n\t\t\t\t\t\tif ((j < 0) || (j > 255)) { \n\t\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn true;\n\t}", "private boolean setupEconomy() {\n\t\tRegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager()\n\t\t\t\t.getRegistration(net.milkbowl.vault.economy.Economy.class);\n\t\tif (economyProvider != null)\n\t\t\teconomy = economyProvider.getProvider();\n\t\t\n\t\treturn (economy != null);\n\t}", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "@Test\n public void checkAllViews() {\n checkSearchViewExists();\n checkBaselineHints();\n checkSpinnerText();\n }", "boolean isSetMultipleBetMinimum();", "public List<Option> _obtainAllNonAvailableOptions() {\n\t\tCursor cursor = activity.getContentResolver().query(\n\t\t\t\tOptionDAO.QUERY_NON_AVAILABLE_OPTIONS_URI, null, null, null,null);\n\t\tArrayList<Option> lstResult = OptionDAO.createObjects(cursor);\n\t\tcursor.close();\n\t\treturn lstResult;\n\t}", "@Override\r\n\tpublic boolean isValid(List<String> checkList, ConstraintValidatorContext cvc) {\n\r\n\t\tif (checkList == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif (java.util.Arrays.asList(optionList).containsAll(checkList)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "boolean isOptionIncludingAllRequiredConsistentWithSet(\n Integer optionId, Set<OptionDTO> options);", "@Test\n\tpublic void testGetOptions_1()\n\t\tthrows Exception {\n\t\tRadioGroup fixture = new RadioGroup();\n\t\tfixture.setOptions(new ArrayList<String>());\n\n\t\tList<String> result = fixture.getOptions();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "public void verifyCheckAllCheckBoxIsCheckOrUncheck(boolean isCheck) {\n waitForVisibleElement(eleCheckAllCheckBox, \"CheckAll check box\");\n if (isCheck) {\n if (!eleCheckAllCheckBox.isSelected()) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: CheckAll check box do not auto check in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return;\n }\n } else {\n if (eleCheckAllCheckBox.isSelected()) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: CheckAll check box do not auto uncheck in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return;\n }\n }\n if (isCheck) {\n NXGReports.addStep(\"'CheckAll' check box is check when check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"'CheckAll' check box is uncheck when uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }", "@Override\n\tpublic List<WinDescribeTicket> checkAllOrderWin(Ticket ticket,\n\t\t\tList<PrizeLevel> prizeLevels) {\n\t\t Map<String, PrizeLevel> bingoMap = new HashMap<String, PrizeLevel>();\n\t for (PrizeLevel pr : prizeLevels) {\n\t bingoMap.put(pr.getName(), pr);\n\t }\n\t String result = ticket.getOrder().getTerm().getResult();\n\t Klpk3BingoCheck dbc = new Klpk3BingoCheck();\n\t List<WinDescribeTicket> list = dbc.execute(ticket, bingoMap, result);\n\t return list;\n\t}", "private void checkResetAllRegsAndFlags() {\r\n\t\t//for(int i = 1026; i <= 1028; i++ ) {\r\n\t\tSystem.out.println(\"Checking x val\"+sim40.memory[Simulator.XREG_ADDRESS]);\r\n\t\t\r\n\t\tcheckResetRegisterFlag(Simulator.ACCUMULATOR_ADDRESS);\r\n\t\t\tcheckResetRegisterFlag(Simulator.XREG_ADDRESS);\r\n\t\t\tcheckResetRegisterFlag(Simulator.YREG_ADDRESS);\r\n\t\t\t\r\n\t\t\t\r\n\t\t//}\r\n\t}", "boolean isSetPowerBox();", "public static void options(){\n //player 1 not enough cards\n if(hand1.isEmpty()){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"Not enough cards, Player 1 loses\");\n outcome = 2;\n outcomes();\n //player 2 not enough cards\n }else if(hand2.isEmpty()){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"Not enough cards, Player 2 loses\");\n outcome = 1;\n outcomes();\n //tie by both 0 cards\n }else if(hand1.isEmpty()&&hand2.isEmpty()){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"No winner\");\n outcome = 3;\n outcomes();\n }\n }", "void check()\n {\n final ScopeSymbolValidator validator = new ScopeSymbolValidator();\n for (ServiceMethod method : methods)\n validator.validate(method.getName(), method);\n }", "public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"d:\\\\java\\\\workspace\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n\t\t// Using assert for checking expected values or result\n\t\tdriver.get(\"https://www.spicejet.com/\");\n\t\tdriver.findElement(By.cssSelector(\"input[id*='ctl00_mainContent_chk_IndArm']\")).click();\n\t\tSystem.out.println(driver.findElement(By.cssSelector(\"input[id*='ctl00_mainContent_chk_IndArm']\")).isSelected());\n\t\tAssert.assertTrue(driver.findElement(By.cssSelector(\"input[id*='ctl00_mainContent_chk_IndArm']\")).isSelected());\n\t\t\n//\t\tTotal check box count \n\t\t\n\t\tSystem.out.println(driver.findElements(By.cssSelector(\"input[type*='checkbox']\")).size());\n\t\tAssert.assertEquals(driver.findElements(By.cssSelector(\"input[type*='checkbox']\")).size(), \"8\");\n\t\t\n\t\t\n\t\tdriver.close();\n\t}", "boolean accepts(String optionName);", "void askBuyDevCards();", "public void getStoreCheckins( String store_id ){\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"store_id\", store_id);\r\n String url = API_DOMAIN + STORE_EXT + GET_CHECKINS;\r\n this.makeVolleyRequest( url, params );\r\n }", "private static boolean isAllItemsAreNotSoldOut(List<Chef> foodItemList) {\n boolean result = false;\n for (int i = 0; i < foodItemList.size(); i++) {\n for (int j = 0; j < foodItemList.get(i).getFoodItemList().size(); j++) {\n if (foodItemList.get(i).getFoodItemList().get(j).getAvailQty() == 0 || !foodItemList.get(i).getFoodItemList().get(j).getAvailable()) {\n result = true;\n }\n }\n }\n return result;\n }", "public void checkOrUnCheckAllCheckBox(boolean isCheck) {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // verify \"CheckAll\" check box is checked when all check box are check\n //// check all check box in ToDo page\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBox(eleToDoCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n\n if (!checkEmptyToDoCompleteListRow) {\n result = checkAllCheckBox(eleToDoCompleteCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n if (result) {\n NXGReports.addStep(\"Check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"Uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }", "public void checkAndExecute(){\n if(priceListener.getSecurityPrice() < buyPrice){\n executionService.buy(security, buyPrice, 100);\n // if the price < buyPrice then executionService.buy(buyquantity)\n }else if ( priceListener.getSecurityPrice() > sellPrice ) {\n executionService.sell(security, buyPrice, 100);\n }\n }", "public boolean allAre(ISelect s){\r\n return true; \r\n }", "boolean validateAll(String... vendorCodes);", "@Test\r\n\tpublic void comparePrices() throws Exception{\n\t\tstartApp(\"chrome\", \"https://www.flipkart.com\");\r\n\t\t//close the login pop up\r\n\t\tclickNoSnap(locateElement(\"xpath\",\"//button[text()='✕']\"));\r\n\t\t//Mouse over to Tv's & appliances\r\n\t\tWebElement eleTvApp = locateElement(\"xpath\",\"//span[text()='TVs & Appliances']\");\r\n WebElement eleSamsung = locateElement(\"xpath\",\"(//span[text()='Samsung'])[2]\");\r\n // clickNoSnap on Samsung product\r\n //Actions builder = new Actions(driver);\r\n //builder.moveToElement(eleTvApp).pause(2000).clickNoSnap(eleSamsung).perform();\r\n mouseOverElement(eleTvApp,eleSamsung);\r\n // In Price filter, select max price to 60000\r\n selectDropDownUsingText(locateElement(\"xpath\",\"(//select[@class='fPjUPw'])[1]\"),\"₹20000\");\r\n\t\t// In Price filter, select min price to 25000\r\n selectDropDownUsingText(locateElement(\"xpath\",\"(//select[@class='fPjUPw'])[2]\"),\"₹60000\");\r\n //clickNoSnap on screen size filter\r\n clickNoSnap(locateElement(\"xpath\",\"//div[text()='Screen Size']\"));\r\n //clickNoSnap on 48 to 55 size box\r\n clickNoSnap(locateElement(\"xpath\",\"//div[text()='48 - 55']\"));\r\n timeOuts();\r\n //clickNoSnap on the first product\r\n clickNoSnap(locateElement(\"xpath\",\"(//div[@class='_3wU53n'])[1]\"));\r\n //switch to new window\r\n switchToWindow(1);\r\n //clickNoSnap on compare check box\r\n clickNoSnap(locateElement(\"xpath\",\"//span[text()='Compare']\"));\r\n //close the window\r\n closeBrowser();\r\n //switch back to parent window\r\n switchToWindow(0);\r\n //clickNoSnap on second product\r\n clickNoSnap(locateElement(\"xpath\",\"(//div[@class='_3wU53n'])[2]\"));\r\n //switch to new window\r\n switchToWindow(1);\r\n //clickNoSnap on compare check box\r\n clickNoSnap(locateElement(\"xpath\",\"//span[text()='Compare']\"));\r\n // clickNoSnap on compare button\r\n clickNoSnap(locateElement(\"xpath\",\"//span[text()='COMPARE']\"));\r\n // get the price of 1 st product\r\n String priceOfFirstProduct = getText(locateElement(\"xpath\",\"(//div[@class='_1vC4OE'])[1]\"));\r\n // get the proce of 2 nd product\r\n String priceOfSecondProduct = getText(locateElement(\"xpath\",\"(//div[@class='_1vC4OE'])[2]\"));\r\n //Extract numbers only from price\r\n String numberOnlyFirst = priceOfFirstProduct.replaceAll(\"[^0-9]\", \"\");\r\n String numberOnlySecond = priceOfSecondProduct.replaceAll(\"[^0-9]\", \"\");\r\n //Converting String to Int\r\n int firstPrice = Integer.parseInt(numberOnlyFirst);\r\n int secondPrice = Integer.parseInt(numberOnlySecond);\r\n // compare the price\r\n System.out.println(firstPrice);\r\n System.out.println(secondPrice);\r\n if(firstPrice < secondPrice)\r\n {\r\n \t clickNoSnap(locateElement(\"xpath\",\"(//button[@class='_2AkmmA _2Npkh4 _2kuvG8 e1kKGU _7UHT_c'])[1]\"));\r\n \t \r\n }else {\r\n \t clickNoSnap(locateElement(\"xpath\",\"(//button[@class='_2AkmmA _2Npkh4 _2kuvG8 e1kKGU _7UHT_c'])[2]\"));\r\n }\r\n}", "private void computeCoffeeMaker(){\n HashMap<String,String> notAvailableBeverages = coffeeMakerService.getNotAvailableBeverages();\n ArrayList<String> beverageNames = coffeeMakerService.getBeveragesName();\n for (String beverage: beverageNames) {\n if(notAvailableBeverages.containsKey(beverage)){\n System.out.println(notAvailableBeverages.get(beverage));\n }else{\n if(coffeeMakerService.canPrepareBeverage(beverage)){\n coffeeMakerService.prepareBeverage(beverage);\n System.out.println(beverage+\" is prepared\");\n }else{\n System.out.println(coffeeMakerService.getReasonForNotPreparation(beverage));\n }\n }\n }\n }", "static public void verificaParametros()\r\n \r\n {\r\n SynthesizerModeDesc synthesizerModeDescTemp = (SynthesizerModeDesc)synthesizer.getEngineModeDesc();\r\n System.out.println(\"Nome do engine utilizado: \"+synthesizerModeDescTemp.getEngineName());\r\n System.out.println(\"Nome do modo de funcionamento utilizado: \"+synthesizerModeDescTemp.getModeName());\r\n \tSystem.out.println(\"Nome da localidade utilizada: \"+synthesizerModeDescTemp.getLocale().toString());\r\n \t\t//verifica a flag de controle\r\n if(synthesizerModeDescTemp.getRunning()!=null)\r\n if(synthesizerModeDescTemp.getRunning().booleanValue())\r\n System.out.println(\"Engine rodando.\");\r\n else\r\n System.out.println(\"Engine parado.\");\r\n else\r\n System.out.println(\"A flag de controle não foi setada e tem valor nulo.\");\r\n \t\t//mostra as vozes suportadas\r\n Voice[] VoiceTemp = synthesizerModeDescTemp.getVoices();\r\n for(int i=0;i<VoiceTemp.length;i++)\r\n {\r\n System.out.println(\"Voz numero \"+(i+1)+\" : \"+VoiceTemp[i].getName());\r\n }\r\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C://Users//NikilaPC//Downloads//geckodriver-v0.24.0-win64//geckodriver.exe\");\t\n\n\t\tWebDriver driver = new FirefoxDriver();\n\t\t\n//\t\tdriver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);\n//\t\tdriver.navigate().to(\"https://www.calculator.net/mortgage-payoff-calculator.html\");\n//\t\tdriver.manage().window().maximize();\n//\t\tdriver.findElement(By.id(\"cpayoff1\")).click();\n//\t\t\n//\t\tSystem.out.println(\"The output of isSlelected is : \"+driver.findElement(By.id(\"cpayoff1\")).isSelected());\n//\t\t\n//\t\tSystem.out.println(\"The output of isEnabled is : \"+driver.findElement(By.id(\"cpayoff1\")).isEnabled());\n//\n//\t\tSystem.out.println(\"The output of isDisplayed is : \"+driver.findElement(By.id(\"cpayoff1\")).isDisplayed());\n//\n//\t\t\n//\t\tdriver.close();\n\n\t\t\n\t\t//**********for checkbox***********\n\t\tdriver.navigate().to(\"https://www.calculator.net/mortgage-calculator.html\");\n\t\t\t\t\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.findElement(By.id(\"caddoptional\")).click();\n\t\tSystem.out.println(\"The result is:\" +driver.findElement(By.id(\"caddoptional\")).isEnabled());\n\t\tSystem.out.println(\"the result of isSelected :\"+driver.findElement(By.id(\"caddoptional\")).isSelected());\n\t\tdriver.close();\n\t\t\n\t}", "protected void performApply() {\n\n for (int i = 0; i < providers.getItemCount(); i++) {\n\n //TODO: The checkboxes are buggy. Sometimes the provider in the table - representation\n // seems not to be the correct VilArgumentProvier.\n if (providers.getItem(i).getChecked()) {\n VilArgumentProvider.getProvider(i).setActive(true);\n } else {\n VilArgumentProvider.getProvider(i).setActive(false);\n }\n \n //the arguments are in column 4..\n try {\n //Set the free arguments\n VilArgumentProvider.getProvider(i).setFreeArguments(providers.getItem(i).getText(4).trim().toString());\n } catch (NullPointerException e) {\n VilArgumentProvider.getProvider(i).setFreeArguments(\"\");\n }\n \n EASyPreferenceStore.persistVilArgumentProviderStates();\n }\n }", "public boolean[] checkAvailableMode()\n {\n if (player == null)\n throw new IllegalStateException(\"Carta: \" + name + \" non appartiene a nessun giocatore.\");//If this card doesn't belong to any player, it launches an exception\n\n\n availableMethod[0] = false;//I suppose that the modes can't be used\n availableMethod[1] = false;\n availableMethod[2] = false;\n\n List<Square> squareList = new ArrayList<>();\n\n squareList.addAll(MethodsWeapons.squareThatSee(player));\n squareList.remove(player.getSquare());\n\n\n if (isLoaded() && MethodsWeapons.areSquareISeeNotMineNotEmpty(player, squareList))\n availableMethod[0] = true;\n\n if (isLoaded() && player.getAmmoBlue() > 0 && (!checkRocketJumpColors().isEmpty()) && availableMethod[0])\n availableMethod[1] = true;\n\n\n if (isLoaded() && player.getAmmoYellow() > 0 && availableMethod[0])\n availableMethod[2] = true;\n\n return availableMethod;\n\n }", "boolean hasPrice();", "boolean hasPrice();", "boolean hasPrice();", "private void initChecks(){\r\n\t \r\n\t //functions\r\n\t if(ckFun == null)\r\n\t ckFun\t= new JAbstractCheckAll(this) {\r\n\t\t\t/**\r\n\t\t * \r\n\t\t */\r\n\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(\"Entered in ckFun OnUnCheck\");\r\n\t\t\t\tchecAll(getFunTbl().getModel().getData(), false);\r\n\t\t\t\tgetFunTbl().updateUI();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void OnCkeck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(\"Entered in ckFun OnCheck\");\r\n\t\t\t\tchecAll(getFunTbl().getModel().getData(), true);\r\n\t\t\t\tgetFunTbl().updateUI();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t //packages\r\n\t if(ckPack == null)\r\n\t ckPack = new JAbstractCheckAll(this) {\r\n\t\t\t/**\r\n\t\t * \r\n\t\t */\r\n\t\t\t\r\n\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tchecAll(getPackTbl().getModel().getData(), false);\r\n\t\t\t\tgetPackTbl().updateUI();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void OnCkeck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tchecAll(getPackTbl().getModel().getData(), true);\r\n\t\t\t\tgetPackTbl().updateUI();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t//procedures\r\n\t\tif(ckProc == null)\r\n\t\tckProc = new JAbstractCheckAll(this) {\r\n\t\t\t/**\r\n\t\t * \r\n\t\t */\r\n\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tchecAll(getProcTbl().getModel().getData(), false);\r\n\t\t\t\tgetProcTbl().updateUI();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void OnCkeck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tchecAll(getProcTbl().getModel().getData(), true);\r\n\t\t\t\tgetProcTbl().updateUI();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t//schemas\r\n\t\tif(ckSchema == null) \r\n\t\t\tckSchema = new JAbstractCheckAll(this) {\r\n\t\t\t/**\r\n\t\t * \r\n\t\t */\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tchecAll(getSchTbl().getModel().getData(), false);\r\n\t\t\t\tgetSchTbl().updateUI();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void OnCkeck(Object o) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tchecAll(getSchTbl().getModel().getData(), true);\r\n\t\t\t\tgetSchTbl().updateUI();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t//set check texts\r\n\t\tckFun.setText(\"Select All\");\r\n\t\tckPack.setText(\"Select All\");\r\n\t\tckSchema.setText(\"Select All\");\r\n\t\tckProc.setText(\"Select All\");\r\n\t}", "@Override\n public void onCheckStocksRaised() {\n if (coffeeStock <= 0) {\n coffeeButton.setEnabled(false);\n }\n if (espressoStock <= 0) {\n espressoButton.setEnabled(false);\n }\n if (teaStock <= 0) {\n teaButton.setEnabled(false);\n }\n if (soupStock <= 0) {\n soupButton.setEnabled(false);\n }\n if (icedTeaStock <= 0) {\n icedTeaButton.setEnabled(false);\n }\n if (syrupStock <= 0) {\n optionSugar.setEnabled(false);\n }\n if (vanillaStock <= 0) {\n optionIceCream.setEnabled(false);\n }\n if (milkStock <= 0) {\n optionMilk.setEnabled(false);\n }\n if (breadStock <= 0) {\n optionBread.setEnabled(false);\n }\n if (sugarStock <= 4) {\n sugarSlider.setMaximum(sugarStock);\n }\n }", "void askBuyResources();", "public void clickVeteranServiceAll() {\n rbVeteranServiceAll.click();\n }", "@Ignore\n\t@Test\n\tpublic void test_getAllPairs() throws Exception {\n\t\tString allPairsUrl = \"https://btc-e.com/api/3/ticker/btc_usd-btc_rur-btc_eur-eur_rur-usd_rur-eur_usd\";\n\t\t// BTC, USD, EUR, RUR\n\t\tString [] pairsInMaster = {\"btc_usd\", \"btc_rur\", \"btc_eur\", \"eur_rur\", \"usd_rur\", \"eur_usd\"};\n\t\tList<String> pairs = Arrays.asList(pairsInMaster);\n\t\tSet<String> pairsSet = new HashSet<>(pairs);\n\t\t\n\t\tBtceQuotePuller puller = new BtceQuotePuller();\n\t\tpuller.setMasterUrl(allPairsUrl, pairsSet);\n\t\t\n\t\tList<IQuoteDataContainer> quotes = puller.getData();\n\t\t\n\t\tfor(IQuoteDataContainer quote : quotes) {\n\t\t\tAssert.assertNotNull(quote.getCurrencyPairCode());\n\t\t\tAssert.assertNotNull(quote.getLast());\n\t\t\tAssert.assertNotNull(quote.getStartCurrency());\n\t\t\tAssert.assertNotNull(quote.getEndCurrency());\n\t\t\tAssert.assertNotNull(quote.getTimestamp());\n\t\t}\n\t\t\n\t\t\n\t\tCurrencyGraph graph = GraphFactory.buildUndirectedCurrencyGraph(quotes);\n\t\t// Add to algorithm\n\t\tBFAlgorithm algo = new BFAlgorithm(graph);\n\t\talgo.bellmanFord(\"USD\", \"BTC\");\n\t\talgo.bellmanFord(\"USD\", \"EUR\");\n\t\talgo.bellmanFord(\"USD\", \"RUR\");\n\t\t \n\t}", "boolean canAcceptTrade();", "boolean hasPredefinedValues();", "public static void main(String[] args) throws Exception {\n System.out.println(\"Checking \" + Arrays.toString(args));\n KeyTab ktab = KeyTab.getInstance(args[0]);\n Set<String> expected = new HashSet<>();\n for (int i=1; i<args.length; i += 2) {\n expected.add(args[i]+\":\"+args[i+1]);\n }\n for (KeyTabEntry e: ktab.getEntries()) {\n // KVNO and etype\n String vne = e.getKey().getKeyVersionNumber() + \":\" +\n e.getKey().getEType();\n if (!expected.contains(vne)) {\n throw new Exception(\"No \" + vne + \" in expected\");\n }\n expected.remove(vne);\n }\n if (!expected.isEmpty()) {\n throw new Exception(\"Extra elements in expected\");\n }\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //2. go to https://amazon.com\n driver.get(\"http:amazon.com\");\n // driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n\n //3. Verify the All departments is selected by default\n\n String expectedText=\"All Departments\";\n WebElement selected=driver.findElement(By.id(\"searchDropdownBox\"));\n String selectedText=selected.findElements(By.xpath(\"//option[@selected='selected']\")).get(0).getText();\n\n if (expectedText.equals(selectedText)){\n System.out.println(\"PASS\");\n }else{\n System.out.println(\"FAIL\");\n System.out.println(\"Expected: \"+expectedText);\n System.out.println(\"Actual: \"+selectedText);\n }\n\n\n //4. verify that all options are sorted alphabetically\n\n\n //allOptions.add(driver.findElement(By.xpath(\"//select/[*]\")));\n WebElement dropdown = driver.findElement(By.id(\"searchDropdownBox\"));\n List<WebElement> allOptions= dropdown.findElements(By.tagName(\"option\"));\n String [] links=new String [allOptions.size()];\n\n for (int i=1, a=0; i<=allOptions.size()&& a<allOptions.size(); i++, a++){\n\n\n links [a]=((driver.findElement(By.xpath(\"//select/*[\"+i+\"]\")).getText()));\n\n }\n\n for (int i=0; i<links.length;i++){\n for (int j=0; j<links[i].length(); j++) {\n if (links[i].charAt(j) == ' ') {\n links[i]= links[i].replace(\" \", \"\");\n }\n }\n }\n\n\n\n char z=' ';\n for (int i=0; i<links.length-1; i++) {\n if((!(links[i].toLowerCase().equals(\"women\") ||links[i].toLowerCase().equals(\"men\")||links[i].toLowerCase().equals(\"girls\") ||links[i].toLowerCase().equals(\"boys\")||links[i].toLowerCase().equals(\"baby\") )))\n {\n if (links[i].toLowerCase().charAt(0) <= links[i + 1].toLowerCase().charAt(0))\n {\n continue;\n }\n else\n {\n System.out.println(\"Dropdown menu is not sorted\");\n z ='n';\n break;\n }\n }\n else\n {\n continue;\n }\n }\n\n if (z!='n'){\n System.out.println(\"Dropdown menu is sorted\");\n }\n\n\n //5.Click on the menu icon on the left\n\n WebElement menu=driver.findElement(By.id(\"nav-hamburger-menu\"));\n menu.click();\n\n //6.click on Full Store directory\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n WebElement fullStore0=driver.findElement(By.partialLinkText(\"Full Store\"));\n fullStore0.click();\n\n\n\n\n\n\n }", "boolean CanBuyCity();", "public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"D:\\\\seleniumJars\\\\geckodriver.exe\");\n\t\t\n\t\tFirefoxDriver driver = new FirefoxDriver();\n\t\n\t\tdriver.get(\"https://www.ebay.ca/\");\n\t\t\n\t\tWebElement obj = driver.findElement(By.id(\"gh-cat\"));\n\t\tList<WebElement> allList = obj.findElements(By.tagName(\"option\"));\n\t\t\n\t\t//driver.findElement(By.id(\"gh-cat\")).click();\n\t\t//List<WebElement> allList = driver.findElements(By.xpath(\"//div[@id='gh-cat-box']/select/option\"));\n\t\t\n\t\tSystem.out.println(allList.size());\n\t\t\n\t\tfor(WebElement a:allList)\n\t\t{\n\t\t\tSystem.out.println(a.getText()+\"----\"+a.isSelected()); //gives you a boolean value of a selected text whether it is selected or not\n\t\t}\t\n\t\t\n\t\tSelect s = new Select(obj);\n\t\ts.selectByIndex(2);\n\t\ts.selectByValue(\"6000\");\n\t\ts.selectByVisibleText(\"Books\");\n\t\t\n\t\tSystem.out.println(\"----------------After selection.......\");\n\t\t\n\t\tfor(WebElement a:allList)\n\t\t{\n\t\t\tSystem.out.println(a.getText()+\"----\"+a.isSelected()); //gives you a boolean value of a selected text whether it is selected or not\n\t\t}\t\n\t\t\n\t}", "public void run(){\n ArrayList<ArrayList<Furniture>> all = getSubsets(getFoundFurniture());\n ArrayList<ArrayList<Furniture>> valid = getValid(all);\n ArrayList<ArrayList<Furniture>> ordered = comparePrice(valid);\n ArrayList<ArrayList<Furniture>> orders = produceOrder();\n checkOrder(orders, false);\n }", "public void selectAll() {\n\t\tProductMenu menu = new ProductMenu();\n\t\ttry {\n\t\t\tList<Stock> list = service.selectAll();\n\t\t\tmenu.displayList(list);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private boolean isAllIngredientOk(ArrayList<Boolean> listOfBool) {\n if (listOfBool.isEmpty() || listOfBool.contains(false))\n return false;\n return true;\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "public void check(){\n check1();\n check2();\n check3();\n check4();\n check5();\n check6();\n\t}", "public Boolean isAllEULAsAccepted() {\n return allEULAsAccepted;\n }", "public synchronized Iterator<String> getAllOptions() {\n\t\tSet<String> names = optionTable.keySet();\n\t\tIterator<String> itr = names.iterator();\n\t\treturn itr;\n\t}", "boolean hasIsAutoBet();", "private boolean checkSelectAll(){\n\t\tboolean ans = false;\n\t\tint i =0;//# of *\n\t\tfor(String temp : this.attrList){\n\t\t\tif(temp.equals(\"*\")){\n\t\t\t\t// ans = true;\n\t\t\t\ti++;\n\t\t\t\t// break;\n\t\t\t\tif (i==tableNames.size()) {\n\t\t\t\t\tans = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}" ]
[ "0.5862852", "0.571484", "0.5709352", "0.5638386", "0.55360496", "0.55320895", "0.5497223", "0.5411505", "0.5391812", "0.5384117", "0.5384117", "0.53741884", "0.53719825", "0.53671503", "0.53285944", "0.53285944", "0.53285944", "0.53285944", "0.53285944", "0.53285944", "0.5320603", "0.53083545", "0.52704513", "0.5251057", "0.524589", "0.52448976", "0.5239066", "0.5215038", "0.5206082", "0.5175034", "0.5162825", "0.5158107", "0.51580554", "0.5144921", "0.50990397", "0.50960386", "0.5088129", "0.5079897", "0.50785536", "0.50775325", "0.50649464", "0.5059935", "0.5059067", "0.50578934", "0.5049872", "0.5049487", "0.5045495", "0.50398535", "0.5029671", "0.50256467", "0.50153697", "0.50143236", "0.4998198", "0.4989188", "0.4986722", "0.4983759", "0.4981185", "0.4974984", "0.49747595", "0.49709335", "0.49705368", "0.49691677", "0.4963711", "0.4951726", "0.49469936", "0.4934259", "0.49296638", "0.4926928", "0.4925677", "0.4922228", "0.49213102", "0.49190286", "0.4910768", "0.4906461", "0.49045315", "0.48960948", "0.48949915", "0.48949915", "0.48949915", "0.48935637", "0.48932996", "0.48890817", "0.48884934", "0.48857543", "0.48765737", "0.48718387", "0.48696724", "0.48690912", "0.48653886", "0.4864054", "0.48640272", "0.48634607", "0.48579627", "0.48545128", "0.48545128", "0.48515207", "0.48501778", "0.48485377", "0.48442188", "0.48429364" ]
0.6933545
0
Check underlying assets for Forex market
public static void CheckForexAssets(WebDriver driver) { String[] forexAssets = {"AUD/JPY","AUD/USD","EUR/AUD","EUR/CAD","EUR/CHF","EUR/GBP","EUR/JPY","EUR/USD", "GBP/AUD","GBP/JPY","GBP/USD","USD/CAD","USD/CHF","USD/JPY","AUD/CAD","AUD/CHF","AUD/NZD","AUD/PLN", "EUR/NZD","GBP/CAD","GBP/CHF","GBP/NOK","GBP/NZD","GBP/PLN","NZD/JPY","NZD/USD","USD/MXN","USD/NOK", "USD/PLN","USD/SEK","AUD Index","EUR Index","GBP Index","USD Index"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Forex"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(forexAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasForecast();", "public static void CheckOTCStocksAssets(WebDriver driver) {\n\t\tString[] OTCStocksAssets = {\"Airbus\",\"Allianz\",\"BMW\",\"Daimler\",\"Deutsche Bank\",\"Novartis\",\"SAP\",\"Siemens\",\"Bharti Airtel\",\"Maruti Suzuki\",\"Reliance Industries\",\"Tata Steel\",\"Barclays\",\"BP\",\n\t\t\t\t\"British American Tobacco\",\"HSBC\",\"Lloyds Bank\",\"Rio Tinto\",\"Standard Chartered\",\"Tesco\",\"Alibaba\",\"Alphabet\",\"Amazon.com\",\"American Express\",\"Apple\",\"Berkshire Hathaway\",\"Boeing\",\"Caterpillar\",\n\t\t\t\t\"Citigroup\",\"Electronic Arts\",\"Exxon Mobil\",\"Facebook\",\"Goldman Sachs\",\"IBM\",\"Johnson & Johnson\",\"MasterCard\",\"McDonald's\",\"Microsoft\",\n\t\t\t\t\"PepsiCo\",\"Procter & Gamble\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"OTC Stocks\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(OTCStocksAssets, element);\n\t\t}", "boolean hasHasDeployedAirbag();", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "boolean hasAsset();", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "public static void CheckVolatilityIndicesAssets(WebDriver driver) {\n\t\tString[] VolatilityIndicesAssets = {\"Volatility 10 Index\",\"Volatility 100 Index\",\"Volatility 25 Index\",\"Volatility 50 Index\",\"Volatility 75 Index\",\"Bear Market Index\",\"Bull Market Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Volatility Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(VolatilityIndicesAssets, element);\n\t\t}", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public static void CheckCommoditiesAssets(WebDriver driver) {\n\t\tString[] CommoditiesAssets = {\"Gold/USD\",\"Palladium/USD\",\"Platinum/USD\",\"Silver/USD\",\"Oil/USD\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Commodities\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(CommoditiesAssets, element);\n\t\t}", "private void givenExchangeRateExistsForABaseAndDate() {\n }", "boolean hasTradeCurrency();", "boolean hasExchangeprice();", "@Test\n public void verifyToscaArtifactsExistApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n final int numOfToscaArtifacts = 2;\n ResourceGeneralPage.getLeftMenu().moveToToscaArtifactsScreen();\n AssertJUnit.assertTrue(ToscaArtifactsPage.checkElementsCountInTable(numOfToscaArtifacts));\n\n for (int i = 0; i < numOfToscaArtifacts; i++) {\n String typeFromScreen = ToscaArtifactsPage.getArtifactType(i);\n AssertJUnit.assertTrue(typeFromScreen.equals(ArtifactTypeEnum.TOSCA_CSAR.getType()) || typeFromScreen.equals(ArtifactTypeEnum.TOSCA_TEMPLATE.getType()));\n }\n\n //TODO Andrey should click on certify button\n ToscaArtifactsPage.clickCertifyButton(vfMetaData.getName());\n vfMetaData.setVersion(\"1.0\");\n VfVerificator.verifyToscaArtifactsInfo(vfMetaData, getUser());\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "@SuppressWarnings({ \"deprecation\", \"unchecked\" })\r\n\tpublic void init() throws Exception{\r\n\t\tAsset CurrentAsset;\r\ndouble TotalAmount = CurrentPortfolio.getTotalAmount(CurrentDate);\r\nCurrentPortfolio.sellAssetCollection(CurrentDate);\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US large cap\");\r\nCurrentAsset.setClassID(getAssetClassID(\"US Equity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^GSPC\", TotalAmount/7,\r\n\t\tCurrentDate);\r\n\t\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"IUS small cap\");\r\nCurrentAsset.setClassID(52l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^RUT\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"International Equity\");\r\nCurrentAsset.setClassID(9l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGTSX\", TotalAmount /7,CurrentDate);\r\n\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Real Estate\");\r\nCurrentAsset.setClassID(5l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGSIX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Commodity\");\r\nCurrentAsset.setClassID(getAssetClassID(\"Commodity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"QRAAX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\r\n\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Cash\");\r\nCurrentAsset.setClassID(3l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"CASH\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US Bond\");\r\nCurrentAsset.setClassID(2l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VBMFX\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\r\ninitialAmount=TotalAmount;\r\nwithdrawRate=0.05;\r\n\t}", "public void matchBets(MarketRunners marketRunners);", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "private boolean backTrackUses(ImportPkg ip) {\n if (Debug.packages) {\n Debug.println(\"backTrackUses: check - \" + ip.pkgString());\n }\n if (tempBackTracked.contains(ip.bpkgs)) {\n return false;\n }\n tempBackTracked.add(ip.bpkgs);\n Iterator i = getPackagesProvidedBy(ip.bpkgs).iterator();\n if (i.hasNext()) {\n do {\n\tExportPkg ep = (ExportPkg)i.next();\n\tboolean foundUses = false;\n\tfor (Iterator ii = ep.pkg.importers.iterator(); ii.hasNext(); ) {\n\t ImportPkg iip = (ImportPkg)ii.next();\n\t if (iip.provider == ep) {\n\t if (backTrackUses(iip)) {\n\t foundUses = true;\n\t }\n\t }\n\t}\n\tif (!foundUses) {\n\t checkUses(ep);\n\t}\n } while (i.hasNext());\n return true;\n } else {\n return false;\n }\n }", "private static boolean hasFunds(double cost)\n {\n if (Clock.getRoundNum() < 200) { //TODO edit this out if necessary\n return rc.getTeamOre() > cost;\n } else {\n return rc.getTeamOre() > cost*2;\n }\n }", "private void givenExchangeRatesExistsForEightMonths() {\n }", "boolean hasBuyDescribe();", "boolean hasPakringFree();", "boolean hasPakringFree();", "boolean hasTotalBet();", "boolean hasTotalBet();", "boolean hasSettlementCurrency();", "public boolean isSomethingBuyable(GameClient game){\n for(Level l : Level.values()){\n for(ColorDevCard c : ColorDevCard.values()){\n try {\n NumberOfResources cost = dashBoard[l.ordinal()][c.ordinal()].getCost();\n cost = cost.safe_sub(game.getMe().getDiscounted());\n game.getMe().getDepots().getResources().sub(cost);\n return true;\n } catch (OutOfResourcesException | NullPointerException ignored) {}\n }\n }\n return false;\n }", "private void computeCoffeeMaker(){\n HashMap<String,String> notAvailableBeverages = coffeeMakerService.getNotAvailableBeverages();\n ArrayList<String> beverageNames = coffeeMakerService.getBeveragesName();\n for (String beverage: beverageNames) {\n if(notAvailableBeverages.containsKey(beverage)){\n System.out.println(notAvailableBeverages.get(beverage));\n }else{\n if(coffeeMakerService.canPrepareBeverage(beverage)){\n coffeeMakerService.prepareBeverage(beverage);\n System.out.println(beverage+\" is prepared\");\n }else{\n System.out.println(coffeeMakerService.getReasonForNotPreparation(beverage));\n }\n }\n }\n }", "@Override\n public boolean checkAvailability(BasketEntryDto basketEntryDto) {\n // Add communication to product micro service here for product validation\n return Boolean.TRUE;\n }", "public void checkData2019() {\n\n }", "boolean isApplicableForAllAssetTypes();", "@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }", "private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }", "public boolean isBuyable();", "boolean hasSingleBet();", "public boolean isBenefitAvailableFor(Account account, Dining dining);", "public static boolean isStocks() {\n\n // first of all check if there are Stocks available in the system:\n try {\n Engine.getStocks();\n return true;\n } catch (IOException e) {\n MessagePrint.println(MessagePrint.Stream.ERR, e.getMessage());\n return false;\n }\n }", "boolean CanBuySettlement();", "private boolean checkUses(ExportPkg pkg) {\n Iterator ui = null;\n String next_uses = null;\n if (Debug.packages) {\n Debug.println(\"checkUses: check if packages used by \" + pkg + \" is okay.\");\n }\n if (pkg.uses != null) {\n ui = pkg.uses.iterator();\n if (ui.hasNext()) {\n next_uses = (String)ui.next();\n }\n }\n if (Debug.packages) {\n Debug.println(\"checkUses: provider with bpkgs=\" + pkg.bpkgs);\n }\n ArrayList checkList = new ArrayList();\n for (Iterator i = pkg.bpkgs.getActiveImports(); i.hasNext(); ) {\n ImportPkg ip = (ImportPkg)i.next();\n if (ui != null) {\n if (next_uses == null || !ip.pkg.pkg.equals(next_uses)) {\n continue;\n }\n if (ui.hasNext()) {\n next_uses = (String)ui.next();\n } else {\n next_uses = null;\n }\n }\n ExportPkg ep = (ExportPkg)tempProvider.get(ip.pkg.pkg);\n if (Debug.packages) {\n Debug.println(\"checkUses: check import, \" + ip +\n \" with provider, \" + ip.provider);\n }\n if (ep == null) {\n tempProvider.put(ip.pkg.pkg, ip.provider);\n checkList.add(ip.provider);\n } else if (ep != ip.provider) {\n if (Debug.packages) {\n Debug.println(\"checkUses: mismatch in providers for, \" +\n ip.pkg.pkg);\n }\n return false;\n }\n }\n for (Iterator i = checkList.iterator(); i.hasNext(); ) {\n if (!checkUses((ExportPkg)i.next())) {\n return false;\n }\n }\n if (Debug.packages) {\n Debug.println(\"checkUses: package \" + pkg + \" is okay.\");\n }\n return true;\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public void priceCheck() {\n\t\tnew WLPriceCheck().execute(\"\");\n\t}", "public boolean isDeployed(){\n return !places.isEmpty();\n }", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "boolean hasIsAutoBet();", "public int checkEND(int amount, boolean burnStun);", "private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}", "public boolean isAvailable() throws KKException\r\n {\r\n return isAvailable(MODULE_PAYMENT_CYBERSOURCESA_STATUS);\r\n }", "boolean hasCurrency();", "private boolean arEngineAbilityCheck() {\n boolean isInstallArEngineApk = AREnginesApk.isAREngineApkReady(this);\n if (!isInstallArEngineApk && isRemindInstall) {\n Toast.makeText(this, \"Please agree to install.\", Toast.LENGTH_LONG).show();\n finish();\n }\n Log.d(TAG, \"Is Install AR Engine Apk: \" + isInstallArEngineApk);\n if (!isInstallArEngineApk) {\n startActivity(new Intent(this, ConnectAppMarketActivity.class));\n isRemindInstall = true;\n }\n return AREnginesApk.isAREngineApkReady(this);\n }", "public static void CheckMarketOptions(WebDriver driver) {\n\t\tString[] expectedMarkets = {\"Forex\",\"Major Pairs\",\"Minor Pairs\",\"Smart FX\",\"Indices\",\"Asia/Oceania\",\n\t\t\t\t\"Europe/Africa\",\"Middle East\",\"Americas\",\"OTC Indices\",\"OTC Stocks\",\"Germany\",\"India\",\"UK\",\"US\",\n\t\t\t\t\"Commodities\",\"Metals\",\"Energy\",\"Volatility Indices\",\"Continuous Indices\",\"Daily Reset Indices\"};\n\t\tWebElement element = Trade_Page.select_Market(driver);\n\t\tListsUtil.CompareLists(expectedMarkets, element);\n\t}", "boolean hasCampaignAsset();", "boolean hasAccountBudget();", "private boolean setupEconomy() {\n\t\tRegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager()\n\t\t\t\t.getRegistration(net.milkbowl.vault.economy.Economy.class);\n\t\tif (economyProvider != null)\n\t\t\teconomy = economyProvider.getProvider();\n\t\t\n\t\treturn (economy != null);\n\t}", "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index\",\"South African Index\",\"Swiss Index\",\"Australian OTC Index\",\"Belgian OTC Index\",\"Bombay OTC Index\",\"Dutch OTC Index\",\n\t\t\t\t\"French OTC Index\",\"German OTC Index\",\"Hong Kong OTC Index\",\"Istanbul OTC Index\",\"Japanese OTC Index\",\"UK OTC Index\",\"US OTC Index\",\"US Tech OTC Index\",\"Wall Street OTC Index\",\"Dubai Index\",\n\t\t\t\t\"US Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(IndicesAssets, element);\n\t\t}", "private void givenExchangeRatesExistsForSixMonths() {\n }", "private static boolean buy(Environment environment,\n\t\t\t Symbol symbol,\n\t\t\t float amount,\t\t\t\t \n\t\t\t float tradeCost,\n\t\t\t int day) \n\tthrows MissingQuoteException {\n\tfloat sharePrice = environment.quoteBundle.getQuote(symbol, Quote.DAY_OPEN, day);\n\tint shares = \n\t (new Double(Math.floor(amount / sharePrice))).intValue();\n\t\n\t// Now calculate the actual amount the shares will cost\n\tamount = sharePrice * shares;\n\t\n\t// Make sure we have enough money for the trade\n\tif(environment.cashAccount.getValue() >= (tradeCost + amount)) {\n\n\t TradingDate date = environment.quoteBundle.offsetToDate(day);\n\t Transaction buy = Transaction.newAccumulate(date, \n amount,\n\t\t\t\t\t\t\tsymbol, \n shares,\n\t\t\t\t\t\t\ttradeCost,\n\t\t\t\t\t\t\tenvironment.cashAccount,\n\t\t\t\t\t\t\tenvironment.shareAccount);\n\n\t environment.portfolio.addTransaction(buy);\n\t return true;\n\t}\n\t\n\treturn false;\n }", "boolean hasFairplay();", "public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) freeze the amount\n boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze);\n\n if (fundsFrozen) {\n updateBankDisplay();\n }\n\n return fundsFrozen;\n }", "@Test\n public void checkStockWithoutProduction () {\n\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock);\n\n }", "static Stock getStock(String symbol) { \n\t\tString sym = symbol.toUpperCase();\n\t\tdouble price = 0.0;\n\t\tint volume = 0;\n\t\tdouble pe = 0.0;\n\t\tdouble eps = 0.0;\n\t\tdouble week52low = 0.0;\n\t\tdouble week52high = 0.0;\n\t\tdouble daylow = 0.0;\n\t\tdouble dayhigh = 0.0;\n\t\tdouble movingav50day = 0.0;\n\t\tdouble marketcap = 0.0;\n\t\n\t\ttry { \n\t\t\t\n\t\t\t// Retrieve CSV File\n\t\t\tURL yahoo = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\"+ symbol + \"&f=l1vr2ejkghm3j3\");\n\t\t\tURLConnection connection = yahoo.openConnection(); \n\t\t\tInputStreamReader is = new InputStreamReader(connection.getInputStream());\n\t\t\tBufferedReader br = new BufferedReader(is); \n\t\t\t\n\t\t\t// Parse CSV Into Array\n\t\t\tString line = br.readLine(); \n\t\t\tString[] stockinfo = line.split(\",\"); \n\t\t\t\n\t\t\t// Check Our Data\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[0])) { \n\t\t\t\tprice = 0.00; \n\t\t\t} else { \n\t\t\t\tprice = Double.parseDouble(stockinfo[0]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[1])) { \n\t\t\t\tvolume = 0; \n\t\t\t} else { \n\t\t\t\tvolume = Integer.parseInt(stockinfo[1]); \n\t\t\t} \n\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[2])) { \n\t\t\t\tpe = 0; \n\t\t\t} else { \n\t\t\t\tpe = Double.parseDouble(stockinfo[2]); \n\t\t\t}\n \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[3])) { \n\t\t\t\teps = 0; \n\t\t\t} else { \n\t\t\t\teps = Double.parseDouble(stockinfo[3]); \n\t\t\t}\n\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[4])) { \n\t\t\t\tweek52low = 0; \n\t\t\t} else { \n\t\t\t\tweek52low = Double.parseDouble(stockinfo[4]); \n\t\t\t}\n\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[5])) { \n\t\t\t\tweek52high = 0; \n\t\t\t} else { \n\t\t\t\tweek52high = Double.parseDouble(stockinfo[5]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[6])) { \n\t\t\t\tdaylow = 0; \n\t\t\t} else { \n\t\t\t\tdaylow = Double.parseDouble(stockinfo[6]); \n\t\t\t}\n\t\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[7])) { \n\t\t\t\tdayhigh = 0; \n\t\t\t} else { \n\t\t\t\tdayhigh = Double.parseDouble(stockinfo[7]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A - N/A\", stockinfo[8])) { \n\t\t\t\tmovingav50day = 0; \n\t\t\t} else { \n\t\t\t\tmovingav50day = Double.parseDouble(stockinfo[8]); \n\t\t\t}\n\t\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[9])) { \n\t\t\t\tmarketcap = 0; \n\t\t\t} else { \n\t\t\t\tmarketcap = Double.parseDouble(stockinfo[9]); \n\t\t\t} \n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tLogger log = Logger.getLogger(StockHelper.class.getName()); \n\t\t\tlog.log(Level.SEVERE, e.toString(), e);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn new Stock(sym, price, volume, pe, eps, week52low, week52high, daylow, dayhigh, movingav50day, marketcap);\n\t\t\n\t}", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\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//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "public void checkRecipe() {\n \t\tIStationRecipe previous = currentRecipe;\n \t\tif ((currentRecipe == null) || !currentRecipe.matches(crafting)) {\n \t\t\tcurrentRecipe = BetterStorageCrafting.findMatchingStationRecipe(crafting);\n \t\t\tif (currentRecipe == null)\n \t\t\t\tcurrentRecipe = VanillaStationRecipe.findVanillaRecipe(this);\n \t\t}\n \t\tif ((previous != currentRecipe) || !recipeOutputMatches()) {\n \t\t\tprogress = 0;\n \t\t\tcraftingTime = ((currentRecipe != null) ? currentRecipe.getCraftingTime(crafting) : 0);\n \t\t\texperience = ((currentRecipe != null) ? currentRecipe.getExperienceDisplay(crafting) : 0);\n \t\t\tif (!outputIsReal)\n \t\t\t\tfor (int i = 0; i < output.length; i++)\n \t\t\t\t\toutput[i] = null;\n \t\t}\n \t\tArrays.fill(requiredInput, null);\n \t\tif (currentRecipe != null)\n \t\t\tcurrentRecipe.getCraftRequirements(crafting, requiredInput);\n \t\tupdateLastOutput();\n \t}", "boolean hasAmount();", "boolean hasAmount();", "final boolean hanArribatAlFinal() {\n int cont = 0;\n for (int i = 0; i < soldats.size(); i++) {\n if (soldats.get(i).isHaArribat()) {\n cont++;\n }\n }\n\n if (cont == soldats.size()) {\n\n return true;\n }\n\n return false;\n\n }", "String getNeedsInventoryIssuance();", "public static boolean shouldShowPackageForIndicatorCached(@NonNull Context context,\n @NonNull String packageName) {\n return !getIndicatorExemptedPackages(context).contains(packageName);\n }", "@Test\n public void getBoostBoxRequirement_matchesAusSpreadsheet() {\n SiteInfo si = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.AUS,\n \"Default Site\"\n );\n\n assertEquals(1.6, si.getBoostBoxRequirement(), 0.05);\n }", "@Test\n public void testMarketTransaction ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n assertEquals(0, accountingService.getPendingTariffTransactions().size(), \"no tariff tx\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n assertEquals(2, pending.size(), \"correct number in list\");\n MarketTransaction mtx = (MarketTransaction)pending.get(0);\n assertNotNull(mtx, \"first mtx not null\");\n assertEquals(2, mtx.getTimeslot().getSerialNumber(), \"correct timeslot id 0\");\n assertEquals(-45.0, mtx.getPrice(), 1e-6, \"correct price id 0\");\n Broker b1 = mtx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n mtx = (MarketTransaction)pending.get(1);\n assertNotNull(mtx, \"second mtx not null\");\n assertEquals(0.7, mtx.getMWh(), 1e-6, \"correct quantity id 1\");\n // broker market positions should have been updated already\n MarketPosition mp2 = bob.findMarketPositionByTimeslot(2);\n assertNotNull(mp2, \"should be a market position in slot 2\");\n assertEquals(0.5, mp2.getOverallBalance(), 1e-6, \".5 mwh in ts2\");\n MarketPosition mp3 = bob.findMarketPositionByTimeslot(3);\n assertNotNull(mp3, \"should be a market position in slot 3\");\n assertEquals(0.7, mp3.getOverallBalance(), 1e-6, \".7 mwh in ts3\");\n }", "void checkForApps();", "boolean hasUses();", "private void prepareWorkplace() throws GameActionException {\r\n\t\tFluxDeposit[] fluxDeposits = myRC.senseNearbyFluxDeposits();\r\n\t\tfor (FluxDeposit deposit : fluxDeposits) {\r\n\t\t\tFluxDepositInfo info = myRC.senseFluxDepositInfo(deposit);\r\n\t\t\tif (fluxInfo == null)\r\n\t\t\t\tfluxInfo = info;\r\n\t\t\tif (fluxInfo.location.distanceSquaredTo(myRC.getLocation()) > info.location.distanceSquaredTo(myRC.getLocation()))\r\n\t\t\t\tfluxInfo = info;\r\n\t\t}\r\n\t}", "public void checkAuctions() {\n\n checkDutchAuctions();\n checkSecondPriceAuctions();\n }", "public boolean isAllBurntUp() {\n return (flammableItemCount == itemsOnFire);\n }", "boolean investmentIsBondListFull() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean isUseAllLatestPacks();", "private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }", "@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypeBackOrderWhenOutOfStock() {\n\t\tassertInventoryWithAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_FOR_BACK_ORDER);\n\t}", "boolean isUsed();", "boolean isUsed();", "void askBuyResources();", "boolean isSatisfiableFor(AResourceType type, int amount) ;", "@Test\n public void testCurrencyName() throws JSONException {\n\n for (i=0;i<respArray.length();i++){\n //Assert.assertTrue(respArray.getJSONObject(i).getString(\"currencies\").contains(\"INR\"),\"Currency name does not match\");\n int num_curr = respArray.getJSONObject(i).getJSONArray(\"currencies\").length();//Get number of currencies. Some nations have multiple currencies\n for(int j=0;j<num_curr;j++){\n try{\n //Compare each currency to look for INR\n Assert.assertTrue(respArray.getJSONObject(i).getJSONArray(\"currencies\").getJSONObject(j).getString(\"code\").contains(\"INR\"));\n //if found, break the loop\n break;\n }catch (AssertionError e){//Handle the exception if curecny is not equal to INR\n if(j == num_curr-1){//If at the end of search INR is not found throw assertion error\n throw e;\n }\n }\n }\n }\n }", "private void checkForInstability(boolean overshoot) { \n if (overshoot == true) {\n setUnstable();\n } else {\n setStable();\n }\n }", "public boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }", "boolean hasPrice();", "boolean hasPrice();", "boolean hasPrice();", "private boolean setupEconomy() {\n if (getServer().getPluginManager().getPlugin(\"Vault\") == null) {\n return false;\n }\n RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);\n if (rsp == null) {\n return false;\n }\n econ = rsp.getProvider();\n return econ != null;\n }", "public void outOfStockSummary() {\n\t\tExtentTest test = extent.createTest(\"Out of Stock Summary Reports: \");\n\n\t\tdriver.switchTo().frame(\"furl\");\n\t\tdriver.findElement(\n\t\t\t\tBy.xpath(\"(.//*[normalize-space(text()) and normalize-space(.)='Trade'])[1]/following::b[1]\")).click();\n\t\tdriver.findElement(By.xpath(\n\t\t\t\t\"(.//*[normalize-space(text()) and normalize-space(.)='Out of Stock Summary'])[2]/following::span[1]\"))\n\t\t\t\t.click();\n\t\tdriver.switchTo().frame(\"mainFrame\");\n\t\tdriver.findElement(By.linkText(\"ASM Daily Visit - PDF\")).click();\n\t\tdriver.switchTo().frame(\"mainFrame\");\n\t\tdriver.findElement(By.id(\"zoneId\")).click();\n\t\tnew Select(driver.findElement(By.id(\"zoneId\"))).selectByVisibleText(\"Center\");\n\t\tdriver.findElement(By.id(\"zoneId\")).click();\n\t\tdriver.findElement(By.id(\"regionId\")).click();\n\t\tnew Select(driver.findElement(By.id(\"regionId\"))).selectByVisibleText(\"Lahore A\");\n\t\tdriver.findElement(By.id(\"regionId\")).click();\n\t\tdriver.findElement(By.id(\"startDate\")).click();\n\t\tdriver.findElement(By.linkText(\"25\")).click();\n\t\tdriver.findElement(By.id(\"surveyorId\")).click();\n\n\t\tdriver.findElement(By.xpath(\"(.//*[normalize-space(text()) and normalize-space(.)='ASM:'])[1]/following::i[1]\"))\n\t\t\t\t.click();\n\t\ttest.pass(\"Login Successfully\");\n\t\ttest.info(\"This Login success info:\");\n\t}", "boolean canAcceptTrade();", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }" ]
[ "0.5927861", "0.5888805", "0.57600087", "0.5503836", "0.5474449", "0.5469982", "0.54619193", "0.543078", "0.53805614", "0.5357748", "0.53489643", "0.5345346", "0.5317172", "0.53034514", "0.5282685", "0.5265457", "0.5222403", "0.5165131", "0.51353383", "0.5127785", "0.51132256", "0.5096954", "0.50655454", "0.50655454", "0.5037517", "0.5037517", "0.5036512", "0.50269896", "0.50203687", "0.50153065", "0.5004016", "0.5003042", "0.50024605", "0.50011533", "0.49828887", "0.49750778", "0.4972517", "0.49465507", "0.4933978", "0.49291986", "0.492742", "0.49266547", "0.49165678", "0.4910282", "0.48884887", "0.4880905", "0.48796222", "0.48767203", "0.4876116", "0.48719513", "0.48605025", "0.4855924", "0.4852194", "0.48430634", "0.48421195", "0.48420846", "0.4835002", "0.48149073", "0.48071232", "0.4800594", "0.47991225", "0.47894937", "0.4787202", "0.47839776", "0.47835466", "0.47835466", "0.47807458", "0.4779803", "0.47732234", "0.47657055", "0.47649983", "0.47569343", "0.4750516", "0.4746147", "0.4743702", "0.4743651", "0.47349414", "0.47330844", "0.47330844", "0.47330844", "0.47330844", "0.47330844", "0.47330844", "0.47143936", "0.47120342", "0.47119406", "0.4708845", "0.4708845", "0.47074962", "0.46984237", "0.46965787", "0.46938717", "0.46897832", "0.46889675", "0.46889675", "0.46889675", "0.46867308", "0.46806774", "0.4678391", "0.46771276" ]
0.70027196
0
Check underlying assets for Indices market
public static void CheckIndicesAssets(WebDriver driver) { String[] IndicesAssets = {"Australian Index","Bombay Index","Hong Kong Index","Jakarta Index","Japanese Index","Singapore Index","Belgian Index","Dutch Index", "French Index","German Index","Irish Index","Norwegian Index","South African Index","Swiss Index","Australian OTC Index","Belgian OTC Index","Bombay OTC Index","Dutch OTC Index", "French OTC Index","German OTC Index","Hong Kong OTC Index","Istanbul OTC Index","Japanese OTC Index","UK OTC Index","US OTC Index","US Tech OTC Index","Wall Street OTC Index","Dubai Index", "US Index"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Indices"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(IndicesAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckVolatilityIndicesAssets(WebDriver driver) {\n\t\tString[] VolatilityIndicesAssets = {\"Volatility 10 Index\",\"Volatility 100 Index\",\"Volatility 25 Index\",\"Volatility 50 Index\",\"Volatility 75 Index\",\"Bear Market Index\",\"Bull Market Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Volatility Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(VolatilityIndicesAssets, element);\n\t\t}", "Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;", "private boolean checkIndices(int i, String key) {\n return i == genericServiceResult.getMap().get(key);\n }", "private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public void indexAssets() {\n\t\tString json = null;\n\t\tString assetUrl = minecraftVersion.getAssetIndex().getUrl().toString();\n\t\ttry {\n\t\t\tjson = JsonUtil.loadJSON(assetUrl);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tassetsList = (AssetIndex) JsonUtil.getGson().fromJson(json, AssetIndex.class);\n\t\t}\n\t}", "public void verifyIndex(PackIndex idx)\n\t\t\tthrows CorruptPackIndexException {\n\t\tObjectIdOwnerMap<ObjFromPack> inPack = new ObjectIdOwnerMap<>();\n\t\tfor (int i = 0; i < getObjectCount(); i++) {\n\t\t\tPackedObjectInfo entry = getObject(i);\n\t\t\tinPack.add(new ObjFromPack(entry));\n\n\t\t\tlong offs = idx.findOffset(entry);\n\t\t\tif (offs == -1) {\n\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingObject,\n\t\t\t\t\t\t\t\tInteger.valueOf(entry.getType()),\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_OBJ);\n\t\t\t} else if (offs != entry.getOffset()) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat\n\t\t\t\t\t\t.format(JGitText.get().mismatchOffset, entry.getName()),\n\t\t\t\t\t\tErrorType.MISMATCH_OFFSET);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (idx.hasCRC32Support()\n\t\t\t\t\t\t&& (int) idx.findCRC32(entry) != entry.getCRC()) {\n\t\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\t\tMessageFormat.format(JGitText.get().mismatchCRC,\n\t\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\t\tErrorType.MISMATCH_CRC);\n\t\t\t\t}\n\t\t\t} catch (MissingObjectException e) {\n\t\t\t\tCorruptPackIndexException cpe = new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingCRC,\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_CRC);\n\t\t\t\tcpe.initCause(e);\n\t\t\t\tthrow cpe;\n\t\t\t}\n\t\t}\n\n\t\tfor (MutableEntry entry : idx) {\n\t\t\tif (!inPack.contains(entry.toObjectId())) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat.format(\n\t\t\t\t\t\tJGitText.get().unknownObjectInIndex, entry.name()),\n\t\t\t\t\t\tErrorType.UNKNOWN_OBJ);\n\t\t\t}\n\t\t}\n\t}", "public static void CheckCommoditiesAssets(WebDriver driver) {\n\t\tString[] CommoditiesAssets = {\"Gold/USD\",\"Palladium/USD\",\"Platinum/USD\",\"Silver/USD\",\"Oil/USD\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Commodities\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(CommoditiesAssets, element);\n\t\t}", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "public static void CheckOTCStocksAssets(WebDriver driver) {\n\t\tString[] OTCStocksAssets = {\"Airbus\",\"Allianz\",\"BMW\",\"Daimler\",\"Deutsche Bank\",\"Novartis\",\"SAP\",\"Siemens\",\"Bharti Airtel\",\"Maruti Suzuki\",\"Reliance Industries\",\"Tata Steel\",\"Barclays\",\"BP\",\n\t\t\t\t\"British American Tobacco\",\"HSBC\",\"Lloyds Bank\",\"Rio Tinto\",\"Standard Chartered\",\"Tesco\",\"Alibaba\",\"Alphabet\",\"Amazon.com\",\"American Express\",\"Apple\",\"Berkshire Hathaway\",\"Boeing\",\"Caterpillar\",\n\t\t\t\t\"Citigroup\",\"Electronic Arts\",\"Exxon Mobil\",\"Facebook\",\"Goldman Sachs\",\"IBM\",\"Johnson & Johnson\",\"MasterCard\",\"McDonald's\",\"Microsoft\",\n\t\t\t\t\"PepsiCo\",\"Procter & Gamble\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"OTC Stocks\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(OTCStocksAssets, element);\n\t\t}", "public static void CheckForexAssets(WebDriver driver) {\n\t\tString[] forexAssets = {\"AUD/JPY\",\"AUD/USD\",\"EUR/AUD\",\"EUR/CAD\",\"EUR/CHF\",\"EUR/GBP\",\"EUR/JPY\",\"EUR/USD\",\n\t\t\t\t\"GBP/AUD\",\"GBP/JPY\",\"GBP/USD\",\"USD/CAD\",\"USD/CHF\",\"USD/JPY\",\"AUD/CAD\",\"AUD/CHF\",\"AUD/NZD\",\"AUD/PLN\",\n\t\t\t\t\"EUR/NZD\",\"GBP/CAD\",\"GBP/CHF\",\"GBP/NOK\",\"GBP/NZD\",\"GBP/PLN\",\"NZD/JPY\",\"NZD/USD\",\"USD/MXN\",\"USD/NOK\",\n\t\t\t\t\"USD/PLN\",\"USD/SEK\",\"AUD Index\",\"EUR Index\",\"GBP Index\",\"USD Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Forex\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(forexAssets, element);\n\t\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "boolean hasAsset();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public static int checkAssets(double[] assets, boolean[] checkAssets, int limit) {\n\t\tfor (int i = 0; i < assets.length; i++) {\n\t\t\tif (assets[i] < limit && !checkAssets[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public static Markets getMarketById(int index) {\n\t\treturn markets[index]; \n\t}", "public boolean searchOK(int i){\n if(counts.size() > 0 && counts.get(i) != null &&\n queryKeys.size() > 0 && queryKeys.get(i) != null &&\n webEnvs.size() > 0 && webEnvs.get(i) != null)\n return true;\n else\n return false;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "List<MarketData> getMarketDataItems(String index);", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testIndexMaintenanceOnPutAll() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n region.put(\"1\", new Portfolio(1));\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"posvals.secId\",\n SEPARATOR + \"portfolio1 pf, pf.positions.values posvals \");\n Map data = new HashMap();\n for (int i = 1; i < 11; ++i) {\n data.put(\"\" + i, new Portfolio(i + 2));\n }\n\n region.putAll(data);\n }", "@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getInventoryTest() {\n Map<String, Integer> response = api.getInventory();\n\n Assert.assertNotNull(response);\n Assert.assertFalse(response.isEmpty());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/inventory\")));\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "private void validateIndexForKeys(CompactRangeIndex ri) {\n assertEquals(6, ri.getIndexStorage().size());\n CloseableIterator<IndexStoreEntry> itr = null;\n try {\n itr = ri.getIndexStorage().iterator(null);\n while (itr.hasNext()) {\n IndexStoreEntry reEntry = itr.next();\n Object obj = reEntry.getDeserializedRegionKey();\n assertTrue(obj instanceof String);\n assertTrue(idSet.contains(obj));\n }\n } finally {\n if (itr != null) {\n itr.close();\n }\n }\n }", "private static void assertIndicesSubset(List<String> indices, String... actions) {\n for (String action : actions) {\n List<TransportRequest> requests = consumeTransportRequests(action);\n assertThat(\"no internal requests intercepted for action [\" + action + \"]\", requests.size(), greaterThan(0));\n for (TransportRequest internalRequest : requests) {\n IndicesRequest indicesRequest = convertRequest(internalRequest);\n for (String index : indicesRequest.indices()) {\n assertThat(indices, hasItem(index));\n }\n }\n }\n }", "boolean indexExists(String name) throws ElasticException;", "private int findIndexInStock(FoodItem itemToCheck) {\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // if they're the same\n if (isSameFoodItem(this._stock[i], itemToCheck)) {\n // return current index.\n return i;\n }\n }\n return -1;\n }", "public void checkAssetSelected() throws ParameterValuesException {\n\t\tif (gridTaiSan.getItemCount() == 0) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần tìm kiếm tài sản muốn lập thẻ\", null);\n\t\t}\n\t\tif (gridTaiSan.getSelection()[0] == null) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần chọn tài sản muốn lập thẻ\", null);\n\t\t}\n\t}", "public boolean has(byte[] key) throws IOException {\n assert (RAMIndex == true);\r\n return index.geti(key) >= 0;\r\n }", "boolean isIndexed();", "boolean isIndexed();", "@Test\n public void testIndexMaintenanceOnCacheLoadedData() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n AttributesMutator am = region.getAttributesMutator();\n am.setCacheLoader(new CacheLoader() {\n\n @Override\n public Object load(LoaderHelper helper) throws CacheLoaderException {\n String key = (String) helper.getKey();\n Portfolio p = new Portfolio(Integer.parseInt(key));\n return p;\n }\n\n @Override\n public void close() {\n // nothing\n }\n });\n\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n List keys = new ArrayList();\n keys.add(\"1\");\n keys.add(\"2\");\n keys.add(\"3\");\n keys.add(\"4\");\n\n region.getAll(keys);\n }", "public int checksStatus(int indexX, int indexY) {\n if (allTiles[indexX][indexY].getType() == 10) {\n return -1;\n }\n int numOfCoveredTiles = 0;\n\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (allTiles[i][j].isCover() == true)\n numOfCoveredTiles++;\n }\n }\n\n if (numOfCoveredTiles==bombs)\n return 1;\n return 0;\n }", "public boolean createIndex_random(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tint part;\n\t\t\n\t\tint type_s, type_o, type1_s, type1_o;\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\t\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tQuad item;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse\n\t\t\t\tres = key;\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\titem = list.get(i);\n\t\t\t\ttype_s = item.type_s;\n\t\t\t\ttype_o = item.type_o;\n\t\t\t\t\n\t\t\t\to_bytes = item.o_bytes;\n\t\t\t\ts_bytes = item.s_bytes;\n\t\t\t\tpart = i;\n\t\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\t\t\t//\trs = search(sql.toString());\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t// unpdate records\t\t\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t\t// directly insert the record\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn false;\n\t\t\t\t}finally{\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void verifyToscaArtifactsExistApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n final int numOfToscaArtifacts = 2;\n ResourceGeneralPage.getLeftMenu().moveToToscaArtifactsScreen();\n AssertJUnit.assertTrue(ToscaArtifactsPage.checkElementsCountInTable(numOfToscaArtifacts));\n\n for (int i = 0; i < numOfToscaArtifacts; i++) {\n String typeFromScreen = ToscaArtifactsPage.getArtifactType(i);\n AssertJUnit.assertTrue(typeFromScreen.equals(ArtifactTypeEnum.TOSCA_CSAR.getType()) || typeFromScreen.equals(ArtifactTypeEnum.TOSCA_TEMPLATE.getType()));\n }\n\n //TODO Andrey should click on certify button\n ToscaArtifactsPage.clickCertifyButton(vfMetaData.getName());\n vfMetaData.setVersion(\"1.0\");\n VfVerificator.verifyToscaArtifactsInfo(vfMetaData, getUser());\n }", "public int contains(IntSet check){\n\t\tfor(int i=0;i<contents.size();i++){\n\t\t\tif(contents.get(i).equals(check)){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "boolean isIndex();", "private void defaultAssetShouldBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(asset.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].type\").value(hasItem(DEFAULT_TYPE.toString())))\n .andExpect(jsonPath(\"$.[*].fullPath\").value(hasItem(DEFAULT_FULL_PATH.toString())))\n .andExpect(jsonPath(\"$.[*].comments\").value(hasItem(DEFAULT_COMMENTS.toString())))\n .andExpect(jsonPath(\"$.[*].resourceId\").value(hasItem(DEFAULT_RESOURCE_ID.toString())));\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "@SuppressWarnings({ \"deprecation\", \"unchecked\" })\r\n\tpublic void init() throws Exception{\r\n\t\tAsset CurrentAsset;\r\ndouble TotalAmount = CurrentPortfolio.getTotalAmount(CurrentDate);\r\nCurrentPortfolio.sellAssetCollection(CurrentDate);\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US large cap\");\r\nCurrentAsset.setClassID(getAssetClassID(\"US Equity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^GSPC\", TotalAmount/7,\r\n\t\tCurrentDate);\r\n\t\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"IUS small cap\");\r\nCurrentAsset.setClassID(52l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^RUT\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"International Equity\");\r\nCurrentAsset.setClassID(9l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGTSX\", TotalAmount /7,CurrentDate);\r\n\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Real Estate\");\r\nCurrentAsset.setClassID(5l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGSIX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Commodity\");\r\nCurrentAsset.setClassID(getAssetClassID(\"Commodity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"QRAAX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\r\n\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Cash\");\r\nCurrentAsset.setClassID(3l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"CASH\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US Bond\");\r\nCurrentAsset.setClassID(2l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VBMFX\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\r\ninitialAmount=TotalAmount;\r\nwithdrawRate=0.05;\r\n\t}", "private void defaultAssetShouldNotBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "boolean isApplicableForAllAssetTypes();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean getIndexOK() {\n return indexOK;\n }", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "private void defaultIndActivationShouldNotBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public boolean hasIndices() {\n return mFactoryIndices != null;\n }", "private void defaultStocksShouldBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(stocks.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].open\").value(hasItem(DEFAULT_OPEN.intValue())))\n .andExpect(jsonPath(\"$.[*].high\").value(hasItem(DEFAULT_HIGH.intValue())))\n .andExpect(jsonPath(\"$.[*].close\").value(hasItem(DEFAULT_CLOSE.intValue())))\n .andExpect(jsonPath(\"$.[*].low\").value(hasItem(DEFAULT_LOW.intValue())))\n .andExpect(jsonPath(\"$.[*].volume\").value(hasItem(DEFAULT_VOLUME)));\n\n // Check, that the count call also returns 1\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsSet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asSet() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean isInternalIndex() {\n return (this == itemIndex || this == withdrawnIndex || this == privateIndex);\n }", "private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }", "@Test\n public void indexIsUsedForQueryWhenRegionIsEmpty() {\n try {\n CacheUtils.getCache();\n isInitDone = false;\n Query q =\n qs.newQuery(\"SELECT DISTINCT * FROM \" + SEPARATOR + \"portfolio where status = 'active'\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n\n @Override\n public void afterIndexLookup(Collection coll) {\n indexUsed = true;\n }\n });\n SelectResults set = (SelectResults) q.execute();\n if (set.size() == 0 || !indexUsed) {\n fail(\"Either Size of the result set is zero or Index is not used \");\n }\n indexUsed = false;\n\n region.clear();\n set = (SelectResults) q.execute();\n if (set.size() != 0 || !indexUsed) {\n fail(\"Either Size of the result set is not zero or Index is not used \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.toString());\n } finally {\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }", "@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "private void checkOpenChestInput(Chest openChest) {\n for (Map.Entry<Rectangle, Integer> entry : chestInventoryInputs.entrySet()) {\n Vector3 inputPos = hudCamera.unproject(new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0));\n if (entry.getKey().contains(inputPos.x, inputPos.y)) {\n gameWorld.getHero().takeFromChest(openChest, entry.getValue());\n }\n }\n }", "private int findIllegal(final HashMap<String, Integer> association) {\n String[] illegalAssets = {\"Silk\", \"Pepper\", \"Barrel\"};\n for (String asset : illegalAssets) {\n for (int i = 0; i < getInventory().getNumberOfCards(); ++i) {\n if (getInventory().getAssets()[i] == (int) association.get(asset)) {\n return association.get(asset);\n }\n }\n }\n return -1;\n }", "public static void CheckMarketOptions(WebDriver driver) {\n\t\tString[] expectedMarkets = {\"Forex\",\"Major Pairs\",\"Minor Pairs\",\"Smart FX\",\"Indices\",\"Asia/Oceania\",\n\t\t\t\t\"Europe/Africa\",\"Middle East\",\"Americas\",\"OTC Indices\",\"OTC Stocks\",\"Germany\",\"India\",\"UK\",\"US\",\n\t\t\t\t\"Commodities\",\"Metals\",\"Energy\",\"Volatility Indices\",\"Continuous Indices\",\"Daily Reset Indices\"};\n\t\tWebElement element = Trade_Page.select_Market(driver);\n\t\tListsUtil.CompareLists(expectedMarkets, element);\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean hasIndices() {\n if (indices != null) {\n return indices.length > 0;\n }\n return false;\n }", "private static int getTheindexOrcheckAvilability(City [] cities, String cityName, String countryName){\n for(int i=0;i<cities.length;i++){\n if(cities[i].getCityName().equalsIgnoreCase(cityName)&&cities[i].getCountryName().equalsIgnoreCase(countryName))\n return i ;\n }\n return -1;\n }", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public synchronized boolean has(byte[] key) throws IOException {\n if ((kelondroAbstractRecords.debugmode) && (RAMIndex != true)) serverLog.logWarning(\"kelondroFlexTable\", \"RAM index warning in file \" + super.tablename);\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n return index.geti(key) >= 0;\r\n }", "private void updateIcon(MarketIndex index) throws IOException {\n\n if(index.getImage()==null){\n String url = \"https://etoro-cdn.etorostatic.com/market-avatars/\"+index.getSymbol().toLowerCase()+\"/150x150.png\";\n byte[] bytes = utils.getBytesFromUrl(url);\n if(bytes!=null){\n if(bytes.length>0){\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }else{ // Icon not found on etoro, symbol not managed on eToro or icon has a different name? Use standard icon.\n Image img = utils.getDefaultIndexIcon();\n bytes = utils.imageToByteArray(img);\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }\n\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "@Override\n public boolean contains(BankAccount anEntry) {\n for(int i=0; i<getSize(); i++){\n if(bankArrays[i].compare(anEntry) == 0){\n return true;\n }\n }\n return false;\n }", "@Test\n public void testGetInventoryQueryAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getInventoryQueryAction(\"{productId}\", \"{scope}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseInventoryItem\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}", "public static boolean hasIndex(Geography<?> geog)\n\t{\n\t\treturn indices.containsKey(geog);\n\t}", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "private int getIndex(int... elements) {\n int index = 0;\n for (int i = 0; i < elements.length; i++) index += elements[i] * Math.pow(universeSize, i);\n return index;\n }", "private void defaultIndActivationShouldBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(indActivation.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].activity\").value(hasItem(DEFAULT_ACTIVITY)))\n .andExpect(jsonPath(\"$.[*].customerId\").value(hasItem(DEFAULT_CUSTOMER_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].individualId\").value(hasItem(DEFAULT_INDIVIDUAL_ID.intValue())));\n\n // Check, that the count call also returns 1\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "StorableIndexInfo getIndexInfo();", "public void markNotDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(false);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "private void defaultKpiShouldBeFound(String filter) throws Exception {\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(kpi.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].title\").value(hasItem(DEFAULT_TITLE)))\n .andExpect(jsonPath(\"$.[*].reward\").value(hasItem(DEFAULT_REWARD)))\n .andExpect(jsonPath(\"$.[*].rewardDistribution\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION)))\n .andExpect(jsonPath(\"$.[*].gradingProcess\").value(hasItem(DEFAULT_GRADING_PROCESS)))\n .andExpect(jsonPath(\"$.[*].active\").value(hasItem(DEFAULT_ACTIVE)))\n .andExpect(jsonPath(\"$.[*].purpose\").value(hasItem(DEFAULT_PURPOSE)))\n .andExpect(jsonPath(\"$.[*].scopeOfWork\").value(hasItem(DEFAULT_SCOPE_OF_WORK)))\n .andExpect(jsonPath(\"$.[*].rewardDistributionInfo\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION_INFO)))\n .andExpect(jsonPath(\"$.[*].reporting\").value(hasItem(DEFAULT_REPORTING)))\n .andExpect(jsonPath(\"$.[*].fiatPoolFactor\").value(hasItem(DEFAULT_FIAT_POOL_FACTOR.doubleValue())))\n .andExpect(jsonPath(\"$.[*].grading\").value(hasItem(DEFAULT_GRADING)));\n\n // Check, that the count call also returns 1\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "private void defaultStocksShouldNotBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void markDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(true);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n\n }" ]
[ "0.67673874", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.5220641", "0.52120763", "0.51321834", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.49533445", "0.49380618", "0.49357355", "0.48846632", "0.48827213", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.4849015", "0.48302263", "0.48103258", "0.47813416", "0.47710627", "0.47707063", "0.4758674", "0.47522888", "0.4750927", "0.4743798", "0.47432873", "0.4733395", "0.47310334", "0.4730128", "0.47266978", "0.47266978", "0.47223347", "0.47085977", "0.4708522", "0.4707447", "0.46987975", "0.46890098", "0.46852946", "0.46822348", "0.46812844", "0.46812314", "0.46642044", "0.46623075", "0.46590918", "0.46550757", "0.46526393", "0.46254605", "0.46254605", "0.46254605", "0.46212432", "0.4617762", "0.46120238", "0.46072567", "0.4600084", "0.45912164", "0.4590142", "0.4584318", "0.45828423", "0.45781288", "0.45761603", "0.4569408", "0.45510882", "0.45493096", "0.45491737", "0.45437595", "0.45168328", "0.45139757", "0.4504986", "0.45033222", "0.4503052", "0.45014948", "0.45002428", "0.44990003", "0.44988427", "0.4490034", "0.4489099", "0.4488824", "0.44872078", "0.44868228", "0.44867262", "0.44827554", "0.44762182", "0.4473639", "0.44716424" ]
0.7188198
0
Check underlying assets for Indices market
public static void CheckOTCStocksAssets(WebDriver driver) { String[] OTCStocksAssets = {"Airbus","Allianz","BMW","Daimler","Deutsche Bank","Novartis","SAP","Siemens","Bharti Airtel","Maruti Suzuki","Reliance Industries","Tata Steel","Barclays","BP", "British American Tobacco","HSBC","Lloyds Bank","Rio Tinto","Standard Chartered","Tesco","Alibaba","Alphabet","Amazon.com","American Express","Apple","Berkshire Hathaway","Boeing","Caterpillar", "Citigroup","Electronic Arts","Exxon Mobil","Facebook","Goldman Sachs","IBM","Johnson & Johnson","MasterCard","McDonald's","Microsoft", "PepsiCo","Procter & Gamble"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("OTC Stocks"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(OTCStocksAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index\",\"South African Index\",\"Swiss Index\",\"Australian OTC Index\",\"Belgian OTC Index\",\"Bombay OTC Index\",\"Dutch OTC Index\",\n\t\t\t\t\"French OTC Index\",\"German OTC Index\",\"Hong Kong OTC Index\",\"Istanbul OTC Index\",\"Japanese OTC Index\",\"UK OTC Index\",\"US OTC Index\",\"US Tech OTC Index\",\"Wall Street OTC Index\",\"Dubai Index\",\n\t\t\t\t\"US Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(IndicesAssets, element);\n\t\t}", "public static void CheckVolatilityIndicesAssets(WebDriver driver) {\n\t\tString[] VolatilityIndicesAssets = {\"Volatility 10 Index\",\"Volatility 100 Index\",\"Volatility 25 Index\",\"Volatility 50 Index\",\"Volatility 75 Index\",\"Bear Market Index\",\"Bull Market Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Volatility Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(VolatilityIndicesAssets, element);\n\t\t}", "Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;", "private boolean checkIndices(int i, String key) {\n return i == genericServiceResult.getMap().get(key);\n }", "private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public void indexAssets() {\n\t\tString json = null;\n\t\tString assetUrl = minecraftVersion.getAssetIndex().getUrl().toString();\n\t\ttry {\n\t\t\tjson = JsonUtil.loadJSON(assetUrl);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tassetsList = (AssetIndex) JsonUtil.getGson().fromJson(json, AssetIndex.class);\n\t\t}\n\t}", "public void verifyIndex(PackIndex idx)\n\t\t\tthrows CorruptPackIndexException {\n\t\tObjectIdOwnerMap<ObjFromPack> inPack = new ObjectIdOwnerMap<>();\n\t\tfor (int i = 0; i < getObjectCount(); i++) {\n\t\t\tPackedObjectInfo entry = getObject(i);\n\t\t\tinPack.add(new ObjFromPack(entry));\n\n\t\t\tlong offs = idx.findOffset(entry);\n\t\t\tif (offs == -1) {\n\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingObject,\n\t\t\t\t\t\t\t\tInteger.valueOf(entry.getType()),\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_OBJ);\n\t\t\t} else if (offs != entry.getOffset()) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat\n\t\t\t\t\t\t.format(JGitText.get().mismatchOffset, entry.getName()),\n\t\t\t\t\t\tErrorType.MISMATCH_OFFSET);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (idx.hasCRC32Support()\n\t\t\t\t\t\t&& (int) idx.findCRC32(entry) != entry.getCRC()) {\n\t\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\t\tMessageFormat.format(JGitText.get().mismatchCRC,\n\t\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\t\tErrorType.MISMATCH_CRC);\n\t\t\t\t}\n\t\t\t} catch (MissingObjectException e) {\n\t\t\t\tCorruptPackIndexException cpe = new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingCRC,\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_CRC);\n\t\t\t\tcpe.initCause(e);\n\t\t\t\tthrow cpe;\n\t\t\t}\n\t\t}\n\n\t\tfor (MutableEntry entry : idx) {\n\t\t\tif (!inPack.contains(entry.toObjectId())) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat.format(\n\t\t\t\t\t\tJGitText.get().unknownObjectInIndex, entry.name()),\n\t\t\t\t\t\tErrorType.UNKNOWN_OBJ);\n\t\t\t}\n\t\t}\n\t}", "public static void CheckCommoditiesAssets(WebDriver driver) {\n\t\tString[] CommoditiesAssets = {\"Gold/USD\",\"Palladium/USD\",\"Platinum/USD\",\"Silver/USD\",\"Oil/USD\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Commodities\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(CommoditiesAssets, element);\n\t\t}", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "public static void CheckForexAssets(WebDriver driver) {\n\t\tString[] forexAssets = {\"AUD/JPY\",\"AUD/USD\",\"EUR/AUD\",\"EUR/CAD\",\"EUR/CHF\",\"EUR/GBP\",\"EUR/JPY\",\"EUR/USD\",\n\t\t\t\t\"GBP/AUD\",\"GBP/JPY\",\"GBP/USD\",\"USD/CAD\",\"USD/CHF\",\"USD/JPY\",\"AUD/CAD\",\"AUD/CHF\",\"AUD/NZD\",\"AUD/PLN\",\n\t\t\t\t\"EUR/NZD\",\"GBP/CAD\",\"GBP/CHF\",\"GBP/NOK\",\"GBP/NZD\",\"GBP/PLN\",\"NZD/JPY\",\"NZD/USD\",\"USD/MXN\",\"USD/NOK\",\n\t\t\t\t\"USD/PLN\",\"USD/SEK\",\"AUD Index\",\"EUR Index\",\"GBP Index\",\"USD Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Forex\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(forexAssets, element);\n\t\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "boolean hasAsset();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public static int checkAssets(double[] assets, boolean[] checkAssets, int limit) {\n\t\tfor (int i = 0; i < assets.length; i++) {\n\t\t\tif (assets[i] < limit && !checkAssets[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public static Markets getMarketById(int index) {\n\t\treturn markets[index]; \n\t}", "public boolean searchOK(int i){\n if(counts.size() > 0 && counts.get(i) != null &&\n queryKeys.size() > 0 && queryKeys.get(i) != null &&\n webEnvs.size() > 0 && webEnvs.get(i) != null)\n return true;\n else\n return false;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "List<MarketData> getMarketDataItems(String index);", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testIndexMaintenanceOnPutAll() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n region.put(\"1\", new Portfolio(1));\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"posvals.secId\",\n SEPARATOR + \"portfolio1 pf, pf.positions.values posvals \");\n Map data = new HashMap();\n for (int i = 1; i < 11; ++i) {\n data.put(\"\" + i, new Portfolio(i + 2));\n }\n\n region.putAll(data);\n }", "@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getInventoryTest() {\n Map<String, Integer> response = api.getInventory();\n\n Assert.assertNotNull(response);\n Assert.assertFalse(response.isEmpty());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/inventory\")));\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "private void validateIndexForKeys(CompactRangeIndex ri) {\n assertEquals(6, ri.getIndexStorage().size());\n CloseableIterator<IndexStoreEntry> itr = null;\n try {\n itr = ri.getIndexStorage().iterator(null);\n while (itr.hasNext()) {\n IndexStoreEntry reEntry = itr.next();\n Object obj = reEntry.getDeserializedRegionKey();\n assertTrue(obj instanceof String);\n assertTrue(idSet.contains(obj));\n }\n } finally {\n if (itr != null) {\n itr.close();\n }\n }\n }", "private static void assertIndicesSubset(List<String> indices, String... actions) {\n for (String action : actions) {\n List<TransportRequest> requests = consumeTransportRequests(action);\n assertThat(\"no internal requests intercepted for action [\" + action + \"]\", requests.size(), greaterThan(0));\n for (TransportRequest internalRequest : requests) {\n IndicesRequest indicesRequest = convertRequest(internalRequest);\n for (String index : indicesRequest.indices()) {\n assertThat(indices, hasItem(index));\n }\n }\n }\n }", "boolean indexExists(String name) throws ElasticException;", "private int findIndexInStock(FoodItem itemToCheck) {\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // if they're the same\n if (isSameFoodItem(this._stock[i], itemToCheck)) {\n // return current index.\n return i;\n }\n }\n return -1;\n }", "public void checkAssetSelected() throws ParameterValuesException {\n\t\tif (gridTaiSan.getItemCount() == 0) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần tìm kiếm tài sản muốn lập thẻ\", null);\n\t\t}\n\t\tif (gridTaiSan.getSelection()[0] == null) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần chọn tài sản muốn lập thẻ\", null);\n\t\t}\n\t}", "public boolean has(byte[] key) throws IOException {\n assert (RAMIndex == true);\r\n return index.geti(key) >= 0;\r\n }", "boolean isIndexed();", "boolean isIndexed();", "@Test\n public void testIndexMaintenanceOnCacheLoadedData() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n AttributesMutator am = region.getAttributesMutator();\n am.setCacheLoader(new CacheLoader() {\n\n @Override\n public Object load(LoaderHelper helper) throws CacheLoaderException {\n String key = (String) helper.getKey();\n Portfolio p = new Portfolio(Integer.parseInt(key));\n return p;\n }\n\n @Override\n public void close() {\n // nothing\n }\n });\n\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n List keys = new ArrayList();\n keys.add(\"1\");\n keys.add(\"2\");\n keys.add(\"3\");\n keys.add(\"4\");\n\n region.getAll(keys);\n }", "public int checksStatus(int indexX, int indexY) {\n if (allTiles[indexX][indexY].getType() == 10) {\n return -1;\n }\n int numOfCoveredTiles = 0;\n\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (allTiles[i][j].isCover() == true)\n numOfCoveredTiles++;\n }\n }\n\n if (numOfCoveredTiles==bombs)\n return 1;\n return 0;\n }", "public boolean createIndex_random(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tint part;\n\t\t\n\t\tint type_s, type_o, type1_s, type1_o;\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\t\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tQuad item;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse\n\t\t\t\tres = key;\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\titem = list.get(i);\n\t\t\t\ttype_s = item.type_s;\n\t\t\t\ttype_o = item.type_o;\n\t\t\t\t\n\t\t\t\to_bytes = item.o_bytes;\n\t\t\t\ts_bytes = item.s_bytes;\n\t\t\t\tpart = i;\n\t\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\t\t\t//\trs = search(sql.toString());\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t// unpdate records\t\t\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t\t// directly insert the record\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn false;\n\t\t\t\t}finally{\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void verifyToscaArtifactsExistApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n final int numOfToscaArtifacts = 2;\n ResourceGeneralPage.getLeftMenu().moveToToscaArtifactsScreen();\n AssertJUnit.assertTrue(ToscaArtifactsPage.checkElementsCountInTable(numOfToscaArtifacts));\n\n for (int i = 0; i < numOfToscaArtifacts; i++) {\n String typeFromScreen = ToscaArtifactsPage.getArtifactType(i);\n AssertJUnit.assertTrue(typeFromScreen.equals(ArtifactTypeEnum.TOSCA_CSAR.getType()) || typeFromScreen.equals(ArtifactTypeEnum.TOSCA_TEMPLATE.getType()));\n }\n\n //TODO Andrey should click on certify button\n ToscaArtifactsPage.clickCertifyButton(vfMetaData.getName());\n vfMetaData.setVersion(\"1.0\");\n VfVerificator.verifyToscaArtifactsInfo(vfMetaData, getUser());\n }", "public int contains(IntSet check){\n\t\tfor(int i=0;i<contents.size();i++){\n\t\t\tif(contents.get(i).equals(check)){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "boolean isIndex();", "private void defaultAssetShouldBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(asset.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].type\").value(hasItem(DEFAULT_TYPE.toString())))\n .andExpect(jsonPath(\"$.[*].fullPath\").value(hasItem(DEFAULT_FULL_PATH.toString())))\n .andExpect(jsonPath(\"$.[*].comments\").value(hasItem(DEFAULT_COMMENTS.toString())))\n .andExpect(jsonPath(\"$.[*].resourceId\").value(hasItem(DEFAULT_RESOURCE_ID.toString())));\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "@SuppressWarnings({ \"deprecation\", \"unchecked\" })\r\n\tpublic void init() throws Exception{\r\n\t\tAsset CurrentAsset;\r\ndouble TotalAmount = CurrentPortfolio.getTotalAmount(CurrentDate);\r\nCurrentPortfolio.sellAssetCollection(CurrentDate);\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US large cap\");\r\nCurrentAsset.setClassID(getAssetClassID(\"US Equity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^GSPC\", TotalAmount/7,\r\n\t\tCurrentDate);\r\n\t\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"IUS small cap\");\r\nCurrentAsset.setClassID(52l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^RUT\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"International Equity\");\r\nCurrentAsset.setClassID(9l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGTSX\", TotalAmount /7,CurrentDate);\r\n\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Real Estate\");\r\nCurrentAsset.setClassID(5l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGSIX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Commodity\");\r\nCurrentAsset.setClassID(getAssetClassID(\"Commodity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"QRAAX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\r\n\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Cash\");\r\nCurrentAsset.setClassID(3l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"CASH\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US Bond\");\r\nCurrentAsset.setClassID(2l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VBMFX\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\r\ninitialAmount=TotalAmount;\r\nwithdrawRate=0.05;\r\n\t}", "private void defaultAssetShouldNotBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "boolean isApplicableForAllAssetTypes();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean getIndexOK() {\n return indexOK;\n }", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "private void defaultIndActivationShouldNotBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public boolean hasIndices() {\n return mFactoryIndices != null;\n }", "private void defaultStocksShouldBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(stocks.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].open\").value(hasItem(DEFAULT_OPEN.intValue())))\n .andExpect(jsonPath(\"$.[*].high\").value(hasItem(DEFAULT_HIGH.intValue())))\n .andExpect(jsonPath(\"$.[*].close\").value(hasItem(DEFAULT_CLOSE.intValue())))\n .andExpect(jsonPath(\"$.[*].low\").value(hasItem(DEFAULT_LOW.intValue())))\n .andExpect(jsonPath(\"$.[*].volume\").value(hasItem(DEFAULT_VOLUME)));\n\n // Check, that the count call also returns 1\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsSet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asSet() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean isInternalIndex() {\n return (this == itemIndex || this == withdrawnIndex || this == privateIndex);\n }", "private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }", "@Test\n public void indexIsUsedForQueryWhenRegionIsEmpty() {\n try {\n CacheUtils.getCache();\n isInitDone = false;\n Query q =\n qs.newQuery(\"SELECT DISTINCT * FROM \" + SEPARATOR + \"portfolio where status = 'active'\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n\n @Override\n public void afterIndexLookup(Collection coll) {\n indexUsed = true;\n }\n });\n SelectResults set = (SelectResults) q.execute();\n if (set.size() == 0 || !indexUsed) {\n fail(\"Either Size of the result set is zero or Index is not used \");\n }\n indexUsed = false;\n\n region.clear();\n set = (SelectResults) q.execute();\n if (set.size() != 0 || !indexUsed) {\n fail(\"Either Size of the result set is not zero or Index is not used \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.toString());\n } finally {\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }", "@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "private void checkOpenChestInput(Chest openChest) {\n for (Map.Entry<Rectangle, Integer> entry : chestInventoryInputs.entrySet()) {\n Vector3 inputPos = hudCamera.unproject(new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0));\n if (entry.getKey().contains(inputPos.x, inputPos.y)) {\n gameWorld.getHero().takeFromChest(openChest, entry.getValue());\n }\n }\n }", "private int findIllegal(final HashMap<String, Integer> association) {\n String[] illegalAssets = {\"Silk\", \"Pepper\", \"Barrel\"};\n for (String asset : illegalAssets) {\n for (int i = 0; i < getInventory().getNumberOfCards(); ++i) {\n if (getInventory().getAssets()[i] == (int) association.get(asset)) {\n return association.get(asset);\n }\n }\n }\n return -1;\n }", "public static void CheckMarketOptions(WebDriver driver) {\n\t\tString[] expectedMarkets = {\"Forex\",\"Major Pairs\",\"Minor Pairs\",\"Smart FX\",\"Indices\",\"Asia/Oceania\",\n\t\t\t\t\"Europe/Africa\",\"Middle East\",\"Americas\",\"OTC Indices\",\"OTC Stocks\",\"Germany\",\"India\",\"UK\",\"US\",\n\t\t\t\t\"Commodities\",\"Metals\",\"Energy\",\"Volatility Indices\",\"Continuous Indices\",\"Daily Reset Indices\"};\n\t\tWebElement element = Trade_Page.select_Market(driver);\n\t\tListsUtil.CompareLists(expectedMarkets, element);\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean hasIndices() {\n if (indices != null) {\n return indices.length > 0;\n }\n return false;\n }", "private static int getTheindexOrcheckAvilability(City [] cities, String cityName, String countryName){\n for(int i=0;i<cities.length;i++){\n if(cities[i].getCityName().equalsIgnoreCase(cityName)&&cities[i].getCountryName().equalsIgnoreCase(countryName))\n return i ;\n }\n return -1;\n }", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public synchronized boolean has(byte[] key) throws IOException {\n if ((kelondroAbstractRecords.debugmode) && (RAMIndex != true)) serverLog.logWarning(\"kelondroFlexTable\", \"RAM index warning in file \" + super.tablename);\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n return index.geti(key) >= 0;\r\n }", "private void updateIcon(MarketIndex index) throws IOException {\n\n if(index.getImage()==null){\n String url = \"https://etoro-cdn.etorostatic.com/market-avatars/\"+index.getSymbol().toLowerCase()+\"/150x150.png\";\n byte[] bytes = utils.getBytesFromUrl(url);\n if(bytes!=null){\n if(bytes.length>0){\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }else{ // Icon not found on etoro, symbol not managed on eToro or icon has a different name? Use standard icon.\n Image img = utils.getDefaultIndexIcon();\n bytes = utils.imageToByteArray(img);\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }\n\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "@Override\n public boolean contains(BankAccount anEntry) {\n for(int i=0; i<getSize(); i++){\n if(bankArrays[i].compare(anEntry) == 0){\n return true;\n }\n }\n return false;\n }", "@Test\n public void testGetInventoryQueryAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getInventoryQueryAction(\"{productId}\", \"{scope}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseInventoryItem\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}", "public static boolean hasIndex(Geography<?> geog)\n\t{\n\t\treturn indices.containsKey(geog);\n\t}", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "private int getIndex(int... elements) {\n int index = 0;\n for (int i = 0; i < elements.length; i++) index += elements[i] * Math.pow(universeSize, i);\n return index;\n }", "private void defaultIndActivationShouldBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(indActivation.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].activity\").value(hasItem(DEFAULT_ACTIVITY)))\n .andExpect(jsonPath(\"$.[*].customerId\").value(hasItem(DEFAULT_CUSTOMER_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].individualId\").value(hasItem(DEFAULT_INDIVIDUAL_ID.intValue())));\n\n // Check, that the count call also returns 1\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "StorableIndexInfo getIndexInfo();", "public void markNotDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(false);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "private void defaultKpiShouldBeFound(String filter) throws Exception {\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(kpi.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].title\").value(hasItem(DEFAULT_TITLE)))\n .andExpect(jsonPath(\"$.[*].reward\").value(hasItem(DEFAULT_REWARD)))\n .andExpect(jsonPath(\"$.[*].rewardDistribution\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION)))\n .andExpect(jsonPath(\"$.[*].gradingProcess\").value(hasItem(DEFAULT_GRADING_PROCESS)))\n .andExpect(jsonPath(\"$.[*].active\").value(hasItem(DEFAULT_ACTIVE)))\n .andExpect(jsonPath(\"$.[*].purpose\").value(hasItem(DEFAULT_PURPOSE)))\n .andExpect(jsonPath(\"$.[*].scopeOfWork\").value(hasItem(DEFAULT_SCOPE_OF_WORK)))\n .andExpect(jsonPath(\"$.[*].rewardDistributionInfo\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION_INFO)))\n .andExpect(jsonPath(\"$.[*].reporting\").value(hasItem(DEFAULT_REPORTING)))\n .andExpect(jsonPath(\"$.[*].fiatPoolFactor\").value(hasItem(DEFAULT_FIAT_POOL_FACTOR.doubleValue())))\n .andExpect(jsonPath(\"$.[*].grading\").value(hasItem(DEFAULT_GRADING)));\n\n // Check, that the count call also returns 1\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "private void defaultStocksShouldNotBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void markDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(true);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n\n }" ]
[ "0.7188198", "0.67673874", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.5220641", "0.52120763", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.49533445", "0.49380618", "0.49357355", "0.48846632", "0.48827213", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.4849015", "0.48302263", "0.48103258", "0.47813416", "0.47710627", "0.47707063", "0.4758674", "0.47522888", "0.4750927", "0.4743798", "0.47432873", "0.4733395", "0.47310334", "0.4730128", "0.47266978", "0.47266978", "0.47223347", "0.47085977", "0.4708522", "0.4707447", "0.46987975", "0.46890098", "0.46852946", "0.46822348", "0.46812844", "0.46812314", "0.46642044", "0.46623075", "0.46590918", "0.46550757", "0.46526393", "0.46254605", "0.46254605", "0.46254605", "0.46212432", "0.4617762", "0.46120238", "0.46072567", "0.4600084", "0.45912164", "0.4590142", "0.4584318", "0.45828423", "0.45781288", "0.45761603", "0.4569408", "0.45510882", "0.45493096", "0.45491737", "0.45437595", "0.45168328", "0.45139757", "0.4504986", "0.45033222", "0.4503052", "0.45014948", "0.45002428", "0.44990003", "0.44988427", "0.4490034", "0.4489099", "0.4488824", "0.44872078", "0.44868228", "0.44867262", "0.44827554", "0.44762182", "0.4473639", "0.44716424" ]
0.51321834
10
Check underlying assets for Indices market
public static void CheckCommoditiesAssets(WebDriver driver) { String[] CommoditiesAssets = {"Gold/USD","Palladium/USD","Platinum/USD","Silver/USD","Oil/USD"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Commodities"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(CommoditiesAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index\",\"South African Index\",\"Swiss Index\",\"Australian OTC Index\",\"Belgian OTC Index\",\"Bombay OTC Index\",\"Dutch OTC Index\",\n\t\t\t\t\"French OTC Index\",\"German OTC Index\",\"Hong Kong OTC Index\",\"Istanbul OTC Index\",\"Japanese OTC Index\",\"UK OTC Index\",\"US OTC Index\",\"US Tech OTC Index\",\"Wall Street OTC Index\",\"Dubai Index\",\n\t\t\t\t\"US Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(IndicesAssets, element);\n\t\t}", "public static void CheckVolatilityIndicesAssets(WebDriver driver) {\n\t\tString[] VolatilityIndicesAssets = {\"Volatility 10 Index\",\"Volatility 100 Index\",\"Volatility 25 Index\",\"Volatility 50 Index\",\"Volatility 75 Index\",\"Bear Market Index\",\"Bull Market Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Volatility Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(VolatilityIndicesAssets, element);\n\t\t}", "Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;", "private boolean checkIndices(int i, String key) {\n return i == genericServiceResult.getMap().get(key);\n }", "private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public void indexAssets() {\n\t\tString json = null;\n\t\tString assetUrl = minecraftVersion.getAssetIndex().getUrl().toString();\n\t\ttry {\n\t\t\tjson = JsonUtil.loadJSON(assetUrl);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tassetsList = (AssetIndex) JsonUtil.getGson().fromJson(json, AssetIndex.class);\n\t\t}\n\t}", "public void verifyIndex(PackIndex idx)\n\t\t\tthrows CorruptPackIndexException {\n\t\tObjectIdOwnerMap<ObjFromPack> inPack = new ObjectIdOwnerMap<>();\n\t\tfor (int i = 0; i < getObjectCount(); i++) {\n\t\t\tPackedObjectInfo entry = getObject(i);\n\t\t\tinPack.add(new ObjFromPack(entry));\n\n\t\t\tlong offs = idx.findOffset(entry);\n\t\t\tif (offs == -1) {\n\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingObject,\n\t\t\t\t\t\t\t\tInteger.valueOf(entry.getType()),\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_OBJ);\n\t\t\t} else if (offs != entry.getOffset()) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat\n\t\t\t\t\t\t.format(JGitText.get().mismatchOffset, entry.getName()),\n\t\t\t\t\t\tErrorType.MISMATCH_OFFSET);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (idx.hasCRC32Support()\n\t\t\t\t\t\t&& (int) idx.findCRC32(entry) != entry.getCRC()) {\n\t\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\t\tMessageFormat.format(JGitText.get().mismatchCRC,\n\t\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\t\tErrorType.MISMATCH_CRC);\n\t\t\t\t}\n\t\t\t} catch (MissingObjectException e) {\n\t\t\t\tCorruptPackIndexException cpe = new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingCRC,\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_CRC);\n\t\t\t\tcpe.initCause(e);\n\t\t\t\tthrow cpe;\n\t\t\t}\n\t\t}\n\n\t\tfor (MutableEntry entry : idx) {\n\t\t\tif (!inPack.contains(entry.toObjectId())) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat.format(\n\t\t\t\t\t\tJGitText.get().unknownObjectInIndex, entry.name()),\n\t\t\t\t\t\tErrorType.UNKNOWN_OBJ);\n\t\t\t}\n\t\t}\n\t}", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "public static void CheckOTCStocksAssets(WebDriver driver) {\n\t\tString[] OTCStocksAssets = {\"Airbus\",\"Allianz\",\"BMW\",\"Daimler\",\"Deutsche Bank\",\"Novartis\",\"SAP\",\"Siemens\",\"Bharti Airtel\",\"Maruti Suzuki\",\"Reliance Industries\",\"Tata Steel\",\"Barclays\",\"BP\",\n\t\t\t\t\"British American Tobacco\",\"HSBC\",\"Lloyds Bank\",\"Rio Tinto\",\"Standard Chartered\",\"Tesco\",\"Alibaba\",\"Alphabet\",\"Amazon.com\",\"American Express\",\"Apple\",\"Berkshire Hathaway\",\"Boeing\",\"Caterpillar\",\n\t\t\t\t\"Citigroup\",\"Electronic Arts\",\"Exxon Mobil\",\"Facebook\",\"Goldman Sachs\",\"IBM\",\"Johnson & Johnson\",\"MasterCard\",\"McDonald's\",\"Microsoft\",\n\t\t\t\t\"PepsiCo\",\"Procter & Gamble\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"OTC Stocks\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(OTCStocksAssets, element);\n\t\t}", "public static void CheckForexAssets(WebDriver driver) {\n\t\tString[] forexAssets = {\"AUD/JPY\",\"AUD/USD\",\"EUR/AUD\",\"EUR/CAD\",\"EUR/CHF\",\"EUR/GBP\",\"EUR/JPY\",\"EUR/USD\",\n\t\t\t\t\"GBP/AUD\",\"GBP/JPY\",\"GBP/USD\",\"USD/CAD\",\"USD/CHF\",\"USD/JPY\",\"AUD/CAD\",\"AUD/CHF\",\"AUD/NZD\",\"AUD/PLN\",\n\t\t\t\t\"EUR/NZD\",\"GBP/CAD\",\"GBP/CHF\",\"GBP/NOK\",\"GBP/NZD\",\"GBP/PLN\",\"NZD/JPY\",\"NZD/USD\",\"USD/MXN\",\"USD/NOK\",\n\t\t\t\t\"USD/PLN\",\"USD/SEK\",\"AUD Index\",\"EUR Index\",\"GBP Index\",\"USD Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Forex\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(forexAssets, element);\n\t\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "boolean hasAsset();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public static int checkAssets(double[] assets, boolean[] checkAssets, int limit) {\n\t\tfor (int i = 0; i < assets.length; i++) {\n\t\t\tif (assets[i] < limit && !checkAssets[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public static Markets getMarketById(int index) {\n\t\treturn markets[index]; \n\t}", "public boolean searchOK(int i){\n if(counts.size() > 0 && counts.get(i) != null &&\n queryKeys.size() > 0 && queryKeys.get(i) != null &&\n webEnvs.size() > 0 && webEnvs.get(i) != null)\n return true;\n else\n return false;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "List<MarketData> getMarketDataItems(String index);", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testIndexMaintenanceOnPutAll() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n region.put(\"1\", new Portfolio(1));\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"posvals.secId\",\n SEPARATOR + \"portfolio1 pf, pf.positions.values posvals \");\n Map data = new HashMap();\n for (int i = 1; i < 11; ++i) {\n data.put(\"\" + i, new Portfolio(i + 2));\n }\n\n region.putAll(data);\n }", "@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getInventoryTest() {\n Map<String, Integer> response = api.getInventory();\n\n Assert.assertNotNull(response);\n Assert.assertFalse(response.isEmpty());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/inventory\")));\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "private void validateIndexForKeys(CompactRangeIndex ri) {\n assertEquals(6, ri.getIndexStorage().size());\n CloseableIterator<IndexStoreEntry> itr = null;\n try {\n itr = ri.getIndexStorage().iterator(null);\n while (itr.hasNext()) {\n IndexStoreEntry reEntry = itr.next();\n Object obj = reEntry.getDeserializedRegionKey();\n assertTrue(obj instanceof String);\n assertTrue(idSet.contains(obj));\n }\n } finally {\n if (itr != null) {\n itr.close();\n }\n }\n }", "private static void assertIndicesSubset(List<String> indices, String... actions) {\n for (String action : actions) {\n List<TransportRequest> requests = consumeTransportRequests(action);\n assertThat(\"no internal requests intercepted for action [\" + action + \"]\", requests.size(), greaterThan(0));\n for (TransportRequest internalRequest : requests) {\n IndicesRequest indicesRequest = convertRequest(internalRequest);\n for (String index : indicesRequest.indices()) {\n assertThat(indices, hasItem(index));\n }\n }\n }\n }", "boolean indexExists(String name) throws ElasticException;", "private int findIndexInStock(FoodItem itemToCheck) {\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // if they're the same\n if (isSameFoodItem(this._stock[i], itemToCheck)) {\n // return current index.\n return i;\n }\n }\n return -1;\n }", "public void checkAssetSelected() throws ParameterValuesException {\n\t\tif (gridTaiSan.getItemCount() == 0) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần tìm kiếm tài sản muốn lập thẻ\", null);\n\t\t}\n\t\tif (gridTaiSan.getSelection()[0] == null) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần chọn tài sản muốn lập thẻ\", null);\n\t\t}\n\t}", "public boolean has(byte[] key) throws IOException {\n assert (RAMIndex == true);\r\n return index.geti(key) >= 0;\r\n }", "boolean isIndexed();", "boolean isIndexed();", "@Test\n public void testIndexMaintenanceOnCacheLoadedData() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n AttributesMutator am = region.getAttributesMutator();\n am.setCacheLoader(new CacheLoader() {\n\n @Override\n public Object load(LoaderHelper helper) throws CacheLoaderException {\n String key = (String) helper.getKey();\n Portfolio p = new Portfolio(Integer.parseInt(key));\n return p;\n }\n\n @Override\n public void close() {\n // nothing\n }\n });\n\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n List keys = new ArrayList();\n keys.add(\"1\");\n keys.add(\"2\");\n keys.add(\"3\");\n keys.add(\"4\");\n\n region.getAll(keys);\n }", "public int checksStatus(int indexX, int indexY) {\n if (allTiles[indexX][indexY].getType() == 10) {\n return -1;\n }\n int numOfCoveredTiles = 0;\n\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (allTiles[i][j].isCover() == true)\n numOfCoveredTiles++;\n }\n }\n\n if (numOfCoveredTiles==bombs)\n return 1;\n return 0;\n }", "public boolean createIndex_random(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tint part;\n\t\t\n\t\tint type_s, type_o, type1_s, type1_o;\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\t\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tQuad item;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse\n\t\t\t\tres = key;\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\titem = list.get(i);\n\t\t\t\ttype_s = item.type_s;\n\t\t\t\ttype_o = item.type_o;\n\t\t\t\t\n\t\t\t\to_bytes = item.o_bytes;\n\t\t\t\ts_bytes = item.s_bytes;\n\t\t\t\tpart = i;\n\t\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\t\t\t//\trs = search(sql.toString());\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t// unpdate records\t\t\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t\t// directly insert the record\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn false;\n\t\t\t\t}finally{\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void verifyToscaArtifactsExistApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n final int numOfToscaArtifacts = 2;\n ResourceGeneralPage.getLeftMenu().moveToToscaArtifactsScreen();\n AssertJUnit.assertTrue(ToscaArtifactsPage.checkElementsCountInTable(numOfToscaArtifacts));\n\n for (int i = 0; i < numOfToscaArtifacts; i++) {\n String typeFromScreen = ToscaArtifactsPage.getArtifactType(i);\n AssertJUnit.assertTrue(typeFromScreen.equals(ArtifactTypeEnum.TOSCA_CSAR.getType()) || typeFromScreen.equals(ArtifactTypeEnum.TOSCA_TEMPLATE.getType()));\n }\n\n //TODO Andrey should click on certify button\n ToscaArtifactsPage.clickCertifyButton(vfMetaData.getName());\n vfMetaData.setVersion(\"1.0\");\n VfVerificator.verifyToscaArtifactsInfo(vfMetaData, getUser());\n }", "public int contains(IntSet check){\n\t\tfor(int i=0;i<contents.size();i++){\n\t\t\tif(contents.get(i).equals(check)){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "boolean isIndex();", "private void defaultAssetShouldBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(asset.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].type\").value(hasItem(DEFAULT_TYPE.toString())))\n .andExpect(jsonPath(\"$.[*].fullPath\").value(hasItem(DEFAULT_FULL_PATH.toString())))\n .andExpect(jsonPath(\"$.[*].comments\").value(hasItem(DEFAULT_COMMENTS.toString())))\n .andExpect(jsonPath(\"$.[*].resourceId\").value(hasItem(DEFAULT_RESOURCE_ID.toString())));\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "@SuppressWarnings({ \"deprecation\", \"unchecked\" })\r\n\tpublic void init() throws Exception{\r\n\t\tAsset CurrentAsset;\r\ndouble TotalAmount = CurrentPortfolio.getTotalAmount(CurrentDate);\r\nCurrentPortfolio.sellAssetCollection(CurrentDate);\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US large cap\");\r\nCurrentAsset.setClassID(getAssetClassID(\"US Equity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^GSPC\", TotalAmount/7,\r\n\t\tCurrentDate);\r\n\t\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"IUS small cap\");\r\nCurrentAsset.setClassID(52l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^RUT\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"International Equity\");\r\nCurrentAsset.setClassID(9l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGTSX\", TotalAmount /7,CurrentDate);\r\n\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Real Estate\");\r\nCurrentAsset.setClassID(5l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGSIX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Commodity\");\r\nCurrentAsset.setClassID(getAssetClassID(\"Commodity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"QRAAX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\r\n\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Cash\");\r\nCurrentAsset.setClassID(3l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"CASH\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US Bond\");\r\nCurrentAsset.setClassID(2l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VBMFX\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\r\ninitialAmount=TotalAmount;\r\nwithdrawRate=0.05;\r\n\t}", "private void defaultAssetShouldNotBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "boolean isApplicableForAllAssetTypes();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean getIndexOK() {\n return indexOK;\n }", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "private void defaultIndActivationShouldNotBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public boolean hasIndices() {\n return mFactoryIndices != null;\n }", "private void defaultStocksShouldBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(stocks.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].open\").value(hasItem(DEFAULT_OPEN.intValue())))\n .andExpect(jsonPath(\"$.[*].high\").value(hasItem(DEFAULT_HIGH.intValue())))\n .andExpect(jsonPath(\"$.[*].close\").value(hasItem(DEFAULT_CLOSE.intValue())))\n .andExpect(jsonPath(\"$.[*].low\").value(hasItem(DEFAULT_LOW.intValue())))\n .andExpect(jsonPath(\"$.[*].volume\").value(hasItem(DEFAULT_VOLUME)));\n\n // Check, that the count call also returns 1\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsSet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asSet() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean isInternalIndex() {\n return (this == itemIndex || this == withdrawnIndex || this == privateIndex);\n }", "private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }", "@Test\n public void indexIsUsedForQueryWhenRegionIsEmpty() {\n try {\n CacheUtils.getCache();\n isInitDone = false;\n Query q =\n qs.newQuery(\"SELECT DISTINCT * FROM \" + SEPARATOR + \"portfolio where status = 'active'\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n\n @Override\n public void afterIndexLookup(Collection coll) {\n indexUsed = true;\n }\n });\n SelectResults set = (SelectResults) q.execute();\n if (set.size() == 0 || !indexUsed) {\n fail(\"Either Size of the result set is zero or Index is not used \");\n }\n indexUsed = false;\n\n region.clear();\n set = (SelectResults) q.execute();\n if (set.size() != 0 || !indexUsed) {\n fail(\"Either Size of the result set is not zero or Index is not used \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.toString());\n } finally {\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }", "@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "private void checkOpenChestInput(Chest openChest) {\n for (Map.Entry<Rectangle, Integer> entry : chestInventoryInputs.entrySet()) {\n Vector3 inputPos = hudCamera.unproject(new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0));\n if (entry.getKey().contains(inputPos.x, inputPos.y)) {\n gameWorld.getHero().takeFromChest(openChest, entry.getValue());\n }\n }\n }", "private int findIllegal(final HashMap<String, Integer> association) {\n String[] illegalAssets = {\"Silk\", \"Pepper\", \"Barrel\"};\n for (String asset : illegalAssets) {\n for (int i = 0; i < getInventory().getNumberOfCards(); ++i) {\n if (getInventory().getAssets()[i] == (int) association.get(asset)) {\n return association.get(asset);\n }\n }\n }\n return -1;\n }", "public static void CheckMarketOptions(WebDriver driver) {\n\t\tString[] expectedMarkets = {\"Forex\",\"Major Pairs\",\"Minor Pairs\",\"Smart FX\",\"Indices\",\"Asia/Oceania\",\n\t\t\t\t\"Europe/Africa\",\"Middle East\",\"Americas\",\"OTC Indices\",\"OTC Stocks\",\"Germany\",\"India\",\"UK\",\"US\",\n\t\t\t\t\"Commodities\",\"Metals\",\"Energy\",\"Volatility Indices\",\"Continuous Indices\",\"Daily Reset Indices\"};\n\t\tWebElement element = Trade_Page.select_Market(driver);\n\t\tListsUtil.CompareLists(expectedMarkets, element);\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean hasIndices() {\n if (indices != null) {\n return indices.length > 0;\n }\n return false;\n }", "private static int getTheindexOrcheckAvilability(City [] cities, String cityName, String countryName){\n for(int i=0;i<cities.length;i++){\n if(cities[i].getCityName().equalsIgnoreCase(cityName)&&cities[i].getCountryName().equalsIgnoreCase(countryName))\n return i ;\n }\n return -1;\n }", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public synchronized boolean has(byte[] key) throws IOException {\n if ((kelondroAbstractRecords.debugmode) && (RAMIndex != true)) serverLog.logWarning(\"kelondroFlexTable\", \"RAM index warning in file \" + super.tablename);\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n return index.geti(key) >= 0;\r\n }", "private void updateIcon(MarketIndex index) throws IOException {\n\n if(index.getImage()==null){\n String url = \"https://etoro-cdn.etorostatic.com/market-avatars/\"+index.getSymbol().toLowerCase()+\"/150x150.png\";\n byte[] bytes = utils.getBytesFromUrl(url);\n if(bytes!=null){\n if(bytes.length>0){\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }else{ // Icon not found on etoro, symbol not managed on eToro or icon has a different name? Use standard icon.\n Image img = utils.getDefaultIndexIcon();\n bytes = utils.imageToByteArray(img);\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }\n\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "@Override\n public boolean contains(BankAccount anEntry) {\n for(int i=0; i<getSize(); i++){\n if(bankArrays[i].compare(anEntry) == 0){\n return true;\n }\n }\n return false;\n }", "@Test\n public void testGetInventoryQueryAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getInventoryQueryAction(\"{productId}\", \"{scope}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseInventoryItem\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}", "public static boolean hasIndex(Geography<?> geog)\n\t{\n\t\treturn indices.containsKey(geog);\n\t}", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "private int getIndex(int... elements) {\n int index = 0;\n for (int i = 0; i < elements.length; i++) index += elements[i] * Math.pow(universeSize, i);\n return index;\n }", "private void defaultIndActivationShouldBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(indActivation.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].activity\").value(hasItem(DEFAULT_ACTIVITY)))\n .andExpect(jsonPath(\"$.[*].customerId\").value(hasItem(DEFAULT_CUSTOMER_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].individualId\").value(hasItem(DEFAULT_INDIVIDUAL_ID.intValue())));\n\n // Check, that the count call also returns 1\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "StorableIndexInfo getIndexInfo();", "public void markNotDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(false);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "private void defaultKpiShouldBeFound(String filter) throws Exception {\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(kpi.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].title\").value(hasItem(DEFAULT_TITLE)))\n .andExpect(jsonPath(\"$.[*].reward\").value(hasItem(DEFAULT_REWARD)))\n .andExpect(jsonPath(\"$.[*].rewardDistribution\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION)))\n .andExpect(jsonPath(\"$.[*].gradingProcess\").value(hasItem(DEFAULT_GRADING_PROCESS)))\n .andExpect(jsonPath(\"$.[*].active\").value(hasItem(DEFAULT_ACTIVE)))\n .andExpect(jsonPath(\"$.[*].purpose\").value(hasItem(DEFAULT_PURPOSE)))\n .andExpect(jsonPath(\"$.[*].scopeOfWork\").value(hasItem(DEFAULT_SCOPE_OF_WORK)))\n .andExpect(jsonPath(\"$.[*].rewardDistributionInfo\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION_INFO)))\n .andExpect(jsonPath(\"$.[*].reporting\").value(hasItem(DEFAULT_REPORTING)))\n .andExpect(jsonPath(\"$.[*].fiatPoolFactor\").value(hasItem(DEFAULT_FIAT_POOL_FACTOR.doubleValue())))\n .andExpect(jsonPath(\"$.[*].grading\").value(hasItem(DEFAULT_GRADING)));\n\n // Check, that the count call also returns 1\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "private void defaultStocksShouldNotBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void markDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(true);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n\n }" ]
[ "0.7188198", "0.67673874", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.52120763", "0.51321834", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.49533445", "0.49380618", "0.49357355", "0.48846632", "0.48827213", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.4849015", "0.48302263", "0.48103258", "0.47813416", "0.47710627", "0.47707063", "0.4758674", "0.47522888", "0.4750927", "0.4743798", "0.47432873", "0.4733395", "0.47310334", "0.4730128", "0.47266978", "0.47266978", "0.47223347", "0.47085977", "0.4708522", "0.4707447", "0.46987975", "0.46890098", "0.46852946", "0.46822348", "0.46812844", "0.46812314", "0.46642044", "0.46623075", "0.46590918", "0.46550757", "0.46526393", "0.46254605", "0.46254605", "0.46254605", "0.46212432", "0.4617762", "0.46120238", "0.46072567", "0.4600084", "0.45912164", "0.4590142", "0.4584318", "0.45828423", "0.45781288", "0.45761603", "0.4569408", "0.45510882", "0.45493096", "0.45491737", "0.45437595", "0.45168328", "0.45139757", "0.4504986", "0.45033222", "0.4503052", "0.45014948", "0.45002428", "0.44990003", "0.44988427", "0.4490034", "0.4489099", "0.4488824", "0.44872078", "0.44868228", "0.44867262", "0.44827554", "0.44762182", "0.4473639", "0.44716424" ]
0.5220641
8
Check underlying assets for Indices market
public static void CheckVolatilityIndicesAssets(WebDriver driver) { String[] VolatilityIndicesAssets = {"Volatility 10 Index","Volatility 100 Index","Volatility 25 Index","Volatility 50 Index","Volatility 75 Index","Bear Market Index","Bull Market Index"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Volatility Indices"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(VolatilityIndicesAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index\",\"South African Index\",\"Swiss Index\",\"Australian OTC Index\",\"Belgian OTC Index\",\"Bombay OTC Index\",\"Dutch OTC Index\",\n\t\t\t\t\"French OTC Index\",\"German OTC Index\",\"Hong Kong OTC Index\",\"Istanbul OTC Index\",\"Japanese OTC Index\",\"UK OTC Index\",\"US OTC Index\",\"US Tech OTC Index\",\"Wall Street OTC Index\",\"Dubai Index\",\n\t\t\t\t\"US Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Indices\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(IndicesAssets, element);\n\t\t}", "Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;", "private boolean checkIndices(int i, String key) {\n return i == genericServiceResult.getMap().get(key);\n }", "private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public void indexAssets() {\n\t\tString json = null;\n\t\tString assetUrl = minecraftVersion.getAssetIndex().getUrl().toString();\n\t\ttry {\n\t\t\tjson = JsonUtil.loadJSON(assetUrl);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tassetsList = (AssetIndex) JsonUtil.getGson().fromJson(json, AssetIndex.class);\n\t\t}\n\t}", "public void verifyIndex(PackIndex idx)\n\t\t\tthrows CorruptPackIndexException {\n\t\tObjectIdOwnerMap<ObjFromPack> inPack = new ObjectIdOwnerMap<>();\n\t\tfor (int i = 0; i < getObjectCount(); i++) {\n\t\t\tPackedObjectInfo entry = getObject(i);\n\t\t\tinPack.add(new ObjFromPack(entry));\n\n\t\t\tlong offs = idx.findOffset(entry);\n\t\t\tif (offs == -1) {\n\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingObject,\n\t\t\t\t\t\t\t\tInteger.valueOf(entry.getType()),\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_OBJ);\n\t\t\t} else if (offs != entry.getOffset()) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat\n\t\t\t\t\t\t.format(JGitText.get().mismatchOffset, entry.getName()),\n\t\t\t\t\t\tErrorType.MISMATCH_OFFSET);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (idx.hasCRC32Support()\n\t\t\t\t\t\t&& (int) idx.findCRC32(entry) != entry.getCRC()) {\n\t\t\t\t\tthrow new CorruptPackIndexException(\n\t\t\t\t\t\t\tMessageFormat.format(JGitText.get().mismatchCRC,\n\t\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\t\tErrorType.MISMATCH_CRC);\n\t\t\t\t}\n\t\t\t} catch (MissingObjectException e) {\n\t\t\t\tCorruptPackIndexException cpe = new CorruptPackIndexException(\n\t\t\t\t\t\tMessageFormat.format(JGitText.get().missingCRC,\n\t\t\t\t\t\t\t\tentry.getName()),\n\t\t\t\t\t\tErrorType.MISSING_CRC);\n\t\t\t\tcpe.initCause(e);\n\t\t\t\tthrow cpe;\n\t\t\t}\n\t\t}\n\n\t\tfor (MutableEntry entry : idx) {\n\t\t\tif (!inPack.contains(entry.toObjectId())) {\n\t\t\t\tthrow new CorruptPackIndexException(MessageFormat.format(\n\t\t\t\t\t\tJGitText.get().unknownObjectInIndex, entry.name()),\n\t\t\t\t\t\tErrorType.UNKNOWN_OBJ);\n\t\t\t}\n\t\t}\n\t}", "public static void CheckCommoditiesAssets(WebDriver driver) {\n\t\tString[] CommoditiesAssets = {\"Gold/USD\",\"Palladium/USD\",\"Platinum/USD\",\"Silver/USD\",\"Oil/USD\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Commodities\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(CommoditiesAssets, element);\n\t\t}", "private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }", "public static void CheckOTCStocksAssets(WebDriver driver) {\n\t\tString[] OTCStocksAssets = {\"Airbus\",\"Allianz\",\"BMW\",\"Daimler\",\"Deutsche Bank\",\"Novartis\",\"SAP\",\"Siemens\",\"Bharti Airtel\",\"Maruti Suzuki\",\"Reliance Industries\",\"Tata Steel\",\"Barclays\",\"BP\",\n\t\t\t\t\"British American Tobacco\",\"HSBC\",\"Lloyds Bank\",\"Rio Tinto\",\"Standard Chartered\",\"Tesco\",\"Alibaba\",\"Alphabet\",\"Amazon.com\",\"American Express\",\"Apple\",\"Berkshire Hathaway\",\"Boeing\",\"Caterpillar\",\n\t\t\t\t\"Citigroup\",\"Electronic Arts\",\"Exxon Mobil\",\"Facebook\",\"Goldman Sachs\",\"IBM\",\"Johnson & Johnson\",\"MasterCard\",\"McDonald's\",\"Microsoft\",\n\t\t\t\t\"PepsiCo\",\"Procter & Gamble\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"OTC Stocks\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(OTCStocksAssets, element);\n\t\t}", "public static void CheckForexAssets(WebDriver driver) {\n\t\tString[] forexAssets = {\"AUD/JPY\",\"AUD/USD\",\"EUR/AUD\",\"EUR/CAD\",\"EUR/CHF\",\"EUR/GBP\",\"EUR/JPY\",\"EUR/USD\",\n\t\t\t\t\"GBP/AUD\",\"GBP/JPY\",\"GBP/USD\",\"USD/CAD\",\"USD/CHF\",\"USD/JPY\",\"AUD/CAD\",\"AUD/CHF\",\"AUD/NZD\",\"AUD/PLN\",\n\t\t\t\t\"EUR/NZD\",\"GBP/CAD\",\"GBP/CHF\",\"GBP/NOK\",\"GBP/NZD\",\"GBP/PLN\",\"NZD/JPY\",\"NZD/USD\",\"USD/MXN\",\"USD/NOK\",\n\t\t\t\t\"USD/PLN\",\"USD/SEK\",\"AUD Index\",\"EUR Index\",\"GBP Index\",\"USD Index\"};\n\t\tSelect oSelect = new Select(Trade_Page.select_Market(driver));\n\t\toSelect.selectByVisibleText(\"Forex\");\n\t\tWebElement element = Trade_Page.select_Asset(driver);\n\t\tListsUtil.CompareLists(forexAssets, element);\n\t\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "boolean hasAsset();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public static int checkAssets(double[] assets, boolean[] checkAssets, int limit) {\n\t\tfor (int i = 0; i < assets.length; i++) {\n\t\t\tif (assets[i] < limit && !checkAssets[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public static Markets getMarketById(int index) {\n\t\treturn markets[index]; \n\t}", "public boolean searchOK(int i){\n if(counts.size() > 0 && counts.get(i) != null &&\n queryKeys.size() > 0 && queryKeys.get(i) != null &&\n webEnvs.size() > 0 && webEnvs.get(i) != null)\n return true;\n else\n return false;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "List<MarketData> getMarketDataItems(String index);", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }", "public boolean createIndex(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tQuad comp;\n\t\tint part;\n\t\tint type1_s, type1_o;\n\t\tint type_s,type_o;\n\t\tint wei, wei1; // compared use\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\t//String insert = \"insert into `sindex` values \";\n//\t\tString update = \"update \"\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse res = key;\n\t\t// hashcode sealing\t\n\t\t//\tkey = String.valueOf(key.hashCode()); \n\t\t\t\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\tcomp = list.get(i);\n\t\t\t\tpart = i;\n\t\t\t\ttype_s = comp.type_s;\n\t\t\t\ttype_o = comp.type_o;\n\t\t\t\twei = comp.weight;\n\t\t\t\to_bytes = comp.o_bytes;\n\t\t\t\ts_bytes = comp.s_bytes;\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\twei1 = rs.getInt(\"weight\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t// unpdate records\t\n\t\t\t\t\t\twei += wei1;\n\t\t\t\t\t\t/*if(wei < wei1){\n\t\t\t\t\t\t\twei = wei1;\n\t\t\t\t\t\t\tflag2 = 1;\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t//\tif(flag2 == 1)\n\t\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\t\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t// directly insert the record\n\t\t\t\t\t\n\t\t\t\t/**\t\t(option 1 as below)\t\n\t\t\t\t *\t\tvalue = \"('\"+key+\"',\"+part+\",'\"+type+\"',\"+wei+\")\";\n\t\t\t\t *\t\tupdateSql(insert+value);\n\t\t\t\t */\n\t\t\t\t//\t\toption 2 to realize\t\t\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"weight\", wei);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tSystem.out.println(key);\n\t\t\t\t}finally{\n\t\t\t\t// ??should wait until all database operation finished!\t\t\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testIndexMaintenanceOnPutAll() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n region.put(\"1\", new Portfolio(1));\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"posvals.secId\",\n SEPARATOR + \"portfolio1 pf, pf.positions.values posvals \");\n Map data = new HashMap();\n for (int i = 1; i < 11; ++i) {\n data.put(\"\" + i, new Portfolio(i + 2));\n }\n\n region.putAll(data);\n }", "@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getInventoryTest() {\n Map<String, Integer> response = api.getInventory();\n\n Assert.assertNotNull(response);\n Assert.assertFalse(response.isEmpty());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/inventory\")));\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "private void validateIndexForKeys(CompactRangeIndex ri) {\n assertEquals(6, ri.getIndexStorage().size());\n CloseableIterator<IndexStoreEntry> itr = null;\n try {\n itr = ri.getIndexStorage().iterator(null);\n while (itr.hasNext()) {\n IndexStoreEntry reEntry = itr.next();\n Object obj = reEntry.getDeserializedRegionKey();\n assertTrue(obj instanceof String);\n assertTrue(idSet.contains(obj));\n }\n } finally {\n if (itr != null) {\n itr.close();\n }\n }\n }", "private static void assertIndicesSubset(List<String> indices, String... actions) {\n for (String action : actions) {\n List<TransportRequest> requests = consumeTransportRequests(action);\n assertThat(\"no internal requests intercepted for action [\" + action + \"]\", requests.size(), greaterThan(0));\n for (TransportRequest internalRequest : requests) {\n IndicesRequest indicesRequest = convertRequest(internalRequest);\n for (String index : indicesRequest.indices()) {\n assertThat(indices, hasItem(index));\n }\n }\n }\n }", "boolean indexExists(String name) throws ElasticException;", "private int findIndexInStock(FoodItem itemToCheck) {\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // if they're the same\n if (isSameFoodItem(this._stock[i], itemToCheck)) {\n // return current index.\n return i;\n }\n }\n return -1;\n }", "public void checkAssetSelected() throws ParameterValuesException {\n\t\tif (gridTaiSan.getItemCount() == 0) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần tìm kiếm tài sản muốn lập thẻ\", null);\n\t\t}\n\t\tif (gridTaiSan.getSelection()[0] == null) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần chọn tài sản muốn lập thẻ\", null);\n\t\t}\n\t}", "public boolean has(byte[] key) throws IOException {\n assert (RAMIndex == true);\r\n return index.geti(key) >= 0;\r\n }", "boolean isIndexed();", "boolean isIndexed();", "@Test\n public void testIndexMaintenanceOnCacheLoadedData() throws Exception {\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n AttributesMutator am = region.getAttributesMutator();\n am.setCacheLoader(new CacheLoader() {\n\n @Override\n public Object load(LoaderHelper helper) throws CacheLoaderException {\n String key = (String) helper.getKey();\n Portfolio p = new Portfolio(Integer.parseInt(key));\n return p;\n }\n\n @Override\n public void close() {\n // nothing\n }\n });\n\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n List keys = new ArrayList();\n keys.add(\"1\");\n keys.add(\"2\");\n keys.add(\"3\");\n keys.add(\"4\");\n\n region.getAll(keys);\n }", "public int checksStatus(int indexX, int indexY) {\n if (allTiles[indexX][indexY].getType() == 10) {\n return -1;\n }\n int numOfCoveredTiles = 0;\n\n\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n if (allTiles[i][j].isCover() == true)\n numOfCoveredTiles++;\n }\n }\n\n if (numOfCoveredTiles==bombs)\n return 1;\n return 0;\n }", "public boolean createIndex_random(Hashtable<String, Hashtable<Integer,Quad>> ind_buffer){\n\t\tSet<String> keys = ind_buffer.keySet();\n\t\tHashtable<Integer,Quad> list;\n\t\tint part;\n\t\t\n\t\tint type_s, type_o, type1_s, type1_o;\n\t\tint o_bytes, s_bytes, o_bytes1, s_bytes1;\n\t\t\n\t\tString check = \"select resource, part, type_s, type_o, weight, o_bytes, s_bytes from `\"+table+\"` where \";\n\t\tResultSet rs = null;\n\t\tPreparedStatement prepstmt = null;\n\t\tQuad item;\n\t\tString res;\n\t\tfor(String key : keys){\n\t\t\tlist = ind_buffer.get(key);\n\t\t\tif(key.indexOf('\\'') != -1 )\n\t\t\t\tres = key.replaceAll(\"'\", \"''\");\n\t\t\telse\n\t\t\t\tres = key;\n\t\t\tfor(int i : list.keySet()){\n\t\t\t\titem = list.get(i);\n\t\t\t\ttype_s = item.type_s;\n\t\t\t\ttype_o = item.type_o;\n\t\t\t\t\n\t\t\t\to_bytes = item.o_bytes;\n\t\t\t\ts_bytes = item.s_bytes;\n\t\t\t\tpart = i;\n\t\n\t\t\t// seach if have res in table\n\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\n\t\t\t\tsql.append(check).append(\"resource='\").append(res).append(\"' and part=\").append(part);\n\t\t\t//\trs = search(sql.toString());\n\t\t\t\ttry {\n\t\t\t\t\tprepstmt = conn.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\trs = prepstmt.executeQuery();\n\t\t\t\t\tif(rs.next()){\n\t\t\t\t\t// updates the records\t\n\t\t\t\t\t\ttype1_s = rs.getInt(\"type_s\");\n\t\t\t\t\t\ttype1_o = rs.getInt(\"type_o\");\n\t\t\t\t\t\to_bytes1 = rs.getInt(\"o_bytes\");\n\t\t\t\t\t\ts_bytes1 = rs.getInt(\"s_bytes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\to_bytes1 += o_bytes;\n\t\t\t\t\t\ts_bytes1 += s_bytes;\n\t\t\t\t\t// unpdate records\t\t\n\t\t\t\t\t\tif(type_s != 0 && type1_s == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\tif(type_o != 0 && type1_o == 0)\n\t\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes1);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes1);\n\t\t\t\t\t\trs.updateRow();\n\t\t\t\t\t}else {\n\t\t\t\t\t// directly insert the record\n\t\t\t\t\t\trs.moveToInsertRow();\n\t\t\t\t\t\trs.updateString(\"resource\", key);\n\t\t\t\t\t\trs.updateInt(\"part\", part);\n\t\t\t\t\t\trs.updateInt(\"type_s\", type_s);\n\t\t\t\t\t\trs.updateInt(\"type_o\", type_o);\n\t\t\t\t\t\trs.updateInt(\"o_bytes\", o_bytes);\n\t\t\t\t\t\trs.updateInt(\"s_bytes\", s_bytes);\n\t\t\t\t\t\trs.insertRow();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn false;\n\t\t\t\t}finally{\n\t\t\t\t\tif (rs != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tprepstmt.close();\n\t\t\t\t\t\t} catch (SQLException e) {\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}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void verifyToscaArtifactsExistApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n final int numOfToscaArtifacts = 2;\n ResourceGeneralPage.getLeftMenu().moveToToscaArtifactsScreen();\n AssertJUnit.assertTrue(ToscaArtifactsPage.checkElementsCountInTable(numOfToscaArtifacts));\n\n for (int i = 0; i < numOfToscaArtifacts; i++) {\n String typeFromScreen = ToscaArtifactsPage.getArtifactType(i);\n AssertJUnit.assertTrue(typeFromScreen.equals(ArtifactTypeEnum.TOSCA_CSAR.getType()) || typeFromScreen.equals(ArtifactTypeEnum.TOSCA_TEMPLATE.getType()));\n }\n\n //TODO Andrey should click on certify button\n ToscaArtifactsPage.clickCertifyButton(vfMetaData.getName());\n vfMetaData.setVersion(\"1.0\");\n VfVerificator.verifyToscaArtifactsInfo(vfMetaData, getUser());\n }", "public int contains(IntSet check){\n\t\tfor(int i=0;i<contents.size();i++){\n\t\t\tif(contents.get(i).equals(check)){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "boolean isIndex();", "private void defaultAssetShouldBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(asset.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].type\").value(hasItem(DEFAULT_TYPE.toString())))\n .andExpect(jsonPath(\"$.[*].fullPath\").value(hasItem(DEFAULT_FULL_PATH.toString())))\n .andExpect(jsonPath(\"$.[*].comments\").value(hasItem(DEFAULT_COMMENTS.toString())))\n .andExpect(jsonPath(\"$.[*].resourceId\").value(hasItem(DEFAULT_RESOURCE_ID.toString())));\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "@SuppressWarnings({ \"deprecation\", \"unchecked\" })\r\n\tpublic void init() throws Exception{\r\n\t\tAsset CurrentAsset;\r\ndouble TotalAmount = CurrentPortfolio.getTotalAmount(CurrentDate);\r\nCurrentPortfolio.sellAssetCollection(CurrentDate);\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US large cap\");\r\nCurrentAsset.setClassID(getAssetClassID(\"US Equity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^GSPC\", TotalAmount/7,\r\n\t\tCurrentDate);\r\n\t\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"IUS small cap\");\r\nCurrentAsset.setClassID(52l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"^RUT\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"International Equity\");\r\nCurrentAsset.setClassID(9l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGTSX\", TotalAmount /7,CurrentDate);\r\n\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Real Estate\");\r\nCurrentAsset.setClassID(5l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VGSIX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Commodity\");\r\nCurrentAsset.setClassID(getAssetClassID(\"Commodity\"));\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"QRAAX\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\r\n\r\n\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"Cash\");\r\nCurrentAsset.setClassID(3l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"CASH\",\r\n\t\tTotalAmount /7, CurrentDate);\r\n\t\t\r\nCurrentAsset = new Asset();\r\nCurrentAsset.setAssetStrategyID(getStrategyID(\"STATIC\"));\r\nCurrentAsset.setName(\"US Bond\");\r\nCurrentAsset.setClassID(2l);\r\nCurrentAsset.setTargetPercentage(0.1428);\r\nCurrentPortfolio.addAsset(CurrentAsset);\r\nCurrentPortfolio.buy(CurrentAsset.getName(), \"VBMFX\", TotalAmount /7,\r\n\t\tCurrentDate);\r\n\r\ninitialAmount=TotalAmount;\r\nwithdrawRate=0.05;\r\n\t}", "private void defaultAssetShouldNotBeFound(String filter) throws Exception {\n restAssetMockMvc.perform(get(\"/api/assets?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "boolean isApplicableForAllAssetTypes();", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean getIndexOK() {\n return indexOK;\n }", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "private void defaultIndActivationShouldNotBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public boolean hasIndices() {\n return mFactoryIndices != null;\n }", "private void defaultStocksShouldBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(stocks.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].open\").value(hasItem(DEFAULT_OPEN.intValue())))\n .andExpect(jsonPath(\"$.[*].high\").value(hasItem(DEFAULT_HIGH.intValue())))\n .andExpect(jsonPath(\"$.[*].close\").value(hasItem(DEFAULT_CLOSE.intValue())))\n .andExpect(jsonPath(\"$.[*].low\").value(hasItem(DEFAULT_LOW.intValue())))\n .andExpect(jsonPath(\"$.[*].volume\").value(hasItem(DEFAULT_VOLUME)));\n\n // Check, that the count call also returns 1\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsSet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asSet() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean isInternalIndex() {\n return (this == itemIndex || this == withdrawnIndex || this == privateIndex);\n }", "private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }", "@Test\n public void indexIsUsedForQueryWhenRegionIsEmpty() {\n try {\n CacheUtils.getCache();\n isInitDone = false;\n Query q =\n qs.newQuery(\"SELECT DISTINCT * FROM \" + SEPARATOR + \"portfolio where status = 'active'\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n\n @Override\n public void afterIndexLookup(Collection coll) {\n indexUsed = true;\n }\n });\n SelectResults set = (SelectResults) q.execute();\n if (set.size() == 0 || !indexUsed) {\n fail(\"Either Size of the result set is zero or Index is not used \");\n }\n indexUsed = false;\n\n region.clear();\n set = (SelectResults) q.execute();\n if (set.size() != 0 || !indexUsed) {\n fail(\"Either Size of the result set is not zero or Index is not used \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.toString());\n } finally {\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }", "@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "private void checkOpenChestInput(Chest openChest) {\n for (Map.Entry<Rectangle, Integer> entry : chestInventoryInputs.entrySet()) {\n Vector3 inputPos = hudCamera.unproject(new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0));\n if (entry.getKey().contains(inputPos.x, inputPos.y)) {\n gameWorld.getHero().takeFromChest(openChest, entry.getValue());\n }\n }\n }", "private int findIllegal(final HashMap<String, Integer> association) {\n String[] illegalAssets = {\"Silk\", \"Pepper\", \"Barrel\"};\n for (String asset : illegalAssets) {\n for (int i = 0; i < getInventory().getNumberOfCards(); ++i) {\n if (getInventory().getAssets()[i] == (int) association.get(asset)) {\n return association.get(asset);\n }\n }\n }\n return -1;\n }", "public static void CheckMarketOptions(WebDriver driver) {\n\t\tString[] expectedMarkets = {\"Forex\",\"Major Pairs\",\"Minor Pairs\",\"Smart FX\",\"Indices\",\"Asia/Oceania\",\n\t\t\t\t\"Europe/Africa\",\"Middle East\",\"Americas\",\"OTC Indices\",\"OTC Stocks\",\"Germany\",\"India\",\"UK\",\"US\",\n\t\t\t\t\"Commodities\",\"Metals\",\"Energy\",\"Volatility Indices\",\"Continuous Indices\",\"Daily Reset Indices\"};\n\t\tWebElement element = Trade_Page.select_Market(driver);\n\t\tListsUtil.CompareLists(expectedMarkets, element);\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public boolean hasIndices() {\n if (indices != null) {\n return indices.length > 0;\n }\n return false;\n }", "private static int getTheindexOrcheckAvilability(City [] cities, String cityName, String countryName){\n for(int i=0;i<cities.length;i++){\n if(cities[i].getCityName().equalsIgnoreCase(cityName)&&cities[i].getCountryName().equalsIgnoreCase(countryName))\n return i ;\n }\n return -1;\n }", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public synchronized boolean has(byte[] key) throws IOException {\n if ((kelondroAbstractRecords.debugmode) && (RAMIndex != true)) serverLog.logWarning(\"kelondroFlexTable\", \"RAM index warning in file \" + super.tablename);\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n return index.geti(key) >= 0;\r\n }", "private void updateIcon(MarketIndex index) throws IOException {\n\n if(index.getImage()==null){\n String url = \"https://etoro-cdn.etorostatic.com/market-avatars/\"+index.getSymbol().toLowerCase()+\"/150x150.png\";\n byte[] bytes = utils.getBytesFromUrl(url);\n if(bytes!=null){\n if(bytes.length>0){\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }else{ // Icon not found on etoro, symbol not managed on eToro or icon has a different name? Use standard icon.\n Image img = utils.getDefaultIndexIcon();\n bytes = utils.imageToByteArray(img);\n byte[] scaled = utils.scaleImage(bytes, Application.STORED_ICON_WIDTH, Application.STORED_ICON_HEIGHT);\n index.setImage(scaled);\n }\n }\n\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "@Override\n public boolean contains(BankAccount anEntry) {\n for(int i=0; i<getSize(); i++){\n if(bankArrays[i].compare(anEntry) == 0){\n return true;\n }\n }\n return false;\n }", "@Test\n public void testGetInventoryQueryAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getInventoryQueryAction(\"{productId}\", \"{scope}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseInventoryItem\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}", "public static boolean hasIndex(Geography<?> geog)\n\t{\n\t\treturn indices.containsKey(geog);\n\t}", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "private int getIndex(int... elements) {\n int index = 0;\n for (int i = 0; i < elements.length; i++) index += elements[i] * Math.pow(universeSize, i);\n return index;\n }", "private void defaultIndActivationShouldBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(indActivation.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME)))\n .andExpect(jsonPath(\"$.[*].activity\").value(hasItem(DEFAULT_ACTIVITY)))\n .andExpect(jsonPath(\"$.[*].customerId\").value(hasItem(DEFAULT_CUSTOMER_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].individualId\").value(hasItem(DEFAULT_INDIVIDUAL_ID.intValue())));\n\n // Check, that the count call also returns 1\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "StorableIndexInfo getIndexInfo();", "public void markNotDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(false);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "private void defaultKpiShouldBeFound(String filter) throws Exception {\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(kpi.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].title\").value(hasItem(DEFAULT_TITLE)))\n .andExpect(jsonPath(\"$.[*].reward\").value(hasItem(DEFAULT_REWARD)))\n .andExpect(jsonPath(\"$.[*].rewardDistribution\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION)))\n .andExpect(jsonPath(\"$.[*].gradingProcess\").value(hasItem(DEFAULT_GRADING_PROCESS)))\n .andExpect(jsonPath(\"$.[*].active\").value(hasItem(DEFAULT_ACTIVE)))\n .andExpect(jsonPath(\"$.[*].purpose\").value(hasItem(DEFAULT_PURPOSE)))\n .andExpect(jsonPath(\"$.[*].scopeOfWork\").value(hasItem(DEFAULT_SCOPE_OF_WORK)))\n .andExpect(jsonPath(\"$.[*].rewardDistributionInfo\").value(hasItem(DEFAULT_REWARD_DISTRIBUTION_INFO)))\n .andExpect(jsonPath(\"$.[*].reporting\").value(hasItem(DEFAULT_REPORTING)))\n .andExpect(jsonPath(\"$.[*].fiatPoolFactor\").value(hasItem(DEFAULT_FIAT_POOL_FACTOR.doubleValue())))\n .andExpect(jsonPath(\"$.[*].grading\").value(hasItem(DEFAULT_GRADING)));\n\n // Check, that the count call also returns 1\n restKpiMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "private void defaultStocksShouldNotBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void markDone (Index index) throws InventoryNotFoundException {\n\n try {\n Inventory inventory = list.get(index.getZeroBased());\n\n inventory.setIsDone(true);\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n\n }" ]
[ "0.7188198", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.5220641", "0.52120763", "0.51321834", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.49533445", "0.49380618", "0.49357355", "0.48846632", "0.48827213", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.48775372", "0.4849015", "0.48302263", "0.48103258", "0.47813416", "0.47710627", "0.47707063", "0.4758674", "0.47522888", "0.4750927", "0.4743798", "0.47432873", "0.4733395", "0.47310334", "0.4730128", "0.47266978", "0.47266978", "0.47223347", "0.47085977", "0.4708522", "0.4707447", "0.46987975", "0.46890098", "0.46852946", "0.46822348", "0.46812844", "0.46812314", "0.46642044", "0.46623075", "0.46590918", "0.46550757", "0.46526393", "0.46254605", "0.46254605", "0.46254605", "0.46212432", "0.4617762", "0.46120238", "0.46072567", "0.4600084", "0.45912164", "0.4590142", "0.4584318", "0.45828423", "0.45781288", "0.45761603", "0.4569408", "0.45510882", "0.45493096", "0.45491737", "0.45437595", "0.45168328", "0.45139757", "0.4504986", "0.45033222", "0.4503052", "0.45014948", "0.45002428", "0.44990003", "0.44988427", "0.4490034", "0.4489099", "0.4488824", "0.44872078", "0.44868228", "0.44867262", "0.44827554", "0.44762182", "0.4473639", "0.44716424" ]
0.67673874
1
Select duration type and enter duration amount
public static void SelectEnterDuration(WebDriver driver,String durationAmount,String durationUnits) { Select dSelect = new Select(Trade_Page.select_Duration(driver)); dSelect.selectByValue("duration"); Select tSelect = new Select(Trade_Page.select_DurationUnits(driver)); tSelect.selectByValue(durationUnits); Actions action = new Actions(driver); action.doubleClick(Trade_Page.txt_DurationAmount(driver)).perform(); Trade_Page.txt_DurationAmount(driver).sendKeys(durationAmount); Trade_Page.txt_Amount(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void ValidateDurationFields(WebDriver driver,String durationType){\n\t\tif(durationType==\"t\"){\n\t\t\tSelectEnterDuration(driver,\"2\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tSelectEnterDuration(driver,\"11\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t}\n\t\telse if(durationType==\"s\") {\n\t\t\tSelectEnterDuration(driver,\"2\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TradingOfferTop(driver).getText(), \"Trading is not offered for this duration.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_TradingOfferBottom(driver).getText(), \"Trading is not offered for this duration.\");\n\t\t\tSelectEnterDuration(driver,\"99999\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t}\n\t\telse if(durationType==\"m\"){\n\t\t\tSelectEnterDuration(driver,\"0\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tSelectEnterDuration(driver,\"9999\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t}\n\t\telse if(durationType==\"h\"){\n\t\t\tSelectEnterDuration(driver,\"0\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tSelectEnterDuration(driver,\"999\",durationType);\n\t\t\tSystem.out.println(Trade_Page.err_TopPurchase(driver).getText());\n\t\t\t//Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t\t//Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t}\n\t\telse if(durationType==\"d\"){\n\t\t\tSelectEnterDuration(driver,\"0\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tSelectEnterDuration(driver,\"366\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_CannotCreateContractTop(driver).getText(), \"Cannot create contract\");\n\t\t\tAssert.assertEquals(Trade_Page.err_CannotCreateContractBottom(driver).getText(), \"Cannot create contract\");\n\t\t}\n\t}", "DurationTypeEnum getDurationType();", "public static void SelectEnterAmount(WebDriver driver,String amount_value,String amount_type,String durationAmount,String durationUnits) {\n\t\tSelectEnterDuration(driver,durationAmount,durationUnits);\n\t\tSelect oSelect = new Select(Trade_Page.select_AmountType(driver));\n\t\toSelect.selectByVisibleText(amount_type);\n\t\tActions builder = new Actions(driver);\n\t\tAction seriesofActions = builder\n\t\t\t\t.doubleClick(Trade_Page.txt_Amount(driver))\n\t\t\t\t.sendKeys(amount_value)\n\t\t\t\t.build();\n\t\tseriesofActions.perform();\n\t}", "public void setDuration(int val){this.duration = val;}", "public void setDuration(int duration){\n this.duration = duration;\n }", "void setDuration(int duration);", "public void setDuration(Number duration) {\n this.duration = duration;\n }", "@SneakyThrows public void modifyTempflyDuration(TempflyTask type, long duration) {\n switch (type) {\n case ADD:\n tempflyTimer.addTimeLeft(duration);\n break;\n case REMOVE:\n tempflyTimer.addElapsedTime(duration);\n break;\n case SET:\n tempflyTimer.setTotalTime(duration);\n break;\n case DISABLE:\n tempflyTimer.reset();\n break;\n default:\n break;\n }\n\n // Start if always running/currently flying\n if (type != TempflyTask.REMOVE\n && (Timer.alwaysDecrease\n || getPlayer().isFlying())) {\n tempflyTimer.start();\n }\n\n // Prevent NPE for data migration\n if (data != null) {\n data.set(\"tempfly\", tempflyTimer.getTimeLeft());\n data.save(dataFile);\n }\n }", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "private void pickDuration() {\n boolean keepgoing;\n System.out.println(\"for how long?\");\n keepgoing = true;\n while (keepgoing) {\n int temp = input.nextInt();\n if (temp <= 0 || temp + pickedtime >= 24) {\n System.out.println(\"Invalid duration\");\n } else {\n pickedduration = temp;\n keepgoing = false;\n }\n }\n }", "public void setDuration( Long duration );", "void setDuration(java.lang.String duration);", "public void SelectEMIbankDuration()\t{\n\t\tclickEMIselectBanKDrpDwn();\n\t\tclickEMIbankSelect();\n\t\tclickSelectEMIdurationDrpDwn();\n\t\tclickSelectEMIduration();\n\t}", "public void setDuration(int duration) {\n mDuration = duration;\n }", "protected void onChange_DiseaseDuration() {\n onChange_DiseaseDuration_xjal( DiseaseDuration );\n }", "public void changeUnitDurationTo(long t) {\n\t\tm_unitDuration = t;\n\t\tif( m_privateNotification != null ) {\n\t\t\tString content = \"changeUnitDuration:\"+Long.toString(t)+\";\";\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSCanvas\", content);\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSAbstractCanvas\", content);\n\t\t}\n\t}", "public void setDuration(String duration) {\n this.duration = duration;\n }", "public void setDuration(String duration) {\n this.duration = duration;\n }", "public void addExemption(ExemptionType type, long duration) {\n exemptionTypes.put(type, duration);\n }", "public void setDuration(int duration)\r\n\t{\r\n\t\tif (duration < 0) { throw new IllegalArgumentException(\"duration muss groesser als 0 sein\"); }\r\n\t\tthis.duration = duration;\r\n\t}", "public void setDuration(long duration) {\n this.duration = duration;\n }", "public void setDuration(long duration) {\n this.duration = duration;\n }", "public void setDuration(long duration) {\n this.duration = duration;\n }", "public void setDuration(Long duration)\r\n {\r\n this.duration = duration;\r\n }", "public void setDuration(Duration duration)\r\n {\r\n m_duration = duration;\r\n }", "public static void setTextDuration(TextView textView, String duration) {\n if (textView == null || duration == null || duration.isEmpty()) {\n return;\n }\n try {\n int min = (int) Double.parseDouble(duration) + 1;\n String minutes = Integer.toString(min % 60);\n minutes = minutes.length() == 1 ? \"0\" + minutes : minutes;\n textView.setText((min / 60) + \":\" + minutes);\n } catch (Exception e) {\n LLog.e(TAG, \"Error setTextDuration \" + e.toString());\n textView.setText(\" - \");\n }\n }", "public void setLength(int duration){\n\t\tlength = duration;\n\t}", "public void setDuration(float duration) {\n\t\tthis.duration = duration;\n\t}", "Posn getDuration();", "public void setDuration(int duration) {\n if (this.duration != duration) {\n this.duration = duration;\n }\n }", "@Override\n public void setItemDuration(Duration duration) {\n this.duration = duration;\n }", "public void requestChangeDuration()\r\n {\r\n AnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n AnimatedSpriteEditorGUI gui = singleton.getGUI();\r\n String poseDurationI = JOptionPane.showInputDialog(\r\n gui,\r\n POSE_DURATION_REQUEST_TEXT,\r\n POSE_DURATION_REQUEST_TITLE_TEXT,\r\n JOptionPane.QUESTION_MESSAGE);\r\n \t\r\n \t\tif((poseDurationI != null) &&(poseDurationI.length()>0))\r\n \t\t{\r\n \t\r\n \t\t\ttry{\r\n \t\t\t\tint newDuration = Integer.parseInt(poseDurationI);\r\n \t\t\t\tboolean changedDuration = poseIO.changePoseDuration(poseID, newDuration);\r\n \t\t\t\t\r\n \t\t\t\tif(changedDuration)\r\n \t\t\t\t{\r\n \t\t\t\t\tposeDuration = newDuration;\r\n \t\t\t\t\tsingleton.getFileManager().reloadSpriteType();\r\n \t\t\t\t\tJOptionPane.showMessageDialog(\r\n \t\t\t\t\t\t\t\t\t\tgui,\r\n \t\t\t\t\t\t\t\t\t\tPOSE_DURATION_CHANGED_TEXT,\r\n \t\t\t\t\t\t\t\t\t\tPOSE_DURATION_CHANGED_TITLE_TEXT,\r\n \t\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n \t\t\t\t}\r\n \t\t\t\telse\r\n \t\t\t\t{\r\n \t\t\t\t\tsingleton.getFileManager().reloadSpriteType();\r\n \t\t\t\t\tJOptionPane.showMessageDialog(\r\n \t\t\t\t\t\t\tgui,\r\n \t\t\t\t\t\t\tPOSE_DURATION_CHANGE_ERROR_TEXT,\r\n \t\t\t\t\t\t\tPOSE_DURATION_CHANGE_ERROR_TITLE_TEXT,\r\n \t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tcatch (NumberFormatException ex)\r\n \t\t\t{\r\n \t\t\t\tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_DURATION_INPUT_ERROR_TEXT,\r\n POSE_DURATION_INPUT_ERROR_TITLE_TEXT,\r\n JOptionPane.ERROR_MESSAGE); \t\r\n \t\t\t}\r\n \t\t}\r\n }", "void setDuration(org.apache.xmlbeans.GDuration duration);", "public void duration() {\n\t\tDuration daily = Duration.of(1, ChronoUnit.DAYS);\n\t\tDuration hourly = Duration.of(1, ChronoUnit.HOURS);\n\t\tDuration everyMinute = Duration.of(1, ChronoUnit.MINUTES);\n\t\tDuration everyTenSeconds = Duration.of(10, ChronoUnit.SECONDS);\n\t\tDuration everyMilli = Duration.of(1, ChronoUnit.MILLIS);\n\t\tDuration everyNano = Duration.of(1, ChronoUnit.NANOS);\n\n\t\tLocalDate date = LocalDate.of(2015, 5, 25);\n\t\tPeriod period = Period.ofDays(1);\n\t\tDuration days = Duration.ofDays(1);\n\t\tSystem.out.println(date.plus(period)); // 2015–05–26\n\t\t// System.out.println(date.plus(days)); // Unsupported unit: Seconds\n\t}", "public TimeEntry duration(Integer duration) {\n this.duration = duration;\n return this;\n }", "java.lang.String getDuration();", "Builder addTimeRequired(Duration value);", "public void setDuration(int newDuration) {\n this.duration = newDuration;\n }", "public void donutTypeChosen()\n {\n changeSubtotalTextField();\n }", "private void updateDuration() {\n duration = ((double) endTimeCalendar.getTime().getTime() - (startTimeCalendar.getTime().getTime())) / (1000 * 60 * 60.0);\n int hour = (int) duration;\n String hourString = dfHour.format(hour);\n int minute = (int) Math.round((duration - hour) * 60);\n String minuteString = dfMinute.format(minute);\n String textToPut = \"duration: \" + hourString + \" hours \" + minuteString + \" minutes\";\n eventDuration.setText(textToPut);\n }", "protected int getDuration() {\n try {\n return Utils.viewToInt(this.durationInput);\n }\n catch (NumberFormatException ex) {\n return Integer.parseInt(durationInput.getHint().toString());\n }\n }", "public int getDuration() {return this.duration;}", "private Duration getDurationFromTimeView() {\n String text = timeView.getText().toString();\n String[] values = text.split(\":\");\n\n int hours = Integer.parseInt(values[0]);\n int minutes = Integer.parseInt(values[1]);\n int seconds = Integer.parseInt(values[2]);\n\n return Utils.hoursMinutesSecondsToDuration(hours, minutes, seconds);\n }", "private void setTxtTimeTotal()\n {\n SimpleDateFormat dinhDangGio= new SimpleDateFormat(\"mm:ss\");\n txtTimeTotal.setText(dinhDangGio.format(mediaPlayer.getDuration()));\n //\n skSong.setMax(mediaPlayer.getDuration());\n }", "public void setDuration(long duration) {\n\t\tthis.startDuration = System.currentTimeMillis();\n\t\tthis.endDuration = startDuration + duration * 1000;\n\t}", "Builder addTimeRequired(Duration.Builder value);", "public int getDuration() { return duration; }", "int getDuration();", "int getDuration();", "public void SetDuration(int duration)\n {\n TimerMax = duration;\n if (Timer > TimerMax)\n {\n Timer = TimerMax;\n }\n }", "Duration getDuration();", "@Autowired\n\tpublic void setDuration(@Value(\"${repair.duration}\") Duration duration) {\n\t\tthis.duration = DurationConverter.oneOrMore(duration);\n\t}", "@Override protected String getDurationUnit() {\n return super.getDurationUnit();\n }", "private void showTimeLapseDurationDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res\n\t\t\t\t.getString(R.string.setting_time_lapse_duration);\n\t\tfinal String[] videoTimeLapseDurationString = uiDisplayResource\n\t\t\t\t.getTimeLapseDuration();\n\t\tif (videoTimeLapseDurationString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"videoTimeLapseDurationString == null\");\n\t\t\treturn;\n\t\t}\n\t\tint length = videoTimeLapseDurationString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_TIME_LAPSE_DURATION,\n\t\t\t\tcameraProperties.getCurrentTimeLapseDuration());\n\t\tLog.d(\"tigertiger\", \"uiInfo.uiStringInSetting =\"\n\t\t\t\t+ uiInfo.uiStringInSetting);\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (videoTimeLapseDurationString[i]\n\t\t\t\t\t.equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tLog.d(\"tigertiger\", \"videoTimeLapseDurationString[i] =\"\n\t\t\t\t\t\t+ videoTimeLapseDurationString[i]);\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tint value = (Integer) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_TIME_LAPSE_DURATION,\n\t\t\t\t\t\tvideoTimeLapseDurationString[arg1]);\n\t\t\t\tcameraProperties.setTimeLapseDuration(value);\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, videoTimeLapseDurationString, curIdx, listener,\n\t\t\t\ttrue);\n\t}", "public void setDurationStartDay(Integer durationStartDay) {\n this.durationStartDay = durationStartDay;\n }", "public Builder setDuration(int value) {\n bitField0_ |= 0x00000008;\n duration_ = value;\n onChanged();\n return this;\n }", "public int getDuration();", "public void changeUnitForUnitDurationTo(String u) {\n\t\tm_unitForUnitDuration = u;\n\t}", "public void setDuration (int sec) {\n String hoursText = \"\", minutesText = \"\", synthez = \"\";\n\n if (sec < 60) {\n synthez = \"less than one minute\";\n synthez = String.format(TEMPLATE, synthez);\n setText(Html.fromHtml(synthez)+\".\", BufferType.SPANNABLE);\n return;\n }\n\n if (sec >= 3600) {\n hoursText += sec/3600+\" Hour\";\n if (sec/3600 > 1) {\n hoursText+=\"s\";\n }\n hoursText+=\" \";\n }\n if (((sec%3600)/ 60) > 0) {\n minutesText+= ((sec%3600)/ 60)+ \" minute\";\n if (((sec%3600)/ 60 ) > 1) {\n minutesText+=\"s\";\n }\n minutesText+=\" \";\n }\n synthez = hoursText+minutesText;\n synthez = String.format(TEMPLATE, synthez);\n setText(Html.fromHtml(synthez)+\".\", BufferType.SPANNABLE);\n }", "@Override protected double convertDuration(double duration) {\n return super.convertDuration(duration);\n }", "public void setDuration(int duration) {\r\n this.duration = duration;\r\n if (connections.get(lightIndex).getTrafficLight().getSignal()\r\n == TrafficSignal.YELLOW) {\r\n connections.get(lightIndex).getTrafficLight().setSignal\r\n (TrafficSignal.GREEN);\r\n }\r\n currentGreenTime = 0;\r\n currentYellowTime = 0;\r\n }", "long getDuration();", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount3;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount3 );\n }", "public default int getDuration(int casterLevel){ return Reference.Values.TICKS_PER_SECOND; }", "void migrateDurationlookupToCodeType();", "protected void setDuraction(int seconds) {\n duration = seconds * 1000L;\n }", "public void setDuration(@Nullable final Long duration) {\n mDuration = duration;\n }", "@Then(\"^I choose an interval time$\")\n public void i_choose_an_interval_time() {\n onViewWithId(R.id.startHour).type(\"12:00\");\n onViewWithId(R.id.endHour).type(\"23:59\");\n }", "public void setDuration(Duration param) {\n this.localDuration = param;\n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount1;\n String.valueOf(amount1);\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount1 );\n }", "public void setProgressDuration(int duration){\n this.mProgressDuration = duration;\n }", "long getDuration(TimeUnit timeUnit);", "public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}", "public void setDurationTotal(Integer durationTotal) {\n this.durationTotal = durationTotal;\n }", "public void setDuration(DeltaSeconds d) {\n duration = d ;\n }", "public void handleRecordTime(int type, long time) {\n if (type == 4) {\n this.mFingerDown = time;\n } else if (type == 5) {\n this.mFingerSuccess = time;\n } else if (this.mStartTime != 0) {\n if (type != 0) {\n if (type != 1) {\n if (type != 2) {\n if (type != 3) {\n if (type != 6) {\n if (type != 7) {\n if (type == 8 && this.mKeyExitAnim == 0 && this.mKeyGoingAway > 0) {\n this.mKeyExitAnim = time;\n }\n } else if (this.mKeyGoingAway == 0) {\n this.mKeyGoingAway = time;\n }\n } else if (this.mKeyguardDrawn == 0 && this.mBlockScreenOnBegin > 0) {\n this.mKeyguardDrawn = time;\n }\n } else if (this.mBlockScreenOnEnd == 0 && this.mBlockScreenOnBegin > 0) {\n this.mBlockScreenOnEnd = time;\n }\n } else if (this.mBlockScreenOnBegin == 0) {\n this.mBlockScreenOnBegin = time;\n }\n } else if (this.mSetDisplayStateEnd == 0 && this.mSetDisplayStateBegin > 0) {\n this.mSetDisplayStateEnd = time;\n }\n } else if (this.mSetDisplayStateBegin == 0) {\n this.mSetDisplayStateBegin = time;\n }\n }\n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount2;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount2 );\n }", "@Test\r\n\tpublic void testGetDuration() {\r\n\t\tassertEquals(90, breaku1.getDuration());\r\n\t\tassertEquals(90, externu1.getDuration());\r\n\t\tassertEquals(90, meetingu1.getDuration());\r\n\t\tassertEquals(90, teachu1.getDuration());\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.DurationType createDurationType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.DurationTypeImpl();\n }", "org.apache.xmlbeans.GDuration getDuration();", "public void recordDuration(long duration) {\n recording.get(recording.size()-1).setDuration(duration); \n }", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public void updateDuration(User user);", "static Duration promptForTime() {\n String input;\n\n Duration time;\n System.out.println(\"Enter the player's time (hh:mm:ss.SSS)\");\n System.out.println(\"EX: 1:03:44.256\");\n\n //loops until correct imput calls break;\n while (true) {\n System.out.print(\">\");\n\n if (Menus.reader.hasNext()) {\n input = Menus.reader.nextLine().strip();\n\n //Reformat the input to match ISO standard\n int colonCount = countOccurrences(input, ':');\n if (colonCount == 2) {\n input = input.replaceFirst(\":\", \"H\");\n input = input.replace(':', 'M');\n } else if (colonCount == 1) {\n input = input.replace(':', 'M');\n }\n input = \"PT\" + input + \"S\";\n\n //Parse the input to a duration\n try {\n time = Duration.parse(input);\n break;\n } catch (DateTimeParseException dtp) {\n System.out.println(\"Make sure the format is correct\");\n }\n }\n }\n return time;\n }", "java.lang.String getEmploymentDurationText();", "public String getDuration() {\n return this.duration;\n }", "private void sumarEdificio(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.CHOZA:\n cantActual = Integer.parseInt(jTextFieldChoza.getText());\n jTextFieldChoza.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAMPAMENTO:\n cantActual = Integer.parseInt(jTextFieldCampamento.getText());\n jTextFieldCampamento.setText(String.valueOf(cantActual+1));\n break;\n case vg.CUARTEL:\n cantActual = Integer.parseInt(jTextFieldCuartel.getText());\n jTextFieldCuartel.setText(String.valueOf(cantActual+1));\n break;\n case vg.MINA:\n cantActual = Integer.parseInt(jTextFieldMina.getText());\n jTextFieldMina.setText(String.valueOf(cantActual+1));\n break;\n case vg.RECOLECTOR:\n cantActual = Integer.parseInt(jTextFieldRecolector.getText());\n jTextFieldRecolector.setText(String.valueOf(cantActual+1));\n break;\n case vg.TORRE:\n cantActual = Integer.parseInt(jTextFieldTorre.getText());\n jTextFieldTorre.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAÑON:\n cantActual = Integer.parseInt(jTextFieldCañon.getText());\n jTextFieldCañon.setText(String.valueOf(cantActual+1));\n break;\n case vg.MORTERO:\n cantActual = Integer.parseInt(jTextFieldMortero.getText());\n jTextFieldMortero.setText(String.valueOf(cantActual+1));\n break;\n default:\n break;\n }\n }", "private void readUnitType(){\n while (choice != 1 && choice !=2 ){\n System.out.println (\"Please choose an option\");\n System.out.println(\"1- Pounds / Inches \\n2- Kilos / Meters\"); \n choice = input.nextInt();\n }\n }", "public String getDurationUnit() {\n\t\treturn (String) get_Value(\"DurationUnit\");\n\t}", "void xsetDuration(org.apache.xmlbeans.XmlInt duration);", "public double getDuration () {\n return duration;\n }", "@Test\n public void getAmountDescription_total_durationGoal() {\n Goal goal = new Goal(2, 49, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n \"PT2H47M\");\n // Create the real and expected total amount descriptions\n description = goal.getAmountDescription(\"total\");\n expectedDescription = \"2 hours and 47 minutes\";\n\n // Check the 2 Strings are the same\n assertEquals(expectedDescription, description);\n }", "private static Duration readDurationFromConsole() {\n\t\tboolean validInput = false; \n\t\tDuration duration = null; \n\t\twhile (! validInput) {\n\t\t\ttry {\n\t\t\t\tOut.print(\" Bitte Dauer in Minuten eingeben: \");\n\t\t\t\tduration = readDuration();\n\t\t\t\tvalidInput = true; \n\t\t\t} catch (Exception e) {\n\t\t\t\tOut.print(\" Falsche Eingabe der Dauer!\");\n\t\t\t}\n\t\t}\n\t\treturn duration;\n\t}", "IDateTimeValueType add( ITimeDurationValueType duration );", "public Integer getDuration() {\n return duration;\n }", "public int getType(int type){\n\tint empHrs = 0;\n\tif(type == IS_PART_TIME){\n\t\tSystem.out.println(\"PART TIME EMPLOYEE\");\n \t\tempHrs = 4;\n \t}\n \tif(type == IS_FULL_TIME){\n \t\tSystem.out.println(\"FULL TIME EMPLOYEE\");\n \t\tempHrs = 8;\n \t}\n\treturn empHrs;\n\t}", "void xsetDuration(org.apache.xmlbeans.XmlDuration duration);" ]
[ "0.66973376", "0.65382725", "0.6516639", "0.6433246", "0.63591594", "0.63296586", "0.63125604", "0.62073773", "0.61743873", "0.6172739", "0.6172739", "0.6165813", "0.61538815", "0.61387944", "0.61367625", "0.603514", "0.6007906", "0.60015833", "0.5986486", "0.5975591", "0.5975591", "0.5958638", "0.59277964", "0.5925408", "0.5925408", "0.5894063", "0.5889594", "0.5883959", "0.58155483", "0.5807402", "0.57800025", "0.5710668", "0.57048464", "0.56696", "0.56443864", "0.56427157", "0.56342554", "0.56294703", "0.5597449", "0.5543075", "0.5532658", "0.55221987", "0.54837775", "0.5479522", "0.5468721", "0.54573435", "0.54375297", "0.5428213", "0.5403174", "0.5402641", "0.5393166", "0.5393166", "0.5374869", "0.53644687", "0.53537226", "0.53533745", "0.5351933", "0.5344254", "0.53296685", "0.532873", "0.53028136", "0.53022623", "0.52867013", "0.5280221", "0.5269886", "0.52516425", "0.5247678", "0.52453923", "0.5244289", "0.5244133", "0.5241106", "0.5224921", "0.5218546", "0.5197371", "0.5194117", "0.51884395", "0.51823246", "0.5171029", "0.51615506", "0.5145812", "0.51392764", "0.51360065", "0.5129683", "0.51247346", "0.51194155", "0.5105591", "0.5094994", "0.50872564", "0.50793016", "0.50781643", "0.50705504", "0.5058535", "0.50364995", "0.50353366", "0.5025395", "0.49956694", "0.49949428", "0.49900356", "0.49835348", "0.4977372" ]
0.62577385
7
Select duration and Enter amount
public static void SelectEnterAmount(WebDriver driver,String amount_value,String amount_type,String durationAmount,String durationUnits) { SelectEnterDuration(driver,durationAmount,durationUnits); Select oSelect = new Select(Trade_Page.select_AmountType(driver)); oSelect.selectByVisibleText(amount_type); Actions builder = new Actions(driver); Action seriesofActions = builder .doubleClick(Trade_Page.txt_Amount(driver)) .sendKeys(amount_value) .build(); seriesofActions.perform(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void SelectEnterDuration(WebDriver driver,String durationAmount,String durationUnits) {\n\t\tSelect dSelect = new Select(Trade_Page.select_Duration(driver));\n\t\tdSelect.selectByValue(\"duration\");\n\t\tSelect tSelect = new Select(Trade_Page.select_DurationUnits(driver));\n\t\ttSelect.selectByValue(durationUnits);\n\t\tActions action = new Actions(driver);\n\t\taction.doubleClick(Trade_Page.txt_DurationAmount(driver)).perform();\n\t\tTrade_Page.txt_DurationAmount(driver).sendKeys(durationAmount);\n\t\tTrade_Page.txt_Amount(driver).click();\n\t}", "public void SelectEMIbankDuration()\t{\n\t\tclickEMIselectBanKDrpDwn();\n\t\tclickEMIbankSelect();\n\t\tclickSelectEMIdurationDrpDwn();\n\t\tclickSelectEMIduration();\n\t}", "private void pickDuration() {\n boolean keepgoing;\n System.out.println(\"for how long?\");\n keepgoing = true;\n while (keepgoing) {\n int temp = input.nextInt();\n if (temp <= 0 || temp + pickedtime >= 24) {\n System.out.println(\"Invalid duration\");\n } else {\n pickedduration = temp;\n keepgoing = false;\n }\n }\n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount1;\n String.valueOf(amount1);\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount1 );\n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount3;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount3 );\n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount2;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount2 );\n }", "void setDuration(int duration);", "public void setDuration(int val){this.duration = val;}", "protected void onChange_DiseaseDuration() {\n onChange_DiseaseDuration_xjal( DiseaseDuration );\n }", "public void setDuration(int duration){\n this.duration = duration;\n }", "public static void setTextDuration(TextView textView, String duration) {\n if (textView == null || duration == null || duration.isEmpty()) {\n return;\n }\n try {\n int min = (int) Double.parseDouble(duration) + 1;\n String minutes = Integer.toString(min % 60);\n minutes = minutes.length() == 1 ? \"0\" + minutes : minutes;\n textView.setText((min / 60) + \":\" + minutes);\n } catch (Exception e) {\n LLog.e(TAG, \"Error setTextDuration \" + e.toString());\n textView.setText(\" - \");\n }\n }", "public void setDuration(Number duration) {\n this.duration = duration;\n }", "public void requestChangeDuration()\r\n {\r\n AnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n AnimatedSpriteEditorGUI gui = singleton.getGUI();\r\n String poseDurationI = JOptionPane.showInputDialog(\r\n gui,\r\n POSE_DURATION_REQUEST_TEXT,\r\n POSE_DURATION_REQUEST_TITLE_TEXT,\r\n JOptionPane.QUESTION_MESSAGE);\r\n \t\r\n \t\tif((poseDurationI != null) &&(poseDurationI.length()>0))\r\n \t\t{\r\n \t\r\n \t\t\ttry{\r\n \t\t\t\tint newDuration = Integer.parseInt(poseDurationI);\r\n \t\t\t\tboolean changedDuration = poseIO.changePoseDuration(poseID, newDuration);\r\n \t\t\t\t\r\n \t\t\t\tif(changedDuration)\r\n \t\t\t\t{\r\n \t\t\t\t\tposeDuration = newDuration;\r\n \t\t\t\t\tsingleton.getFileManager().reloadSpriteType();\r\n \t\t\t\t\tJOptionPane.showMessageDialog(\r\n \t\t\t\t\t\t\t\t\t\tgui,\r\n \t\t\t\t\t\t\t\t\t\tPOSE_DURATION_CHANGED_TEXT,\r\n \t\t\t\t\t\t\t\t\t\tPOSE_DURATION_CHANGED_TITLE_TEXT,\r\n \t\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n \t\t\t\t}\r\n \t\t\t\telse\r\n \t\t\t\t{\r\n \t\t\t\t\tsingleton.getFileManager().reloadSpriteType();\r\n \t\t\t\t\tJOptionPane.showMessageDialog(\r\n \t\t\t\t\t\t\tgui,\r\n \t\t\t\t\t\t\tPOSE_DURATION_CHANGE_ERROR_TEXT,\r\n \t\t\t\t\t\t\tPOSE_DURATION_CHANGE_ERROR_TITLE_TEXT,\r\n \t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tcatch (NumberFormatException ex)\r\n \t\t\t{\r\n \t\t\t\tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_DURATION_INPUT_ERROR_TEXT,\r\n POSE_DURATION_INPUT_ERROR_TITLE_TEXT,\r\n JOptionPane.ERROR_MESSAGE); \t\r\n \t\t\t}\r\n \t\t}\r\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public static void ValidateDurationFields(WebDriver driver,String durationType){\n\t\tif(durationType==\"t\"){\n\t\t\tSelectEnterDuration(driver,\"2\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tSelectEnterDuration(driver,\"11\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t}\n\t\telse if(durationType==\"s\") {\n\t\t\tSelectEnterDuration(driver,\"2\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TradingOfferTop(driver).getText(), \"Trading is not offered for this duration.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_TradingOfferBottom(driver).getText(), \"Trading is not offered for this duration.\");\n\t\t\tSelectEnterDuration(driver,\"99999\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t}\n\t\telse if(durationType==\"m\"){\n\t\t\tSelectEnterDuration(driver,\"0\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tSelectEnterDuration(driver,\"9999\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t}\n\t\telse if(durationType==\"h\"){\n\t\t\tSelectEnterDuration(driver,\"0\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tSelectEnterDuration(driver,\"999\",durationType);\n\t\t\tSystem.out.println(Trade_Page.err_TopPurchase(driver).getText());\n\t\t\t//Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t\t//Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), \"Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day.\");\n\t\t}\n\t\telse if(durationType==\"d\"){\n\t\t\tSelectEnterDuration(driver,\"0\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tAssert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), \"Expiry time cannot be equal to start time.\");\n\t\t\tSelectEnterDuration(driver,\"366\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_CannotCreateContractTop(driver).getText(), \"Cannot create contract\");\n\t\t\tAssert.assertEquals(Trade_Page.err_CannotCreateContractBottom(driver).getText(), \"Cannot create contract\");\n\t\t}\n\t}", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "public void setDuration( Long duration );", "private void timeSelectionDialog() {\n final TimeSelectionDialog timeSelectDialog = new TimeSelectionDialog(this, _game);\n timeSelectDialog.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _game.setTime(timeSelectDialog.getSelectedTime());\n timeSelectDialog.dismiss();\n }\n });\n timeSelectDialog.show();\n }", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "public void setDuration(int duration)\r\n\t{\r\n\t\tif (duration < 0) { throw new IllegalArgumentException(\"duration muss groesser als 0 sein\"); }\r\n\t\tthis.duration = duration;\r\n\t}", "public void setDuration(int duration) {\n mDuration = duration;\n }", "private void setTxtTimeTotal()\n {\n SimpleDateFormat dinhDangGio= new SimpleDateFormat(\"mm:ss\");\n txtTimeTotal.setText(dinhDangGio.format(mediaPlayer.getDuration()));\n //\n skSong.setMax(mediaPlayer.getDuration());\n }", "public void changeUnitDurationTo(long t) {\n\t\tm_unitDuration = t;\n\t\tif( m_privateNotification != null ) {\n\t\t\tString content = \"changeUnitDuration:\"+Long.toString(t)+\";\";\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSCanvas\", content);\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSAbstractCanvas\", content);\n\t\t}\n\t}", "void setDuration(java.lang.String duration);", "public void setDuration(Duration duration)\r\n {\r\n m_duration = duration;\r\n }", "private void setTime()\n\t{\n\t\t//local variable \n\t\tString rad = JOptionPane.showInputDialog(\"Enter the time spent bicycling: \"); \n\t\t\n\t\t//convert to int\n\t\ttry {\n\t\t\tbikeTime = Integer.parseInt(rad);\n\t\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t}", "public void setDuration(long duration) {\n this.duration = duration;\n }", "public void setDuration(long duration) {\n this.duration = duration;\n }", "private void updateDuration() {\n duration = ((double) endTimeCalendar.getTime().getTime() - (startTimeCalendar.getTime().getTime())) / (1000 * 60 * 60.0);\n int hour = (int) duration;\n String hourString = dfHour.format(hour);\n int minute = (int) Math.round((duration - hour) * 60);\n String minuteString = dfMinute.format(minute);\n String textToPut = \"duration: \" + hourString + \" hours \" + minuteString + \" minutes\";\n eventDuration.setText(textToPut);\n }", "public void setDuration(long duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n if (this.duration != duration) {\n this.duration = duration;\n }\n }", "public void setDuration(Long duration)\r\n {\r\n this.duration = duration;\r\n }", "private void selectTime() {\n Calendar calendar = Calendar.getInstance();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n timeTonotify = i + \":\" + i1; //temp variable to store the time to set alarm\n mTimebtn.setText(FormatTime(i, i1)); //sets the button text as selected time\n }\n }, hour, minute, false);\n timePickerDialog.show();\n }", "public void setDuration(float duration) {\n\t\tthis.duration = duration;\n\t}", "public void setDuration(String duration) {\n this.duration = duration;\n }", "public void setDuration(String duration) {\n this.duration = duration;\n }", "static Duration promptForTime() {\n String input;\n\n Duration time;\n System.out.println(\"Enter the player's time (hh:mm:ss.SSS)\");\n System.out.println(\"EX: 1:03:44.256\");\n\n //loops until correct imput calls break;\n while (true) {\n System.out.print(\">\");\n\n if (Menus.reader.hasNext()) {\n input = Menus.reader.nextLine().strip();\n\n //Reformat the input to match ISO standard\n int colonCount = countOccurrences(input, ':');\n if (colonCount == 2) {\n input = input.replaceFirst(\":\", \"H\");\n input = input.replace(':', 'M');\n } else if (colonCount == 1) {\n input = input.replace(':', 'M');\n }\n input = \"PT\" + input + \"S\";\n\n //Parse the input to a duration\n try {\n time = Duration.parse(input);\n break;\n } catch (DateTimeParseException dtp) {\n System.out.println(\"Make sure the format is correct\");\n }\n }\n }\n return time;\n }", "@Then(\"^I choose an interval time$\")\n public void i_choose_an_interval_time() {\n onViewWithId(R.id.startHour).type(\"12:00\");\n onViewWithId(R.id.endHour).type(\"23:59\");\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\t\t\talert_dialog.dismiss();\r\n\t\t\t\t\t\tet_select_time.setText(\"Set Time\");\r\n\t\t\t\t\t\tselect_time = \"\";\r\n\r\n\t\t\t\t\t}", "public void setDuration (int sec) {\n String hoursText = \"\", minutesText = \"\", synthez = \"\";\n\n if (sec < 60) {\n synthez = \"less than one minute\";\n synthez = String.format(TEMPLATE, synthez);\n setText(Html.fromHtml(synthez)+\".\", BufferType.SPANNABLE);\n return;\n }\n\n if (sec >= 3600) {\n hoursText += sec/3600+\" Hour\";\n if (sec/3600 > 1) {\n hoursText+=\"s\";\n }\n hoursText+=\" \";\n }\n if (((sec%3600)/ 60) > 0) {\n minutesText+= ((sec%3600)/ 60)+ \" minute\";\n if (((sec%3600)/ 60 ) > 1) {\n minutesText+=\"s\";\n }\n minutesText+=\" \";\n }\n synthez = hoursText+minutesText;\n synthez = String.format(TEMPLATE, synthez);\n setText(Html.fromHtml(synthez)+\".\", BufferType.SPANNABLE);\n }", "private void showTimeLapseDurationDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res\n\t\t\t\t.getString(R.string.setting_time_lapse_duration);\n\t\tfinal String[] videoTimeLapseDurationString = uiDisplayResource\n\t\t\t\t.getTimeLapseDuration();\n\t\tif (videoTimeLapseDurationString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"videoTimeLapseDurationString == null\");\n\t\t\treturn;\n\t\t}\n\t\tint length = videoTimeLapseDurationString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_TIME_LAPSE_DURATION,\n\t\t\t\tcameraProperties.getCurrentTimeLapseDuration());\n\t\tLog.d(\"tigertiger\", \"uiInfo.uiStringInSetting =\"\n\t\t\t\t+ uiInfo.uiStringInSetting);\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (videoTimeLapseDurationString[i]\n\t\t\t\t\t.equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tLog.d(\"tigertiger\", \"videoTimeLapseDurationString[i] =\"\n\t\t\t\t\t\t+ videoTimeLapseDurationString[i]);\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tint value = (Integer) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_TIME_LAPSE_DURATION,\n\t\t\t\t\t\tvideoTimeLapseDurationString[arg1]);\n\t\t\t\tcameraProperties.setTimeLapseDuration(value);\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, videoTimeLapseDurationString, curIdx, listener,\n\t\t\t\ttrue);\n\t}", "public void actionPerformed(ActionEvent event) {\r\n\r\n\t\t\t\tsetTimer += 1;\r\n\t\t\t\tif (setTimer > maxTime) {\r\n\t\t\t\t\ttimer.stop();\r\n\t\t\t\t\tsetTimer = maxTime;\r\n\t\t\t\t\ttime.setText(\"fi \" + fmt.format(setTimer));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttime.setText(fmt.format(setTimer));\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "public void time() {\n System.out.println(\"Enter the time you wish to free up\");\n }", "void setDuration(org.apache.xmlbeans.GDuration duration);", "public void SetDuration(int duration)\n {\n TimerMax = duration;\n if (Timer > TimerMax)\n {\n Timer = TimerMax;\n }\n }", "@Override\n public void setItemDuration(Duration duration) {\n this.duration = duration;\n }", "public void donutTypeChosen()\n {\n changeSubtotalTextField();\n }", "public void setAmount(int moneyOption);", "Posn getDuration();", "@Override\n public void insertMoney(int value) {\n System.out.println(\"Please make a selection first\");\n }", "public void setDuration(long duration) {\n\t\tthis.startDuration = System.currentTimeMillis();\n\t\tthis.endDuration = startDuration + duration * 1000;\n\t}", "public void setDuration(int newDuration) {\n this.duration = newDuration;\n }", "public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }", "public void setLength(int duration){\n\t\tlength = duration;\n\t}", "public TimeEntry duration(Integer duration) {\n this.duration = duration;\n return this;\n }", "private void select()\n\t{\n\t\tSoundPlayer.playClip(\"select.wav\");\n\t if(currentChoice == 0)\n\t\t{\n\t\t\tsuper.isFadingOut = true;\n\t\t\tSoundPlayer.animVolume(-40.0F);\n\t\t}\n\t\tif(currentChoice == 1)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CONTROLSTATE);\n\t\t}\n\t\tif(currentChoice == 2)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CREDITSTATE);\n\t\t}\n\t\tif(currentChoice == 3)\n\t\t{\n\t\t\tnew Timer().schedule(new TimerTask()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t}\n\t\t\t}, 500);\n\t\t}\n\t}", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public void setProgressDuration(int duration){\n this.mProgressDuration = duration;\n }", "public void depositMenu(){\n\t\tstate = ATM_State.DEPOSIT;\n\t\tgui.setDisplay(\"Amount to deposit: \\n$\");\t\n\t}", "protected void setDuraction(int seconds) {\n duration = seconds * 1000L;\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddReminder.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n edtSelectTimeForMeet.setText( \"\" + selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n\n }", "private static Duration readDurationFromConsole() {\n\t\tboolean validInput = false; \n\t\tDuration duration = null; \n\t\twhile (! validInput) {\n\t\t\ttry {\n\t\t\t\tOut.print(\" Bitte Dauer in Minuten eingeben: \");\n\t\t\t\tduration = readDuration();\n\t\t\t\tvalidInput = true; \n\t\t\t} catch (Exception e) {\n\t\t\t\tOut.print(\" Falsche Eingabe der Dauer!\");\n\t\t\t}\n\t\t}\n\t\treturn duration;\n\t}", "T setTapToFocusHoldTimeMillis(int val);", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t\t{\n\t\t\t\t\tString sValue = et_stime.getText().toString();\n\t\t\t\t\tMainView.SLEEP_TIME = Integer.valueOf(sValue.length()<=0?\"0\":sValue);\n\t\t\t\t\tmainView.fView.restart();\n\t\t\t\t\t//dialog.dismiss();\n\t\t\t\t}", "Builder addTimeRequired(Duration value);", "public Builder setDuration(int value) {\n bitField0_ |= 0x00000008;\n duration_ = value;\n onChanged();\n return this;\n }", "private void popupTimeoutTrap() {\n\n LayoutInflater inflater = (LayoutInflater)\n getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n final View npView = inflater.inflate(R.layout.number_picker_dialog_layout, null);\n\n String[] values = new String[] {\"5\", \"10\", \"15\", \"20\", \"25\", \"30\"};\n NumberPicker np = ((NumberPicker) npView);\n np.setMinValue(0);\n np.setMaxValue(values.length - 1);\n np.setDisplayedValues(values);\n np.setWrapSelectorWheel(true);\n np.setValue(trap.getTimeout()/5 - 1);\n setNumberPickerTextColor(np, R.color.colorPrimaryDark);\n\n new AlertDialog.Builder(this)\n .setTitle(\"Timeout\")\n .setView(npView)\n .setPositiveButton(android.R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.dismiss();\n\n MqttClient.getInstance().publish(Topic.TIMEOUT, trap.getId(),\n String.valueOf((((NumberPicker) npView).getValue() + 1)*5));\n }\n })\n .setNegativeButton(android.R.string.cancel,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.cancel();\n }\n })\n .show();\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddRDV.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n editTextHeur.setText(String.format(\"%02d\",selectedHour) + \":\" + String.format(\"%02d\" ,selectedMinute)+\":\"+\"00\");\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Select time of your appointment\");\n mTimePicker.show();\n\n }", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "private void pickTime() {\n System.out.println(\"what time would you like to reserve?\");\n boolean keepgoing = true;\n int time;\n while (keepgoing) {\n time = input.nextInt();\n if (time < 0 || time > 23) {\n System.out.println(\"Invalid time, try again.\");\n } else {\n pickedtime = time;\n keepgoing = false;\n }\n }\n }", "public void timeSet(){\n System.out.println(\"Please enter the time with (AM/PM): \");\n String time = keyboard.nextLine();\n Coffee = \"Drink is set to be made at \" + time + \". \";\n }", "public void timeSet(){\n System.out.println(\"Please enter the time with (AM/PM): \");\n String time = keyboard.nextLine();\n Tea = \"Drink is set to be made at \" + time + \". \";\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.getTime:\n\t\t\ttime.setText(inputTime.getText().toString());\n\t\t\ti = Integer.parseInt(inputTime.getText().toString());\n\t\t\tbreak;\n\t\tcase R.id.startTime:\n\t\t\tstartTime();\n\t\t\tbreak;\n\t\tcase R.id.stopTime:\n\t\t\tstopTime();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "void setPopupDuration(int popupDuration);", "public void withdrawalMenu(){\n\t\tstate = ATM_State.WITHDRAW;\n\t\tgui.setDisplay(\"Amount to withdraw: \\n$\");\n\t}", "public void setDuration(Duration param) {\n this.localDuration = param;\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"4\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"4\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "protected int getDuration() {\n try {\n return Utils.viewToInt(this.durationInput);\n }\n catch (NumberFormatException ex) {\n return Integer.parseInt(durationInput.getHint().toString());\n }\n }", "int getDuration();", "int getDuration();", "public void duration() {\n\t\tDuration daily = Duration.of(1, ChronoUnit.DAYS);\n\t\tDuration hourly = Duration.of(1, ChronoUnit.HOURS);\n\t\tDuration everyMinute = Duration.of(1, ChronoUnit.MINUTES);\n\t\tDuration everyTenSeconds = Duration.of(10, ChronoUnit.SECONDS);\n\t\tDuration everyMilli = Duration.of(1, ChronoUnit.MILLIS);\n\t\tDuration everyNano = Duration.of(1, ChronoUnit.NANOS);\n\n\t\tLocalDate date = LocalDate.of(2015, 5, 25);\n\t\tPeriod period = Period.ofDays(1);\n\t\tDuration days = Duration.ofDays(1);\n\t\tSystem.out.println(date.plus(period)); // 2015–05–26\n\t\t// System.out.println(date.plus(days)); // Unsupported unit: Seconds\n\t}", "@Override\n public void onValueChange(NumberPicker picker, int oldVal, int newVal) {\n TimeValue = NumP.getValue() * 5;\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog50 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog50.updateTime(t50Hour50, t50Minute50);\n //show dialog\n timePickerDialog50.show();\n }", "public void playSelection(Selection selection) {\n nextStartTime = selection.start;\n startPlay();\n }", "@Override\n public void onValueChange(NumberPicker numberPicker, int oldVal, int newVal) {\n long timeHelper = newVal * 1000;\n mSelectedStartTime = timeHelper;\n mTextViewCountDown.setText(String.valueOf(newVal));\n mTimeLeftInMillis = timeHelper;\n }", "public int getDuration() {return this.duration;}", "public void howMuchClicked(View view) {\n Intent child = new Intent(this, EnterQuantity.class);\n child.putExtra(\"enteredAmount\" , enteredAmount);\n child.putExtra(\"enteredUnit\", enteredUnit);\n startActivityForResult(child, REQ_CODE_PASTA_QUANTITY);\n }", "public void setDuration(DeltaSeconds d) {\n duration = d ;\n }", "public void setInvincibilityDuration(float duration) {\n assert (duration >= 0);\n mInvincibilityDuration = duration;\n }", "private void nextOption() {\n\t\tif (!running)\t//User may have already made selection \n\t\t\treturn;\n\t\t\n\t\tmenuTimer.cancel();\n\t\tcurrSelection++;\n\t\tif (currSelection >= menuOptions.size()) {\n\t\t\tcurrSelection = 0;\n\t\t\tcallback.menuTimeout();\n\t\t} else {\n\t\t\tString message = menuOptions.get(currSelection);\n\t\t\toutputProc.sayText(message, menuTimerListener, objID);\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n String b = customtime.getText().toString().trim();\n \n Toast.makeText(RadioUi.this, b +getString(R.string.closeradio), Toast.LENGTH_SHORT).show();\n sleeptime = b;\n // time=0;\n time = Integer.parseInt(b)*100000;\n // TinyDB tb = new TinyDB(getApplicationContext());\n\t\t\t\t// tb.putString(\"sleep_time\", sleeptime);\n\t\t\t\t \n\t\t\t\t alarm();\n\t\t\t\t \n }", "Builder addTimeRequired(Duration.Builder value);", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct5++;\r\n\t\t\t\tdtAdd5.setText(\"\" + dct5);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"5\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"5\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct1++;\r\n\t\t\t\tdtAdd1.setText(\"\" + dct1);\r\n\t\t\t\tdttotal = dttotal + 120;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}", "private void select(JSpinner spinner) {\n/* 194 */ JComponent editor = spinner.getEditor();\n/* */ \n/* 196 */ if (editor instanceof JSpinner.DateEditor) {\n/* */ \n/* 198 */ JSpinner.DateEditor dateEditor = (JSpinner.DateEditor)editor;\n/* 199 */ JFormattedTextField ftf = dateEditor.getTextField();\n/* 200 */ Format format = dateEditor.getFormat();\n/* */ \n/* */ Object value;\n/* 203 */ if (format != null && (value = spinner.getValue()) != null) {\n/* */ \n/* 205 */ SpinnerDateModel model = dateEditor.getModel();\n/* 206 */ DateFormat.Field field = DateFormat.Field.ofCalendarField(model.getCalendarField());\n/* */ \n/* 208 */ if (field != null) {\n/* */ \n/* */ try {\n/* */ \n/* 212 */ AttributedCharacterIterator iterator = format.formatToCharacterIterator(value);\n/* 213 */ if (!select(ftf, iterator, field) && field == DateFormat.Field.HOUR0)\n/* */ {\n/* 215 */ select(ftf, iterator, DateFormat.Field.HOUR1);\n/* */ }\n/* 217 */ } catch (IllegalArgumentException iae) {}\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct2++;\r\n\t\t\t\tdtAdd2.setText(\"\" + dct2);\r\n\t\t\t\tdttotal = dttotal + 180;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog45 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog45.updateTime(t45Hour45, t45Minute45);\n //show dialog\n timePickerDialog45.show();\n }" ]
[ "0.68234396", "0.65520465", "0.6354943", "0.6348624", "0.6298572", "0.6271846", "0.6169886", "0.61108965", "0.60060585", "0.5983401", "0.59660715", "0.59248817", "0.5922179", "0.580086", "0.580086", "0.5793864", "0.5776892", "0.57599455", "0.5757944", "0.57490563", "0.5698747", "0.5668339", "0.5662038", "0.56267655", "0.561889", "0.5541925", "0.5537166", "0.5525254", "0.5525254", "0.551611", "0.5485934", "0.5476432", "0.5442249", "0.54306144", "0.5428877", "0.53996783", "0.53996783", "0.5377006", "0.53486305", "0.5348197", "0.53258514", "0.53221613", "0.5307017", "0.5303438", "0.5300295", "0.52954084", "0.52787685", "0.5274448", "0.527425", "0.5252976", "0.52276695", "0.52263284", "0.5225974", "0.52210075", "0.5218161", "0.5194865", "0.5177488", "0.51699114", "0.5163111", "0.5147613", "0.5144512", "0.5118674", "0.5110388", "0.51065636", "0.5099297", "0.5093274", "0.5088133", "0.50783545", "0.50756073", "0.5072875", "0.5060051", "0.5058702", "0.5058224", "0.50501055", "0.5041662", "0.5030398", "0.50298905", "0.5028729", "0.5028302", "0.5019714", "0.5019714", "0.5014187", "0.5014126", "0.5010042", "0.500838", "0.5006959", "0.50031644", "0.4992439", "0.49905077", "0.49783915", "0.49746218", "0.49604407", "0.49554485", "0.49541038", "0.49537745", "0.4946677", "0.49456856", "0.493387", "0.49263033", "0.49241042" ]
0.6653763
1
Navigate to UpDown/RiseFall page
public static void NavigateToUpDownRiseFall(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_UpDown(driver).click(); Trade_Page.link_RiseFall(driver).click(); Select sSelect = new Select(Trade_Page.select_StartTime(driver)); sSelect.selectByValue("now"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goUp();", "public void navigateToForward() {\n WebDriverManager.getDriver().navigate().forward();\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "public void goDown();", "private void goUpWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.turnLeft();\n\t\tthis.move(2);\n\t\tthis.turnRight();\n\t}", "public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "private void goToDetailedRune()\n\t{\n\t\tLog.e(\"before pages\", String.valueOf(player.getSummonerID()));\n\t\tRunePages tempPages = player.getPages().get(String.valueOf(player.getSummonerID()));\n\t\tLog.e(\"after pages\", String.valueOf(tempPages.getSummonerId()));\n\t\tSet<RunePage> tempSetPages = tempPages.getPages();\n\t\tRunePage currentPage = new RunePage();\n\t\tfor (RunePage tempPage : tempSetPages)\n\t\t{\n\t\t\tif (tempPage.getName() == player.getCurrentRunePage())\n\t\t\t{\n\t\t\t\tLog.e(\"temp page\", \"page found\");\n\t\t\t\tcurrentPage = tempPage;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// now we have the page, need to get the runes out of it\n\t\tList<RuneSlot> tempSlots = currentPage.getSlots();\n\t\tArrayList<Integer> tempIDs = new ArrayList<Integer>();\n\t\tLog.e(\"tempSlots size\", String.valueOf(tempSlots.size()));\n\t\tfor (int i = 0; i < tempSlots.size(); i++)\n\t\t{\t\n\t\t\tLog.e(\"tempSlot\", String.valueOf(tempSlots.get(i).getRune()));\n\t\t\ttempIDs.add(tempSlots.get(i).getRune());\n\t\t}\n\t\tfillRuneList(tempIDs);\n\t\t// go to the screen\n\t\tIntent intent = new Intent(activity, RuneDetailActivity.class);\n\t\tactivity.startActivity(intent);\n\t}", "@Nullable\n WizardPage flipToNext();", "public void backToFlights(){\n logger.debug(\"click on Back To Flights button\");\n driver.findElement(oBackToFlights).click();\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "private void backPage()\n {\n page--;\n open();\n }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n overridePendingTransition(R.anim.slide_in_from_top, R.anim.slide_out_from_top);\n return false;\n }", "public void goDown() {\n if(page.down == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"down\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.down;\n addQueue();\n }", "public void forceNavigation(String destination)\r\n \t{\n \t\tif (!this.currentState.isAuthenticated())\r\n \t\t{\r\n \t\t\tdestination = ChooseCasePilot.generateNavigationId(ChooseCasePilot.PageId.login);\r\n \t\t}\r\n \r\n \t\tcurrentState.setCurrentView(destination);\r\n \r\n \t\tString view = this.findViewId(destination);\r\n \t\tString page = this.findPageId(destination);\r\n \r\n \t\t// Get the right pilot to get the right content to show next.\r\n \t\tPilot currentPilot = this.getPilot(view);\r\n \t\tif (currentPilot == null)\r\n \t\t{\r\n \t\t\tthis.swapContent(this.show404Error());\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\t// Set the current mode to determine whether the user has privelages to\r\n \t\t// access the page they want to go to.\r\n \t\tcurrentPilot.determineAccessRights(page, this.currentState);\r\n \r\n \t\tapplyCloseStepPolicy(currentPilot, view, page);\r\n \r\n \t}", "public void navigateToBack() {\n WebDriverManager.getDriver().navigate().back();\n }", "@Override\n\tpublic void goHome() {\n\t\tSystem.out.println(\"回窝了!!!!\");\n\t}", "public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }", "public void goUp() {\n if(page.up == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"up\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.up;\n addQueue();\n }", "protected void gotoReadyPage(){\n\n Intent intent = new Intent(MainActivity.this,ReadyActivity.class);\n startActivity(intent);\n overridePendingTransition(R.anim.anim_slide_in_right, R.anim.anim_slide_out_left);\n //\n finish();\n }", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "public void navigate_forward() throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.getDriverInstance().navigate().forward();\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "private void forwardPage()\n {\n page++;\n open();\n }", "@Override\n public boolean onSupportNavigateUp() {\n return true;\n }", "public static void navigateForward() {\n\t\tLOG.info(\"Navigate to forward page from current page.\");\n\t\tConstants.driver.navigate().forward();\n\n\t}", "void clickOnBackArrow() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.divTagBackwardArrowHomepageVehiclePlanning);\n\t}", "public static void navigateBack() {\n\t\tLOG.info(\"Navigate to back page from current page.\");\n\t\tConstants.driver.navigate().back();\n\n\t}", "private void goDownWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move(2);\n\t\tthis.turnLeft();\n\t}", "public EmagHomePage clickonContinueButton()\n {\n continueButton.click();\n return new EmagHomePage(driver);\n }", "public void goHome();", "private void goUp() {\n\t\ttry {\n\t\t\tif (currentRootPath == null) {\n\t\t\t\treturn; //Invalid path\n\t\t\t}\n\t\t\tfinal Path parent2 = currentRootPath.getPath().getParent();\n\t\t\tif (parent2 == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttxtRootPath.setText(parent2.toString());\n\t\t\tgotoPath();\n\t\t} catch (Exception e) {\n\t\t\tMessageDialog.openError(getShell(), Messages.msgError, e.getMessage());\n\t\t}\n\t}", "public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}", "@Override\r\n\tpublic void afterNavigateForward(WebDriver arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void goForward() {\n\t\t\r\n\t}", "public void backToHome(){\n logger.debug(\"click on Back to Home button\");\n driver.findElement(oBackToHome).click();\n }", "public void testRes_Navigation(){\n\t\tinnerFunction(childrenButton, childrenList.class);\t\t\n\t\tinnerFunction(locationButton, locationList.class);\n\t\t\n\t\tsolo.clickOnView(logOutButton);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to login screen.\", Login.class);\n\n\t}", "public TripandPriceDetailsPage goToTripandPriceDetailsPage() {\n\t\tselectedDepartureFlight.click();\n\t\tselectedReturnFlight.click();\n\t\tcontinueButton.click();\n\t\treturn new TripandPriceDetailsPage(driver);\n\t}", "public void onScreenUp() {\n faceUp = true;\n requestForValidationOfQibla();\n }", "@Override\r\n public boolean onSupportNavigateUp() {\r\n finish();\r\n return true;\r\n }", "public void takeStep() {\n \t//System.out.println(\"\"+Math.abs(rmd.nextInt()%4));\n \tswitch(rmd.nextInt(4)){\t\n \tcase 0:\n \t\tcurPoint = curPoint.translate(-stepSize, 0);//go right\n \t\tbreak;\n \tcase 1:\n \t\tcurPoint = curPoint.translate(0, stepSize);//go down\n \t\tbreak;\n \tcase 2:\n \t\tcurPoint = curPoint.translate(stepSize, 0);//go left\n \t\tbreak;\n \tcase 3:\n \t\tcurPoint = curPoint.translate(0, -stepSize);//go up\n \t\tbreak;\n \t}\n }", "@Override\n public boolean onSupportNavigateUp()\n {\n this.finish();\n return super.onSupportNavigateUp();\n\n }", "@Override\n public boolean onSupportNavigateUp()\n {\n this.finish();\n return super.onSupportNavigateUp();\n\n }", "public void forwardOnClick(View view){\n while(Integer.parseInt(mazeController.getPercentDone()) < 99) {\n\n }\n Intent newIntent = new Intent(this, Play.class);\n startActivity(newIntent);\n }", "@Override\n\tpublic void afterNavigateForward(WebDriver arg0) {\n\n\t}", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "@Given(\"^user in the home page of Southall travel$\")\n public void user_in_the_home_page_of_Southall_travel() throws Throwable {\n }", "@Test\n\tpublic void navigateDemo() throws InterruptedException {\n\t\tdriver.navigate().to(url);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.findElement(By.xpath(\"//input[@type=\\\"submit\\\"]\")).click();\n\t\tThread.sleep(5000);\n\t\tdriver.navigate().back();\n\t\tThread.sleep(5000);\n\t\tdriver.navigate().forward();\n\t\tThread.sleep(3000);\n\t\tdriver.navigate().refresh();\n\t\tThread.sleep(1000);\n\n\t}", "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "public void turnPage(View view) {\r\n Intent intent = new Intent(this, WelcomeActivity.class);\r\n startActivity(intent);\r\n\r\n // Spiral shrink animation to next activity\r\n overridePendingTransition(R.animator.animation_entrance, R.animator.animation_exit);\r\n }", "@Given(\"^User should be navigated to the ELEARNING UPSKILL URL$\")\npublic void user_should_be_navigated_to_the_ELEARNING_UPSKILL_URL() throws Throwable \n{\n\tdriver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\tdriver.get(\"http://elearningm1.upskills.in/\");\n\tThread.sleep(100); \n\tSystem.out.println(\"User is successfully navigated to ELEARNING UPSKILL screen\");\n\t\n \n}", "public void switchToEvisitPageFrame() {\r\n\t\tcontrols.switchToFrame(\"eVisit\", \"CSS_evisit_Iframe\");\r\n\t}", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "private String navigateAfterLoginAttemp()\r\n {\r\n Identity identity = this.getIdentity();\r\n\r\n if (identity == null) {\r\n return \"/\";\r\n }\r\n if (identity instanceof Pilot) {\r\n return \"/pilot/index.xhtml\";\r\n }\r\n if (identity instanceof General) {\r\n return \"/general/index.xhtml\";\r\n }\r\n if (identity instanceof SystemAdministrator) {\r\n return \"/admin/index.xhtml\";\r\n }\r\n throw new IllegalStateException(\"Identita \" + identity\r\n + \" nie je ziadneho z typov, pre ktory dokazem 'navigovat'!\");\r\n }", "protected void jumpPage() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.txtjump));\n\t\tfinal SeekBar seek = new SeekBar(this);\n\t\tseek.setOnSeekBarChangeListener(this);\n\t\tseek.setMax(100);\n\t\tint p = (int) (BookPageFactory.sPercent * 100);\n\t\tseek.setProgress(p);\n\t\tbuilder.setView(seek);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tint per = seek.getProgress();\n\t\t\t\t\t\t\tif (per >= 0.0 && per <= 100.0) {\n\t\t\t\t\t\t\t\tmPagefactory.jumpPage(per);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tmPagefactory.onDraw(mCurPageCanvas);\n\t\t\t\t\t\t\t\tmPageWidget.setBitmaps(mCurPageBitmap,\n\t\t\t\t\t\t\t\t\t\tmNextPageBitmap);\n\t\t\t\t\t\t\t\tmPageWidget.startAnimation(1000);\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.successjump),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\t// @Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "@NotNull\n WizardPage flipToFirst();", "@When ( \"I navigate to the personal representatives page\" )\n public void goToRepsPage () throws InterruptedException {\n driver.get( baseUrl + \"/patient/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\n }", "public void gotoHome(){ application.gotoHome(); }", "public boolean runWizard() throws Exception\n{\n\t// Tells us what came before each state\n\tMap<Wiz,Wiz> prevWizs = new TreeMap();\n\t// v = (xv == null ? new TypedHashMap() : xv);\n\tscreenCache = new TreeMap();\n\tcon = new WizContext();\n\tWiz wiz = nav.getStart();\t\t// Current state\n\tfor (; wiz != null; ) {\n\n\t\t// Get the screen for this Wiz\n\t\tWizScreen screen = screenCache.get(wiz);\n\t\tif (screen == null) {\n\t\t\tscreen = wiz.newScreen(con);\n\t\t\tif (wiz.isCached(Wiz.NAVIGATE_BACK)) screenCache.put(wiz,screen);\n\t\t}\n\n\t\t// Prepare and show the Wiz\n\t\tpreWiz(wiz, con);\n\t\tMap<String,Object> values = new TreeMap();\n\t\tshowScreen(screen, values);\n\n\t\t// Run the post-processing\n\t\twiz.getAllValues(values);\n\t\tcon.localValues = values;\n\t\tString suggestedNextName = postWiz(wiz, con);\n\n\t\t// Figure out where we're going next\n\t\tWiz nextWiz = null;\n\t\tString submit = (String)values.get(\"submit\");\nSystem.out.println(\"submit = \" + submit);\n\t\tif (\"next\".equals(submit)) {\n\t\t\tif (suggestedNextName != null) {\n\t\t\t\tnextWiz = nav.getWiz(suggestedNextName);\n\t\t\t} else {\n\t\t\t\tnextWiz = nav.getNext(wiz, Wiz.NAVIGATE_FWD);\n\t\t\t}\n\t\t\tcon.addValues(values);\n\t\t} else if (\"back\".equals(submit)) {\n\t\t\t// Remove it from the cache so we re-make\n\t\t\t// it going \"forward\" in the Wizard\n\t\t\tif (!wiz.isCached(Wiz.NAVIGATE_FWD)) screenCache.remove(wiz);\n\n\t\t\t// Nav will usually NOT set a NAVIGATE_BACK...\n\t\t\tnextWiz = nav.getNext(wiz, Wiz.NAVIGATE_BACK);\n\n\t\t\t// ... which leaves us free to do it from our history\n\t\t\tif (nextWiz == null) nextWiz = prevWizs.get(wiz);\n\n\t\t\t// Falling off the beginning of our history...\n\t\t\tif (nextWiz == null && reallyCancel()) return false;\n\t\t\tcontinue;\n\t\t} else if (\"cancel\".equals(submit) && reallyCancel()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Navigation without a \"submit\"; rare but possible...\n\t\t\tif (suggestedNextName != null) {\n\t\t\t\tnextWiz = nav.getWiz(suggestedNextName);\n\t\t\t}\n\t\t\t// Custom navigation!\n\t\t\t// Incorporate the values into the main WizContext\n\t\t\tcon.addValues(values);\n\t\t}\n\n\t\t// ================= Finish up\n\t\twiz.post(con);\n\t\twiz = nextWiz;\n\t}\n\treturn true;\t\t// Won't get here\n}", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "public MoviesPage navigateBack()\n\t{\n\t\ttry {\n\t\t\tclick(navBackBtn, \"Back From History page\");\n\t\t} catch (Exception e) {TestUtilities.logReportFailure(e);}\n\t\treturn new MoviesPage();\n\t}", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "public void walkDownWall() {\r\n\t\tthis.move();\r\n\t\tthis.turnRight();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.turnLeft();\r\n\t}", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "public void navigateToHomePage() {\n\t\n\t\t\tScreenShot screen = new ScreenShot();\n\n\t\t\t// Utilize the driver and invoke the chrome browser\n\t\t\tdriver.get(\" https://www.progressive.com/\");\n\t\t\tdriver.manage().window().maximize();\n\n\t\t\t// Wait for page to be loaded\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t\t// Take a Screenshot\n\t\t\tscreen.takeSnapShot(driver, \"Progressive Insurance HomePage\");\n\t\t\t\n\t\t\tclickAutoInsurance();\t\n\t\t\n\t\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.example.thirdapp.LocationActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"4\");\n\t\t\t}", "@Override\n\tpublic void moveTowards(int destination) {\n \tif (stepCount % 2 == 0) {\n \tif (getFloor() < destination) {\n \t\tmoveUpstairs();\n \t} else {\n \t\tmoveDownstairs();\n \t}\n \t}\n }", "@Nullable\n WizardPage flipToPrevious();", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n\n return super.onSupportNavigateUp();\n }", "public void goUp()\r\n\t{\r\n\t\tthis.Y--;\r\n\t}", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "public void back() {\n Views.goBack();\n }", "@Override\r\n public void afterNavigateForward(final WebDriver arg0) {\n\r\n }", "public void click_defineSetupPage_backBtn() throws InterruptedException {\r\n\t\tclickOn(DefineSetup_backBtn);\r\n\t\tThread.sleep(1000);\r\n\t}", "default public void clickUp() {\n\t\tremoteControlAction(RemoteControlKeyword.UP);\n\t}", "void clickPreviousStation();", "@Override\n\tpublic void afterNavigateBack(WebDriver arg0) {\n\n\t}", "public void back() {\n driver.navigate().back();\n }", "public void onRightUp();", "public void navigation() {\n }", "void moveUp();", "void moveUp();", "public void clickOnReturnRadioButton()\n\t{\n\t\tif(departureRadioButton.isDisplayed())\n\t\t{\n\t\t\twaitForSeconds(5);\n\t\t\treturnFlightRadioButton.click();\n\t\t}\n\t\telse\n\t\t{\n\t\t\twaitForSeconds(10);\n\t\t\tUserdefinedFunctions.scrollusingCordinate();\n\t\t\twaitForSeconds(10);\n\t\t\treturnFlightRadioButton.click();\n\t\t}\n\n\t}", "public static void back() {\n driver.navigate().back();\n }", "public void Down(){\r\n \r\n if(By>0 && By<900){\r\n \r\n By+=2;\r\n }\r\n }", "public static void forward(WebDriver driver)\n\t{\n\t\tdriver.navigate().forward();\n\t}", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public Room goUp() {\n return goDir(Side.UP);\n }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n return true;\n }", "@Override\n\tpublic void movePlayerUp() {\n\t\tpacman.changeNextDirection(Direction.up);\n //movePacman();\n\t}", "void onUpOrBackClick();", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ttry\n\t\t\t\t{if(wb.canGoForward())\n\t\t\t\t\twb.goForward();\n\t\t\t\t}catch(Exception e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}" ]
[ "0.64351964", "0.61153543", "0.6033789", "0.59663045", "0.59281254", "0.5880382", "0.5859665", "0.58588916", "0.5823634", "0.582095", "0.58096004", "0.5807583", "0.5804022", "0.5789682", "0.57796365", "0.5773222", "0.5752303", "0.5736581", "0.5735289", "0.5729859", "0.572884", "0.5716925", "0.57052296", "0.568758", "0.5687031", "0.56796604", "0.5677406", "0.56703204", "0.5657185", "0.5644835", "0.5637301", "0.56203645", "0.56198734", "0.56146306", "0.56018466", "0.5594678", "0.5592754", "0.5581622", "0.5569163", "0.5526832", "0.5524656", "0.5523077", "0.55155104", "0.55155104", "0.55062467", "0.55060965", "0.5504526", "0.54986817", "0.5495131", "0.54929394", "0.5489925", "0.5486326", "0.54854596", "0.54822725", "0.5480422", "0.5480066", "0.54697186", "0.5461261", "0.5457348", "0.54518425", "0.54511666", "0.54363406", "0.54342467", "0.54332745", "0.54291815", "0.5424527", "0.54205084", "0.54166377", "0.54154503", "0.54111683", "0.5405845", "0.5400137", "0.53980863", "0.5394115", "0.5392986", "0.5385787", "0.5381702", "0.5379153", "0.5379088", "0.536984", "0.5366073", "0.53656435", "0.5364714", "0.5363693", "0.5363693", "0.53631526", "0.53625125", "0.53610605", "0.53594416", "0.53557295", "0.53542465", "0.5353916", "0.53523225", "0.53523225", "0.53523225", "0.53523225", "0.53489715", "0.53475887", "0.53384143", "0.53294414" ]
0.5922847
5
Navigate to UpDown/HigherLower page
public static void NavigateToUpDownHigherLower(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_UpDown(driver).click(); Trade_Page.link_HigherLower(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void backPage()\n {\n page--;\n open();\n }", "public void goUp() {\n if(page.up == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"up\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.up;\n addQueue();\n }", "public void navigateToForward() {\n WebDriverManager.getDriver().navigate().forward();\n }", "public void goUp();", "public void goDown() {\n if(page.down == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"down\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.down;\n addQueue();\n }", "public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}", "public void goToNextPage() {\n nextPageButton.click();\n }", "private void forwardPage()\n {\n page++;\n open();\n }", "public void navigateToBack() {\n WebDriverManager.getDriver().navigate().back();\n }", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "@Override\n public boolean onSupportNavigateUp() {\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n overridePendingTransition(R.anim.slide_in_from_top, R.anim.slide_out_from_top);\n return false;\n }", "public void movePageUp(){\n mEventHandler.onScroll(null, null, 0, -getHeight());\n mACPanel.hide();\n }", "@Nullable\n WizardPage flipToPrevious();", "protected void showPreviousPage() {\n\t\tshowPage(currPageIndex - 1, Direction.BACKWARD);\n\n\t}", "public static void navigateBack() {\n\t\tLOG.info(\"Navigate to back page from current page.\");\n\t\tConstants.driver.navigate().back();\n\n\t}", "public void backToHome(){\n logger.debug(\"click on Back to Home button\");\n driver.findElement(oBackToHome).click();\n }", "void clickOnBackArrow() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.divTagBackwardArrowHomepageVehiclePlanning);\n\t}", "public MoviesPage navigateBack()\n\t{\n\t\ttry {\n\t\t\tclick(navBackBtn, \"Back From History page\");\n\t\t} catch (Exception e) {TestUtilities.logReportFailure(e);}\n\t\treturn new MoviesPage();\n\t}", "private void moveToLastPage() {\n while (!isLastPage()) {\n click(findElement(next_btn));\n }\n }", "@Override\r\n public void beforeNavigateBack(final WebDriver arg0) {\n\r\n }", "private void goUp() {\n\t\ttry {\n\t\t\tif (currentRootPath == null) {\n\t\t\t\treturn; //Invalid path\n\t\t\t}\n\t\t\tfinal Path parent2 = currentRootPath.getPath().getParent();\n\t\t\tif (parent2 == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttxtRootPath.setText(parent2.toString());\n\t\t\tgotoPath();\n\t\t} catch (Exception e) {\n\t\t\tMessageDialog.openError(getShell(), Messages.msgError, e.getMessage());\n\t\t}\n\t}", "@Override\r\n\tpublic void beforeNavigateBack(WebDriver arg0) {\n\t\t\r\n\t}", "public void onTopUp();", "public void goUp()\r\n\t{\r\n\t\tthis.Y--;\r\n\t}", "@Override\n\tpublic void beforeNavigateBack(WebDriver arg0) {\n\n\t}", "public static void navigateForward() {\n\t\tLOG.info(\"Navigate to forward page from current page.\");\n\t\tConstants.driver.navigate().forward();\n\n\t}", "@Override\r\n public void afterNavigateBack(final WebDriver arg0) {\n\r\n }", "public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}", "@Override\n public void handleOnBackPressed() {\n navController.navigateUp();\n }", "public void navigation() {\n }", "@Nullable\n WizardPage flipToNext();", "public int switchingPage(By by) {\n\t\ttry {\n\t\t\tdriver.findElement(by).click();\n\t\t\tfullPageScroll();\n\t\t} catch (NoSuchElementException e) {\n\t\t\tSystem.out.println(e.getMessage());;\n\t\t}\n\t\t/*\n\t\tint limits = 5;\n\t\tdo {\n\t\t\tdriver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);\n\t\t\tswitchedpage = currentPageNumber();\n\t\t\tlimits--;\n\t\t} while ((switchedpage == 0) && limits > 0);\n\t\t*/\n\t\tSystem.out.println(currentPageNumber() + \" <- currentPageNumber\");\n\n\t\treturn currentPageNumber();\n\t}", "protected void jumpPage() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.txtjump));\n\t\tfinal SeekBar seek = new SeekBar(this);\n\t\tseek.setOnSeekBarChangeListener(this);\n\t\tseek.setMax(100);\n\t\tint p = (int) (BookPageFactory.sPercent * 100);\n\t\tseek.setProgress(p);\n\t\tbuilder.setView(seek);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tint per = seek.getProgress();\n\t\t\t\t\t\t\tif (per >= 0.0 && per <= 100.0) {\n\t\t\t\t\t\t\t\tmPagefactory.jumpPage(per);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tmPagefactory.onDraw(mCurPageCanvas);\n\t\t\t\t\t\t\t\tmPageWidget.setBitmaps(mCurPageBitmap,\n\t\t\t\t\t\t\t\t\t\tmNextPageBitmap);\n\t\t\t\t\t\t\t\tmPageWidget.startAnimation(1000);\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.successjump),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\t// @Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "@Override\r\n\tpublic void afterNavigateForward(WebDriver arg0) {\n\t\t\r\n\t}", "@Override\r\n public void afterNavigateForward(final WebDriver arg0) {\n\r\n }", "public void movePageDown(){\n mEventHandler.onScroll(null, null, 0, getHeight());\n mACPanel.hide();\n }", "public void testRes_Navigation(){\n\t\tinnerFunction(childrenButton, childrenList.class);\t\t\n\t\tinnerFunction(locationButton, locationList.class);\n\t\t\n\t\tsolo.clickOnView(logOutButton);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to login screen.\", Login.class);\n\n\t}", "@Override\n\tpublic void afterNavigateBack(WebDriver arg0) {\n\n\t}", "void onUpOrBackClick();", "@Override\n public void goBack() {\n\n }", "@NotNull\n WizardPage flipToFirst();", "public void scrollDown() {\n try {\n Robot robot = new Robot();\n robot.keyPress(KeyEvent.VK_PAGE_DOWN);\n robot.keyRelease(KeyEvent.VK_PAGE_DOWN);\n } catch(Exception e) {\n // do nothing\n }\n\n }", "@Override\n\tpublic void afterNavigateForward(WebDriver arg0) {\n\n\t}", "public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }", "void previousPage() throws IndexOutOfBoundsException;", "public void goBackToAppHome() {\n UiObject topNavigationBar = mDevice.findObject(new UiSelector().text(\"mytaxi demo\"));\n int backpressCounter = 0; //to avoid infinite loops\n while(!topNavigationBar.exists()) {\n mDevice.pressBack();\n backpressCounter++;\n if(backpressCounter>10)\n break;\n }\n }", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "public void goHome();", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return super.onSupportNavigateUp();\n }", "public boolean navigateToShoppageThroghPageIntion(WebDriver driver) {\n\t\treturn shoppage.clickOnPageInition(driver);\n\t}", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "Point onPage();", "public boolean onSupportNavigateUp() {\n onBackPressed();\n return true;\n }", "public void returnToPrevious(View v) {\n }", "@Override\r\n public boolean onSupportNavigateUp() {\r\n finish();\r\n return true;\r\n }", "@Override\n public boolean onSupportNavigateUp() {\n onBackPressed();\n return false;\n }", "public void setPreviousPage(IWizardPage page);", "public void back() {\n Views.goBack();\n }", "@Test\n public void testNextAndPrevious() throws Exception {\n\n driver.get(baseUrl + \"/computerdatabase/computers?page-number=1&lang=en\");\n\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='1']\"));\n\n driver.findElement(By.linkText(\"Next\")).click();\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='2']\"));\n\n try {\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='1']\"));\n fail();\n } catch (NoSuchElementException e) {\n assertTrue(true);\n }\n\n driver.findElement(By.linkText(\"Previous\")).click();\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='1']\"));\n try {\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='2']\"));\n fail();\n } catch (NoSuchElementException e) {\n assertTrue(true);\n }\n }", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "@Override\n public boolean onSupportNavigateUp()\n {\n this.finish();\n return super.onSupportNavigateUp();\n\n }", "@Override\n public boolean onSupportNavigateUp()\n {\n this.finish();\n return super.onSupportNavigateUp();\n\n }", "@Test\n public void navigateBack() throws Exception {\n }", "@Override\r\n\tpublic void beforeNavigateForward(WebDriver arg0) {\n\t\t\r\n\t}", "@Override\r\n public void afterNavigateTo(final String arg0, final WebDriver arg1) {\n\r\n }", "public void onBottomUp();", "public static void back() {\n driver.navigate().back();\n }", "@Override\r\n public void beforeNavigateForward(final WebDriver arg0) {\n\r\n }", "public String gotoPage() {\n return FxJsfUtils.getParameter(\"page\");\n }", "public void back() {\n driver.navigate().back();\n }", "@Override\r\npublic void beforeNavigateBack(WebDriver arg0) {\n\tSystem.out.println(\"as\");\r\n}", "@Test\n public void navigateForward() throws Exception {\n }", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "public void goBack() {\n goBackBtn();\n }", "public Room goUp() {\n return goDir(Side.UP);\n }", "@Override\n\tpublic void beforeNavigateForward(WebDriver arg0) {\n\n\t}", "default public void clickBack() {\n\t\tclickMenu();\n\t}", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "public Dist_Germany_HomePage clickbsrBackBtn() throws Throwable {\n\t\ttry {\n\t\t\tclickBrowserBackButton();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new Dist_Germany_HomePage();\n\t}", "public void navigate_forward() throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.getDriverInstance().navigate().forward();\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "@Override\n\tpublic void beforeNavigateBack(WebDriver driver) {\n\t\t\n\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@Override\r\n\tpublic void goForward() {\n\t\t\r\n\t}", "private void goUpWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.turnLeft();\n\t\tthis.move(2);\n\t\tthis.turnRight();\n\t}", "@Override\r\npublic void afterNavigateBack(WebDriver arg0) {\n\tSystem.out.println(\"as\");\r\n}", "public IWizardPage getPreviousPage();", "@Override\r\n\tpublic void afterNavigateTo(String arg0, WebDriver arg1) {\n\t\t\r\n\t}", "@Override\r\n public void beforeNavigateTo(final String arg0, final WebDriver arg1) {\n\r\n }", "void moveUp();", "void moveUp();", "public void goDown();" ]
[ "0.6793026", "0.64972657", "0.64504206", "0.6370494", "0.63123626", "0.6303109", "0.6243417", "0.62113684", "0.62070733", "0.61499417", "0.61215484", "0.61092776", "0.60938996", "0.60797644", "0.6057831", "0.59538823", "0.59532464", "0.59517676", "0.59256905", "0.59091836", "0.59080267", "0.58788437", "0.58738834", "0.5869309", "0.5867003", "0.5836591", "0.58286744", "0.58260125", "0.58022285", "0.5798025", "0.5790416", "0.5786512", "0.5779291", "0.5776706", "0.5759357", "0.57576746", "0.5748542", "0.5740985", "0.57386476", "0.5731701", "0.5725822", "0.5723741", "0.5719106", "0.5713231", "0.57085145", "0.5695587", "0.5691445", "0.5689895", "0.5679009", "0.5674539", "0.5662599", "0.5648207", "0.5647045", "0.5647045", "0.5647045", "0.5647045", "0.5647045", "0.5647045", "0.5647045", "0.5647045", "0.56462044", "0.5644923", "0.56384534", "0.5630481", "0.5624391", "0.56227034", "0.56185234", "0.56081426", "0.5603477", "0.56018066", "0.56018066", "0.55990523", "0.5597765", "0.55915743", "0.55904275", "0.55901", "0.55877286", "0.55843633", "0.55827403", "0.557903", "0.5577012", "0.5575502", "0.55681396", "0.5557005", "0.55566967", "0.5549615", "0.5542239", "0.553967", "0.55364037", "0.55349666", "0.5531248", "0.55223143", "0.5515498", "0.5513606", "0.55106544", "0.5509359", "0.5505071", "0.55016255", "0.55016255", "0.55007267" ]
0.56393677
62
Navigate to TouchNoTouch page
public static void NavigateToTouchNoTouch(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_TouchNoTouch(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void FuncSwipe() {\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n\n TouchAction action = new TouchAction((AppiumDriver<MobileElement>) driver);\n\n driver.context(\"NATIVE_APP\");\n\n Dimension size = driver.manage().window().getSize();\n\n int startY = (int) (size.height * 0.80);\n\n int endY = (int) (size.height * 0.10);\n\n int startX = size.width / 2;\n action.longPress(point(startX, startY)).moveTo(point(startX, endY)).release().perform();\n\n }", "public void loginWithPersonalDevice() // ==== To be used by LGN_005 and Verify SIM ==== //\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew WebDriverWait(driver, 45).until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//android.widget.TextView[contains(@text,'Verify')]\")));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\"Verify Phone page not found\"+e.getMessage());\n\t\t}\n\t\t\n\t\tLog.info(\"======== Login With Verify Personal Device ========\");\n\t\tif(pageTitle.getText().contains(\"Device\"))\n\t\t{\t\t\t\n\t\t\tLog.info(\"== Verify Device page found instead of Verify Phone page ==\"); \t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(WebElement e: selectSimNumberList) // Select any/all Sim and Number dropdowns\n\t\t{\n\t\t\te.click();\n\t\t\tselectWithinList.get(1).click();\n\t\t}\n\t\tcontinueButton.click();\n\t\t// Wait until presence of Home page or Verify device Page \t\t\n\t\t\n\t\tnew WebDriverWait(driver,90).until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(checker.getText().toLowerCase().contains(\"ok\") && checker.getAttribute(\"resourceId\").contains(\"button1\"))\n\t\t{\t\n\t\t\tchecker.click();\n\t\t\t\n\t\t\tnew WebDriverWait(driver,60).until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\tif(checker.getText().contains(\"OK\") && checker.getAttribute(\"resourceId\").contains(\"button2\")) return;\t// LGN_05 will verify this\t\n\t\t\n\t\t//gotoHome();\tNo need to go to Home since Error messages and skip buttons need to be validated\t\n\t}", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "public void goBackToAppHome() {\n UiObject topNavigationBar = mDevice.findObject(new UiSelector().text(\"mytaxi demo\"));\n int backpressCounter = 0; //to avoid infinite loops\n while(!topNavigationBar.exists()) {\n mDevice.pressBack();\n backpressCounter++;\n if(backpressCounter>10)\n break;\n }\n }", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@And(\"^I navigate to my plenti page using mobile website$\")\n public void I_navigate_to_my_plenti_page_using_mobile_website() throws Throwable {\n Wait.untilElementPresent(\"my_account.plenti_learn_more\");\n Wait.untilElementPresent(\"my_account.my_plenti\");\n Assert.assertTrue(\"ERROR - ENV: Unable to locate my plenty option in my account page\", Elements.elementPresent(\"my_account.plenti_learn_more\") || Elements.elementPresent(\"my_account.my_plenti\"));\n Clicks.clickIfPresent(\"my_account.plenti_learn_more\");\n Clicks.clickIfPresent(\"my_account.my_plenti\");\n\n }", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "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 DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "public void ClickVtube(View view){\n MainActivity.redirectActivity(this,Vtube.class);\n\n\n }", "public void gotoHome(){ application.gotoHome(); }", "public void goingToLoginActivity_changing_mob_no(View view) {\r\n Intent i = new Intent(OtpScreen.this, LoginScreen.class);\r\n startActivity(i);\r\n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(StartPage.this,SafeMove.class));\n }", "public void gotoLogin() {\n try {\n LoginController login = (LoginController) replaceSceneContent(\"Login.fxml\");\n login.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "Point onPage();", "@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 }", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "@Override\n public void pressTVButton() {\n System.out.println(\"Home: You must pick an app to show tv shows.\");\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n switch (motionEvent.getAction()) {\n case MotionEvent.ACTION_UP:\n //test if what button has been touch\n if (view.getId() == R.id.continue_user_btn) {\n if (choice.equals(\"Tenant\")){\n startActivity(new Intent(UserLogin.this,Registration.class));\n finish();\n }else{\n startActivity(new Intent(UserLogin.this,RegistrationLandowner.class));\n finish();\n }\n }else if(view.getId() == R.id.tv_text_goback) {\n startActivity(new Intent(UserLogin.this,Login.class));\n finish();\n }\n\n }\n return true;\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void ClickVtube(View view){\n redirectActivity(this,Vtube.class);\n }", "public boolean navigateToShoppageThroghPageIntion(WebDriver driver) {\n\t\treturn shoppage.clickOnPageInition(driver);\n\t}", "@Test\n public void swipeThroughPages()\n {\n onView(withId(R.id.viewPager)).perform(ViewActions.swipeLeft());\n\n //Swipe back to the beginning\n onView(withId(R.id.viewPager)).perform(ViewActions.swipeRight());\n }", "@When ( \"I navigate to the personal representatives page\" )\n public void goToRepsPage () throws InterruptedException {\n driver.get( baseUrl + \"/patient/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\n }", "@Override\n protected BasePage openPage() {\n return null;\n }", "public void navigateToRoot()\r\n\t{\r\n\t\tnavigateTo(m_rootInstance, false);\r\n\t}", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "@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 }", "public void pageListAtmosphere(View view) {\n start_button.setEnabled(false);\n Intent intent = new Intent(getApplicationContext(), PageVersion2.class);\n startActivity(intent);\n\n }", "public void forceNavigation(String destination)\r\n \t{\n \t\tif (!this.currentState.isAuthenticated())\r\n \t\t{\r\n \t\t\tdestination = ChooseCasePilot.generateNavigationId(ChooseCasePilot.PageId.login);\r\n \t\t}\r\n \r\n \t\tcurrentState.setCurrentView(destination);\r\n \r\n \t\tString view = this.findViewId(destination);\r\n \t\tString page = this.findPageId(destination);\r\n \r\n \t\t// Get the right pilot to get the right content to show next.\r\n \t\tPilot currentPilot = this.getPilot(view);\r\n \t\tif (currentPilot == null)\r\n \t\t{\r\n \t\t\tthis.swapContent(this.show404Error());\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\t// Set the current mode to determine whether the user has privelages to\r\n \t\t// access the page they want to go to.\r\n \t\tcurrentPilot.determineAccessRights(page, this.currentState);\r\n \r\n \t\tapplyCloseStepPolicy(currentPilot, view, page);\r\n \r\n \t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction()){\n case MotionEvent.ACTION_DOWN:\n System.out.println(\"---action down-----\");\n dx=event.getX();\n dy=event.getY();\n // show.setText(\"起始位置为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n break;\n case MotionEvent.ACTION_MOVE:\n //System.out.println(\"---action move-----\");\n //show.setText(\"移动中坐标为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n break;\n case MotionEvent.ACTION_UP:\n System.out.println(\"---action up-----\");\n ux=event.getX();\n uy=event.getY();\n\n if(dx>readingText.getWidth()/2){//页面三等分,中间跳出设置 设置字体大小时应重新加载页面\n // Toast.makeText(MainActivity.this, \"next\", Toast.LENGTH_SHORT).show();\n readingText.setText(getNext());\n }\n else {\n readingText.setText(getPre());\n\n //加载上一页\n //Toast.makeText(MainActivity.this, \"pre\", Toast.LENGTH_SHORT).show();\n //show.setText(\"pre:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n }\n break;\n // show.setText(\"最后位置为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n }\n return true;\n }", "@Override\n public void onClick(View v) {\n navController.navigate(R.id.two);\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.example.thirdapp.LocationActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"4\");\n\t\t\t}", "public abstract void navigateToLogin();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString url = \"http://www.hoteltrip.com/\";\n\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\ti.setData(Uri.parse(url));\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void home(){\n Intent intent = new Intent(getApplicationContext(), TouchController.class);\n intent.setAction(Constant.ACTION_NOTIFICATION);\n startService(intent);\n }", "public static void lauchFromPillScreen(AppiumDriver<WebElement> driver,String appName)\t\t\n\t{\t\n\t\tpillScreen_PO pillScreen_PO=new pillScreen_PO((AppiumDriver<WebElement>) driver);\n\t\ttouchAction = new TouchAction(driver);\n\t\tWebDriverWait wait = new WebDriverWait(driver,10);\n\t//\twait = new WebDriverWait(driver,10);\t\t\t\n\t\tsize = driver.manage().window().getSize();\n\t\tSystem.out.println(size);\n\t\tint startx = (int)(size.width * 0.80);\n\t\tint endx = (int)(size.width * 0.20);\n\t\tint starty = size.height/2;\n\t\tint endy = size.height/8;\n\t\tSystem.out.println(\"startx = \" + startx + \" ,endx = \" + endx + \" , starty = \" + starty);\n\t\t//Swipe from left to right\n\t\tSystem.out.println(\"test is failing here \");\n\t\t//touchAction.press(endx,starty).moveTo(startx, starty).release().perform();\n\t\ttouchAction.press(400,510).moveTo(630, 510).release().perform();\n\n\t\tif(appName==\"Cricket\")\n\t\t{\n\t\t\tpillScreen_PO.cricket().click();\n\t\t}\n\t\tif(appName==\"Recharge\")\n\t\t{\n\t\t\tpillScreen_PO.recharge().click();\n\t\t}\n\t\tif(appName==\"Zomato\")\n\t\t{\n\t\t\tpillScreen_PO.zomato().click();\n\t\t}\n\t\tif(appName==\"Bus Tickets\")\n\t\t{\n\t\t\tpillScreen_PO.busTickets().click();\n\t\t}\n\t\tif(appName==\"News\")\n\t\t{\n\t\t\tpillScreen_PO.news().click();\n\t\t}\n\t\tif(appName==\"Rail Info\")\n\t\t{\n\t\t\tpillScreen_PO.railInfo().click();\n\t\t}\n\n\t}", "@Override\n\tpublic void navigateToNext(String phoneNum) {\n\t\t\n\t}", "private void goToMainPage() {\n mAppModel.getErrorBus().removePropertyChangeListener(this);\n mAppModel.removePropertyChangeListener(this);\n mNavigationHandler.goToMainPage();\n }", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "public LandingPage navigateToApplication(){\n\t\tString url = action.getProperties(\"URL\");\n\t\taction.OpenURl(url).Waitforpageload();\n\t\treturn this;\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 goToHome() {\n navController.navigate(R.id.nav_home);\n }", "public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(getApplicationContext(), Page_forty_four.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent r3page = new Intent(v.getContext(), No1ShipStreet.class);\n startActivity(r3page);\n }", "public void navigateToForward() {\n WebDriverManager.getDriver().navigate().forward();\n }", "private void registerOnTouchListener() {\n TextView mRedirectToWelcome = (TextView) findViewById(R.id.register_redirect_login);\n mRedirectToWelcome.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n startActivity(intent);\n return true;\n }\n });\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 }", "@Override\r\n public void onClick(View v){\n RequestUrl(\"led2\");\r\n }", "@Override\n public void touch()\n {\n\n }", "@When(\"The User clicks on View button of any specific Universal Images record\")\n\tpublic void b2() throws InterruptedException, FileNotFoundException, IOException {\n homePage.UIviewpage();\n\t}", "public void goToLoginPage(ActionEvent event) throws IOException{\n\t\t//this should return to the Login Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/LoginPage.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Login Page\");\n\t\tapp_stage.show();\n\t}", "@Override\n public void jumpActivity() {\n startActivity(new Intent(MainActivity.this, MainActivity.class));\n }", "public void performLogin(View view) {\r\n // Do something in response to button\r\n\r\n Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://dev.m.gatech.edu/login/private?url=gtclicker://loggedin&sessionTransfer=window\"));\r\n startActivity(myIntent);\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i= new Intent(MainActivity.this,page8.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\t\n\t\t\t}", "public void navigateToHomePage() {\n\t\n\t\t\tScreenShot screen = new ScreenShot();\n\n\t\t\t// Utilize the driver and invoke the chrome browser\n\t\t\tdriver.get(\" https://www.progressive.com/\");\n\t\t\tdriver.manage().window().maximize();\n\n\t\t\t// Wait for page to be loaded\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t\t// Take a Screenshot\n\t\t\tscreen.takeSnapShot(driver, \"Progressive Insurance HomePage\");\n\t\t\t\n\t\t\tclickAutoInsurance();\t\n\t\t\n\t\t}", "private void goToLandingPage() {\r\n Intent intent = LandingPage.getIntent(MainActivity.this);\r\n intent.putExtra(LandingPage.USERNAME_EXTRA, userText.getText().toString());\r\n startActivity(intent);\r\n }", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void goToPage(String xPathCustom) { \n seleniumDriver.findElement(By.xpath(xPathCustom)).click();\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 Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }", "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "public void clickOnAndroid() {\n\t\t\tmWebView.goBack();\n\n\t\t}", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "@FXML\r\n\tpublic void goToCheckout() {\r\n\t\tViewNavigator.loadScene(\"Checkout\", ViewNavigator.CHECKOUT_SCENE);\r\n\t}", "public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n }", "public void ClickScanner(View view){\n MainActivity.redirectActivity(this,Scanner.class);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\t\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n \n }", "public EmagHomePage clickonContinueButton()\n {\n continueButton.click();\n return new EmagHomePage(driver);\n }", "public void testRes_Navigation(){\n\t\tinnerFunction(childrenButton, childrenList.class);\t\t\n\t\tinnerFunction(locationButton, locationList.class);\n\t\t\n\t\tsolo.clickOnView(logOutButton);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to login screen.\", Login.class);\n\n\t}", "@Override\r\n public void onClick(View v){\n RequestUrl(\"led1\");\r\n }", "@FXML\r\n\tpublic void goToMain() {\r\n\t\tViewNavigator.loadScene(\"Welcome to WatchPlace\", ViewNavigator.HOME_SCENE);\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 }", "@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(GuidePage.this, LoginOrRegister.class);\r\n startActivity(intent);\r\n }", "@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\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n }", "@Override\n public boolean touchDown(int screenX, int screenY, int pointer, int button) {\n return false;\n }", "@Override\n public boolean touchDown(int screenX, int screenY, int pointer, int button) {\n return false;\n }", "private void navigateToDefaultView() {\n\t\tif (navigator!=null && \"\".equals(navigator.getState())) {\n\t\t\t// TODO: switch the view to the \"dashboard\" view\n\t\t}\n\t}", "public void ClickHome(View view){\n MainActivity.redirectActivity(this,MainActivity.class);\n\n }", "protected void gotoReadyPage(){\n\n Intent intent = new Intent(MainActivity.this,ReadyActivity.class);\n startActivity(intent);\n overridePendingTransition(R.anim.anim_slide_in_right, R.anim.anim_slide_out_left);\n //\n finish();\n }", "private void gotoCheckInListView() {\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }", "public void pressTVButton() {\n System.out.println(\"Home: You must pick an app to show movies.\\n\");\n }", "private void goToRegistrationPage() {\n mAppModel.getErrorBus().removePropertyChangeListener(this);\n mAppModel.removePropertyChangeListener(this);\n mNavigationHandler.goToRegistrationPage();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUri webpage = Uri.parse(currentItem.getStoryUrl());\n\n\t\t\t\t// Create web browser intent\n\t\t\t\tIntent storyOnWebIntent = new Intent(Intent.ACTION_VIEW, webpage);\n\n\t\t\t\t// Check web activity can be handled by the device and start activity\n\t\t\t\tif (storyOnWebIntent.resolveActivity(mContext.getPackageManager()) != null) {\n\t\t\t\t\tmContext.startActivity(storyOnWebIntent);\n\t\t\t\t}\n\n\t\t\t}", "@Test\n\tpublic void testcase3() throws InterruptedException\n\t{\n\t\tdriver.findElementByAndroidUIAutomator(\"text(\\\"Privacy policy\\\")\").click();\n\t\tdriver.findElementById(\"android:id/button_once\").click();\n\t\t\n\t\t//***Verify Content Switching between NATIVE & WEBVIEW \n\t\tSet<String> contextNames = driver.getContextHandles();\n\t\tfor (String contextName : contextNames)\n\t\t{\n\t\t System.out.println(contextName); \n\t }\t\n\t\t//driver.context(\"WEBVIEW_org.khanacademy.android\");\n\t Thread.sleep(5000);\n\t driver.pressKey(new KeyEvent(AndroidKey.BACK));\n\t driver.context(\"NATIVE_APP\");\n\t}", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.FeedServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "protected void goTo(String url) {\n \t\tcontext.goTo(url);\n \t}", "@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 }", "@Override\n public void userPageMyTickets() {\n String phone_number = getphoneNumber();\n Intent intent = new Intent(userPageModel.this, myTicketsPageModel.class);\n intent.putExtra(\"phone\",phone_number);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }", "@Override\n public void onClick(View v) {\n Intent intent=new Intent(Login.this,teacherLogin.class);\n startActivity(intent , ActivityOptions.makeSceneTransitionAnimation(Login.this).toBundle());\n }", "public void gotoHome() // Wait for Home page or Verify Device page \n\t{\t\t\t\t \n\t\tWebDriverWait wait= new WebDriverWait(driver,90);\n\t\t\n\t\ttry\n\t\t{\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\" Page is taking too much time to load , stopping execution\");\n\t\t}\t\t\n\t}" ]
[ "0.6023329", "0.5822787", "0.58042866", "0.5795216", "0.57784945", "0.5726778", "0.57152206", "0.56253994", "0.5617523", "0.5587618", "0.55543226", "0.553216", "0.5530375", "0.5529238", "0.5521694", "0.5518063", "0.5512196", "0.55045384", "0.55038005", "0.55014724", "0.5478277", "0.5471978", "0.54670787", "0.54624224", "0.54555047", "0.54532415", "0.5451446", "0.54399264", "0.54331845", "0.542839", "0.54230577", "0.5421903", "0.5416409", "0.54092085", "0.5404471", "0.5399849", "0.5385527", "0.53733146", "0.5345559", "0.5345306", "0.5342484", "0.5340434", "0.53220505", "0.5319294", "0.5318843", "0.5307445", "0.53008205", "0.52849925", "0.5280581", "0.5272561", "0.5269303", "0.5268181", "0.5267068", "0.52651477", "0.5256561", "0.5239694", "0.52353555", "0.52345186", "0.5233814", "0.5233778", "0.523304", "0.5231793", "0.5228831", "0.52204394", "0.52192813", "0.5214812", "0.5208443", "0.5207947", "0.52068186", "0.520443", "0.51999384", "0.51968944", "0.51954573", "0.5190003", "0.51875067", "0.51859766", "0.51850456", "0.5182003", "0.5178745", "0.5177553", "0.51759195", "0.51724654", "0.5167636", "0.5167636", "0.5163654", "0.51623863", "0.51580656", "0.51542825", "0.51542366", "0.5152745", "0.51501775", "0.5148667", "0.5147142", "0.51469874", "0.5139941", "0.5137868", "0.5134801", "0.51292765", "0.51240975", "0.51135296" ]
0.51876026
74
Navigate to InOut/EndsInOut page
public static void NavigateToInOutEndsInOut(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_InOut(driver).click(); Trade_Page.link_EndsInOut(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeNavigation(PrintWriter out, RequestProperties reqState)\n throws IOException\n {\n // ignore\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}", "private String navigateAfterLoginAttemp()\r\n {\r\n Identity identity = this.getIdentity();\r\n\r\n if (identity == null) {\r\n return \"/\";\r\n }\r\n if (identity instanceof Pilot) {\r\n return \"/pilot/index.xhtml\";\r\n }\r\n if (identity instanceof General) {\r\n return \"/general/index.xhtml\";\r\n }\r\n if (identity instanceof SystemAdministrator) {\r\n return \"/admin/index.xhtml\";\r\n }\r\n throw new IllegalStateException(\"Identita \" + identity\r\n + \" nie je ziadneho z typov, pre ktory dokazem 'navigovat'!\");\r\n }", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "public void navigation() {\n }", "@FXML\n public void goToObst(ActionEvent event) throws IOException, SQLException { //PREVIOUS SCENE\n \tdoChecking();\n \t\n \ttry {\n\t \tif(checkIntPos && checkFloatPos && checkIntPosMatl && checkFloatPosMatl) {\n\t \t\t//store the values\n\t \t\tstoreValues();\n\t \t\t\n\t \t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Obst.fxml\"));\n\t \t\tParent root = loader.load();\n\t \t\t\n\t \t\tObstController obstCont = loader.getController(); //Get the next page's controller\n\t \t\tobstCont.showInfo(); //Set the values of the page \n\t \t\tScene obstScene = new Scene(root);\n\t \t\tStage mainWindow = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \t\tmainWindow.setScene(obstScene);\n\t \t\tmainWindow.show();\n\t \t}\n \t} catch(Exception e) {\n\t\t\tValues.showError();\n\t\t}\n \t\n }", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "@Override\n\tpublic void goHome() {\n\t\tSystem.out.println(\"回窝了!!!!\");\n\t}", "private void goOnPage(final HttpServletRequest request, final HttpServletResponse response, String goToPage,\n\t\t\tfinal String methodName) throws ServletException, IOException {\n\t\tRequestDispatcher dispatcher = null;\n\t\ttry {\n\t\t\tif (goToPage == null) {\n\t\t\t\tgoToPage = ServiceJspPagePath.PATH_HR_PAGE;\n\t\t\t\tdispatcher = request.getRequestDispatcher(goToPage);\n\t\t\t\tdispatcher.forward(request, response);\n\t\t\t} else {\n\t\t\t\tresponse.sendRedirect(goToPage);\n\t\t\t}\n\t\t} catch (ServletException | IOException e) {\n\t\t\tlogger.error(\"ServiceHrImpl: \" + methodName + \": \", e);\n\t\t\tthrow e;\n\t\t}\n\t}", "public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }", "public void goHome();", "public void testRes_Navigation(){\n\t\tinnerFunction(childrenButton, childrenList.class);\t\t\n\t\tinnerFunction(locationButton, locationList.class);\n\t\t\n\t\tsolo.clickOnView(logOutButton);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to login screen.\", Login.class);\n\n\t}", "private void backPage()\n {\n page--;\n open();\n }", "public void goToHome() throws IOException {\n\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"index.xhtml\");\n\t}", "public static void NavigateToInOutStaysInGoesOut(WebDriver driver,String market,String asset) {\n\t\tSelect mSelect = new Select(Trade_Page.select_Market(driver));\n\t\tmSelect.selectByVisibleText(market);\n\t\tSelect aSelect = new Select(Trade_Page.select_Asset(driver));\n\t\taSelect.selectByVisibleText(asset);\n\t\tTrade_Page.link_InOut(driver).click();\n\t\tTrade_Page.link_StaysInOut(driver).click();\n\t}", "public void goToNextPage() {\n nextPageButton.click();\n }", "private void forwardPage()\n {\n page++;\n open();\n }", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public AnnuityDetailsTab ClickContinueLinkwithOutFillingOut() throws InterruptedException\n\t{\n\t\tdriver.findElement(By.partialLinkText(\"Continue to Annuity Details\")).click();\n\t\t\n\t\tThread.sleep(1000);\t\n\t\treturn new AnnuityDetailsTab(driver);\n\t\t\n\t}", "private void gotoPage(String _page, HttpServletRequest _req, HttpServletResponse _res)\n throws IOException, ServletException {\n\n RequestDispatcher dispatcher = _req.getRequestDispatcher(_page);\n if (dispatcher != null)\n dispatcher.forward(_req, _res);\n\n }", "@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}", "@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}", "@Then(\"^user come back to main account page and log out$\")\n public void come_back_main_account_and_log_out() throws Exception{\n userAccountPage.clickBtnBackToAccount();\n userAccountPage.clickBtnLogOut();\n }", "private void gotoCompletePage() {\n WebkitUtil.forward(mWebView, AFTER_PRINT_PAGE);\n }", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "public String next() {\r\n\t\treturn \"/private/admin/Aktienbestaetigung?faces-redirect=true\";\r\n\t}", "public String gotoPage() {\n return FxJsfUtils.getParameter(\"page\");\n }", "public EmagHomePage clickonContinueButton()\n {\n continueButton.click();\n return new EmagHomePage(driver);\n }", "public void gotoHome(){ application.gotoHome(); }", "public void actionPerformed (ActionEvent e) {\n if(e.getActionCommand().equals(\"Back\")) {\r\n OptionsPage f1 = new OptionsPage(strUser);\r\n f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f1.setSize(500, 500 ); \r\n f1.setVisible(true); \r\n this.dispose(); \r\n }\r\n //open the main page\r\n\tif(e.getActionCommand().equals(\"Log Out\")) {\r\n MainPage f1 = new MainPage();\r\n f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f1.setSize(500, 500 ); \r\n f1.setVisible(true); \r\n this.dispose(); \r\n }\r\n }", "public void goToLoginPage(ActionEvent event) throws IOException{\n\t\t//this should return to the Login Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/LoginPage.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Login Page\");\n\t\tapp_stage.show();\n\t}", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "public NewcommunityPage submitKo() {\n driver.findElement(nextLocator).click();\r\n\r\n // Return a new page object representing the destination. Should the login page ever\r\n // go somewhere else (for example, a legal disclaimer) then changing the method signature\r\n // for this method will mean that all tests that rely on this behaviour won't compile.\r\n return new NewcommunityPage(driver); \r\n\t}", "@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}", "HtmlPage clickLink();", "public void goToUserPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/User_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"User Page\");\n\t\tapp_stage.show();\n\t}", "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 NavigateCheckOut(Reporting report)\n\t{ waitForElementToBeClickable(CheckOut);\n\t\tClick(CheckOut,report);\n\t}", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "@Given(\"^User is navigating to G-mail Login Page$\")\n\tpublic void navigateURL() throws Throwable {\n\t\tSystem.out.println(\"Entered URL\"); \n\t\t\n\t}", "@Test\n\tpublic void navigateDemo() throws InterruptedException {\n\t\tdriver.navigate().to(url);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.findElement(By.xpath(\"//input[@type=\\\"submit\\\"]\")).click();\n\t\tThread.sleep(5000);\n\t\tdriver.navigate().back();\n\t\tThread.sleep(5000);\n\t\tdriver.navigate().forward();\n\t\tThread.sleep(3000);\n\t\tdriver.navigate().refresh();\n\t\tThread.sleep(1000);\n\n\t}", "@Override\n\tpublic void nextPage() {\n\t\tif ( yesBox.isChecked() ) {\n\t\t\tcore.modelCore.events.remove(core.modelCore.selectedEvent);\n\t\t\t\n\t\t\tcore.currentScreen.thisRemoveScreen();\n\t\t\tcore.currentScreen = null;\n\t\t\tPage_Event12Yes newPage = new Page_Event12Yes(core);\n\t\t} else {\n\t\t\tcore.currentScreen.thisRemoveScreen();\n\t\t\tcore.currentScreen = null;\n\t\t\tPage_Event12No newPage = new Page_Event12No(core);\n\t\t}\n\t\t\n\t\t//core.currentScreen.thisRemoveScreen();\n\t\t//core.currentScreen = null;\n\t\t//Page_Event03 newPage = new Page_Event03(core);\n\t}", "private void goToMainPage() {\n mAppModel.getErrorBus().removePropertyChangeListener(this);\n mAppModel.removePropertyChangeListener(this);\n mNavigationHandler.goToMainPage();\n }", "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "@Test\n public void logoutPage() throws InterruptedException{\n \tSystem.out.println(\"My Vehicle.\");\n \tlogoutPage.logout();\n // Assert.assertEquals(loginPage.getMessage(), LOGIN_SUCCESS_MESSAGE);\n }", "@Given(\"^user in the home page of Southall travel$\")\n public void user_in_the_home_page_of_Southall_travel() throws Throwable {\n }", "private void navigationAdminScreen(UserInfo usn) {\n finish();\n }", "public void goToFriendListPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/FriendList_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Friend List\");\n\t\tapp_stage.show();\n\t}", "@Given(\"^That dante is in the flights page$\")\n\tpublic void thatDanteIsInTheFlightsPage() throws Exception {\n\t\tdante.wasAbleTo(OpenTheBrowser.on(viajesExitoHomePage));\n\t}", "public void signOut(){\n \n\t // click on the sign in/out drop down menu\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(signOutDropDownMenuLocator))\n \t .click();\n \t \n \t // click on the sign out link\n \t DRIVER.findElement(signOutLinkLocator).click();\n \t \n \t // wait for sign out to complete\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.visibilityOfElementLocated(navigationBarSignInLinkLocator));\n }", "@Given(\"^that the user is on Emirates.com$\")\n\tpublic void navigate_to_emirates_home_page() throws InterruptedException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:/Users/Manmeet Kaur/Downloads/chromedriver_win32/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.emirates.com/ae/english/\");\n\t\tdriver.manage().window().maximize();\n\t}", "public void navigateToForward() {\n WebDriverManager.getDriver().navigate().forward();\n }", "@FXML\r\n\tpublic void goToCheckout() {\r\n\t\tViewNavigator.loadScene(\"Checkout\", ViewNavigator.CHECKOUT_SCENE);\r\n\t}", "protected void goBack() {\r\n\t\tfinish();\r\n\t}", "public void navigateToWeb() throws Exception {\n\n server.setCurrentItem(1, HOME_URL);\n\n // Navegate to HOME_URL address\n browser.navigate(HOME_URL);\n\n //Tihis command is uses to make visible in the desktop the page (IExplore issue)\n if (browserType.equals(\"IE\")) {\n client.clickOnCenter();\n client.pause(3000);\n }\n\n By lName = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[1]/td/div/input\");\n By dob = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[2]/td/div/input\");\n By accNumber = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[3]/td/div/input\");\n By sortCd = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[4]/td/div/input\");\n By pCode = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[5]/td/div/input\");\n browser.textFieldSet(lName,lastName,true);\n browser.textFieldSet(dob,dateOfBirth,true);\n browser.textFieldSet(accNumber,accountNumber,true);\n browser.textFieldSet(sortCd,sortCode,true);\n browser.textFieldSet(pCode,postCode,true);\n\n browser.clickOnElement(By.xpath(\"/html/body/div/div/div[1]/form/div/input\"));\n\n By message = By.id(\"message\");\n\n boolean isMessageExists = browser.existsElement(message);\n\n if(!isMessageExists) {\n\n By tableId = By.id(\"customer\");\n WebElement table = browser.getElement(tableId);\n\n List<WebElement> th = table.findElements(By.tagName(\"th\"));\n\n int lastNamePos = 0;\n int postCodePos = 0;\n int dobPos = 0;\n int accountNoPos = 0;\n int sortCodePos = 0;\n\n for (int i = 0; i < th.size(); i++) {\n if (\"Last Name\".equalsIgnoreCase(th.get(i).getText())) {\n lastNamePos = i + 1;\n } else if (\"Date of Birth\".equalsIgnoreCase(th.get(i).getText())) {\n dobPos = i + 1;\n } else if (\"Account Number\".equalsIgnoreCase(th.get(i).getText())) {\n accountNoPos = i + 1;\n } else if (\"Sort Code\".equalsIgnoreCase(th.get(i).getText())) {\n sortCodePos = i + 1;\n } else if (\"Post Code\".equalsIgnoreCase(th.get(i).getText())) {\n postCodePos = i + 1;\n }\n }\n\n List<WebElement> lastNameElements = table.findElements(By.xpath(\"//tr/td[\" + lastNamePos + \"]\"));\n List<WebElement> dobElements = table.findElements(By.xpath(\"//tr/td[\" + dobPos + \"]\"));\n List<WebElement> accountElements = table.findElements(By.xpath(\"//tr/td[\" + accountNoPos + \"]\"));\n List<WebElement> sortCodeElements = table.findElements(By.xpath(\"//tr/td[\" + sortCodePos + \"]\"));\n List<WebElement> postCodeElements = table.findElements(By.xpath(\"//tr/td[\" + postCodePos + \"]\"));\n\n for (int i = 0; i < lastNameElements.size(); i++) {\n WebElement e = lastNameElements.get(i);\n if (e.getText().trim().equalsIgnoreCase(lastName)) {\n if (dobElements.get(i).getText().trim().equalsIgnoreCase(dateOfBirth)\n && accountElements.get(i).getText().trim().equalsIgnoreCase(accountNumber)\n && sortCodeElements.get(i).getText().trim().equalsIgnoreCase(sortCode)\n && postCodeElements.get(i).getText().trim().equalsIgnoreCase(postCode)) {\n resultMap.put(\"matchFound\", \"true\");\n break;\n }\n }\n }\n } else\n resultMap.put(\"matchFound\", \"false\");\n\n\n }", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "@Override\r\npublic void afterNavigateTo(String arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }", "public WriteAReviewPage goToWriteAReviewPage(){\n return clickOnStartHereButton();\n }", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "@Then(\"user is navigated to login page\")\n\tpublic void user_is_navigated_to_login_page() throws InterruptedException {\n\t\tdriver.findElement(By.id(\"logout\")).isDisplayed();\n\t\tThread.sleep(2000);\n\n\t\tdriver.close();\n\t\tdriver.quit();\n\n\n\t\t\n\t}", "public MoviesPage navigateBack()\n\t{\n\t\ttry {\n\t\t\tclick(navBackBtn, \"Back From History page\");\n\t\t} catch (Exception e) {TestUtilities.logReportFailure(e);}\n\t\treturn new MoviesPage();\n\t}", "@Override\r\npublic void afterNavigateForward(WebDriver arg0) {\n\tSystem.out.println(\"as\");\r\n}", "public void logoutWithOutLink() {\n\t\tlogger.info(\"Selenium testing logout starting...\");\n\t\twebDriver.get(baseUrl + \"/user/logout\");\n\t\tlogger.info(\"Selenium testing logout complete...\");\n\t}", "@Then ( \"^I log in as an HCP and navigate to the View Obstetrics Records page.$\" )\r\n public void navigateToObstetricsRecordsHCP () {\r\n attemptLogout();\r\n\r\n driver.get( baseUrl );\r\n final WebElement username = driver.findElement( By.name( \"username\" ) );\r\n username.clear();\r\n username.sendKeys( hcpString );\r\n final WebElement password = driver.findElement( By.name( \"password\" ) );\r\n password.clear();\r\n password.sendKeys( \"123456\" );\r\n final WebElement submit = driver.findElement( By.className( \"btn\" ) );\r\n submit.click();\r\n\r\n assertEquals( \"iTrust2: HCP Home\", driver.getTitle() );\r\n\r\n ( (JavascriptExecutor) driver ).executeScript( \"document.getElementById('HCPViewObstetricsRecords').click();\" );\r\n\r\n assertEquals( \"iTrust2: View Patient Obstetrics Records\", driver.getTitle() );\r\n assertTextPresent( \"Current Pregnancy\" );\r\n assertTextPresent( \"Previous Pregnancies\" );\r\n }", "@Override\n\tpublic void goToMainMenu() {\n\t\tfinish();\n\t}", "protected void gotoReadyPage(){\n\n Intent intent = new Intent(MainActivity.this,ReadyActivity.class);\n startActivity(intent);\n overridePendingTransition(R.anim.anim_slide_in_right, R.anim.anim_slide_out_left);\n //\n finish();\n }", "@Test(priority = 2, dataProvider = \"cityinput\", dataProviderClass = TestDataProvider.class)\n\tpublic void homePageCityInput(String fromCity, String toCity) throws InterruptedException {\n\n\t\tlog.info(\"Starting homepage flow\");\n\t\tHomePageFlow.cityInput(fromCity, toCity);\n\t\tCommonUtility.action();\n\t\thome.isButtonDisplayed();\n\t\tlog.info(\"Round button is working properly\");\n\t}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "void endPage(RequestContextHolder request);", "Point onPage();", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "private void goToLoginPage() {\n\n startActivity(new Intent(this,LoginActivity.class));\n finish();\n }", "@Override\n public void navigateToLogin() {\n startActivity(new Intent(this, LoginActivity.class));\n finish();\n }", "public void goHome() throws ManipulatorException;", "public void gotoInkomsten(View v){\n Intent inkomsten;\n inkomsten = new Intent(getBaseContext(),InkomstenActivity.class);\n startActivity(inkomsten);\n }", "@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}", "@Test\r\n\tpublic void test_5_NavigatePage() throws InterruptedException {\n\t\tdriver.findElement(By.linkText(\"2\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t// get page title\r\n\t\tString pageTitle = driver.getTitle();\r\n\t\t// get current page number\r\n\t\tWebElement element = driver.findElement(By.xpath(\"//div[@id='pagn']/span[3]\"));\r\n\t\tString actualPageNumber = element.getText();\r\n\t\tString expectedPageNumber = \"2\";\r\n\t\tAssert.assertEquals(actualPageNumber, expectedPageNumber);\r\n\t\t// if the page title contains \"samsung\" then navigation is successful \r\n\t\tAssert.assertTrue(pageTitle.contains(\"Amazon.com: samsung\"));\r\n\t\tSystem.out.println(\"Page \" + actualPageNumber + \" is displayed\");\r\n\t}", "@Override\r\n\tpublic void afterNavigateTo(String arg0, WebDriver arg1) {\n\t\t\r\n\t}", "public void endPage() {\n\n\t\tif (super.getRequestWrapper().getSession(false) != null) {\n\t\t\tthis.dataComposer.endPage();\n\t\t}\n\t}", "private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }", "@Override\r\n\tpublic void afterNavigateForward(WebDriver arg0) {\n\t\t\r\n\t}", "public MyPage goToMyPage(){\n new WebDriverWait(driver, 60).until(ExpectedConditions.visibilityOf(submitButton));\n submitButton.click();\n return new MyPage(driver);\n }", "@Given(\"^User is on the NetBanking landing page$\")\n\tpublic void user_is_on_the_NetBanking_landing_page() {\n\t\tSystem.out.println(\"User navigated to landing page\");\n\t}", "@Override\n\tpublic void goToStings() {\n\t\t\n\t}", "private void moveToLastPage() {\n while (!isLastPage()) {\n click(findElement(next_btn));\n }\n }", "public void goToOpenHousesSchedulePage() throws InterruptedException {\r\n\t\t\r\n\t\tlog.info(\"***** START TC: GO TO OPEN HOUSE > SCHEDULE PAGE *****\");\r\n\t\t\r\n\t\tWebElement openHouses = driver.findElement(parser.getObjectLocator(\"openHouses\"));\r\n\t\topenHouses.click();\r\n\t\tlog.info(\"LEFT NAVBAR: CLICKED ON OPENHOUSES\");\r\n\t\t\r\n\t\tWebElement schedule = driver.findElement(parser.getObjectLocator(\"schedule\"));\r\n\t\tschedule.click();\r\n\t\tlog.info(\"LEFT NAVBAR: CLICKED ON SCHEDULE\");\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tlog.info(\"***** END TC: GO TO OPEN HOUSE > SCHEDULE PAGE *****\");\r\n\t}", "public TripandPriceDetailsPage goToTripandPriceDetailsPage() {\n\t\tselectedDepartureFlight.click();\n\t\tselectedReturnFlight.click();\n\t\tcontinueButton.click();\n\t\treturn new TripandPriceDetailsPage(driver);\n\t}", "public void Placement_BySession_PageNav() {\n\t\t\t\n\t\t\t\n\t\t\tControls.hoverclick(By.linkText(\"Placements\"), By.linkText(\"By Session\"));\n\t\t\tControls.dynemicwait(By.xpath(\"//*[@id=\\\"mainBody\\\"]/div[3]/div[2]/div/div[1]/div[2]\"));\n\t\t\t\n\t\t\t\n\t\t\tif(Controls.GetText(By.xpath(placementProp.getProperty(\"title.xpath\"))).trim().equalsIgnoreCase(\"By Session\"))\n\t\t\t{\n\t\t\t\tReports.log(Status.PASS, \"Page is redirected on Placement 'By Session' page successfully\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tReports.log(Status.FAIL, \"Page is redirected on incorrect page\");\n\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t}", "private void back_home(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tresponse.sendRedirect(\"restaurant\");\n\t\treturn;\n\t}", "public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }", "@Override\r\n public void afterNavigateTo(final String arg0, final WebDriver arg1) {\n\r\n }", "@FXML\n void onActGoBack(ActionEvent event) throws IOException {\n sceneManage(\"/View/Reports.fxml\", event);\n }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "@FXML\n public void backPage() {\n LibrarySystem.setScene(new ReaderLogIn(readerlist, booklist));\n }", "public void handleBackButton(ActionEvent event) throws IOException {\n showUserAccountPage(event);\n }", "@And(\"^I goto Activation Page$\")\r\n\t\r\n\tpublic void I_goto_Activation_Page() throws Exception {\r\n\t\t\r\n\t\tenduser.click_activationTab();\r\n\t\t\r\n\t}", "public void backToLogin(MouseEvent mouseEvent) throws IOException {\n new PageLoader().load(\"Login\");\n }" ]
[ "0.5900215", "0.5829397", "0.58098775", "0.5709997", "0.56797945", "0.5594976", "0.55487937", "0.5508816", "0.55026644", "0.5490825", "0.54805547", "0.5468813", "0.54653805", "0.5458407", "0.5448022", "0.53946805", "0.53806335", "0.5340384", "0.53100586", "0.5294055", "0.5254205", "0.523831", "0.5228401", "0.5199099", "0.5184877", "0.51621515", "0.51614803", "0.51592004", "0.5158942", "0.5156136", "0.5153802", "0.5148394", "0.5147696", "0.51353973", "0.5133666", "0.5116888", "0.5115081", "0.5106098", "0.509808", "0.5090728", "0.50877774", "0.5075973", "0.50728613", "0.5040988", "0.50403094", "0.50347775", "0.5034505", "0.5033625", "0.5021846", "0.50155395", "0.5014135", "0.50093794", "0.500058", "0.49981385", "0.49939573", "0.49902996", "0.49765733", "0.4972257", "0.49693316", "0.4967475", "0.49610752", "0.49555412", "0.4952761", "0.49504665", "0.49492627", "0.4948119", "0.49467042", "0.49427408", "0.49423248", "0.49385118", "0.49322033", "0.49263218", "0.49248734", "0.4918018", "0.49142", "0.49138248", "0.49122638", "0.49114838", "0.49114093", "0.49100146", "0.48927993", "0.4891729", "0.4891601", "0.48880568", "0.48877668", "0.4883511", "0.4882166", "0.4878925", "0.48781645", "0.48760667", "0.4873445", "0.48721525", "0.48706025", "0.48681507", "0.48638287", "0.48576143", "0.4855567", "0.48537415", "0.4853294", "0.483999" ]
0.54634494
13
Navigate to InOut/StaysInGoesOut page
public static void NavigateToInOutStaysInGoesOut(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_InOut(driver).click(); Trade_Page.link_StaysInOut(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }", "@Override\n\tpublic void goToStings() {\n\t\t\n\t}", "public void signOut(){\n \n\t // click on the sign in/out drop down menu\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(signOutDropDownMenuLocator))\n \t .click();\n \t \n \t // click on the sign out link\n \t DRIVER.findElement(signOutLinkLocator).click();\n \t \n \t // wait for sign out to complete\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.visibilityOfElementLocated(navigationBarSignInLinkLocator));\n }", "public void signOutOfDD()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignOutLink();\n\t\t\n\t}", "public void NavigateCheckOut(Reporting report)\n\t{ waitForElementToBeClickable(CheckOut);\n\t\tClick(CheckOut,report);\n\t}", "@Given(\"^user in the home page of Southall travel$\")\n public void user_in_the_home_page_of_Southall_travel() throws Throwable {\n }", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}", "public void goToOpenHousesSchedulePage() throws InterruptedException {\r\n\t\t\r\n\t\tlog.info(\"***** START TC: GO TO OPEN HOUSE > SCHEDULE PAGE *****\");\r\n\t\t\r\n\t\tWebElement openHouses = driver.findElement(parser.getObjectLocator(\"openHouses\"));\r\n\t\topenHouses.click();\r\n\t\tlog.info(\"LEFT NAVBAR: CLICKED ON OPENHOUSES\");\r\n\t\t\r\n\t\tWebElement schedule = driver.findElement(parser.getObjectLocator(\"schedule\"));\r\n\t\tschedule.click();\r\n\t\tlog.info(\"LEFT NAVBAR: CLICKED ON SCHEDULE\");\r\n\t\tThread.sleep(1000);\r\n\t\t\r\n\t\tlog.info(\"***** END TC: GO TO OPEN HOUSE > SCHEDULE PAGE *****\");\r\n\t}", "@FXML\r\n\tpublic void goToCheckout() {\r\n\t\tViewNavigator.loadScene(\"Checkout\", ViewNavigator.CHECKOUT_SCENE);\r\n\t}", "private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "@When(\"^user should signout to exit from the loggedin page$\")\n\tpublic void user_should_signout_to_exit_from_the_loggedin_page() throws Throwable {\n\t\telementClick(pa.getAp().getLogout());\n\t\t\n\t \n\t}", "@Override\n\tpublic void onBackPressed() {\n\n\t\tif (workoutService != null && workoutService.getService().getStatus().isMonitoring()) {\n\t\t\tif (TestHarnessUtils.isTestHarness()) {\n\t\t\t\tstopWorkout(true);\n\t\t\t} else {\n\t\t\t\tpromptStopWorkout(true);\n\t\t\t}\n\t\t} else {\n\t\t\tsuper.onBackPressed();\n\t\t\toverridePendingTransition(anim.push_right_in, anim.push_right_out);\n\t\t}\n\t}", "public SignInPage clickSignin() {\n\t\tclick(SIGNIN_LOCATOR);\n\t\treturn new SignInPage(driver);\n\t\t\n\t}", "public void Checkout_button() {\n\t\tthis.endUser.checkOut();\n\t\tthis.defaultSetup();\n\t}", "public void clickSignOutLink()\n\t{\n \telementUtils.performElementClick(wbSignOutLink);\n\t}", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "@Override\n\tpublic void nextPage() {\n\t\tif ( yesBox.isChecked() ) {\n\t\t\tcore.modelCore.events.remove(core.modelCore.selectedEvent);\n\t\t\t\n\t\t\tcore.currentScreen.thisRemoveScreen();\n\t\t\tcore.currentScreen = null;\n\t\t\tPage_Event12Yes newPage = new Page_Event12Yes(core);\n\t\t} else {\n\t\t\tcore.currentScreen.thisRemoveScreen();\n\t\t\tcore.currentScreen = null;\n\t\t\tPage_Event12No newPage = new Page_Event12No(core);\n\t\t}\n\t\t\n\t\t//core.currentScreen.thisRemoveScreen();\n\t\t//core.currentScreen = null;\n\t\t//Page_Event03 newPage = new Page_Event03(core);\n\t}", "public void writeNavigation(PrintWriter out, RequestProperties reqState)\n throws IOException\n {\n // ignore\n }", "public final void easeIn() {\n float originX = phasesUI.getX();\n MoveToAction out = new MoveToAction();\n out.setPosition(phasesUI.getWidth() * -1, phasesUI.getY());\n out.setDuration(PhaseConstants.PANEL_EASE_DURATION / 3);\n\n VisibleAction show = new VisibleAction();\n show.setVisible(true);\n\n MoveToAction in = new MoveToAction();\n in.setPosition(originX, phasesUI.getY());\n in.setDuration(PhaseConstants.PANEL_EASE_DURATION);\n\n SequenceAction seq = new SequenceAction(out, show, in);\n phasesUI.addAction(seq);\n\n //phasesUI.setVisible(true);\n toggle = true;\n }", "@Override\n\tpublic void seeRoute() {\n\t\tRoute route = game.getIncidentRoutes();\n\t\tSystem.out.println(route);\n\t\tSystem.out.println(\"Total sailing days required is \"+ game.calculateSailingDays(route)+\" days\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\tSystem.out.println(\"(2) Set Sail\");\n\t\t\ttry { \n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tstate = true;\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (game.isIslandReachable(route)) {\n\t\t\t\t\t\tif (game.checkMyShipHealth()) {\n\t\t\t\t\t\t\tgame.payCrew(route);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"You should repair your ship first!\" + \"\\n\" + \"you will be redirected to store at your current Island\" + \"\\n\");\n\t\t\t\t\t\t\tgame.repairMyShip();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"This Island is not accessible because you don't have enough days left, you can choose other Island\");\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\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 MenuSignOnPageClass navigateToSignOn() {\n\t\tthis.clickSignOn();\n\t\treturn new MenuSignOnPageClass(myDriver, myWait);\n\t}", "@Then(\"^user come back to main account page and log out$\")\n public void come_back_main_account_and_log_out() throws Exception{\n userAccountPage.clickBtnBackToAccount();\n userAccountPage.clickBtnLogOut();\n }", "public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}", "public void clickOnTheCheckOutButton() {\n\t\tSystem.out.println(\"Making click in the button checkout\");\n\t\twaitForAnExplicitElement(body_button_checkout);\n\t\tclick(body_button_checkout);\n\t}", "public AnnuityDetailsTab ClickContinueLinkwithOutFillingOut() throws InterruptedException\n\t{\n\t\tdriver.findElement(By.partialLinkText(\"Continue to Annuity Details\")).click();\n\t\t\n\t\tThread.sleep(1000);\t\n\t\treturn new AnnuityDetailsTab(driver);\n\t\t\n\t}", "public ConferenceRoomsPage configureOutOfOrder(OutOfOrderEntity outOfOrderEntity) {\n outOfOrderDropDown.click();\n outOfOrderOption = By.xpath(\"//ul//a[contains(text(), '\"+ outOfOrderEntity.getTitle() +\"')]\");\n driver.findElement(outOfOrderOption).click();\n int hourActualStart = Integer.parseInt(getHourActualStart());\n int hourExpectStart = Integer.parseInt(outOfOrderEntity.getStartHour());\n String meridianStateStart = getStateMeridianStart();\n int hourActualEnd = Integer.parseInt(getHourActualEnd());\n int hourExpectEnd = Integer.parseInt(outOfOrderEntity.getEndHour());\n String meridianStateEnd = getStateMeridianEnd();\n placeHour(outOfOrderEntity, hourActualStart, hourExpectStart, meridianStateStart, stateMeridianStartButton, incrementHourStartButton, decrementHourStartButton);\n placeHour(outOfOrderEntity, hourActualEnd, hourExpectEnd, meridianStateEnd,stateMeridianEndButton, incrementHourEndButton, decrementHourEndButton);\n OutOfOrderPlanningPage.super.clickSaveRoom();\n return new ConferenceRoomsPage();\n }", "public void goHome();", "public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }", "@Override\r\n public void onClickHome(View view) {\r\n \t// if user is performing an IMCI or CCM assessment then \r\n \t// display a confirmation dialog to confirm that the user wishes \r\n \t// to exit the patient assessment\r\n \texitAssessmentDialogHandler();\r\n }", "@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}", "public void goBackToCal(){\n Intent cal = new Intent(this, Calender.class);\n cal.putExtra(\"startDate\", fromDate);\n cal.putExtra(\"updatedEvent\", updating);\n startActivity(cal);\n }", "protected void gotoReadyPage(){\n\n Intent intent = new Intent(MainActivity.this,ReadyActivity.class);\n startActivity(intent);\n overridePendingTransition(R.anim.anim_slide_in_right, R.anim.anim_slide_out_left);\n //\n finish();\n }", "@UiHandler(\"talksLink\")\r\n\tprotected void onClickTalksLink(ClickEvent event) {\r\n\t\tnavigation.goTo(TalkListPage.class, PageStates.empty());\r\n\t}", "private void backPage()\n {\n page--;\n open();\n }", "public void gotoInkomsten(View v){\n Intent inkomsten;\n inkomsten = new Intent(getBaseContext(),InkomstenActivity.class);\n startActivity(inkomsten);\n }", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@FXML\n public void goToObst(ActionEvent event) throws IOException, SQLException { //PREVIOUS SCENE\n \tdoChecking();\n \t\n \ttry {\n\t \tif(checkIntPos && checkFloatPos && checkIntPosMatl && checkFloatPosMatl) {\n\t \t\t//store the values\n\t \t\tstoreValues();\n\t \t\t\n\t \t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Obst.fxml\"));\n\t \t\tParent root = loader.load();\n\t \t\t\n\t \t\tObstController obstCont = loader.getController(); //Get the next page's controller\n\t \t\tobstCont.showInfo(); //Set the values of the page \n\t \t\tScene obstScene = new Scene(root);\n\t \t\tStage mainWindow = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \t\tmainWindow.setScene(obstScene);\n\t \t\tmainWindow.show();\n\t \t}\n \t} catch(Exception e) {\n\t\t\tValues.showError();\n\t\t}\n \t\n }", "public void logoutWithOutLink() {\n\t\tlogger.info(\"Selenium testing logout starting...\");\n\t\twebDriver.get(baseUrl + \"/user/logout\");\n\t\tlogger.info(\"Selenium testing logout complete...\");\n\t}", "public void toExamSe(View view) {\n Log.i(\"BOTTOM NAVIGATION\", \"to exam navigation item clicked\");\n Intent intent = new Intent(getApplicationContext(), ExamActivity.class);\n intent.putExtra(\"finnish\", false);\n intent.putExtra(\"startNewExam\", true);\n db.setIsFinnishQuestions(false);\n startActivity(intent);\n }", "public void goBack() throws IOException { DashboardController.dbc.loadHomeScene(); }", "@Override\n public boolean onSupportNavigateUp() {\n finish();\n overridePendingTransition(R.anim.slide_in_from_top, R.anim.slide_out_from_top);\n return false;\n }", "static void goback() \r\n\t {\n\t\t\t System.out.println(\"Do you want to conytinue Press - yes and for exit press - No\" );\r\n\t\t\t Scanner sc = new Scanner(System.in);\r\n\t\t\t n = sc.next();\r\n \t\t if(n.equalsIgnoreCase(\"yes\"))\r\n\t\t\t {\r\n\t\t\t\t MainMenu();\r\n\t\t\t }\r\n\t\t\t if(n.equalsIgnoreCase(\"No\"))\r\n\t\t\t {\r\n\t\t\t\t exit();\r\n\t\t\t }\r\n\t\t\t else \r\n\t\t\t {\r\n\t\t\t\t System.out.println(\"please enter a valid input 0 or 1 ! \");\r\n\t\t\t\t goback();\r\n\t\t\t }\r\n\t\t\r\n\t }", "private void gotoCheckInListView() {\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void testRes_Navigation(){\n\t\tinnerFunction(childrenButton, childrenList.class);\t\t\n\t\tinnerFunction(locationButton, locationList.class);\n\t\t\n\t\tsolo.clickOnView(logOutButton);\n\t\tsolo.sleep(500);\n\t\tsolo.assertCurrentActivity(\"ERR - Could not jump to login screen.\", Login.class);\n\n\t}", "@Override\n\tpublic void seeIsland(Island island) {\n\t\tString name = island.getIslandName();\n\t\tStore store = island.getStore();\n\t\tHashMap<Goods, Integer> sellGoods = store.getSellGoods();\n\t\tHashMap<Goods, Integer> interestedGoods = store.getInteresedGoods();\n\t\tEquipment sellEquipment = store.getEquipment();\n\t\tgame.setCurrentChosenIsland(island);\n\t\tSystem.out.println(\"Island's name: \" + name);\n\t\tprintGoods(sellGoods, \"The goods that the store in this Island sell: \");\n\t\tprintGoods(interestedGoods, \"The Goods that the store in this island want to buy:\");\n\t\tSystem.out.println(\"\\n\" + \"Equipment: \" + sellEquipment.getName() + \" Price : \" + sellEquipment.getSellingPrice() + \"\\n\");\t\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\tSystem.out.println(\"(2) See the routes to this Island\");\n\t\t\ttry \n\t\t\t{\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tstate = true;\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\tgame.backToMain(); \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgame.showTheRoute();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\t\n\t}", "@Override\n\tpublic void goHome() {\n\t\tSystem.out.println(\"回窝了!!!!\");\n\t}", "@Override\n public void goToNextScreen(Home.HomeTo presenter) {\n toMapsState = new MapState();\n toMapsState.shop = presenter.getShop();\n\n Context view = presenter.getManagedContext();\n if (view != null) {\n Log.d(TAG, \"calling startingMapsScreen()\");\n view.startActivity(new Intent(view, MapsView.class));\n Log.d(TAG, \"calling destroyView()\");\n presenter.destroyView();\n }\n }", "@Step(\"Log out\")\n public void logOut() {\n open();\n sighOutButton.click();\n }", "@FXML\r\n\tvoid signOutClicked(MouseEvent event) throws IOException {\r\n\t\tlogin = FXMLLoader.load(getClass().getResource(Navigator.LOGIN.getVal()));\r\n\t\tGeneralUIMethods.signOut(contentPaneAnchor, anchorLogin, menuVBox, login);\r\n\t\tGeneralUIMethods.closeConnection();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}", "public KPAUIHealthAndWellnessPage clickHealthAndWellnessLink(){\n getHealthAndWellnessLink().click();\n return new KPAUIHealthAndWellnessPage(driver);\n }", "public boolean isWayOut () {\n if (this.equals(SquareType.WAYOUT))\n return true;\n else\n return false;\n }", "public KPAUISignOnFccPage clickAppointmentsLink(){\n getMakeAnAppointmentLink().click();\n return new KPAUISignOnFccPage(driver);\n }", "@Secured(\"@\")\n public void doBackPage() {\n infoOrderDetail = false;\n haveDepositPrice = false;\n orderStockTag.resetOrderStock();\n }", "void clickPreviousStation();", "public void backToAppointments(ActionEvent event) throws IOException {\n\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"ReportsUI.fxml\"));\n Parent tableViewParent = loader.load();\n\n Scene tableViewScene = new Scene(tableViewParent);\n\n ReportUIController reportUIControllerUIController = loader.getController();\n reportUIControllerUIController.setDatabaseConnection(conn, userID, customerList, appointmentsList);\n\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setScene(tableViewScene);\n window.show();\n\n }", "public void clickCalendarCheckOutDate() {\n\t\tcalendarCheckOutButton.click();\n\t}", "public void CheckLogin()\n\t{\n\t\t\n\t\t\n\t\tinput = new Scanner(System.in);\n\t\tint checkans;\n\t\tSystem.out.println(\"\\t\\t===============================\");\n\t\tSystem.out.println(\"\\n\\t\\t\\tWELCOME BACK\\n\");\n\t\tSystem.out.println(\"\\t\\t===============================\");\n\t\tSystem.out.println(\"***********************************1-PRESS '1' EMPLOYEE\"\n\t\t\t\t+ \"\\n***********************************2-PRESS '2' CUSTOMER\"\n\t\t\t\t+ \"\\n***********************************3-PRESS '3' GO BACK TO THE PAGE \");\n\t\tdo{\tSystem.out.print(\">>>>>\");checkans=input.nextInt();\n\t\t\n\t\tswitch(checkans) {\n\t\tcase 1: EmpCheckLogin();\tbreak;\t\n\t\tcase 2: CustCheckLogin();\tbreak;\t\n\t\tcase 3: ms.pageoneScreen();\tbreak;\t\n\t\tdefault: System.out.println(\"Invalid choice\\n***********************************1-PRESS '1' EMPLOYEE\"\n\t\t\t\t+ \"\\n***********************************2-PRESS '2' CUSTOMER\"\n\t\t\t\t+ \"\\n***********************************3-PRESS '3' GO BACK TO THE PAGE\");}\n\t\t\n\t\t}while(checkans!=1 && checkans!=2&& checkans!=3);\n\t\t\n\t\t\n\t}", "public SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }", "private String navigateAfterLoginAttemp()\r\n {\r\n Identity identity = this.getIdentity();\r\n\r\n if (identity == null) {\r\n return \"/\";\r\n }\r\n if (identity instanceof Pilot) {\r\n return \"/pilot/index.xhtml\";\r\n }\r\n if (identity instanceof General) {\r\n return \"/general/index.xhtml\";\r\n }\r\n if (identity instanceof SystemAdministrator) {\r\n return \"/admin/index.xhtml\";\r\n }\r\n throw new IllegalStateException(\"Identita \" + identity\r\n + \" nie je ziadneho z typov, pre ktory dokazem 'navigovat'!\");\r\n }", "public void showStay();", "public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}", "private void shopExitButtonClicked() {\n finish();\n }", "public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }", "public void setDaysLentOut(String daysLentOut)\n {\n this.daysLentOut = daysLentOut;\n }", "public GitHubSignInPage openSignInPage() {\n\t\tsignInBtn = driver.findElement(By.linkText(SIGNIN_BTN_ID));\n\t\tsignInBtn.click();\n\t\tSystem.out.println(\"Navigating to signin page...\");\n\n\t\treturn new GitHubSignInPage(driver);\n\t}", "public void playWorkouts(){\n mFabPlay.setIcon(R.mipmap.ic_pause_white_24dp);\n mIsPlay = true;\n mCirclePageIndicator.setCurrentItem(mCurrentWorkout);\n\n if(mIsPause) {\n // re-play paused workout\n mCounter.cancel();\n startTimer(mCurrentTime);\n } else {\n // Start ready timer\n mLytBreakLayout.setVisibility(View.VISIBLE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n ttsGreater21(getString(R.string.beginning_workout));\n } else {\n ttsUnder20(getString(R.string.beginning_workout));\n }\n startTimer(_str_break);\n }\n }", "void clickNextStation();", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "public static void NavigateToInOutEndsInOut(WebDriver driver,String market,String asset) {\n\t\tSelect mSelect = new Select(Trade_Page.select_Market(driver));\n\t\tmSelect.selectByVisibleText(market);\n\t\tSelect aSelect = new Select(Trade_Page.select_Asset(driver));\n\t\taSelect.selectByVisibleText(asset);\n\t\tTrade_Page.link_InOut(driver).click();\n\t\tTrade_Page.link_EndsInOut(driver).click();\n\t}", "@Test(priority = 4)\n\tpublic void case5_Logout() throws InterruptedException{\n\t\tcase1_Logout();\n\t\tdriver.navigate().back();\n }", "public void backToLogin(MouseEvent mouseEvent) throws IOException {\n new PageLoader().load(\"Login\");\n }", "public boolean navigateToShoppageThroghPageIntion(WebDriver driver) {\n\t\treturn shoppage.clickOnPageInition(driver);\n\t}", "public void Placement_BySession_PageNav() {\n\t\t\t\n\t\t\t\n\t\t\tControls.hoverclick(By.linkText(\"Placements\"), By.linkText(\"By Session\"));\n\t\t\tControls.dynemicwait(By.xpath(\"//*[@id=\\\"mainBody\\\"]/div[3]/div[2]/div/div[1]/div[2]\"));\n\t\t\t\n\t\t\t\n\t\t\tif(Controls.GetText(By.xpath(placementProp.getProperty(\"title.xpath\"))).trim().equalsIgnoreCase(\"By Session\"))\n\t\t\t{\n\t\t\t\tReports.log(Status.PASS, \"Page is redirected on Placement 'By Session' page successfully\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tReports.log(Status.FAIL, \"Page is redirected on incorrect page\");\n\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t}", "public void switchToGameOverScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"gameover\");\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is just to do logout if customer is auto logged in during\r\n\t\t\t// reservation\r\n\t\t}\r\n\t\t*/\r\n\t}", "@SuppressWarnings({\"UnusedDeclaration\", \"JavaDoc\"})\n public ActionForward checkOutOverview(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws UnartigSessionExpiredException\n {\n checkSessionExpired(request);\n CheckOutForm coForm = (CheckOutForm) form;\n SessionHelper.getShoppingCartFromSession(request).setCustomerCountry(coForm.getCountry());\n return mapping.findForward(\"checkOutOverviewSuccess\");\n }", "public void clickOnLogOutButton() {\n Reporter.addStepLog(\"click on logout button \" + _logOutOnNopCommerce.toString());\n clickOnElement(_logOutOnNopCommerce);\n log.info(\"click on logout button \" + _logOutOnNopCommerce.toString());\n }", "private String doGoBack( HttpServletRequest request )\r\n {\r\n String strJspBack = request.getParameter( StockConstants.MARK_JSP_BACK );\r\n\r\n return StringUtils.isNotBlank( strJspBack ) ? ( AppPathService.getBaseUrl( request ) + strJspBack )\r\n : ( AppPathService.getBaseUrl( request ) + JSP_MANAGE_CATEGORYS );\r\n }", "@Then(\"user is navigated to login page\")\n\tpublic void user_is_navigated_to_login_page() throws InterruptedException {\n\t\tdriver.findElement(By.id(\"logout\")).isDisplayed();\n\t\tThread.sleep(2000);\n\n\t\tdriver.close();\n\t\tdriver.quit();\n\n\n\t\t\n\t}", "@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}", "public void clickCalendarCheckInDate() {\n\t\tcalendarCheckInButton.click();\n\t}", "public static void goTo() {\n\t\tMONTHS[] arrayOfMonths = MONTHS.values();\n\t\tLONGDAYS[] arrayOfLongDays = LONGDAYS.values();\n\t\tScanner sc = new Scanner(System.in);\n\t\tString date = \"\";\n\t\tSystem.out.println(\"Enter a date on MM/DD/YYYY format: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tdate = sc.nextLine().toLowerCase();\n\t\t}\n\t\tint month = Integer.parseInt(date.substring(0, 2));\n\t\tint day = Integer.parseInt(date.substring(3, 5));\n\t\tint year = Integer.parseInt(date.substring(6, 10));\n\t\tGregorianCalendar toDisplay = new GregorianCalendar(year, month, day);\n\t\tString value = getValues(toDisplay);\n\t\tif (value != \"\") {\n\t\t\tSystem.out.println(value);\n\t\t} else {\n\t\t\tSystem.out.println(\"There are no events at this day\");\n\t\t}\n\t}", "public TripandPriceDetailsPage goToTripandPriceDetailsPage() {\n\t\tselectedDepartureFlight.click();\n\t\tselectedReturnFlight.click();\n\t\tcontinueButton.click();\n\t\treturn new TripandPriceDetailsPage(driver);\n\t}", "public void onDiscardClick(){\n if (mHomeChecked){ // at Home Checkmark\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n }\n if (!mHomeChecked) { // at BackPressed\n finish();\n }\n }", "public void gotoHome(){ application.gotoHome(); }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t\t\t}", "public void touchExit() \n {\n if (getOneIntersectingObject(Exit.class) != null)\n Level1.transitionToGameWinWorld(); \n }", "public void signOut() {\n ReusableActionsPageObjects.clickOnElement(driver, signOut, logger, \"log out.\");\n }", "@Override\n public void onBackPressed() {\n showEndShiftDialog();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (isTest) {\n\t\t\t\t} else {\n\t\t\t\t\tif (isSwitch) {// 电梯\n\t\t\t\t\t\tAppManager.getAppManager().finishActivity(\n\t\t\t\t\t\t\t\tNearbyElevatorPlaygroundListActivity.class);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tAppManager.getAppManager().finishActivity(\n\t\t\t\t\t\tNearbyElevatorOrPlaygroundMap.class);\n\t\t\t}", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}" ]
[ "0.5827578", "0.5619024", "0.5545056", "0.53711545", "0.5353426", "0.53432107", "0.5324361", "0.5290358", "0.5237696", "0.51944506", "0.51905864", "0.5188789", "0.5162298", "0.51513565", "0.51006305", "0.509485", "0.50584495", "0.50376457", "0.50357246", "0.50162673", "0.5007819", "0.49945205", "0.49666166", "0.49647307", "0.49620855", "0.49548006", "0.49479675", "0.49424577", "0.49401045", "0.4933825", "0.4932747", "0.49106702", "0.4889949", "0.48844436", "0.48805794", "0.48786783", "0.48782277", "0.487004", "0.48684424", "0.48598036", "0.48527008", "0.48360863", "0.483364", "0.48329785", "0.48220858", "0.4810375", "0.48087204", "0.47909504", "0.47899008", "0.4779884", "0.47791672", "0.47729993", "0.47718456", "0.47588807", "0.47544646", "0.47521436", "0.4748826", "0.47466284", "0.47447702", "0.47428435", "0.47297904", "0.4728501", "0.47277862", "0.471344", "0.47134265", "0.47110993", "0.47086316", "0.47059798", "0.47059736", "0.47053784", "0.46998668", "0.46987322", "0.46982372", "0.46932444", "0.46873504", "0.46809226", "0.46802485", "0.46620202", "0.46412432", "0.46403924", "0.4639921", "0.463255", "0.46317264", "0.462787", "0.46246755", "0.46235007", "0.46224284", "0.46180594", "0.46172896", "0.4614808", "0.4613851", "0.46103233", "0.46101168", "0.46065715", "0.46049923", "0.46044445", "0.4598756", "0.45970026", "0.45961356", "0.45955256" ]
0.566137
1
Navigate to Asians page
public static void NavigateToAsians(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Asians(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "public HomePageAustria() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public void ClickIVANSInformationPage() {\r\n\t\tivansinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"IVANS Information\\\" button on the Birthdays page\");\r\n\t}", "public homePage DadosCadastraisPage() {\n\t\t\n\t\tnavegador.findElement(By.name(\"usernameRegisterPage\")).sendKeys(\"benedito\");\n\n\t\t//preencher o email name(\"emailRegisterPage\")\n\t\tnavegador.findElement(By.name(\"emailRegisterPage\")).sendKeys(\"[email protected]\");\n\n\t\t//inserir senha name (\"passwordRegisterPage\")\n\t\tnavegador.findElement(By.name(\"passwordRegisterPage\")).sendKeys(\"1Ben\");\n\n\t\t//confirmar a senha (\"confirm_passwordRegisterPage\")\n\t\tnavegador.findElement(By.name(\"confirm_passwordRegisterPage\")).sendKeys(\"1Ben\");\t\n\t\tnavegador.findElement(By.name(\"first_nameRegisterPage\")).sendKeys(\"benedito\");\n\t\tnavegador.findElement(By.name(\"last_nameRegisterPage\")).sendKeys(\"Jose\");\n\t\tnavegador.findElement(By.name(\"phone_numberRegisterPage\")).sendKeys(\"131111111111\");\n\n\t\tnavegador.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\t\n\t\tSelect combobox = new Select(navegador.findElement(By.name(\"countryListboxRegisterPage\")));\n\t\t\t\n\t\t//navegador.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\t\n\t\tcombobox.selectByVisibleText(\"Brazil\");\n\n\t\tnavegador.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t\tnavegador.findElement(By.name(\"cityRegisterPage\")).sendKeys(\"Sao Vicente\");\n\t\t\n\t\tJavascriptExecutor desceRua = (JavascriptExecutor)navegador;\n\t\tdesceRua.executeScript(\"window.scrollBy(0,200)\");\n\t\t\n\t\tnavegador.findElement(By.name(\"addressRegisterPage\")).sendKeys(\"Rua Benigno, N 040\");\n\t\tnavegador.findElement(By.name(\"state_/_province_/_regionRegisterPage\")).sendKeys(\"SP\");\n\t\tnavegador.findElement(By.name(\"postal_codeRegisterPage\")).sendKeys(\"11349440\");\n\n\t\t//Selecionar checkbox name(\"i_agree\")\n\t\tnavegador.findElement(By.name(\"i_agree\")).click();\n\n\t\t//Clicar em register id(\"register_btnundefined\")\t\t\n\t\tnavegador.findElement(By.id(\"register_btnundefined\")).click();\n\t\t\n\t\treturn new homePage (navegador);\n\t}", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "public final void go() {\n this.getView().showCountries(this.getModel().getCountries());\n CountryFindChoice choice;\n do {\n choice = this.getView().askUserFindChoice();\n } while (choice == CountryFindChoice.error);\n String codeOrName = this.getView().askCodeOrName(choice);\n Country country = null;\n switch (choice) {\n case byCode:\n country = this.getModel().getCountryByCode(codeOrName);\n break;\n case byName:\n country = this.getModel().getCountryByName(codeOrName);\n break;\n }\n if(country != null) {\n this.getView().printMessage(country.getHelloWorld().getMessage());\n }\n this.getModel().close();\n }", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "public static void traduitSiteAnglais() {\n\t\t\n\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@And(\"^I goto Activation Page$\")\r\n\t\r\n\tpublic void I_goto_Activation_Page() throws Exception {\r\n\t\t\r\n\t\tenduser.click_activationTab();\r\n\t\t\r\n\t}", "public StatusCodesHomePage clickLinkToCodePage() {\n\t\tgetDriver().findElementDynamic(selectorLinkToCodesPage)\n\t\t\t\t.click();\n\t\treturn new StatusCodesHomePage();\n\t}", "@Given(\"^that the user is on Emirates.com$\")\n\tpublic void navigate_to_emirates_home_page() throws InterruptedException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:/Users/Manmeet Kaur/Downloads/chromedriver_win32/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.emirates.com/ae/english/\");\n\t\tdriver.manage().window().maximize();\n\t}", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "private void switchLanguage( ){\n \tString xpathEnglishVersion = \"//*[@id=\\\"menu-item-4424-en\\\"]/a\";\n \tif( driver.findElement( By.xpath( xpathEnglishVersion ) ).getText( ).equals( \"English\" ) ) {\n \t\tSystem.out.println( \"Change language to English\" );\n \t\tdriver.findElement( By.xpath( xpathEnglishVersion ) ).click( );\n \t\tIndexSobrePage.sleepThread( );\n \t}\n }", "public void angelHomePage()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"AngelHomePage > angelHomePage\", driver);\r\n\t\tswitchFrameToAngelContent();\r\n\t\tif(Element.verify(\"Logged in Message\", driver, \"XPATH\", \"//span[@class='pageTitleSpan' and text()='Home']\"))\r\n\t\t{\r\n\t\t\tResultUtil.report(\"PASS\", \"Successfully logged in\", driver);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tResultUtil.report(\"FAIL\", \"Login failed\", driver);\r\n\t\t}\t\t\r\n\t}", "public void navigateTo(){\n this.driver.get(\"xyz.com\");\n this.wait.until(ExpectedConditions.visibilityOf(firstName));\n }", "private String navigateAfterLoginAttemp()\r\n {\r\n Identity identity = this.getIdentity();\r\n\r\n if (identity == null) {\r\n return \"/\";\r\n }\r\n if (identity instanceof Pilot) {\r\n return \"/pilot/index.xhtml\";\r\n }\r\n if (identity instanceof General) {\r\n return \"/general/index.xhtml\";\r\n }\r\n if (identity instanceof SystemAdministrator) {\r\n return \"/admin/index.xhtml\";\r\n }\r\n throw new IllegalStateException(\"Identita \" + identity\r\n + \" nie je ziadneho z typov, pre ktory dokazem 'navigovat'!\");\r\n }", "@Override\n public void verifyAirInformationPage() {\n String currentURL = getWebdriverInstance().getCurrentUrl();\n if (!currentURL.contains(\"flight-information\")) {\n throw new org.openqa.selenium.NotFoundException(\"Was expecting to be on SEO flight information page\" +\n \" but was on\" + currentURL);\n }\n }", "public static void goTo() {\n Browser.driver.get(\"https://www.amazon.co.uk/\");\n Browser.driver.manage().window().maximize();\n }", "public static void clickIntertnational() {\n try {\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n waitToElement(\"// android.widget.TextView[@text='International']\");\n MobileElement internationalBTN = driver.findElementByXPath(\"// android.widget.TextView[@text='International']\");\n internationalBTN.click();\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"unable to click International transfer button\" + e.getMessage());\n }\n }", "@Test\n\tpublic void tc2() throws IOException {\n\t\tAdactinFirstPage k = new AdactinFirstPage();\n\t\tfill(k.getLocation(), getvalue(1, 7, 0));\n\t\tfill(k.getHotel(), getvalue(1, 7, 1));\n\t\tfill(k.getRoomtype(), getvalue(1, 7, 2));\n\t\tfill(k.getRooms(), getvalue(1, 7, 3));\n\t\tfill(k.getIndate(), getvalue(1, 7, 4));\n\t\tfill(k.getOutdate(), getvalue(1, 7, 5));\n\t\tfill(k.getAdult(), getvalue(1, 7, 6));\n\t\tfill(k.getChild(), getvalue(1, 7, 7));\n\t\tclick(k.getSearch());\n\t}", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "@Then(\"^navigate to hotel page$\")\r\n\tpublic void navigate_to_hotel_page() throws Exception {\n\t\tdriver.navigate().to(\"file:///D:/complete%20training%20data/JEE/2018/Java%20Full%20Stack/Module%203/hotelBooking/hotelbooking.html\");\r\n\t\tThread.sleep(2000);\r\n\t//driver.close();\r\n\t}", "@Override\n\tpublic void goToUIPrestamo() {\n\t\tif(uiHomePrestamo!=null){\n\t\t\tif(!uiHomePrestamo.getModo().equals(\"HISTORIAL\")){\n\t\t\t\tuiHomePrestamo.getUIPrestamoImpl().sendPrestamoHistorial(beanPrestamo.getIdPrestamo());\n\t\t\t}\t\t\n\t\t\tuiHomePrestamo.getContainer().showWidget(0);\n\t\t\tuiHomePrestamo.getUIPrestamoImpl().cargarTabla();\n\t\t}else if(uiHomeCobranza!=null){\n\t\t\tuiHomeCobranza.getUIPrestamoImpl().sendPrestamoHistorial(beanPrestamo.getIdPrestamo());\n\t\t\tuiHomeCobranza.getContainer().showWidget(1);\n\t\t\tuiHomeCobranza.getUIPrestamoImpl().cargarPrestamoGestorCobranza();\n\t\t}\n\t\t\t\t\t\n\t}", "public void gotoReservaOneWay(){\n try {\n FXMLReservaOneWayController verReservaOW = (FXMLReservaOneWayController) replaceSceneContent(\"FXMLReservaOneWay.fxml\");\n verReservaOW.setApp(this);\n verReservaOW.setText(cityO, cityD, depDate);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Given(\"^That dante is in the flights page$\")\n\tpublic void thatDanteIsInTheFlightsPage() throws Exception {\n\t\tdante.wasAbleTo(OpenTheBrowser.on(viajesExitoHomePage));\n\t}", "@Given(\"^User is on the NetBanking landing page$\")\n\tpublic void user_is_on_the_NetBanking_landing_page() {\n\t\tSystem.out.println(\"User navigated to landing page\");\n\t}", "public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }", "HtmlPage clickSiteName();", "@Test //Index\n public void testPageNavigationAsUserIndex() {\n loginAsUser();\n\n vinyardApp.navigationCultureClick();\n final String expectedURL = \"http://localhost:8080/index\";\n final String result = driver.getCurrentUrl();\n assertEquals(expectedURL, result);\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }", "public String navigateAlunoTurmaList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"AlunoTurma_items\", this.getSelected().getAlunoTurmaList());\n }\n return \"/pages/prime/alunoTurma/index\";\n }", "public void goToMainMenuReservations() throws IOException {\n ApplicationDisplay.changeScene(\"/MainMenuReservations.fxml\");\n }", "@When ( \"I navigate to the Assign Prescription page\" )\r\n public void navigatePrescriptionOV () {\r\n ( (JavascriptExecutor) driver ).executeScript( \"document.getElementById('assignprescription').click();\" );\r\n }", "@Test(enabled = true)\n public void navigateToCarRental() {\n driver.findElement(By.cssSelector(\"a[href='?pwaLob=wizard-car-pwa']\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n WebElement rentalCar = driver.findElement(By.xpath(\"//button[@aria-label='Pick-up']\"));\n rentalCar.sendKeys(\"SBN\");\n rentalCar.sendKeys(Keys.ARROW_DOWN);\n rentalCar.sendKeys(Keys.ENTER);\n rentalCar.sendKeys(Keys.TAB);\n driver.findElement(By.xpath(\"//button[contains(text(),'Search')]\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n String expectedLocation = \"South Bend, IN (SBN-South Bend Intl.)\";\n String actualLocation = driver.findElement(By.linkText(\"South Bend, IN (SBN-South Bend Intl.)\")).getText();\n\n Assert.assertEquals(actualLocation, expectedLocation, \"Test Failed.\");\n\n }", "public void consult() throws Exception {\n\t// TODO Consult\n\ttry {\n\t String page = \"ume_unidade_medidaConsult.jsp\";// defina aqui a pagina que deve ser chamada\n\t getResponse().sendRedirect(page); \n\t} catch (Exception e){} \n }", "public void goToHome() throws IOException {\n\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"index.xhtml\");\n\t}", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "@Test\n\t\t public void testLocationOne() {\n\t\t \tdriver.get(\"http://mq-devhost-lm52.ihost.aol.com:9002/us/nj/upper-montclair/bellevue-ave-valley-rd\");\n\t\t \tAssertJUnit.assertEquals(Utils.getElementText(driver,PageLayoutSelectors.TOP_NAME),\"Bellevue Ave & Valley Rd\");\n\t\t }", "public void gotoInkomsten(View v){\n Intent inkomsten;\n inkomsten = new Intent(getBaseContext(),InkomstenActivity.class);\n startActivity(inkomsten);\n }", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "public void consult() throws Exception {\n // TODO Consult\n try {\n String page = \"pi_per_intConsult.jsp\";// defina aqui a p?gina que deve ser chamada\n getResponse().sendRedirect(page);\n } catch (Exception e) {\n }\n }", "public void navigateToWeb() throws Exception {\n\n server.setCurrentItem(1, HOME_URL);\n\n // Navegate to HOME_URL address\n browser.navigate(HOME_URL);\n\n //Tihis command is uses to make visible in the desktop the page (IExplore issue)\n if (browserType.equals(\"IE\")) {\n client.clickOnCenter();\n client.pause(3000);\n }\n\n By lName = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[1]/td/div/input\");\n By dob = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[2]/td/div/input\");\n By accNumber = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[3]/td/div/input\");\n By sortCd = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[4]/td/div/input\");\n By pCode = By.xpath(\"/html/body/div/div/div[1]/form/table/tbody/tr[5]/td/div/input\");\n browser.textFieldSet(lName,lastName,true);\n browser.textFieldSet(dob,dateOfBirth,true);\n browser.textFieldSet(accNumber,accountNumber,true);\n browser.textFieldSet(sortCd,sortCode,true);\n browser.textFieldSet(pCode,postCode,true);\n\n browser.clickOnElement(By.xpath(\"/html/body/div/div/div[1]/form/div/input\"));\n\n By message = By.id(\"message\");\n\n boolean isMessageExists = browser.existsElement(message);\n\n if(!isMessageExists) {\n\n By tableId = By.id(\"customer\");\n WebElement table = browser.getElement(tableId);\n\n List<WebElement> th = table.findElements(By.tagName(\"th\"));\n\n int lastNamePos = 0;\n int postCodePos = 0;\n int dobPos = 0;\n int accountNoPos = 0;\n int sortCodePos = 0;\n\n for (int i = 0; i < th.size(); i++) {\n if (\"Last Name\".equalsIgnoreCase(th.get(i).getText())) {\n lastNamePos = i + 1;\n } else if (\"Date of Birth\".equalsIgnoreCase(th.get(i).getText())) {\n dobPos = i + 1;\n } else if (\"Account Number\".equalsIgnoreCase(th.get(i).getText())) {\n accountNoPos = i + 1;\n } else if (\"Sort Code\".equalsIgnoreCase(th.get(i).getText())) {\n sortCodePos = i + 1;\n } else if (\"Post Code\".equalsIgnoreCase(th.get(i).getText())) {\n postCodePos = i + 1;\n }\n }\n\n List<WebElement> lastNameElements = table.findElements(By.xpath(\"//tr/td[\" + lastNamePos + \"]\"));\n List<WebElement> dobElements = table.findElements(By.xpath(\"//tr/td[\" + dobPos + \"]\"));\n List<WebElement> accountElements = table.findElements(By.xpath(\"//tr/td[\" + accountNoPos + \"]\"));\n List<WebElement> sortCodeElements = table.findElements(By.xpath(\"//tr/td[\" + sortCodePos + \"]\"));\n List<WebElement> postCodeElements = table.findElements(By.xpath(\"//tr/td[\" + postCodePos + \"]\"));\n\n for (int i = 0; i < lastNameElements.size(); i++) {\n WebElement e = lastNameElements.get(i);\n if (e.getText().trim().equalsIgnoreCase(lastName)) {\n if (dobElements.get(i).getText().trim().equalsIgnoreCase(dateOfBirth)\n && accountElements.get(i).getText().trim().equalsIgnoreCase(accountNumber)\n && sortCodeElements.get(i).getText().trim().equalsIgnoreCase(sortCode)\n && postCodeElements.get(i).getText().trim().equalsIgnoreCase(postCode)) {\n resultMap.put(\"matchFound\", \"true\");\n break;\n }\n }\n }\n } else\n resultMap.put(\"matchFound\", \"false\");\n\n\n }", "public void goHome();", "@When(\"^Navigate to \\\"([^\\\"]*)\\\" Site$\")\r\n\tpublic void navigate_to_Site(String arg1) throws Throwable {\n\t\tdriver = DriverManager.getDriver();\r\n\t\tdriver.get(arg1);\r\n\t\tSystem.out.println(\"Launched Mercury Tours Site\");\r\n\r\n\t}", "public void gotoHome(){ application.gotoHome(); }", "public void clickPresselGermany(){\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:- PresselGermany link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"lnkPresselGermany\"));\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- PresselGermany link is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- PresselGermany link is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkPresselGermany\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\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}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }", "HtmlPage clickLink();", "@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }", "HtmlPage clickSiteLink();", "private void goToLandingPage() {\r\n Intent intent = LandingPage.getIntent(MainActivity.this);\r\n intent.putExtra(LandingPage.USERNAME_EXTRA, userText.getText().toString());\r\n startActivity(intent);\r\n }", "public void openUltimateQAPage() {\n\t\tdriver.get(\"https://courses.ultimateqa.com/users/sign_in\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\r\n\t}", "public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "public Dist_Germany_HomePage clickbsrBackBtn() throws Throwable {\n\t\ttry {\n\t\t\tclickBrowserBackButton();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new Dist_Germany_HomePage();\n\t}", "protected void navigateToBillingAccount(String masterPolicyNumber) {\n String billingAccountNumber = getBillingAccountNumber(masterPolicyNumber);\n LOGGER.info(\"Navigate to Billing Account #\" + billingAccountNumber);\n\n MainPage.QuickSearch.search(billingAccountNumber);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"2\");\n startActivity(intent);\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 navigateToTaxonomyPage(String appname){\n\trefApplicationGenericUtils.clickOnElement(objectRepository.get(\"GlobalElements.FeaturedArticle\"), \"Featured Article\");\n\t\t\n\t// Verify if sectional Tag is displayed.\n\trefApplicationGenericUtils.checkForElement(objectRepository.get(\"ArticlePageElements.Tag\"), \"Tag\");\n\t\n\t\n\t//Click on the tag.\n\trefApplicationGenericUtils.clickOnElement(objectRepository.get(\"ArticlePageElements.Tag\"), \"Tag\");\n\t\n\t//Scroll till the news letter Signup.\n\tsubscribeNewsLetter();\n\n\t}", "@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}", "public LandingPage navigateToApplication(){\n\t\tString url = action.getProperties(\"URL\");\n\t\taction.OpenURl(url).Waitforpageload();\n\t\treturn this;\n\t}", "public String gotoPage() {\n return FxJsfUtils.getParameter(\"page\");\n }", "public void avvia() {\n super.avvia();\n this.getNavigatore(CHIAVE_NAV).avvia();\n }", "public void goToHome() {\n navController.navigate(R.id.nav_home);\n }", "@When(\"^the user open Automation Home page$\")\r\n\tpublic void the_user_open_Automation_Home_page() throws Throwable {\n\t w.Homepage1();\r\n\t}", "private void switchTo(String pageValue) {\n\t\tthis.fenetre.getCardLayout().show(this.fenetre.getContentPane(), pageValue);\n\t}", "public void gotoReservaRoundTrip(){\n try {\n FXMLReservaRoundTripController verReservaRT = (FXMLReservaRoundTripController) replaceSceneContent(\"FXMLReservaRoundTrip.fxml\");\n verReservaRT.setApp(this);\n verReservaRT.setText(cityO, cityD, depDate, depDate2);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Given(\"^user in the home page of Southall travel$\")\n public void user_in_the_home_page_of_Southall_travel() throws Throwable {\n }", "public void navigateTo() {\n LOGGER.info(\"Navigating to:\" + BASE_URL);\n driver.navigate().to(BASE_URL);\n }", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "@Test\n @When(\"I navigate to Market\")\n public void s04_MarketOpen(){\n WebElement marketLink = driver.findElementByLinkText(\"Маркет\");\n marketLink.click();\n System.out.println(\"Step04 PASSED\");\n }", "public void clickOnExploreEuropeLink() throws Exception {\n\t\tif (TestBase.flag_Mob) {\n\t\t\tscrollDown();\n\t\t\tclickUsingJavaScript(HomePageLocators.getExploreEuropeLnk());\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public void clickOnHome() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_home\");\n\t\twait.waitForElementToBeClickable(element(\"link_home\"));\n\t\texecuteJavascript(\"document.getElementById('doctor-home').getElementsByTagName('i')[0].click();\");\n//\t\t element(\"link_home\").click();\n\t\tlogMessage(\"user clicks on Home\");\n\t}", "public void consult() throws Exception {\n\t// TODO Consult\n\ttry {\n\t String page = \"con_contadorConsult.jsp\";// defina aqui a p?gina que deve ser chamada \n\t getResponse().sendRedirect(page); \n\t} catch (Exception e){} \n }", "@Then(\"^choose mumbai location$\")\r\n\tpublic void choose_mumbai_location() throws Exception {\n\t\t\t\t\tWebElement location_bms = wait.until(ExpectedConditions.visibilityOfElementLocated(uimap.getLocator(\"Select_location\")));\r\n\t\t\t\t\tlocation_bms.click();\r\n\t\t\t// Click on the No Thanks \r\n\t\t\t\t\t\r\n\t\t\t\t\tWebElement alert_btn = wait.until(ExpectedConditions.visibilityOfElementLocated(uimap.getLocator(\"Alert_Btn\")));\r\n\t\t\t\t\talert_btn.click();\r\n\t\t\t// Click on the Movies \r\n\t\t\t\t\tWebElement movies_link = driver.findElement(uimap.getLocator(\"Movies_Link\"));\r\n\t\t\t\t\tmovies_link.click();\r\n\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}", "public TuzlaPage clickTuzlaLink() {\n\t\t\n\t\tdriver.findElement(tuzlaLink).click();\n\t\treturn new TuzlaPage(driver);\n\t}", "@When(\"^the user open the Parabank Registration page$\")\r\n\tpublic void the_user_open_the_Parabank_Registration_page() throws Throwable {\n\t getUrl();\r\n\t}", "public void navigateToHomePage() {\n\t\n\t\t\tScreenShot screen = new ScreenShot();\n\n\t\t\t// Utilize the driver and invoke the chrome browser\n\t\t\tdriver.get(\" https://www.progressive.com/\");\n\t\t\tdriver.manage().window().maximize();\n\n\t\t\t// Wait for page to be loaded\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t\t// Take a Screenshot\n\t\t\tscreen.takeSnapShot(driver, \"Progressive Insurance HomePage\");\n\t\t\t\n\t\t\tclickAutoInsurance();\t\n\t\t\n\t\t}", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "public KPAUIHealthPlansPage openHealthPlansPage(){\n getShopHealthPlansLink().click();\n return new KPAUIHealthPlansPage(driver);\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "private void showUI(HttpServletRequest req, HttpServletResponse resp, String pageName) throws ServletException, IOException{\n\t\tGetPageByName pagecontroller = new GetPageByName();\n\t\tPage page = pagecontroller.getPageByName(pageName,currentProject.getProjectID());\n\t\treq.setAttribute(\"Page\", page);\n\t\t/*\n\t\t * Translation Code???\n\t\t * \n\t\t */\n\t\t\n\t\t// Display UI\n\t\treq.getRequestDispatcher(\"/_view/pages.jsp\").forward(req,resp);\t\t\t\n\t}", "public static void Goto()\n\t{\n\t\tUserLogin.Login();\n\t\t\t\t\n\t\t//Choose community\n\t\tWebElement Community= Driver.Instance.findElement(PageObjRef.CommunityTab);\n\t\tCommunity.click();\n\t\tWebElement CommunityToJoin= Driver.Instance.findElement(PageObjRef.CommunityToJoin);\n\t CommunityToJoin.click();\n\t\t\n\t}", "@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}", "public static void goTo() {\n\tBrowser.instance.findElement(maintenanceMenu).click();\r\n\tWebElement element = Browser.instance.findElement(By.linkText(\"Tender and Bag Maintenance\"));\r\n Actions action = new Actions(Browser.instance);\r\n action.moveToElement(element).build().perform(); \r\n Browser.instance.findElement(By.linkText(\"Bag Types\")).click();\r\n // WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n//\tBrowser.instance.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n}", "@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 String next() {\r\n\t\treturn \"/private/admin/Aktienbestaetigung?faces-redirect=true\";\r\n\t}", "@Override\n public void onClick(View v) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.forecast_io_url)));\n startActivity(browserIntent);\n }", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static void navigateToAboutYou() throws Exception{\t\r\n\t\ttestInfo.log(Status.INFO, \"Navigate to About You page\");\r\n\t\tIWanna.waitForElement(\"linkTermsAndConditions\", 10);\r\n\t\tIWanna.click(\"linkTermsAndConditions\");\r\n\t\tIWanna.wait(1);\r\n\t\tIWanna.click(\"btnDone\"); \r\n\t\tIWanna.click(\"cbAcceptTerms\");\r\n\t\tIWanna.click(\"btnContinue\");\r\n\t\tIWanna.waitForElement(\"aboutYouHeader\", 5);\r\n\t\tscreenShotPath = Executor.capture();\r\n\t\tif (IWanna.isElementPresent(\"aboutYouHeader\")){\t\t\t\r\n\t\t\ttestInfo.log(Status.PASS, \"Navigation to About You page was successful. \" + testInfo.addScreenCaptureFromPath(screenShotPath));\r\n\t\t\tdriver.switchTo().defaultContent();\r\n\t\t}\r\n\t\telse{\r\n\t\t\ttestInfo.log(Status.FAIL, \"Navigation to About You page failed. \" + testInfo.addScreenCaptureFromPath(screenShotPath));\r\n\t\t}\t\r\n\t\tAssert.assertTrue(driver.findElement(By.xpath(pro.getProperty(\"aboutYouHeader\"))).isDisplayed());\t\t\t\t\t\t\r\n\t}", "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 }", "@When ( \"I navigate to the HCP personal representatives page\" )\n public void goToRepsPageHCP () throws InterruptedException {\n driver.get( baseUrl + \"/hcp/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\n }", "public KPAUIFindADoctorLandingPage openDoctorsAndLocationsPage(){\n getFindDocsAndLocationsLink().click();\n return new KPAUIFindADoctorLandingPage(driver);\n }", "void navigateToOrderingCoffee() {\n Intent gotoOrderCoffee = new Intent(this, OrderingCoffeeActivity.class);\n startActivity(gotoOrderCoffee);\n }", "public void testExamplePage() throws Exception\n\t{\n\t\tWebNavigator nav = new WebNavigator();\n\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().deep().id(\"randomLink\").activate();\n\n\t\t// Same as above, but the search for id \"randomLink\" starts at the page\n\t\t// level\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().id(\"randomLink\").activate();\n\n\t\t// Gets the first element whose id matches starts with \"random\" and\n\t\t// attempts to activate it.\n\t\t// Note that if we had, say, a BR tag earlier in the page that had an id\n\t\t// of \"randomBreak\",\n\t\t// the navigation would attempt to activate it and throw an exception.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().pattern().id(\"random.*\").activate();\n\n\t\t// Search for the anchor by href. Here you assume that the href will\n\t\t// always be \"goRandom.html\".\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().href(\"goRandom.html\").activate();\n\n\t\t// Do a step-by-step navigation down the dom. This assumes a lot about\n\t\t// the page layout,\n\t\t// and makes for a very brittle navigation.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().div().id(\"section1\").children().div().id(\"subsectionA\").children().a().activate();\n\n\t\t// Do a deep search for an anchor that contains the exact text \"Click\n\t\t// here to go a random location\"\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().text(\"Click here to go a random location\").activate();\n\n\t\t// Do a deep search for an anchor whose text contains \"random\" at any\n\t\t// point.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().pattern().text(\".*random.*\").activate();\n\t}", "@Then(\"I land on datepicker page\")\n public void i_land_on_datepicker_page() {\n System.out.println(\" landing page\");\n }" ]
[ "0.6321176", "0.62929964", "0.5995705", "0.5961209", "0.5942742", "0.5888092", "0.5784795", "0.57190776", "0.5711328", "0.5697535", "0.5659104", "0.5591873", "0.5589734", "0.5581725", "0.55676234", "0.55545735", "0.5545063", "0.55416477", "0.55212873", "0.5502393", "0.5496085", "0.5477729", "0.5467752", "0.54567933", "0.54442996", "0.5427849", "0.5423358", "0.5422508", "0.54206663", "0.5419737", "0.54096115", "0.53761363", "0.53757966", "0.537253", "0.5370041", "0.5362093", "0.5357477", "0.53525203", "0.53514713", "0.53496784", "0.5347531", "0.5343862", "0.53250873", "0.53226155", "0.5320346", "0.5316486", "0.5314403", "0.5310464", "0.5304852", "0.5299417", "0.52945423", "0.52865195", "0.5275687", "0.5273895", "0.5271426", "0.5267471", "0.52508277", "0.5243832", "0.5240235", "0.5234304", "0.52337813", "0.5233553", "0.52316695", "0.5231555", "0.5227084", "0.52217245", "0.5199894", "0.51952904", "0.5186", "0.5181264", "0.5178753", "0.5178127", "0.5177822", "0.5172155", "0.51694447", "0.5152187", "0.51477957", "0.51469177", "0.51438266", "0.5131089", "0.51253486", "0.5117859", "0.51172", "0.5116691", "0.51142865", "0.50961626", "0.50924546", "0.509199", "0.509062", "0.5088836", "0.50887585", "0.5086689", "0.5084952", "0.5082428", "0.50781804", "0.50775504", "0.5072964", "0.50667846", "0.50654256", "0.5057688" ]
0.54057235
31
Navigate to Digits/MatchesDiffers page
public static void NavigateToDigitsMatchesDiffers(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Digits(driver).click(); Trade_Page.link_MatchesDiffers(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findMatches() {\n this.user.getMatches().clear();\n final String HOST_MATCH = HOST_URL + \"/match/\" + user.getId() + \"/?page=0\" + HomeView.MATCH_LIMIT;\n RequestQueue que = Volley.newRequestQueue(this);\n JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, HOST_MATCH, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try { //String id, String firstName, String lastName, String email) {\n MatchView.parseEdges(response.getJSONArray(\"matches\"), toBeMatched);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"HomeView\", \"Could not find matches\");\n }\n });\n que.add(req);\n }", "private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }", "public void displayReceivedRewards() {\n ;////System.out.println(\"\");\n ;////System.out.println(\"displayReceivedRewards() called...\");\n ;////System.out.println(\"-playerModelDiff1: \" + playerModelDiff1.toString());\n ;////System.out.println(\"-playerModelDiff4: \" + playerModelDiff4.toString());\n ;////System.out.println(\"-playerModelDiff7: \" + playerModelDiff7.toString());\n }", "@RequestMapping(value=\"/league/results\", method = RequestMethod.GET)\n\tpublic String navigateToPage(UserSubscription subscription) {\n\t\t\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Rendering results view of league with code: {} for user ID: {}\",\n\t\t\t\t\t\t subscription.getLeague().getCode(),\n\t\t\t\t\t\t subscription.getUser().getId());\n\t\t}\n\t\t\n\t\treturn \"allResults\";\n\t}", "private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }", "private void verifyFlightNumbers(SearchResultsPage searchResultsPage) throws Exception {\n\t\t// Determine the total number of flights from the Search Results page\n\t\t// Each leg of the trip can either be a non-stop or have 1 stop\n\t\tint iTotalNumberFlightsSearchResultsPage = 0;\n\t\tint[] iFlightsPerLeg = searchResultsPage.getSavedNumberFlightsPerLeg();\n\t\tfor (int i : iFlightsPerLeg) {\n\t\t\tiTotalNumberFlightsSearchResultsPage += i;\n\t\t}\n\n\t\t// determine the total number of flights from the Payments page\t\n\t\tList <WebElement> allFlightNumbersList = getElements(allFlightNumbers, \"XPATH\"); // get all flight number locators\n\t\tint iTotalNumberFlightsPaymentPage = allFlightNumbersList.size();\n\n\t\t// check that the Search Results page and the Payments page have the same number of flights\n\t\tif (iTotalNumberFlightsPaymentPage != iTotalNumberFlightsSearchResultsPage)\n\t\t\tlog.debug(\"Number of flights on the 2 pages are not equal. FlightsSearchResultsPage = \" + iTotalNumberFlightsSearchResultsPage +\n\t\t\t\t\t\" FlightsPaymentPage = \" + iTotalNumberFlightsPaymentPage);\n\n\t\t// now check that the individual flight numbers are the same\n\t\t// SRP = Search Results page PP = Payments page\n\t\tList<String> flightNumbersSRP = searchResultsPage.getSavedFlightNumbers();\n\t\tfor (int i = 0; i < iTotalNumberFlightsPaymentPage; i++) {\n\t\t\tString sFlightNumberSRP = flightNumbersSRP.get(i); // a specific SRP flight number\n\t\t\t// each element's original text looks similar to this: \" American Airlines 1234 \"\n\t\t\tString shortenedFlightNumber = allFlightNumbersList.get(i).getText().trim(); // now it looks like: \"American Airlines 1234\"\n\t\t\tint lastBlank = shortenedFlightNumber.lastIndexOf(\" \");\n\t\t\tString sFlightNumberPP = shortenedFlightNumber.substring(lastBlank + 1); // flight number begins one character after the last blank\n\t\t\tif (sFlightNumberSRP.equals(sFlightNumberPP))\n\t\t\t\tlog.debug(\"Flight number is a match\");\t\n\t\t\telse\n\t\t\t\tlog.debug(\"Flight number is NOT a match\");\n\t\t}\n\t\tlog.info(\"verifyFlightNumbers() completed\");\n\t}", "public void printDistance()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar, new DistanceCompare());//sort by distance\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tRobot r=it.next();\n\t\t\tSystem.out.println(i+\". \"+r.getName()+\" distance \"+r.getDistance());\n\t\t\ti++;\n\t\t}\n\t}", "@Test\n\tpublic void Login()\n\t{\n\t\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\work\\\\chromedriver.exe\");\n\tWebDriver d = new ChromeDriver();\n\t\n\td.get(\"https://mail.rediff.com/cgi-bin/login.cgi\");\n\t\n\tRediffLoginPagePOF rl = new RediffLoginPagePOF(d);\n\trl.User().sendKeys(\"hello\");\n\trl.Password().sendKeys(\"hello\");\n\t//rl.Go().click();\n\trl.Home().click();\n\t\n\tRediffHomePage rh = new RediffHomePage(d);\n\trh.Searchtext().sendKeys(\"books\");\n\trh.Searchbtn().click();\n\tSystem.out.println(\"text1\");\n\tSystem.out.println(\"branch1\");\n\t\n\t\t\n\t\n\t\n\t}", "private void goToDetailedRune()\n\t{\n\t\tLog.e(\"before pages\", String.valueOf(player.getSummonerID()));\n\t\tRunePages tempPages = player.getPages().get(String.valueOf(player.getSummonerID()));\n\t\tLog.e(\"after pages\", String.valueOf(tempPages.getSummonerId()));\n\t\tSet<RunePage> tempSetPages = tempPages.getPages();\n\t\tRunePage currentPage = new RunePage();\n\t\tfor (RunePage tempPage : tempSetPages)\n\t\t{\n\t\t\tif (tempPage.getName() == player.getCurrentRunePage())\n\t\t\t{\n\t\t\t\tLog.e(\"temp page\", \"page found\");\n\t\t\t\tcurrentPage = tempPage;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// now we have the page, need to get the runes out of it\n\t\tList<RuneSlot> tempSlots = currentPage.getSlots();\n\t\tArrayList<Integer> tempIDs = new ArrayList<Integer>();\n\t\tLog.e(\"tempSlots size\", String.valueOf(tempSlots.size()));\n\t\tfor (int i = 0; i < tempSlots.size(); i++)\n\t\t{\t\n\t\t\tLog.e(\"tempSlot\", String.valueOf(tempSlots.get(i).getRune()));\n\t\t\ttempIDs.add(tempSlots.get(i).getRune());\n\t\t}\n\t\tfillRuneList(tempIDs);\n\t\t// go to the screen\n\t\tIntent intent = new Intent(activity, RuneDetailActivity.class);\n\t\tactivity.startActivity(intent);\n\t}", "float getMatch();", "public double matchingUpdate(String title) {\n\n double matching = 0.0;\n double num = 0.0;\n double denom = 0.0;\n\n ArrayList<Configuration> gameConf = MainModel.getInstance().getConfigurationsFromGame(title);\n\n for(Configuration conf : gameConf) {\n\n if(conf.getSelected()) {\n\n if (! conf.getVocalActions().isEmpty() && conf.getModel() == null) {\n denom++;\n }\n\n for (Link link : conf.getLinks()) {\n\n Log.d(\"MATCHING_UPDATE\", \"Link: \" + link.getEvent().getName());\n\n if (link.getAction() == null) {\n\n Log.d(\"MATCHING_UPDATE\", \"Dentro if di Link\");\n denom++;\n\n }\n else {\n\n Log.d(\"MATCHING_UPDATE\", \"Dentro else di Link\");\n num++;\n denom++;\n }\n }\n }\n }\n\n if(denom > 0.0) {\n matching = num / denom;\n\n }\n else {\n matching = 0.0;\n }\n\n Log.d(\"MATCHING_UPDATE\", title+\" num: \"+num+\" denom: \"+denom);\n return matching;\n\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "Match getTeam1LooserOfMatch();", "public FindLeadsPage clickFindLeads() {\n\t\tclick(eleFindLead);\r\n\t\treturn new FindLeadsPage();\r\n\t}", "@GET(\"match\")\n Call<Matches> getMatches();", "private void handleCompareButtonPressed() {\n parseData(data);\n\n // Reset the \"Found\" parameter for all registered device as \"false\".\n resetAllFound();\n\n // Check if each received MAC address maps to a registered BLE device.\n BLEdevice device;\n for (int i = 0; i < MAC_Addresses.size(); i++) {\n device = regDevice_list.get( MAC_Addresses.get(i) );\n if(device != null) {\n device.Found();\n }\n }\n\n // Shows comparison result in CompareResultActivity\n startActivity(new Intent(this, CompareResultActivity.class));\n }", "private void displayResults(@Nullable final String SSID, @Nullable final String password) {\n mRecognitionTimeoutAnimation.cancel();\n\n stopRecognition();\n if (mAllPasswords.isEmpty()) {\n // There is nothing to display or select. Show a dialog\n new MaterialDialog.Builder(this)\n .title(R.string.dialog_no_passwords_found_title)\n .content(R.string.dialog_no_passwords_found_message)\n .neutralText(R.string.try_again)\n .onNeutral(new MaterialDialog.SingleButtonCallback() {\n @Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n rescan();\n }\n })\n .show();\n return;\n }\n\n if (SSID != null && password != null) {\n mMatchStatusTextView.setText(R.string.match_status_network_detected);\n } else {\n mMatchStatusTextView.setText(R.string.match_status_nothing_found);\n }\n\n populateSSIDSpinner(SSID);\n populatePasswordSpinner(password);\n\n if (!mSSIDs.isEmpty() && !mAllPasswords.isEmpty()) {\n // Make sure, to only connect when there both pickers have values\n mConnectButton.setVisibility(View.VISIBLE);\n mConnectButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n connectToNetwork();\n }\n });\n } else {\n mConnectButton.setVisibility(View.GONE);\n }\n\n mEditButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n editPassword();\n }\n });\n\n mCopyButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n copyToClipboard();\n }\n });\n\n showMatchView();\n }", "Match getMatches();", "Match getTeam2LooserOfMatch();", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n try {\n List<Entity> reviewees = Match.getNotMatchedUsers(\"Reviewee\");\n List<Entity> reviewers = Match.getNotMatchedUsers(\"Reviewer\");\n Match.match(reviewees, reviewers);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n response.sendRedirect(\"/index.html\");\n }", "public void gotoVideoLandingPage(){\r\n\t\twebAppDriver.get(baseUrl+\"/videos.aspx\");\r\n\t\t//need to add verification text\r\n\t}", "public int numMatches();", "public void testMainPage() {\n\t\tbeginAt(\"numguess.jsp\");\n\t\tassertTitleEquals(\"Number Guess\");\n\t\tassertTextPresent(\"Welcome to the Number Guess game\");\n\t\tassertFormElementPresent(\"guess\");\t\t\n\t}", "public static ResponseDataObject<MatchEntity> getListLiveMatches()\n {\n ResponseDataObject responseDataObject = new ResponseDataObject();\n List<MatchEntity> listLiveMatches = new ArrayList<>();\n\n // Load Document\n Document document = null;\n try\n {\n document = HTMLRequestManager.getData(REQUEST_URL);\n\n // Set Response Code\n if(document != null && document.hasText())\n {\n // Response OK\n responseDataObject.setResponseCode(ResponseDataObject.RESPONSE_CODE_OK);\n } else\n {\n // Response Failed\n responseDataObject.setResponseCode(ResponseDataObject.RESPONSE_CODE_FAILED_GETTING_DOCUMENT);\n }\n\n }\n catch (IOException e)\n {\n LogUtil.e(TAG, e.getMessage(), e);\n\n // Response Falied\n responseDataObject.setResponseCode(ResponseDataObject.RESPONSE_CODE_FAILED_GETTING_DOCUMENT);\n }\n\n\n // Parse Data\n if(responseDataObject.isOk())\n {\n responseDataObject.setListObjectsResponse(parseLiveMatchDocumentToListMatches(document));\n }\n\n return responseDataObject;\n }", "private void printingSearchResults() {\n HashMap<Integer, Double> resultsMap = new HashMap<>();\n for (DocCollector collector : resultsCollector) {\n if (resultsMap.containsKey(collector.getDocId())) {\n double score = resultsMap.get(collector.getDocId()) + collector.getTermScore();\n resultsMap.put(collector.getDocId(), score);\n } else {\n resultsMap.put(collector.getDocId(), collector.getTermScore());\n }\n }\n List<Map.Entry<Integer, Double>> list = new LinkedList<>(resultsMap.entrySet());\n Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>() {\n public int compare(Map.Entry<Integer, Double> o1,\n Map.Entry<Integer, Double> o2) {\n return (o2.getValue()).compareTo(o1.getValue());\n }\n });\n if (list.isEmpty())\n System.out.println(\"no match\");\n else {\n DecimalFormat df = new DecimalFormat(\".##\");\n for (Map.Entry<Integer, Double> each : list)\n System.out.println(\"docId: \" + each.getKey() + \" score: \" + df.format(each.getValue()));\n }\n\n }", "private void getcompareResults(String concept, HttpServletResponse resp) {\n\t\ttry {\n\t\t\tList<JSONObject> js = SparqlEvaluator.getInstance().getRelation(\n\t\t\t\t\tconcept);\n\t\t\tIterator<JSONObject> itr = js.iterator();\n\t\t\tSystem.out.println(\"Size of list :: \" + js.size());\n\n\t\t\tresp.setContentType(\"text/html; charset=UTF-8\");\n\n\t\t\tString dset = \"dbpedia\";\n\n\t\t\tresp.getWriter().print(\"{\\\"bindings\\\": [\");\n\n\t\t\t// resp.getWriter().println(\"Response from Servlet\"+js.size());\n\t\t\tboolean first = true;\n\t\t\tint count = 1;\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tif (!first) {\n\t\t\t\t\tresp.getWriter().print(\",\");\n\t\t\t\t}\n\t\t\t\tfirst = false;\n\t\t\t\tresp.getWriter().print(itr.next().toString());\n\t\t\t\tSystem.out.println(count++);\n\t\t\t}\n\t\t\tSystem.out.println(\"After loop\");\n\t\t\tresp.getWriter().print(\"]}\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void printMatch(){\n nameHomelbl.setText(match.getHomeTeam().getName());\n cittaHomelbl.setText(match.getHomeTeam().getCity());\n nameGuestlbl.setText(match.getGuestTeam().getName());\n cittaGuestlbl.setText(match.getGuestTeam().getCity());\n if(match.getPlayed()) {\n pointsHometxt.setText(String.valueOf(match.getPointsHome()));\n pointsGuesttxt.setText(String.valueOf(match.getPointsGuest()));\n } else {\n pointsHometxt.setText(\"-\");\n pointsGuesttxt.setText(\"-\");\n }\n \n try{\n logoGuestlbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getGuestTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n logoHomelbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getHomeTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n \n } catch (IOException ex){\n System.out.println(\"immagine non esistente\");\n JOptionPane.showMessageDialog(null, \"immagine non esistente\");\n }\n }", "@Test\n\tvoid getResultsTest() {\n\t\tassertEquals(22, utilities.getResults(-21));\n\t\tassertEquals(20, utilities.getResults(-20));\n\t\tassertEquals(40, utilities.getResults(-19));\n\t\tassertEquals(38, utilities.getResults(-18));\n\t\tassertEquals(22, utilities.getResults(21));\n\t\tassertEquals(20, utilities.getResults(20));\n\t\tassertEquals(22, utilities.getResults(2));\n\t\tassertEquals(22, utilities.getResults(1));\n\t}", "public void getMatchHistoryForPlayer(final long account_id, final int num_results, final APICallback callback){\n String url = STEAM_API_BASE_URL + GET_MATCHES + \"?\" + STEAM_API_KEY_PARAMETER + mContext.getResources().getString(R.string.steam_api_key) +\n \"&\" + ACCOUNT_ID + convert64IdTo32(account_id);\n if(num_results > 0){\n url += \"&\" + MATCHES_REQEUSTED_NUMBER + num_results;\n }\n Log.d(TAG, \"getMatchHistoryForPlayer: request url = \" + url);\n final List<HistoryMatch> matchList = new ArrayList<>();\n JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>()\n {\n @Override\n public void onResponse(JSONObject response) {\n // display response\n Log.d(\"Response\", response.toString());\n Gson gson = new Gson();\n MatchHistoryResults.MatchHistory results = gson.fromJson(response.toString(), MatchHistoryResults.MatchHistory.class);\n if(results.getResult().getMatches() != null) {\n matchList.addAll(results.getResult().getMatches());\n }\n Log.d(TAG, \"onResponse: \" + results.getResult().getNum_results());\n\n if(results.getResult().hasMorePagedResults()){\n getMatchHistoryForPlayer(account_id, num_results, results.getResult().getLastMatchId() - 1, 0, callback);\n }\n else{\n callback.onMatchHistoryResponse(matchList);\n }\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \" getMatchHistoryForPlayer Error.Response\");\n error.printStackTrace();\n }\n }\n );\n\n// add it to the RequestQueue\n mRequestQueue.add(getRequest);\n }", "public void rankMatches();", "public static void main(String[] args) {\n\n\t\tCompareNumberTest cn = new CompareNumberTest();\n\t\t\n\t\t\n\t\t\n\t\t\n//\t\tint x = 4;\n//\t\tint y = 2;\n//\t\t\n//\t\tint result = cn.compareNumDiff(x, y);\n//\t\t\n//\t\tSystem.out.println(result);\n//\t\t\n\t\t\n\t}", "private static void showMatchedDeckInfo() {\n }", "public static void main(String[] args) {\n\t\tWebDriver driver = new InternetExplorerDriver();\r\n\t\t\r\n\t\t\r\n\t\tdriver.get(\"http://www.rediff.com/\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\t\t\t\r\n\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='signin_info']\")).click();\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='login1']\")).sendKeys(\"username\");\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='password']\")).sendKeys(\"password\");\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit']\")).click();\r\n\t}", "public void printOtherPlayersInfo(Match match, String nickname) {\n try {\n ArrayList<Player> otherPlayers = match.getOtherPlayers(nickname);\n for (Player player : otherPlayers) {\n System.out.println(player.getNickname());\n System.out.println(player.getNumOfToken());\n ShowScheme scheme = new ShowScheme(player.getScheme());\n System.out.println(\"\");\n chooseAction(match, nickname);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n System.out.println(\"Digita un carattere valido\");\n } catch (IndexOutOfBoundsException e) {\n }\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"View all teams\");\n\t\tSystem.out.println(teamData.viewTeams());\n\t\t\n\t\tSystem.out.println(\"Search by conference\");\n\t\tSystem.out.println(teamData.searchConference(\"AFC\"));\n\t\tSystem.out.println(teamData.searchConference(\"NFC\"));\n\t\t\n\t\tSystem.out.println(\"Search by division\");\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"West\"));\n\t\tSystem.out.println(teamData.searchDivision(\"NFC\", \"East\"));\n\t\t\n\t\tSystem.out.println(\"View team roster\");\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Bears\"));\n\t\tSystem.out.println(teamData.viewTeamRoster(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"List player data\");\n\t\tSystem.out.println(teamData.listPlayer(\"Romo\", \"Cowboys\"));\n\t\tSystem.out.println(teamData.listPlayer(\"Brady\", \"Patriots\"));\n\t\t\n\t\tSystem.out.println(\"List all match results\");\n\t\t//System.out.println(teamData.readMatchData()); //lists all match results for all weeks\n\t\t\n\t\tSystem.out.println(\"List match results by week\");\n\t\tSystem.out.println(teamData.viewMatchWeek(\"Week 5\"));\n\t\t\n\t\tSystem.out.println(\"View single team's match data\");\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Falcons\"));\n\t\tSystem.out.println(teamData.viewMatchByTeam(\"Cowboys\"));\n\t\t\n\t\tSystem.out.println(\"View Head to Head (team vs team)\");\n\t\tSystem.out.println(teamData.viewH2H(\"Patriots\", \"Dolphins\"));\n\t\tSystem.out.println(teamData.viewH2H(\"Panthers\", \"Eagles\"));\n\t\t\n\t\tSystem.out.println(\"View specific team wins\");\n\t\tSystem.out.println(teamData.viewTeamWins(\"Panthers\"));\n\t\t\n\t\tSystem.out.println(\"View specific team loses\");\n\t\tSystem.out.println(teamData.viewTeamLoses(\"Titans\"));\n\t\t\n\t\t//Haven't tested this fully\n\t\t//System.out.println(teamData.getTeamImage(\"Cowboys\"));\n\t}", "public void showDistanceCard(View view) {\n Profile profile = globals.getCurrentProfile();\n DatabaseHelper db = globals.getDB();\n globals.setCurrentProfile(profile);\n\n Intent intent = new Intent(this, DistanceCardActivity.class);\n startActivity(intent);\n\n }", "public void showDiff(String left, String right) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Show diff\");\n\n logger.debug(\"Left \" + left.getClass());\n logger.debug(\"Right \" + right.getClass());\n\n logger.debug(\"Left content \" + left);\n logger.debug(\"Right content \" + right);\n }\n\n int leftKey = left.hashCode();\n int rightKey = right.hashCode();\n\n File f1 = compareFiles.get(leftKey);\n File f2 = compareFiles.get(rightKey);\n\n try {\n if (f1 == null) {\n f1 = File.createTempFile(\"result_\", \".xml\");\n FileOutputStream fos = new FileOutputStream(f1);\n try {\n fos.write(((String)left).getBytes(\"UTF-8\"));\n } finally {\n fos.close();\n }\n compareFiles.put(leftKey, f1);\n }\n\n if (f2 == null) {\n f2 = File.createTempFile(\"expected_\", \".xml\");\n FileOutputStream fos2 = new FileOutputStream(f2);\n try {\n fos2.write(((String)right).getBytes(\"UTF-8\"));\n } finally {\n fos2.close();\n }\n\n compareFiles.put(rightKey, f2);\n } \n \n \n final URL url1 = f1.toURI().toURL();\n final URL url2 = f2.toURI().toURL();\n \n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n ((StandalonePluginWorkspace)pluginWorkspace).openDiffFilesApplication(url1, url2);\n }\n });\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void extracti10Index() {\r\n try {\r\n // utilizes the previously found table values from extractAllCitations\r\n // and adds result to outputResult\r\n if (!allMatches.isEmpty()) {\r\n format.Formatter(3, allMatches.get(5));\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error has occured in extracti10Index method\");\r\n }\r\n }", "public void ClickCommissionRatesPage() {\r\n\t\tcommissionrates.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Rates\\\" button on the Birthdays page\");\r\n\t}", "private void ViewMatching() {\n\t\t\n\t\ttx1 = (TextView) findViewById(R.id.k1);\n\t\ta1 = (TextView) findViewById(R.id.t1);\n\t\ta2 = (TextView) findViewById(R.id.t2);\n\t\ta3 = (TextView) findViewById(R.id.t3);\n\t\ta4 = (TextView) findViewById(R.id.t4);\n\t\ta5 = (TextView) findViewById(R.id.t5);\n\t\ta6 = (TextView) findViewById(R.id.t6);\n\t\ta7 = (TextView) findViewById(R.id.t7);\n\t\t\n\t\tc1 = (TextView) findViewById(R.id.n1);\n\t\tc2 = (TextView) findViewById(R.id.n2);\n\t\tc3 = (TextView) findViewById(R.id.n3);\n\t\tc4 = (TextView) findViewById(R.id.n4);\n\t\tc5 = (TextView) findViewById(R.id.n5);\n\t\tc6 = (TextView) findViewById(R.id.n6);\n\t\tc7 = (TextView) findViewById(R.id.n7);\n\t\t\n\t\t\n\t\tb1 = (Button) findViewById(R.id.ed);\n\t\tb2 = (Button) findViewById(R.id.ima);\n\t\n\t\tb1.setOnClickListener(this);\n\t\tb2.setOnClickListener(this);\n\t\t\n\t\tc1.setText(\"NAME : \");\n\t\tc2.setText(\"NICKNAME : \");\n\t\tc3.setText(\"CODE : \");\n\t\tc4.setText(\"SUB : \");\n\t\tc5.setText(\"TEL : \");\n\t\tc6.setText(\"E-MAIL : \");\n\t\tc7.setText(\"BUU : \");\n\t\t\n\t\tString p1 = getIntent().getStringExtra(\"dd1\");\n\t\tString p2 = getIntent().getStringExtra(\"dd2\");\n\t\tString p3 = getIntent().getStringExtra(\"dd3\");\n\t\tString p4 = getIntent().getStringExtra(\"dd4\");\n\t\tString p5 = getIntent().getStringExtra(\"dd5\");\n\t\tString p6 = getIntent().getStringExtra(\"dd6\");\n\t\tString p7 = getIntent().getStringExtra(\"dd7\");\n\t\t\n\t\t\n\t\tif(tx1!=null){\n\t\t\ttx1.setText(\"SUWAPHIT KETKUN\");\n\t\t\ta1.setText(\" Suwaphit Ketkun\");\n\t\t\ta2.setText(\" Kai\");\n\t\t\ta3.setText(\" 55410595\");\n\t\t\ta4.setText(\" Information Technology\");\n\t\t\ta5.setText(\" 088-5283660\");\n\t\t\ta6.setText(\" [email protected]\");\n\t\t\ta7.setText(\" Burapha University \");\n\t\t}\n\t\tif(p1!=null){\n\t\t\ta1.setText(p1);\n\t\t\ta2.setText(p2);\n\t\t\ta3.setText(p3);\n\t\t\ta4.setText(p4);\n\t\t\ta5.setText(p5);\n\t\t\ta6.setText(p6);\n\t\t\ta7.setText(p7);\n\n\t\t}\n\t\t\n\t}", "@Given(\"I am on the search results page\")\n\t\tpublic void i_am_on_the_search_results_page() {\n\t\t\t//I am on the results page\n\t\t\tdriver.get(ResultsUrl);\n\n\t\t}", "private ViewParameters findLink(Document hit, String freetext) {\n String pageno = hit.get(DocFields.PAGESEQ_START);\r\n if (pageno != null) {\r\n NavParams togo = new NavParams();\r\n togo.itemID = hit.get(\"identifier\");\r\n if (togo.itemID == null) {\r\n Logger.log.warn(\"Warning: identifier not found for \" + hit);\r\n togo.itemID = hit.get(\"itemID\");\r\n }\r\n togo.pageseq = Integer.parseInt(pageno);\r\n DarwinUtil.chooseBestView(togo, itemcollection);\r\n togo.viewID = FramesetProducer.VIEWID;\r\n\r\n togo.keywords = freetext;\r\n return togo;\r\n }\r\n else {\r\n RecordParams togo = new RecordParams(hit.get(\"identifier\"));\r\n return togo;\r\n }\r\n }", "@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "private void doMatch() {\n // Remember how many games in this session\n mGameCounter++;\n\n PebbleDictionary resultDict = new PebbleDictionary();\n\n switch (mChoice) {\n case Keys.CHOICE_ROCK:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n case Keys.CHOICE_PAPER:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN); // Inform Pebble of opposite result\n break;\n case Keys.CHOICE_SCISSORS:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n }\n break;\n case Keys.CHOICE_PAPER:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n case Keys.CHOICE_PAPER:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n case Keys.CHOICE_SCISSORS:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN);\n break;\n }\n break;\n case Keys.CHOICE_SCISSORS:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN);\n break;\n case Keys.CHOICE_PAPER:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n case Keys.CHOICE_SCISSORS:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n }\n break;\n }\n\n // Inform Pebble of result\n PebbleKit.sendDataToPebble(getApplicationContext(), APP_UUID, resultDict);\n\n // Finally reset both\n mChoice = Keys.CHOICE_WAITING;\n mP2Choice = Keys.CHOICE_WAITING;\n\n // Leave announcement for 5 seconds\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n updateUI();\n }\n\n }, 5000);\n }", "public void clickGetDirectionsButton() {\r\n\t\twebAppDriver.clickElementByXpath(btnGetDirectionsXpath);\r\n\t}", "private float matchingDegree(OntologyResult match) {\n switch (match) {\n case Exact:\n return 1.0f;\n case Subsumption:\n return 0.8f;\n case PlugIn:\n return 0.6f;\n case Structural:\n return 0.5f;\n case NotMatched:\n return 0.0f;\n default:\n return 0.0f;\n }\n }", "HtmlPage clickLink();", "int getPage();", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPage();", "public void sortMatches();", "@Test(dependsOnMethods=\"searchIngoogle\")\n public void captureTheResult() throws InterruptedException {\n driver.navigate().to(getURL);\n Thread.sleep(2000);\n String searchResult = Reusable_Library2.captureText(driver, \"//*[@id='result-stats']\", \"Search Results\");\n //split\n String[] arraySearch = searchResult.split(\" \");\n System.out.println(\"My search number is \" + arraySearch[1]);\n }", "public int getMatches() {\n\t\treturn matches;\n\t}", "@Then ( \"I should see (.+) as my personal representative\" )\n public void viewReps ( final String name ) throws InterruptedException {\n driver.get( driver.getCurrentUrl() );\n Thread.sleep( PAGE_LOAD );\n wait.until( ExpectedConditions.visibilityOfElementLocated( By.name( \"representativeMidCell\" ) ) );\n final WebElement cell = driver.findElement( By.name( \"representativeMidCell\" ) );\n wait.until( ExpectedConditions.textToBePresentInElement( cell, name ) );\n driver.findElement( By.id( \"logout\" ) ).click();\n }", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "private static List<MatchEntity> parseLiveMatchDocumentToListMatches(Document document)\n {\n List<MatchEntity> listMatches = new ArrayList<>();\n\n if(document != null)\n {\n\n switch (Urls.SOURCE_TYPE)\n {\n case LIVEFOOTBALLVIDEO:\n // Parser Ids\n final String SELECT_LIST_MATCHES = \"div#main div.listmatch li\"; // Should return a list of li.odd\n // Get Matches Elements\n Elements elements = document.select(SELECT_LIST_MATCHES);\n\n if(elements == null || elements.isEmpty())\n {\n // Cannot parrse Matches\n return listMatches;\n }\n\n // Complete each match\n for (Element element : elements)\n {\n try\n {\n listMatches.add(parseLiveMatchLineToMatchEntity(element));\n }\n catch (Exception e)\n {\n LogUtil.e(TAG, e.getMessage(), e);\n }\n }\n break;\n\n case LIVESPORTWS:\n final String selectMatches = \"ul.events li\";\n\n // Get Matches Elements\n elements = document.select(selectMatches);\n\n if(elements == null || elements.isEmpty())\n {\n // Cannot parrse Matches\n return listMatches;\n }\n\n for (Element element : elements)\n {\n try\n {\n listMatches.add(parseLiveMatchLineToMatchEntity(element));\n }\n catch (Exception e)\n {\n LogUtil.e(TAG, e.getMessage(), e);\n }\n }\n\n break;\n }\n\n }\n\n // Check if should log data\n if(LogUtil.IS_DEBUG)\n {\n // Logo Matches\n LogUtil.d(TAG, \"Request Url: \" + REQUEST_URL + \" ResponseData: \" + GSONParser.parseListObjectToString(listMatches));\n }\n\n return listMatches;\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}", "private void find(boolean forward) {\n \tif (this.currentFindResultPage != null) {\n \t\t/* searching again */\n \t\tint nextResultNum = forward ? this.currentFindResultNumber + 1 : this.currentFindResultNumber - 1;\n \t\tif (nextResultNum >= 0 && nextResultNum < this.pagesView.getFindResults().size()) {\n \t\t\t/* no need to really find - just focus on given result and exit */\n \t\t\tthis.currentFindResultNumber = nextResultNum;\n \t\t\tthis.pagesView.scrollToFindResult(nextResultNum);\n \t\t\tthis.pagesView.invalidate();\n \t\t\treturn;\n \t\t}\n \t}\n\n \t/* finder handles next/prev and initial search by itself */\n \tFinder finder = new Finder(this, forward);\n \tThread finderThread = new Thread(finder);\n \tfinderThread.start();\n }", "public void testViewDifferences() throws Exception {\n System.out.print(\".. Testing view differences ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + DIFF, DIFF).perform(A_FileNode);\n TopComponentOperator editor = new TopComponentOperator(new EditorWindowOperator(), \"Diff: A_File.java\");\n JEditorPaneOperator headRevision = new JEditorPaneOperator(editor, 0);\n JEditorPaneOperator workingRevision = new JEditorPaneOperator(editor, 1);\n String headRevisionContents = \"/** This is testing file.\\n */\\n\\n public class Testing_File {\\n\\n }\\n\";\n String workingRevisionContents = \"/** This is testing A_File.java file.\\n */\\n\\n public class Testing_File {\\n int i;\\n }\\n\";\n if (!headRevisionContents.equals(headRevision.getText()) | !workingRevisionContents.equals(workingRevision.getText()))\n captureScreen(\"Error: Incorrect diff contents.\");\n StyledDocument headRevisionDocument = (StyledDocument) headRevision.getDocument();\n StyledDocument workingRevisionDocument = (StyledDocument) workingRevision.getDocument();\n Color headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n Color workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n if (!headRevisionLine.equals(MODIFIED_COLOR) | !workingRevisionLine.equals(MODIFIED_COLOR))\n captureScreen(\"Error: Incorrect color of modified line.\");\n int thirdLineHeadOffset = 30;\n int thirdLineWorkingOffset = 42;\n headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(thirdLineHeadOffset).getAttribute(StyleConstants.ColorConstants.Background);\n Style lineStyle = workingRevisionDocument.getLogicalStyle(thirdLineWorkingOffset);\n if (!headRevisionLine.equals(REMOVED_COLOR) | (lineStyle != null))\n captureScreen(\"Error: Incorrect color of removed line.\");\n int fifthLineHeadOffset = 60;\n int fifthLineWorkingOffset = 72;\n lineStyle = headRevisionDocument.getLogicalStyle(fifthLineHeadOffset);\n workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(fifthLineWorkingOffset).getAttribute(StyleConstants.ColorConstants.Background);\n if ((lineStyle != null) | !workingRevisionLine.equals(NEW_COLOR))\n captureScreen(\"Error: Incorrect color of new line.\");\n System.out.println(\". done !\");\n }", "public Button getPerfectMatchBtn() {\n\t\tButton perfectButton = new Button(\"Find Perfect Match!\");\n\t\tperfectButton.setFont(Font.font(\"Verdana\", 30));\n\t\tperfectButton.setLayoutX(70);\n\t\tperfectButton.setLayoutY(480);\n\t\t\n\t\treturn perfectButton;\n\t}", "public void setMatches() {\r\n this.matches++;\r\n\r\n }", "@Test\n\tpublic void diffRevisions() throws Exception {\n\t\tRepository repo = new FileRepository(testRepo);\n\t\tRevCommit commit1 = add(\"test.txt\", \"content\");\n\t\tRevCommit commit2 = add(\"test.txt\", \"content2\");\n\t\tTreeWalk walk = TreeUtils.diffWithCommits(repo,\n\t\t\t\tConstants.MASTER + \"~1\", Constants.MASTER);\n\t\tassertNotNull(walk);\n\t\tassertEquals(2, walk.getTreeCount());\n\t\tassertTrue(walk.next());\n\t\tassertEquals(\"test.txt\", walk.getPathString());\n\t\tassertEquals(BlobUtils.getId(repo, commit1, \"test.txt\"),\n\t\t\t\twalk.getObjectId(0));\n\t\tassertEquals(BlobUtils.getId(repo, commit2, \"test.txt\"),\n\t\t\t\twalk.getObjectId(1));\n\t\tassertFalse(walk.next());\n\t}", "public static void main(String[] args) {\n System.out.println(new lc564().nearestPalindromic(\"10\")); //预期结果11\r\n }", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "@Test\n public void flightSearch() {\n FirefoxDriver browser = openBrowser(\"http://www.hotwire.com/ \");\n\n //Go to Bundles option\n bundlesOption(browser);\n\n //Search for the SFO to LAX flight\n inputCities(browser, \"SFO\", \"LAX\");\n\n //Calculate the flight days\n //Departing next day\n //Returning 20 days after\n flightDays(browser);\n\n //Click the Find Deal button\n findDeal(browser);\n\n //Wait for the page to load until the results are displayed\n results(browser);\n }", "private void showWebResultForNode(IndexNode node)\n {\n if(node == null) return;\n \n final int MAX_CHARS = 25; \n JPanel panel = new JPanel(new GridLayout(7, 2));\n \n panel.add(new JLabel(\"URL\"));\n panel.add(new JLabel(limitString(node.getURL(), MAX_CHARS)));\n panel.add(new JLabel(\"Parent URL\"));\n panel.add(new JLabel(limitString(node.getParent(), MAX_CHARS)));\n panel.add(new JLabel(\"Title\"));\n panel.add(new JLabel(limitString(node.getTitle(), MAX_CHARS)));\n panel.add(new JLabel(\"Description\"));\n panel.add(new JLabel(limitString(node.getDescription(), MAX_CHARS + 10)));\n panel.add(new JLabel(\"Last updated\"));\n panel.add(new JLabel(limitString(node.getLastUpdated().toString(), MAX_CHARS + 10)));\n panel.add(new JLabel(\"Page rank\"));\n panel.add(new JLabel(limitString(\"\" + node.getRank(), 12)));\n \n JButton openInBrowser = new JButton(\"Open in browser\");\n JButton copyClipboard = new JButton(\"Copy to clipboard\");\n openInBrowser.setIcon(new ImageIcon(webIconImage));\n copyClipboard.setIcon(new ImageIcon(clipboardImage));\n panel.add(openInBrowser);\n panel.add(copyClipboard);\n \n ActionListener listener = (ActionEvent e) -> \n {\n Object src = e.getSource();\n \n //Open page at URL\n if(src == openInBrowser)\n openPage(node.getURL());\n \n //Copy URL to clipboard\n else if(src == copyClipboard)\n copyToClipboard(node.getURL());\n };\n \n openInBrowser.addActionListener(listener);\n copyClipboard.addActionListener(listener);\n \n\n \n panel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));\n JDialog modal = new JDialog(frame);\n modal.getContentPane().add(panel);\n modal.setLocation(frame.getWidth() - panel.getSize().width, frame.getHeight() / 2 - panel.getSize().height);\n modal.setTitle(\"Address Data\");\n modal.pack();\n \n modal.addWindowListener(new WindowAdapter()\n {\n @Override\n public void windowClosing(WindowEvent e)\n {\n resultsTable.clearSelection();\n modalOpen = false;\n }\n });\n \n modal.setVisible(true);\n }", "@Given(\"^I visit the \\\"([^\\\"]*)\\\" (results|fixtures) page for (\\\\d{2}/\\\\d{2}/\\\\d{4})$\")\n\tpublic void I_visit_a_dated_page(String competition, String matchesType, String date) throws Throwable {\n\t\tDate parsedDate = new SimpleDateFormat(\"dd/MM/yyyy\").parse(date);\n\t\tString formattedDate = new SimpleDateFormat(\"yyyy/MMM/dd\").format(parsedDate).toLowerCase();\n\t\t// load page\n\t\tI_visit_a_page(competition, matchesType + \"/\" + formattedDate);\n\t}", "private void viewPage(String club) throws JSONException, InterruptedException {\r\n logger.log(Level.INFO, \"Would you like to view the \" + \r\n club + \" clubpage? (y/n)\");\r\n \r\n // if yes, go to club page\r\n // else return to display prompt\r\n if(\"y\".equalsIgnoreCase(in.nextLine())) {\r\n \t Club clubToView = new Club(club);\r\n \t clubToView.printClubPromptsAndInfo(PolyClubsConsole.user instanceof ClubAdmin);\r\n }\r\n \r\n else \r\n displaySearch(); \r\n }", "public void DFSInfo(ActionEvent actionEvent)\n {\n try {\n Desktop.getDesktop().browse(new URL(\"https://en.wikipedia.org/wiki/Depth-first_search\").toURI());\n } catch (IOException e) {\n e.printStackTrace();\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n }", "@Test(priority = 5)\n public void openDifferentElementsPageTest() {\n driver.findElement(new By.ByLinkText(\"SERVICE\")).click();\n driver.findElement(By.xpath(\"//a[contains(text(),'Different elements')]\")).click();\n }", "@Test\n public void test_sort_pagination() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_sort_pagination_req.xml\",\n \"PWDDIC_testSearch_sort_pagination_res.xml\");\n }", "public static void leechCNN(Hdict dict)\r\n {\r\n WebDriver driver = new ChromeDriver();\r\n \r\n String baseUrl = \"https://www.cnn.com/\";\r\n driver.get(baseUrl);\r\n \r\n List<WebElement> links = driver.findElements(By.tagName(\"a\"));\r\n \r\n System.out.println(\"There is a total of \" + links.size() + \" frong page news detected on CNN\");\r\n \r\n Hdict titleDicts = new Hdict();\r\n \r\n for(int i = 0; i < links.size(); i++)\r\n {\r\n //get href links\r\n String url = links.get(i).getAttribute(\"href\");\r\n \r\n Words hUrl = new Words(url, 0);\r\n if(titleDicts.hdict_lookup(hUrl) != null) // if this page is already parsed\r\n {\r\n continue;\r\n }\r\n \r\n //if the page is not parsed\r\n titleDicts.hdict_insert(hUrl);\r\n \r\n for(int o = 0; o < 4; o++) // goes back 4 days\r\n {\r\n String urlname = \"\";\r\n if(month >= 10)\r\n urlname = \"https://www.cnn.com/\" + year + \"/\" + month;\r\n else\r\n urlname = \"https://www.cnn.com/\" + year + \"/0\" + month;\r\n \r\n if(day >= 10)\r\n urlname += \"/\" + (day - o) + \"/\";\r\n else\r\n urlname += \"/0\" + (day - o) + \"/\";\r\n \r\n String[] news = url.split(urlname);\r\n if(news.length > 1 && news[1].length() > 10) // if it is .html and has some other shish, shit solution but works\r\n {\r\n //WebDriver driver1 = new ChromeDriver();\r\n //driver1.get(url);\r\n \r\n //nytimes doesn't have viewers count, so default 2500 effectiveness on all posts\r\n \r\n int reactions = NYTIME_AVG;\r\n \r\n String directory = news[1];\r\n \r\n directory = directory.split(\".html\")[0]; // removes file name and directory\r\n String[] temp = directory.split(\"/\");\r\n String title = temp[temp.length-2]; // get file name, more concise, skip last for CNN, last is index\r\n String[] keys = title.split(\"-\");\r\n \r\n for(String key : keys)\r\n {\r\n if(key.contains(\".html\")) continue; // useless stuff\r\n \r\n boolean integercheck = true;\r\n try{\r\n Integer.parseInt(key);\r\n } catch(Exception e) \r\n {\r\n integercheck = false;\r\n };\r\n if(integercheck) continue; // useless numbers\r\n \r\n if(Arrays.binarySearch(JUNK_WORDS, key) >= 0) continue; // useless words\r\n \r\n Words wkey = new Words(key, reactions * CNN_WORTH);\r\n Words wkey_old = dict.hdict_lookup(wkey);\r\n if(wkey_old == null) dict.hdict_insert(wkey);\r\n else\r\n {\r\n wkey.setPopularity(wkey.getPopularity() + wkey_old.getPopularity());\r\n dict.hdict_insert(wkey);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n //close Chrome\r\n driver.close();\r\n }", "private void getMatchHistoryForPlayer(final long account_id, final int num_results,\n long latest_match_id, final long max_unix_timestamp, final APICallback callback){\n String url = STEAM_API_BASE_URL + GET_MATCHES + \"?\" + STEAM_API_KEY_PARAMETER + mContext.getResources().getString(R.string.steam_api_key) +\n \"&\" + ACCOUNT_ID + convert64IdTo32(account_id);\n if(num_results > 0){\n url += \"&\" + MATCHES_REQEUSTED_NUMBER + num_results;\n }\n if(latest_match_id < 1){\n //return the results so far;\n }\n else{\n url += \"&\" + START_AT_MATCH_ID + latest_match_id;\n }\n //if there's a timestamp include it to back in time!\n //TODO fix code when date_max gets fixed\n// if(max_unix_timestamp > 0){\n// url += \"&\" + DATE_MAX + max_unix_timestamp;\n// }\n\n Log.d(TAG, \"getMatchHistoryForPlayer: request url = \" + url);\n final List<HistoryMatch> matchList = new ArrayList<>();\n JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>()\n {\n @Override\n public void onResponse(JSONObject response) {\n // display response\n Log.d(\"Response\", response.toString());\n Gson gson = new Gson();\n MatchHistoryResults.MatchHistory results = gson.fromJson(response.toString(), MatchHistoryResults.MatchHistory.class);\n matchList.addAll(results.getResult().getMatches());\n Log.d(TAG, \"onResponse: \" + results.getResult().getNum_results());\n\n if(results.getResult().hasMorePagedResults()){\n getMatchHistoryForPlayer(account_id, num_results, results.getResult().getLastMatchId() - 1, max_unix_timestamp, callback);\n }\n //if there were no results from the last call return what we have\n else if(results.getResult().getTotal_results() < 500 && results.getResult().getResults_remaining() < 1){\n callback.onMatchHistoryResponse(matchList);\n }\n\n //continue to earlier dates by taking one less than the last date and one less than the last match id\n //TODO fix code when date_max gets fixed\n /*\n else{\n getMatchHistoryForPlayer(account_id, num_results, results.getResponse().getLastMatchId() - 1, results.getResponse().getLastMatchTimestamp() - 1, callback);\n }\n */\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \" getMatchHistoryForPlayer Error.Response\");\n error.printStackTrace();\n }\n }\n );\n\n// add it to the RequestQueue\n mRequestQueue.add(getRequest);\n }", "String nextLink();", "public void clickTravellersAdultsDec() {\n\t\ttravellersAdultDec.click();\n\t}", "@Override\r\n\tpublic void resultsUpdated() {\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t\tif(mModel.getResults().size() == 1){\r\n\t\t\tmModel.selectPerson(mModel.getResults().get(0));\r\n\t\t\tmController.getProfilePicture(mModel.getResults().get(0).sciper);\r\n\t\t\tmDialog = new PersonDetailsDialog(this, mModel.getSelectedPerson());\r\n\t\t\tmDialog.show();\r\n\t\t}else\r\n\t\t\tstartActivity(new Intent(getApplicationContext(), DirectoryResultListView.class));\r\n\t\t\r\n\t}", "@Override\n public void onClick(View v) {\n\n if (t1 != null && t2 != null) {\n if (FM220SDK.MatchFM220(t1, t2)) {\n textMessage.setText(\" Finger matched\");\n t1 = null;\n t2 = null;\n } else {\n textMessage.setText(\" Finger not matched\");\n }\n } else {\n textMessage.setText(\"Please capture first\");\n }\n// String teamplet match example using FunctionBAse64 function .....\n FunctionBase64();\n }", "public void addMatch() {\n totalMatches ++;\n }", "@Test\n public void testSmallSeparatedSearchDistance() throws IOException {\n Gpx gpx = xmlMapper.readValue(getClass().getResourceAsStream(\"/tour3-with-long-edge.gpx\"), Gpx.class);\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n mapMatching.setMeasurementErrorSigma(20);\n MatchResult mr = mapMatching.doWork(gpx.trk.get(0).getEntries());\n assertEquals(Arrays.asList(\"Weinligstraße\", \"Weinligstraße\", \"Weinligstraße\",\n \"Fechnerstraße\", \"Fechnerstraße\"), fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 11); // TODO: this should be around 300m according to Google ... need to check\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 3000);\n }", "public void testGetResult() {\n\t\tassertNull(this.part.getResult());\n\t\tthis.part.run();\n\t\tObject result = this.part.getResult();\n\t\tassertNotNull(result);\n\t\tassertTrue(result instanceof ITypeTableNavigator);\n\t\tITypeTableNavigator navigator = (ITypeTableNavigator) result;\n\t\tassertEquals(10, navigator.getNumberOfAllMatches());\n\t\tMatch match = navigator.getNextMatch();\n\t\tassertEquals(3, match.getX());\n\t\tassertEquals(3, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(2, match.getX());\n\t\tassertEquals(2, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(1, match.getX());\n\t\tassertEquals(1, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(5, match.getX());\n\t\tassertEquals(1, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(1, match.getX());\n\t\tassertEquals(5, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(5, match.getX());\n\t\tassertEquals(5, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(0, match.getX());\n\t\tassertEquals(0, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(4, match.getX());\n\t\tassertEquals(0, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(0, match.getX());\n\t\tassertEquals(4, match.getY());\n\n\t\tmatch = navigator.getNextMatch();\n\t\tassertEquals(4, match.getX());\n\t\tassertEquals(4, match.getY());\n\n\t\tassertNull(navigator.getNextMatch());\n\t}", "int getPageNumber();", "private static void SecondUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Test\n public void resultNumberTest() throws InterruptedException, ParseException {\n HomePageNavigation.gotoHomePage();\n Thread.sleep(2000);\n SearchNavigation.gotoSearchResultsPage(index,\"\");\n assertTrue(\"Message does not exist\", CommonUtils.extractTotalResults() >= 1);\n }", "public void displayResult(Dealer d) {\n if (d.getPlayer2ResultMap() != null) {\n\n controller.p1result.setText(String.format(\"%.2f\", controller.p1WinPercentage) + \"%\");\n controller.p2result.setText(String.format(\"%.2f\", controller.p2WinPercentage) + \"%\");\n controller.tielabel.setText(\"tie\");\n controller.tielabel.setTextFill(Color.BROWN);\n controller.tieresult.setText(String.format(\"%.2f\", controller.tiePercentage));\n controller.tieresult.setTextFill(Color.BROWN);\n if (controller.p1WinPercentage > controller.p2WinPercentage) {\n controller.p1result.setTextFill(Color.GREEN);\n controller.p2result.setTextFill(Color.RED);\n } else {\n controller.p1result.setTextFill(Color.RED);\n controller.p2result.setTextFill(Color.GREEN);\n }\n for (int i = 0; i < controller.p2ResultList.size(); i++) {\n controller.p2ResultList.get(i).setText(controller.p2Results[i]);\n }\n } else {\n for (int i = 0; i < controller.p2ResultList.size(); i++) {\n controller.p2ResultList.get(i).setText(\"\");\n }\n controller.p2result.setText(\"\");\n controller.tielabel.setText(\"\");\n controller.tieresult.setText(\"\");\n }\n\n for (int i = 0; i < controller.p1ResultList.size(); i++) {\n\n controller.p1ResultList.get(i).setText(controller.p1Results[i]);\n }\n controller.errorLabel.setText(\"\");\n }", "@PostMapping(\n value = \"/compare/differenceTree\",\n consumes = MediaType.APPLICATION_JSON,\n produces = MediaType.APPLICATION_JSON\n )\n public ResponseEntity<CompactMealyMachineProxy> differenceTree(@PathVariable(\"projectId\") Long projectId,\n @RequestBody List<CompactMealyMachineProxy> mealyMachineProxies) {\n final User user = authContext.getUser();\n LOGGER.traceEntry(\"calculate the difference tree for models ({}) and user {}.\", mealyMachineProxies, user);\n\n if (mealyMachineProxies.size() != 2) {\n throw new IllegalArgumentException(\"You need to specify exactly two hypotheses!\");\n }\n\n final CompactMealy<String, String> diffTree =\n learnerService.differenceTree(mealyMachineProxies.get(0), mealyMachineProxies.get(1));\n\n LOGGER.traceExit(diffTree);\n return ResponseEntity.ok(CompactMealyMachineProxy.createFrom(diffTree, diffTree.getInputAlphabet()));\n }", "java.util.List<org.sas04225.proto.LookupResultProto.DMatch> \n getMatchesList();", "public void startMatch(View view) {\n \t\n \t//checks if all data was entered\n \tif(this.dataEntered()){\n \t\t\n \t\t/*\n \t\t * this resets the DataHandler class, which stores all the data from the match\n \t\t * we do this in case the user finishes a match and then starts a new one\n \t\t * this way data from different matches does not overlap\n \t\t */\n \t\t\n \t\tDataHandler.clear();\n \t\t\n \t\t//creates a new intent, needed to change activities\n\t\t\tIntent intent = new Intent(this, MatchActivity.class);\n\t\t\t\n\t\t\t//finds all views\n\t\t\tEditText txtmatch = (EditText) this.findViewById(R.id.te_match_num);\n\t\t\tEditText txtteam = (EditText) this.findViewById(R.id.te_team_num);\n\t\t\tRadioButton btnRed = (RadioButton) this.findViewById(R.id.btn_red);\n\t\t\t\n\t\t\t/*\n\t\t\t * we only need to reference button red, because if \n\t\t\t * btnRed.isChecked() is false, then the alliance \n\t\t\t * color must be blue\n\t\t\t */\n\t\t\t\n\t\t\t//gets the match and team numbers\n\t\t\tString matchNum = txtmatch.getText().toString();\n\t\t\tString teamNum = txtteam.getText().toString();\n\t\t\t\n\t\t\t/*\n\t\t\t * uses the TeamNumber reference class to check if the \n\t\t\t * team number entered is an actual team number. First\n\t\t\t * the string teamNum has to be converted to an integer,\n\t\t\t * hence the Integer.parseInt(teamNum)\n\t\t\t */\n\t\t\t\n\t\t\tif(!TeamNumbers.isATeamNumber(Integer.parseInt(teamNum))){\n\t\t\t\t\n\t\t\t\t//if the team number is not valid, a message prompts the user to try again\n\t\t\t\tToast.makeText(this,\"That is not a valid team number.\",Toast.LENGTH_SHORT).show();\n\t\t\t\treturn;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//gets whether btnRed is selected or not\n\t\t\tboolean isRed = btnRed.isChecked();\n\t\t\t\n\t\t\t/*\n\t\t\t * This puts the extras into our original intent.\n\t\t\t * Extras are just data that you want to be transferred\n\t\t\t * over to a different activity. intent.putExtra() takes\n\t\t\t * both an string id and the actual value you want to\n\t\t\t * transfer. The id serves as a way to identify the \n\t\t\t * different variables.\n\t\t\t */\n\t\t\t\n\t\t\tintent.putExtra(EXTRA_MATCH_NUM,matchNum);\t\t//match number\n\t\t\tintent.putExtra(EXTRA_TEAM_NUM,teamNum);\t\t\t//team number\n\t\t\tintent.putExtra(EXTRA_IS_RED,isRed);\t\t\t\t//if alliance is red\n\t\t\t\n\t\t\t//sends the user to the match activity\n\t\t\tstartActivity(intent);\n\t\t\t\n \t}else\n \t\t\n \t\t//if not all data is entered, prompts the user to try again\n \t\tToast.makeText(this,\"Please enter all the team's information.\",Toast.LENGTH_SHORT).show();\n \t\n\t}", "private static void printResults(Map<Path, Double> resultFiles2) {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Najboljih 10 rezultata: \");\r\n\t\tint i = 0;\r\n\t\tfor (Map.Entry<Path, Double> e : resultFiles.entrySet()) {\r\n\t\t\tif (i==10) break;\r\n\t\t\tif (e.getValue() < 1E-9) break;\r\n\t\t\tSystem.out.printf(\"[%d] (%.4f) %s %n\", i, e.getValue(), e.getKey().toString());\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t}", "public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\t\t\t(DccdSearchResultPanel) callingPanel));\n\t\t\t}", "public static void main(String[] args) \r\n\t\t{\n\t\t\tint Result = diff21(31);\r\n\t\t\tSystem.out.println(\"The end result is: \"+Result);\r\n\t\t}", "public Map<String, Match> getReferenceMatches();", "@When ( \"I navigate to the personal representatives page\" )\n public void goToRepsPage () throws InterruptedException {\n driver.get( baseUrl + \"/patient/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\n }", "Integer getPage();", "@Test\n public void stage04_searchAndPage() {\n String keyWord = \"bilgisayar\";\n Integer pageNumber = 2;\n //Searching with parameters\n SearchKey searchKey = new SearchKey(driver);\n HomePage homePage = searchKey.search(keyWord, pageNumber);\n //Getting current url\n String currentUrl = homePage.getCurrentURL();\n //Testing if this is desired page\n assertEquals(currentUrl, \"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\");\n //logging\n if (currentUrl.equals(\"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\")) {\n logger.info(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n } else {\n logger.error(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n }\n }", "public void v_Verify_Guest10_Displayed(){\n\t}", "public void clickSearchAgainButtonForDriversAge() {\n travelerPhoneNumber.click();\n driversAge.findElement(By.xpath(\n \"//input[contains(@class,'seleniumDriverAge')]//..//..//a[contains(@class,'seleniumSearchAgainButton')]\"))\n .click();\n }", "public static void printMatches(String text, String regex) {\n\t\tvar matches = getMatches(text, regex);\n\t\tconsole.printf(\"%10s -> %2d matches: %s %n\", replaceSymbols(regex), matches.size(), matches);\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"F:\\\\Selenium_Files\\\\selenium\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver(); \r\n\t\t\r\n\t\tdriver.get(\"https://money.rediff.com/gainers/bse/daily/groupa\"); \r\n\t\t\r\n\t\t//List<WebElement> list = driver.findElements(By.xpath(\"//table[@class='dataTable']//tbody//td[1]\"));\r\n\t\t//int size = list.size();\r\n\t\t//for(WebElement ele:list)\r\n\t\t//{\r\n\t\t//\tSystem.out.println(ele.getText());\r\n\t\t//}\r\n\t}", "public void showGameResult(GameMenu myGameMenu){\n //Anropa metoden för att kontrollera resultat av spelet\n gameResult(myGameMenu);\n if (Objects.equals(getMatchResult(), \"Oavgjort\")){\n System.out.println(\"Oavgjort! Du Gjorde Samma Val Som Datorn!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n else if (Objects.equals(getMatchResult(),\"Vann\")){\n System.out.println(\"Du Vann! Bra Jobbat!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n else if (Objects.equals(getMatchResult(),\"Förlorade\")){\n System.out.println(\"Tyvärr! Du Förlorade!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n }", "public void toResults(View view) {\n Log.i(\"@#@#@#@#@#MAIN\", \"to results navigation item clicked\");\n Intent intent = new Intent(getApplicationContext(), ResultsActivity.class);\n intent.putExtra(\"finnish\", finnish);\n startActivity(intent);\n }", "public void verifyCandlesAndDiffuserUrl() {\n String URL = driver.getCurrentUrl();\n Assert.assertEquals(\"https://tws-uk-qa.azurewebsites.net/category/homeware-furniture-home-accessories-candles-diffusers\", URL);\n }" ]
[ "0.5005197", "0.49914947", "0.49220988", "0.4723523", "0.45784533", "0.45706734", "0.45637834", "0.45567662", "0.4547705", "0.454527", "0.4538272", "0.45261168", "0.45190585", "0.45089895", "0.4497062", "0.4482963", "0.4461246", "0.44559988", "0.44389012", "0.44328892", "0.44309866", "0.4425808", "0.44221425", "0.4417082", "0.4413271", "0.44035795", "0.4392242", "0.43839788", "0.43791905", "0.4376236", "0.43498358", "0.4345597", "0.4341815", "0.4341207", "0.4340465", "0.4325798", "0.43244696", "0.43198276", "0.43160856", "0.43107983", "0.43043086", "0.42877397", "0.4285153", "0.4282065", "0.42773327", "0.42756394", "0.4273685", "0.42624384", "0.42575118", "0.425306", "0.42412567", "0.42347834", "0.4231179", "0.4225226", "0.42241833", "0.42227283", "0.4218969", "0.42185435", "0.42175144", "0.42170408", "0.4213582", "0.42088765", "0.42027685", "0.41952878", "0.41897908", "0.41894767", "0.41847354", "0.41801628", "0.41771746", "0.41738477", "0.41718638", "0.41685757", "0.41675723", "0.41609064", "0.41481194", "0.41458037", "0.41450423", "0.4143358", "0.41397265", "0.4139446", "0.4138498", "0.4134138", "0.4130212", "0.41297638", "0.41263384", "0.41242477", "0.41215718", "0.4117379", "0.4116681", "0.41122645", "0.41114572", "0.41042832", "0.4104141", "0.41028276", "0.41018468", "0.40966317", "0.40959054", "0.4093228", "0.40926307", "0.40865955" ]
0.5973671
0
Navigate to Digits/EvenOdd page
public static void NavigateToDigitsEvenOdd(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Digits(driver).click(); Trade_Page.link_EvenOdd(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findOddEven() {\n\t\tif (number % 2 == 0) {\n\t\t\tif (number >= 2 && number <= 5)\n\t\t\t\tSystem.out.println(\"Number is even and between 2 to 5...!!\");\n\t\t\telse if (number >= 6 && number <= 20)\n\t\t\t\tSystem.out.println(\"Number is even and between 6 to 20...!!\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Number is even and greater than 20...!!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Number is odd...!!\");\n\t\t}\n\t}", "public static void main(String[] args) {\r\n // create a scanner for user input \n Scanner input = new Scanner(System.in);\r\n \n //prompt user for their number\n System.out.println(\"Enter your number\"); \n //intialize user's number\n int number = input.nextInt();\n //intialize the remainder\n int remainder = number % 2; \n \n //Determin whether user's number is odd or even\n if (remainder >= 1){\n System.out.println(number + \" is an odd number \");\n }else{\n System.out.println(number +\" is an even number\");\n } \n\n\r\n }", "public Integer oddNumbers(int fromThisNumber, int toThisNumber){\n\t\tSystem.out.println(\"Print odd numbers between 1-255\");\n\t\tfor(int i = fromThisNumber; i <= toThisNumber; i++){\n\t\t\tif(i % 2 == 1){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "public void getEvenOdd(int num) {\r\n\t\t\r\n\t\tSystem.out.println(\"The given number is : \"+num);\r\n\t\t\r\n\t\tif(num % 2 == 0) {\r\n\t\t\tSystem.out.println(\"This is Even number\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"This is odd number\");\r\n\t\t}\r\n\r\n\t}", "public static void printOddNumbers (int from, int to) {//when we dont know the range\n for(int i=from; i<=to; i++){\n if(i%2!=0){\n System.out.print(i + \" \");\n }\n\n }\n System.out.println();\n }", "public static void printOddInt() {\n\t\t\n\t\t//For Loop\n\t\tfor(int i=4; i<10; i++) {\n\t\t\tif(i%2!=0) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t}", "public static int getOdd() {\n int odd = getValidNum();\n\n while ((odd % 2) == 0) {\n System.out.print(\"Please enter an ODD number: \");\n odd = getValidNum();\n }\n return odd;\n }", "public static void printodd() {\n for (int i = 0; i < 256; i++){\n if(i%2 != 0){\n System.out.println(i);\n }\n \n }\n }", "public static void main(String[] args) {\r\n // create a scanner for user import\r\n Scanner input = new Scanner(System.in);\n\n // declare a variable to see if a number is divisible by two\n final int DIVISIBLE_TWO = 2;\n\n // find out user number\n System.out.println(\"Please enter a number\");\n int number = input.nextInt();\n\n // declare a variable for the divided number\n int number2 = number%DIVISIBLE_TWO;\n\n //figure out if number is divisible by two\n if (number/DIVISIBLE_TWO == number2){\n System.out.println(\"Your number is odd\");\n } else {\n System.out.println (\"Your number is even\");\n }\n\r\n }", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "int odd_palindrome(int head) {\n\t\tint tail=0;\n\t\tint exp=1; //10 exponent number\n\t\tfor(int r=head/10; r>0; r/=10) {\n\t\t\tint d = r%10;\n\t\t\ttail=tail*10+d;\n\t\t\texp *= 10;\n\t\t}\n\t\treturn head * exp + tail;\n\t}", "private static void oddEven(int a) {\n\t\tif(a%2 ==0) {\n\t\t\tSystem.out.println(\"number is even\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"number is odd\");\n\t\t}\n\t}", "public String determineEvenOrOdd(int number){\n\t\t if((number%2)==0) { return \"even\"; } else { return \"odd\"; }\n\t\t }", "public static int getEven() {\n int even = getValidNum();\n\n while ((even % 2) == 1) {\n System.out.print(\"Please enter an EVEN number: \");\n even = getValidNum();\n }\n return even;\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int number = scanner.nextInt();\n int secondDigit = (number / 10) % 10;\n System.out.println(secondDigit);\n }", "public static String oddEven(int n){\n // Returning String as an \"Even\" or \"Odd\"\n return n%2==0?\"Even\":\"Odd\";\n }", "Integer getPage();", "public static void printEvenNumbers(int from, int to){\n for(int i=from; i<=to; i++){\n if(i%2==0){\n System.out.print(i + \" \");\n }\n }\n System.out.println();\n }", "public static void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number : \");\r\n\t\tint num=scan.nextInt();\r\n\t\tint even_count=0;\r\n\t\tint odd_count=0;\r\n\t\twhile(num>0)\r\n\t\t{\r\n\t\t\tint rem=num%10;\r\n\t\t\tif(rem%2==0)\r\n\t\t\t\teven_count+=1;\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t\tnum=num/10;\r\n\t\t}\r\n\t\tSystem.out.println(\"Odd digits : \"+odd_count);\r\n\t\tSystem.out.println(\"Even digits : \"+even_count);\r\n\t\t\r\n\r\n\t}", "int getPage();", "public void operacionletradni(int dni, int result){\n this.result=dni%23;}", "public static void main(String[] args) {\n\t\tint num = 90;\n\t\t\n\t\tif (num % 2 == 1) {\n\t\t\tSystem.out.println(num+\" is an odd number\");\n\t\t}\n\t\t\n\t\t// Create a program which checks the int if it is even number\n\t\tif (num % 2 == 0) {\n\t\t\tSystem.out.println(num+\" is an even number\");\n\t\t}\n\t\t\n\n\t}", "private String getModulo(){\n int lenghtOfInput = String.valueOf(modulo).length();\n String even = new String();\n String odd = new String();\n\n if (lenghtOfInput != 8){\n return modulo + getString(R.string.notValidMatrikelNotePt1) + lenghtOfInput + getString(R.string.notValidMatrikelNotePt2);\n } else {\n int[] arr = new int[lenghtOfInput];\n\n //make an array of digits\n int i = 0;\n do {\n arr[i] = modulo % 10;\n modulo = modulo / 10;\n i++;\n } while (modulo != 0);\n\n //seperate even digits from odd ones\n for (int runner = 0; runner < lenghtOfInput; runner++){\n if(arr[runner] % 2 == 0){\n even += arr[runner];\n } else {\n odd += arr[runner];\n }\n }\n\n //Sorting of the char-rays which are numbers\n char[] evenSorted = even.toCharArray();\n Arrays.sort(evenSorted);\n String evenSortedString = new String(evenSorted);\n char[] oddSorted = odd.toCharArray();\n Arrays.sort(oddSorted);\n String oddSortedString = new String(oddSorted);\n\n return getString(R.string.solutionTxt) + \"\\n\" + evenSortedString + oddSortedString;\n }\n }", "@Test\n public void testNextAndPrevious() throws Exception {\n\n driver.get(baseUrl + \"/computerdatabase/computers?page-number=1&lang=en\");\n\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='1']\"));\n\n driver.findElement(By.linkText(\"Next\")).click();\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='2']\"));\n\n try {\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='1']\"));\n fail();\n } catch (NoSuchElementException e) {\n assertTrue(true);\n }\n\n driver.findElement(By.linkText(\"Previous\")).click();\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='1']\"));\n try {\n driver.findElement(By.xpath(\"//li[contains(@class, 'active')]/a[text()='2']\"));\n fail();\n } catch (NoSuchElementException e) {\n assertTrue(true);\n }\n }", "public static void main (String [ ] args) {\n\nint value = (int)(Math.random ()*101); //generates integer 0-100 \nint e=0; //even counter\nint o=0; //odd counter\n\nSystem.out.println( \" Random number generated: \" +value ); //print out value generated \n \n\nif(value!=0){ //if not zero, run program\n\n if(value%2==0) { //all even values\n System.out.print( \" The output pattern: \");\n \n do{\n System.out.print( \"*\"); \n e++;\n }//close do loop\n \n while (e<value);\n \n } //close if statement for even integers \n\n\n \n else{ //all odd values\n \n do{\n System.out.print( \"&\");\n o++;\n }//close do loop\n \n while (o<value);\n \n \n}\n\n}//close first if statement \n\nelse { //if random value is 0, then print nothing...\nSystem.out.print( \" \");\n}\n\n \n}", "public void parity() {\n System.out.print(\"Enter an integer: \");\n int int2 = in.nextInt();\n\n if ((int2 % 2) == 0) {\n System.out.println(\"\\nEven.\\n\");\n } else {\n System.out.println(\"\\nOdd.\\n\");\n }\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int num; //Declare a variable\n System.out.println(\"Enter a number:\");\n num = input.nextInt();\n input.close();//scanner close\n\n if ( num % 2 == 0 ) //if any number divided by 2 is even number\n System.out.println(\"The entered number is even\");\n else // else odd number\n System.out.println(\"The entered number is odd\");\n }", "private void forwardPage()\n {\n page++;\n open();\n }", "@Test\r\n public void Test4() throws InterruptedException {\n driver.navigate().to(\"http://webstrar99.fulton.asu.edu/page2/\");\r\n driver.findElement(By.id(\"number1\")).sendKeys(\"10\");\r\n driver.findElement(By.id(\"number2\")).sendKeys(\"5\");\r\n driver.findElement(By.id(\"div\")).click();\r\n driver.findElement(By.id(\"calc\")).click();\r\n Assert.assertEquals(\"2\", driver.findElement(By.id(\"res\")).getText());\r\n driver.quit();\r\n }", "public static void main(String[] args) {\n\t\tint num,i=0,ch,sum=0,sum2=0,count=0,last=0;\n\t\tbutton = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter number \");\n\t\tnum= button.nextInt();\n\t\tSystem.out.println(\"1/Even number: \");\n\t\tSystem.out.println(\"2/Odd Number : \");\n\t\tSystem.out.println(\"3/print five of even\");\n\t\tSystem.out.println(\"4/The first 25% of numbers\");\n\t\tSystem.out.println(\"5/The last 75% of numbers\");\n\t\tch = button.nextInt();\n\t\tswitch(ch){\n\t\tcase 1: \n\t\t\ti=1;\n\t\t\tSystem.out.println(\"even\");\n\t\t\twhile(i<=num){\n\t\t\t\t\n\t\t\t\tif(i%2==0){\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\ti++;\n\t\t\t\t\tsum+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum of even \" + sum);\n\t\t\t\tbreak;\n\t\tcase 2: \n\t\t\t\tSystem.out.println(\"The odd\");\n\t\t\t\twhile(i<=num){\n\t\t\t\t\tif(i%2!=0){\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\ti++;\n\t\t\t\t\tsum2+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum of odd \" + sum2);\n\t\t\t\tbreak;\n\t\tcase 3: System.out.println(\"The last five of even \");\n\t\t\t\ti =1;\n\t\t\t\twhile(i<=num){\n\t\t\t\t\tif(count<5){\n\t\t\t\t\tif(i%2==0){\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tlast+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum even last five \" + last);\n\t\t\t\tbreak;\n\t\tcase 4: System.out.println(\"The last 25% of numbers \");\n\t\t\t\tint n;\n\t\t\t\ti=1;\n\t\t\t\tn = (int) ((int) num * 0.25);\n\t\t\t\tSystem.out.println(n);\n\t\t\t\twhile(i<=n){\n\t\t\t\t\tif(i%2==0){\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t//TV IS HARMING\n\t\t\t\tbreak;\n\t\tcase 5: \n\t\t\t\tn = 25;\n\t\t\t\t\tfor(int k = num - n; k<=num;k++){\n\t\t\t\t\t\tif(k%2==0){\n\t\t\t\t\t\t\tSystem.out.println(k);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\tdefault : break;\n\t\t}\n\t\t\n\t}", "public static void printEmirp(int howMany){\r\n\t\tint number = 0;//number will be the test number if its emirp\r\n\t\t\r\n\t\twhile(howMany>0){//while the number of how many we want to print is bigger than 0\r\n\t\t\tint reverse = ReverseNumbersOrder.reverse(number); //this is the reverse number\r\n\t\t\t\r\n\t\t\tif(number != reverse //if the number is not a palindrome\r\n\t\t\t\t\t&& Primes.isPrime(number)//and if it and its reverse are prime numbers\r\n\t\t\t\t\t&& Primes.isPrime(reverse)){\r\n\t\t\t\tSystem.out.print(number+\" \");//print that number\r\n\t\t\t\thowMany--;//when it prints an emirp decrease the counter\r\n\t\t\t\tif(howMany%10==0){//if how many emirps we have printed is divisible by 10\r\n\t\t\t\t\tSystem.out.println();//go to new line\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnumber++;//increase the number\r\n\t\t}\r\n\t}", "public void oddPrinter()\n {\n oddPrinter(0);\n }", "private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n int f = делимое % делитель;\n\n int остаток = делимое - (делимое / делитель) * делитель;\n int j = 7 % 2;\n\n System.out.println(f);\n System.out.println(остаток);\n\n\n }", "public static void main(String[] args) {\n\t\tint num = 8;\n\t\tint a = num & 1;\n\t\tSystem.out.println(a);\n\t\tif(a>0)\n\t\t\tSystem.out.println(\"Odd!\");\n\t\telse\n\t\t\tSystem.out.println(\"Even!\");\n\t}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "private int divideByNumberOfEvenDigits(List<Integer> digits) {\n log.debug(\"method=divideByNumberOfEvenDigitsStart, digits=\" + digits);\n int result = convertToNumber(digits) / getNumberOfEvenDigits(digits);\n log.debug(\"method=divideByNumberOfEvenDigitsEnd, result=\" + result);\n return result;\n }", "private static void displayNumbers(){\n BigInteger bigInteger = new BigInteger(create50DigitString());\n int i = 1;\n do {\n // Checking the remainder's int value == 0 since the requirement is to find the number greater than Long.MAX_VALUE and divisible by 2 or 3.\n if (bigInteger.remainder(new BigInteger(\"2\")).intValue() == 0 || bigInteger.remainder(new BigInteger(\"3\")).intValue() == 0) {\n System.out.println(bigInteger);\n i++;\n }\n// Incrementing the bigInteger\n bigInteger = bigInteger.add(new BigInteger(\"1\"));\n// Exit condition\n } while (i != 11);\n }", "public void fback() throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n\t\tSystem.out.println(\"Enter any number for finding even/odd : \");\n\t\tString S=br.readLine();\n\t\tint i=Integer.parseInt(S);\n\t\t\n\t\tif(i%2==0)\n\t\t{\n\t\t\tSystem.out.println(\"Even number\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Odd Number\");\n\t\t}\n\t}", "int main()\n\n{\n\n int n,t,e,o;\n\n cin>>n;\n\n while(n>0)\n\n {\n\n t=n%10;\n\n if(t%2==0)\n\n {\n\n e=e+t;\n\n }\n\n else\n\n {\n\n o=o+t;\n\n }\n\n n=n/10;\n\n }\n\n if(e==o)\n\n {\n\n cout<<\"Yes\";\n\n }\n\n else\n\n {\n\n cout<<\"No\";\n\n }\n\n \n\n}", "int getPageNumber();", "boolean isOddOrEven(int n){\n return (n & 1) == 0;\n }", "@Test\r\n\tpublic void test_5_NavigatePage() throws InterruptedException {\n\t\tdriver.findElement(By.linkText(\"2\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t// get page title\r\n\t\tString pageTitle = driver.getTitle();\r\n\t\t// get current page number\r\n\t\tWebElement element = driver.findElement(By.xpath(\"//div[@id='pagn']/span[3]\"));\r\n\t\tString actualPageNumber = element.getText();\r\n\t\tString expectedPageNumber = \"2\";\r\n\t\tAssert.assertEquals(actualPageNumber, expectedPageNumber);\r\n\t\t// if the page title contains \"samsung\" then navigation is successful \r\n\t\tAssert.assertTrue(pageTitle.contains(\"Amazon.com: samsung\"));\r\n\t\tSystem.out.println(\"Page \" + actualPageNumber + \" is displayed\");\r\n\t}", "public static void main(String[] args) {\nint i =1;\r\nfor(i=1; i<=20; i++)\r\n{\r\n\tif(i % 2 == 1)\r\nSystem.out.println(i);\r\n}\r\nSystem.out.println(\"Printing only the odd numbers from 1 to 20\");\r\n\t}", "public static void main(String[] args) {\n checkIfNumberIsOddOrEven(112);\n checkIfNumberIsOddOrEven(111);\n\n }", "static int find(int decimal_number) \r\n { \r\n if (decimal_number == 0) \r\n return 0; \r\n \r\n else\r\n \r\n return (decimal_number % 2 + 10 * \r\n find(decimal_number / 2)); \r\n }", "public static void main(String[] args) {\n\n System.out.println(\"Let's find if the number is even or odd\");\n\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a number: \");\n\n int num = input.nextInt();\n if (num % 2 == 0) {\n System.out.println(\"The number entered is even number\");\n } else {\n System.out.println(\"The number entered is odd number\");\n }\n }", "public static void main(String[] args) {\n\t\t int num=101;\n\t\t int r=0;\n\t\t int rev=0;\n\t\t int temp=num;\n\t\t while(num>0){\n\t\t r=num%10;\n\t\t rev=(rev*10)+r;\n\t\t num=num/10;\n\t\t System.out.println(rev);\n\t\t //System.out.println(num);\n\t\t }\n\t\t if(temp==rev) System.out.println(\"Palindrome\");\n\t\t else System.out.println(\"Not a Palindrome\");\n\t\t }", "static void rightPoint(int one, int two) {\r\n\t\t\r\n\t// test case 1: results up to 15 should follow as.....\r\n\t\t// 1, 2, right, 4, point, right, 7, 8, right, point, 11, right, 13, 14, rightpoint\r\n\t\t\r\n\t\t// loop for 100 times\r\n\t\t\r\n\t\tString sOne = \"right\";\r\n\t\tString sTwo= \"point\";\r\n\t\tString sThree=\"rightpoint\";\r\n\t\tfor (int i = 1; i <= 100; i++) {\r\n\r\n\t\t\t// if number is divisible by both inputs4\r\n\t\t\t// print right point instead of int i\r\n\r\n\t\t\tif (i % one == 0 && i % two == 0) {\r\n\t\t\t\tSystem.out.println(sThree);\r\n\t\t\t\t// if number is divisible by the first int, this case 5\r\n\t\t\t\t// print right instead of int i\r\n\t\t\t} else if (i % one == 0) {\r\n\t\t\t\tSystem.out.println(sOne);\r\n\t\t\t\t// if number is divisble by the second int, this case 5\r\n\t\t\t\t// print point instead of int i\r\n\t\t\t} else if (i % two == 0) {\r\n\t\t\t\tSystem.out.println(sTwo);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t//Big O (N), single for loop\r\n\t}", "@Test\n public void testHelloTrailInteger()\n {\n driver.get(\"https://cs1632ex.herokuapp.com/hello/77\");\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Hello CS1632, from 77!\"));\n }", "public void testMainPage() {\n\t\tbeginAt(\"numguess.jsp\");\n\t\tassertTitleEquals(\"Number Guess\");\n\t\tassertTextPresent(\"Welcome to the Number Guess game\");\n\t\tassertFormElementPresent(\"guess\");\t\t\n\t}", "public static void main(String[] args) {\n\t\tfor(int i=1;i<20;i++)\r\n\t\t{\r\n\t\t\tif(i%2!=0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i+\" is an ODD Number\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t}", "public void Next(View view)\n {\n increaseNum();\n }", "public int setNextOdd() {\n\t\twhile(x % 2 != 1){\n\t\t\tx++;\n\t\t}\n\t\t\n\t\t// sets the new odd number equal to x\n\t\tRuntimeThr.evenOddSequence = x;\n\n\t\t// Returns the next odd number\n\t\treturn x;\n\t}", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n int num1=in.nextInt();\n int n1=num1/100;\n int n2=((num1/10)%10);\n int n3=(num1%10);\n int reverse=n3*100 +n2*10+n1;\n System.out.println(reverse);\n }", "@Test\n\tpublic void test_doubleANumber() {\n\t\t\n\t}", "@Test\r\n public void Test2() throws InterruptedException {\n driver.navigate().to(\"http://webstrar99.fulton.asu.edu/page2/\");\r\n driver.findElement(By.id(\"number1\")).sendKeys(\"10\");\r\n driver.findElement(By.id(\"number2\")).sendKeys(\"5\");\r\n driver.findElement(By.id(\"sub\")).click();\r\n driver.findElement(By.id(\"calc\")).click();\r\n Assert.assertEquals(\"5\", driver.findElement(By.id(\"res\")).getText());\r\n driver.quit();\r\n }", "public void testGetOnesDigit() {\n\t\tNumberConverter test5 = new NumberConverter(295);\n\t\tNumberConverter test9 = new NumberConverter(109);\n\t\tNumberConverter test11 = new NumberConverter(311);\n\t\tNumberConverter test0 = new NumberConverter(310);\n\t\tNumberConverter test00 = new NumberConverter(2);\n\t\tassertEquals(\"Should have returned last digit\", test5.getNthDigit(1), 5);\n\t\tassertEquals(\"Should have returned last digit\", test9.getNthDigit(1), 9);\n\t\tassertEquals(\"Should have returned last digit\", test11.getNthDigit(1),\n\t\t\t\t1);\n\t\tassertEquals(\"Should have returned last digit\", test0.getNthDigit(1), 0);\n\t\tassertEquals(\"Should have returned last digit\", test00.getNthDigit(1),\n\t\t\t\t2);\n\t}", "public void checkCountforButtonNextandPrevious() {\n Cursor coo = SQLAbsensi.fetchDatabaseAll();\n\n //Page Next\n if (firstDigit != 0) {\n pageCountStartAt = firstDigit * 10;\n int save = coo.getCount() / 10;\n if (save < firstDigit) {\n pageCountEndAt = (firstDigit + 1) * 10;\n } else {\n pageCountEndAt = firstDigit * 10 + (coo.getCount() % 10);\n myButton = (Button) findViewById(R.id.nextpagebutton);\n myButton.setVisibility(View.INVISIBLE);\n }\n } else {\n pageCountStartAt = 0;\n if (coo.getCount() > 10) {\n pageCountEndAt = 10;\n myButton = (Button) findViewById(R.id.nextpagebutton);\n myButton.setVisibility(View.VISIBLE);\n } else {\n pageCountEndAt = coo.getCount();\n }\n }\n\n //Page Previous\n if (firstDigit > 0) {\n myButton = (Button) findViewById(R.id.previouspagebutton);\n myButton.setVisibility(View.VISIBLE);\n } else {\n myButton = (Button) findViewById(R.id.previouspagebutton);\n myButton.setVisibility(View.INVISIBLE);\n }\n Refresh();\n\n }", "private static void displayTypes(int UI)\n\t{\n\t\tint Evens = 0;\n\t\tint Odds = 0;\n\t\tint Zeros = 0;\n\t\tint ValHold;\n\t\t\n\t\twhile (UI > 0)\n\t\t{\n\t\t\tValHold = UI%10;\n\t\t\tif (ValHold != 0 && ValHold%2 == 0)\n\t\t\t{\n\t\t\t\tEvens++;\n\t\t\t}\n\t\t\telse if (ValHold == 0)\n\t\t\t{\n\t\t\t\tZeros++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tOdds++;\n\t\t\t}\n\t\t\tUI = UI/10;\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"The number of odd digits is \"+Odds+\", and the number of even numbers is \"+Evens+\", and the number of zeros is \"+Zeros);\n\t}", "private static void passoutNum(int start, int end) {\n\t\tlindOfNum(0, start);\n\n\t\tif(start == end) {\n\t\t\t//System.out.println(end);\n\t\t\treturn;\n\t\t}\n\t\t//System.out.print(start);\n\t\tpassoutNum(start + 1, end);\n\t\tlindOfNum(0, start);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tOddAndEvenNumberPrinting(n);\n\t}", "public static String largestOddNumber(String num) {\n if (!num.contains(\"1\") && !num.contains(\"3\") && !num.contains(\"5\") && !num.contains(\"7\") && !num.contains(\"9\"))\n return \"\";\n\n // Step2 - Create variable to store float number and string of largestNumber\n float largestOddNumber = -1;\n String largestOddNumberString = \"\";\n\n // Step3 - Create iterators to traverse front and back\n int start = 0;\n int end = num.length() - 1;\n\n // Step4 - Traverse array from front and back\n while (start < num.length() && end >= 0) {\n\n // Step5 - Get the left and right substring\n String left = num.substring(start);\n String right = num.substring(0, end + 1);\n\n // Step6 - Get the float\n float floatLeft = Float.parseFloat(left);\n float floatRight = Float.parseFloat(right);\n\n // Step7 - Get the last digit of each string to check if odd or even\n int lastDigitLeft = left.charAt(left.length()-1);\n int lastDigitRight = right.charAt(right.length()-1);\n\n System.out.println(\"left: \" + floatLeft + \" right: \" + floatRight);\n\n // Step8 - Check Left and Right\n if (lastDigitLeft % 2 == 1 && largestOddNumber < floatLeft) {\n largestOddNumber = floatLeft;\n largestOddNumberString = left;\n\n }\n if (lastDigitRight % 2 == 1 && largestOddNumber < floatRight) {\n largestOddNumber = floatRight;\n largestOddNumberString = right;\n }\n\n // Step9 - Check if number changed, if so return that\n if (largestOddNumber != -1) {\n return largestOddNumberString;\n }\n start++;\n end--;\n }\n\n\n return \"\";\n }", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "private static int invertirNumero(int num) {\n\t\tint cifra, inverso = 0;\n\t\twhile (num > 0) {\n\t\t\tcifra = num % 10;\n\t\t\tinverso = cifra + inverso * 10;\n\t\t\tnum /= 10;\n\t\t}\n\t\treturn inverso;\n\t}", "public static void main(String[] args) {\nint i=1;//display from 20 to 10\nSystem.out.println(\"odd even\");\nwhile(i<=10)\n{\n\tif(i%2!=0) {\n\tSystem.out.println(i+\" \"+(i+1));//for space /t is fine\n\t}\ni++;\n}\n\t}", "public int switchingPage(By by) {\n\t\ttry {\n\t\t\tdriver.findElement(by).click();\n\t\t\tfullPageScroll();\n\t\t} catch (NoSuchElementException e) {\n\t\t\tSystem.out.println(e.getMessage());;\n\t\t}\n\t\t/*\n\t\tint limits = 5;\n\t\tdo {\n\t\t\tdriver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);\n\t\t\tswitchedpage = currentPageNumber();\n\t\t\tlimits--;\n\t\t} while ((switchedpage == 0) && limits > 0);\n\t\t*/\n\t\tSystem.out.println(currentPageNumber() + \" <- currentPageNumber\");\n\n\t\treturn currentPageNumber();\n\t}", "@Test\r\n public void Test3() throws InterruptedException {\n driver.navigate().to(\"http://webstrar99.fulton.asu.edu/page2/\");\r\n driver.findElement(By.id(\"number1\")).sendKeys(\"10\");\r\n driver.findElement(By.id(\"number2\")).sendKeys(\"5\");\r\n driver.findElement(By.id(\"mul\")).click();\r\n driver.findElement(By.id(\"calc\")).click();\r\n Assert.assertEquals(\"50\", driver.findElement(By.id(\"res\")).getText());\r\n driver.quit();\r\n }", "public static void printOdd50() {\n\t\tfor(int i = 0; i < 50; i++) {\n\t\t\tif(i % 2 == 1) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"ODD OR EVEN\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the number:\");\r\n\t\tint n=sc.nextInt();\r\n\t\tSystem.out.println(\"odd numbers\");\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t {\r\n\t\t\tif(i%2==1) \r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t System.out.println(\"even numb\");\r\n\t\t\tfor(int i=0;i<=n;i++){\r\n\t\t\t\tif(i%2==0) \r\n\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(i);\r\n\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}", "public static void main(String[] args) {\nint t = 101010101;\n// koden begynner her\nString s = \"\";\nwhile ( t % 10 > 0 ) {\ns = t % 10 + s;\nt = t / 10;\n}\ns = \"s = \" + s;\nout.println(s);\n\n }", "public void printOdd1To255(){\n StringBuilder out = new StringBuilder();\n for(int i = 1; i <= 255; i++){\n if(i % 2 != 0){\n out.append( i + \" \");\n }\n }\n System.out.println( out );\n }", "public static boolean isOdd(MyInteger number1){\r\n\t\tif (number1.getInt() % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void main(String args[])\r\n {\r\n int remainder;\r\n int rev=0;\r\n Scanner scan = new Scanner(System.in);\r\n\r\n System.out.print(\"Enter a Number : \");\r\n int num = scan.nextInt();\r\n\r\n int original = num;\r\n\r\n while(num != 0)\r\n {\r\n remainder = num%10;\r\n rev = rev*10 + remainder;// rev = 50*10 + 6 --> 506*10 +2\r\n num = num/10; //divide by 10 to decrease one digit\r\n\r\n\r\n }\r\n\r\n // check if the original number is equal to its reverse\r\n\r\n if(rev==original)\r\n {\r\n System.out.print(\"This is a Palindrome Number\");\r\n }\r\n else\r\n {\r\n System.out.print(\"This is not a Palindrome Number\");\r\n }\r\n }", "boolean hasPageNo();", "boolean hasPageNo();", "public static void nDigits(int num) {\r\n for(int x = ((int)Math.pow(10, num - 1)); x < (int)Math.pow(10, num); x++) {\r\n if(x % 2 == 0){\r\n if(conditionChecker(x)) {\r\n System.out.println(x);\r\n }\r\n }\r\n }\r\n }", "public static void look() {\r\n\t\t\r\n\t\tif (ths.page == 2) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\nint number=987654,reverse=0;\nwhile(number!=0)\n{\nint remainder=number%10;\nreverse=reverse*10+remainder;\nnumber=number/10;\n}\nSystem.out.println(\"The reverse of given number is\" + reverse);\n\t}", "@Test\n public void resultNumberTest() throws InterruptedException, ParseException {\n HomePageNavigation.gotoHomePage();\n Thread.sleep(2000);\n SearchNavigation.gotoSearchResultsPage(index,\"\");\n assertTrue(\"Message does not exist\", CommonUtils.extractTotalResults() >= 1);\n }", "public void daffodilNum(int digit) {\n int count = 0;\n for (int i = (int) Math.pow(10, digit-1); i < (int) Math.pow(10, digit); i++) {\n int sum = 0;\n for (int index = 0; index < digit; index++) {\n int curDigit = (i / ((index == 0) ? 1 : ((int) Math.pow(10, index)))) % 10;\n sum += Math.pow(curDigit, 3);\n }\n if (sum == i) {\n System.out.print(i);\n System.out.print(' ');\n count++;\n if (count == 2) {\n System.out.println();\n count = 0;\n }\n }\n }\n }", "private void hailstoneSeq() {\r\n\t\tint evenCount = 0; //number of times the even operation is used\r\n\t\tint oddCount = 0; //number of times the of operation is used\r\n\t\t\r\n\t\tint num = readInt(\"Enter a number:\");\r\n\t\t\r\n\t\twhile(num != 1) {\r\n\t\t\t//even numbers\r\n\t\t\tif(num % 2 == 0) { \r\n\t\t\t\tprintln(num + \" is even, so I take half: \" + (num/2));\r\n\t\t\t\tnum = num / 2;\r\n\t\t\t\tevenCount += 1;\r\n\t\t\t\t\r\n\t\t\t\tif(num == 1) { \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t//odd numbers\r\n\t\t\tif(num % 2 != 0) { \r\n\t\t\t\tprintln(num + \" is odd, so I make 3n + 1: \" + (3 * num + 1));\r\n\t\t\t\tnum = 3 * num + 1;\r\n\t\t\t\toddCount += 1;\r\n\t\t\t\t\r\n\t\t\t\tif(num == 1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//determining the number of steps to reach number 1\r\n\t\tint totalCount = evenCount + oddCount;\r\n\t\tprintln(\"It took \" + totalCount + \" steps to reach 1.\");\r\n\t}", "public static void main(String[] args) {\n\n System.out.print(\"All numbers: \");\n for(int i = 1; i <= 50; i++ ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // even numbers:\n System.out.print(\"Even Numbers: \");\n for(int i = 2; i <= 50; i+= 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // Odd numbers:\n System.out.print(\"Odd Numbers\");\n for(int i = 1; i<=49; i += 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n System.out.println(\"======================================================\");\n for(int i = 1; i <= 50; i++ ){\n if(i%2 != 0){ // if i' value is odd\n continue; // skip\n }\n System.out.print(i+\" \");\n }\n\n System.out.println();\n\n for(int i = 1; i <= 50; i++ ){\n if(i%2==0){ // if i is odd number\n continue; // skip it\n }\n\n System.out.print(i+\" \");\n\n if(i == 29){\n break; // exits the loop\n }\n\n }\n\n\n System.out.println(\"Hello\");\n\n\n\n }", "HtmlPage clickLink();", "public static void main(String[] args) {\n int number = 1;\n do{\n if ( (number%2 == 0) && (number%7 == 0) ){\n System.out.print(number + \" \");\n }\n number++;\n }while(number<=1000);\n\n\n\n }", "public void milestone1(int num) {\n if (num % 2 == 0)\n System.out.println(\"Even\");\n else\n System.out.println(\"Odd\");\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "public void inputNumber(String number){\n\t\tchar[] strChar = number.toCharArray();\n\t\t\n\t\tfor(char NO: strChar){\n\t\t\tswitch (NO) {\n\t\t\tcase '1':\n\t\t\t\tscreen.click(one, \"NO 1\");\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tscreen.click(tow, \"NO 2\");\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tscreen.click(three, \"NO 3\");\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\tscreen.click(four, \"NO 4\");\n\t\t\t\tbreak;\n\t\t\tcase '5':\n\t\t\t\tscreen.click(five, \"NO 5\");\n\t\t\t\tbreak;\n\t\t\tcase '6':\n\t\t\t\tscreen.click(six, \"NO 6\");\n\t\t\t\tbreak;\n\t\t\tcase '7':\n\t\t\t\tscreen.click(seven, \"NO 7\");\n\t\t\t\tbreak;\n\t\t\tcase '8':\n\t\t\t\tscreen.click(eight, \"NO 8\");\n\t\t\t\tbreak;\n\t\t\tcase '9':\n\t\t\t\tscreen.click(nine, \"NO 9\");\n\t\t\t\tbreak;\n\t\t\tcase '0':\n\t\t\t\tscreen.click(zero, \"NO 0\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main (String[] args){\n int a, rem, rev = 0;\n Scanner ip = new Scanner(System.in);\n a = ip.nextInt();\n while(a>0)\n {\n rem = a%10;\n rev = rev + rem;\n a = a/10;\n }\n System.out.println(rev);\n \n\t}", "@Test\n public void stage04_searchAndPage() {\n String keyWord = \"bilgisayar\";\n Integer pageNumber = 2;\n //Searching with parameters\n SearchKey searchKey = new SearchKey(driver);\n HomePage homePage = searchKey.search(keyWord, pageNumber);\n //Getting current url\n String currentUrl = homePage.getCurrentURL();\n //Testing if this is desired page\n assertEquals(currentUrl, \"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\");\n //logging\n if (currentUrl.equals(\"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\")) {\n logger.info(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n } else {\n logger.error(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n }\n }", "public boolean isOdd(){\r\n\t\tif (value % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public double divide(double firstNumber, double secondNUmber){\n\t\tdouble result=0.0;\n\t\t\n\t\t\tresult = firstNumber / secondNUmber;\n\t\t\n\t\t\tSystem.out.println(\"hej \");\n\t\t\n\t\tif (Double.isInfinite(result)){\n\t\t\tSystem.out.println(\"7767878\");\n\t\t\treturn -1111.1111;\n\t\t}\t\t\n\t\t\n\t\t\n\t\treturn result;\n\t}", "public static boolean isOdd(MyInteger n1){\n return n1.isOdd();\n }", "public static void main(String[] args) {\n\t\tInteger n;\nScanner sc= new Scanner (System.in);\n System.out.print (\"Introdusca un Numero\");\n\t\tn = sc. nextInt();\n\t\tif (n%2==0);\n\t\t\tSystem.out.print(\"Es un numero par\");\n\t\n\telse\n\t\t\tSystem.out.print(\"es un numero impar\");\n\t\t\n\n\t}", "static int getPageNumber(String value){\n int pageNumber = 1;\n if(!TextUtils.isEmpty(value)){\n pageNumber = Integer.getInteger(value, pageNumber);\n }\n return pageNumber;\n }", "public int setNextEven() {\n\t\twhile(x % 2 != 0) {\n\t\t\tx++;\n\t\t}\n\n\t\t// sets the new even number equal to x\n\t\tRuntimeThr.evenOddSequence = x;\n\n\t\t// Returns the next even number\n\t\treturn x;\n\t}", "String nextLink();", "public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}", "public static void main(String[] args) {\n\n\t\tint a [] = new int[] {678,70,800,91900};\n\t\tint value = findEvenNUmberDigit(a);\n\t\tSystem.out.println(value);\n\t}", "public static void main(String[] args) {\n int counter = 0;\n while (counter<30){\n counter +=3;\n System.out.print(counter + \" \");\n\n }\n System.out.println(\" \");\n int evenNumber = 0;\n while(evenNumber <=50){\n System.out.print( evenNumber + \" \");\n evenNumber +=2;\n\n }\n System.out.println(\" \");\n int oddNumber = 1;\n while (oddNumber<=50){\n System.out.print(oddNumber + \" \");\n\n oddNumber+=2;\n }\n\n System.out.println(\"---------------------\");\n int evenNumber2 = 20;\n if(evenNumber2 %2 == 0){\n System.out.println(evenNumber2 + \" is even number\");\n }else{\n System.out.println(evenNumber2 + \" is odd number\");\n }\n ++evenNumber2;\n\n\n System.out.println(\"---------------------------------\");\n\n int oddNumber2 = 21;\n if (oddNumber2 %2==1){\n System.out.println(oddNumber2 + \" is odd number\");\n }else{\n System.out.println(evenNumber2 + \" is even number\");\n }\n ++oddNumber2;\n\n }" ]
[ "0.59434646", "0.5519697", "0.5488343", "0.54833996", "0.5482036", "0.54457766", "0.5400052", "0.53836966", "0.53615683", "0.5330166", "0.5300766", "0.5288227", "0.5214112", "0.52103925", "0.5187659", "0.51697487", "0.51523006", "0.5149202", "0.5149061", "0.5135286", "0.505445", "0.5020978", "0.49775457", "0.4976604", "0.49726623", "0.49703383", "0.49615565", "0.49583292", "0.49536967", "0.49437946", "0.4936487", "0.49238157", "0.4919482", "0.49182525", "0.49143735", "0.49043673", "0.48982686", "0.48951527", "0.48935443", "0.48923442", "0.48894492", "0.4889367", "0.48836952", "0.48753756", "0.4874394", "0.48686105", "0.48599145", "0.4859079", "0.48579946", "0.48459935", "0.48459697", "0.48319042", "0.48296458", "0.48196638", "0.48196292", "0.48058152", "0.48039317", "0.48036438", "0.47990936", "0.47788918", "0.47767925", "0.47726646", "0.47709388", "0.47667348", "0.47618607", "0.47617263", "0.4760487", "0.47602138", "0.47563988", "0.47498688", "0.47336888", "0.47322106", "0.47205415", "0.47197297", "0.47156677", "0.47156677", "0.4707463", "0.47033662", "0.46993786", "0.4698495", "0.46905795", "0.46834207", "0.46775642", "0.46760464", "0.467242", "0.46705225", "0.4669418", "0.46599537", "0.46534538", "0.4650147", "0.464616", "0.46358544", "0.4634704", "0.463134", "0.4628384", "0.46175018", "0.4616415", "0.46125442", "0.4595568", "0.45853832" ]
0.5840325
1
Navigate to Digits/OverUnder page
public static void NavigateToDigitsOverUnder(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Digits(driver).click(); Trade_Page.link_OverUnder(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "private void forwardPage()\n {\n page++;\n open();\n }", "HtmlPage clickLink();", "private void backPage()\n {\n page--;\n open();\n }", "public void goToPrinterSection(){\n click(By.name(printerTab));\n }", "Integer getPage();", "Point onPage();", "int getPageNumber();", "HtmlPage clickSiteLink();", "int getPage();", "@Test()\n\tpublic static void Homep1() {\n\t\t\n\t\tdriver= CallingChrome();\ndriver.navigate().to(\"https://www.spicejet.com/\");\n\t\t\n\n\t\t\n\t\tSystem.out.println(driver.findElement(By.xpath(\"//a[text()='Book']\")).getText());\t\n\t}", "public static void upToNumber(int start) {\n\t\tSystem.out.println(start);\n\t\tstart-=1;\n\t\tif (start < 0)\n\t\t\treturn;\n\t\tupToNumber(start);\n\t}", "HtmlPage clickSiteName();", "private static void passoutNum(int start, int end) {\n\t\tlindOfNum(0, start);\n\n\t\tif(start == end) {\n\t\t\t//System.out.println(end);\n\t\t\treturn;\n\t\t}\n\t\t//System.out.print(start);\n\t\tpassoutNum(start + 1, end);\n\t\tlindOfNum(0, start);\n\n\t}", "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "@Test\r\n\tpublic void test_5_NavigatePage() throws InterruptedException {\n\t\tdriver.findElement(By.linkText(\"2\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t// get page title\r\n\t\tString pageTitle = driver.getTitle();\r\n\t\t// get current page number\r\n\t\tWebElement element = driver.findElement(By.xpath(\"//div[@id='pagn']/span[3]\"));\r\n\t\tString actualPageNumber = element.getText();\r\n\t\tString expectedPageNumber = \"2\";\r\n\t\tAssert.assertEquals(actualPageNumber, expectedPageNumber);\r\n\t\t// if the page title contains \"samsung\" then navigation is successful \r\n\t\tAssert.assertTrue(pageTitle.contains(\"Amazon.com: samsung\"));\r\n\t\tSystem.out.println(\"Page \" + actualPageNumber + \" is displayed\");\r\n\t}", "private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }", "public void onePointHome(View view) {\r\n homeScore += 1;\r\n displayHomeScore(homeScore);\r\n }", "public static void look() {\r\n\t\t\r\n\t\tif (ths.page == 2) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "@Test\n public void testHelloTrailInteger()\n {\n driver.get(\"https://cs1632ex.herokuapp.com/hello/77\");\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Hello CS1632, from 77!\"));\n }", "private void switchTo(String pageValue) {\n\t\tthis.fenetre.getCardLayout().show(this.fenetre.getContentPane(), pageValue);\n\t}", "@Override\n\tpublic void navigateToNext(String phoneNum) {\n\t\t\n\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "public int switchingPage(By by) {\n\t\ttry {\n\t\t\tdriver.findElement(by).click();\n\t\t\tfullPageScroll();\n\t\t} catch (NoSuchElementException e) {\n\t\t\tSystem.out.println(e.getMessage());;\n\t\t}\n\t\t/*\n\t\tint limits = 5;\n\t\tdo {\n\t\t\tdriver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);\n\t\t\tswitchedpage = currentPageNumber();\n\t\t\tlimits--;\n\t\t} while ((switchedpage == 0) && limits > 0);\n\t\t*/\n\t\tSystem.out.println(currentPageNumber() + \" <- currentPageNumber\");\n\n\t\treturn currentPageNumber();\n\t}", "private void goToDetailedRune()\n\t{\n\t\tLog.e(\"before pages\", String.valueOf(player.getSummonerID()));\n\t\tRunePages tempPages = player.getPages().get(String.valueOf(player.getSummonerID()));\n\t\tLog.e(\"after pages\", String.valueOf(tempPages.getSummonerId()));\n\t\tSet<RunePage> tempSetPages = tempPages.getPages();\n\t\tRunePage currentPage = new RunePage();\n\t\tfor (RunePage tempPage : tempSetPages)\n\t\t{\n\t\t\tif (tempPage.getName() == player.getCurrentRunePage())\n\t\t\t{\n\t\t\t\tLog.e(\"temp page\", \"page found\");\n\t\t\t\tcurrentPage = tempPage;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// now we have the page, need to get the runes out of it\n\t\tList<RuneSlot> tempSlots = currentPage.getSlots();\n\t\tArrayList<Integer> tempIDs = new ArrayList<Integer>();\n\t\tLog.e(\"tempSlots size\", String.valueOf(tempSlots.size()));\n\t\tfor (int i = 0; i < tempSlots.size(); i++)\n\t\t{\t\n\t\t\tLog.e(\"tempSlot\", String.valueOf(tempSlots.get(i).getRune()));\n\t\t\ttempIDs.add(tempSlots.get(i).getRune());\n\t\t}\n\t\tfillRuneList(tempIDs);\n\t\t// go to the screen\n\t\tIntent intent = new Intent(activity, RuneDetailActivity.class);\n\t\tactivity.startActivity(intent);\n\t}", "public StatusCodesHomePage clickLinkToCodePage() {\n\t\tgetDriver().findElementDynamic(selectorLinkToCodesPage)\n\t\t\t\t.click();\n\t\treturn new StatusCodesHomePage();\n\t}", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "public static int getPageTo(String info) {\n/* 816 */ int pageNum = 0;\n/* */ \n/* 818 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 820 */ JSONObject jsonObj = new JSONObject(info);\n/* 821 */ pageNum = jsonObj.getInt(\"To\");\n/* 822 */ } catch (Exception e) {\n/* 823 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 827 */ return pageNum;\n/* */ }", "public void Next(View view)\n {\n increaseNum();\n }", "public WebElement getGoToPageNumberElement(String pageNumber) {\r\n\t\treturn driver.findElement(By.xpath(\"//a[@class='pagination__link'][contains(text(),'\"+pageNumber+\"')]\"));\r\n\t}", "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 ClickIVANSInformationPage() {\r\n\t\tivansinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"IVANS Information\\\" button on the Birthdays page\");\r\n\t}", "public void navigateToPreAdmission_StudentCountReport() throws Exception {\r\n\r\n\t\tclickOnButton(btn_PreAdmission);\r\n\t\tlog(\"Clicked on PreAdmission Button and object is:-\" + btn_PreAdmission.toString());\r\n\r\n\t\tclickOnButton(btn_Preadmission_Reports);\r\n\t\tlog(\"Clicked on PreAdmission Reports and object is:-\" + btn_Preadmission_Reports.toString());\r\n\r\n\t\tclickOnButton(btn_StudentCountReport);\r\n\t\tlog(\"Clicked on Student count report to open page and object is:-\" + btn_StudentCountReport.toString());\r\n\r\n\t}", "public static void talk() {\r\n\t\t\r\n\t\tif (ths.page == 3) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "private void gotoCompletePage() {\n WebkitUtil.forward(mWebView, AFTER_PRINT_PAGE);\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "static int designerPdfViewer(int[] h, String word) {\n char[] charactersInString = word.toCharArray();\n int top = 0;\n for ( char character: charactersInString){\n System.out.println(Character.getNumericValue(character));\n if (top < h[(Character.getNumericValue(character)-10)]){\n top = h[(Character.getNumericValue(character)-10)];\n }\n }\n int area = (top)*word.length();\n\n\n\n System.out.println(area);\n return area;\n }", "void showPage1(){\n displayPage();\n up.setVisible(false);\n if(page != maxPage){\n down.setVisible(true);\n }\n back.setVisible(true);\n next.setVisible(true);\n go.setVisible(true);\n txtPage.setVisible(true);\n for(int i = 0; i < lbl.size() && i < max;i++){\n lbl.get(i).setVisible(true);\n select.get(i).setVisible(true);\n deselect.get(i).setVisible(true);\n if(chars.contains(i)){\n select.get(i).setEnabled(false);\n deselect.get(i).setEnabled(true);\n }else{\n select.get(i).setEnabled(true);\n deselect.get(i).setEnabled(false);\n }\n }\n }", "public static void NavigateToDigitsEvenOdd(WebDriver driver,String market,String asset) {\n\t\tSelect mSelect = new Select(Trade_Page.select_Market(driver));\n\t\tmSelect.selectByVisibleText(market);\n\t\tSelect aSelect = new Select(Trade_Page.select_Asset(driver));\n\t\taSelect.selectByVisibleText(asset);\n\t\tTrade_Page.link_Digits(driver).click();\n\t\tTrade_Page.link_EvenOdd(driver).click();\n\t}", "public void gotoDetailSalesOrder() {\n\t}", "int getCurrentPage();", "public void openUsagePoints() {\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.id(\"button-1049\")).click();\n }", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "protected void jumpPage() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.txtjump));\n\t\tfinal SeekBar seek = new SeekBar(this);\n\t\tseek.setOnSeekBarChangeListener(this);\n\t\tseek.setMax(100);\n\t\tint p = (int) (BookPageFactory.sPercent * 100);\n\t\tseek.setProgress(p);\n\t\tbuilder.setView(seek);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tint per = seek.getProgress();\n\t\t\t\t\t\t\tif (per >= 0.0 && per <= 100.0) {\n\t\t\t\t\t\t\t\tmPagefactory.jumpPage(per);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tmPagefactory.onDraw(mCurPageCanvas);\n\t\t\t\t\t\t\t\tmPageWidget.setBitmaps(mCurPageBitmap,\n\t\t\t\t\t\t\t\t\t\tmNextPageBitmap);\n\t\t\t\t\t\t\t\tmPageWidget.startAnimation(1000);\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.successjump),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.hintjunp),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\t// @Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "public void testMainPage() {\n\t\tbeginAt(\"numguess.jsp\");\n\t\tassertTitleEquals(\"Number Guess\");\n\t\tassertTextPresent(\"Welcome to the Number Guess game\");\n\t\tassertFormElementPresent(\"guess\");\t\t\n\t}", "public Integer goToHome() throws CallError, InterruptedException {\n return (Integer)service.call(\"goToHome\").get();\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.text_keyone:\n\t\t\tsendChar(pageoffset + 0);\n\t\t\tbreak;\n\t\tcase R.id.text_keytwo:\n\t\t\tsendChar(pageoffset + 1);\n\t\t\tbreak;\n\t\tcase R.id.text_keythree:\n\t\t\tsendChar(pageoffset + 2);\n\t\t\tbreak;\n\t\tcase R.id.text_keyfour:\n\t\t\tsendChar(pageoffset + 3);\n\t\t\tbreak;\n\t\tcase R.id.text_keyfive:\n\t\t\tsendChar(pageoffset + 4);\n\t\t\tbreak;\n\t\tcase R.id.text_keysix:\n\t\t\tsendChar(pageoffset + 5);\n\t\t\tbreak;\n\t\tcase R.id.text_keyseven:\n\t\t\tsendChar(pageoffset + 6);\n\t\t\tbreak;\n\t\tcase R.id.text_keyeight:\n\t\t\tsendChar(pageoffset + 7);\n\t\t\tbreak;\n\t\tcase R.id.text_keynine:\n\t\t\tsendChar(pageoffset + 8);\n\t\t\tbreak;\n\t\tcase R.id.text_keyzero:\n\t\t\tsendChar(pageoffset + 9);\n\t\t\tbreak;\n\n\t\tcase R.id.text_keypound:\n\t\t\tpageChange(1);\n\t\t\tbreak;\n\t\tcase R.id.text_keystar:\n\t\t\tpageChange(-1);\n\t\t\tbreak;\n\t\t}\n\t}", "public String navigator(){\n\t System.out.println(10/0);\n\t return \"anonymousView\";\n\t }", "public boolean goTo(int floor);", "public void goBackToAppHome() {\n UiObject topNavigationBar = mDevice.findObject(new UiSelector().text(\"mytaxi demo\"));\n int backpressCounter = 0; //to avoid infinite loops\n while(!topNavigationBar.exists()) {\n mDevice.pressBack();\n backpressCounter++;\n if(backpressCounter>10)\n break;\n }\n }", "public static int getPageFrom(String info) {\n/* 793 */ int pageNum = 0;\n/* */ \n/* 795 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 797 */ JSONObject jsonObj = new JSONObject(info);\n/* 798 */ pageNum = jsonObj.getInt(\"From\");\n/* 799 */ } catch (Exception e) {\n/* 800 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 804 */ return pageNum;\n/* */ }", "public HtmlPage clickContentPath();", "String nextLink();", "io.dstore.values.IntegerValue getPageNo();", "io.dstore.values.IntegerValue getPageNo();", "@FXML\n public void goToMult(ActionEvent event) throws IOException, SQLException { //NEXT SCENE\n \tdoChecking();\n \t\n \ttry {\n\t \tif(checkIntPos && checkFloatPos && checkIntPosMatl && checkFloatPosMatl) {\n\t \t\t//store the values\n\t \t\tstoreValues();\n\t \t\t\n\t \t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Mult.fxml\"));\n\t \t\tParent root = loader.load();\n\t \t\t\n\t \t\tMultController multCont = loader.getController(); //Get the next page's controller\n\t \t\tmultCont.showInfo(); //Set the values of the page \n\t \t\tScene multScene = new Scene(root);\n\t \t\tStage mainWindow = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \t\tmainWindow.setScene(multScene);\n\t \t\tmainWindow.show();\n\t \t}\n \t}catch(Exception e) {\n\t\t\tValues.showError();\n\t\t}\n }", "@Override\n public void onClick(View view){\n Intent numbersActivityIntent = new Intent(this, NumbersActivity.class);\n startActivity(numbersActivityIntent);\n }", "PreViewPopUpPage clickImageLink();", "@When ( \"I navigate to the HCP personal representatives page\" )\n public void goToRepsPageHCP () throws InterruptedException {\n driver.get( baseUrl + \"/hcp/viewPersonalRepresentatives\" );\n Thread.sleep( PAGE_LOAD );\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 gotoHome(){ application.gotoHome(); }", "public void ClickCommissionInformationPage() {\r\n\t\tcommissioninfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Information\\\" button on the Birthdays page\");\r\n\t}", "@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}", "public String gotoPage() {\n return FxJsfUtils.getParameter(\"page\");\n }", "public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }", "String pageDetails();", "public void clickOnMoreLatesBookLink() {\n\t}", "public void testExamplePage() throws Exception\n\t{\n\t\tWebNavigator nav = new WebNavigator();\n\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().deep().id(\"randomLink\").activate();\n\n\t\t// Same as above, but the search for id \"randomLink\" starts at the page\n\t\t// level\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().id(\"randomLink\").activate();\n\n\t\t// Gets the first element whose id matches starts with \"random\" and\n\t\t// attempts to activate it.\n\t\t// Note that if we had, say, a BR tag earlier in the page that had an id\n\t\t// of \"randomBreak\",\n\t\t// the navigation would attempt to activate it and throw an exception.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().pattern().id(\"random.*\").activate();\n\n\t\t// Search for the anchor by href. Here you assume that the href will\n\t\t// always be \"goRandom.html\".\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().href(\"goRandom.html\").activate();\n\n\t\t// Do a step-by-step navigation down the dom. This assumes a lot about\n\t\t// the page layout,\n\t\t// and makes for a very brittle navigation.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().div().id(\"section1\").children().div().id(\"subsectionA\").children().a().activate();\n\n\t\t// Do a deep search for an anchor that contains the exact text \"Click\n\t\t// here to go a random location\"\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().text(\"Click here to go a random location\").activate();\n\n\t\t// Do a deep search for an anchor whose text contains \"random\" at any\n\t\t// point.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().pattern().text(\".*random.*\").activate();\n\t}", "public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "public void navigateByPage(int pageNum) {\n String jsCommand = \"goToPage(\" + pageNum + \");\";\n try {\n this.webView.getEngine().executeScript(jsCommand);\n } catch (RuntimeException ex) {\n ex.printStackTrace();\n if (!this.pdfJsLoaded) this.toExecuteWhenPDFJSLoaded += jsCommand;\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 }", "public static void printHomeChoises() {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"\\nEcolha a seguir a ação deseja inserindo o numero relativo\")\n .append(\"\\n1 - Cadastrar Novo Usuário\")\n .append(\"\\n2 - Imprimir Usuários\")\n .append(\"\\n3 - Informação do Sistema/Empresa\")\n .append(\"\\n4 - Sair do Sistema\")\n .append(\"\\n==============================\");\n\n System.out.println(sb.toString());\n }", "@Override\n\tpublic void goHome() {\n\t\tSystem.out.println(\"回窝了!!!!\");\n\t}", "public void twoPointsHome(View view) {\r\n homeScore += 2;\r\n displayHomeScore(homeScore);\r\n }", "public boolean navigateToShoppageThroghPageIntion(WebDriver driver) {\n\t\treturn shoppage.clickOnPageInition(driver);\n\t}", "public String getPageSymbol(ItemStack page);", "public static int getHomeTabIndexByPageName(java.lang.String r7) {\n /*\n boolean r0 = android.text.TextUtils.isEmpty(r7)\n r1 = 0\n if (r0 == 0) goto L_0x0008\n return r1\n L_0x0008:\n boolean r0 = com.alimama.moon.ui.BottomNavActivity.sIsSwitchMidH5Tab\n r2 = -1\n r3 = 4\n r4 = 3\n r5 = 2\n r6 = 1\n if (r0 == 0) goto L_0x0050\n int r0 = r7.hashCode()\n switch(r0) {\n case -1074341483: goto L_0x0041;\n case -934521548: goto L_0x0037;\n case -121207376: goto L_0x002d;\n case 3351635: goto L_0x0023;\n case 110545371: goto L_0x0019;\n default: goto L_0x0018;\n }\n L_0x0018:\n goto L_0x004a\n L_0x0019:\n java.lang.String r0 = \"tools\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x004a\n r2 = 1\n goto L_0x004a\n L_0x0023:\n java.lang.String r0 = \"mine\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x004a\n r2 = 4\n goto L_0x004a\n L_0x002d:\n java.lang.String r0 = \"discovery\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x004a\n r2 = 0\n goto L_0x004a\n L_0x0037:\n java.lang.String r0 = \"report\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x004a\n r2 = 3\n goto L_0x004a\n L_0x0041:\n java.lang.String r0 = \"middle\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x004a\n r2 = 2\n L_0x004a:\n switch(r2) {\n case 0: goto L_0x0092;\n case 1: goto L_0x0091;\n case 2: goto L_0x008f;\n case 3: goto L_0x008d;\n case 4: goto L_0x004e;\n default: goto L_0x004d;\n }\n L_0x004d:\n goto L_0x0092\n L_0x004e:\n r1 = 4\n goto L_0x0092\n L_0x0050:\n int r0 = r7.hashCode()\n switch(r0) {\n case -1074341483: goto L_0x0080;\n case -934521548: goto L_0x0076;\n case -121207376: goto L_0x006c;\n case 3351635: goto L_0x0062;\n case 110545371: goto L_0x0058;\n default: goto L_0x0057;\n }\n L_0x0057:\n goto L_0x0089\n L_0x0058:\n java.lang.String r0 = \"tools\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x0089\n r2 = 1\n goto L_0x0089\n L_0x0062:\n java.lang.String r0 = \"mine\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x0089\n r2 = 4\n goto L_0x0089\n L_0x006c:\n java.lang.String r0 = \"discovery\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x0089\n r2 = 0\n goto L_0x0089\n L_0x0076:\n java.lang.String r0 = \"report\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x0089\n r2 = 3\n goto L_0x0089\n L_0x0080:\n java.lang.String r0 = \"middle\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x0089\n r2 = 2\n L_0x0089:\n switch(r2) {\n case 0: goto L_0x0092;\n case 1: goto L_0x0091;\n case 2: goto L_0x0092;\n case 3: goto L_0x008f;\n case 4: goto L_0x008d;\n default: goto L_0x008c;\n }\n L_0x008c:\n goto L_0x0092\n L_0x008d:\n r1 = 3\n goto L_0x0092\n L_0x008f:\n r1 = 2\n goto L_0x0092\n L_0x0091:\n r1 = 1\n L_0x0092:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.alimama.moon.features.home.HomeUtil.getHomeTabIndexByPageName(java.lang.String):int\");\n }", "public void page()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_page=3\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The list of accounts in the page 3 is displayed below:\");\n response.prettyPrint();\n }", "public static void craft() {\r\n\t\t\r\n\t\tif (ths.page == 5) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public void learnMoreOnClick(View view) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.cdc.gov/healthywater/drinking/nutrition/index.html\")));\n }", "public void showNextNumber(){\r\n int maximumNumberToDisplay = 1000;\r\n this.numberToDisplay++;\r\n resetIfNecessary(maximumNumberToDisplay);\r\n }", "@Test\n public void stage04_searchAndPage() {\n String keyWord = \"bilgisayar\";\n Integer pageNumber = 2;\n //Searching with parameters\n SearchKey searchKey = new SearchKey(driver);\n HomePage homePage = searchKey.search(keyWord, pageNumber);\n //Getting current url\n String currentUrl = homePage.getCurrentURL();\n //Testing if this is desired page\n assertEquals(currentUrl, \"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\");\n //logging\n if (currentUrl.equals(\"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\")) {\n logger.info(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n } else {\n logger.error(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n }\n }", "public void clickOnHome() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_home\");\n\t\twait.waitForElementToBeClickable(element(\"link_home\"));\n\t\texecuteJavascript(\"document.getElementById('doctor-home').getElementsByTagName('i')[0].click();\");\n//\t\t element(\"link_home\").click();\n\t\tlogMessage(\"user clicks on Home\");\n\t}", "private void nextNumber() {\n\t\tint old=pos;\n\t\tmany(digits);\n\t\ttoken=new Token(\"num\",program.substring(old,pos));\n }", "@Override\n public void chainNumber(int level) {\n if (this.level == level)\n {\n System.out.println(\"Tickets Screen\"); //If this link handles the object, this line will be displayed\n }\n else \n {\n next.chainNumber(level); //If this link does not handle the object, it passes the object to the next link\n System.out.println(\"Tickets does not handle this request\");\n }\n }", "public void ClickCommissionRatesPage() {\r\n\t\tcommissionrates.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Rates\\\" button on the Birthdays page\");\r\n\t}", "@When(\"^the user open Automation Home page$\")\r\n\tpublic void the_user_open_Automation_Home_page() throws Throwable {\n\t w.Homepage1();\r\n\t}", "public void backToHome(){\n logger.debug(\"click on Back to Home button\");\n driver.findElement(oBackToHome).click();\n }", "public void setHomeNumber(String homeNumber) {\r\n this.homeNumber = homeNumber;\r\n }", "public void goHome();", "@Override\r\n\t\tpublic void onClick(View arg0) {\n\t\t Intent intent =new Intent(Intent.ACTION_CALL);\r\n\t\t intent.setData(Uri.parse(\"tel:1072\"));\r\n\t\t startActivity(intent);\r\n\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i= new Intent(MainActivity.this,page8.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\t\n\t\t\t}", "public void viewContactDetails() {\n wd.findElement(By.xpath(\"//tr/td[7]/a\")).click();\n }", "public void getWantedPageFromPagination()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n List<WebElement> pageOrderList = pageFactory.searchPagePaginationList;\r\n WebElement wantedPageOrder = pageOrderList.get(1);\r\n clickElement(wantedPageOrder, Constant.explicitTime);\r\n }", "static void print_the_address(int print_address){\n\t\tSystem.out.print(decimel_to_hexa(print_address)+\" : \");\n\t}", "boolean hasPageNo();", "boolean hasPageNo();", "private void gotoSTK(){\n\t short buf_length = (short) MyText.length;\n\t short i = buf_length;\n\t initDisplay(MyText, (short) 0, (short) buf_length, (byte) 0x81,(byte) 0x04);\n}" ]
[ "0.57804245", "0.546563", "0.54248875", "0.5402067", "0.52735764", "0.5151129", "0.5130492", "0.5103776", "0.50907105", "0.5071434", "0.5061686", "0.50390005", "0.49695262", "0.49623835", "0.49620637", "0.49571252", "0.49569187", "0.4924578", "0.49143234", "0.49051622", "0.4902267", "0.48999515", "0.48990515", "0.48968527", "0.48911607", "0.48818713", "0.483781", "0.482049", "0.4818791", "0.48039696", "0.48021448", "0.47933832", "0.47890252", "0.47871098", "0.47802913", "0.47685733", "0.47592995", "0.47531587", "0.4750721", "0.47366336", "0.47344622", "0.47160435", "0.47046566", "0.47018206", "0.4700213", "0.46927112", "0.46890137", "0.46752658", "0.46560267", "0.4651523", "0.46485874", "0.46474588", "0.4645755", "0.46449012", "0.46447885", "0.46447885", "0.46446422", "0.46407634", "0.46397734", "0.463867", "0.46378726", "0.46314898", "0.46241277", "0.46198678", "0.46179593", "0.4616721", "0.4614513", "0.46097377", "0.460887", "0.46083367", "0.46074346", "0.46024328", "0.46002042", "0.4598229", "0.45946983", "0.45873183", "0.45823696", "0.4576866", "0.4573122", "0.45722872", "0.4571737", "0.45656762", "0.45549917", "0.45501688", "0.45496646", "0.45449534", "0.454365", "0.45434612", "0.453077", "0.45305377", "0.45271522", "0.45261565", "0.45248613", "0.45239514", "0.452325", "0.45223334", "0.45194268", "0.45167553", "0.45167553", "0.45109278" ]
0.5867666
0
Method to validate duration fields
public static void ValidateDurationFields(WebDriver driver,String durationType){ if(durationType=="t"){ SelectEnterDuration(driver,"2",durationType); Assert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); Assert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); SelectEnterDuration(driver,"11",durationType); Assert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); Assert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); } else if(durationType=="s") { SelectEnterDuration(driver,"2",durationType); Assert.assertEquals(Trade_Page.err_TradingOfferTop(driver).getText(), "Trading is not offered for this duration."); Assert.assertEquals(Trade_Page.err_TradingOfferBottom(driver).getText(), "Trading is not offered for this duration."); SelectEnterDuration(driver,"99999",durationType); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); } else if(durationType=="m"){ SelectEnterDuration(driver,"0",durationType); Assert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), "Expiry time cannot be equal to start time."); Assert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), "Expiry time cannot be equal to start time."); SelectEnterDuration(driver,"9999",durationType); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); } else if(durationType=="h"){ SelectEnterDuration(driver,"0",durationType); Assert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), "Expiry time cannot be equal to start time."); Assert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), "Expiry time cannot be equal to start time."); SelectEnterDuration(driver,"999",durationType); System.out.println(Trade_Page.err_TopPurchase(driver).getText()); //Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); //Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); } else if(durationType=="d"){ SelectEnterDuration(driver,"0",durationType); Assert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), "Expiry time cannot be equal to start time."); Assert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), "Expiry time cannot be equal to start time."); SelectEnterDuration(driver,"366",durationType); Assert.assertEquals(Trade_Page.err_CannotCreateContractTop(driver).getText(), "Cannot create contract"); Assert.assertEquals(Trade_Page.err_CannotCreateContractBottom(driver).getText(), "Cannot create contract"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean durationValidation(int duration){\n return duration < 300 && duration >10;\n }", "public void validateTestDuration(LocalTime duration, LocalDateTime startDate, LocalDateTime endDate)\n\t\t\tthrows UserException {\n\t\tlong hours = ChronoUnit.HOURS.between(startDate, endDate);\n\t\tif (duration.getHour() > hours) {\n\t\t\tthrow new UserException(\"Duration cannot be more than start time and end time\");\n\t\t\n\t}}", "private static boolean isValidDuration(String duration)\n {\n for (Duration d : Duration.values()) {\n if (d.name().equals(duration)) {\n return true;\n }\n }\n\n return false;\n }", "@Test\n\tvoid testCheckDuration4() {\n\t\tassertFalse(DataChecker.checkDuration(null));\n\t}", "@Test\n\tvoid testCheckDuration2() {\n\t\tassertFalse(DataChecker.checkDuration(Duration.ofMinutes(-11)));\n\t}", "public static boolean isValidDuration(String duratonString) throws NumberFormatException {\n double duration = Double.parseDouble(duratonString);\n return duration > 0 && duration < 24;\n }", "boolean isSetDuration();", "boolean isSetDuration();", "boolean isSetDuration();", "public static boolean isValidDuration(String test) {\n try {\n long minutes = Long.parseLong(test);\n Duration mightBeValid = Duration.ofMinutes(minutes);\n return isValidDuration(mightBeValid);\n } catch (NumberFormatException e) {\n return false;\n }\n }", "public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n return false;\n }\n if(startSpinner.getValue().equals(endSpinner.getValue())){\n showError(true, \"The start time can not be the same as the end time.\");\n return false;\n }\n startLDT = convertToTimeObject(startSpinner.getValue());\n endLDT = convertToTimeObject(endSpinner.getValue());\n startZDT = convertToSystemZonedDateTime(startLDT);\n endZDT = convertToSystemZonedDateTime(endLDT);\n\n if (!validateZonedDateTimeBusiness(startZDT)){\n return false;\n }\n if (!validateZonedDateTimeBusiness(endZDT)){\n return false;\n };\n return true;\n }", "private void validateTime()\n {\n List<Object> collisions = validateCollisions();\n\n for (Object object : collisions)\n {\n if (DietTreatmentBO.class.isAssignableFrom(object.getClass()))\n {\n _errors.add(String\n .format(\"Die Diätbehandlung '%s' überschneidet sich mit der Diätbehandlung '%s'\",\n _dietTreatment.getDisplayText(),\n ((DietTreatmentBO) object).getName()));\n }\n }\n }", "@Test\n\tvoid testCheckDuration3() {\n\t\tassertFalse(DataChecker.checkDuration(Duration.ZERO));\n\t}", "boolean isValidExpTime();", "boolean hasDuration();", "public boolean validateTimes() {\n if (!allDay) {\n // Convert the time strings to ints\n int startTimeInt = parseTime(startTime);\n int endTimeInt = parseTime(endTime);\n\n if (startTimeInt > endTimeInt) {\n return false;\n }\n }\n return true;\n }", "@Test\n public void isValidFormat() {\n assertFalse(Deadline.isValidFormat(VALID_DAY_1));\n\n // Deadline with day and month dd/mm -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Deadline with all 3 fields dd/mm/yyyy -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_2018.toString()));\n }", "public boolean validate() {\n String sDayCheck = sDayView.getText().toString();\n String eDayCheck = eDayView.getText().toString();\n String sTimeCheck = sTimeView.getText().toString();\n String eTimeCheck = eTimeView.getText().toString();\n\n if ((titleView.getText().toString().matches(\"\")) || (roomView.getText().toString().matches(\"\"))) {\n Toast.makeText(getApplicationContext(),\"Please fill in all fields.\",Toast.LENGTH_SHORT).show();\n return false;\n }\n\n if ((sDayCheck.length() != 10) ||\n (eDayCheck.length() != 10) ||\n (sTimeCheck.length() != 5) ||\n (eTimeCheck.length() != 5)) {\n Toast.makeText(getApplicationContext(),\"Please check your Date and Time fields.\",Toast.LENGTH_SHORT).show();\n return false;\n } else if ((sDayCheck.charAt(2) != '/') || (sDayCheck.charAt(5) != '/') ||\n (eDayCheck.charAt(2) != '/') || (eDayCheck.charAt(5) != '/')) {\n Toast.makeText(getApplicationContext(), \"Please check your Date fields.\", Toast.LENGTH_SHORT).show();\n return false;\n } else if ((sTimeCheck.charAt(2) != ':') || (eTimeCheck.charAt(2) != ':')) {\n Toast.makeText(getApplicationContext(), \"Please check your Time fields.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n if (!endDateAfter(sDayCheck, eDayCheck)) {\n Toast.makeText(getApplicationContext(), \"End date must be on or after the Start date.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n if (!endTimeAfter(sTimeCheck, eTimeCheck)) {\n Toast.makeText(getApplicationContext(), \"End time must be on or after the Start time.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n if (isOutOfDate(eDayCheck)) {\n Toast.makeText(getApplicationContext(), \"End date must be on or after Today's Date.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "@Test\r\n\tpublic void testGetDuration() {\r\n\t\tassertEquals(90, breaku1.getDuration());\r\n\t\tassertEquals(90, externu1.getDuration());\r\n\t\tassertEquals(90, meetingu1.getDuration());\r\n\t\tassertEquals(90, teachu1.getDuration());\r\n\t}", "@Override\n\tpublic void validate(Component arg0, Object arg1) throws WrongValueException {\n\t\tif (arg0 instanceof Timebox) {\n\n\t\t\t// no need for checking ?\n\t\t\tif (((Timebox) arg0).isDisabled())\n\t\t\t\treturn;\n\t\t\t\n\t\t\tif (arg1 == null)\n\t\t\t\tthrow new WrongValueException(arg0, \"Campo obligatorio\");\n\t\t\telse{\n\t\t\t\tCalendar validaMinutos = Calendar.getInstance();\n\t\t\t\tvalidaMinutos.setTime((Date)arg1);\n\t\t\t\tint totalMinutos = ((validaMinutos.get(Calendar.HOUR_OF_DAY)*60) + validaMinutos.get(Calendar.MINUTE));\n\t\t\t\t\n\t\t\t\tif(totalMinutos < 15)\n\t\t\t\t\tthrow new WrongValueException(arg0, \"Duración mínima de recesos es de 15 minutos\");\n\t\t\t\telse\n\t\t\t\t\tif(totalMinutos % 5 != 0)\n\t\t\t\t\t\tthrow new WrongValueException(arg0, \"Tiempo no permitido, debe ser múltiplo de 5 minutos\");\n\t\t\t}\n\t\t}\n\t}", "@POST\n public FormValidation doCheckSpotBlockReservationDurationStr(@QueryParameter String value) {\n if (value == null || value.trim().isEmpty())\n return FormValidation.ok();\n try {\n int val = Integer.parseInt(value);\n if (val >= 0 && val <= 6)\n return FormValidation.ok();\n } catch (NumberFormatException nfe) {\n }\n return FormValidation.error(\"Spot Block Reservation Duration must be an integer between 0 & 6\");\n }", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private static void checkFormat(String str) {\n if (str.length() != 8)\n throw new IllegalArgumentException(\"length has too be 8\");\n try {\n Integer.parseInt(str.substring(0,2)); //Hours\n Integer.parseInt(str.substring(3,5)); //Minutes\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"These numbers are wrong\");\n }\n if (str.charAt(2) != ':') {\n throw new IllegalArgumentException(\"requires colon between times\");\n }\n if (str.charAt(5) != ' ') {\n throw new IllegalArgumentException(\"requires space between time and period\");\n }\n String mStr = str.substring(6);\n if (!mStr.equals(\"PM\") && !mStr.equals(\"AM\")) {\n throw new IllegalArgumentException(\"Must be AM or PM\");\n }\n }", "protected abstract List<TemporalField> validFields();", "Builder addTimeRequired(Duration value);", "public static boolean validateTime(String validTill) {\n\t\treturn true;\n\t}", "private boolean isDuration(ComparisonExpression comp) {\n return comp.getLhs() instanceof DurationComparable ||\n comp.getRhs() instanceof DurationComparable ||\n comp.getLhs() instanceof TimeConstantComparable ||\n comp.getRhs() instanceof TimeConstantComparable;\n }", "public boolean isDuration() {\n return false;\n }", "public boolean hasDuration() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean hasDuration() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private boolean validateFields() {\n\t\tList<String> errorMsg = new ArrayList<>();\n\n\t\tif (aliasField.getText().equals(\"\"))\n\t\t\terrorMsg.add(\"Alias cannot be left empty.\\n\");\n\n\t\tif (carComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A car should be assigned to the trip.\\n\");\n\n\t\tif (routeComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A route should be assigned to the trip.\\n\");\n\n\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\tif (stopPoint.getTime() == null || stopPoint.getTime().equals(\"\"))\n\t\t\t\terrorMsg.add(\"You need to set an arriving time for '\" + stopPoint.toString() + \"'.\\n\");\n\t\t}\n\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null)\n\t\t{\n\t\t\tif (startDatePicker.getValue().isBefore(LocalDate.now())) {\n\t\t\t\terrorMsg.add(\"Trip start date should be after current date.\\n\");\n\t\t\t} else if (endDatePicker.getValue().isBefore(startDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(\"Trip end date should be after start date.\\n\");\n\t\t\t} else {\n\t\t\t\tSet<DayOfWeek> recurrence = RecurrenceUtility.parseBitmaskToSet(getRecurrence());\n\t\t\t\tboolean isValidRecurrence = false;\n\t\t\t\tfor (LocalDate now = startDatePicker.getValue(); !now.isAfter(endDatePicker.getValue()); now = now.plusDays(1)) {\n\t\t\t\t\tif (recurrence.contains(now.getDayOfWeek()))\n\t\t\t\t\t\tisValidRecurrence = true;\n\t\t\t\t}\n\t\t\t\tif (!isValidRecurrence) {\n\t\t\t\t\terrorMsg.add(\"No recurrent day exists between trip start date and end date.\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terrorMsg.add(\"Trip starts date or/and end date is invalid.\\n\");\n\t\t}\n\n\t\t// consistency check\n\t\t// WOF & registration cannot be expired before the end date of recurring trip\n\t\tCar car = carComboBox.getValue();\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null && car != null) {\n\t\t\tif (LocalDate.parse(car.getWof()).isBefore(endDatePicker.getValue()) ||\n\t\t\tLocalDate.parse(car.getRegistration()).isBefore(endDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(String.format(\"The expiration date of a recurring trip cannot occur after the expiry date of car's WOF and registration.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\" +\n\t\t\t\t\t\t\t\t\"Details for car [%s]:\\n\" +\n\t\t\t\t\t\t\t\t\" a. WOF expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\" b. Registration expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\",\n\t\t\t\t\t\tcar.getPlate(), car.getWof(), car.getRegistration()));\n\t\t\t}\n\t\t}\n\n\t\t// handle and show error message in dialog\n\t\tif (errorMsg.size() != 0) {\n\t\t\tStringBuilder errorString = new StringBuilder(\"Operation failed is caused by: \\n\");\n\t\t\tfor (Integer i = 1; i <= errorMsg.size(); i++) {\n\t\t\t\terrorString.append(i.toString());\n\t\t\t\terrorString.append(\". \");\n\t\t\t\terrorString.append(errorMsg.get(i - 1));\n\t\t\t}\n\t\t\tString headMsg = mode == Mode.ADD_MODE ? \"Failed to add the trip.\" : \"Failed to update the trip.\";\n\t\t\trss.showErrorDialog(headMsg, errorString.toString());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "Builder addTimeRequired(Duration.Builder value);", "public void setDuration(int duration)\r\n\t{\r\n\t\tif (duration < 0) { throw new IllegalArgumentException(\"duration muss groesser als 0 sein\"); }\r\n\t\tthis.duration = duration;\r\n\t}", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "private void pickDuration() {\n boolean keepgoing;\n System.out.println(\"for how long?\");\n keepgoing = true;\n while (keepgoing) {\n int temp = input.nextInt();\n if (temp <= 0 || temp + pickedtime >= 24) {\n System.out.println(\"Invalid duration\");\n } else {\n pickedduration = temp;\n keepgoing = false;\n }\n }\n }", "private boolean timeValidation(String time){\n if(! time.matches(\"(?:[0-1][0-9]|2[0-4]):[0-5]\\\\d\")){\n return false;\n }\n return true;\n }", "@Test\r\n void B6007089_test_SemeterMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Time Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(\"1\");\r\n section.setTime(null);\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"time\", v.getPropertyPath().toString());\r\n }", "protected abstract List<TemporalField> invalidFields();", "private static boolean validate(String line){\n\t\tString[] lineArray = line.split(\" \");\n\t\t\n\t\tif(lineArray.length != 3) return false; //skip lines in incorrect format\n\t\t\n\t\t//http://stackoverflow.com/questions/25873636/regex-pattern-for-exactly-hhmmss-time-string\n\t\tif(!lineArray[0].matches(\"(?:[01]\\\\d|2[0123]):(?:[012345]\\\\d):(?:[012345]\\\\d)\")) return false;\n\n\t\tif(!lineArray[2].equals(\"Start\") && !lineArray[2].equals(\"End\")) return false;\n\t\t\n\t\treturn true;\n\t}", "protected int getDuration() {\n try {\n return Utils.viewToInt(this.durationInput);\n }\n catch (NumberFormatException ex) {\n return Integer.parseInt(durationInput.getHint().toString());\n }\n }", "public void setDuration(int val){this.duration = val;}", "private int isFormValid() {\n Calendar start = new GregorianCalendar(datePicker1.year, datePicker1.month, datePicker1.day, timePicker1.hour, timePicker1.minute);\n Calendar end = new GregorianCalendar(datePicker2.year, datePicker2.month, datePicker2.day, timePicker2.hour, timePicker2.minute);\n if (end.before(start))\n return ERR_START_AFTER_END;\n Switch onOffSwitch = (Switch) findViewById(R.id.toggBtn);\n if (!onOffSwitch.isChecked()) {\n long seconds = (end.getTimeInMillis() - start.getTimeInMillis()) / 1000;\n if (seconds > SECONDS_IN_A_DAY)\n return ERR_START_AFTER_END;\n }\n return NO_ERR;\n }", "public void setDuration(int duration){\n this.duration = duration;\n }", "public void setDuration(String duration) {\n this.duration = duration;\n }", "public void setDuration(String duration) {\n this.duration = duration;\n }", "private boolean checkDeadline(String d)\n\t{\n\t\t//yyyy/mm/dd\n\t\treturn Pattern.matches(\"[0-9][0-9][0-9][0-9]/[0-1][0-9]/[0-3][0-9]\", d);\n\t}", "public static boolean isValidDatetime(String test) {\n String[] components = test.split(\" \");\n String date = components[0];\n String startTime = components[1];\n\n //If the format is dd/mm/yyyy hhmm k\n if (components.length == 3) {\n String duration = components[2];\n return isValidDate(date) && isValidTime(startTime) && isValidDuration(duration);\n //If the format is dd/mm/yyyy hhmm to hhmm\n } else if (components.length == 4) {\n String endtime = components[3];\n return isValidDate(date) && isValidTime(startTime) && isValidTime(endtime);\n } else {\n return false;\n }\n }", "public boolean hasValidFromMillis() {\n return fieldSetFlags()[4];\n }", "void setDuration(java.lang.String duration);", "private void validate() throws FlightCreationException {\n validateNotNull(\"number\", number);\n validateNotNull(\"company name\", companyName);\n validateNotNull(\"aircraft\", aircraft);\n validateNotNull(\"pilot\", pilot);\n validateNotNull(\"origin\", origin);\n validateNotNull(\"destination\", destination);\n validateNotNull(\"departure time\", scheduledDepartureTime);\n\n if (scheduledDepartureTime.isPast()) {\n throw new FlightCreationException(\"The departure time cannot be in the past\");\n }\n\n if (origin.equals(destination)) {\n throw new FlightCreationException(\"The origin and destination cannot be the same\");\n }\n }", "public boolean isTextValid(CharSequence charSequence) {\n if (TextUtils.isEmpty(charSequence)) {\n return false;\n }\n try {\n int parseInt = Integer.parseInt(charSequence.toString());\n return parseInt >= 3 && parseInt <= 3600;\n } catch (NumberFormatException unused) {\n return false;\n }\n }", "private boolean checkValidTime(String inputTime) {\n int hour = Integer.parseInt(inputTime.substring(0,2));\n int minute = Integer.parseInt(inputTime.substring(2,4));\n \n if ((hour >= 0 && hour <= 23) && (minute >= 0 && minute <= 59)) {\n return true;\n } else {\n return false;\n }\n }", "public void setLength(int duration){\n\t\tlength = duration;\n\t}", "public void setDuration( Long duration );", "@Override\n\tpublic void validate(Object target, Errors errors) {\n\t\tVoyage voyageValidator=(Voyage) target;\n\t\tif(voyageValidator.getDepartureDate()==null)\n\t\t\terrors.rejectValue(\"departureDate\", \"\",\"departureDate.required\");\n\t\tif(voyageValidator.getDepartureHourId()==null)\n\t\t\terrors.rejectValue(\"departureHour\", \"\",\"departureHourId.required\");\n\t\tif(voyageValidator.getPathId()==null)\n\t\t\terrors.rejectValue(\"path\", \"\",\"pathId.required\");\n\t\tif(!Utils.isNumeric(voyageValidator.getNumberOfPlace()+\"\"))\n\t\t\terrors.rejectValue(\"numberOfPlace\", \"\",\"numberOfPlace.numeric\");\n\t}", "@Override\n\t@FXML\n\tpublic boolean validate() {\n\t\t\n\t\tboolean isDataEntered = true;\n\t\tLocalDate startDate = Database.getInstance().getStartingDate();\n\t\tSystem.out.println();\n\t\tif(amountField.getText() == null || amountField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the amount field empty.\");\n\t\telse if(!(Validation.validateAmount(amountField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please enter a valid amount\");\n\t\telse if(creditTextField.getText() == null || creditTextField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the credit text field empty.\");\n\t\telse if(!(Validation.validateChars(creditTextField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please only enter valid characters\");\n\t\telse if(dateField.getValue() == null) {\n\t\t\tisDataEntered = setErrorTxt(\"You left the date field empty.\");\t\t\t\n\t\t}\n\t\telse if(dateField.getValue().isBefore(startDate))\n\t\t\tisDataEntered = setErrorTxt(\"Sorry, the date you entered is before the starting date.\");\n\t\treturn isDataEntered;\n\t}", "private boolean hasValidLength()\n {\n final int length = mTextInputLayout.getText().length();\n return (length >= mMinLen && length <= mMaxLen);\n }", "public boolean hasValidToMillis() {\n return fieldSetFlags()[5];\n }", "public void validateStartDateAndTime(String date){\n setStartDateAndTimeValid(validateDateAndTime(date));\n }", "@Test\n public void testValidateUpdateLifeTimeWithGoodDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(20000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(25000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "public static Duration parseDuration(String str) {\n String part;\n Duration d = new Duration();\n Matcher m = durationPattern.matcher(str);\n\n if (m.find()) {\n d.negative = (str.startsWith(\"-\"));\n\n try {\n part = m.group(1);\n d.years = (part != null)\n ? Integer.parseInt(part)\n : 0;\n part = m.group(2);\n d.months = (part != null)\n ? Integer.parseInt(part)\n : 0;\n part = m.group(3);\n d.days = (part != null)\n ? Integer.parseInt(part)\n : 0;\n part = m.group(4);\n d.hours = (part != null)\n ? Integer.parseInt(part)\n : 0;\n part = m.group(5);\n d.minutes = (part != null)\n ? Integer.parseInt(part)\n : 0;\n part = m.group(6);\n d.seconds = (part != null)\n ? Double.parseDouble(part)\n : 0.0;\n } catch (Exception e) {\n d = null;\n }\n } else {\n d = null;\n }\n\n return d;\n }", "private static void validate(int type, int field, int match, String value) {\n if ((type != Type.SONG) && (field == Field.PLAY_COUNT || field == Field.SKIP_COUNT)) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n // Only Songs have years\n if (type != Type.SONG && field == Field.YEAR) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n // Only Songs have dates added\n if (type != Type.SONG && field == Field.DATE_ADDED) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n\n if (field == Field.ID) {\n // IDs can only be compared by equals or !equals\n if (match == Match.CONTAINS || match == Match.NOT_CONTAINS\n || match == Match.LESS_THAN || match == Match.GREATER_THAN) {\n throw new IllegalArgumentException(\"ID cannot be compared by method \" + match);\n }\n // Make sure the value is actually a number\n try {\n //noinspection ResultOfMethodCallIgnored\n Long.parseLong(value);\n } catch (NumberFormatException e) {\n Crashlytics.logException(e);\n throw new IllegalArgumentException(\"ID cannot be compared to value \" + value);\n }\n } else if (field == Field.NAME) {\n // Names can't be compared by < or >... that doesn't even make sense...\n if (match == Match.GREATER_THAN || match == Match.LESS_THAN) {\n throw new IllegalArgumentException(\"Name cannot be compared by method \"\n + match);\n }\n } else if (field == Field.SKIP_COUNT || field == Field.PLAY_COUNT\n || field == Field.YEAR || field == Field.DATE_ADDED) {\n // Numeric values can't be compared by contains or !contains\n if (match == Match.CONTAINS || match == Match.NOT_CONTAINS) {\n throw new IllegalArgumentException(field + \" cannot be compared by method \"\n + match);\n }\n // Make sure the value is actually a number\n try {\n //noinspection ResultOfMethodCallIgnored\n Long.parseLong(value);\n } catch (NumberFormatException e) {\n Crashlytics.logException(e);\n throw new IllegalArgumentException(\"ID cannot be compared to value \" + value);\n }\n }\n }", "public void setDuration(Number duration) {\n this.duration = duration;\n }", "private boolean validateInputs(String iStart, String iEnd, String country, String type) {\n \thideErrors();\n \tint validStart;\n \tint validEnd;\n boolean valid = true;\n// \t//will not occur due to UI interface\n// if (isComboBoxEmpty(type)) {\n// \tvalid = false;\n// \tT3_type_error_Text.setVisible(true);\n// }\n if (isComboBoxEmpty(country)) {\n \tvalid = false;\n \tT3_country_error_Text.setVisible(true);\n }\n \t//checking if start year and end year are set\n if (isComboBoxEmpty(iStart)){\n //start is empty\n T3_start_year_error_Text.setVisible(true);\n valid = false;\n }\n if (isComboBoxEmpty(iEnd)){\n //end is empty\n T3_end_year_error_Text.setVisible(true);\n valid = false;\n }\n \tif (valid){\n //if years are not empty and valid perform further testing\n \t\t//fetch valid data range\n \tPair<String,String> validRange = DatasetHandler.getValidRange(type, country);\n \tvalidStart = Integer.parseInt(validRange.getKey());\n \tvalidEnd = Integer.parseInt(validRange.getValue());\n //check year range validity\n \t\tint start = Integer.parseInt(iStart);\n \t\tint end = Integer.parseInt(iEnd);\n \tif (start>=end) {\n \t\tT3_range_error_Text.setText(\"Start year should be < end year\");\n \t\tT3_range_error_Text.setVisible(true);\n \t\tvalid=false;\n \t}\n// \t//will not occur due to UI interface\n// \telse if (start<validStart) {\n// \t\tT3_range_error_Text.setText(\"Start year should be >= \" + Integer.toString(validStart));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}else if (end>validEnd) {\n// \t\tT3_range_error_Text.setText(\"End year should be <= \" + Integer.toString(validEnd));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}\n \t}\n// \t//will not occur due to UI interface\n// \tif(isComboBoxEmpty(type)) {\n// \t\t//if type is not set\n// T3_type_error_Text.setVisible(true);\n// \t}\n \t\n if(isComboBoxEmpty(country)) {\n //if country is not set\n T3_country_error_Text.setVisible(true);\n }\n \treturn valid;\n }", "boolean isSetRecurrenceDuration();", "@Test\n public void testValidateUpdateLifeTimeWithBadDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(25000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(20000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService, never()).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "private Duration getDurationFromTimeView() {\n String text = timeView.getText().toString();\n String[] values = text.split(\":\");\n\n int hours = Integer.parseInt(values[0]);\n int minutes = Integer.parseInt(values[1]);\n int seconds = Integer.parseInt(values[2]);\n\n return Utils.hoursMinutesSecondsToDuration(hours, minutes, seconds);\n }", "public Period getDurationValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not a duration.\");\n }", "@Test\n\tpublic void invalidLengthShort() {\n\t\tboolean result = validator.isValid(\"73602851\");\n\t\tassertFalse(result);\n\t}", "public void validateNameField() {\n\t\tif (nameField.getText().length() > 0) {\n\t\t\ttimeToPick.setEnabled(true);\n\t\t\tif (nameField.getText().length() > 24) {\n\t\t\t\tnameField.setText(nameField.getText().substring(0, 24));\n\t\t\t}\n\t\t\ttimeToPick.putClientProperty(\"playerName\", nameField.getText());\n\t\t} else {\n\t\t\ttimeToPick.setEnabled(false);\n\t\t}\n\t}", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(Long duration)\r\n {\r\n this.duration = duration;\r\n }", "private static void testDuration() {\n LocalTime time1 = LocalTime.of(15, 20, 38);\n LocalTime time2 = LocalTime.of(21, 8, 49);\n\n LocalDateTime dateTime1 = time1.atDate(LocalDate.of(2014, 5, 27));\n LocalDateTime dateTime2 = time2.atDate(LocalDate.of(2015, 9, 15));\n\n Instant i1 = Instant.ofEpochSecond(1_000_000_000);\n Instant i2 = Instant.now();\n\n // create duration between two points\n Duration d1 = Duration.between(time1, time2);\n Duration d2 = Duration.between(dateTime1, dateTime2);\n Duration d3 = Duration.between(i1, i2);\n Duration d4 = Duration.between(time1, dateTime2);\n\n // create duration from some random value\n Duration threeMinutes;\n threeMinutes = Duration.ofMinutes(3);\n threeMinutes = Duration.of(3, ChronoUnit.MINUTES);\n }", "public void setDuration(long duration) {\n this.duration = duration;\n }", "public void setDuration(long duration) {\n this.duration = duration;\n }", "protected void validate() {\n Validator mandatoryValidator = validateMandatoryOptions();\n Validator exclusionsValidator = validateOptionExclusions();\n Validator inapplicableOptionValidator = validateInapplicableOptions();\n Validator optionalValidator = validateOptionalParameters();\n\n List<String> validationMessages = new LinkedList<>();\n\n validationMessages.addAll(mandatoryValidator.getValidationMessages());\n validationMessages.addAll(exclusionsValidator.getValidationMessages());\n validationMessages.addAll(optionalValidator.getValidationMessages());\n validationMessages.addAll(inapplicableOptionValidator.getValidationMessages());\n\n if (!validationMessages.isEmpty()) {\n String tablePathString =\n (tablePath != null) ? SourceUtils.pathToString(tablePath) : \"null\";\n throw new DeltaOptionValidationException(tablePathString, validationMessages);\n }\n }", "DurationTypeEnum getDurationType();", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "public abstract FieldReport validate(int fieldSequence, Object fieldValue);", "public Duration()\n\t{\n\t}", "public void setDuration(long duration) {\n this.duration = duration;\n }", "private boolean validateFields(String pickupLocation, String destination, Date time, int noPassengers, ArrayList<String> notes){\n int errors = 0;\n\n if(!Validation.isValidNoPassengers(noPassengers)){\n errors++;\n noPassengersInputContainer.setError(getString(R.string.no_passengers_error));\n }\n\n if(pickupLocation.length() < 3 || pickupLocation.trim().length() == 0){\n errors++;\n pickupLocationInputContainer.setError(getString(R.string.pickup_location_error));\n }\n\n if(destination.length() < 3 || pickupLocation.trim().length() == 0){\n errors++;\n destinationInputContainer.setError(getString(R.string.destination_error));\n }\n\n if(!Validation.isValidBookingTime(time)){\n errors++;\n timeInputContainer.setError(getString(R.string.booking_time_error));\n }\n\n\n return errors == 0;\n }", "@Test\n public void isValidDeadline() {\n assertFalse(Deadline.isValidDeadline(INVALID_0_JAN_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n\n // Valid deadline -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_2018.toString()));\n\n // Valid deadline for february -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_28TH_FEB_2018.toString()));\n\n // Invalid deadline for february in common year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_29TH_FEB_2018.toString()));\n\n // Valid deadline for february during leap year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_29TH_FEB_2020.toString()));\n\n // Invalid deadline for february during leap year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_30TH_FEB_2020.toString()));\n\n // Valid deadline for months with 30 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_30TH_APR_2018.toString()));\n\n // Invalid deadline for months with 30 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_31ST_APR_2018.toString()));\n\n // Valid deadline for months with 31 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_31ST_JAN_2018.toString()));\n\n // Invalid deadline for months with 31 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_2018.toString()));\n\n // Invalid month -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_13_2018.toString()));\n\n // Valid month -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_APR_2018.toString()));\n\n // Valid year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_9999.toString()));\n\n // Invalid year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_2017.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_10000.toString()));\n\n // Valid date without year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Invalid date without year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_WITHOUT_YEAR.toString()));\n }", "@Test\n\tpublic void invalidLengthLong() {\n\t\tboolean result = validator.isValid(\"73102851691\");\n\t\tassertFalse(result);\n\t}", "public com.vodafone.global.er.decoupling.binding.request.DurationType createDurationType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.DurationTypeImpl();\n }", "public void setDuration(Duration duration)\r\n {\r\n m_duration = duration;\r\n }", "private boolean validParams(double dt, double runTime, int startDay, double initPop, String stage, \r\n\t\t\t\t\t\t\t\tdouble gtMultiplier, double harvestLag, double critcalT, double daylightHours) {\r\n\t\tif (dt <= 0 || runTime < 0 || initPop < 0) // positive values (dt > 0)\r\n\t\t\treturn false;\r\n\t\tif (gtMultiplier <= 0 || harvestLag < 0 || harvestLag > 365 || daylightHours < 0 || daylightHours > 24)\r\n\t\t\treturn false;\r\n\t\tfor (int j = 0; j < names.length; j ++) { // stage must be a valid swd lifestage\r\n\t\t\tif (stage.equals(names[j]))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public void validateEndDateAndTime(String startDate, String endDate) {\n boolean isValid = false;\n if (!validateDateAndTime(startDate)) {\n isValid = validateDateAndTime(endDate); //End date can still be valid if start date isn't\n } else {\n if (validateDateAndTime(endDate)) {\n // If startDate is valid, then End date must be valid and occur after start date\n Calendar startCal = DateUtility.convertToDateObj(startDate);\n Calendar endCal = DateUtility.convertToDateObj(endDate);\n isValid = startCal.before(endCal);\n }\n }\n setEndDateAndTimeValid(isValid);\n }", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "Duration getDuration();", "public boolean isWholeDuration ()\r\n {\r\n if (!getNotes().isEmpty()) {\r\n Note note = (Note) getNotes().get(0);\r\n\r\n return note.getShape().isMeasureRest();\r\n }\r\n\r\n return false;\r\n }", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "private void checkFields() {\n if (month.getText().toString().isEmpty()) {\n month.setError(\"enter a month\");\n month.requestFocus();\n return;\n }\n if (day.getText().toString().isEmpty()) {\n day.setError(\"enter a day\");\n day.requestFocus();\n return;\n }\n if (year.getText().toString().isEmpty()) {\n year.setError(\"enter a year\");\n year.requestFocus();\n return;\n }\n if (hour.getText().toString().isEmpty()) {\n hour.setError(\"enter an hour\");\n hour.requestFocus();\n return;\n }\n if (minute.getText().toString().isEmpty()) {\n minute.setError(\"enter the minute\");\n minute.requestFocus();\n return;\n }\n if (AMorPM.getText().toString().isEmpty()) {\n AMorPM.setError(\"enter AM or PM\");\n AMorPM.requestFocus();\n return;\n }\n if (place.getText().toString().isEmpty()) {\n place.setError(\"enter the place\");\n place.requestFocus();\n return;\n }\n }", "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.heightValue, \" Рост: \", b) ||\n !CalendarHelper.isFieldValid(startProgramDateValue, \" Старт программы: \", b) ||\n !new ComboBoxFieldHelper<Client>().isFieldValid(clientFIOValue, \" Клиент: \", b))\n {\n result = false;\n }\n\n return result;\n }", "void setDuration(int duration);", "Posn getDuration();", "public void validateSchedular() {\n boolean startDateCheck = false, cronTimeCheck = false, dateFormatCheck = false;\n /*\n Schedular Properties\n */\n\n System.out.println(\"Date: \" + startDate.getValue());\n if (startDate.getValue() != null) {\n System.out.println(\"Date: \" + startDate.getValue());\n startDateCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Start Date should not be empty.\\n\");\n }\n\n if (!cronTime.getText().isEmpty()) {\n cronTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Cron Time should not be empty.\\n\");\n }\n// if (!dateFormat.getText().isEmpty()) {\n// dateFormatCheck = true;\n// } else {\n// execptionData.append((++exceptionCount) + \". Date Format should not be empty.\\n\");\n// }\n\n if (startDateCheck == true && cronTimeCheck == true) {\n schedularCheck = true;\n } else {\n schedularCheck = false;\n startDateCheck = false;\n cronTimeCheck = false;\n dateFormatCheck = false;\n }\n\n }", "private boolean validateInput(){\n boolean operationOK = true;\n //perform input validation on the double values in the form\n String integrationTime = this.integrationTimeText.getText();\n String integrationFrequency = this.integrationFrequencyText.getText();\n \n if(!integrationTime.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationTime);\n integrationTimeText.setBackground(Color.WHITE);\n integrationTimeText.setToolTipText(\"Time in seconds (s)\");\n } catch (NumberFormatException ex) {\n integrationTimeText.setBackground(Color.RED);\n operationOK=false;\n integrationTimeText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(!integrationFrequency.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationFrequency);\n integrationFrequencyText.setBackground(Color.WHITE);\n integrationFrequencyText.setToolTipText(\"Frequency in Hertz (Hz)\");\n \n } catch (NumberFormatException ex) {\n operationOK=false;\n integrationFrequencyText.setBackground(Color.RED);\n integrationFrequencyText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(currentStepOperationsPanel!=null){\n operationOK = this.currentStepOperationsPanel.validateInput();\n \n }\n return operationOK;\n }", "private boolean checkValidity(String startTime, String endTime) {\n\t\tDateFormat formatter = null;\n\t\tformatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\tDate startDate = null;\n\t\tDate endDate = null;\n\t\ttry {\n\t\t\tstartDate = (Date)formatter.parse(startTime);\n\t\t\tendDate = (Date)formatter.parse(endTime);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tif(startDate.getTime() >= endDate.getTime())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}" ]
[ "0.7365917", "0.6906158", "0.66532624", "0.6610327", "0.6520211", "0.6409106", "0.62755716", "0.62755716", "0.62755716", "0.622525", "0.62204343", "0.6175152", "0.61461455", "0.6073091", "0.6027483", "0.6009486", "0.6008571", "0.598563", "0.59046763", "0.5886426", "0.583597", "0.5806129", "0.57891494", "0.5776643", "0.5770251", "0.5752359", "0.5727385", "0.5671678", "0.5668493", "0.5648674", "0.564858", "0.5635858", "0.55990946", "0.558833", "0.5573234", "0.556139", "0.55594605", "0.5526467", "0.5513971", "0.54970163", "0.548933", "0.548916", "0.5487812", "0.5486763", "0.5486763", "0.5466549", "0.54534024", "0.5445196", "0.5434326", "0.5423383", "0.5420149", "0.5417708", "0.5414635", "0.54063773", "0.5395603", "0.53861797", "0.53851897", "0.53828526", "0.53806764", "0.5370888", "0.53679985", "0.5367697", "0.5361266", "0.5344265", "0.53433895", "0.53414506", "0.53337985", "0.5323258", "0.5320939", "0.5316802", "0.5307258", "0.5307258", "0.5307032", "0.53014034", "0.529423", "0.529423", "0.5285183", "0.5279728", "0.5279131", "0.5276779", "0.5276562", "0.5275607", "0.5274215", "0.527229", "0.5263492", "0.5260263", "0.52428275", "0.52382225", "0.52338773", "0.5228828", "0.5227192", "0.5223823", "0.5223654", "0.5215152", "0.5211579", "0.5206339", "0.5196952", "0.5191322", "0.51843625", "0.51800764" ]
0.71388227
1
Method to validate amount fields
public static void ValidateAmountField(WebDriver driver,String market,String amount_type){ if(market=="Volatility Indices"){ SelectEnterAmount(driver,"0.34",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout50000Top(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); Assert.assertEquals(Trade_Page.err_Payout50000Bottom(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); System.out.println(Trade_Page.err_Payout50000Top(driver).getText()); SelectEnterAmount(driver,"51000",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout50000Top(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); Assert.assertEquals(Trade_Page.err_Payout50000Bottom(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); System.out.println(Trade_Page.err_Payout50000Top(driver).getText()); } else if (market=="Forex"){ SelectEnterAmount(driver,"0.49",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); System.out.println(Trade_Page.err_Payout5000Top(driver).getText()); SelectEnterAmount(driver,"21000",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); } else if (market=="Commodities"){ SelectEnterAmount(driver,"0.49",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); SelectEnterAmount(driver,"5100",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); System.out.println(Trade_Page.err_Payout5000Top(driver).getText()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateAmountFormat(String amount,\n HttpServletRequest req, HttpServletResponse resp) throws IOException {\n if(!amount.matches(wholeNumber)\n && !amount.matches(fraction)\n && !amount.matches(trailingZeroFraction)\n && !amount.matches(leadingZeroFraction)\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Transaction amount format invalid!\");\n return false;\n }\n return true;\n }", "private void validateSendAmount() {\n try {\n if (new BigDecimal(sanitizeNoCommas(sendNanoAmount))\n .compareTo(new BigDecimal(sanitizeNoCommas(NumberUtil.getRawAsLongerUsableString(accountBalance.toString())))) > 0) {\n RxBus.get().post(new SendInvalidAmount());\n }\n } catch (NumberFormatException e) {\n ExceptionHandler.handle(e);\n }\n }", "public boolean checkValidity() {\n String sep = DECIMAL_FORMAT.getDecimalFormatSymbols().getDecimalSeparator() + \"\";\n String name = nameField.getText().trim();\n String priceText = valueField.getText().trim();\n if (name.equals(\"\") || priceText.equals(\"\")) {\n Utils.showWarningMessage(getRootPane(), \"The fields can not be empty!\");\n return false;\n }\n String price = priceText.replace(sep, \"\");\n if (!price.matches(\"^[0-9]+$\")) {\n Utils.showWarningMessage(getRootPane(), \"Please enter a valid price!\");\n return false;\n }\n int priceInt = Integer.parseInt(price);\n if (priceInt == 0) {\n Utils.showWarningMessage(getRootPane(), \"The price can not be 0.\");\n return false;\n }\n return true;\n }", "public boolean validDeclineCodeAndAmount() {\n\t\tint amount, declineCode;\n\t\ttry {\n\t\t\tamount = Integer.parseInt(txtApprovalAmount.getText());\n\t\t\tdeclineCode = Integer.parseInt(txtDeclineCode.getText());\n\t\t\tif (declineCode < 0 || declineCode > Integer.parseInt(Initializer.getBaseVariables().bitfield39UpperLimit)\n\t\t\t\t\t|| txtDeclineCode.getText().length() > Initializer.getBitfieldData().bitfieldLength\n\t\t\t\t\t\t\t.get(Initializer.getBaseConstants().nameOfbitfield39)) {\n\t\t\t\tlogger.error(\"Entered decline code is invalid. Valid range is 0 - \"\n\t\t\t\t\t\t+ Initializer.getBaseVariables().bitfield39UpperLimit);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entered decline code is invalid. Valid range is 0 - \"\n\t\t\t\t\t\t+ Initializer.getBaseVariables().bitfield39UpperLimit);\n\t\t\t\treturn false;\n\t\t\t} else if (txtApprovalAmount.getText().length() > Initializer.getBitfieldData().bitfieldLength\n\t\t\t\t\t.get(Initializer.getBaseConstants().nameOfbitfield4)) {\n\t\t\t\tlogger.error(\"Entered amount is invalid.\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entered amount is invalid.\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tlogger.error(\"Only valid range of numbers should be entered for decline code and Amount\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Only valid range of numbers should be entered for decline code and Amount\");\n\t\t\treturn false;\n\t\t}\n\t}", "private static double validateAmount(String amount) {\n \n double newAmount = 0.0;\n if(!amount.isEmpty()) {\n \n newAmount = Double.parseDouble(amount);\n }\n return newAmount;\n }", "protected void validate() {\n\t\tString quantity=editText.getText().toString().trim();\n\t\tif(quantity.length()==0){\n\t\t\tAlertUtils.showToast(mContext, \"Enter quantity\");\n\t\t\treturn;\n\t\t}else if(!isValidNumber(quantity)){\n\t\t\tAlertUtils.showToast(mContext, \"Enter valid quantity\");\n\t\t\treturn;\n\t\t}\n//\t\tif(((HomeActivity)mContext).checkInternet())\n//\t\t\tdialogCallback.setQuantity(item);\n\t}", "private boolean validateAmountSize(double amount, HttpServletRequest req, HttpServletResponse resp) throws IOException {\n if(amount > maxAmount\n || amount <= 0){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Transactions of that size are not permitted!\");\n return false;\n }\n return true;\n }", "boolean hasAmount();", "boolean hasAmount();", "public void loanAmount_Validation() {\n\t\thelper.assertString(usrLoanAmount_AftrLogin(), payOffOffer.usrLoanAmount_BfrLogin());\n\t\tSystem.out.print(\"The loan amount is: \" + usrLoanAmount_AftrLogin());\n\n\t}", "private static boolean validAmount(String amount) {\n int numOfDots = countOccurrences(amount, '.');\n if(numOfDots > 1){\n return false;\n }\n int numOfDollarSigns = countOccurrences(amount, '$');\n if(numOfDollarSigns > 1){\n return false;\n }\n for(int i = 0; i < amount.length(); i++){\n if(amount.charAt(i) != '$' && amount.charAt(i) != '.' && !Character.isDigit(amount.charAt(i))){\n return false;\n }\n }\n return true;\n }", "private void validateQuantity() {\n if (numQuantity.isEmpty()) {\n numQuantity.setErrorMessage(\"This field cannot be left blank.\");\n numQuantity.setInvalid(true);\n removeValidity();\n }\n // Check that quantity is in acceptable range (range check)\n else if (!validator.checkValidQuantity(numQuantity.getValue().intValue())) {\n numQuantity.setErrorMessage(\"Please enter a number between 1 and \" + researchDetails.MAX_QUANTITY + \" (inclusively)\");\n numQuantity.setInvalid(true);\n removeValidity();\n }\n\n }", "@Override\n public void validate(Map<String, String[]> parameters) {\n final String itemId = parameters.get(ITEM_ID)[0];\n final String amount = parameters.get(AMOUNT)[0];\n commonValidator.validateLong(itemId);\n commonValidator.validateFloat(amount);\n }", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "private boolean validateInput() {\n\tboolean valid = false;\n\ttry {\n\t if (paymentText == null | paymentText.getValue() == \"\") {\n\t\tpaymentText.focus();\n\t\tthrow new NullPointerException(\"paymentText fehlt\");\n\t }\n\t if (paymentBetrag == null | paymentBetrag.getValue() == \"\") {\n\t\tpaymentBetrag.focus();\n\t\tthrow new NullPointerException(\"paymentBetrag fehlt\");\n\t }\n\t if (!paymentBetrag.isEmpty()) {\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble d = Double.parseDouble(paymentBetrag.getValue());\n\t }\n\t // seems that everything was OK\n\t valid = true;\n\t} catch (NullPointerException e) {\n\t System.out.println(\"PaymentWindow - \" + e);\n\t} catch (NumberFormatException e) {\n\t // entered value is no number\n\t paymentBetrag.focus();\n\t}\n\treturn valid;\n }", "private boolean isAmountValid(String amount) {\n return Integer.parseInt(amount) > 0;\n }", "boolean isSetAmount();", "private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic boolean validateMoney(String money) throws RechargeException {\n\t\t\t\tif(!(money.matches(\"\\\\d+\")))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RechargeException(\"please enter correct amount to add\");\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "private boolean validatePuchase() {\n if (TextUtils.isEmpty(editextPurchaseSupplierName.getText().toString())) {\n editextPurchaseSupplierName.setError(getString(R.string.supplier_name));\n editextPurchaseSupplierName.requestFocus();\n return false;\n }\n\n if (TextUtils.isEmpty(edittextPurchaseAmount.getText().toString())) {\n if (flowpurchaseReceivedOrPaid == 2) {\n edittextPurchaseAmount.setError(getString(R.string.menu_purchasePaid));\n edittextPurchaseAmount.requestFocus();\n\n } else {\n edittextPurchaseAmount.setError(getString(R.string.purchase_amount));\n edittextPurchaseAmount.requestFocus();\n }\n return false;\n }\n\n if (TextUtils.isEmpty(edittextPurchasePurpose.getText().toString())) {\n edittextPurchasePurpose.setError(getString(R.string.remark_bill_number));\n edittextPurchasePurpose.requestFocus();\n return false;\n }\n\n\n return true;\n }", "@Override\n\tprotected boolean isImplementationValid()\n\t{\n\t\treturn (this.amount > 0);\n\t}", "public static Sale validateSale(TextField billno, LocalDate startdate, ComboBox customername, TextField nextdate, String onekgQty, String twokgQty, String fourkgQty, String fivekgQty, String sixkgQty, String ninekgQty, String onekgAmt, String twokgAmt, String fourkgAmt, String fivekgAmt, String sixkgAmt, String ninekgAmt, TextField amount) {\r\n Sale sale = new Sale();\r\n try {\r\n if (billno.getText().isEmpty() || startdate == null || customername.getValue() == null || nextdate.getText().isEmpty() || amount.getText().isEmpty()) {\r\n new PopUp(\"Error\", \"Field is Empty\").alert();\r\n } else {\r\n sale = new Sale();\r\n Date ndd = new SimpleDateFormat(\"dd-MM-yyyy\").parse(nextdate.getText());\r\n java.sql.Date nd = new java.sql.Date(ndd.getTime());\r\n sale.setBillno(Integer.valueOf(billno.getText()));\r\n sale.setStartdate(java.sql.Date.valueOf(startdate));\r\n sale.setShopname(customername.getValue().toString());\r\n sale.setNextdate(nd);\r\n if (onekgQty == null) {\r\n onekgQty = \"0\";\r\n }\r\n if (twokgQty == null) {\r\n twokgQty = \"0\";\r\n }\r\n if (fourkgQty == null) {\r\n fourkgQty = \"0\";\r\n }\r\n if (fivekgQty == null) {\r\n fivekgQty = \"0\";\r\n }\r\n if (sixkgQty == null) {\r\n sixkgQty = \"0\";\r\n }\r\n if (ninekgQty == null) {\r\n ninekgQty = \"0\";\r\n }\r\n sale.setOnekgqty(Integer.valueOf(onekgQty));\r\n sale.setTwokgqty(Integer.valueOf(twokgQty));\r\n sale.setFourkgqty(Integer.valueOf(fourkgQty));\r\n sale.setFivekgqty(Integer.valueOf(fivekgQty));\r\n sale.setSixkgqty(Integer.valueOf(sixkgQty));\r\n sale.setNinekgqty(Integer.valueOf(ninekgQty));\r\n if (onekgAmt == null) {\r\n onekgAmt = \"0.00\";\r\n }\r\n if (twokgAmt == null) {\r\n twokgAmt = \"0.00\";\r\n }\r\n if (fourkgAmt == null) {\r\n fourkgAmt = \"0.00\";\r\n }\r\n if (fivekgAmt == null) {\r\n fivekgAmt = \"0.00\";\r\n }\r\n if (sixkgAmt == null) {\r\n sixkgAmt = \"0.00\";\r\n }\r\n if (ninekgAmt == null) {\r\n ninekgAmt = \"0.00\";\r\n }\r\n sale.setOnekgamount(BigDecimal.valueOf(Double.valueOf(onekgAmt)));\r\n sale.setTwokgamount(BigDecimal.valueOf(Double.valueOf(twokgAmt)));\r\n sale.setFourkgamount(BigDecimal.valueOf(Double.valueOf(fourkgAmt)));\r\n sale.setFivekgamount(BigDecimal.valueOf(Double.valueOf(fivekgAmt)));\r\n sale.setSixkgamount(BigDecimal.valueOf(Double.valueOf(sixkgAmt)));\r\n sale.setNinekgamount(BigDecimal.valueOf(Double.valueOf(ninekgAmt)));\r\n sale.setAmount(BigDecimal.valueOf(Double.valueOf(amount.getText())));\r\n\r\n }\r\n } catch (ParseException error) {\r\n error.printStackTrace();\r\n }\r\n return sale;\r\n }", "private void payment_pay(){\r\n\r\n // only pay if all fields are filled out\r\n\r\n // values to test if there are no input errors\r\n boolean noEmptyFields = true, noIllegalFields = true;\r\n\r\n //UIManager.put(\"OptionPane.minimumSize\",new Dimension(500,300));\r\n String errorMessage = \"Must Enter\";\r\n if (String.valueOf(payment_nameField.getText()).equals(\"\")) {\r\n errorMessage += \" Cardholder Name,\";\r\n noEmptyFields = false;\r\n }\r\n if (String.valueOf(payment_cardNumberField.getText()).equals(\"\")) {\r\n errorMessage += \" Card Number,\";\r\n noEmptyFields = false;\r\n }\r\n if (String.valueOf(payment_cardCodeField.getText()).equals(\"\")) {\r\n errorMessage += \" Card Security Code,\";\r\n noEmptyFields = false;\r\n }\r\n if (String.valueOf(payment_monthCB.getSelectedItem()).equals(\"\")) {\r\n errorMessage += \" Expiration Month,\";\r\n noEmptyFields = false;\r\n }\r\n if (String.valueOf(payment_yearCB.getSelectedItem()).equals(\"\")) {\r\n errorMessage += \" Expiration YEar,\";\r\n noEmptyFields = false;\r\n }\r\n\r\n // throws error if card number has characters other than numbers, or has less/more than 16 digits\r\n if (payment_cardNumberField.getText().length() > 0 && payment_cardNumberField.getText().length() != 16) {\r\n JOptionPane.showMessageDialog\r\n (null, \"Card Number Must Have 16 Characters\");\r\n noIllegalFields = false;\r\n } else if (payment_cardNumberField.getText().length() == 16) {\r\n for (int i = 0; i < 16; i++) {\r\n if (!Character.isDigit(payment_cardNumberField.getText().charAt(i))) {\r\n JOptionPane.showMessageDialog\r\n (null, \"Card Number Must Have Only Numbers\");\r\n noIllegalFields = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // throws error if card security code has characters other than numbers, or has less/more than 3 digits\r\n if (payment_cardCodeField.getText().length() > 0 && payment_cardCodeField.getText().length() != 3) {\r\n JOptionPane.showMessageDialog\r\n (null, \"Card Security Code Must Have 3 Characters\");\r\n noIllegalFields = false;\r\n } else if (payment_cardCodeField.getText().length() == 3) {\r\n for (int i = 0; i < 3; i++) {\r\n if (!Character.isDigit(payment_cardCodeField.getText().charAt(i))) {\r\n JOptionPane.showMessageDialog\r\n (null, \"Card Security Code Must Have Only Numbers\");\r\n noIllegalFields = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n\r\n // checks if there are no input errors\r\n if (noEmptyFields && noIllegalFields) {\r\n\r\n JOptionPane.showMessageDialog\r\n (null, \"Payment Successful\");\r\n\r\n clearHistory();\r\n MainGUI.pimsSystem.recordApptPayment(currentPatient, billing_amtDueField.getText());\r\n printHistory(currentPatient);\r\n\r\n paymentDialog.setVisible(false);\r\n\r\n payment_nameField.setText(\"\");\r\n payment_cardCodeField.setText(\"\");\r\n payment_cardNumberField.setText(\"\");\r\n payment_monthCB.setSelectedItem(1);\r\n payment_yearCB.setSelectedItem(1);\r\n } else if (!String.valueOf(errorMessage).equals(\"Must Enter\")) {\r\n JOptionPane.showMessageDialog(null, errorMessage);\r\n }\r\n\r\n }", "@Override\r\n public boolean verify(JComponent arg0) {\r\n \r\n this.field = (JFormattedTextField) arg0;\r\n boolean result = false;\r\n this.value = this.field.getText();\r\n result = Input.isNumericWithDecimal(this.value);\r\n \r\n //if it is numeric with a decimal\r\n if(result == true){\r\n \r\n //Split string on decimal\r\n String[] array = this.value.split(\"\\\\.\");\r\n if (array[0].length() < 12 && array[1].length() < 3) {\r\n result = true;\r\n }\r\n else{\r\n result = false;\r\n }\r\n \r\n }\r\n //check for reasonable length and if value is only numeric\r\n else if (this.value.length() < 12 && Input.isNumeric(this.value)) {\r\n result = true;\r\n }\r\n \r\n return result;\r\n }", "@Override\n\t@FXML\n\tpublic boolean validate() {\n\t\t\n\t\tboolean isDataEntered = true;\n\t\tLocalDate startDate = Database.getInstance().getStartingDate();\n\t\tSystem.out.println();\n\t\tif(amountField.getText() == null || amountField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the amount field empty.\");\n\t\telse if(!(Validation.validateAmount(amountField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please enter a valid amount\");\n\t\telse if(creditTextField.getText() == null || creditTextField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the credit text field empty.\");\n\t\telse if(!(Validation.validateChars(creditTextField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please only enter valid characters\");\n\t\telse if(dateField.getValue() == null) {\n\t\t\tisDataEntered = setErrorTxt(\"You left the date field empty.\");\t\t\t\n\t\t}\n\t\telse if(dateField.getValue().isBefore(startDate))\n\t\t\tisDataEntered = setErrorTxt(\"Sorry, the date you entered is before the starting date.\");\n\t\treturn isDataEntered;\n\t}", "@Given(\"^valid fields and making a GET request to account_ID_wallet then it should return a (\\\\d+) and a body of wallet amount in cents$\")\n\tpublic void valid_fields_and_making_a_GET_request_to_account_ID_wallet_then_it_should_return_a_and_a_body_of_wallet_amount_in_cents(int StatusCode) throws Throwable {\n\t\tGetWallet.GET_account_id_wallet_ValidFieldsProvided();\n\t try{}catch(Exception e){}\n\t}", "protected void validatePassengerTypeQuantity(final FareFinderForm fareFinderForm, final Errors errors)\n\t{\n\t\tfinal String sessionBookingJourney = sessionService\n\t\t\t\t.getAttribute(TravelacceleratorstorefrontWebConstants.SESSION_BOOKING_JOURNEY);\n\n\t\tif (StringUtils.equalsIgnoreCase(sessionBookingJourney, TravelfacadesConstants.BOOKING_TRANSPORT_ACCOMMODATION)\n\t\t\t\t|| StringUtils.equalsIgnoreCase(sessionBookingJourney, TravelfacadesConstants.BOOKING_PACKAGE))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tint adultPassengers = 0;\n\t\tint nonAdultPassengers = 0;\n\n\t\tif (fareFinderForm.getPassengerTypeQuantityList() != null)\n\t\t{\n\t\t\tfor (final PassengerTypeQuantityData passengerTypeQuantity : fareFinderForm.getPassengerTypeQuantityList())\n\t\t\t{\n\t\t\t\tif (!passengerTypeQuantity.getPassengerType().getCode()\n\t\t\t\t\t\t.matches(TravelacceleratorstorefrontValidationConstants.REGEX_LETTERS_ONLY))\n\t\t\t\t{\n\t\t\t\t\trejectValue(errors, FIELD_PASSENGER_TYPE_QUANTITY_LIST, \"Invalid Passenger Type\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (TraveladdonWebConstants.PASSENGER_TYPE_ADULT.equals(passengerTypeQuantity.getPassengerType().getCode()))\n\t\t\t\t{\n\t\t\t\t\tif (passengerTypeQuantity.getQuantity() < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\trejectValue(errors, FIELD_PASSENGER_TYPE_QUANTITY_LIST,\n\t\t\t\t\t\t\t\t\"InvalidQuantity\" + passengerTypeQuantity.getPassengerType().getCode());\n\t\t\t\t\t}\n\t\t\t\t\tadultPassengers = passengerTypeQuantity.getQuantity();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (passengerTypeQuantity.getQuantity() < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\trejectValue(errors, FIELD_PASSENGER_TYPE_QUANTITY_LIST,\n\t\t\t\t\t\t\t\t\"InvalidQuantity\" + passengerTypeQuantity.getPassengerType().getCode());\n\t\t\t\t\t}\n\t\t\t\t\tnonAdultPassengers += passengerTypeQuantity.getQuantity();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nonAdultPassengers >= 0 && adultPassengers >= 0)\n\t\t\t{\n\t\t\t\tif (nonAdultPassengers > 0 && adultPassengers == 0)\n\t\t\t\t{\n\t\t\t\t\trejectValue(errors, FIELD_PASSENGER_TYPE_QUANTITY_LIST, ERROR_TYPE_INVALID_NUMBER_OF_ADULTS);\n\t\t\t\t}\n\n\t\t\t\tif (nonAdultPassengers + adultPassengers == 0)\n\t\t\t\t{\n\t\t\t\t\trejectValue(errors, FIELD_PASSENGER_TYPE_QUANTITY_LIST, ERROR_TYPE_NO_PASSENGER);\n\t\t\t\t}\n\n\t\t\t\tfinal int maxGuestQuantity = configurationService.getConfiguration().getInt(maxGuestMap.get(sessionBookingJourney));\n\n\t\t\t\tif (nonAdultPassengers + adultPassengers > maxGuestQuantity)\n\t\t\t\t{\n\t\t\t\t\trejectValue(errors, FIELD_PASSENGER_TYPE_QUANTITY_LIST, FIELD_INVALID_NUMBER_OF_PASSENGERS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n\tpublic void testTransferAmountNegative() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(\"123456\");\r\n\t\taccountTransferRequest.setReceiverAccount(\"123456\");\r\n\t\taccountTransferRequest.setTransferAmount(-100.0);\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t\tAssert.fail(\"Exception_Expected\");\r\n\t\t} catch (ValidationException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t\tAssert.assertEquals(\"transferAmount_Cannot_Be_Negative_Or_Zero\", exception.getMessage());\r\n\r\n\t\t}\r\n\t}", "public void textFieldValidator(KeyEvent event) {\n TextFieldLimited source =(TextFieldLimited) event.getSource();\n if (source.equals(partId)) {\n isIntegerValid(event);\n } else if (source.equals(maximumInventory)) {\n isIntegerValid(event);\n } else if (source.equals(partName)) {\n isCSVTextValid(event);\n } else if (source.equals(inventoryCount)) {\n isIntegerValid(event);\n } else if (source.equals(minimumInventory)) {\n isIntegerValid(event);\n } else if (source.equals(variableTextField)) {\n if (inHouse.isSelected()) {\n isIntegerValid(event);;\n } else {\n isCSVTextValid(event);\n }\n } else if (source.equals(partPrice)) {\n isDoubleValid(event);\n } else return;\n }", "private boolean checkValidations() {\n double originalPrice = 0.0, newPrice = 0.0;\n try {\n originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n newPrice = Double.parseDouble(tvNewPrice.getText().toString());\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n if (TextUtils.isEmpty(etTitle.getText().toString().trim())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_title_war));\n return false;\n } else if (TextUtils.isEmpty(etDescription.getText().toString().trim())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_description_war));\n return false;\n } else if (TextUtils.isEmpty(etTotalItems.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_total_items));\n return false;\n } else if (Integer.parseInt(etTotalItems.getText().toString()) < 1) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_total_items));\n return false;\n } else if (TextUtils.isEmpty(etOriginalPrice.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_original_price));\n return false;\n } else if (Double.parseDouble(etOriginalPrice.getText().toString().trim()) < 1) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.zero_original_price));\n return false;\n } else if (TextUtils.isEmpty(tvNewPrice.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_new_price));\n return false;\n } else if (originalPrice < newPrice) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.new_price_cant_greater));\n return false;\n } else if (TextUtils.isEmpty(etBeginTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_begin_time));\n return false;\n } else if (TextUtils.isEmpty(etEndTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_end_time));\n return false;\n } else if (appUtils.isBeforeCurrentTime(etBeginTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.start_time_cant_be_less));\n return false;\n } else if (!checktimings(etBeginTime.getText().toString(), etEndTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.end_time_cant_less));\n return false;\n } else\n return true;\n }", "@Test\n public void testIsValidDecimal() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidDecimal(1);\n assertEquals(true, result);\n }", "private boolean checkInputValidity() {\n // if any of the input field is empty, return false directly\n if (name.getText().equals(\"\") || id.getText().equals(\"\") || fiber.getText().equals(\"\")\n || protein.getText().equals(\"\") || fat.getText().equals(\"\") || calories.getText().equals(\"\")\n || carbohydrate.getText().equals(\"\")) {\n String message = \"Make sure enter the value of all nutrient components, please try again!\";\n // display the warning windows with the assigned warning message\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close();// close the add food stage\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n // if any nutrition info input is not a number value or is negative, return false directly\n try {\n Double fibervalue = null;\n Double proteinvalue = null;\n Double fatvalue = null;\n Double caloriesvalue = null;\n Double carbohydratevalue = null;\n // trim the input to exact numeric value\n fibervalue = Double.valueOf(fiber.getText().trim());\n proteinvalue = Double.valueOf(protein.getText().trim());\n fatvalue = Double.valueOf(fat.getText().trim());\n caloriesvalue = Double.valueOf(calories.getText().trim());\n carbohydratevalue = Double.valueOf(carbohydrate.getText().trim());\n // nutrition input is suppose to be positive numbers\n // if any of the numbers is negative, return false diretcly\n if (fibervalue < 0.0 || proteinvalue < 0.0 || fatvalue < 0.0 || caloriesvalue < 0.0\n || carbohydratevalue < 0.0) {\n String message = \"The input of the nutrient can not be negative, please try again!\";\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close();\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n // if any input of the nutrition info is not a double value, catch the exception and return\n // false\n } catch (Exception e) {\n String message =\n \"At least one nutrition value input is invalid, please type a number in nutrient textbox!\";\n // display the warning windows with the assigned warning message\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close(); // close the addfood stage\n // wait for response from ok button\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n return true;\n }", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "@Override\n public float getAmount() {\n return Float.parseFloat(inputAmount.getText());\n }", "public void validate(Object target, Errors errors) {\n\t\tInvoiceDTO invoiceDTO = (InvoiceDTO) target;\n\t\tif(invoiceDTO.getQuantity() <= 0) {\n\t\t\terrors.rejectValue(\"quantity\", \"msg.wrong\");\n\t\t}\n \t\t\n\t}", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "public boolean validateAmount(String requestedAmount) {\n\t\t// validate amount\n\t\tif (!requestedAmount.matches(\"-?\\\\d+(\\\\.\\\\d+)?\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// verify the amount\n\t\tif (!NumberFormatter.formatNumber(this.token.get(\"requestAmount\").toString())\n\t\t\t\t.equals(NumberFormatter.formatNumber(requestedAmount))) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test(dependsOnMethods = {\"shouldNotBeAbleToInputSpecialCharactersInInterestRateField\"})\n public void shouldAbleToInputNumericCharactersInPriceField() {\n //1. Enter 1 in the Price field\n calculatePaymentPage.setPriceInput(\"1\");\n //2. Enter 12 in the Price field\n calculatePaymentPage.setPriceInput(\"12\");\n //3. Enter 123 in the Price field\n calculatePaymentPage.setPriceInput(\"123\");\n //4. Enter 1234 in the Price field\n calculatePaymentPage.setPriceInput(\"1234\");\n //5. Enter 12345 in the Price field\n calculatePaymentPage.setPriceInput(\"12345\");\n //6. Enter 123456 in the Price field\n calculatePaymentPage.setPriceInput(\"123456\");\n //7. Enter 1234567 in the Price field\n calculatePaymentPage.setPriceInput(\"1234567\");\n //6. Enter 12345678 in the Price field\n calculatePaymentPage.setPriceInput(\"12345678\");\n }", "public AmountTextField() {\n initComponents();\n setFormatterFactory(formatterFactory);\n setInputVerifier(verifier);\n }", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean validate() {\n if (value == null || currencyCode == null) {\n return false;\n }\n return true;\n }", "public static void agentCheckDepositValid(String accNum, int amount) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 99999999) {\n\t\t\t\tSystem.out.println(\"Deposit successfully!\");\n\t\t\t\tTransactionFileMgr.addDepTransaction(accNum, Integer.toString(amount));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 99999999:\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "public void handleAddition() {\n\t\tString tempCryptoCurrency = cryptoCurrency.getText().toUpperCase();\n\t\t\n\t\tboolean notValid = !isCryptoInputValid(tempCryptoCurrency);\n\t\t\n\t\tif(notValid) {\n\t\t\ttempCryptoCurrency = null;\n\t\t}\n\t\t\n\t\t// is set to false in case a textField is empty \n\t\tboolean inputComplete = true;\n\t\t\n\t\t// Indicates whether the portfolio actually contains the number of coins to be sold\n\t\tboolean sellingAmountOk = true;\n\t\t\n\t\t/*\n\t\t * If the crypto currency is to be sold, a method is called that \n\t\t * checks whether the crypto currency to be sold is in the inventory at all.\n\t\t */\n\t\tif(type.getValue().toString() == \"Verkauf\" && cryptoCurrency.getText() != null ) {\t\n\t\t\tif(numberOfCoins.getText() == null || numberOfCoins.getText().isEmpty() || Double.valueOf(numberOfCoins.getText()) == 0.0) {\n\t\t\t\tsellingAmountOk = false;\n\t\t\t}else {\n\t\t\t\tsellingAmountOk = cryptoCurrencyAmountHold(Double.valueOf(numberOfCoins.getText()), cryptoCurrency.getText().toUpperCase());\n\t\t\t}\n\t\t\t\n\t\t} \n\t\t\n\t\t\n\t\tList<TextField> labelList = new ArrayList<>();\n\t\t\n\t\t// list of textFields which should be validate for input\n\t\tlabelList.add(price);\n\t\tlabelList.add(numberOfCoins);\n\t\tlabelList.add(fees);\n\t\t\t\n\t\t// validates if the textField input is empty\n\t\tfor (TextField textField : labelList) {\n\t\t\t\n\t\t\tif (textField.getText().trim().isEmpty()) {\n\t\t\t\tinputComplete = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (validateFieldInput(textField.getText()) == false){\n\t\t\t\tinputComplete = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Logic to differentiate whether a warning is displayed or not.\n\t\tif (sellingAmountOk == false) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t\t\talert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Ungueltige Anzahl, bitte korrigieren\");\n\t\t\talert.showAndWait();\n\t\t}else if (inputComplete == false) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t\t\talert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Eingabe ist unvollstaendig oder ungueltig\");\n\t\t\talert.showAndWait();\n\t\t} else if (tempCryptoCurrency == null) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t alert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Symbol fuer Coin existiert nicht\");\n\t\t\talert.showAndWait();\n\t\t}\n\t\telse {\n\t\t\t// if no type is entered, \"Kauf\" is automatically set\n\t\t\tif (type.getValue() == null){\n\t\t\t\ttype.setValue(\"Kauf\");\n\t\t\t}\n\t\t\t\n\t\t\tif (datePicker.getValue() == null) {\n\t\t\t\tdatePicker.setValue(LocalDate.now());\n\t\t\t}\n\n\t\t\t// Calls a method for calculating the total\n\t\t\tDouble tempTotal = calculateTotal(type.getValue().toString(), Double.valueOf(price.getText()),\n\t\t\t\t\tDouble.valueOf(numberOfCoins.getText()), Double.valueOf(fees.getText()));\n\n\t\t\tDouble tempNbrOfCoins = Double.valueOf(numberOfCoins.getText());\n\n\t\t\t\n\t\t\tif (type.getValue().toString() == \"Verkauf\") {\n\t\t\t\ttempNbrOfCoins = tempNbrOfCoins * -1;\n\t\t\t}\n\n\t\t\tif (transaction == null) {\n\t\t\t\tsaveTransaction(Double.valueOf(price.getText()), fiatCurrency.getText(), datePicker.getValue(), tempCryptoCurrency,\n\t\t\t\t\t\ttype.getValue().toString(), tempNbrOfCoins, Double.valueOf(fees.getText()), tempTotal);\n\t\t\t} else {\n\t\t\t\tupdateTransaction(transaction, Double.valueOf(price.getText()), fiatCurrency.getText(), datePicker.getValue(),\n\t\t\t\t\t\ttempCryptoCurrency, type.getValue().toString(), tempNbrOfCoins, Double.valueOf(fees.getText()),\n\t\t\t\t\t\ttempTotal);\n\t\t\t}\n\t\t\tmainApp.openPortfolioDetailView();\n\n\t\t\t/*\n\t\t\t * Sets the transaction to zero to know whether to add a new transaction or\n\t\t\t * update an existing transaction when opening next time the dialog.\n\t\t\t */\n\t\t\tthis.transaction = null;\n\n\t\t}\n\t}", "private boolean acceptedValueRange(double amount){\n if(amount <= 1.0 && amount >= 0.0){\n return true;\n }\n else{\n throw new IllegalArgumentException(\"Number must be in range of [0,1]\");\n }\n }", "@Test\r\n\tpublic void testTransferAmountZero() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(\"123456\");\r\n\t\taccountTransferRequest.setReceiverAccount(\"123456\");\r\n\t\taccountTransferRequest.setTransferAmount(0.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t\tAssert.fail(\"Exception_Expected\");\r\n\t\t} catch (ValidationException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t\tAssert.assertEquals(\"transferAmount_Cannot_Be_Negative_Or_Zero\", exception.getMessage());\r\n\r\n\t\t}\r\n\t}", "@Override\n public void accept(T value) throws ValidationException {\n if (value == null) {\n return;\n }\n\n NumberConstraint constraint = null;\n\n if (value instanceof Number) {\n constraint = getNumberConstraint((Number) value);\n } else if (value instanceof String) {\n try {\n Datatype datatype = datatypeRegistry.get(BigDecimal.class);\n Locale locale = currentAuthentication.getLocale();\n BigDecimal bigDecimal = (BigDecimal) datatype.parse((String) value, locale);\n if (bigDecimal == null) {\n fireValidationException(value);\n }\n constraint = getNumberConstraint(bigDecimal);\n } catch (ParseException e) {\n throw new ValidationException(e.getLocalizedMessage());\n }\n }\n\n if (constraint == null\n || value instanceof Double\n || value instanceof Float) {\n throw new IllegalArgumentException(\"DigitsValidator doesn't support following type: '\" + value.getClass() + \"'\");\n }\n\n if (!constraint.isDigits(integer, fraction)) {\n fireValidationException(value);\n }\n }", "@Test\n public void shouldAbleToInputNumericCharactersInAmountOwedOnTradeField() {\n\n//1. Enter 1 in the Amount Owed on Trade field\n//2. Enter 12 in the Amount Owed on Trade field\n//3. Enter 123 in the Amount Owed on Trade field\n//4. Enter 1234 in the Amount Owed on Trade field\n//5. Enter 12345 in the Amount Owed on Trade field\n//6. Enter 123456 in the Amount Owed on Trade field\n//7. Enter 1234567 in the Amount Owed on Trade field\n//6. Enter 12345678 in the Amount Owed on Trade field\n//6. Enter 12345678 in the Amount Owed on Trade field\n\n }", "@Test(dependsOnMethods = {\"shouldAbleToInputNumericCharactersInPriceField\"})\n public void shouldNotBeAbleToInputAlphaCharactersInPriceField() {\n //1. Enter B in the Price Field\n calculatePaymentPage.setPriceInput(\"B\");\n //2. Enter z in the Price Field\n calculatePaymentPage.setPriceInput(\"z\");\n }", "private boolean checkfields() {\n try {\n Integer.parseInt(checknum.getText().toString());\n Integer.parseInt(banknum.getText().toString());\n Integer.parseInt(branchnum.getText().toString());\n Integer.parseInt(accountnum.getText().toString()); //was commented\n\n } catch (NumberFormatException e) { // at least one of these numbers is not Integer\n return false;\n }\n\n if (checknum.getText().toString().equals(null) || banknum.getText().toString().equals(null) ||branchnum.getText().toString().equals(null)|| accountnum.getText().toString().equals(null))\n return false; // At least one of the fields is empty\n\n return true;\n }", "public boolean validate(AttributedDocumentEvent event) {\n boolean result = true;\n \n Document documentForValidation = getDocumentForValidation();\n \n LaborExpenseTransferDocumentBase expenseTransferDocument = (LaborExpenseTransferDocumentBase) documentForValidation;\n \n List sourceLines = expenseTransferDocument.getSourceAccountingLines();\n\n // allow a negative amount to be moved from one account to another but do not allow a negative amount to be created when the\n // balance is positive\n Map<String, ExpenseTransferAccountingLine> accountingLineGroupMap = this.getAccountingLineGroupMap(sourceLines, ExpenseTransferSourceAccountingLine.class);\n if (result) {\n boolean canNegtiveAmountBeTransferred = canNegtiveAmountBeTransferred(accountingLineGroupMap);\n if (!canNegtiveAmountBeTransferred) {\n GlobalVariables.getMessageMap().putError(KFSPropertyConstants.SOURCE_ACCOUNTING_LINES, LaborKeyConstants.ERROR_CANNOT_TRANSFER_NEGATIVE_AMOUNT);\n result = false;\n }\n }\n \n return result; \n }", "public BigDecimal validateBalance() throws BalanceException {\n\n BigDecimal balanceOfBankAccount;\n try {\n LOG.info(\"Enter balance for account: \");\n balanceOfBankAccount = IOService.getInstance().readBigDecimal();\n } catch (NumberFormatException err){\n throw new BalanceException( \"Incorrect entry. Please input only integer.\", err);\n }\n return balanceOfBankAccount;\n\n }", "@Test(priority=1)\n\tpublic void checkFirstNameAndLastNameFieldValiditywithNumbers(){\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"[email protected]\");\n\t\tsignup.enterFirstName(\"12345\");\n\t\tsignup.enterLastName(\"56386\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\t// given page accepts numbers into the firstname and lastname fields\n\t\tAssert.assertFalse(TestHelper.isStringPresent(errors, \"Please enter your last name.\"));\n\t\tAssert.assertFalse(TestHelper.isStringPresent(errors, \"Please enter your first name.\"));\n\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tInteger Amount = Integer.valueOf(editText.getText().toString());\n\t\t\t\t\t\t\tif ((Amount > 0) && (Amount * item.GetPrice() <= MainGameActivity.getPlayerFromBackpack().GetMoney())){\n\t\t\t\t\t\t\t\tMainGameActivity.getPlayerFromBackpack().SetMoney(MainGameActivity.getPlayerFromBackpack().GetMoney() - Amount * item.GetPrice());\n\t\t\t\t\t\t\t\titem.SetNItem(item.GetNItem() + Amount);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tshowBuyItem();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* Showing message that Amount is not valid */\n\t\t\t\t\t\t\t\tTextView textError = (TextView) dialog.findViewById(R.id.messageItem);\n\t\t\t\t\t\t\t\ttextError.setText(\"Amount is not valid!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private boolean validateInput(EditText titleInput, EditText descriptionInput, EditText priceInput) {\n String title = titleInput.getText().toString();\n String description = descriptionInput.getText().toString();\n int price = (TextUtils.isEmpty(priceInput.getText().toString()))? -1 : Integer.parseInt(priceInput.getText().toString());\n if (TextUtils.isEmpty(title) || TextUtils.isEmpty(description) || price < 0) {\n Toast.makeText(this.getActivity(),\n \"Please, fill in all fields.\",\n Toast.LENGTH_LONG).show();\n return false;\n }\n if (photoURI == null) {\n Toast.makeText(this.getActivity(),\n \"Please, add a picture to this item before submitting it.\",\n Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tInteger Amount = Integer.valueOf(editText.getText().toString());\n\t\t\t\t\t\t\tif ((Amount > 0) && (Amount <= item.GetNItem())){\n\t\t\t\t\t\t\t\tMainGameActivity.getPlayerFromBackpack().SetMoney(MainGameActivity.getPlayerFromBackpack().GetMoney() + Amount * item.GetPrice() / 2);\n\t\t\t\t\t\t\t\titem.SetNItem(item.GetNItem() - Amount);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tshowSellItem();\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/* Showing message that Amount is not valid */\n\t\t\t\t\t\t\t\tTextView textError = (TextView) dialog.findViewById(R.id.messageItem);\n\t\t\t\t\t\t\t\ttextError.setText(\"Amount is not valid!\");\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n\tpublic void OkHereIsMoney(double amount) {\n\t\t\n\t}", "@Test\n public void testIsNotValidDecimal2() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidDecimal(0);\n assertEquals(false, result);\n }", "@Override\r\n\tpublic JSONObject valid(Merchant merchant,String amount) {\n\t\tBank bank = merchant.getBanks().stream().filter(b -> b.getBankType().equals(true)).findFirst().get();\r\n\t\tBigDecimal money = bank.getOverMoney().subtract(new BigDecimal(amount)).subtract(merchant.getFee());\r\n\t\t\r\n\t\tif (merchant.getState() != 1){\r\n\t\t\treturn Result.error.toJson(\"商户状态异常,拒绝代付\");\r\n\t\t}\r\n\t\t\r\n\t\tif (!bank.getPayeeState()){\r\n\t\t\treturn Result.error.toJson(\"未开启代付功能\");\r\n\t\t}\r\n\t\t\r\n\t\tif (money.compareTo(BigDecimal.ZERO) < 0){\r\n\t\t\treturn Result.error.toJson(\"账户余额不足\");\r\n\t\t}\r\n\t\treturn Result.success.toJson(\"校验成功\");\r\n\t}", "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.heightValue, \" Рост: \", b) ||\n !CalendarHelper.isFieldValid(startProgramDateValue, \" Старт программы: \", b) ||\n !new ComboBoxFieldHelper<Client>().isFieldValid(clientFIOValue, \" Клиент: \", b))\n {\n result = false;\n }\n\n return result;\n }", "public boolean isValid(double total) {\n\t\treturn false;\n\t}", "public boolean validate()\n {\n EditText walletName = findViewById(R.id.walletName);\n String walletNameString = walletName.getText().toString();\n\n EditText walletBalance = findViewById(R.id.walletBalance);\n String walletBalanceString = walletBalance.getText().toString();\n\n if (TextUtils.isEmpty(walletNameString))\n {\n walletName.setError(\"This field cannot be empty\");\n\n return false;\n }\n else if (TextUtils.isEmpty(walletBalanceString))\n {\n walletBalance.setError(\"This field cannot be empty\");\n\n return false;\n }\n else\n {\n return true;\n }\n }", "@Test\n public void testIsNotValidDecimal() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidDecimal(-1);\n assertEquals(false, result);\n }", "private void validateInput(Label info, Label updateLabel, TextField field, String carValue, double min, double max) {\r\n\t\tif (! isValidDouble(field.getText())) {\r\n\t\t\tvalidateAndUpdate(field, false, updateLabel, \"Invalid number\");\r\n\t\t}\r\n\t\telse if (! isInsideBounderies(Double.valueOf(field.getText()), min, max)) {\r\n\t\t\tvalidateAndUpdate(field, false, updateLabel, min + \" <= value <= \" + max);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdouble valueR = formatDoubleWithTwoDeci(Double.valueOf(field.getText()));\r\n\t\t\tcarData.updateValue(carValue, valueR);\r\n\t\t\t\r\n\t\t\tvalidateAndUpdate(field, true, updateLabel, \"Successfully updated\");\r\n\t\t\tswitch (carValue) {\r\n\t\t\tcase DOOR_LENGTH: case REAR_DOOR_LENGTH: case BLIND_ZONE_VALUE: case FRONT_PARK_DISTANCE: info.setText(valueR + \"m\"); break;\r\n\t\t\tcase TOP_SPEED: info.setText(valueR + \"km/h\"); break;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void validateInputs(ActionEvent actionEvent) {\n //retrieve the inputs\n try {\n productNameInput = productNameField.getText();\n if (productNameInput.equals(\"\")) {\n throw new myExceptions(\"Product Name: Enter a string.\\n\");\n }\n }\n catch (myExceptions ex) {\n errorMessageContainer += ex.getMessage();\n isInputValid = false;\n }\n\n try {\n productPriceInput = Double.parseDouble(productPriceField.getText());\n if (productPriceField.getText().equals(\"\")) {\n throw new myExceptions(\"Price field: enter a value..\\n\");\n }\n if (productPriceInput <= 0) {\n throw new myExceptions(\"Price field: enter a value greater than 0.\\n\");\n }\n }\n catch (myExceptions priceValidation) {\n errorMessageContainer += priceValidation.getMessage();\n isInputValid = false;\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Price field: enter a positive number. Your input can contain decimals. \\n\";\n isInputValid = false;\n\n }\n\n try {\n maxInventoryLevelInput = Integer.parseInt(maxInventoryField.getText());\n minInventoryLevelInput = Integer.parseInt(minInventoryField.getText());\n if (maxInventoryField.getText().equals(\"\") || minInventoryField.getText().equals(\"\") || maxInventoryLevelInput <= 0 || minInventoryLevelInput <= 0) {\n throw new myExceptions(\"Min and Max fields: enter values for the minimum and maximum inventory fields.\\n\");\n }\n if (maxInventoryLevelInput < minInventoryLevelInput) {\n throw new myExceptions(\"Max inventory MUST be larger than the minimum inventory.\\n\");\n }\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Min and Max fields: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions minMaxValidation) {\n errorMessageContainer += minMaxValidation.getMessage();\n isInputValid = false;\n\n }\n\n try {\n productInventoryLevel = Integer.parseInt(inventoryLevelField.getText());\n if (inventoryLevelField.getText().equals(\"\")) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel <= 0) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel > maxInventoryLevelInput || productInventoryLevel < minInventoryLevelInput) {\n throw new myExceptions(\"Inventory level: value must be between max and min.\\n\");\n }\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Inventory level: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions stockValidation) {\n errorMessageContainer += stockValidation.getMessage();\n isInputValid = false;\n\n }\n\n errorMessageLabel.setText(errorMessageContainer);\n errorMessageContainer = \"\";\n\n }", "private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }", "private boolean isInputValid() {\n\t\tString errorMessage = \"\";\n\t\t\n\t\tif (dateField.getText() == null || dateField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiges Datum!\\n\";\n\t\t} else {\n\t\t\tif (!DateUtil.validDate(dateField.getText())) {\n\t\t\t\terrorMessage += \"Kein gültiges Datum. Benutze das dd.mm.yyy Format!\\n\";\n\t\t\t}\n\t\t}\n\t\tString categoryFieldSelection = categoryField.getSelectionModel().getSelectedItem();\n\t\tif (categoryFieldSelection.isEmpty() || categoryFieldSelection.length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Kategorie!\\n\";\n\t\t}\n\t\tif (useField.getText() == null || useField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Verwendungszweck!\\n\";\n\t\t}\n\t\tif (amountField.getText() == null || amountField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Betrag!\\n\";\n\t\t} \n\t\t/**else {\n\t\t\t// try to parse the amount into a double\n\t\t\ttry {\n\t\t\t\tDouble.parseDouble(amountField.getText());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\terrorMessage += \"Kein zulässiger Betrag! (Nur Dezimalzahlen erlaubt)\\n\";\n\t\t\t}\n\t\t}**/\n\t\tif (distributionKindField.getText() == null || distributionKindField.getText().length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Ausgabeart!\\n\";\n\t\t}\n\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Show the error message.\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Ungültige Eingaben\");\n\t\t\talert.setHeaderText(\"Bitte korrigieren Sie die Fehler in den Feldern.\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.showAndWait();\n\t\t\treturn false;\n\t\t}\n\t}", "float getAmount();", "private void validateTransaction(Transaction transaction) throws LedgerException {\n // Convenience variable for throwing exceptions\n String action = \"process transaction\";\n\n // Get Accounts related to the transaction\n Account payer = transaction.getPayer();\n Account receiver = transaction.getReceiver();\n Account master = this.currentBlock.getAccount(\"master\");\n\n // Check accounts are linked to valid/exisiting accounts\n if ( payer == null || receiver == null || master == null ) {\n throw new LedgerException(action, \"Transaction is not linked to valid account(s).\");\n }\n\n // Check for transaction id uniqueness\n validateTransactionId(transaction.getTransactionId());\n\n // Get total transaction withdrawal\n int amount = transaction.getAmount();\n int fee = transaction.getFee();\n int withdrawal = amount + fee;\n\n /*\n * Check the transaction is valid.\n *\n * Withdrawal, and receiver's ending balance must be _greater than_ the\n * MIN_ACCOUNT_BALANCE and _less than_ the MAX_ACCOUNT_BALANCE. The number\n * must be checked against both ends of the range in cases where an amount\n * would exceed MAX_ACCOUNT_BALANCE (i.e. Integer.MAX_VALUE), which will\n * wrap around to a value < 0.\n */\n if (withdrawal < MIN_ACCOUNT_BALANCE || withdrawal > MAX_ACCOUNT_BALANCE) {\n throw new LedgerException(action, \"Withdrawal exceeds total available currency.\");\n } else if ( payer.getBalance() < withdrawal ) {\n throw new LedgerException(action, \"Payer has an insufficient balance.\");\n } else if ( fee < MIN_FEE ) {\n throw new LedgerException(action, \"The transaction does not meet the minimum fee requried.\");\n } else if ( (amount + receiver.getBalance()) < MIN_ACCOUNT_BALANCE || (amount + receiver.getBalance()) > MAX_ACCOUNT_BALANCE) {\n throw new LedgerException(action, \"Receiver's balance would exceed maximum allowed.\");\n }\n\n // Valid transaction, Transfer funds\n payer.withdraw(withdrawal);\n receiver.deposit(amount);\n master.deposit(fee);\n }", "private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add(\"Job No. is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqStatus()))\n\t\t\tmessages.add(\"PO Status is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqType()))\n\t\t\tmessages.add(\"PO Type is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getCurrentOdo()))\n\t\t\tmessages.add(\"Odo is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate()))\n\t\t\tmessages.add(\"Actual Start Date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getPlannedEndDate()))\n\t\t\tmessages.add(\"End date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getServiceProvider()))\n\t\t\tmessages.add(\"Service Provider is required\");\n\t\t/* TODO Need to determine if this check is necessary. We do not have a hard requirement for this.\n\t\tif(!MALUtilities.isEmpty(po.getServiceProvider()) \n\t\t\t\t&& (!MALUtilities.convertYNToBoolean(po.getServiceProvider().getNetworkVendor()) \n\t\t\t\t\t\t&& this.calculateMarkUp(po).compareTo(new BigDecimal(0.00)) < 1))\n\t\t\tmessages.add(\"Mark Up is required for out of network service providers\");\n\t */\n\t\t\n\t\t//Validate PO Line items (tasks) required data\n\t\tif(!MALUtilities.isEmpty(mrq.getMaintenanceRequestTasks())){\n\t\t\tfor(MaintenanceRequestTask line : mrq.getMaintenanceRequestTasks()){\n\t\t\t\tif(MALUtilities.isEmptyString(line.getMaintCatCode()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Maint Category is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTaskQty()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Qty is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getUnitCost()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Unit Price is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTotalCost())) \n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total Amount is required\");\t\t\t\t\t\t\t\t\n\t\t\t\tif(!(MALUtilities.isEmpty(line.getTaskQty()) && MALUtilities.isEmpty(line.getUnitCost()))){\n\t\t\t\t\tamount = line.getUnitCost().multiply(line.getTaskQty()).setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\t\t\t\tif( amount.compareTo(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP)) != 0)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total amount is incorrect\");\t\t\t\t\t\t\t\n\t\t\t\t}\t\n/** TODO This will not work well with goodwill POs as the user will not have the changes to add cost avoidance data to subsequent lines.\t\t\t\t\n\t\t\t\tif(mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillReason()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillCost()) || line.getGoodwillCost().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Amount is required\");\t\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillPercent()) || line.getGoodwillPercent().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Percent is required\");\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\t\t\t\t\t\n\t\t\t\t}\n*/\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(messages.size() > 0)\n\t\t\tthrow new MalBusinessException(\"service.validation\", messages.toArray(new String[messages.size()]));\t\t\n\t\t\n\t}", "private void businessValidationForOnlinePaymentServiceRequestOrder(PaymentFeeLink order, OnlineCardPaymentRequest request) {\n Optional<BigDecimal> totalCalculatedAmount = order.getFees().stream().map(paymentFee -> paymentFee.getCalculatedAmount()).reduce(BigDecimal::add);\n if (totalCalculatedAmount.isPresent() && (totalCalculatedAmount.get().compareTo(request.getAmount()) != 0)) {\n throw new ServiceRequestExceptionForNoMatchingAmount(\"The amount should be equal to serviceRequest balance\");\n }\n\n //Business validation for amount due for fees\n Optional<BigDecimal> totalAmountDue = order.getFees().stream().map(paymentFee -> paymentFee.getAmountDue()).reduce(BigDecimal::add);\n if (totalAmountDue.isPresent() && totalAmountDue.get().compareTo(BigDecimal.ZERO) == 0) {\n throw new ServiceRequestExceptionForNoAmountDue(\"The serviceRequest has already been paid\");\n }\n }", "public String checkFormat() {\r\n\t\t\r\n\t\tString msg = null;\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t\t\t\t\t//input is not a number\r\n\t\t\t\r\n\t\t\tDouble.parseDouble(price.getText());\r\n\t\t\tInteger.parseInt(quantity.getText());\r\n\t\t\t \r\n\t\t}\r\n\t\t\r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\treturn msg = \"Data format is invalid\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(name.getText().isEmpty() \t\t\t\t\t//wine name is empty\r\n\t\t\t\t|| name.getText().length() > 30\t\t\t//wine name is more than 30 letters\r\n\t\t\t\t\t|| quantity.getText().isEmpty()\t\t//quantity is empty\r\n\t\t\t\t\t\t||price.getText().isEmpty()\t\t//price is empty\r\n\t\t\t\t\t\t\t||((!(price.getText().length() - price.getText().indexOf('.') == 3))\t//price is not two decimal spaces \r\n\t\t\t\t\t\t\t\t\t&& price.getText().indexOf('.') != -1))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tmsg = \"Data format is invalid\";\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tmsg = null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn msg;\r\n\t\t\r\n\t}", "public static String checkAmount(String paramName, String paramValue,\n\t\t\tint maxLength, boolean isNulable) {\n\t\tAppLog.begin();\n\t\tString errMsg = null;\n\t\ttry {\n\t\t\tif (null != paramValue) {\n\t\t\t\tif (!isNulable && paramValue.trim().length() == 0) {\n\n\t\t\t\t\terrMsg = paramName + \" is Mandatory.\";\n\t\t\t\t\tAppLog.end();\n\t\t\t\t\treturn errMsg;\n\t\t\t\t}\n\t\t\t\tif (paramValue.length() != 0) {\n\t\t\t\t\tif (!checkPresenceOfParticularChar(paramValue,\n\t\t\t\t\t\t\tDJBConstants.checkAmountRegex)) {\n\t\t\t\t\t\terrMsg = \"Invalid \" + paramName + \".\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (paramValue.length() > maxLength) {\n\t\t\t\t\terrMsg = paramName + \" Should not Contain More than \"\n\t\t\t\t\t\t\t+ maxLength + \" Characters.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!isNulable) {\n\t\t\t\t\terrMsg = paramName + \" is Mandatory.\";\n\t\t\t\t\tAppLog.end();\n\t\t\t\t\treturn errMsg;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\terrMsg = \"Invalid \" + paramName + \".\";\n\t\t\tAppLog.error(ex);\n\t\t}\n\t\tAppLog.end();\n\t\treturn errMsg;\n\t}", "private boolean checkIsValid(BankClient client, Message message) {\n int lastDigit = message.getMessageContent() % BASE_TEN;\n int amount = message.getMessageContent() / BASE_TEN;\n if (lastDigit <= DEPOSIT_WITHDRAWAL_FLAG) {\n return amount <= client.getDepositLimit();\n } else {\n return amount <= client.getWithdrawalLimit();\n }\n }", "public abstract Value validateValue(Value value);", "boolean hasMoneyValue();", "boolean hasMoneyValue();", "@When(\"^the user enters 'Mortgage amount = £(\\\\d+),(\\\\d+)'$\")\r\n\tpublic void the_user_enters_Mortgage_amount_£(int arg1, int arg2) throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@id='SearchMortgageAmount']\")).sendKeys(\"150000\");\r\n\t\tSystem.out.println(\"user entered 'Mortgage amount\");\r\n\r\n\t}", "@Test(expected=InvalidInputException.class)\n\tpublic void testDepositAmountForInvalidMobileNumber(){\n\t\tservice= new WalletServiceImpl();\n\t\tBigDecimal bg= new BigDecimal(9000);\n\t\tCustomer customer=service.depositAmount(\"9020320132\", bg);\n\t}", "public static float validatePriceInput(Context context, TextInputEditText editText) {\n // store trimmed raw input as a string\n final String rawPrice = editText.getText().toString().trim();\n\n // check for emptiness and signal user about it\n if (TextUtils.isEmpty(rawPrice)) {\n editText.setError(context.getResources().getString(R.string.editor_edt_empty_input));\n return -1;\n }\n\n // save the input as a float (we check for numbers in xml through inputType)\n try {\n float floatPrice = Float.parseFloat(rawPrice);\n\n if (floatPrice <= 0) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return 0;\n }\n\n return floatPrice;\n\n } catch (NumberFormatException e) {\n editText.setError(context.getResources().getString(R.string.editor_edt_invalid_input));\n return -1;\n }\n }", "@Test(dependsOnMethods = {\"shouldNotBeAbleToInputSpecialCharactersInPriceField\"})\n public void shouldAbleToInputNumericCharactersInDownPaymentField() {\n //1. Enter 1 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1\");\n //2. Enter 12 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12\");\n //3. Enter 123 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"123\");\n //4. Enter 1234 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1234\");\n //5. Enter 12345 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12345\");\n //6. Enter 123456 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"123456\");\n //7. Enter 1234567 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"1234567\");\n //6. Enter 12345678 in the Down Payment field\n calculatePaymentPage.setDownPaymentInput(\"12345678\");\n\n }", "public boolean hasAmount() {\n return amountBuilder_ != null || amount_ != null;\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public boolean isValidPart() {\n boolean result = false;\n boolean isComplete = !partPrice.getText().equals(\"\")\n && !partName.getText().equals(\"\")\n && !inventoryCount.getText().equals(\"\")\n && !partId.getText().equals(\"\")\n && !maximumInventory.getText().equals(\"\")\n && !minimumInventory.getText().equals(\"\")\n && !variableTextField.getText().equals(\"\");\n boolean isValidPrice = isDoubleValid(partPrice);\n boolean isValidName = isCSVTextValid(partName);\n boolean isValidId = isIntegerValid(partId);\n boolean isValidMax = isIntegerValid(maximumInventory);\n boolean isValidMin = isIntegerValid(minimumInventory);\n boolean isMinLessThanMax = false;\n if (isComplete)\n isMinLessThanMax = Integer.parseInt(maximumInventory.getText()) > Integer.parseInt(minimumInventory.getText());\n\n if (!isComplete) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Missing Information\");\n errorMessage.setHeaderText(\"You didn't enter required information!\");\n errorMessage.setContentText(\"All fields are required! Your part has not been saved. Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isMinLessThanMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Entry\");\n errorMessage.setHeaderText(\"Min must be less than Max!\");\n errorMessage.setContentText(\"Re-enter your data! Your part has not been saved.Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isValidPrice) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Price is not valid\");\n errorMessage.setHeaderText(\"The value you entered for price is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered does\" +\n \" not include more than one decimal point (.), does not contain any letters, and does not \" +\n \"have more than two digits after the decimal. \");\n errorMessage.show();\n } else if (!isValidName) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Name\");\n errorMessage.setHeaderText(\"The value you entered for name is not valid.\");\n errorMessage.setContentText(\"Please ensure that the text you enter does not\" +\n \" include any quotation marks,\" +\n \"(\\\"), or commas (,).\");\n errorMessage.show();\n } else if (!isValidId) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect ID\");\n errorMessage.setHeaderText(\"The value you entered for ID is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Max Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Max is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMin) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Min Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Min is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else {\n result = true;\n }\n\n return result;\n }", "@Test\r\n\tpublic void testValidationSuccess() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(VALID_SENDER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setReceiverAccount(VALID_RECEIVER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setTransferAmount(400.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t} catch (ValidationException e) {\r\n\t\t\tAssert.fail(\"Found_Exception\");\r\n\t\t}\r\n\t}", "public abstract FieldReport validate(int fieldSequence, Object fieldValue);", "abstract void fiscalCodeValidity();", "private boolean validateTxns(final Transaxtion txnList[]) throws TaskFailedException {\n\t\tif (txnList.length < 2)\n\t\t\treturn false;\n\t\tdouble dbAmt = 0;\n\t\tdouble crAmt = 0;\n\t\ttry {\n\t\t\tfor (final Transaxtion element : txnList) {\n\t\t\t\tfinal Transaxtion txn = element;\n\t\t\t\tif (!validateGLCode(txn))\n\t\t\t\t\treturn false;\n\t\t\t\tdbAmt += Double.parseDouble(txn.getDrAmount());\n\t\t\t\tcrAmt += Double.parseDouble(txn.getCrAmount());\n\t\t\t}\n\t\t} finally {\n\t\t\tRequiredValidator.clearEmployeeMap();\n\t\t}\n\t\tdbAmt = ExilPrecision.convertToDouble(dbAmt, 2);\n\t\tcrAmt = ExilPrecision.convertToDouble(crAmt, 2);\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Total Checking.....Debit total is :\" + dbAmt + \" Credit total is :\" + crAmt);\n\t\tif (dbAmt != crAmt)\n\t\t\tthrow new TaskFailedException(\"Total debit and credit not matching. Total debit amount is: \" + dbAmt\n\t\t\t\t\t+ \" Total credit amount is :\" + crAmt);\n\t\t// return false;\n\t\treturn true;\n\t}", "private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "@Override\r\n\tpublic void validate(Product p) throws CustomBadRequestException {\r\n\t\tif(p.getName() == null || p.getName().equals(\"\") || p.getBarcode() == null || p.getBarcode().equals(\"\") || p.getMeasure_unit() == null ||\r\n\t\t\t\tp.getMeasure_unit().equals(\"\") || p.getQuantity() == null || p.getQuantity().equals(\"\")|| p.getBrand() == null || p.getBrand().equals(\"\")){\r\n\t\t\tthrow new CustomBadRequestException(\"Incomplete Information about the product\");\r\n\t\t}\r\n\r\n\t\tString eanCode = p.getBarcode();\r\n\t\tString ValidChars = \"0123456789\";\r\n\t\tchar digit;\r\n\t\tfor (int i = 0; i < eanCode.length(); i++) { \r\n\t\t\tdigit = eanCode.charAt(i); \r\n\t\t\tif (ValidChars.indexOf(digit) == -1) {\r\n\t\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add five 0 if the code has only 8 digits\r\n\t\tif (eanCode.length() == 8 ) {\r\n\t\t\teanCode = \"00000\" + eanCode;\r\n\t\t}\r\n\t\t// Check for 13 digits otherwise\r\n\t\telse if (eanCode.length() != 13) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\t// Get the check number\r\n\t\tint originalCheck = Integer.parseInt(eanCode.substring(eanCode.length() - 1));\r\n\t\teanCode = eanCode.substring(0, eanCode.length() - 1);\r\n\r\n\t\t// Add even numbers together\r\n\t\tint even = Integer.parseInt((eanCode.substring(1, 2))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(3, 4))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(5, 6))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(7, 8))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(9, 10))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(11, 12))) ;\r\n\t\t// Multiply this result by 3\r\n\t\teven *= 3;\r\n\r\n\t\t// Add odd numbers together\r\n\t\tint odd = Integer.parseInt((eanCode.substring(0, 1))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(2, 3))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(4, 5))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(6, 7))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(8, 9))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(10, 11))) ;\r\n\r\n\t\t// Add two totals together\r\n\t\tint total = even + odd;\r\n\r\n\t\t// Calculate the checksum\r\n\t\t// Divide total by 10 and store the remainder\r\n\t\tint checksum = total % 10;\r\n\t\t// If result is not 0 then take away 10\r\n\t\tif (checksum != 0) {\r\n\t\t\tchecksum = 10 - checksum;\r\n\t\t}\r\n\r\n\t\t// Return the result\r\n\t\tif (checksum != originalCheck) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\tif(Float.parseFloat(p.getQuantity()) <= 0){\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Quantity\");\r\n\t\t}\r\n\r\n\r\n\t}", "public boolean validarIngresosUsuario_sueldo(JTextField empleadoTF, JTextField montoTF){\n\t\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\t\tif(montoTF.getText().length() >30) return false;\n\t\t\tif(!validarInt(empleadoTF.getText())) return false;\n\t\t\tif(numero==33) return false; //codigo halcones\n\t\t\tif(empleadoTF.getText().length() >30) return false;\n\t\t\t//if(numero < 0) return false;\n\t\t\tif(numero_double < 0) return false;\n\t\t\n\t\t\treturn true;\n\t}", "private static void validate(Card card) throws CardNumberException {\n card.validateNumber();\n }", "@Test\n\n public void shouldNotBeAbleToInputAlphaCharactersInAmountOwedOnTradeField() {\n//1. Enter B in the Trade-In Value field\n//2. Enter z in the Trade-In Value field\n }", "public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }", "public float amountCheck(float amount) {\n\t\twhile(true) {\n\t\t\tif(amount<=0) {\n\t\t\t\tSystem.out.println(\"Amount should be greater than 0.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tamount = sc.nextInt();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn amount;\n\t\t\t}\n\t\t}\n\t}", "@Test(expected=InvalidInputException.class)\n\t\tpublic void testWithdrawAmountForInvalidMobileNumber(){\n\t\t\tservice= new WalletServiceImpl();\n\t\t\tBigDecimal bg= new BigDecimal(9000);\n\t\t\tCustomer customer=service.withdrawAmount(\"9020320132\", bg);\n\t\t}", "public PaymentRequestPage paymentRequestPaymentAvailabilityValidation(String cashbackType,String cashbackValue,String rewardsValue) {\r\n\r\n\t\tString actual = \"\";\r\n\r\n\t\treportStep(\"About to validate the Cashback and Rewards Payment avilablity section in the payment Request page \", \"INFO\");\r\n\r\n\t\tswitch (cashbackType) {\r\n\r\n\t\tcase \"Only_Cashback\":\r\n\r\n\t\t\tvalidateTheElementPresence(cashbackAvailableForPaymentText);\r\n\r\n\t\t\tactual = getText(totalcashbackAvailableForPaymentAmount);\r\n\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, cashbackValue);\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"Only_Rewards\":\r\n\r\n\t\t\tvalidateTheElementPresence(rewardsAvailableForPaymentText);\r\n\r\n\t\t\tactual = getText(totalcashbackAvailableForPaymentAmount);\r\n\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, rewardsValue);\r\n\r\n\t\t\tbreak;\r\n\r\n\r\n\t\tcase \"BothCashback_Rewards\":\r\n\r\n\t\t\tfloat cashbackAmount = Float.parseFloat(cashbackValue);\r\n\t\t\tfloat rewardsAmount = Float.parseFloat(rewardsValue);\r\n\t\t\tfloat totalAmount = cashbackAmount + rewardsAmount ;\r\n\r\n\t\t\tString strTotalAmount = Float.toString(totalAmount) + \"0\";\r\n\t\t\tString strOnlyCashbackAmount = Float.toString(cashbackAmount) + \"0\";\r\n\t\t\tString strOnlyRewardsAmount = Float.toString(rewardsAmount) + \"0\";\r\n\r\n\r\n\t\t\tvalidateTheElementPresence(rewardsAvailableForPaymentText);\r\n\t\t\tvalidateTheElementPresence(cashbackText);\r\n\t\t\tvalidateTheElementPresence(rewardsText);\r\n\r\n\t\t\t//validate total cashback amount\r\n\t\t\tactual = getText(totalcashbackAvailableForPaymentAmount);\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, strTotalAmount);\r\n\r\n\t\t\t//validate only cashback amount\r\n\t\t\tactual = getText(cashbackAvailableForPaymentAmount);\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, strOnlyCashbackAmount);\r\n\r\n\r\n\t\t\t//validate only rewards amount\r\n\t\t\tactual = getText(rewardsAvailableForPaymentAmount);\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, strOnlyRewardsAmount);\r\n\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\r\n\t}" ]
[ "0.6434838", "0.6386841", "0.63493824", "0.634079", "0.63356173", "0.6282881", "0.62572914", "0.6212309", "0.6212309", "0.6196332", "0.6181072", "0.6171213", "0.61689955", "0.61520606", "0.6151573", "0.61292404", "0.6016098", "0.59782624", "0.5965032", "0.5955955", "0.59449613", "0.58885676", "0.58495724", "0.5836119", "0.58229244", "0.5809323", "0.5795214", "0.57859683", "0.57288605", "0.57272965", "0.5711617", "0.5697658", "0.5691123", "0.5687852", "0.5676719", "0.5672085", "0.565322", "0.56429964", "0.5639388", "0.56267494", "0.5624449", "0.5622325", "0.56202245", "0.5598023", "0.5586427", "0.55718875", "0.556857", "0.55684376", "0.555578", "0.5549985", "0.5547266", "0.554223", "0.55248964", "0.55239564", "0.5513622", "0.5498712", "0.5494733", "0.54920197", "0.54886585", "0.5485517", "0.5484066", "0.5482753", "0.5476076", "0.5475301", "0.54730296", "0.54717076", "0.54673755", "0.5466733", "0.54667145", "0.5464043", "0.5463906", "0.54615694", "0.54544413", "0.5447175", "0.54283804", "0.5427091", "0.54146886", "0.54146886", "0.54108644", "0.5406042", "0.5401535", "0.53962356", "0.5395681", "0.53870505", "0.53860617", "0.5385233", "0.5384888", "0.53788584", "0.5374143", "0.5368781", "0.536086", "0.53601456", "0.5356021", "0.53424335", "0.5334378", "0.5333749", "0.53316337", "0.5329386", "0.532627", "0.5321848" ]
0.6139372
15
Method to validate barrier fields
public static void ValidateBarrierField(WebDriver driver,String submarket,String amount_type){ if(submarket=="TouchNoTouch"){ SelectEnterAmount(driver,"10",amount_type,"15","m"); Trade_Page.txt_BarrierOffset(driver).clear(); Trade_Page.txt_BarrierOffset(driver).sendKeys("2"); Assert.assertEquals(Trade_Page.err_BarrierRangeTop(driver).getText(), "Barrier is out of acceptable range."); Assert.assertEquals(Trade_Page.err_BarrierRangeBottom(driver).getText(), "Barrier is out of acceptable range."); } else if(submarket=="HigherLower"){ SelectEnterAmount(driver,"10",amount_type,"15","m"); Trade_Page.txt_BarrierOffset(driver).clear(); Trade_Page.txt_BarrierOffset(driver).sendKeys("2"); Assert.assertEquals(Trade_Page.err_BarrierRangeTop(driver).getText(), "Barrier is out of acceptable range."); Assert.assertEquals(Trade_Page.err_BarrierRangeBottom(driver).getText(), "Barrier is out of acceptable range."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.heightValue, \" Рост: \", b) ||\n !CalendarHelper.isFieldValid(startProgramDateValue, \" Старт программы: \", b) ||\n !new ComboBoxFieldHelper<Client>().isFieldValid(clientFIOValue, \" Клиент: \", b))\n {\n result = false;\n }\n\n return result;\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "private void fillMandatoryFields() {\n\n }", "private void validate() throws FlightCreationException {\n validateNotNull(\"number\", number);\n validateNotNull(\"company name\", companyName);\n validateNotNull(\"aircraft\", aircraft);\n validateNotNull(\"pilot\", pilot);\n validateNotNull(\"origin\", origin);\n validateNotNull(\"destination\", destination);\n validateNotNull(\"departure time\", scheduledDepartureTime);\n\n if (scheduledDepartureTime.isPast()) {\n throw new FlightCreationException(\"The departure time cannot be in the past\");\n }\n\n if (origin.equals(destination)) {\n throw new FlightCreationException(\"The origin and destination cannot be the same\");\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (limb == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'limb' was not present! Struct: \" + toString());\n }\n if (pos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'pos' was not present! Struct: \" + toString());\n }\n if (ori == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'ori' was not present! Struct: \" + toString());\n }\n if (speed == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'speed' was not present! Struct: \" + toString());\n }\n if (angls == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'angls' was not present! Struct: \" + toString());\n }\n if (mode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'mode' was not present! Struct: \" + toString());\n }\n if (kin == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'kin' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (pos != null) {\n pos.validate();\n }\n if (ori != null) {\n ori.validate();\n }\n if (speed != null) {\n speed.validate();\n }\n if (angls != null) {\n angls.validate();\n }\n }", "public void validate() {}", "public void validate() throws org.apache.thrift.TException {\n if (!isSetResourcePlanName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resourcePlanName' is unset! Struct:\" + toString());\n }\n\n if (!isSetPoolPath()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'poolPath' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "private void setupRequiredValidation() {\n requiredMafExpressions.put(FIELD_HUGO_SYMBOL, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_HUGO_SYMBOL, \"may not be blank\");\r\n requiredMafExpressions.put(FIELD_ENTREZ_GENE_ID, Pattern.compile(\"\\\\d+\")); // number\r\n requiredFieldDescriptions.put(FIELD_ENTREZ_GENE_ID, \"must be an integer number\");\r\n requiredMafExpressions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_TUMOR_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_TUMOR_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_VALIDATION_STATUS, Pattern.compile(\"Valid|Wildtype|Unknown|\\\\S?\"));\r\n requiredFieldDescriptions.put(FIELD_VALIDATION_STATUS, \"must be Valid, Wildtype, Unknown, or blank\");\r\n requiredMafExpressions.put(FIELD_CHROMOSOME, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_CHROMOSOME, \"must be one of: X, Y, M, 1-22, or full name of unassigned fragment\");\r\n setupMafSpecificChecks();\r\n }", "@Override\r\n public void validate() {\r\n }", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Value.Check\n default void checkPreconditions()\n {\n RangeCheck.checkIncludedInInteger(\n this.feedback(),\n \"Feedback\",\n RangeInclusiveI.of(0, 7),\n \"Valid feedback values\");\n\n RangeCheck.checkIncludedInInteger(\n this.transpose(),\n \"Transpose\",\n RangeInclusiveI.of(-24, 24),\n \"Valid transpose values\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR1Level(),\n \"Pitch R1 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR1Rate(),\n \"Pitch R1 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR2Level(),\n \"Pitch R2 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR2Rate(),\n \"Pitch R2 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR3Level(),\n \"Pitch R3 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR3Rate(),\n \"Pitch R3 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR4Level(),\n \"Pitch R4 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR4Rate(),\n \"Pitch R4 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoPitchModulationDepth(),\n \"LFO Pitch Modulation Depth\",\n RangeInclusiveI.of(0, 99),\n \"Valid pitch modulation depth values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoPitchModulationSensitivity(),\n \"LFO Pitch Modulation Sensitivity\",\n RangeInclusiveI.of(0, 7),\n \"Valid pitch modulation sensitivity values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoAmplitudeModulationDepth(),\n \"LFO Amplitude Modulation Depth\",\n RangeInclusiveI.of(0, 99),\n \"Valid amplitude modulation depth values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoSpeed(),\n \"LFO Speed\",\n RangeInclusiveI.of(0, 99),\n \"Valid LFO speed values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoDelay(),\n \"LFO Delay\",\n RangeInclusiveI.of(0, 99),\n \"Valid LFO delay values\");\n }", "public void validate() throws org.apache.thrift.TException {\n if (classification == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'classification' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void validateInputParameters(){\n\n }", "private void validateData() {\n }", "public void validate() throws org.apache.thrift.TException {\n if (op == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'op' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "void checkAndUpdateBoundary(Integer requiredChange);", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "public void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tif (MappingClassElement.VERSION_CONSISTENCY == \n\t\t\t\t\tmappingClass.getConsistencyLevel())\n\t\t\t\t{\n\t\t\t\t\tMappingFieldElement versionField =\n\t\t\t\t\t\t validateVersionFieldExistence();\n\t\t\t\t\tString className = mappingClass.getName();\n\t\t\t\t\tString fieldName = versionField.getName();\n\t\t\t\t\tString columnName = null;\n\t\t\t\t\tColumnElement column = null;\n\n\t\t\t\t\tif (versionField instanceof MappingRelationshipElement)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.version_field_relationship_not_allowed\");//NOI18N\n\t\t\t\t\t}\n\t\t\t\t\telse if (MappingFieldElement.GROUP_DEFAULT != \n\t\t\t\t\t\tversionField.getFetchGroup()) // must be in DFG\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.version_field_fetch_group_invalid\");//NOI18N\n\t\t\t\t\t}\n\n\t\t\t\t\tvalidatePersistenceFieldAttributes(className, fieldName);\n\t\t\t\t\tcolumnName = validateVersionFieldMapping(versionField);\n\t\t\t\t\tcolumn = validateTableMatch(className, fieldName, columnName);\n\t\t\t\t\tvalidateColumnAttributes(className, fieldName, column);\n\t\t\t\t}\n\t\t\t}", "public void validate() throws org.apache.thrift.TException {\n if (code == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'code' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (blockMasterInfo != null) {\n blockMasterInfo.validate();\n }\n }", "private void fillMandatoryFields_custom() {\n\n }", "public void validate() throws org.apache.thrift.TException {\n if (is_null == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'is_null' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "@Override\r\n\tprotected void validate() {\n\t}", "static boolean checkBarriers(int minBarrier, int maxBarrier) {\n return Math.abs(maxBarrier - minBarrier) > 1;\n }", "public void validate() throws org.apache.thrift.TException {\n if (institutionID == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'institutionID' was not present! Struct: \" + toString());\n }\n if (productids == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'productids' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "@Override\r\n public boolean validate() {\n return true;\r\n }", "protected void validate() {\n // no op\n }", "@Override\n\t\tpublic void checkPreconditions() {\n\t\t}", "@Override\n\tpublic void validate() {\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (statusCode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statusCode' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "@Override\n\tpublic void validate(CarRegistrationNumber object) {\n\t}", "public Boolean validateBoundaryFields(Property property, String field, RequestInfo requestInfo)\n\t\t\tthrows InvalidPropertyBoundaryException {\n\n\t\tPropertyLocation propertyLocation = property.getBoundary();\n\t\tLong id;\n if (field.equalsIgnoreCase(env.getProperty(\"revenue.boundary\"))) {\n\t\t\tid = propertyLocation.getRevenueBoundary().getId();\n\t\t} else if (field.equalsIgnoreCase(env.getProperty(\"location.boundary\"))) {\n\t\t\tid = propertyLocation.getLocationBoundary().getId();\n\t\t} else {\n\t\t\tid = propertyLocation.getAdminBoundary().getId();\n\t\t}\n return boundaryRepository.isBoundaryExists(property, requestInfo, id);\n\t\t\n\t}", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (key_column_name == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_name' was not present! Struct: \" + toString());\n }\n if (key_column_type == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_type' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'is_preaggregation' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n }", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (emailId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'emailId' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_destApp()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destApp' is unset! Struct:\" + toString());\n }\n\n if (!is_set_destPellet()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destPellet' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "void validate();", "void validate();", "public void validatePropertyBoundary(Property property, RequestInfo requestInfo)\n\t\t\tthrows InvalidPropertyBoundaryException {\n\n\t\tList<String> fields = getAllBoundaries();\n\t\t//TODO location service gives provision to search by multiple ids, no need to do multiple calls for each boundary id\n\t\tfor (String field : fields) {\n\t\t\tvalidateBoundaryFields(property, field, requestInfo);\n\t\t}\n\t}", "@Override\r\n\tpublic void validate() {\n\t\tsuper.validate();\r\n\t\tif(nofck == null)\r\n\t\t\tnofck = false;\r\n\t}", "public void checkFields(){\n }", "private void validateFields() throws InvalidConnectionDataException {\n if (driver == null) throw new InvalidConnectionDataException(\"No driver field\");\n if (address == null) throw new InvalidConnectionDataException(\"No address field\");\n if (username == null) throw new InvalidConnectionDataException(\"No username field\");\n if (password == null) throw new InvalidConnectionDataException(\"No password field\");\n }", "@Override\n\tpublic void selfValidate() {\n\t\t\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_inputs()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'inputs' is unset! Struct:\" + toString());\n }\n\n if (!is_set_streams()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'streams' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "private void VehicleValidation(Vehicle vehicle) throws ServiceException {\n\n\n if (vehicle.getTitle() == null) {\n throw new ServiceException(\"Title is null ! \");\n }\n if (vehicle.getTitle().equals(\"\")) {\n throw new ServiceException(\"Title is empty ! \");\n }\n\n if (vehicle.getYear() == 0) {\n throw new ServiceException(\"year ist empty !\");\n }\n if (!isNumeric(vehicle.getYear() + \"\")) {\n throw new ServiceException(\"wrong format for year !\");\n }\n if (vehicle.getYear()<1885 || vehicle.getYear() >2018){\n throw new ServiceException(\"year has to be between 2018 and 1885 !\");\n }\n String s = vehicle.getYear() + \"\";\n if (s.length() != 4) {\n throw new ServiceException(\"only 4 digit ! \");\n }\n if (!isNumeric(vehicle.getSeats() + \"\")) {\n throw new ServiceException(\"only 1-10 !\");\n }\n if (!vehicle.getLicenseClass().isEmpty()) {\n if (vehicle.getLicensePlate().isEmpty()) {\n throw new ServiceException(\"License Plate is empty !\");\n }\n if (vehicle.getLicensePlate().equals(\"\")) {\n throw new ServiceException(\"License Plate is empty !\");\n }\n }\n if (!isNumeric(vehicle.getPrice() + \"\")) {\n throw new ServiceException(\"wrong format for Price !\");\n }\n if (vehicle.getPrice() == 0 || vehicle.getPrice() < 0) {\n throw new ServiceException(\"wrong format for Price !\");\n }\n\n if (vehicle.getTypeOfDrive().equals(\"motorized\")) {\n if (!isNumeric(vehicle.getPower() + \"\")) {\n throw new ServiceException(\"wrong format for power !\");\n }\n if (vehicle.getPower() == 0) {\n throw new ServiceException(\"power is empty!\");\n }\n }\n\n\n }", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (partition_exprs == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_exprs' was not present! Struct: \" + toString());\n }\n if (partition_infos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_infos' was not present! Struct: \" + toString());\n }\n if (rollup_schemas == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'rollup_schemas' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "void checkValid();", "protected abstract Object validateParameter(Object constraintParameter);", "boolean isRequired();", "boolean isRequired();", "boolean isRequired();", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "private void checkRequiredFields() {\n // check the fields which should be non-null\n if (configFileName == null || configFileName.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configFileName' should not be null.\");\n }\n if (configNamespace == null || configNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configNamespace' should not be null.\");\n }\n if (searchBundleManagerNamespace == null\n || searchBundleManagerNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'searchBundleManagerNamespace' should not be null.\");\n }\n if (entityManager == null) {\n throw new DAOConfigurationException(\n \"The 'entityManager' should not be null.\");\n }\n }", "protected void validateEntity() {\n super.validateEntity();\n }", "public boolean isRequired();", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "public void partValidation () throws ValidationException {\n\n // checks for a name to be entered\n if (getPartName().isEmpty() || !getPartName().matches(\"^[a-zA-Z0-9_ ]*$\")){\n throw new ValidationException(\"Name field is invalid. Can't be blank. Must be alphanumeric\");\n\n // checks that minimum stock isn't less than 0\n }else if (getPartStockMin() < 0) {\n throw new ValidationException(\"Inventory minimum can't be less than 0\");\n\n } else if (getPartStockMax() < 0) {\n throw new ValidationException(\"Inventory max must be greater than 0\");\n\n // checks to make sure max stock is not less than the minimum\n }else if (getPartStockMax() < getPartStockMin()) {\n throw new ValidationException(\"Max inventory can't be less than the minimum\");\n\n // checks that stock on hadn is not less than the minimum\n } else if (getPartStock() < getPartStockMin()){\n throw new ValidationException(\"Part inventory can't be less than the minimum\");\n\n // part price can't be 0 or less\n }else if (getPartPrice() < 0){\n throw new ValidationException(\"Price has to be a positive number\");\n\n // max stock can't be less than what you already have\n }else if (getPartStockMax() < getPartStock()){\n throw new ValidationException(\"Max inventory can't be less than what you have on hand\");\n\n // check stock is between min and max\n } else if (getPartStock() < getPartStockMin() || getPartStock() > getPartStockMax()){\n throw new ValidationException(\"Inventory level must be between min and max\");\n\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (sourceCharged != null) {\n sourceCharged.validate();\n }\n if (targetDeposit != null) {\n targetDeposit.validate();\n }\n }", "protected void validate()\r\n\t{\r\n\t\tif( this.mapper==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the Mapper of this dataset.\");\r\n\t\tif( this.input_format==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the InputFormat of this dataset.\");\r\n\t\tif( this.inputs==null || this.inputs.size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the input path(s) of this dataset\");\r\n\t\tif ( this.getSchema()==null || this.getSchema().size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the schema of this dataset first\");\r\n\t}", "private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (parseId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'parseId' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'constituentIndex' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (parseId != null) {\n parseId.validate();\n }\n }", "private void validateBeforeMerge()\n {\n Assert.assertTrue(!isProductInfo() || type == TTransactionType.simple);\n }", "private boolean areFieldsValid() {\n // Whether the values from the fields can be inserted into the database without conflict.\n boolean retVal = true;\n\n if (vehicleId == -1) {\n // Then we don't know which vehicle to attach this issue to. This should never happen\n return false;\n // TODO: Display something to the user\n }\n\n // If we're creating a new Issue, we need to create the Issue object\n if (issue == null) {\n // A new issue is not fixed, and thus will be open.\n // Try to get the open status id and ensure it properly fetched\n int openIssueId = dbHelper.getOpenIssueStatusId();\n if (openIssueId != -1) {\n issue = new Issue(mTitle.getText().toString().trim(), vehicleId, openIssueId);\n }\n }\n\n // Convert the EditText fields to strings\n String checkTitle = mTitle.getText().toString().trim();\n String checkDescription = mDescription.getText().toString().trim();\n String checkPriority = mPriority.getText().toString().trim();\n\n if (checkTitle.isEmpty()) {\n retVal = false;\n eTitle.setError(getResources().getString(R.string.vehicleSettingsActivity_errorValidationEditTextMessage));\n } else if (!VerifyUtil.isStringSafe(checkTitle)) {\n retVal = false;\n eTitle.setError(getResources().getString(R.string.vehicleSettingsActivity_errorValidationEditTextMessageInvalidCharacters));\n } else {\n eTitle.setError(null);\n issue.setTitle(checkTitle);\n }\n\n if (checkDescription.isEmpty()) {\n retVal = false;\n eDescription.setError(getResources().getString(R.string.vehicleSettingsActivity_errorValidationEditTextMessage));\n } else if (!VerifyUtil.isTextSafe(checkDescription)) {\n retVal = false;\n eDescription.setError(getResources().getString(R.string.vehicleSettingsActivity_errorValidationEditTextMessageInvalidCharacters));\n } else {\n eDescription.setError(null);\n issue.setDescription(checkDescription);\n }\n\n if (checkPriority.isEmpty()) {\n retVal = false;\n ePriority.setError(getResources().getString(R.string.vehicleSettingsActivity_errorValidationEditTextMessage));\n } else {\n ePriority.setError(null);\n issue.setPriority(priorityStringToInt(checkPriority));\n }\n\n return retVal;\n }", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "protected void validate() {\n // no implementation.\n }", "private void validate() {\n Validate.notNull(uriLocatorFactory);\n Validate.notNull(preProcessorExecutor);\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetColName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'colName' is unset! Struct:\" + toString());\n }\n\n if (!isSetColType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'colType' is unset! Struct:\" + toString());\n }\n\n if (!isSetStatsData()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statsData' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'id' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "private void validateBirdName() {\n if (!validator.checkPresence(txtBirdName.getValue())) {\n txtBirdName.setErrorMessage(\"This field cannot be left blank.\");\n txtBirdName.setInvalid(true);\n removeValidity();\n }\n // Check that field does not contain numbers (type check)\n else if (!validator.checkNoNumbers(txtBirdName.getValue())) {\n txtBirdName.setErrorMessage(\"The bird mustn't contain numbers. Enter quantity in the next field.\");\n txtBirdName.setInvalid(true);\n removeValidity();\n }\n // Check that bird is among those being researched (look-up table check)\n else if (!validator.checkIsBirdBeingResearched(txtBirdName.getValue())) {\n txtBirdName.setErrorMessage(\"Please enter a bird name that is among those being researched. This field is case sensitive.\");\n txtBirdName.setInvalid(true);\n removeValidity();\n }\n }", "@Override\n public void validateModel() {\n }", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUuidFicha()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'uuidFicha' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (headerTransport != null) {\n headerTransport.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUserProfileId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'userProfileId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityType' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (levelInfo != null) {\r\n levelInfo.validate();\r\n }\r\n }", "public void validate () { throw new RuntimeException(); }", "public abstract boolean validate();", "public void validate() throws org.apache.thrift.TException {\n if (tableType == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableType' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'numCols' because it's a primitive and you chose the non-beans generator.\n // alas, we cannot check 'numClusteringCols' because it's a primitive and you chose the non-beans generator.\n if (tableName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableName' was not present! Struct: \" + toString());\n }\n if (dbName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'dbName' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (hdfsTable != null) {\n hdfsTable.validate();\n }\n if (hbaseTable != null) {\n hbaseTable.validate();\n }\n if (dataSourceTable != null) {\n dataSourceTable.validate();\n }\n }", "private boolean checkFields() {\n if (editTxtName.getText().equals(\"\")) return false;//name\n if (editTxtDesc.getText().equals(\"\")) return false;//desc\n if (editClrColor.getValue() == null) return false;//color\n if (oldEnvironment == null) return false;//environment is null\n return true;//everything is valid\n }", "private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }" ]
[ "0.6777036", "0.6593369", "0.6260926", "0.6237419", "0.6193735", "0.6145627", "0.60918534", "0.6091656", "0.6079719", "0.6045013", "0.604254", "0.6038891", "0.60353434", "0.6033634", "0.602545", "0.6023079", "0.5992484", "0.5980819", "0.59801275", "0.597726", "0.59747547", "0.59726244", "0.59688324", "0.5957153", "0.59559125", "0.5930375", "0.5928807", "0.5926622", "0.59241015", "0.5914677", "0.58995754", "0.58981967", "0.58889", "0.5887836", "0.5878389", "0.5857605", "0.5855527", "0.58550423", "0.58540154", "0.5847217", "0.5844503", "0.58071923", "0.5806218", "0.58004105", "0.5791532", "0.5784062", "0.5780891", "0.5780891", "0.57689625", "0.57674843", "0.57494825", "0.57450414", "0.5740099", "0.5727421", "0.57267594", "0.5711292", "0.5711292", "0.5702851", "0.5698856", "0.569463", "0.569463", "0.569463", "0.567456", "0.5671823", "0.5659608", "0.56546485", "0.56546485", "0.56546485", "0.56545955", "0.56519383", "0.56453055", "0.564047", "0.56371135", "0.5629521", "0.56265336", "0.56159914", "0.561293", "0.5606743", "0.55849713", "0.55841917", "0.5582822", "0.5582052", "0.5579484", "0.5577697", "0.55750716", "0.55748606", "0.55734706", "0.5562481", "0.554662", "0.55229545", "0.55192757", "0.5517429", "0.55152583", "0.5514888", "0.551033", "0.5508151", "0.55078554", "0.5507012", "0.5503983", "0.54931885" ]
0.5963627
23
Method to validate top contract purchase
public static void ValidateContractTopPurchase(WebDriver driver,String submarket,String duration,String durationType,String amount){ GetTradeConfirmationDetails(driver,submarket,duration,durationType,amount); Trade_Page.btn_View(driver).click(); Assert.assertTrue(Trade_Page.window_SellPopup(driver).isDisplayed()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add(\"Job No. is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqStatus()))\n\t\t\tmessages.add(\"PO Status is required\");\n\t\tif(MALUtilities.isEmptyString(mrq.getMaintReqType()))\n\t\t\tmessages.add(\"PO Type is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getCurrentOdo()))\n\t\t\tmessages.add(\"Odo is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate()))\n\t\t\tmessages.add(\"Actual Start Date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getPlannedEndDate()))\n\t\t\tmessages.add(\"End date is required\");\n\t\tif(MALUtilities.isEmpty(mrq.getServiceProvider()))\n\t\t\tmessages.add(\"Service Provider is required\");\n\t\t/* TODO Need to determine if this check is necessary. We do not have a hard requirement for this.\n\t\tif(!MALUtilities.isEmpty(po.getServiceProvider()) \n\t\t\t\t&& (!MALUtilities.convertYNToBoolean(po.getServiceProvider().getNetworkVendor()) \n\t\t\t\t\t\t&& this.calculateMarkUp(po).compareTo(new BigDecimal(0.00)) < 1))\n\t\t\tmessages.add(\"Mark Up is required for out of network service providers\");\n\t */\n\t\t\n\t\t//Validate PO Line items (tasks) required data\n\t\tif(!MALUtilities.isEmpty(mrq.getMaintenanceRequestTasks())){\n\t\t\tfor(MaintenanceRequestTask line : mrq.getMaintenanceRequestTasks()){\n\t\t\t\tif(MALUtilities.isEmptyString(line.getMaintCatCode()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Maint Category is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTaskQty()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Qty is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getUnitCost()))\n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Unit Price is required\");\n\t\t\t\tif(MALUtilities.isEmpty(line.getTotalCost())) \n\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total Amount is required\");\t\t\t\t\t\t\t\t\n\t\t\t\tif(!(MALUtilities.isEmpty(line.getTaskQty()) && MALUtilities.isEmpty(line.getUnitCost()))){\n\t\t\t\t\tamount = line.getUnitCost().multiply(line.getTaskQty()).setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\t\t\t\tif( amount.compareTo(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP)) != 0)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Total amount is incorrect\");\t\t\t\t\t\t\t\n\t\t\t\t}\t\n/** TODO This will not work well with goodwill POs as the user will not have the changes to add cost avoidance data to subsequent lines.\t\t\t\t\n\t\t\t\tif(mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillReason()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillCost()) || line.getGoodwillCost().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Amount is required\");\t\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getGoodwillPercent()) || line.getGoodwillPercent().compareTo(new BigDecimal(0)) < 1)\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Goodwill Percent is required\");\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!mrq.isGoodwillIndicator() && line.isCostAvoidanceIndicator()){\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceCode()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Reason is required\");\n\t\t\t\t\tif(MALUtilities.isEmpty(line.getCostAvoidanceAmount()))\n\t\t\t\t\t\tmessages.add(\"Line \" + line.getIndex() + \": Cost Avoidance Amount is required\");\t\t\t\t\t\n\t\t\t\t}\n*/\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(messages.size() > 0)\n\t\t\tthrow new MalBusinessException(\"service.validation\", messages.toArray(new String[messages.size()]));\t\t\n\t\t\n\t}", "private boolean validatePuchase() {\n if (TextUtils.isEmpty(editextPurchaseSupplierName.getText().toString())) {\n editextPurchaseSupplierName.setError(getString(R.string.supplier_name));\n editextPurchaseSupplierName.requestFocus();\n return false;\n }\n\n if (TextUtils.isEmpty(edittextPurchaseAmount.getText().toString())) {\n if (flowpurchaseReceivedOrPaid == 2) {\n edittextPurchaseAmount.setError(getString(R.string.menu_purchasePaid));\n edittextPurchaseAmount.requestFocus();\n\n } else {\n edittextPurchaseAmount.setError(getString(R.string.purchase_amount));\n edittextPurchaseAmount.requestFocus();\n }\n return false;\n }\n\n if (TextUtils.isEmpty(edittextPurchasePurpose.getText().toString())) {\n edittextPurchasePurpose.setError(getString(R.string.remark_bill_number));\n edittextPurchasePurpose.requestFocus();\n return false;\n }\n\n\n return true;\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "public void validate() {\n ASPManager mgr = getASPManager();\n ASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n ASPCommand cmd;\n String val = mgr.readValue(\"VALIDATE\");\n// String PRICE = \"\";\n \n \n if (\"CONTRACT_ID\".equals(val)) {\n cmd = trans.addCustomFunction(\"GETCONTRACTNAME\", \n \"PROJECT_CONTRACT_API.Get_Contract_Desc\", \"CONTRACT_NAME\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n cmd = trans.addCustomFunction(\"GETSECONDSIDE\", \n \"PROJECT_CONTRACT_API.Get_Secend_Side\", \"SECOND_SIDE\");\n cmd.addParameter(\"PROJ_NO,CONTRACT_ID\");\n \n trans = mgr.validate(trans);\n String contractName = trans.getValue(\"GETCONTRACTNAME/DATA/CONTRACT_NAME\");\n String SECONDSIDE = trans.getValue(\"GETSECONDSIDE/DATA/SECOND_SIDE\");\n trans.clear();\n cmd = trans.addCustomFunction(\"GETSECONDSIDENAME\", \n \"SUPPLIER_INFO_API.GET_NAME\", \"SECOND_SIDE_NAME\");\n cmd.addParameter(\"SECOND_SIDE\",SECONDSIDE);\n \n trans = mgr.validate(trans);\n \n String SECONDSIDENAME = trans.getValue(\"GETSECONDSIDENAME/DATA/SECOND_SIDE_NAME\");\n\n String txt = ((mgr.isEmpty(contractName)) ? \"\" : contractName ) + \"^\"\n + ((mgr.isEmpty(SECONDSIDE)) ? \"\" : SECONDSIDE ) + \"^\" \n + ((mgr.isEmpty(SECONDSIDENAME)) ? \"\" : SECONDSIDENAME ) + \"^\";\n \n mgr.responseWrite(txt);\n }\n mgr.endResponse();\n }", "@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "@Override\r\n\tpublic void validate(Product p) throws CustomBadRequestException {\r\n\t\tif(p.getName() == null || p.getName().equals(\"\") || p.getBarcode() == null || p.getBarcode().equals(\"\") || p.getMeasure_unit() == null ||\r\n\t\t\t\tp.getMeasure_unit().equals(\"\") || p.getQuantity() == null || p.getQuantity().equals(\"\")|| p.getBrand() == null || p.getBrand().equals(\"\")){\r\n\t\t\tthrow new CustomBadRequestException(\"Incomplete Information about the product\");\r\n\t\t}\r\n\r\n\t\tString eanCode = p.getBarcode();\r\n\t\tString ValidChars = \"0123456789\";\r\n\t\tchar digit;\r\n\t\tfor (int i = 0; i < eanCode.length(); i++) { \r\n\t\t\tdigit = eanCode.charAt(i); \r\n\t\t\tif (ValidChars.indexOf(digit) == -1) {\r\n\t\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add five 0 if the code has only 8 digits\r\n\t\tif (eanCode.length() == 8 ) {\r\n\t\t\teanCode = \"00000\" + eanCode;\r\n\t\t}\r\n\t\t// Check for 13 digits otherwise\r\n\t\telse if (eanCode.length() != 13) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\t// Get the check number\r\n\t\tint originalCheck = Integer.parseInt(eanCode.substring(eanCode.length() - 1));\r\n\t\teanCode = eanCode.substring(0, eanCode.length() - 1);\r\n\r\n\t\t// Add even numbers together\r\n\t\tint even = Integer.parseInt((eanCode.substring(1, 2))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(3, 4))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(5, 6))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(7, 8))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(9, 10))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(11, 12))) ;\r\n\t\t// Multiply this result by 3\r\n\t\teven *= 3;\r\n\r\n\t\t// Add odd numbers together\r\n\t\tint odd = Integer.parseInt((eanCode.substring(0, 1))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(2, 3))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(4, 5))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(6, 7))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(8, 9))) + \r\n\t\t\t\tInteger.parseInt((eanCode.substring(10, 11))) ;\r\n\r\n\t\t// Add two totals together\r\n\t\tint total = even + odd;\r\n\r\n\t\t// Calculate the checksum\r\n\t\t// Divide total by 10 and store the remainder\r\n\t\tint checksum = total % 10;\r\n\t\t// If result is not 0 then take away 10\r\n\t\tif (checksum != 0) {\r\n\t\t\tchecksum = 10 - checksum;\r\n\t\t}\r\n\r\n\t\t// Return the result\r\n\t\tif (checksum != originalCheck) {\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Barcode\");\r\n\t\t}\r\n\r\n\t\tif(Float.parseFloat(p.getQuantity()) <= 0){\r\n\t\t\tthrow new CustomBadRequestException(\"Invalid Quantity\");\r\n\t\t}\r\n\r\n\r\n\t}", "boolean isCartValid();", "@Test\n\t@Ignore(\"Order no compila porque solicita un int, pero en la base de datos lo inserta sobre un string\")\n\tpublic void testValidateOrderC4() {\n\t\tUser user = new User(\"U-aaaaa-000\", \"Usuario\", \"Usuario1\", \"12213428H\", Date.valueOf(\"2017-04-24\"), User.PID);\n\t\tOrder order = new Order(\"O-aaaaa-000\", Order.WAITTING, user, \"U-eftgk-234\");\n\t\tItem item = new Item(\"I-aaaaa-000\", \"producto\", \"Descripcion del producto\", \"cosas\", 50, Date.valueOf(\"2000-01-01\"));\n\t\tLine line = new Line(2, 19.99f, item);\n\t\torder.addLine(line);\n\t\t\n\t\tPurchase purchase = new Purchase(\"V-aaaaa-000\", order, Date.valueOf(\"2017-05-04\"), 0.2f);\n\t\t\n\t\tassertFalse(testClass.validateOrder(purchase, true));\n\t}", "private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }", "@Test\r\n\tpublic void testMakePurchase_enough_money() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tvendMachine.addItem(test, \"C\");\r\n\t\tvendMachine.insertMoney(10.0);\r\n\t\tassertEquals(true, vendMachine.makePurchase(\"A\"));\r\n\t}", "public ValidationResult validateContract() {\n return validateContract(apiContract);\n }", "private static boolean verifyDeveloperPayload(Purchase p) {\n RequestParams params = new RequestParams();\n params.put(\"signed_data\", p.getOriginalJson());\n params.put(\"signature\", p.getSignature());\n\n String url = \"http://54.218.122.252/api/receipt/android\";\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n client.post(url, params, new ResponseHandlerInterface() {\n @Override\n public void sendResponseMessage(HttpResponse httpResponse) throws IOException {\n\n }\n\n @Override\n public void sendStartMessage() {\n\n }\n\n @Override\n public void sendFinishMessage() {\n\n }\n\n @Override\n public void sendProgressMessage(long l, long l1) {\n\n }\n\n @Override\n public void sendCancelMessage() {\n\n }\n\n @Override\n public void sendSuccessMessage(int i, Header[] headers, byte[] bytes) {\n\n }\n\n @Override\n public void sendFailureMessage(int i, Header[] headers, byte[] bytes, Throwable throwable) {\n\n }\n\n @Override\n public void sendRetryMessage(int i) {\n\n }\n\n @Override\n public URI getRequestURI() {\n return null;\n }\n\n @Override\n public void setRequestURI(URI uri) {\n\n }\n\n @Override\n public Header[] getRequestHeaders() {\n return new Header[0];\n }\n\n @Override\n public void setRequestHeaders(Header[] headers) {\n\n }\n\n @Override\n public boolean getUseSynchronousMode() {\n return false;\n }\n\n @Override\n public void setUseSynchronousMode(boolean b) {\n\n }\n\n @Override\n public boolean getUsePoolThread() {\n return false;\n }\n\n @Override\n public void setUsePoolThread(boolean b) {\n\n }\n\n @Override\n public void onPreProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n\n }\n\n @Override\n public void onPostProcessResponse(ResponseHandlerInterface responseHandlerInterface, HttpResponse httpResponse) {\n try {\n String result = EntityUtils.toString(httpResponse.getEntity());\n JSONObject myObject = new JSONObject(result);\n if(myObject.getInt(\"status\") == 1) {\n unlockContentSuccess();\n } else {\n complain(\"Error purchasing. Authenticity verification failed.\");\n }\n }catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n }\n }\n\n @Override\n public Object getTag() {\n return null;\n }\n\n @Override\n public void setTag(Object o) {\n\n }\n });\n return false;\n\n /*\n * TODO: verify that the developer payload of the purchase is correct.\n * It will be the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally generating a random string when starting a purchase\n * and verifying it here might seem like a good approach, but this will\n * fail in the case where the user purchases an item on one device and\n * then uses your app on a different device, because on the other device\n * you will not have access to the random string you originally\n * generated.\n *\n * So a good developer payload has these characteristics:\n *\n * 1. If two different users purchase an item, the payload is different\n * between them, so that one user's purchase can't be replayed to\n * another user.\n *\n * 2. The payload must be such that you can verify it even when the app\n * wasn't the one who initiated the purchase flow (so that items\n * purchased by the user on one device work on other devices owned by\n * the user).\n *\n * Using your own server to store and verify developer payloads across\n * app installations is recommended.\n */\n //return true;\n }", "private void validate(final CartDto cartDto) throws BadRequestException {\n if (cartDto.getSkuCode() == null || \"\".equals(cartDto.getSkuCode())) {\n LOG.info(\"Sku code is mandatory.\");\n throw new BadRequestException(\"Sku code is mandatory\");\n }\n if (cartDto.getQuantity() <= 0) {\n LOG.info(\"Quantity must be 1 or greater.\");\n throw new BadRequestException(\"Quantity must be 1 or greater\");\n }\n }", "private synchronized void validateData(Quote q) throws DataValidationException, InvalidDataException {\n\t\tif (q == null) throw new InvalidDataException(\"Quote cannot be null.\");\n\t\tif (q.getQuoteSide(BookSide.SELL).getPrice().lessOrEqual(q.getQuoteSide(BookSide.BUY).getPrice())) {\n\t\t\tthrow new DataValidationException(\"Sell price: \" + q.getQuoteSide(BookSide.SELL).getPrice() +\n\t\t\t\t\t\" cannot be less than or equal to the buy price: \" + q.getQuoteSide(BookSide.BUY).getPrice());\n\t\t}\n\t\tif (q.getQuoteSide(BookSide.BUY).getPrice().lessOrEqual(PriceFactory.makeLimitPrice(0)) || \n\t\t\t\tq.getQuoteSide(BookSide.SELL).getPrice().lessOrEqual(PriceFactory.makeLimitPrice(0))) {\n\t\t\tthrow new DataValidationException(\"The buy and sell prices cannot be less than or equal to 0. \"\n\t\t\t\t\t+ \"Your buy price: \" + q.getQuoteSide(BookSide.BUY).getPrice() \n\t\t\t\t\t+ \". Your sell price: \" + q.getQuoteSide(BookSide.SELL).getPrice());\n\t\t}\n\t\tif (q.getQuoteSide(BookSide.BUY).getOriginalVolume() <= 0 || \n\t\t\t\tq.getQuoteSide(BookSide.SELL).getOriginalVolume() <= 0) {\n\t\t\tthrow new DataValidationException(\"The original volume of the BUY or SELL side cannot be less than or equal to 0. \"\n\t\t\t\t\t+ \"Your BUY volume: \" + q.getQuoteSide(BookSide.BUY).getOriginalVolume()\n\t\t\t\t\t+ \". Your SELL volume: \" + q.getQuoteSide(BookSide.SELL).getOriginalVolume());\n\t\t}\n\t}", "public void checkCreditCard() throws BusinessException;", "public void validate(Object target, Errors errors) {\n\t\tInvoiceDTO invoiceDTO = (InvoiceDTO) target;\n\t\tif(invoiceDTO.getQuantity() <= 0) {\n\t\t\terrors.rejectValue(\"quantity\", \"msg.wrong\");\n\t\t}\n \t\t\n\t}", "@Test(priority =2)\n\tpublic void validateProceedToCheckoutPagePrice()\n\t{\n\t\tAssert.assertEquals(proceedtocheckoutpage.getPrice(), ResultsPage.price);\n\t\tnavigateToCheckoutPage();\n\t}", "public void verifyBusinessRules(Coin Coin) throws Exception {\n\t}", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "@Override\n\tprotected boolean isImplementationValid()\n\t{\n\t\treturn (this.amount > 0);\n\t}", "private void validt() {\n\t\t// -\n\t\tnmfkpinds.setPgmInd99(false);\n\t\tstateVariable.setZmsage(blanks(78));\n\t\tfor (int idxCntdo = 1; idxCntdo <= 1; idxCntdo++) {\n\t\t\tproductMaster.retrieve(stateVariable.getXwabcd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00005 Product not found on Product_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0003\", \"XWABCD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - If addition, pull the price from file:\n\t\t\tif (nmfkpinds.funKey06()) {\n\t\t\t\tstateVariable.setXwpric(stateVariable.getXwanpr());\n\t\t\t}\n\t\t\t// -\n\t\t\tstoreMaster.retrieve(stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00006 Store not found on Store_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0369\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstockBalances.retrieve(stateVariable.getXwabcd(), stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00007 Store not found on Stock_Balances or CONDET.Contract_Qty >\n\t\t\t// BR Onhand_Quantity\n\t\t\tif (nmfkpinds.pgmInd99() || (stateVariable.getXwa5qt() > stateVariable.getXwbhqt())) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0370\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Transaction Type:\n\t\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00008 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0371\", \"XWRICD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Unit of measure:\n\t\t\t// BR00009 U_M = 'EAC'\n\t\t\tif (equal(\"EAC\", stateVariable.getXwa2cd())) {\n\t\t\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0372\", \"XWA2CD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public void VerifyCheckoutTotalPrice(String Exptitle){\r\n\t\tString ExpTitle=getValue(Exptitle);\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:- Total Price should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"txtCheckoutOrdertotal\"), ExpTitle)){\r\n\t\t\t\tSystem.out.println(\"Total Price in Billing is present \"+getText(locator_split(\"txtCheckoutOrdertotal\")));\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"Total Price in Billing is not present\");\r\n\t\t\t}\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Total Price title is present\");\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Total Price title is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCheckoutOrdertotal\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "@Test\n public void testMoreRequired() throws VendingMachineInventoryException{\n service.addFunds(\"1.00\");\n Item testitem = new Item(\"testitem\", \"1.50\", \"5\");\n service.addItem(\"testitem\", testitem);\n BigDecimal moneyRequired = service.moreRequired(\"testitem\");\n BigDecimal expectedMoneyRequired = new BigDecimal(\"0.50\");\n assertEquals(moneyRequired, expectedMoneyRequired);\n }", "public interface Validation {\n\n\tboolean isValidTrade(TradeDetail tradeDetail) throws TradeStoreException;\n\n}", "@Test\r\n\tpublic void testMakePurchase_empty_slot() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"D\"));\r\n\t}", "public ResultMessage checkPurchase(PurchaseVO vo) throws RemoteException{\r\n\t\tif(RemoteHelper.getInstance().getPurchaseBillDataService().checkPurchaseBill(toPurchaseBillPO(vo))==feedback.Success){\r\n\t\t\treturn ResultMessage.SUCCESS;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn ResultMessage.FAILED;\r\n\t\t}\r\n\t}", "protected void validate() {\n\t\tString quantity=editText.getText().toString().trim();\n\t\tif(quantity.length()==0){\n\t\t\tAlertUtils.showToast(mContext, \"Enter quantity\");\n\t\t\treturn;\n\t\t}else if(!isValidNumber(quantity)){\n\t\t\tAlertUtils.showToast(mContext, \"Enter valid quantity\");\n\t\t\treturn;\n\t\t}\n//\t\tif(((HomeActivity)mContext).checkInternet())\n//\t\t\tdialogCallback.setQuantity(item);\n\t}", "UserPayment validate(String cardHolderName,String cardType,String securityCode,String paymentType);", "void validateTransactionForPremiumWorksheet(Record inputRecord, Connection conn);", "@Test(priority=3)\n\tpublic void validateCheckoutPagePrice()\n\t{\n\t\tAssert.assertEquals(ResultsPage.price, checkoutpage.getPrice() );\n\t}", "public boolean buyItem(Product n){\n\n if (balance.buyItem(n.getPrice()) == true & n.getQuantity() != 0 & vending_balance != 0) {\n validPurchase = true; // valid purchase was made\n vending_balance = 0; // resets vending balance to 0\n n.setQuantity(); // product quantity is -1\n return true;\n }\n\n else { // if quantity is 0 or balance is does not meet or exceed product's price\n return false;\n }\n }", "final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\n }", "public TestResult validate(License license, ValidationParameters validationParameters);", "@Test\r\n\tpublic void testValidationSuccess() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(VALID_SENDER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setReceiverAccount(VALID_RECEIVER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setTransferAmount(400.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t} catch (ValidationException e) {\r\n\t\t\tAssert.fail(\"Found_Exception\");\r\n\t\t}\r\n\t}", "public void verifyToCart() {\n if (priceText.getText().equalsIgnoreCase(\"$0.00\")) {\n Assert.fail();\n System.out.println(\"No products have been added to your cart.\");\n\n\n } else\n System.out.println(\"\\n\" +\n \"The product has been successfully added to the Cart.\" + \"\\n\" + \"Total Price: \" + priceText.getText());\n\n }", "@Test\n\tvoid cannotPurchase() {\n\t\ttestCrew.setMoney(0);\n\t\titemList.get(0).purchase(testCrew);\n\t\tassertEquals(testCrew.getMoney(), 0);\n\t\tassertTrue(testCrew.getMedicalItems().isEmpty());\n\t}", "@Test(priority=1)\n\tpublic void validateProductPagePrice()\n\t{\n\t\tAssert.assertEquals(productpage.getPrice(), ResultsPage.price);\n\t\tproceedToCheckOut();\n\t\t\n\t}", "void purchaseMade();", "private void businessValidationForOnlinePaymentServiceRequestOrder(PaymentFeeLink order, OnlineCardPaymentRequest request) {\n Optional<BigDecimal> totalCalculatedAmount = order.getFees().stream().map(paymentFee -> paymentFee.getCalculatedAmount()).reduce(BigDecimal::add);\n if (totalCalculatedAmount.isPresent() && (totalCalculatedAmount.get().compareTo(request.getAmount()) != 0)) {\n throw new ServiceRequestExceptionForNoMatchingAmount(\"The amount should be equal to serviceRequest balance\");\n }\n\n //Business validation for amount due for fees\n Optional<BigDecimal> totalAmountDue = order.getFees().stream().map(paymentFee -> paymentFee.getAmountDue()).reduce(BigDecimal::add);\n if (totalAmountDue.isPresent() && totalAmountDue.get().compareTo(BigDecimal.ZERO) == 0) {\n throw new ServiceRequestExceptionForNoAmountDue(\"The serviceRequest has already been paid\");\n }\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }", "public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }", "void onValidatePrepaidPriceplan(Context ctx, Subscriber oldSub, Subscriber newSub) throws HomeException\r\n\t{\n\t\tif (newSub != null && newSub.isPrepaid())\r\n\t\t{\r\n\t\t\tPricePlanVersion ppl = (PricePlanVersion) ctx.get(PricePlanVersion.class) ;\r\n\t\t\t\t\r\n\t\t\t\t//newSub.getPricePlan(ctx);\r\n\t\t\t// validate account state\r\n\t\t\tif (ppl != null && ppl.getDeposit() != 0)\r\n\t\t\t{\r\n\t\t\t\t//migration from provisionhome.java\r\n\t\t\t\t//log3013(subscriber, account, pricePlan);\r\n\r\n\t\t\t\tthrow new HomeException(\"Please make a deposit release for \" + ppl.getDeposit() + \" or change price plan before doing this transaction\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void startNewPurchase() throws VerificationFailedException {\n\t}", "public void startNewPurchase() throws VerificationFailedException {\n\t}", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "public List<String> validate (PostPurchaseOrderRequest postPurchaseOrderRequest) {\n\n List<String> errorList = new ArrayList<>();\n\n errorList.addAll(commonPurchaseOrderValidator.validateLineItems(postPurchaseOrderRequest.getPurchaseOrder().getLineItems(),\n postPurchaseOrderRequest.getPurchaseOrder().getStatus()));\n\n\n return errorList;\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public void validate() throws org.apache.thrift.TException {\n if (ctpTradeId != null) {\n ctpTradeId.validate();\n }\n if (esunny3TradeId != null) {\n esunny3TradeId.validate();\n }\n if (esunny9TradeId != null) {\n esunny9TradeId.validate();\n }\n }", "@Test\n\tpublic void testValidTransaction() {\n\t\t\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\tdatabase.addCustomer(merchant);\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tString transJMSMessage = transHandle.generateTransactionJMSRequest();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\n\t\tassertEquals(\"Transaction participants are valid\",verifyParticipants);\n\t\tassertEquals(transJMSMessage,customer.getBankId()+\" \"+ merchant.getBankId()+ \" \" + amount + \" \" + \"comment\");\n\t}", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "@Override\n public int consumePurchase(int apiVersion, String packageName, String purchaseToken) throws RemoteException {\n return apiVersion < 3 ? RESULT_DEVELOPER_ERROR : _db.consume(purchaseToken);\n }", "public static void validateSpendable(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n if (header.getBlockHeight() >= params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() > header.getBlockHeight())\n {\n throw new ValidationException(String.format(\"Output can not be spent until height %d\", \n out.getRequirements().getRequiredBlockHeight()));\n }\n if (out.getRequirements().getRequiredTime() > header.getTimestamp())\n {\n throw new ValidationException(String.format(\"Output can not be spent until time %d\", \n out.getRequirements().getRequiredTime()));\n }\n }\n\n }", "public double calculateCost(Purchase purchase);", "private void fireOrderValidityCheck() {\n ordersDatabaseReference.child(eventUid).child(order.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists() && (dataSnapshot.getValue() != null)) {\n order = dataSnapshot.getValue(Order.class);\n\n // We check if by the time the user finished entering his details the order has become invalid\n // If so, we send him back to main activity\n if (order.getStatusAsEnum() == DataUtils.OrderStatus.CANCELLED) {\n progressDialog.dismiss();\n onOrderExpired();\n }\n // Otherwise continue the order process\n else {\n fireCreditCardTokenCreation();\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {}\n });\n }", "@Test\n\tpublic void testInvalidMerchantTransaction() {\n\n\t\tString customerCpr = \"111111-0000\";\n\t\tString merchantCpr = \"000000-1111\";\n\t\tString uuid = \"123412345\";\n\t\tdouble amount = 100;\n\t\t\n\t\tCustomer customer = new Customer(customerCpr,\"customer\",\"bankid\");\n\t\tCustomer merchant = new Customer(merchantCpr,\"merchant\",\"bankid\");\n\t\tdatabase.addCustomer(customer);\n\t\t//database.addCustomer(merchant); Merchant not in database\n\t\tdatabase.addBarcode(customerCpr, uuid);\n\t\t\n\t\tTransactionRequest transRequest = new TransactionRequest(uuid,merchantCpr,amount,\"comment\");\n\t\tTransactionHandler transHandle = new TransactionHandler(transRequest);\n\t\t\n\t\tString verifyParticipants = transHandle.verifyTransactionParticipants();\n\t\tdatabase.deleteCustomer(customerCpr);\n\t\tdatabase.deleteCustomer(merchantCpr);\n\t\t\n\t\tassertEquals(\"This merchant is not a DTUPay user\",verifyParticipants);\n\t}", "@Test\r\n\tpublic void testInput2() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"5432.00\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"6199.81\"));\r\n\t}", "public void orderChecker()\n {\n System.out.print( \"Number of bolts: \" );\n int bolts = scan.nextInt();\n System.out.print( \"Number of nuts: \" );\n int nuts = scan.nextInt();\n System.out.print( \"Number of washers: \" );\n int washers = scan.nextInt();\n if ( nuts >= bolts )\n {\n if ( washers >= 2 * bolts )\n {\n System.out.println( \"Check the Order: Order is OK.\" );\n }\n else\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n else\n {\n System.out.println( \"Check the Order: Too few nuts.\" );\n if ( ( washers < 2 * bolts ) )\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n\n final int boltPrice = 5;\n final int nutPrice = 3;\n final int washerPrice = 1;\n int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers;\n System.out.println( \"Total cost: \" + cost );\n }", "@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }", "@Test\r\n\tpublic void testTransferAmountNegative() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(\"123456\");\r\n\t\taccountTransferRequest.setReceiverAccount(\"123456\");\r\n\t\taccountTransferRequest.setTransferAmount(-100.0);\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t\tAssert.fail(\"Exception_Expected\");\r\n\t\t} catch (ValidationException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t\tAssert.assertEquals(\"transferAmount_Cannot_Be_Negative_Or_Zero\", exception.getMessage());\r\n\r\n\t\t}\r\n\t}", "@Test\n public void testValidateNewOrderProduct() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n assertEquals(true, service.validateNewOrderProduct(order3));\n }", "CarPaymentMethod processHotDollars();", "@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }", "@Test(dependsOnMethods = {\"searchItem\"})\n\tpublic void purchaseItem() {\n\t\tclickElement(By.xpath(item.addToCar));\n\t\twaitForText(By.id(item.cartButton), \"1\");\n\t\tclickElement(By.id(item.cartButton));\n\t\t// on checkout screen validating the title and price of item is same as what we selected on search result page by text.\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.priceLocator(price)))));\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.titlelocator(title)))));\t\n\t}", "public boolean isValid_ToBuyTicket() {\n if (this.tktSold < this.museum.getMaxVisit() && isNowTime_in_period()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Override\r\n\tpublic JSONObject valid(Merchant merchant,String amount) {\n\t\tBank bank = merchant.getBanks().stream().filter(b -> b.getBankType().equals(true)).findFirst().get();\r\n\t\tBigDecimal money = bank.getOverMoney().subtract(new BigDecimal(amount)).subtract(merchant.getFee());\r\n\t\t\r\n\t\tif (merchant.getState() != 1){\r\n\t\t\treturn Result.error.toJson(\"商户状态异常,拒绝代付\");\r\n\t\t}\r\n\t\t\r\n\t\tif (!bank.getPayeeState()){\r\n\t\t\treturn Result.error.toJson(\"未开启代付功能\");\r\n\t\t}\r\n\t\t\r\n\t\tif (money.compareTo(BigDecimal.ZERO) < 0){\r\n\t\t\treturn Result.error.toJson(\"账户余额不足\");\r\n\t\t}\r\n\t\treturn Result.success.toJson(\"校验成功\");\r\n\t}", "private boolean checkout() {\n if (OrderMenuUI.incompleteOrders == null || OrderMenuUI.incompleteOrders.size() == 0) {\n System.out.println(\"No orders ready for checkout. Cancelling Operation\");\n return false;\n }\n HashMap<Integer, Order> tOrders = new HashMap<>();\n OrderMenuUI.incompleteOrders.forEach((s) -> {\n Table c = s.getTable();\n if (c == null) return;\n tOrders.put(c.getTableNum(), s);\n });\n tOrders.put(-1, null);\n OrderMenuUI.printOrderList(OrderMenuUI.incompleteOrders, \"Ready for Checkout\", true);\n int tableNo = ScannerHelper.getIntegerInput(\"Select Table to checkout (-1 to cancel): \", new ArrayList<>(tOrders.keySet()), \"Invalid Table Number. Please select a valid table number or enter -1 to cancel\");\n if (tableNo == -1) {\n System.out.println(\"Checkout Operation Cancelled\");\n return false;\n }\n Order o = tOrders.get(tableNo);\n double total = printOrderDetails(o);\n System.out.println();\n System.out.println(\"Payment Mode\");\n System.out.println(\"1) Cash\");\n System.out.println(\"2) NETS\");\n System.out.println(\"3) Debit/Credit Card\");\n System.out.println(\"4) EZ-Link\");\n System.out.println(\"0) Cancel\");\n int choice = ScannerHelper.getIntegerInput(\"Select Payment Mode (0 to cancel): \", -1, 5);\n double paid;\n Invoice.PaymentType paymentType;\n switch (choice) {\n case 1:\n paid = requestCashPayment(total);\n paymentType = Invoice.PaymentType.PAYMENT_CASH;\n break;\n case 2:\n paymentType = Invoice.PaymentType.PAYMENT_NETS;\n paid = total; // All card payments are presumed paid fully\n break;\n case 3:\n paymentType = Invoice.PaymentType.PAYMENT_CARD;\n paid = total; // All card payments are presumed paid fully\n break;\n case 4:\n paymentType = Invoice.PaymentType.PAYMENT_EZLINK;\n paid = total; // All card payments are presumed paid fully\n break;\n case 0:\n System.out.println(\"Operation Cancelled\");\n return false;\n default:\n throw new MenuChoiceInvalidException(\"Checkout Payment\");\n }\n System.out.println(\"Payment Complete! Payment Mode: \" + paymentType.toString());\n if (paymentType == Invoice.PaymentType.PAYMENT_CASH) {\n System.out.println(\"Change: $\" + String.format(\"%.2f\", (paid - total)));\n }\n\n System.out.println(\"Generating Receipt...\");\n o.markPaid();\n OrderMenuUI.incompleteOrders.remove(o);\n ArrayList<String> receipt = generateReceipt(o, total, paid, paymentType);\n System.out.println();\n receipt.forEach(System.out::println);\n String receiptName = \"-\";\n if (writeReceipt(receipt, o.getOrderID())) {\n receiptName = o.getOrderID() + \".txt\";\n }\n Invoice i = new Invoice(o, receiptName, paymentType, total, paid);\n MainApp.invoices.add(i);\n System.out.println(\"\\n\");\n System.out.println(\"Returning to Main Menu...\");\n return true;\n }", "public static Sale validateSale(TextField billno, LocalDate startdate, ComboBox customername, TextField nextdate, String onekgQty, String twokgQty, String fourkgQty, String fivekgQty, String sixkgQty, String ninekgQty, String onekgAmt, String twokgAmt, String fourkgAmt, String fivekgAmt, String sixkgAmt, String ninekgAmt, TextField amount) {\r\n Sale sale = new Sale();\r\n try {\r\n if (billno.getText().isEmpty() || startdate == null || customername.getValue() == null || nextdate.getText().isEmpty() || amount.getText().isEmpty()) {\r\n new PopUp(\"Error\", \"Field is Empty\").alert();\r\n } else {\r\n sale = new Sale();\r\n Date ndd = new SimpleDateFormat(\"dd-MM-yyyy\").parse(nextdate.getText());\r\n java.sql.Date nd = new java.sql.Date(ndd.getTime());\r\n sale.setBillno(Integer.valueOf(billno.getText()));\r\n sale.setStartdate(java.sql.Date.valueOf(startdate));\r\n sale.setShopname(customername.getValue().toString());\r\n sale.setNextdate(nd);\r\n if (onekgQty == null) {\r\n onekgQty = \"0\";\r\n }\r\n if (twokgQty == null) {\r\n twokgQty = \"0\";\r\n }\r\n if (fourkgQty == null) {\r\n fourkgQty = \"0\";\r\n }\r\n if (fivekgQty == null) {\r\n fivekgQty = \"0\";\r\n }\r\n if (sixkgQty == null) {\r\n sixkgQty = \"0\";\r\n }\r\n if (ninekgQty == null) {\r\n ninekgQty = \"0\";\r\n }\r\n sale.setOnekgqty(Integer.valueOf(onekgQty));\r\n sale.setTwokgqty(Integer.valueOf(twokgQty));\r\n sale.setFourkgqty(Integer.valueOf(fourkgQty));\r\n sale.setFivekgqty(Integer.valueOf(fivekgQty));\r\n sale.setSixkgqty(Integer.valueOf(sixkgQty));\r\n sale.setNinekgqty(Integer.valueOf(ninekgQty));\r\n if (onekgAmt == null) {\r\n onekgAmt = \"0.00\";\r\n }\r\n if (twokgAmt == null) {\r\n twokgAmt = \"0.00\";\r\n }\r\n if (fourkgAmt == null) {\r\n fourkgAmt = \"0.00\";\r\n }\r\n if (fivekgAmt == null) {\r\n fivekgAmt = \"0.00\";\r\n }\r\n if (sixkgAmt == null) {\r\n sixkgAmt = \"0.00\";\r\n }\r\n if (ninekgAmt == null) {\r\n ninekgAmt = \"0.00\";\r\n }\r\n sale.setOnekgamount(BigDecimal.valueOf(Double.valueOf(onekgAmt)));\r\n sale.setTwokgamount(BigDecimal.valueOf(Double.valueOf(twokgAmt)));\r\n sale.setFourkgamount(BigDecimal.valueOf(Double.valueOf(fourkgAmt)));\r\n sale.setFivekgamount(BigDecimal.valueOf(Double.valueOf(fivekgAmt)));\r\n sale.setSixkgamount(BigDecimal.valueOf(Double.valueOf(sixkgAmt)));\r\n sale.setNinekgamount(BigDecimal.valueOf(Double.valueOf(ninekgAmt)));\r\n sale.setAmount(BigDecimal.valueOf(Double.valueOf(amount.getText())));\r\n\r\n }\r\n } catch (ParseException error) {\r\n error.printStackTrace();\r\n }\r\n return sale;\r\n }", "public void validateRpd3s15()\n {\n // This guideline cannot be automatically tested.\n }", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "public TransactionResponse sell() {\r\n \t\ttry {\r\n \t\t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tint id = hyperObject.getId();\r\n \t\t\tint data = hyperObject.getData();\r\n \t\t\tString name = hyperObject.getName();\r\n \t\t\tif (giveInventory == null) {\r\n \t\t\t\tgiveInventory = hp.getPlayer().getInventory();\r\n \t\t\t}\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tif (id >= 0) {\r\n \t\t\t\t\tint totalitems = im.countItems(id, data, giveInventory);\r\n \t\t\t\t\tif (totalitems < amount) {\r\n \t\t\t\t\t\tboolean sellRemaining = hc.getYaml().getConfig().getBoolean(\"config.sell-remaining-if-less-than-requested-amount\");\r\n \t\t\t\t\t\tif (sellRemaining) {\r\n \t\t\t\t\t\t\tamount = totalitems;\r\n \t\t\t\t\t\t} else {\t\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (amount > 0) {\r\n \t\t\t\t\t\tdouble price = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\tBoolean toomuch = false;\r\n \t\t\t\t\t\tif (price == 3235624645000.7) {\r\n \t\t\t\t\t\t\ttoomuch = true;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!toomuch) {\r\n \t\t\t\t\t\t\tint maxi = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\tboolean isstatic = false;\r\n \t\t\t\t\t\t\tboolean isinitial = false;\r\n \t\t\t\t\t\t\tisinitial = Boolean.parseBoolean(hyperObject.getInitiation());\r\n \t\t\t\t\t\t\tisstatic = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\tif ((amount > maxi) && !isstatic && isinitial) {\r\n \t\t\t\t\t\t\t\tamount = maxi;\r\n \t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\t\t\t\tif (acc.checkshopBalance(price) || sunlimited) {\r\n \t\t\t\t\t\t\t\tif (maxi == 0) {\r\n \t\t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tim.removeItems(id, data, amount, giveInventory);\r\n \t\t\t\t\t\t\t\tdouble shopstock = 0;\r\n \t\t\t\t\t\t\t\tshopstock = hyperObject.getStock();\r\n \t\t\t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setStock(shopstock + amount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint maxi2 = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\t\tif (maxi2 == 0) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setInitiation(\"false\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble salestax = hp.getSalesTax(price);\r\n \t\t\t\t\t\t\t\tacc.deposit(price - salestax, hp.getPlayer());\r\n \t\t\t\t\t\t\t\tacc.withdrawShop(price - salestax);\r\n \t\t\t\t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"SELL_MESSAGE\"), amount, calc.twoDecimals(price), name, calc.twoDecimals(salestax)), price - salestax, hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"sale\", name, (double) amount, calc.twoDecimals(price - salestax), calc.twoDecimals(salestax), playerecon, type);\r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(name, null, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t\treturn response;\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"CURRENTLY_CANT_SELL_MORE_THAN\"), hyperObject.getStock(), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"CANNOT_BE_SOLD_WITH\"), name), hyperObject);\r\n \t\t\t\t\treturn response;\t\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_SELL_LESS_THAN_ONE\"), name), hyperObject);\r\n \t\t\t\treturn response;\t\r\n \t\t\t}\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction sell() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', id='\" + hyperObject.getId() + \"', data='\" + hyperObject.getData() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "@Test\n public void isCorrectTest(){\n BuyCard cardErr = new BuyCard(12,0);\n\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Row index out of bounds.\");\n cardErr.isCorrect();\n }", "public void validateRpd3s12()\n {\n // This guideline cannot be automatically tested.\n }", "public PaymentRequestPage paymentRequestPaymentAvailabilityValidation(String cashbackType,String cashbackValue,String rewardsValue) {\r\n\r\n\t\tString actual = \"\";\r\n\r\n\t\treportStep(\"About to validate the Cashback and Rewards Payment avilablity section in the payment Request page \", \"INFO\");\r\n\r\n\t\tswitch (cashbackType) {\r\n\r\n\t\tcase \"Only_Cashback\":\r\n\r\n\t\t\tvalidateTheElementPresence(cashbackAvailableForPaymentText);\r\n\r\n\t\t\tactual = getText(totalcashbackAvailableForPaymentAmount);\r\n\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, cashbackValue);\r\n\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"Only_Rewards\":\r\n\r\n\t\t\tvalidateTheElementPresence(rewardsAvailableForPaymentText);\r\n\r\n\t\t\tactual = getText(totalcashbackAvailableForPaymentAmount);\r\n\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, rewardsValue);\r\n\r\n\t\t\tbreak;\r\n\r\n\r\n\t\tcase \"BothCashback_Rewards\":\r\n\r\n\t\t\tfloat cashbackAmount = Float.parseFloat(cashbackValue);\r\n\t\t\tfloat rewardsAmount = Float.parseFloat(rewardsValue);\r\n\t\t\tfloat totalAmount = cashbackAmount + rewardsAmount ;\r\n\r\n\t\t\tString strTotalAmount = Float.toString(totalAmount) + \"0\";\r\n\t\t\tString strOnlyCashbackAmount = Float.toString(cashbackAmount) + \"0\";\r\n\t\t\tString strOnlyRewardsAmount = Float.toString(rewardsAmount) + \"0\";\r\n\r\n\r\n\t\t\tvalidateTheElementPresence(rewardsAvailableForPaymentText);\r\n\t\t\tvalidateTheElementPresence(cashbackText);\r\n\t\t\tvalidateTheElementPresence(rewardsText);\r\n\r\n\t\t\t//validate total cashback amount\r\n\t\t\tactual = getText(totalcashbackAvailableForPaymentAmount);\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, strTotalAmount);\r\n\r\n\t\t\t//validate only cashback amount\r\n\t\t\tactual = getText(cashbackAvailableForPaymentAmount);\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, strOnlyCashbackAmount);\r\n\r\n\r\n\t\t\t//validate only rewards amount\r\n\t\t\tactual = getText(rewardsAvailableForPaymentAmount);\r\n\t\t\tvalidateTheActualValueContainsExpectedValue(actual, strOnlyRewardsAmount);\r\n\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\r\n\t}", "private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "private void validateTransaction(Transaction transaction) throws LedgerException {\n // Convenience variable for throwing exceptions\n String action = \"process transaction\";\n\n // Get Accounts related to the transaction\n Account payer = transaction.getPayer();\n Account receiver = transaction.getReceiver();\n Account master = this.currentBlock.getAccount(\"master\");\n\n // Check accounts are linked to valid/exisiting accounts\n if ( payer == null || receiver == null || master == null ) {\n throw new LedgerException(action, \"Transaction is not linked to valid account(s).\");\n }\n\n // Check for transaction id uniqueness\n validateTransactionId(transaction.getTransactionId());\n\n // Get total transaction withdrawal\n int amount = transaction.getAmount();\n int fee = transaction.getFee();\n int withdrawal = amount + fee;\n\n /*\n * Check the transaction is valid.\n *\n * Withdrawal, and receiver's ending balance must be _greater than_ the\n * MIN_ACCOUNT_BALANCE and _less than_ the MAX_ACCOUNT_BALANCE. The number\n * must be checked against both ends of the range in cases where an amount\n * would exceed MAX_ACCOUNT_BALANCE (i.e. Integer.MAX_VALUE), which will\n * wrap around to a value < 0.\n */\n if (withdrawal < MIN_ACCOUNT_BALANCE || withdrawal > MAX_ACCOUNT_BALANCE) {\n throw new LedgerException(action, \"Withdrawal exceeds total available currency.\");\n } else if ( payer.getBalance() < withdrawal ) {\n throw new LedgerException(action, \"Payer has an insufficient balance.\");\n } else if ( fee < MIN_FEE ) {\n throw new LedgerException(action, \"The transaction does not meet the minimum fee requried.\");\n } else if ( (amount + receiver.getBalance()) < MIN_ACCOUNT_BALANCE || (amount + receiver.getBalance()) > MAX_ACCOUNT_BALANCE) {\n throw new LedgerException(action, \"Receiver's balance would exceed maximum allowed.\");\n }\n\n // Valid transaction, Transfer funds\n payer.withdraw(withdrawal);\n receiver.deposit(amount);\n master.deposit(fee);\n }", "@Test\n public void purchaseCustomConstructor_isCorrect() throws Exception {\n\n int purchaseId = 41;\n int userId = 99;\n int accountId = 6541;\n double price = 99.99;\n String date = \"02/19/2019\";\n String time = \"12:12\";\n String category = \"test category\";\n String location = \"test location\";\n String comment = \"test comment\";\n\n //Create empty purchase\n Purchase purchase = new Purchase(purchaseId, userId, accountId, price, date, time, category, location, comment);\n\n // Verify Values\n assertEquals(purchaseId, purchase.getPurchaseId());\n assertEquals(userId, purchase.getUserId());\n assertEquals(accountId, purchase.getAccountId());\n assertEquals(price, purchase.getPrice(), 0);\n assertEquals(date, purchase.getDate());\n assertEquals(time, purchase.getTime());\n assertEquals(category, purchase.getCategory());\n assertEquals(location, purchase.getLocation());\n assertEquals(comment, purchase.getComment());\n }", "public VerificationMethod verifyPurchase(String expectedText) {\n String successPurchaseMessage = readText(successGuestPurchaseBy);\n assertStringEquals(successPurchaseMessage, expectedText);\n return this;\n }", "private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }", "@Test\r\n\tpublic void testInput1() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"1299.99\"), 3, \"food\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"1591.58\"));\r\n\t}", "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n \n }", "public void partValidation () throws ValidationException {\n\n // checks for a name to be entered\n if (getPartName().isEmpty() || !getPartName().matches(\"^[a-zA-Z0-9_ ]*$\")){\n throw new ValidationException(\"Name field is invalid. Can't be blank. Must be alphanumeric\");\n\n // checks that minimum stock isn't less than 0\n }else if (getPartStockMin() < 0) {\n throw new ValidationException(\"Inventory minimum can't be less than 0\");\n\n } else if (getPartStockMax() < 0) {\n throw new ValidationException(\"Inventory max must be greater than 0\");\n\n // checks to make sure max stock is not less than the minimum\n }else if (getPartStockMax() < getPartStockMin()) {\n throw new ValidationException(\"Max inventory can't be less than the minimum\");\n\n // checks that stock on hadn is not less than the minimum\n } else if (getPartStock() < getPartStockMin()){\n throw new ValidationException(\"Part inventory can't be less than the minimum\");\n\n // part price can't be 0 or less\n }else if (getPartPrice() < 0){\n throw new ValidationException(\"Price has to be a positive number\");\n\n // max stock can't be less than what you already have\n }else if (getPartStockMax() < getPartStock()){\n throw new ValidationException(\"Max inventory can't be less than what you have on hand\");\n\n // check stock is between min and max\n } else if (getPartStock() < getPartStockMin() || getPartStock() > getPartStockMax()){\n throw new ValidationException(\"Inventory level must be between min and max\");\n\n }\n }", "public void validateRpd3s14()\n {\n // This guideline cannot be automatically tested.\n }", "abstract void fiscalCodeValidity();", "@Override\n\tpublic ResponseInfo ZuoFeiPurchasecontract(Map<String, Object> map) {\n\t\tResponseInfo info = new ResponseInfo();\n\t\tint result = purchaseDao.ZuoFeiPurchasecontract(map);\n\t\tif(result > 0) {\n\t\t\tList<Map<String,Object>> PurchaserequisitionList = purchaseDao.getPurchaserequisitionByPurchasecontractId(map);\n\t\t\tfor (int i = 0; i < PurchaserequisitionList.size(); i++) {\n\t\t\t\tPurchaserequisitionList.get(i).put(\"applySign\", 0);\n\t\t\t\tresult = purchaseDao.updatePurchaserequisitionIsApplySign(PurchaserequisitionList.get(i));\n\t\t\t\tif(result<0) {\n\t\t\t\t\tinfo.setMessage(\"操作失败\");\n\t\t\t\t\tinfo.setCode(\"error\");\n\t\t\t\t\tTransactionAspectSupport.currentTransactionStatus().setRollbackOnly();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tinfo.setMessage(\"操作成功\");\n\t\t\t\tinfo.setCode(\"success\");\n\t\t\t}else {\n\t\t\t\tinfo.setMessage(\"操作失败\");\n\t\t\t\tinfo.setCode(\"error\");\n\t\t}\n\t\treturn info;\n\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tInteger Amount = Integer.valueOf(editText.getText().toString());\n\t\t\t\t\t\t\tif ((Amount > 0) && (Amount * item.GetPrice() <= MainGameActivity.getPlayerFromBackpack().GetMoney())){\n\t\t\t\t\t\t\t\tMainGameActivity.getPlayerFromBackpack().SetMoney(MainGameActivity.getPlayerFromBackpack().GetMoney() - Amount * item.GetPrice());\n\t\t\t\t\t\t\t\titem.SetNItem(item.GetNItem() + Amount);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tshowBuyItem();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* Showing message that Amount is not valid */\n\t\t\t\t\t\t\t\tTextView textError = (TextView) dialog.findViewById(R.id.messageItem);\n\t\t\t\t\t\t\t\ttextError.setText(\"Amount is not valid!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void createTransaction() {\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n if(mCategory == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Category_Income_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(etAmount.getText().toString().replaceAll(\",\", \"\"));\n if(amount < 0) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Amount_Invalid));\n return;\n }\n\n int CategoryId = mCategory != null ? mCategory.getId() : 0;\n String Description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n boolean isDebtValid = true;\n // Less: DebtCollect, More: Borrow\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n }\n\n if(isDebtValid) {\n Transaction transaction = new Transaction(0,\n TransactionEnum.Income.getValue(),\n amount,\n CategoryId,\n Description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n long newTransactionId = mDbHelper.createTransaction(transaction);\n\n if (newTransactionId != -1) {\n\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) newTransactionId);\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n mDbHelper.deleteTransaction(newTransactionId);\n }\n } else {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n }\n }\n\n }", "@Override\n public void onIabPurchaseFinished(IabResult result, Purchase purchase) {\n if (result.isSuccess()) {\n Toast.makeText(getApplicationContext(), \"!! Purchase Success !!\" + result,\n Toast.LENGTH_SHORT).show();\n return;\n } else if (result.isFailure()) {\n Toast.makeText(getApplicationContext(), \"!! Purchase Failed !!\" + result,\n Toast.LENGTH_SHORT).show();\n MainConsumer();\n try {\n mHelper.launchPurchaseFlow(MainActivity.this, inappId, 1001,\n mPurchaseFinishedListener, null);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return;\n } else if (purchase.getSku().equals(\"SKU_GAS\")) {\n Toast.makeText(getApplicationContext(), \"!! Gas \\n Consumed !!\",\n Toast.LENGTH_SHORT).show();\n // consume the gas and update the UI\n } else if (purchase.getSku().equals(\"SKU_PREMIUM\")) {\n Toast.makeText(getApplicationContext(), \"!! Premium !!\",\n Toast.LENGTH_SHORT).show();\n // give user access to premium content and update the UI\n } else if (purchase.getSku().equals(inappId)) {\n Toast.makeText(getApplicationContext(), \"!! Android.Test.Purchased !!\",\n Toast.LENGTH_SHORT).show();\n }\n }", "public static void validateInventorySummaryRequest(final InvInventoryRequest request) {\r\n//\t\ttry {\r\n\t\t\tvalidateBaseRequest(request);\r\n//\t\t} \r\n//\t\tcatch (IllegalArgumentException e) {\r\n//\t\t\tthrow e;\r\n//\t\t}\r\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}" ]
[ "0.6757798", "0.6441471", "0.6395565", "0.6395565", "0.6234337", "0.6105334", "0.6097271", "0.6077207", "0.60730314", "0.6044051", "0.5940269", "0.5936669", "0.5798317", "0.57909286", "0.5771436", "0.56856257", "0.5676788", "0.5666243", "0.5609501", "0.56082773", "0.56034076", "0.5602746", "0.5601381", "0.5601214", "0.5595349", "0.55884933", "0.55671394", "0.55567336", "0.555104", "0.5547558", "0.55466723", "0.55348325", "0.552841", "0.5525202", "0.55207056", "0.5516341", "0.55161023", "0.5495489", "0.54856837", "0.54759103", "0.5447098", "0.5446296", "0.54441273", "0.5437703", "0.54296106", "0.5429155", "0.54245037", "0.5420572", "0.54148096", "0.54148096", "0.5384146", "0.53833497", "0.5371814", "0.53673923", "0.5356162", "0.53541434", "0.53532004", "0.5350648", "0.5348259", "0.53366584", "0.53337157", "0.53081125", "0.53029794", "0.5297456", "0.529637", "0.52959996", "0.5293253", "0.5292146", "0.5284805", "0.5280528", "0.5280221", "0.5279319", "0.527828", "0.527393", "0.5269449", "0.5265041", "0.52607286", "0.52590925", "0.5258118", "0.52525926", "0.5243424", "0.5240418", "0.52328783", "0.5228007", "0.5226889", "0.5224592", "0.5219021", "0.52155215", "0.52152056", "0.52143455", "0.5208948", "0.5202684", "0.5198337", "0.5197263", "0.5195561", "0.5193079", "0.51911986", "0.51911986", "0.51911986", "0.51911986" ]
0.63848615
4
LC167 Two Sum II Input array is sorted;
public int[] twoSumSorted(int[] numbers, int target) { int len = numbers.length; if (len < 2) return null; int left = 0, right = len - 1; while(left < right){ int tmp = numbers[left] + numbers[right]; if (tmp == target) { return new int[] {left + 1, right + 1}; } else if (tmp > target) { right--; } else { left++; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbers.length; i++) {\n valueToIndex.put(numbers[i], i);\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n \n int[] result = new int[2];\n if (aux[i] == aux[j]) { /* Handle duplicates */\n int first = -1, second = -1;\n for (int k = 0; k < numbers.length; k++) {\n if (numbers[k] == aux[i]) {\n if (first == -1) {\n first = k;\n } else if (second == -1) {\n second = k;\n break;\n }\n }\n }\n result[0] = first + 1;\n result[1] = second + 1;\n return result;\n }\n \n \n if (valueToIndex.get(aux[i]) < valueToIndex.get(aux[j])) {\n result[0] = valueToIndex.get(aux[i]) + 1;\n result[1] = valueToIndex.get(aux[j]) + 1;\n } else {\n result[0] = valueToIndex.get(aux[j]) + 1;\n result[1] = valueToIndex.get(aux[i]) + 1;\n }\n return result;\n }", "public L170TwoSum() {\n arrayList = new ArrayList<>();\n isSorted = false;\n }", "public static void main(String[] args) throws Exception {\n int arr[]= {7,9,88,-33,2,12,6,1};\n Arrays.sort(arr);\n /*for(int i=0; i<arr.length; i++)\n \t System.out.print(arr[i]+\", \");\n System.out.println(\"\\n DESC\");\n System.out.print(\"{ \");\n for(int i=arr.length-1; i>=0; i--) {\n \t if(arr[i]==arr[0])\n \t System.out.print(arr[i]);\n \t else \n \t\t System.out.print(arr[i]+\", \");\n }*/\n // System.out.print(\" }\");\n \n int[] ar= {6,2,2,5,2,2,1};\n int startIndex=0;\n int lastIndex=ar.length-1;\n //a is sumRight,b = sumLeft\n int a=0,b=0;\n /* while(true) {\n \t \n \t if(b>a) \n \t\t //1+2+2=+5\n \t\t a+=ar[lastIndex--];\n \t else \n \t\t //6+2+2\n \t\t\t b+=ar[startIndex++];\n \t\tif(startIndex>lastIndex) {\n \t\t\tSystem.out.println(startIndex);\n \t\t\tif(a==b)\n \t\t\t\tbreak;\n \t\t\t else\n \t\t\t throw new Exception(\"not a valid array\");\n \t\t\t\n \t\t}\n \t\t\t \n \t\t\n }\n System.out.println(lastIndex);\n */\n \n \n while(true) {\n \t \n \t if(b>a)\n \t\t a+= ar[lastIndex--];\n \t else\n b+=ar[startIndex++];\n \t if(startIndex>lastIndex) {\n \t\t if(a==b)\n \t\t\t break;\n \t }\n }\n System.out.println(lastIndex);\n\t}", "public static void main(String[] args) {\n List<Integer> li = new ArrayList<>();\n li.add(4);\n li.add(4);\n li.add(2);\n li.add(2);\n li.add(2);\n li.add(2);\n li.add(3);\n li.add(3);\n li.add(1);\n li.add(1);\n li.add(6);\n li.add(7);\n li.add(5);\n li.add(5);\n li.add(3);\n li.add(1);\n li.add(2);\n li.add(2);\n li.add(4);\n\n List<Integer> li1 = new ArrayList<>();\n li1.add(5);\n li1.add(1);\n li1.add(2);\n li1.add(3);\n li1.add(4);\n li1.add(1);\n System.out.println(li1);\n int[] array = { 4, 4, 2, 2, 2, 2, 3, 3, 1, 1, 6, 7, 5 };\n\n customSort(li1);\n//\n// missingWords(\"I am using hackerrank to improve programming\",\"am hackerrank to improve\");\n//\n// System.out.println(fourthBit(32));\n////nums\n// System.out.println(kSub(3,li1));\n\n Float f = 0.1F;\n\n System.out.println(f);;\n\n System.out.println(new BigDecimal(f.toString()));\n\n System.out.println(twoSum(new int[]{2,7,1,4}, 9));\n }", "public static int[] twoSumBetter(int[] numbers, int target) {\n int[] aux = new int[numbers.length];\n for (int i = 0; i < numbers.length; i++) {\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n int firstTarget = aux[i], secondTarget = aux[j];\n \n int[] result = new int[2];\n boolean foundOne = false;\n int leftOver = -1;\n for (int k = 0; k < numbers.length; k++) {\n \n if (foundOne) {\n if (numbers[k] == leftOver) {\n result[1] = k + 1;\n return result;\n }\n }\n \n if (numbers[k] == firstTarget || numbers[k] == secondTarget) {\n \n foundOne = true;\n leftOver = numbers[k] == firstTarget ? secondTarget : firstTarget;\n result[0] = k + 1;\n }\n }\n \n return result;\n \n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Please enter space separated array to sort array with merge sort: \\n\"); \r\n\t\tString[] arrRowItems = scanner.nextLine().split(\" \");\r\n\t\tscanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\r\n\t\tint[] arr = new int[arrRowItems.length];\r\n\t\tfor (int j = 0; j < arrRowItems.length; j++) {\r\n\t\t\tint arrItem = Integer.parseInt(arrRowItems[j]);\r\n\t\t\tarr[j] = arrItem;\r\n\t\t}\r\n\t\tint arrCopy[] = arr;\r\n\t\tmergeSort(arr, 0, arr.length - 1,true); // sort ascending \r\n\t\tSystem.out.println(\"Ascending Array \\n\");\r\n\t\tprintMyarray(arr);\r\n\t\tmergeSort(arrCopy, 0, arrCopy.length - 1,false); // sort descending\r\n\t\tSystem.out.println(\"\\nDescending Array \\n\");\r\n\t\tprintMyarray(arrCopy);\r\n\t\tscanner.close();\r\n\t}", "public static void a2v2(int[] A)\n {\n Map<Integer, List<Integer>> hashMap = new HashMap<>();\n\n insert(hashMap, 0, -1);\n\n int sum = 0;\n\n for (int i = 0; i < A.length; i++)\n {\n sum += A[i];\n\n if (hashMap.containsKey(sum))\n {\n List<Integer> list = hashMap.get(sum);\n\n // find all subarrays with the same sum\n for (Integer value: list)\n {\n System.out.println(\"Subarray [\" + (value + 1) + \"…\" +\n i + \"]\");\n }\n }\n\n // insert (sum so far, current index) pair into the hashmap\n insert(hashMap, sum, i);\n }\n }", "public static void main(String[] args) throws java.lang.Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t// System.out.println(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\t// int N = sc.nextInt();\n\t\tlong[] one = new long[N];\n\t\tlong[] two = new long[N];\n\t\tint count = 0, countb = 0;\n\t\tlong sum = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tString line = br.readLine();\n\t\t\tif (line.charAt(0) == '1') {\n\t\t\t\tone[count] = Long.parseLong(line.substring(2));\n\t\t\t\tcount++;\n\t\t\t\tsum++;\n\t\t\t} else {\n\t\t\t\ttwo[countb] = Long.parseLong(line.substring(2));\n\t\t\t\tsum = sum + 2;\n\t\t\t\tcountb++;\n\t\t\t}\n\t\t}\n\t\tArrays.sort(one, 0, count);\n\t\tArrays.sort(two, 0, countb);\n\t\tint k = (int) sum;\n\t\tlong[] aans = new long[k + 1];\n\t\taans[0] = 0;\n\t\tint c = count;\n\t\tint d = countb;\n\t\tlong[] oned = Arrays.copyOf(one, c + 1);\n\t\tlong[] twod = Arrays.copyOf(two, d + 1);\n\t\tlong ans = 0;\n\t\tfor (int i = 2; i <= sum; i = i + 2) {\n\t\t\tlong temp = 0, temp1 = 0;\n\t\t\tif (count > 0)\n\t\t\t\ttemp = one[count - 1];\n\t\t\tif (count > 1) {\n\t\t\t\ttemp = one[count - 2] + temp;\n\t\t\t}\n\t\t\tif (countb > 0)\n\t\t\t\ttemp1 = two[countb - 1];\n\t\t\tif (temp < temp1) {\n\t\t\t\tans = ans + temp1;\n\t\t\t\tif (countb > 0) {\n\t\t\t\t\tcountb--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tans = ans + temp;\n\t\t\t\tif (count > 1)\n\t\t\t\t\tcount = count - 2;\n\t\t\t\telse if (count > 0)\n\t\t\t\t\tcount--;\n\t\t\t}\n\t\t\taans[i] = ans;\n\t\t}\n\t\tif (c > 0) {\n\t\t\taans[1] = oned[c - 1];\n\t\t\tc--;\n\t\t} else {\n\t\t\taans[1] = 0;\n\t\t}\n\t\tone = oned;\n\t\ttwo = twod;\n\t\tcount = c;\n\t\tcountb = d;\n\t\tans = aans[1];\n\t\tfor (int i = 3; i <= sum; i = i + 2) {\n\t\t\tlong temp = 0, temp1 = 0;\n\t\t\tif (count > 0)\n\t\t\t\ttemp = one[count - 1];\n\t\t\tif (count > 1) {\n\t\t\t\ttemp = one[count - 2] + temp;\n\t\t\t}\n\t\t\tif (countb > 0)\n\t\t\t\ttemp1 = two[countb - 1];\n\t\t\tif (temp < temp1) {\n\t\t\t\tans = ans + temp1;\n\t\t\t\tif (countb > 0) {\n\t\t\t\t\tcountb--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tans = ans + temp;\n\t\t\t\tif (count > 1)\n\t\t\t\t\tcount = count - 2;\n\t\t\t\telse if (count > 0)\n\t\t\t\t\tcount--;\n\t\t\t}\n\t\t\taans[i] = ans;\n\t\t}\n\t\tfor (int i = 1; i <= sum; i++) {\n\t\t\tSystem.out.print(aans[i] + \" \");\n\t\t}\n\t}", "private static void sort(int[] arr) {\n\t\t\n\t\tint i=0;\n\t\tint j=0;\n\t\tint k=arr.length-1;\n\t\tSystem.out.println(\"length \"+arr.length);\n\t\twhile (i<=k)\n\t\t{\n\t\t\tSystem.out.println(\"at start i \"+i+\" j \"+j+\" k \"+k);\n\t\t\tif(arr[i]==0)\n\t\t\t\tswap(j++,i++,arr);\n\t\t\telse if(arr[i]==2)\n\t\t\t\tswap(k--,i,arr);\n\t\t\telse\n\t\t\t\ti++;\n\t\t\t\n\t\t\tprintArray(arr);\n\t\t\tSystem.out.println(\"at end i \"+i+\" j \"+j+\" k \"+k);\n\t\t\t\n\t\t}\n\t}", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "public int[] twoSum2(int[] nums, int target) {\n int max = nums[0];\n int min = max;\n // get rank\n for (int e : nums) {\n if (e > max) {\n max = e;\n }\n if (e < min) {\n min = e;\n }\n }\n // show up table\n Integer[] showUpMap = new Integer[max - min + 1];\n LinkedList[] indicesMap = new LinkedList[max - min + 1];\n for (int i = 0; i < nums.length; i++) {\n showUpMap[nums[i] - min] = 1;\n if (indicesMap[nums[i] - min] == null) {\n indicesMap[nums[i] - min] = new LinkedList<Integer>();\n }\n indicesMap[nums[i] - min].add(i);\n }\n System.out.println(Arrays.toString(showUpMap));\n System.out.println(Arrays.toString(indicesMap));\n for (int i = 0; i < showUpMap.length; i++) {\n boolean show = showUpMap[i] != null;\n if (show) {\n int a = i + min;\n int need = target - a;\n if (need - min < showUpMap.length &&\n showUpMap[need - min] != null) {\n int ai = (int) indicesMap[i].get(0);\n int bi = (int) indicesMap[need - min].get(0);\n if (ai == bi) {\n bi = (int) indicesMap[need - min].get(1);\n }\n return new int[]{ai, bi};\n }\n }\n }\n return null;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}", "private static void sortArrayZeroOneTwo(int[] arr) {\n// sortArrayZeroOneTwo(new int[]{2, 0, 2, 1, 1, 0});\n int length = arr.length;\n int low = 0, mid = 0, high = length - 1;\n while (mid <= high) {\n if (arr[mid] == 0) {\n int temp = arr[low];\n arr[low] = arr[mid];\n arr[mid] = temp;\n low += 1;\n mid += 1;\n } else if (arr[mid] == 2) {\n int temp = arr[high];\n arr[high] = arr[mid];\n arr[mid] = temp;\n high--;\n } else if (arr[mid] == 1) {\n mid += 1;\n }\n }\n System.out.println(Arrays.toString(arr));\n }", "public static void main(String[] args) throws FileNotFoundException { \n \t\n In in = new In(args[0]);\n \n\t\t // Storing file input in an array\n int[] a = in.readAllInts();\n\n // b contains sorted integers from a (You can use Java Arrays.sort() method)\n int[] b = new int[a.length];\n for(int i = 0; i < a.length; i++) {\n \tb[i] = a[i];\n }\n Arrays.sort(b);\n // c contains all integers stored in reverse order \n int[] c = new int[b.length];\n for(int i = 0; i < b.length; i++) {\n \tc[i] = b[b.length - 1 - i];\n }\n // (you can have your own O(n) solution to get c from b\n \n // d contains almost sorted array \n int[] d = new int[b.length];\n\t\tfor(int i = 0 ; i < b.length; i++) {\n\t\t\td[i] = b[i];\n\t\t}\n\t\tfor(int i = 0; i < d.length * 0.1; i++) {\n\t\t\tint temp = d[i];\n\t\t\td[i] = d[d.length - 1 - i];\n\t\t\td[d.length - 1 - i] = temp;\n\t\t}\n //(You can copy b to a and then perform (0.1 * d.length) many swaps to acheive this. \n \n //TODO: \n // Read the second argument and based on input select the sorting algorithm\n // * 0 = Arrays.sort() (Java Default)\n // Perform sorting on a,b,c,d. Pring runtime for each case along with timestamp and record those. \n // For runtime and priting, you can use the same code from Lab 4 as follows:\n \n // * 1 = Bubble Sort\n // * 3 = Insertion Sort \n // * 4 = Mergesort\n // * 5 = Quicksort\n\t\t\n\t\t//performs the default java sort on each array\n if(args[1].equals(\"0\")) {\n \t\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n //TODO: Replace with the algorithm used \n String algorithmUsed = \"Java default (Arrays.sort())\";\n //starts the clock \n Stopwatch timer = new Stopwatch();\n //sorts the array\n Arrays.sort(a);\n //gets the time when done sorting\n double time = timer.elapsedTimeMillis();\n String arrayUsed = \"a\";\n //prints to the terminal all the relevant information\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n //prints the now sorted array to a text file\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n // Write the resultant array to a file (Each time you run a program 4 output files should be generated. (one for each a,b,c, and d)\n Stopwatch timer2 = new Stopwatch(); \n Arrays.sort(b);\n time = timer2.elapsedTimeMillis();\n arrayUsed = \"b\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n Stopwatch timer3 = new Stopwatch();\n Arrays.sort(c);\n time = timer3.elapsedTimeMillis();\n arrayUsed = \"c\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n Stopwatch timer4 = new Stopwatch();\n Arrays.sort(d);\n time = timer4.elapsedTimeMillis();\n arrayUsed = \"d\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"1\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Bubble sort\";\n Stopwatch timer1 = new Stopwatch();\n for(int i = 0; i < a.length; i++) {\n \tfor(int j = a.length-1; j > i; j--) {\n \t\tif(a[j] < a[j-1]) {\n \t\t\tint temp = a[j];\n \t\t\ta[j] = a[j-1];\n \t\t\ta[j-1] = temp;\n \t\t}\n \t}\n }\n double time = timer1.elapsedTimeMillis();\n String arrayUsed = \"a\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n\n arrayUsed = \"b\";\n Stopwatch timer2 = new Stopwatch();\n for(int i = 0; i < b.length; i++) {\n \tfor(int j = b.length - 1; j > 1; j--) {\n \t\tif(b[j] < b[j-1]) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\tb[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer2.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"c\";\n Stopwatch timer3 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = c.length -1; j > 0; j--) {\n \t\t\tif(c[j] < c[j-1]) {\n \t\t\t\tint temp = c[j];\n \t\t\t\t\tc[j] = c[j-1];\n \t\t\t\t\t\tc[i] = temp;\n \t\t}\n \t}\n }\n time = timer3.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"d\";\n Stopwatch timer4 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = d.length -1; j > 1; j--) {\n \t\t\tif(d[j] < d[j-1]) {\n \t\t\t\tint temp = d[j];\n \t\t\t\t\td[j] = d[j-1];\n \t\t\t\t\t\td[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer4.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n }\n if(args[1].equals(\"2\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Selection sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer5 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = a.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > a[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = a[minIndex];\n \ta[minIndex] = a[i];\n \ta[i] = temp;\n }\n double time = timer5.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out);\n for(int i = 0; i < a.length; i++) {\n \tSystem.out.print(a[i] + \" \");\n }\n arrayUsed = \"b\";\n Stopwatch timer6 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = b.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > b[j])\n \t\t\tminIndex = j;\n \t}\n \tint temp = b[minIndex];\n \tb[minIndex] = b[i];\n \tb[i] = temp;\n }\n time = timer6.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \t\n arrayUsed = \"c\";\n Stopwatch timer7 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = c.length - 1; j > i; j--) {\n \t\t\t\tif(c[minIndex] > c[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = c[minIndex];\n \tc[minIndex] = c[i];\n \tc[i] = temp;\n }\n time = timer7.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out2);\n for(int i = 0; i < c.length; i++) {\n \tSystem.out.print(c[i] + \" \");\n }\n arrayUsed = \"d\";\n Stopwatch timer8 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = d.length - 1; j > i; j--) {\n \t\t\t\tif(d[minIndex] > d[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = d[minIndex];\n \t\td[minIndex] = d[i];\n \t\td[i] = temp;\n }\n time = timer8.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"3\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Insertion sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer9 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i++) {\n \t\tfor(int j = i; (j > 0) && (a[j] < a[j-1]); j--) {\n \t\t\tint temp = a[j];\n \t\t\t\ta[j] = a[j-1];\n \t\t\t\t\ta[j-1] = temp;\n \t}\n }\n double time = timer9.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer10 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i++) {\n \t\tfor(int j = i; (j>0) && (b[j] < b[j-1]); j--) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\t\tb[j-1] = temp;\n \t}\n }\n time = timer10.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer11 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = i; (j>0) && (c[j] < c[j-1]); j--) {\n \t\t\tint temp = c[j];\n \t\t\tc[j] = c[j-1];\n \t\t\t\tc[j-1] = temp;\n \t}\n }\n time = timer11.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n Stopwatch timer12 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = i; (j > 0) && (d[j] < d[j-1]); j--) {\n \t\t\tint temp = d[j];\n \t\t\t\td[j] = d[j-1];\n \t\t\t\t\td[j-1] = temp;\n \t}\n }\n time = timer12.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"4\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Merge sort\";\n \n String arrayUsed = \"a\";\n int[] temp1 = new int[a.length];\n Stopwatch timer13 = new Stopwatch();\n mergeSort(a, temp1, 0, a.length-1);\n double time = timer13.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0 ; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n int[] temp2 = new int[b.length];\n Stopwatch timer14 = new Stopwatch();\n mergeSort(b, temp2, 0, b.length -1);\n time = timer14.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n int[] temp3 = new int[c.length];\n Stopwatch timer15 = new Stopwatch();\n mergeSort(c, temp3, 0, c.length-1);\n time = timer15.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n int[] temp4 = new int[d.length];\n Stopwatch timer16 = new Stopwatch();\n mergeSort(d, temp4, 0, d.length -1);\n time = timer16.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"5\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Quick sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer17 = new Stopwatch();\n quickSort(a, 0, a.length-1);\n double time = timer17.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer18 = new Stopwatch();\n quickSort(b, 0, b.length-1);\n time = timer18.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer19 = new Stopwatch();\n quickSort(c, 0, c.length-1);\n time = timer19.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++)\n \t\tSystem.out.print(c[i] + \" \");\n \n arrayUsed = \"d\";\n Stopwatch timer20 = new Stopwatch();\n quickSort(d, 0, d.length -1);\n time = timer20.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++)\n \t\tSystem.out.print(d[i] + \" \");\n }\n \n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the number of elements:\");\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tint elem=sc.nextInt();\r\n\t\t\r\n\t\t\r\n\t\tint array[]=new int[elem];\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"Enter all the elements:\");\r\n\t\tfor(int i=0;i<elem;i++) {\r\n\t\t\tarray[i]=sc.nextInt();\r\n\t\t}\r\n\t\t\tSystem.out.print(Arrays.toString(array));\r\n\t\t\t\r\n\t\t\tArrays.sort(array);\r\n\t\t\tint ans = 0;\r\n\t\t for(int i1=0; i1<array.length; i1+=2) {\r\n\t\t \tans += array[i1]; \r\n\t\t }\r\n\t\t System.out.print(ans);\r\n\t\t return;\r\n\t\t \r\n\t}", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "private void mergesort(int[] array) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint t = scn.nextInt();\r\n//\t\twhile (t > 0) {\r\n//\t\t\tint n = scn.nextInt();\r\n//\t\t\tlong[] arr = new long[n];\r\n//\t\t\tint i, j;\r\n//\t\t\tlong s = 0;\r\n//\t\t\tfor (i = 0; i < n; i++) {\r\n//\t\t\t\tarr[i] = scn.nextInt();\r\n//\t\t\t}\r\n//\t\t\r\n//\t\t\t//bubble sort\r\n//\t\t\tfor (i = 0; i < n - 1; i++) {\r\n//\t\t\t\tfor (j = 0; j < n - i - 1; j++) {\r\n//\t\t\t\t\tlong k1 = combine(arr[j], arr[j + 1]);\r\n//\t\t\t\t\tlong k2 = combine(arr[(j + 1)], arr[j]);\r\n//\t\t\t\t\tif (k2 > k1) {\r\n//\t\t\t\t\t\tlong temp = arr[j];\r\n//\t\t\t\t\t\tarr[j] = arr[(j + 1)];\r\n//\t\t\t\t\t\tarr[(j + 1)] = temp;\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\tfor (i = 0; i < n - 1; i++) {\r\n//\t\t\t\ts = combine(arr[i], arr[i + 1]);\r\n//\t\t\t\tarr[i+1] = s;\r\n//\t\t\t}\r\n//\t\t\tSystem.out.println(arr[n-1]);\r\n//\t\t\tt--;\r\n//\t\t}\r\n//\t}\r\n//\r\n//\tpublic static long combine(long n, long m) {\r\n//\t\tlong f = m;\r\n//\t\tint b = 0;\r\n//\t\twhile (f > 0) {\r\n//\t\t\tf = f / 10;\r\n//\t\t\tb++;\r\n//\t\t}\r\n//\r\n//\t\tf = (long)(n * Math.pow(10, b) + m);\r\n//\t\treturn f;\r\n\t\t\r\n\r\n\t}", "private static void sort(int[] arr) {\n\t\tint lesserIndex=-1;\n\t\tint arrLen = arr.length ; \n\t\tfor(int i=0; i<arrLen; i++){\n\t\t\tif(arr[i]<0){\n\t\t\t\tlesserIndex++; \n\t\t\t\tint tmp = arr[lesserIndex]; \n\t\t\t\tarr[lesserIndex] = arr[i];\n\t\t\t\tarr[i] = tmp; \n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint negBound = lesserIndex+1;\n\t\tint posIndex = negBound;\n\t\t\n\t\tfor(int negIngex = 0;negIngex<negBound && posIndex<arr.length; negIngex+=2, posIndex+=1){\n\t\t\tint tmp = arr[posIndex]; \n\t\t\tarr[posIndex] = arr[negIngex] ; \n\t\t\tarr[negIngex] = tmp ;\n\t\t\tnegBound++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int a : arr) {\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t}", "private static void third(int[] arr, int sum){\n\n Arrays.sort(arr);\n\n int i =0;\n int j = arr.length-1;\n\n while( i<j ){\n\n int curr = arr[i] + arr[j];\n\n if(curr == sum){\n System.out.println(arr[i] + \" \" + arr[j]);\n break;\n }\n else if(curr < sum){\n i++;\n }\n else{\n j--;\n }\n }\n\n }", "public int[] sortEvenPositionArray(int[] arr) {\n for (int i = 0; i < arr.length; i += 2) {\n for (int a = 0; a < arr.length - 1 - i; a += 2) {\n if (arr[a] > arr[a + 2]) {\n int temp = arr[a];\n arr[a] = arr[a + 2];\n arr[+2] = temp;\n }\n }\n }\n return arr;\n\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tcreateArray(); \r\n\t\tSystem.out.println(\"\\n\"+\"* random array *\");\r\n\t\twriteArray(randomArray); \r\n\t\tsortedArray=sortedArray(randomArray);\r\n\t\tSystem.out.println(\"\\n\"+\"* sorted array *\");\r\n\t\twriteArray(sortedArray);\r\n\t\tSystem.out.println(\"\\n\"+\"plesae enter compre number \");\r\n\t\tk = scan.nextInt();\r\n\t\t//int test[] = { 1, 2, 3, 4, 5, 6, 7, 8 };\r\n\t\tfindPairSum(sortedArray, k);\r\n\t}", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }" ]
[ "0.672216", "0.6673129", "0.66365856", "0.65503097", "0.6422734", "0.6394759", "0.6320159", "0.631183", "0.6289563", "0.6274883", "0.6266936", "0.61951745", "0.6191919", "0.6176287", "0.61705416", "0.6151548", "0.6150978", "0.6128215", "0.6121217", "0.60981077", "0.6085176", "0.6078635", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.60744613", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.6073352", "0.606703", "0.6059249" ]
0.62906486
8
Fetch EPG routinely or ondemand during channel scanning
public interface EpgFetcher { /** * Starts the routine service of EPG fetching. It use {@link JobScheduler} to schedule the EPG * fetching routine. The EPG fetching routine will be started roughly every 4 hours, unless the * channel scanning of tuner input is started. */ @MainThread void startRoutineService(); /** * Fetches EPG immediately if current EPG data are out-dated, i.e., not successfully updated by * routine fetching service due to various reasons. */ @MainThread void fetchImmediatelyIfNeeded(); /** Fetches EPG immediately. */ @MainThread void fetchImmediately(); /** Notifies EPG fetch service that channel scanning is started. */ @MainThread void onChannelScanStarted(); /** Notifies EPG fetch service that channel scanning is finished. */ @MainThread void onChannelScanFinished(); @MainThread boolean executeFetchTaskIfPossible(JobService jobService, JobParameters params); @MainThread void stopFetchingJob(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }", "private void fetchUpComingChannels() {\n\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n //Queue use default volley Response and Error listener\n RequestManager\n .queue()\n .useBackgroundQueue()\n .addRequest(new UpcomingChannelJsonRequest(offSet++), mRequestCallback)\n .start();\n }", "void fetch(RemoteConfig remoteRepository) throws InterruptedException;", "public CountDownLatch fetchRepo(PitchParams pp) {\n\n final String grmKey = GitRepoModel.genKey(pp);\n log.debug(\"fetchRepo: pp={}\", pp);\n CountDownLatch freshLatch = new CountDownLatch(1);\n CountDownLatch activeLatch =\n repoLatchMap.putIfAbsent(grmKey, freshLatch);\n\n if (activeLatch != null) {\n\n /*\n * Non-null activeLatch implies a fetchRepo() operation\n * is already in progress for this /{user}/{repo}. So\n * activeLatch so caller can block until operation completes.\n */\n log.debug(\"fetchRepo: pp={}, already in progress, \" +\n \"returning existing activeLatch={}\", pp, activeLatch);\n return activeLatch;\n\n } else {\n\n GRS grs = grsManager.get(pp);\n final GRSService grsService = grsManager.getService(grs);\n String apiCall = grsService.repo(pp);\n\n log.debug(\"fetchRepo: apiCall={}\", apiCall);\n final long start = System.currentTimeMillis();\n\n WSRequest apiRequest = wsClient.url(apiCall);\n\n grs.getHeaders().forEach((k,v) -> {\n apiRequest.setHeader(k, v);\n });\n\n CompletableFuture<WSResponse> apiFuture =\n apiRequest.get().toCompletableFuture();\n\n CompletableFuture<GitRepoModel> rmFuture =\n apiFuture.thenApplyAsync(apiResp -> {\n\n log.debug(\"fetchRepo: pp={}, fetch meta time-taken={}\",\n pp, (System.currentTimeMillis() - start));\n\n log.info(\"{}: API Rate Limit Status [ {}, {} ]\",\n grs.getName(),\n apiResp.getHeader(API_RATE_LIMIT),\n apiResp.getHeader(API_RATE_LIMIT_REMAINING));\n\n try {\n\n if (apiResp.getStatus() == HTTP_OK) {\n\n try {\n\n JsonNode json = apiResp.asJson();\n GitRepoModel grm = grsService.model(pp, json);\n\n /*\n * Update pitchCache with new GitRepoModel\n * generated using GitHub API response data.\n */\n pitchCache.set(grm.key(), grm, cacheTimeout.grm(pp));\n\n } catch (Exception ex) {\n /*\n * Prevent any runtime errors, such as JSON parsing,\n * from propogating to the front end.\n */\n log.warn(\"fetchRepo: pp={}, unexpected ex={}\", pp, ex);\n }\n\n } else {\n\n log.debug(\"fetchRepo: pp={}, fail status={}\",\n pp, apiResp.getStatus());\n\n try {\n\n String remainingHdr =\n apiResp.getHeader(API_RATE_LIMIT_REMAINING);\n int rateLimitRemaining =\n Integer.parseInt(remainingHdr);\n\n if (rateLimitRemaining <= 0) {\n log.warn(\"WARNING! {} API rate limit exceeded.\", grs.getName());\n }\n\n } catch (Exception rlex) {\n }\n }\n\n } catch (Exception rex) {\n log.warn(\"fetchRepo: pp={}, unexpected runtime ex={}\", pp, rex);\n }\n\n /*\n * Current operation completed, so remove latch associated\n * with operation from repoLatchMap to permit future operations\n * on this /{user}/{repo}.\n */\n releaseCountDownLatch(repoLatchMap, grmKey);\n\n /*\n * Operation completed, valid result cached, no return required.\n */\n return null;\n\n }, backEndThreads.POOL)\n .handle((result, error) -> {\n\n if (error != null) {\n\n log.warn(\"fetchRepo: pp={}, fetch error={}\", pp, error);\n releaseCountDownLatch(repoLatchMap, grmKey);\n }\n\n return null;\n });\n\n return freshLatch;\n }\n }", "EzyChannel getChannel();", "public NetworkEvent fetch() throws InterruptedException {\n\t\treturn eventQueue.take();\n\t}", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "@Service\npublic interface BugFetch {\n @Async\n void fetch(BugzillaConnector conn) throws InterruptedException;\n}", "public void fetchEvents (RJGUIController.XferCatalogMod xfer) {\n\n\t\tSystem.out.println(\"Fetching Events\");\n\t\tcur_mainshock = null;\n\n\t\t// Will be fetching from Comcat\n\n\t\thas_fetched_catalog = true;\n\n\t\t// See if the event ID is an alias, and change it if so\n\n\t\tString xlatid = GUIEventAlias.query_alias_dict (xfer.x_eventIDParam);\n\t\tif (xlatid != null) {\n\t\t\tSystem.out.println(\"Translating Event ID: \" + xfer.x_eventIDParam + \" -> \" + xlatid);\n\t\t\txfer.modify_eventIDParam(xlatid);\n\t\t}\n\n\t\t// Fetch mainshock into our data structures\n\t\t\n\t\tString eventID = xfer.x_eventIDParam;\n\t\tfcmain = new ForecastMainshock();\n\t\tfcmain.setup_mainshock_poll (eventID);\n\t\tPreconditions.checkState(fcmain.mainshock_avail, \"Event not found: %s\", eventID);\n\n\t\tcur_mainshock = fcmain.get_eqk_rupture();\n\n\t\t// Finish setting up the mainshock\n\n\t\tsetup_for_mainshock (xfer);\n\n\t\t// Make the search region\n\n\t\tsetup_search_region (xfer);\n\n\t\t// Get the aftershocks\n\n\t\tComcatOAFAccessor accessor = new ComcatOAFAccessor();\n\n\t\tcur_aftershocks = accessor.fetchAftershocks (\n\t\t\tcur_mainshock,\n\t\t\tfetch_fcparams.min_days,\n\t\t\tfetch_fcparams.max_days,\n\t\t\tfetch_fcparams.min_depth,\n\t\t\tfetch_fcparams.max_depth,\n\t\t\tfetch_fcparams.aftershock_search_region,\n\t\t\tfetch_fcparams.aftershock_search_region.getPlotWrap(),\n\t\t\tfetch_fcparams.min_mag\n\t\t);\n\n\t\t// Perform post-fetch actions\n\n\t\tpostFetchActions (xfer);\n\n\t\treturn;\n\t}", "protected T fetchFromNetwork(Query query) throws SpecRetrievalFailedException, GadgetException {\n HttpRequest request = new HttpRequest(query.specUri)\n .setIgnoreCache(query.ignoreCache)\n .setGadget(query.gadgetUri)\n .setContainer(query.container)\n .setSecurityToken( new AnonymousSecurityToken(\"\", 0L, query.gadgetUri.toString()));\n\n // Since we don't allow any variance in cache time, we should just force the cache time\n // globally. This ensures propagation to shared caches when this is set.\n request.setCacheTtl((int) (refresh / 1000));\n\n HttpResponse response = pipeline.execute(request);\n if (response.getHttpStatusCode() != HttpResponse.SC_OK) {\n int retcode = response.getHttpStatusCode();\n if (retcode == HttpResponse.SC_INTERNAL_SERVER_ERROR) {\n // Convert external \"internal error\" to gateway error:\n retcode = HttpResponse.SC_BAD_GATEWAY;\n }\n throw new SpecRetrievalFailedException(query.specUri, retcode);\n }\n\n try {\n String content = response.getResponseAsString();\n return parse(content, query);\n } catch (XmlException e) {\n throw new SpecParserException(e);\n }\n }", "protected void handleGets(final CommandMessage command, final Channel channel) {\n final Future<CacheElement[]> futureResponse = cache.get(Collections.<Key>singleton(command.key));\r\n commandQueue.enqueueFutureResponse(new AsyncGetMultiCommand(command, channel, futureResponse));\r\n }", "@Override\n public void onStartRetrieval() {\n this.clusterPeriod++;\n this.hostMapPeriod++;\n if(this.refreshClusterMapPeriod <= this.clusterPeriod){\n logger.debug(\"refreshClusterMapPeriod at period: \" + this.clusterPeriod);\n this.refreshClusterMapPeriod();\n }\n if(this.isHostMap && (this.refreshHostMapPeriod <= this.hostMapPeriod)){\n logger.debug(\"refreshHostMapPeriod at period: \" + this.hostMapPeriod);\n this.refreshHostMapPeriod();\n }\n try {\n logger.debug(\"onStartRetrieval - Graphite Host and Port: \" + this.props.getProperty(\"host\") + \"\\t\" + this.props.getProperty(\"port\"));\n this.disconnectCounter = 0;\n\n this.client = new Socket(\n this.props.getProperty(\"host\"),\n Integer.parseInt(this.props.getProperty(\"port\", \"2003\"))\n );\n OutputStream s = this.client.getOutputStream();\n this.out = new PrintWriter(s, true);\n } catch (IOException ex) {\n logger.error(\"Can't connect to graphite.\", ex);\n }\n }", "private void doPing()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n CHARGE_NODE_JSON_DATA, \r\n PING_URL,\r\n SN_HOST,\r\n null, \r\n cookieData,\r\n false,\r\n token,\r\n secret ) );\r\n }", "EvergreenProvision getEvergreenProvision();", "@Override public void askPressionAsync() throws MeteoServiceException\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tcomConnexion.askPressionAsync();\n\t\t\t}\n\t\tcatch (Exception e)\n\t\t\t{\n\t\t\tthrow new MeteoServiceException(\"[MeteoService] : askPressionAsync failure\", e);\n\t\t\t}\n\t\t}", "@Override\n\tpublic void initEpics(Boolean doEpics) {\n System.out.println(appname+\".initEpics():Initializing EPICS Channel Access\");\n if (app.xMsgHost==\"localhost\") {ccHv.online=false ; ccScalers.online=false;}\n if ( doEpics) {ccHv.startEPICS(); ccScalers.startEPICS();}\n if (!doEpics) {ccHv.stopEPICS(); ccScalers.stopEPICS();}\t\t\n\t}", "private boolean _autoGetPull() throws SessionException {\n \n long queryInterval = this._queryInterval == null ? _MINUTE_MS : \n Long.parseLong(this._queryInterval) *\n _MINUTE_MS;\n\n String ftString = FileType.toFullFiletype(\n (String) this._argTable.get(CMD.SERVERGROUP),\n (String) this._argTable.get(CMD.FILETYPE));\n \n long sleeptime = queryInterval;\n\n //---------------------------\n \n boolean loggerInitError = !_initSessionLogging(\n \"Subscription Notification\",\n \"Subscription Report\");\n if (loggerInitError) \n return false;\n \n //---------------------------\n \n //set output dir\n String outputDir = (String) this._argTable.get(CMD.OUTPUT);\n if (outputDir == null)\n outputDir = System.getProperty(\"user.dir\");\n this._client.changeDir(outputDir);\n\n //---------------------------\n \n //get settings from parser\n Object replace = this._argTable.get(CMD.REPLACE);\n Object version = this._argTable.get(CMD.VERSION);\n\n //check consistent state\n if (replace != null && version != null) {\n if (!this._using) {\n this._logger.info(this._getUsage());\n }\n ++this._errorCount;\n return false;\n }\n\n //set client according to parameters\n if (replace != null)\n this._client.set(Client.OPTION_REPLACEFILE, true);\n if (version != null)\n this._client.set(Client.OPTION_VERSIONFILE, true);\n if (this._argTable.get(CMD.SAFEREAD) != null)\n this._client.set(Client.OPTION_SAFEREAD, true);\n if (this._argTable.get(CMD.RECEIPT) != null)\n this._client.set(Client.OPTION_RECEIPT, true);\n\n //---------------------------\n \n //check CRC, enable if set\n if (this._argTable.get(CMD.CRC) != null) {\n this._client.set(Client.OPTION_COMPUTECHECKSUM, true);\n this._logger.info(\"File resume transfer enabled.\\n\");\n }\n\n //get the invoke command string\n String invoke = (String) this._argTable.get(CMD.INVOKE);\n if (invoke != null) {\n invoke.trim();\n if (invoke.length() == 0)\n invoke = null;\n }\n\n //set exit on error flag\n boolean exitOnError = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEEXITONERROR) != null)\n exitOnError = true;\n\n //set invoke async flag\n boolean invokeAsync = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEASYNC) != null)\n invokeAsync = true;\n \n //---------------------------\n \n //check format option, and build new formatter\n String format = (String) this._argTable.get(CMD.FORMAT);\n this._dateFormatter = new DateTimeFormatter(format); \n \n //---------------------------\n \n //check replicate, enable if set\n if (this._argTable.get(CMD.REPLICATE) != null) {\n this._client.set(Client.OPTION_REPLICATE, true);\n this._logger.info(\"File replication enabled.\\n\");\n }\n \n if (this._argTable.get(CMD.REPLICATEROOT) != null) {\n String rootStr = (String) this._argTable.get(CMD.REPLICATEROOT);\n \n try { \n this._client.setReplicationRoot(rootStr);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n ++this._errorCount;\n return false;\n }\n }\n \n //---------------------------\n \n //check diff\n if (this._argTable.get(CMD.DIFF) != null) {\n this._client.set(Client.OPTION_DIFF, true);\n }\n\n //---------------------------\n \n /*\n * Since we are relying on client to automatic query, restart (in the\n * client API) should be always enabled. The 'restart' command option\n * translates to restart from the latest queried time. If the user did not\n * specify this option, then it should use the default restart time, that\n * is the current time, and persist the time for each file received.\n */\n Date queryTime = null;\n if (this._argTable.get(CMD.RESTART) == null) {\n queryTime = new Date();\n }\n this._client.set(Client.OPTION_RESTART, true);\n\n String msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + \"Subscribing to [\" + ftString + \"] file type.\\n\";\n\n if (this._mailmessage)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n boolean success = true;\n boolean newconnection = false;\n\n //enter loop\n while (true) {\n long issueTime = System.currentTimeMillis();\n int tranId = this._client.getAfter(queryTime);\n\n newconnection = false;\n\n // reset the epoch to null to trigger client API to\n // use the last queried time.\n queryTime = null;\n\n boolean shouldExit = false;\n\n //handle resulting files\n while (this._client.getTransactionCount() > 0) {\n \n Result result = this._client.getResult();\n if (result == null) {\n continue;\n } else if (result.getErrno() == Constants.NO_FILES_MATCH) {\n // no new files at this time\n continue;\n } else if (result.getErrno() == Constants.OK) {\n \n boolean proceed = _handleNewFile(result, outputDir, \n invoke, exitOnError, \n invokeAsync,\n Constants.AUTOGETFILES);\n if (!proceed)\n {\n shouldExit = true;\n break;\n } \n \n //invoke event handlers\n this._triggerFileResultEvent(Constants.AUTOGETFILES, result);\n \n result.commit(); \n continue;\n } else if (result.getErrno() == Constants.FILE_EXISTS) {\n this._logger.info(result.getMessage());\n \n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n result.commit();\n continue;\n } else if (result.getErrno() == Constants.IO_ERROR) {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + \"Lost connection to [\"\n + ftString + \"]. Attempting restart\\n\";\n if (this._mailmessage && !this._mailSilentRecon)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n \n //invoke error handlers\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n this._client.logout();\n \n \n this._client = this._createAutoQueryClient();\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\nRestored subscription session to [\"\n + ftString + \"].\\n\";\n if (this._mailmessage && !this._mailSilentRecon)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n if (outputDir != null)\n this._client.changeDir(outputDir);\n if (replace != null)\n this._client.set(Client.OPTION_REPLACEFILE, true);\n if (version != null)\n this._client.set(Client.OPTION_VERSIONFILE, true);\n if (this._argTable.get(CMD.CRC) != null)\n this._client.set(Client.OPTION_COMPUTECHECKSUM, true);\n if (this._argTable.get(CMD.SAFEREAD) != null)\n this._client.set(Client.OPTION_SAFEREAD, true);\n \n //fix as part of AR118105 -------------------\n //check replicate, enable if set\n if (this._argTable.get(CMD.REPLICATE) != null) \n this._client.set(Client.OPTION_REPLICATE, true); \n if (this._argTable.get(CMD.REPLICATEROOT) != null) \n {\n String rootStr = (String) this._argTable.get(CMD.REPLICATEROOT); \n try { \n this._client.setReplicationRoot(rootStr);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n }\n } \n \n //check diff\n if (this._argTable.get(CMD.DIFF) != null) {\n this._client.set(Client.OPTION_DIFF, true);\n }\n //end of fix --------------------------------------\n \n newconnection = true;\n break;\n } else {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + result.getMessage() + \"\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n this._logger.debug(\"ERRNO = \" + result.getErrno());\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n continue;\n }\n }\n\n if (shouldExit)\n break;\n\n if (!newconnection) {\n long processTime = System.currentTimeMillis() - issueTime;\n sleeptime = processTime > queryInterval ? 0 : queryInterval\n - processTime;\n this._logger.debug(\"sleep time = \" + sleeptime);\n try {\n Thread.sleep(sleeptime);\n } catch (InterruptedException e) {\n // exist the infinite loop and return\n break;\n }\n }\n }\n\n return success;\n }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\twhile(true){\n\t\t\t\tif (client == null){\n\t\t\t\t\tsynchronized(holder){\n\t\t\t\t\t\trestTime = new Date();\n\t\t\t\t\t\tlogger.info(\"进入restRoom\");\n\t\t\t\t\t\tcentralSystem.rest(this);\n\t\t\t\t\t\tholder.wait();\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tthis.proc.process(client);\n client = centralSystem.fetchOne();\t\n if (client != null){\n \tlogger.info(\"领取新任务\");\n } \n\t\t\t\t}\t\t\t\t\n\t\t\t}\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 void requestBucks() {\n\n\t}", "public void run()\n {\n // open selector\n try\n {\n _selector = Selector.open();\n }\n catch (Exception exception)\n {\n System.out.println(\"selector open \");\n System.exit(-1);\n }\n \n // create reactor\n if (ProviderPerfConfig.useReactor()) // use UPA VA Reactor\n {\n _reactorOptions.clear();\n if ((_reactor = ReactorFactory.createReactor(_reactorOptions, _errorInfo)) == null)\n {\n System.out.printf(\"Reactor creation failed: %s\\n\", _errorInfo.error().text());\n System.exit(ReactorReturnCodes.FAILURE);\n }\n \n // register selector with reactor's reactorChannel.\n try\n {\n _reactor.reactorChannel().selectableChannel().register(_selector,\n SelectionKey.OP_READ,\n _reactor.reactorChannel());\n }\n catch (ClosedChannelException e)\n {\n System.out.println(\"selector register failed: \" + e.getLocalizedMessage());\n System.exit(ReactorReturnCodes.FAILURE);\n }\n }\n \n _directoryProvider.serviceName(ProviderPerfConfig.serviceName());\n _directoryProvider.serviceId(ProviderPerfConfig.serviceId());\n _directoryProvider.openLimit(ProviderPerfConfig.openLimit());\n _directoryProvider.initService(_xmlMsgData);\n\n _loginProvider.initDefaultPosition();\n _loginProvider.applicationId(applicationId);\n _loginProvider.applicationName(applicationName);\n\n if (!_dictionaryProvider.loadDictionary(_error))\n {\n System.out.println(\"Error loading dictionary: \" + _error.text());\n System.exit(CodecReturnCodes.FAILURE);\n }\n \n getProvThreadInfo().dictionary(_dictionaryProvider.dictionary());\n \n _reactorInitialized = true;\n\n // Determine update rates on per-tick basis\n long nextTickTime = initNextTickTime();\n \n // this is the main loop\n while (!shutdown())\n {\n if (!ProviderPerfConfig.useReactor()) // use UPA Channel\n {\n \tif (nextTickTime <= currentTime())\n \t{\n \t nextTickTime = nextTickTime(nextTickTime);\n \t\tsendMsgBurst(nextTickTime);\n \t\t_channelHandler.processNewChannels();\n \t}\n\t \t_channelHandler.readChannels(nextTickTime, _error);\n\t \t_channelHandler.checkPings();\n }\n else // use UPA VA Reactor\n {\n if (nextTickTime <= currentTime())\n {\n nextTickTime = nextTickTime(nextTickTime);\n sendMsgBurst(nextTickTime);\n }\n\n Set<SelectionKey> keySet = null;\n\n // set select time \n try\n {\n int selectRetVal;\n long selTime = (long)(selectTime(nextTickTime) / _divisor);\n \n if (selTime <= 0)\n selectRetVal = _selector.selectNow();\n else\n selectRetVal = _selector.select(selTime);\n \n if (selectRetVal > 0)\n {\n keySet = _selector.selectedKeys();\n }\n }\n catch (IOException e1)\n {\n System.exit(CodecReturnCodes.FAILURE);\n }\n\n // nothing to read or write\n if (keySet == null)\n continue;\n\n Iterator<SelectionKey> iter = keySet.iterator();\n while (iter.hasNext())\n {\n SelectionKey key = iter.next();\n iter.remove();\n if(!key.isValid())\n continue;\n if (key.isReadable())\n {\n int ret;\n \n // retrieve associated reactor channel and dispatch on that channel \n ReactorChannel reactorChnl = (ReactorChannel)key.attachment();\n \n /* read until no more to read */\n while ((ret = reactorChnl.dispatch(_dispatchOptions, _errorInfo)) > 0 && !shutdown()) {}\n if (ret == ReactorReturnCodes.FAILURE)\n {\n if (reactorChnl.state() != ReactorChannel.State.CLOSED &&\n reactorChnl.state() != ReactorChannel.State.DOWN_RECONNECTING)\n {\n System.out.println(\"ReactorChannel dispatch failed\");\n reactorChnl.close(_errorInfo);\n System.exit(CodecReturnCodes.FAILURE);\n }\n }\n }\n }\n }\n }\n\n shutdownAck(true);\n }", "private void _loadCatalog() {\n if (discoveryEndpoint != null) {\n try {\n ResponseEntity<String> response = restTemplate.getForEntity(discoveryEndpoint, String.class);\n\n if (response.getStatusCode() == HttpStatus.OK) {\n String body = response.getBody();\n this.catalog = CdsHooksUtil.GSON.fromJson(body, CdsHooksCatalog.class);\n startPendingRequests();\n return;\n }\n } catch (Exception e) {\n log.warn(\"Failed to load CDS catalog for \" + discoveryEndpoint\n + \".\\nRetries remaining: \" + retries + \".\");\n }\n\n retry();\n }\n }", "public CPGCommandResult getAllCPGDetails() throws Exception {\n _log.info(\"3PARDriver:getAllCPGDetails enter\");\n ClientResponse clientResp = null;\n\n try {\n clientResp = get(URI_CPGS);\n if (clientResp == null) {\n _log.error(\"3PARDriver:There is no response from 3PAR\");\n throw new HP3PARException(\"There is no response from 3PAR\");\n } else if (clientResp.getStatus() != 200) {\n String errResp = getResponseDetails(clientResp);\n throw new HP3PARException(errResp);\n } else {\n String responseString = clientResp.getEntity(String.class);\n _log.info(\"3PARDriver:getAllCPGDetails 3PAR response is {}\", responseString);\n CPGCommandResult cpgResult = new Gson().fromJson(sanitize(responseString),\n CPGCommandResult.class);\n return cpgResult;\n }\n } catch (Exception e) {\n throw e;\n } finally {\n if (clientResp != null) {\n clientResp.close();\n }\n _log.info(\"3PARDriver:getSystemDetails leave\");\n } //end try/catch/finally\n }", "private void reqGenre(){\n\n if(NetworkChecker.isOnline(getApplicationContext())) {\n ReqGenre.genreTvList(resGenreTvShows());\n ReqGenre.genreMovieList(resGenreMovie());\n\n }\n else {\n PopUpMsg.toastMsg(\"Network isn't avilable\",getApplicationContext());\n }\n\n }", "E poll();", "Request mo35725m0();", "@Override\n\t\t\tprotected String doInBackground(Void... params) {\n\t\t\t\tString id = null;\n\t\t\t\t\n\t\t\t\tGoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);\n\t\t\t\t\n\t\t\t\t/** PROBLEM MIGHT OCCURE SO TRY MAX NUMBER OF TIMES MAX = 5 **/\n\t\t\t\tfor (int count = 1; count <= MAX_TRIES; count++) {\n\t\t\t\t\t\n\t\t\t\t\tlogMessage(\"Trying to register on cloud, try: \"+count);\n\t\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t\tid = gcm.register(GCMConfig.senderID(ActivityRegister.this));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// WE HAVE A REGISTRATION ID, BREAK THE LOOP AND RETURN\n\t\t\t\t\t\tif (id != null) {break;}\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {logMessage(\"Unable to register on cloud, error: \"+e.getMessage());}\n\t\t\t\t}\n\n\t\t\t\treturn id;\n\t\t\t}", "private void requestFirstHug() {\n new ImageDownloader(this) {\n @Override\n protected void onPostExecute(String filePath) {\n super.onPostExecute(filePath);\n Hug hug = new Hug(\n getString(R.string.first_hug_message),\n filePath,\n System.currentTimeMillis());\n HugDatabaseHelper.insertHug(MainActivity.this, hug);\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, KramConstant.GOOGLE_SEARCH_URL);\n }", "private void fetchPart(int i,int start, int step){\n //Commented for Server compile \n String currentFile = this.XmlFolderPath + \"\\\\\" + db + (fileCount++) + \".\" + this.retFormat;\n //Uncommented for Server compile \n // String currentFile = this.XmlFolderPath + \"/\" + db + (fileCount++) + \".xml\";\n\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Fetch > Fetching articles \" \n + start + \" to \" + ( start + step )\n + \" \\n\\t writing to : \" + currentFile);\n }\n try {\n //write here response from Pubmed\n writer = new BufferedWriter(new FileWriter(currentFile));\n \n //assemble the esearch URL\n String base = \"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/\";\n\n String url = base + \"efetch.fcgi?db=\"+db+\"&query_key=\" + queryKeys.get(i)\n + \"&WebEnv=\" + webEnvs.get(i) + \"&usehistory=y&rettype=\" + retFormat + \"&retmode=\" + retFormat\n + \"&retstart=\" + start + \"&retmax=\" + step;\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + db + \" Search > Fetch url : \" + url);\n }\n \n // send GET request\n RequestConfig globalConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.IGNORE_COOKIES).build();\n CloseableHttpClient client = HttpClients.custom().setDefaultRequestConfig(globalConfig).build();\n\n HttpGet request = new HttpGet(url);\n request.addHeader(base, base);\n\n HttpResponse response;\n response = client.execute(request);\n BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent()));\n StringBuffer result = new StringBuffer();\n String line = \"\";\n\n while ((line = rd.readLine()) != null) {\n writer.append(line);\n writer.newLine();\n }\n \n writer.flush();\n writer.close(); \n } catch (IOException ex) {\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Fetch > IO Exception \" + ex.getMessage());\n }\n } \n }", "private ImgChannelDTO tryLoadChannel(String chosenChannelCode)\n {\n ImgChannelDTO channel = query.tryGetChannelForDataset(dataset.getId(), chosenChannelCode);\n // if not, we check at the experiment level\n if (channel == null && containerOrNull != null)\n {\n channel =\n query.tryGetChannelForExperiment(containerOrNull.getExperimentId(),\n chosenChannelCode);\n }\n return channel;\n }", "public interface EPAsyncResponseListener {\n public void getJokesfromEndpoint(String result);\n}", "private void getEKIDs() {\n if (!CloudSettingsManager.getUserID(getContextAsync()).isEmpty()) {\n DataMessenger.getInstance().getEkIds(CloudSettingsManager.getUserID(getContextAsync()), new RestApi.ResponseListener() {\n @Override\n public void start() {\n Log.i(TAG, \"Request started\");\n }\n\n @Override\n public void success(HttpResponse rsp) {\n if (rsp != null) {\n if (rsp.statusCode == 200) {\n if (rsp.body != null) {\n MgmtGetEKIDRsp result = new Gson().fromJson(rsp.body, MgmtGetEKIDRsp.class);\n if (result.getDevices().size() == 0) {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty);\n } else {\n updateAdapter(result.getDevices());\n }\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n } else {\n GenericRsp genericRsp = new Gson().fromJson(rsp.body, GenericRsp.class);\n if (genericRsp != null && !genericRsp.isResult()) {\n Utils.showToast(getContextAsync(), genericRsp.getReasonCode());\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n\n @Override\n public void failure(Exception error) {\n if (error instanceof UnknownHostException) {\n Utils.showToast(getContextAsync(), R.string.connectivity_error);\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n\n @Override\n public void complete() {\n Log.i(TAG, \"Request completed\");\n }\n });\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty_userid);\n }\n }", "@Override\n public void onRefresh() {\n if (isNetworkAvailable2()) {\n //Reloading the latest kernel and rom.\n ArrayList<String> fileArray = new ArrayList<>();\n srl.setRefreshing(true);\n getNXVersionFromURL();\n soldierRomCheck(fileArray);\n } else {\n //If there is no Internet Connection, sending you back to InternetCheck activity.\n Intent a = new Intent(MainActivity.this, InternetCheck.class);\n startActivity(a);\n }\n }", "public interface GFac {\n\n /**\n * Initialized method, this method must call one time before use any other method.\n * @param experimentCatalog\n * @param appCatalog\n * @param curatorClient\n * @param publisher\n * @return\n */\n public boolean init(ExperimentCatalog experimentCatalog, AppCatalog appCatalog, CuratorFramework curatorClient, LocalEventPublisher publisher);\n\n /**\n * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers\n * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry\n *\n * @param experimentID\n * @return boolean Successful acceptence of the jobExecution returns a true value\n * @throws GFacException\n */\n public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;\n\n /**\n * This method can be used in a handler to ivvoke outhandler asynchronously\n * @param processContext\n * @throws GFacException\n */\n public void invokeOutFlowHandlers(ProcessContext processContext) throws GFacException;\n\n /**\n * This method can be used to handle re-run case asynchronously\n * @param processContext\n * @throws GFacException\n */\n public void reInvokeOutFlowHandlers(ProcessContext processContext) throws GFacException;\n\n /**\n * This operation can be used to cancel an already running experiment\n * @return Successful cancellation will return true\n * @throws GFacException\n */\n public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId)throws GFacException;\n\n}", "private boolean isFetchNeeded() {\n return true;\n }", "protected void startupExternal() throws Exception {\n if (configURL != null) {\n logObj.debug(\"creating channel with configuration from \" + configURL);\n channel = new JChannel(configURL);\n } else {\n String configString = buildConfigString();\n logObj.debug(\"creating channel with properties: \" + configString);\n channel = new JChannel(configString);\n }\n\n // Important - discard messages from self\n channel.setOpt(Channel.LOCAL, Boolean.FALSE);\n channel.connect(externalSubject);\n logObj.debug(\"channel connected.\");\n\n if (receivesExternalEvents()) {\n adapter = new PullPushAdapter(channel, this);\n }\n }", "private boolean _autoGet() throws SessionException\n {\n if (this._argTable.get(CMD.PUSH) != null)\n return this._autoGetPush();\n else if (this._argTable.get(CMD.QUERY) != null)\n return this._autoGetQuery();\n else \n return this._autoGetPull();\n }", "@Override\n public void run() {\n load_remote_data();\n }", "public void pull() {\n if (Util.getValue(\"pull.switch\").equals(\"on\")) {\n if(peerImpl == null) {Util.error(\"Peer Server is not configured properly!\");}\n PeerFiles files = peerImpl.peerFiles;\n HashMap<String, PeerFile> peerFiles = files.getFilesMetaData();\n for (PeerFile f : peerFiles.values()) {\n if (f.isOriginal() == false && f.isStale() == false ) {\n Util.print(\"File \"+f.getName()+\" is expired!\");\n peerImpl.pollRequest(f);\n }\n }\n\n }\n }", "public void CreateGetBadgeData()\n {\n new SendGetBadgeData().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, \"\");\n }", "private void fetch(String serverUrl) {\n if(isOnline()) {\n currentStationStatus = \"Loading Stream...\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n } else {\n currentStationStatus = \"No Internet Connection\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n return;\n }\n //Log.i(LOG_TAG, \"Make Asynctask to fetch meta data\");\n new FetchMetaDataTask().execute(serverUrl);\n }", "private void loadCatalog() {\n try {\n log.info(\"Attempting to retrieve CDS Hooks catalog from \" + discoveryEndpoint + \"...\");\n ThreadUtil.getApplicationThreadPool().execute(createThread());\n } catch (Exception e) {\n log.error(\"Error attempting to retrieve CDS Hooks catalog from \" + discoveryEndpoint, e);\n retry();\n }\n }", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "public void prefetch () throws IOException {\n\t\t\tlong latestEpoch = -1;\n\t\t\t\tbyte[] latestEpochBytes = cloudBlockSnapshotStore.get(\"EpochCount\");\n\t\t\t\tif (latestEpochBytes == null) {\n\t\t\t\t\tif (debugPrintoutFlag) {\n\t\t\t\t\t\tSystem.out.println(\"Prefetcher thread gets interrupted, exit the main loop here\");\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlatestEpoch = ByteUtils.bytesToLong(latestEpochBytes);\n\t\t\t\tif (debugPrintoutFlag) {\n\t\t\t\t\tSystem.out.println(\"latestEpoch=\" + latestEpoch);\n\t\t\t\t}\n\t\t\t\t//byte[] myPrefetchedEpochBytes = blockDataStore.get(\"PrefetchedEpoch-\" + RockyController.nodeID);\n\t\t\t\t//if (myPrefetchedEpochBytes == null) {\n\t\t\t\t//\tblockDataStore.put(\"PrefetchedEpoch-\" + RockyController.nodeID, ByteUtils.longToBytes(myPrefetchedEpoch));\n\t\t\t\t//}\n\t\t\t\t//myPrefetchedEpoch = ByteUtils.bytesToLong(myPrefetchedEpochBytes);\n\t\t\tif (debugPrintoutFlag) { \n\t\t\t\tSystem.out.println(\"prefetchedEpoch=\" + RockyStorage.prefetchedEpoch);\n\t\t\t\tSystem.out.println(\"epochCnt=\" + epochCnt);\n\t\t\t}\n\t\t\tif (latestEpoch > RockyStorage.prefetchedEpoch) { // if I am nonOwner with nothing more to prefetch, I don't prefetch\n\t\t\t\t// Get all epoch bitmaps\n\t\t\t\t//List<BitSet> epochBitmapList = fetchNextEpochBitmaps(latestEpoch, myPrefetchedEpoch);\n\t\t\t\tList<BitSet> epochBitmapList = fetchNextEpochBitmaps(latestEpoch, RockyStorage.prefetchedEpoch);\n\t\t\t\t\n\t\t\t\t// Get a list of blockIDs to prefetch\n\t\t\t\tHashSet<Integer> blockIDList = getPrefetchBlockIDList(epochBitmapList);\n\t\t\t\n\t\t\t\tif (blockIDList != null) { // if blockIDList is null, we don't need to prefetch anything\n\t\t\t\t\t// Prefetch loop\n\t\t\t\t\tprefetchBlocks(this, blockIDList);\n\t\t\t\t\t\n\t\t\t\t\t// Update PrefetchedEpoch-<nodeID> on cloud and prefetchedEpoch\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcloudBlockSnapshotStore.put(\"PrefetchedEpoch-\" + RockyController.nodeID, ByteUtils.longToBytes(latestEpoch));\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\tprefetchedEpoch = latestEpoch;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public void fetchData()\n {\n FetchingDataTask fetchingDataTask = new FetchingDataTask();\n fetchingDataTask.execute();\n }", "@Override\n protected Void doInBackground(String... args) {\n \twhile(true) {\n\t \tInputStream is = null;\n\t \tint response = 0;\n\t try {\n\t URL url = new URL(meshDisplayEngine.getServerBaseURL() + \"/device_list_for_event/event_id/\" \n\t \t\t\t\t+ meshDisplayEngine.eventID);\n\t HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t conn.setReadTimeout(10000 /* milliseconds */);\n\t conn.setConnectTimeout(15000 /* milliseconds */);\n\t conn.setRequestMethod(\"GET\");\n\t conn.setRequestProperty(\"accept\",\"application/json\");\n\t conn.setDoInput(true);\n\t \n\t // Starts the query\n\t conn.connect();\n\t \n\t //Check the response code and decode the message sent by the server\n\t response = conn.getResponseCode();\n\t is = conn.getInputStream();\n\t BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192);\n\t String line = \"\";\n\t StringBuffer receivedMessage = new StringBuffer();\n\t while ((line = reader.readLine()) != null) {\n\t \treceivedMessage = receivedMessage.append(line);\n\t }\n\t reader.close();\n\t Log.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"receivedMessage: \" + receivedMessage);\n\t JSONArray clientList = new JSONArray(receivedMessage.toString());\n\t publishProgress(new ResponseInfo(response, clientList));\n\t } catch (IOException e) {\n\t\t\t\t\t//Some IO problem occurred - dump stack and inform caller\n\t \tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"exception posting join event request - response code: \" + response);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t//An Error occurred decoding the JSON\n\t\t\t\t\tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"exception parsing JSON response\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t // Makes sure that the InputStream is closed after the app is\n\t\t // finished using it.\n\t if (is != null) {\n\t \ttry {\n\t \t\tis.close();\n\t \t} catch (IOException e) {\n\t \t\t\t\t//Some IO problem occurred while closing is - just to a stack dump in this case\n\t \t\tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"exception closing is file\");\n\t \t\t\t\te.printStackTrace();\n\t \t}\n\t } \n\t }\n\t \n\t //Sleep until the next poll\n\t try {\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t//Interrupted while sleeping - simply log this\n\t\t\t\t\tLog.d(\"LiveMeshEventControllerActivity PollServerForClients\", \"interupted while sleeping\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n \t}\n }", "private void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n\n Toast.makeText(getApplicationContext(), \"No Network Connection\",\n Toast.LENGTH_SHORT).show();\n mOutputText.setText(\"No network connection available.\");\n } else {\n new MakeRequestTask(mCredential).execute();\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 }", "private static void addProducer()\r\n\t{\r\n\t\tfetchers++;\r\n\t\tFetcher producer = new Fetcher();\r\n\t\tproducer.start();\r\n\t}", "private void fetchUser() {\n UserFetcher userFetcher = new UserFetcher();\n userFetcher.setListener(this);\n userFetcher.getUser();\n }", "void fetchNudges() {\n Log.d(LOG_TAG, \"Fetch nudges started\");\n mExecutors.networkIO().execute(() -> {\n try {\n\n if (mNudgeAdapter != null) {\n\n if (mUserRef != null) {\n //Fetch more data\n if (mNudgeAdapter.getItemCount() != 0) {\n DocumentSnapshot snapshot = mFirestoreAdapter.getSnapshot(mFirestoreAdapter.getItemCount() - 1);\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit)\n .startAfter(snapshot);\n\n } else {\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit);\n\n }\n } else Log.d(LOG_TAG, \"fetchNudges, user reference is null \");\n\n Log.d(LOG_TAG, \"Fetch Nudges, setting query\");\n mNudgeAdapter.setQuery(mNudgesQuery);\n }\n } catch (Exception e) {\n // Server probably invalid\n e.printStackTrace();\n }\n });\n }", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "IpcEvent fetchEvent(final boolean block) throws InterruptedException {\n\t\tif (block) {\n\t\t\treturn eventQueue.take();\n\t\t} else {\n\t\t\treturn eventQueue.poll();\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\n\n\t\t\tBitmap result = ImageService.getImage(ac,urlparams);\n\t\t\tLog.i(\"tan8\",\"url\"+urlparams);\n\t\t\tMessage ms = Message.obtain();\n\t\t\tms.what = what;\n\t\t\tms.obj = result;\n\t\t\tif (handler != null) {\n\t\t\t\thandler.sendMessage(ms);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "protected Void doInBackground(String... params) {\n notifyLocalPlayerReady();\n\n while (connectionActive) {\n\n if (!remotePlayerReady){\n\n // Ask the server if the remote player is ready yet.\n checkRemotePlayerReady();\n\n }else {\n\n if (unlimitedCollection || shouldUpdate) {\n\n updates++;\n updateComplete = false;\n\n sendLocalParamData();\n retrieveRemoteParamData();\n sendLocalEventData();\n retrieveRemoteEventData();\n\n shouldUpdate = false;\n updateComplete = true;\n hasNewData = true;\n\n }\n\n }\n\n }\n\n return null;\n\n }", "public void prefetchContent(Content content) {\n if (content != null) {\n logger.info(\"Determining download source for content \"\n + content.getContentID());\n\n if (OverlayFactory.getOverlayManager().getHopCount(content) <= MAX_HOPS) { // change\n // this\n // to\n // ask\n // OM\n // for\n // hop\n // count\n logger.info(\"Content is closer from the overlay, hence will be fetched from there.\");\n OverlayDownloader overlayDownloader = new OverlayDownloader(\n content);\n setOverlayDownloader(overlayDownloader);\n UnadaThreadService.getThreadService().execute(\n getOverlayDownloader());\n } else {\n logger.info(\"Content is closer from the Vimeo servers, hence will be fetched from there.\");\n VimeoDownloader vimeoDownloader = new VimeoDownloader(\n \"http://www.vimeo.com/m/\" + content.getContentID(),\n true);\n setVimeoDownloader(vimeoDownloader);\n UnadaThreadService.getThreadService().execute(\n getVimeoDownloader());\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\tQueueElement e;\n\t\t\tif ((e = queue.poll()) != null) {\n\t\t\t\tSystem.out.println(\"开始进行操作了。 ip=\" + e.ip + \" user=\"\n\t\t\t\t\t\t+ e.di.getUsername() + \" passwd \" + e.di.getPasswd()\n\t\t\t\t\t\t+ \" port \" + e.di.getPort());\n\t\t\t\tboolean online = e.online;\n\t\t\t\tDeviceInstance di = e.di;\n\t\t\t\tif (online && !di.isAutoflag()) {\n\t\t\t\t\t// System.out.println(di.getHostIP()+di.getPort()+di.getUsername()+di.getPasswd());\n\t\t\t\t\t//\n\t\t\t\t\tint n = run.getDc().login(di.getDeviceType(),\n\t\t\t\t\t\t\tdi.getHostIP(), di.getPort(), di.getUsername(),\n\t\t\t\t\t\t\tdi.getPasswd(), di);\n\t\t\t\t\t// System.out.println(n);\n\t\t\t\t\tif (n > -1) {\n\t\t\t\t\t\tLogUtil.DeviceManageInfo(\"login success !\");\n\t\t\t\t\t\tdi.setDeviceHandle(n);\n\t\t\t\t\t\trun.getDc().startListen(di.getDeviceType(), n,\n\t\t\t\t\t\t\t\tdi.getHostIP(), di.getPort());\n\t\t\t\t\t\t// run.getDc().AutoConnectionManage(n)\n\t\t\t\t\t\tdi.setAutoflag(false);\n\t\t\t\t\t\t// System.out.println(di.isAutoflag());\n\t\t\t\t\t\tdi.setOnlineFlag(true);\n\t\t\t\t\t\t// 这里也有一个\n\t\t\t\t\t\tDeviceStatus ds = DAOFactory.getDeviceStatusIntance()\n\t\t\t\t\t\t\t\t.getDeviceStatus(di.getDeviceid());\n\t\t\t\t\t\trun.deviceLogin(di.getDeviceid(), n);\n\t\t\t\t\t\trun.getSmd().SetEncodeDeviceOnline(\n\t\t\t\t\t\t\t\tdi.getDeviceid(),\n\t\t\t\t\t\t\t\tdi.getHostIP(),\n\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\tds.getDevType(),\n\t\t\t\t\t\t\t\tds.getDevSubType(),\n\t\t\t\t\t\t\t\tds.getUserName() + \",\" + ds.getPassword() + \",\"\n\t\t\t\t\t\t\t\t\t\t+ ds.getDevPort() + \",\" + ds.getSwitchSvrID());\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// pingTimeTask.putQueueElement(e);\n\t\t\t\t\t\trun.deviceLogout(di.getDeviceid());\n\t\t\t\t\t\tif (di.getDeviceHandle() > -1)\n\t\t\t\t\t\t\trun.getDc().logout(di.getDeviceType(),\n\t\t\t\t\t\t\t\t\tdi.getDeviceHandle());\n\t\t\t\t\t\tdi.setOnlineFlag(false);\n//\t\t\t\t\t\trun.getSmd().SetEncodeDeviceOnline(di.getDeviceid(),\n//\t\t\t\t\t\t\t\tdi.getHostIP(), false, -1, -1, null);\n\t\t\t\t\t\tLogUtil.DeviceManageInfo(\"login fail\");\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// pingTimeTask.removeQueueElement(e);\n\t\t\t\t\trun.deviceLogout(di.getDeviceid());\n\t\t\t\t\tif (di.getDeviceHandle() > -1)\n\t\t\t\t\t\trun.getDc().logout(di.getDeviceType(),\n\t\t\t\t\t\t\t\tdi.getDeviceHandle());\n\t\t\t\t\tdi.setOnlineFlag(false);\n\t\t\t\t\trun.getSmd().SetEncodeDeviceOnline(di.getDeviceid(),\n\t\t\t\t\t\t\tdi.getHostIP(), false, -1, -1, null);\n\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t} catch (InterruptedException el) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tel.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n\n public void run() {\n\n fetchTickets();\n\n }", "private static void loadResPacks() throws Exception\n {\n String resPacksWebpage = Downloader.webpage(Downloader.REMOTE_RES_PACKS_URL);\n if (resPacksWebpage != null)\n {\n respackConfig.getResPacks().addAll(Parser.getRemoteResPacks(resPacksWebpage));\n }\n else\n {\n JOptionPane.showMessageDialog(frame,\n \"Could not locate remote respacks. Are you connected to the internet?\\nURL: \"\n + Downloader.REMOTE_RES_PACKS_URL);\n }\n }", "public final void run() {\n AppMethodBeat.i(108148);\n if (q.a(cVar2.aBx(), jSONObject2, (com.tencent.mm.plugin.appbrand.s.q.a) cVar2.aa(com.tencent.mm.plugin.appbrand.s.q.a.class)) == b.FAIL_SIZE_EXCEED_LIMIT) {\n aVar2.BA(\"convert native buffer parameter fail. native buffer exceed size limit.\");\n AppMethodBeat.o(108148);\n return;\n }\n String CS = j.CS(jSONObject2.optString(\"url\"));\n Object opt = jSONObject2.opt(\"data\");\n String optString = jSONObject2.optString(FirebaseAnalytics.b.METHOD);\n if (bo.isNullOrNil(optString)) {\n optString = \"GET\";\n }\n if (TextUtils.isEmpty(CS)) {\n aVar2.BA(\"url is null\");\n AppMethodBeat.o(108148);\n } else if (URLUtil.isHttpsUrl(CS) || URLUtil.isHttpUrl(CS)) {\n byte[] bArr = new byte[0];\n if (opt != null && d.CK(optString)) {\n if (opt instanceof String) {\n bArr = ((String) opt).getBytes(Charset.forName(\"UTF-8\"));\n } else if (opt instanceof ByteBuffer) {\n bArr = com.tencent.mm.plugin.appbrand.r.d.q((ByteBuffer) opt);\n }\n }\n synchronized (d.this.ioA) {\n try {\n if (d.this.ioA.size() >= d.this.ioB) {\n aVar2.BA(\"max connected\");\n ab.i(\"MicroMsg.AppBrandNetworkRequest\", \"max connected mRequestTaskList.size():%d,mMaxRequestConcurrent:%d\", Integer.valueOf(d.this.ioA.size()), Integer.valueOf(d.this.ioB));\n }\n } finally {\n while (true) {\n }\n AppMethodBeat.o(108148);\n }\n }\n } else {\n aVar2.BA(\"request protocol must be http or https\");\n AppMethodBeat.o(108148);\n }\n }", "public abstract void fetch();", "public String getChannelData()\n {\n System.setProperty(\"http.keepAlive\", \"false\");\n HttpParams httpParameters = new BasicHttpParams();\n\n int timeoutConnection = 60000 * 20;\n HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n\n int timeoutSocket = 60000 * 20;\n HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n HttpProtocolParams.setVersion(httpParameters, HttpVersion.HTTP_1_1);\n HttpConnectionParams.setSocketBufferSize(httpParameters, 8*1024);\n\n DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n String link = \"https://api.hkgalden.com/f/\";\n\n System.out.println(\"link :\" + link);\n\n HttpGet httppost = new HttpGet(link);\n\n httppost.addHeader(\"X-GALAPI-KEY\",\"d9b511eb952d7da22e7d575750766bb5807a8bd0\");\n\n httppost.setHeader(\"Cache-Control\", \"no-cache\");\n\n try {\n System.out.println(\"Response:\"+ \"start execute\");\n HttpResponse response = httpclient.execute(httppost);\n System.out.println(\"Response:\"+response.getStatusLine().getStatusCode());\n HttpEntity getResponseEntity = response.getEntity();\n InputStream httpResponseStream = getResponseEntity.getContent();\n String result = slurp(httpResponseStream , 8192);\n return result;\n\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n return e.getMessage();\n } catch (ConnectTimeoutException e){\n e.printStackTrace();\n return e.getMessage();\n }catch (IOException e) {\n e.printStackTrace();\n return e.getMessage();\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile(isactive){\n\t\t//读取每个接入交换机的table?\n\t\tlong time1=System.currentTimeMillis();\t\n\t\tfor(Node node:nodes){\n\t\t\tTableReader tableReader=new TableReader();\n\t\t\ttableReader.setNode(node.getNode_id());\n\t\t\ttableReader.setTableid(tableid);\n\t\t\t//读取每条流表的static信息\n\t\t\tif(tableid==\"5\"){\n\t\t\ttry {\n\t\t\t\tfor(String id:tableReader.read().keySet()){\n\t\t\t\t\t//读取table中的每条流表\n\t\t\t\t\tFlow flow=tableReader.read().get(id);\n\t\t\t\t\t//是否存在inport 匹配\n\t\t\t\t\tMonTag monTag=new MonTag();\n\t\t\t\t\tif(flow.getMatch()!=null && flow.getMatch().getEthernet_Match()!=null && flow.getMatch().getIn_port()!=null){\n\t\t\t\t\t\tString in_port=flow.getMatch().getIn_port();\n\t\t\t\t\t\t//将监控标签加入该port\n\t\t\t\t\t\t\n\t\t\t\t\t\tmonTag.setInport(in_port);\n\t\t\t\t\t\t//是否存在源mac\n\t\t\t\t\tif(flow.getMatch().getEthernet_Match().getEthernet_source()!=null){\n\t\t\t\t\t\tEthernet_source source=flow.getMatch().getEthernet_Match().getEthernet_source();\n\t\t\t\t\t\tmonTag.setSrcmac(source.getAddress());\n\t\t\t\t\t}\n\t\t\t\t\t//是否存在目的mac\n\t\t\t\t\tif(flow.getMatch().getEthernet_Match().getEthernet_destination()!=null){\n\t\t\t\t\t\tEthernet_destination destination=flow.getMatch().getEthernet_Match().getEthernet_destination();\n\t\t\t\t\t\tmonTag.setDestmac(destination.getAddress());\n\t\t\t\t\t}\n\t\t\t\t\t//获取当前流表的数据\n\t\t\t\t\tlong nowbyte=flow.getFlow_Statistic().getByte_count();\n\t\t\t\t\tlong nowpkt=flow.getFlow_Statistic().getPacket_count();\n\t\t\t\t\tNetStatic netStatic=new NetStatic();\n\t\t\t\t\t//设置监控统计项\n\t\t\t\t\tnetStatic.setBytecount(nowbyte)\n\t\t\t\t\t\t\t .setPacketcount(nowpkt);\n\t\t\t\t\t//判断是否是第一次读取\n\t\t\t\t\tif(netMonitorMap.get(monTag)!=null){\n\t\t\t\t\t\n\t\t\t\t\t\tlong oldbyte=netMonitorMap.get(monTag).getBytecount();\n\t\t\t\t\t\tlong oldpkt=netMonitorMap.get(monTag).getPacketcount();\n\t\t\t\t\t\tif(nowbyte < oldbyte){\n\t\t\t\t\t\t\tnowbyte=oldbyte+nowbyte;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//计算速度\n\t\t\t\t\t\tlong bytespeed=(nowbyte-oldbyte)/(3000/1000);\n\t\t\t\t\t\tlong pktspeed=(nowpkt-oldpkt)/(3000/1000);\n\t\t\t\t\t\tnetStatic.setPacketspeed(pktspeed).setBytespeed(bytespeed);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tthis.netMonitorMap.put(monTag, netStatic);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (TableReadException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t }\n\t\t\telse if(tableid==\"3\") {\n\t\t\t\n\t\t\t//\tmonTag.setNode(node.getNode_id());\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tfor(String id:tableReader.read().keySet()){\n\t\t\t\t\t\tMonTag monTag=new MonTag();\n\t\t\t\t\t\tmonTag.setNode(node.getNode_id());\n\t\t\t\t\t\tNetStatic netStatic=new NetStatic();\n\t\t\t\t\t\tFlow flow=tableReader.read().get(id);\n\t\t\t\t\t\t//流表是否存在inport匹配域\n\t\t\t\t\t\tif(flow.getMatch().getIn_port()!=null){\n\t\t\t\t\t\t\tString inport=flow.getMatch().getIn_port();\t\n\t\t\t\t\t\t\tmonTag.setInport(inport);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//流表是否存在protocol域\n\t\t\t\t\t\tif(flow.getMatch().getIp_Match()!=null && flow.getMatch().getIp_Match().getIp_protocol()!=null){\n\t\t\t\t\t\t\tString ipProtocol=flow.getMatch().getIp_Match().getIp_protocol();\n\t\t\t\t\t\t\tProtocol_Type protocol_Type=Protocol_Type.Valueof(Integer.parseInt(ipProtocol));\n\t\t\t\t\t\t\tmonTag.setProtocol_Type(protocol_Type);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmonTag.setProtocol_Type(Protocol_Type.UNKNOW);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//获取当前流表的数据\n\t\t\t\t\t\tlong nowbyte=flow.getFlow_Statistic().getByte_count();\n\t\t\t\t\t\tlong nowpkt=flow.getFlow_Statistic().getPacket_count();\n\t\t\t\t\t\tnetStatic.setBytecount(nowbyte)\n\t\t\t\t\t\t .setPacketcount(nowpkt);\n\t\t\t\t\t\t//判断是否是第一次读取\n\t\t\t\t\t\tif(netMonitorMap.get(monTag)!=null){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong oldbyte=netMonitorMap.get(monTag).getBytecount();\n\t\t\t\t\t\t\tlong oldpkt=netMonitorMap.get(monTag).getPacketcount();\n\t\t\t\t\t\t\tif(nowbyte < oldbyte){\n\t\t\t\t\t\t\t\tnowbyte=oldbyte+nowbyte;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//计算速度\n\t\t\t\t\t\t\tlong bytespeed=(nowbyte-oldbyte)/(3000/1000);\n\t\t\t\t\t\t\tlong pktspeed=(nowpkt-oldpkt)/(3000/1000);\n\t\t\t\t\t\t\tnetStatic.setPacketspeed(pktspeed).setBytespeed(bytespeed);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"MonTag \"+monTag.getInport()+\"<<<>>>\"+monTag.getProtocol_Type());\n\t\t\t\t\t\tlong bytespeed=netStatic.getBytespeed();\n\t\t\t\t\t\n\t\t\t\t\t\tthis.netMonitorMap.put(monTag, netStatic);\n\t\t\t\t\t\t//for(MonTag monTag1:netMonitorMap.keySet()){\n\t\t\t\t\t\t//\tSystem.out.println(\"MonTag \"+monTag1.getInport()+\" \"+monTag1.getProtocol_Type());\n\t\t\t\t\t//\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NumberFormatException | TableReadException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlong time2=System.currentTimeMillis();\n\t\tinterval=3000-(time2-time1);\n\t\tSystem.out.println(\"Monitoring\");\n\t\ttry {\n\t\t\tThread.sleep(interval);\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\t\n\t\t}\n\t}", "private ClientExecutorEngine() {\n ClientConfigReader.readConfig();\n DrillConnector.initConnection();\n HzConfigReader.readConfig();\n }", "public abstract void queryRemoteCardInfo();", "private PlayingCard getCard(HeartsGraphics g){\n\t\t\n\t\tsynchronized(lock){\n\t\t\ttry {\t\t\t\n\t\t\t\tlock.wait();\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn chosenCard;\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tCursor result = null;\n\t\t\t\tArrayList<Gift> rValue = null;\n\n\t\t\t\tString projection[] = dataContract.GIFT_COLUMNS;\n\t\t\t\tString selection = null;\n\n\t\t\t\tswitch (type) {\n\t\t\t\tcase QUERY_GIFTBYTITLE:\n\t\t\t\t\tselection = dataContract.Col._TITLE + \" LIKE ? \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUERY_GIFTBYOWNER:\n\t\t\t\t\tselection = dataContract.Col._OWNERID + \" LIKE ? \";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = mDB.query(dataContract.TABLE_GIFT, projection,\n\t\t\t\t\t\t\tselection, selectionArgs, null, null, null);\n\n\t\t\t\t\trValue = new ArrayList<Gift>();\n\n\t\t\t\t\tArrayList<Gift> glist = null; \n\t\t\t\t\t\t\t\n\t\t\t\t\tif (eFilter == emotionType.EMOTION_NONE)\n\t\t\t\t\t\tglist = getGiftDataArrayListFromCursor(result);\n\t\t\t\t\telse\n\t\t\t\t\t\tglist = getGiftDataArrayListFromCursor(result, eFilter);\n\t\t\t\t\t\n\t\t\t\t\t\trValue.addAll(glist);\n\t\t\t\t\t\t\n\t\t\t\t\tMessage msg = Message.obtain(handler,\n\t\t\t\t\t\t\tPotlatchMsg.QUERY_GIFTDATA.getVal());\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.putSerializable(PotlatchConst.query_gift_data,\n\t\t\t\t\t\t\trValue);\n\t\t\t\t\tmsg.setData(b);\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\tresult.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tLog.d(tag, e.getMessage());\n\t\t\t\t}\n\t\t\t}", "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 void pullBikes() {\n try {\n if (!connected) {\n this.reconnectSupplier();\n }\n\n synchronized (this.writeLock) {\n if (!this.dataVersion.equals(supplier.getDataVersion())) {\n DataPatch<ArrayList<Bike>> dataPatch = supplier.getNewBikes(dataVersion);\n for (Bike bike : dataPatch.getData()) {\n cache.put(bike.getItemNumber(), bike);\n }\n dataVersion = dataPatch.getDataVersion();\n }\n }\n } catch (RemoteException e) {\n System.out.println(\"Cannot load new bikes from supplier, keep using cached data\");\n e.printStackTrace();\n connected = false; // connection lost so remove reference to supplier, reacquire later\n }\n }", "private boolean _autoGetQuery() throws SessionException \n {\n \n long sleeptime = 5000; //5 seconds //1 minute\n \n //get options sg, ft - remember ft might be null\n String serverGroup = (String) this._argTable.get(CMD.SERVERGROUP);\n //String filetype = (String) this._argTable.get(CMD.FILETYPE);\n String outputDir = (String) this._argTable.get(CMD.OUTPUT);\n \n if (outputDir == null)\n {\n outputDir = System.getProperty(\"user.dir\");\n this._argTable.put(CMD.OUTPUT, outputDir);\n }\n \n //---------------------------\n \n boolean loggerInitError = !_initSessionLogging(\n \"FeiQ Subscription Notification\",\n \"FeiQ Subscription Report\");\n if (loggerInitError) \n return false;\n \n //---------------------------\n \n //set output dir\n this._client.changeDir(outputDir);\n\n //get settings from parser\n Object replace = this._argTable.get(CMD.REPLACE);\n Object version = this._argTable.get(CMD.VERSION);\n\n //check consistent state\n if (replace != null && version != null) {\n if (!this._using) {\n this._logger.info(this._getUsage());\n }\n ++this._errorCount;\n return false;\n }\n\n //set client according to parameters\n if (replace != null)\n this._client.set(Client.OPTION_REPLACEFILE, true);\n if (version != null)\n this._client.set(Client.OPTION_VERSIONFILE, true);\n if (this._argTable.get(CMD.SAFEREAD) != null)\n this._client.set(Client.OPTION_SAFEREAD, true);\n if (this._argTable.get(CMD.RECEIPT) != null)\n this._client.set(Client.OPTION_RECEIPT, true);\n if (this._argTable.get(CMD.CRC) != null) {\n this._client.set(Client.OPTION_COMPUTECHECKSUM, true);\n this._logger.info(\"File resume transfer enabled.\\n\");\n }\n\n //get the invoke command string\n String invoke = (String) this._argTable.get(CMD.INVOKE);\n if (invoke != null) {\n invoke.trim();\n if (invoke.length() == 0)\n invoke = null;\n }\n\n //set exit on error flag\n boolean exitOnError = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEEXITONERROR) != null)\n exitOnError = true;\n\n //set invoke async flag\n boolean invokeAsync = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEASYNC) != null)\n invokeAsync = true;\n \n //---------------------------\n \n this._client.set(Client.OPTION_RESTART, true); \n \n //---------------------------\n \n //check format option, and build new formatter, using default if\n //format value is null\n String format = (String) this._argTable.get(CMD.FORMAT);\n this._dateFormatter = new DateTimeFormatter(format); \n\n //---------------------------\n \n //check replicate, enable if set\n if (this._argTable.get(CMD.REPLICATE) != null) {\n this._client.set(Client.OPTION_REPLICATE, true);\n this._logger.info(\"File replication enabled.\\n\");\n }\n \n if (this._argTable.get(CMD.REPLICATEROOT) != null) {\n String rootStr = (String) this._argTable.get(CMD.REPLICATEROOT);\n try { \n this._client.setReplicationRoot(rootStr);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n ++this._errorCount;\n return false;\n }\n }\n\n //---------------------------\n \n //check diff, enable if set\n if (this._argTable.get(CMD.DIFF) != null) {\n this._client.set(Client.OPTION_DIFF, true);\n }\n //---------------------------\n \n String msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + \"Subscribing to [\" + serverGroup + \"] server group.\\n\";\n\n if (this._mailmessage)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n //---------------------------\n \n boolean success = true;\n boolean newconnection = false;\n boolean timeToExit = false;\n\n \n //create copy of options for query client\n final Map qOptions = (Map) this._argTable.clone(); \n QueryResultsCollector starScream = createClientCollector(qOptions,\n \t\t \t\t\t\t\t\t\t\t Constants.AUTOGETFILES);\n this._queryClient = starScream.getClient();\n \n //start the query subscription\n this._logger.debug(\"Starting subscription on query client\");\n int xid = this._queryClient.subscribeQuery();\n \n //---------------------------\n \n //launch subscription client on own thread\n Thread subThread = new Thread(starScream);\n subThread.setName(\"Query_Result_Collector:\"+serverGroup);\n subThread.start();\n \n //---------------------------\n \n //check to see if we bundle results so that they are retrieved\n //per filetype, or all files in results in sequential time order\n boolean bundleResults = Utils.bundleResultsByFiletype();\n \n //enter loop, while collector has work to do, keep going\n while (starScream.isActive()) \n {\n long issueTime = System.currentTimeMillis();\n \n //---------------------------\n \n //if results are available, then process 'em\n //else go to sleep\n \n if (starScream.isResultAvailable())\n {\n List<String> filetypes = starScream.getResultKeys();\n List<Result> allResults = starScream.getAllResults();\n \n int iterations = bundleResults ? filetypes.size() : \n allResults.size();\n \n for (int i = 0; i < iterations; ++i)\n {\n String ft = null;\n if (bundleResults)\n {\n //collect a list of all files for the filetype to retrieve\n //and call get() for that list\n ft = filetypes.get(i);\n List<Result> resultList = starScream.getResultsForFiletype(ft);\n String[] filenames = Utils.getResultNames(resultList);\n if (filenames != null && filenames.length > 0)\n {\n \t _setType(serverGroup, ft);\n this._client.get(filenames);\n }\n }\n else\n {\n //single file at a time\n Result res = allResults.get(i);\n ft = res.getType();\n String filename = res.getName();\n if (ft != null && filename != null)\n {\n \t _setType(serverGroup, ft); \n this._client.get(new String[] {filename});\n } \n } \n \n timeToExit = false;\n newconnection = false;\n \n //---------------------------\n \n //handle resulting files\n while (this._client.getTransactionCount() > 0) \n {\n Result result = this._client.getResult();\n if (result == null) \n {\n continue;\n } \n else if (result.getErrno() == Constants.NO_FILES_MATCH) \n {\n // no new files at this time\n continue;\n } \n else if (result.getErrno() == Constants.OK) \n {\n boolean proceed = _handleNewFile(result, outputDir, \n invoke, exitOnError, \n invokeAsync,\n Constants.AUTOGETFILES);\n if (!proceed)\n {\n timeToExit = true;\n break;\n }\n \n //invoke event handlers\n this._triggerFileResultEvent(Constants.AUTOGETFILES, result);\n \n result.commit();\n starScream.remove(ft, result.getName()); \n continue;\n } \n else if (result.getErrno() == Constants.FILE_EXISTS) \n {\n this._logger.info(result.getMessage());\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n result.commit();\n starScream.remove(ft, result.getName());\n continue;\n } \n else if (result.getErrno() == Constants.IO_ERROR) \n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + \"Lost connection to [\"\n + ft + \"]. Attempting restart\\n\";\n if (this._mailmessage && !this._mailSilentRecon)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n\n //invoke error handlers\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n this._client.logout();\n this._client = this._createAutoQueryClient();\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\nRestored subscription session to [\"\n + ft + \"].\\n\";\n if (this._mailmessage && !this._mailSilentRecon)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n if (outputDir != null)\n this._client.changeDir(outputDir);\n if (replace != null)\n this._client.set(Client.OPTION_REPLACEFILE, true);\n if (version != null)\n this._client.set(Client.OPTION_VERSIONFILE, true);\n if (this._argTable.get(CMD.CRC) != null)\n this._client.set(Client.OPTION_COMPUTECHECKSUM, true);\n if (this._argTable.get(CMD.SAFEREAD) != null)\n this._client.set(Client.OPTION_SAFEREAD, true);\n \n //fix as part of AR118105 -------------------\n //check replicate, enable if set\n if (this._argTable.get(CMD.REPLICATE) != null) \n this._client.set(Client.OPTION_REPLICATE, true); \n if (this._argTable.get(CMD.REPLICATEROOT) != null) \n {\n String rootStr = (String) this._argTable.get(CMD.REPLICATEROOT); \n try { \n this._client.setReplicationRoot(rootStr);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n }\n } \n \n //check diff\n if (this._argTable.get(CMD.DIFF) != null) {\n this._client.set(Client.OPTION_DIFF, true);\n }\n //end of fix --------------------------------------\n \n newconnection = true;\n break;\n } \n else if (result.getErrno() == Constants.FILE_NOT_FOUND)\n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + result.getMessage() + \n \", file not found on server. Skipping file.\" + \"\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n result.commit();\n starScream.remove(ft, result.getName());\n continue;\n }\n else \n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + result.getMessage() + \"\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n this._logger.debug(\"ERRNO = \" + result.getErrno());\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n //is this error associated with a file? If so, more processing\n //is needed.\n String filename = result.getName();\n if (filename != null)\n {\n //if exitOnError set, then stop subscription\n //to avoid losing any files\n if (exitOnError) \n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\n\";\n msg += ERROR_TAG + \"Subscription [\"\n + ft + \"]: Aborted.\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n\n ++this._errorCount;\n timeToExit = true;\n break;\n }\n //otherwise, just skip this file and log message\n else \n {\n starScream.remove(ft, result.getName());\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\n\";\n msg += ERROR_TAG + \"Subscription [\"\n + ft + \"]: Skipping '\"+filename+\"'\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.warn(msg);\n this._logger.warn(msg);\n }\n }\n continue;\n }\n } //end_while_transactions_exist\n \n } //end_for_iterations\n \n \n // if timeToExit was set, break out of outer loop\n if (timeToExit)\n break;\n\n\n \n } //end_if_results \n \n //if we have the same connection, check if we should nap\n if (!newconnection) \n { \n this._logger.debug(\"Waiting for new files...\");\n try {\n //assume we are gonna sleep...\n boolean shouldSleep = true;\n while(shouldSleep)\n {\n //check to see if we really should sleep\n shouldSleep = !starScream.isResultAvailable();\n this._logger.debug(\"Checking for query results...\");\n shouldSleep = shouldSleep && this._queryClient.isAlive();\n if (shouldSleep)\n Thread.sleep(sleeptime);\n }\n } catch (InterruptedException e) {\n break; // exit the infinite loop and return\n }\n }\n \n } //end_while_starscream_active\n \n \n //---------------------------\n \n //logout of client, close query client\n if (this._client != null && this._client.isLoggedOn())\n this._client.logout();\n \n if (this._queryClient != null && this._queryClient.isAlive())\n this._queryClient.close();\n \n //---------------------------\n \n return success;\n }", "private void fetchNewCalls() {\n fetchCalls(QUERY_NEW_CALLS_TOKEN, true);\n }", "V get() throws PromiseBrokenException, InterruptedException;", "@Override\n public void fetchFromSource(){\n System.out.println(\"pull the user credential from gmail\");\n }", "@Override\n public void run() {\n Node serverValue = serverSyncTree.getServerValue(query.getSpec());\n if (serverValue != null) {\n source.setResult(\n InternalHelpers.createDataSnapshot(\n query.getRef(), IndexedNode.from(serverValue)));\n return;\n }\n serverSyncTree.setQueryActive(query.getSpec());\n final DataSnapshot persisted = serverSyncTree.persistenceServerCache(query);\n if (persisted.exists()) {\n // Prefer the locally persisted value if the server is not responsive.\n scheduleDelayed(() -> source.trySetResult(persisted), GET_TIMEOUT_MS);\n }\n connection\n .get(query.getPath().asList(), query.getSpec().getParams().getWireProtocolParams())\n .addOnCompleteListener(\n ((DefaultRunLoop) ctx.getRunLoop()).getExecutorService(),\n (@NonNull Task<Object> task) -> {\n if (source.getTask().isComplete()) {\n return;\n }\n if (!task.isSuccessful()) {\n if (persisted.exists()) {\n source.setResult(persisted);\n } else {\n source.setException(Objects.requireNonNull(task.getException()));\n }\n } else {\n /*\n * We need to replicate the behavior that occurs when running `once()`. In other words,\n * we need to create a new eventRegistration, register it with a view and then\n * overwrite the data at that location, and then remove the view.\n */\n Node serverNode = NodeUtilities.NodeFromJSON(task.getResult());\n QuerySpec spec = query.getSpec();\n // EventRegistrations require a listener to be attached, so a dummy\n // ValueEventListener was created.\n keepSynced(spec, /*keep=*/ true, /*skipDedup=*/ true);\n List<? extends Event> events;\n if (spec.loadsAllData()) {\n events = serverSyncTree.applyServerOverwrite(spec.getPath(), serverNode);\n } else {\n events =\n serverSyncTree.applyTaggedQueryOverwrite(\n spec.getPath(),\n serverNode,\n getServerSyncTree().tagForQuery(spec));\n }\n repo.postEvents(\n events); // to ensure that other listeners end up getting their cached\n // events.\n source.setResult(\n InternalHelpers.createDataSnapshot(\n query.getRef(),\n IndexedNode.from(serverNode, query.getSpec().getIndex())));\n keepSynced(spec, /*keep=*/ false, /*skipDedup=*/ true);\n }\n });\n }", "@Override\n protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception { // (4)\n Channel incoming = ctx.channel();\n\n String remoteAddress = incoming.remoteAddress().toString();\n logger.info(\"[BudsRpc ][Registry-server] receive data=[{}] from {}\", msg, remoteAddress);\n\n String[] cmd = msg.split(\"\\r\\n\");\n ActionEnum action = ActionEnum.getAction(cmd[0]);\n String service = cmd[1];\n String address = cmd[2];\n String port = cmd[3];\n\n switch (action) {\n case ACTION_REGISTRY:\n Set<Channel> channelSet = registryMap.get(service);\n if (channelSet == null) {\n channelSet = new HashSet<>();\n registryMap.put(service, channelSet);\n }\n channelSet.add(incoming);\n\n Set<String> serviceSet = providerMap.get(remoteAddress);\n if (serviceSet == null) {\n serviceSet = new HashSet<>();\n providerMap.put(remoteAddress, serviceSet);\n }\n serviceSet.add(service);\n\n // 通知订阅者\n notify(service);\n\n case ACTION_SUBSCRIBE:\n ChannelGroup channelGroup = subscribMap.get(service);\n if (channelGroup == null) {\n channelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);\n subscribMap.put(service, channelGroup);\n }\n channelGroup.add(incoming);\n break;\n\n }\n\n for (Channel channel : channels) {\n if (channel != incoming) {\n channel.writeAndFlush(\"[\" + incoming.remoteAddress() + \"]\" + msg + \"\\n\");\n } else {\n channel.writeAndFlush(\"[you]\" + msg + \"\\n\");\n }\n }\n }", "PaulEigon() {\n\treadCurrentPingisState();\n\tscanState();\n\tprintResult();\n }", "public void fetcherLesEo() {\r\n\t\r\n\t// Commence par fetcher les params ... et si Ok, fetche les EO !\r\n\tif (recupererValParams() && valParams != null) {\r\n\r\n\t NSArray bindings = new NSArray(valParams);\r\n\t EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat(chaineQualif, bindings);\r\n\t EOFetchSpecification fetchSpec = new EOFetchSpecification(nomEntite,qualifier, eoSortOrderings);\r\n\r\n\t fetchSpec.setRefreshesRefetchedObjects(true);\r\n\r\n\t NSArray res = null;\r\n\t res = monEc.objectsWithFetchSpecification(fetchSpec);\r\n\t listeEOFetches = res;\r\n\t \r\n\t // si on demande � ce qu'� l'init il n'y ait pas de ligne s�lectionn�e par d�faut, alors pas d'Item choisi (en cascade)\r\n\t if (noSelectionPossible) setItemChoisi(null);\r\n\t else {\r\n\t\tif (listeEOFetches != null && listeEOFetches.count() > 0)\r\n\t\t setItemChoisi((EOGenericRecord)listeEOFetches.objectAtIndex(0));\r\n\t\telse setItemChoisi(null);\r\n\t }\r\n\t}\r\n\t// les parametres n'ont pu être récupérés : vider le popUp...\r\n\telse {\r\n listeEOFetches = null;\r\n // pas d'Item choisi (en cascade)\r\n setItemChoisi(null);\r\n\t}\r\n }", "private void channelPolling() throws IOException {\n\t\tSemaphore acceptLock = new Semaphore(1);\n\n\t\twhile (true) {\n\t\t\t//Waits until there is activity on one of the registered channels\n\t\t\tif (selector.selectNow() == 0) continue;\n\t\t\t//get list of all keys\n\t\t\tIterator<SelectionKey> keys = selector.selectedKeys().iterator();\n\n\t\t\twhile (keys.hasNext()) {\n\t\t\t\t//get key and find its activity\n\t\t\t\tSelectionKey key = keys.next();\n\n//\t\t\t\tSystem.out.printf(\"Key Value: Interest: %d, Ready: %d%n\", key.interestOps(), key.readyOps());\n\n\t\t\t\tif (!key.isValid()) {\n\t\t\t\t\tSystem.out.println(\"Canceled key encountered. Ignoring.\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( key.isAcceptable()) {\n\n\t\t\t\t\t//Stops redundant task creation. The lock is unlocked as soon as a thread handles\n\t\t\t\t\t//the registration of a client. Should never really bottleneck program\n\t\t\t\t\tif (!acceptLock.tryAcquire()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t//Put new AcceptClientConnection in Queue with this key data\n\t\t\t\t\taddTask(new AcceptClientConnection(selector, serverChannel, acceptLock, this));\n\n\t\t\t\t}\n\n\t\t\t\tif ( key.isReadable()) {\n\t\t\t\t\t//deregister this key, as it's now not part of the serverSocketChannel, only a specific\n\t\t\t\t\t//client. Will reregister read interests as soon as it's read from\n\t\t\t\t\tkey.interestOps(0);\n\t\t\t\t\t//put new ReadClientData in Queue, which this key data\n\t\t\t\t\tSocketChannel client = (SocketChannel) key.channel();\n\n\t\t\t\t\t//Make sure the channelsToHandle isn't edited by a thread mid add/size check\n\t\t\t\t\t//also synchronized with the Thread's work when it handles the batch organization\n\t\t\t\t\tsynchronized (channelsToHandle) {\n\t\t\t\t\t\tchannelsToHandle.add(new ClientData(client, key));\n//\t\t\t\t\t\tSystem.out.printf(\"Client_Data: Appending '%s' to list. Size: %d%n\", client.getRemoteAddress(), channelsToHandle.size());\n\n\t\t\t\t\t\t//if there are more than enough clients to handle, hand it off to a client and move on\n\t\t\t\t\t\tif (channelsToHandle.size() >= batchSize && organizeLock.tryAcquire()) {\n\t\t\t\t\t\t\taddTask(new OrganizeBatch(channelsToHandle, queue, hashList, batchSize, organizeLock, this));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif ( key.isWritable()) {\n//\t\t\t\t\tSystem.out.println(\"Client can be written to\");\n\t\t\t\t}\n\t\t\t\t//done with the key this iteration, check again for any new activity next select\n\t\t\t\tkeys.remove();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onDiscoverRemoteNode(String url) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void run()\n {\n final String actionDescription = \"Register configuration listener\";\n\n boolean listenerRegistered = false;\n\n while (keepTrying)\n {\n /*\n * First register a listener for the group's configuration.\n */\n while ((! listenerRegistered) && (keepTrying))\n {\n try\n {\n IntegrationGroupConfigurationClient configurationClient = new IntegrationGroupConfigurationClient(accessServiceServerName,\n accessServiceRootURL);\n eventClient.registerListener(localServerUserId,\n new GovernanceEngineOutTopicListener(groupName,\n groupHandler,\n configurationClient,\n localServerUserId,\n auditLog));\n listenerRegistered = true;\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.CONFIGURATION_LISTENER_REGISTERED.getMessageDefinition(localServerName,\n accessServiceServerName));\n }\n catch (UserNotAuthorizedException error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.SERVER_NOT_AUTHORIZED.getMessageDefinition(localServerName,\n accessServiceServerName,\n accessServiceRootURL,\n localServerUserId,\n error.getReportedErrorMessage()),\n error);\n waitToRetry();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_CONFIGURATION_LISTENER.getMessageDefinition(localServerName,\n accessServiceServerName,\n error.getClass().getName(),\n error.getMessage()),\n error);\n\n waitToRetry();\n }\n }\n\n while (keepTrying)\n {\n /*\n * Request the configuration for the governance group. If it fails just log the error but let the\n * integration daemon server continue to start. It is probably a temporary outage with the metadata server\n * which can be resolved later.\n */\n try\n {\n groupHandler.refreshConfig();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.INTEGRATION_GROUP_NO_CONFIG.getMessageDefinition(groupHandler.getIntegrationGroupName(),\n error.getClass().getName(),\n error.getMessage()),\n error.toString(),\n error);\n }\n\n waitToRetry();\n }\n\n waitToRetry();\n }\n }", "@Override\r\n\tpublic void onDiscoverySelected() {\n\t\tLog.d(TAG, \"onDiscoverySelected()\");\r\n\t\tmManager.discoverPeers(mChannel, new WifiP2pManager.ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tLog.d(TAG, \"onSucess()\");\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"Peers Avaliable!\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(int reason) {\r\n\t\t\t\tLog.d(TAG, \"onFailure()\");\r\n\t\t\t\tString message = reason == WifiP2pManager.P2P_UNSUPPORTED ? \"P2P_UNSUPORTED\" : \"BUSY\" ;\r\n\t\t\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"No Peers Avaliable, reason: \"+message, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void getResultsFromApi() {\r\n if (!isGooglePlayServicesAvailable()) {\r\n acquireGooglePlayServices();\r\n } else if (mCredential.getSelectedAccountName() == null) {\r\n chooseAccount();\r\n } else if (!isDeviceOnline()) {\r\n Toast.makeText(getActivity(), \"No network connection available.\", Toast.LENGTH_LONG).show();\r\n } else {\r\n new MakeRequestTask(mCredential).execute();\r\n }\r\n }", "private void checkRequests()\n\t{\n\t\t// to be honest I don't see why this can't be 5 seconds, but I'm trying 1 second\n\t\t// now as the existing 0.1 second is crazy given we're checking for events that occur\n\t\t// at 60+ second intervals\n\n\t\tif ( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL != 0 ){\n\n\t\t\treturn;\n\t\t}\n\n\t\tfinal long now =SystemTime.getCurrentTime();\n\n\t\t//for every connection\n\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\t\tfor (int i =peer_transports.size() -1; i >=0 ; i--)\n\t\t{\n\t\t\tfinal PEPeerTransport pc =(PEPeerTransport)peer_transports.get(i);\n\t\t\tif (pc.getPeerState() ==PEPeer.TRANSFERING)\n\t\t\t{\n\t\t\t\tfinal List expired = pc.getExpiredRequests();\n\t\t\t\tif (expired !=null &&expired.size() >0)\n\t\t\t\t{ // now we know there's a request that's > 60 seconds old\n\t\t\t\t\tfinal boolean isSeed =pc.isSeed();\n\t\t\t\t\t// snub peers that haven't sent any good data for a minute\n\t\t\t\t\tfinal long timeSinceGoodData =pc.getTimeSinceGoodDataReceived();\n\t\t\t\t\tif (timeSinceGoodData <0 ||timeSinceGoodData >60 *1000)\n\t\t\t\t\t\tpc.setSnubbed(true);\n\n\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\tDiskManagerReadRequest request =(DiskManagerReadRequest) expired.get(0);\n\n\t\t\t\t\tfinal long timeSinceData =pc.getTimeSinceLastDataMessageReceived();\n\t\t\t\t\tfinal boolean noData =(timeSinceData <0) ||timeSinceData >(1000 *(isSeed ?120 :60));\n\t\t\t\t\tfinal long timeSinceOldestRequest = now - request.getTimeCreated(now);\n\n\n\t\t\t\t\t//for every expired request \n\t\t\t\t\tfor (int j = (timeSinceOldestRequest >120 *1000 && noData) ? 0 : 1; j < expired.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get the request object\n\t\t\t\t\t\trequest =(DiskManagerReadRequest) expired.get(j);\n\t\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\t\tpc.sendCancel(request);\t\t\t\t//cancel the request object\n\t\t\t\t\t\t//get the piece number\n\t\t\t\t\t\tfinal int pieceNumber = request.getPieceNumber();\n\t\t\t\t\t\tPEPiece\tpe_piece = pePieces[pieceNumber];\n\t\t\t\t\t\t//unmark the request on the block\n\t\t\t\t\t\tif ( pe_piece != null )\n\t\t\t\t\t\t\tpe_piece.clearRequested(request.getOffset() /DiskManager.BLOCK_SIZE);\n\t\t\t\t\t\t// remove piece if empty so peers can choose something else, except in end game\n\t\t\t\t\t\tif (!piecePicker.isInEndGameMode())\n\t\t\t\t\t\t\tcheckEmptyPiece(pieceNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "@Override\n public Object get() throws InterruptedException, ExecutionException {\n return getSafely();\n }", "private BufferedImage getImage(ExternalGraphic eg) {\n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"got a \" + eg.getFormat());\n }\n \n if (supportedGraphicFormats.contains(eg.getFormat().toLowerCase())) {\n if (eg.getFormat().equalsIgnoreCase(\"image/gif\")\n || eg.getFormat().equalsIgnoreCase(\"image/jpg\")\n || eg.getFormat().equalsIgnoreCase(\"image/png\")) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"a java supported format\");\n }\n \n try {\n BufferedImage img = imageLoader.get(eg.getLocation(), isInteractive());\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"Image return = \" + img);\n }\n \n return img;\n } catch (MalformedURLException e) {\n LOGGER.warning(\"ExternalGraphicURL was badly formed\");\n }\n }\n }\n \n return null;\n }", "private void retrieveNewMetadata() {\n\n Runnable loadProviders = new Runnable() {\n @Override\n public void run() {\n getAvailableDataProviders();\n }\n };\n\n Runnable loadDataSets = new Runnable() {\n @Override\n public void run() {\n getAvailableDataSets();\n }\n };\n\n Runnable loadParameters = new Runnable() {\n @Override\n public void run() {\n getAvailableParameters();\n }\n };\n\n Runnable loadLevels = new Runnable() {\n @Override\n public void run() {\n getAvailableLevels();\n }\n };\n\n Runnable[] runnables = new Runnable[] { loadProviders, loadDataSets,\n loadParameters, loadLevels };\n FutureTask<?>[] tasks = new FutureTask[runnables.length];\n ExecutorService executor = Executors\n .newFixedThreadPool(runnables.length);\n for (int i = 0; i < runnables.length; i++) {\n FutureTask<Void> task = new FutureTask<Void>(runnables[i], null);\n tasks[i] = task;\n executor.submit(task);\n }\n\n for (FutureTask<?> task : tasks) {\n try {\n task.get();\n } catch (Exception e) {\n statusHandler.handle(Priority.WARN, \"Unable to load metadata\",\n e);\n }\n }\n }", "com.hps.july.persistence.Worker getTechStuff() throws java.rmi.RemoteException, javax.ejb.FinderException;", "private boolean _autoGetPush() throws SessionException {\n \n long sleeptime = 1000; //1 second\n String ftString = FileType.toFullFiletype(\n (String) this._argTable.get(CMD.SERVERGROUP),\n (String) this._argTable.get(CMD.FILETYPE));\n \n //---------------------------\n \n boolean loggerInitError = !_initSessionLogging(\n \"Subscription Notification\",\n \"Subscription Report\");\n if (loggerInitError) \n return false;\n \n //---------------------------\n \n //set output dir\n String outputDir = (String) this._argTable.get(CMD.OUTPUT);\n if (outputDir == null)\n outputDir = System.getProperty(\"user.dir\");\n this._client.changeDir(outputDir);\n\n //get settings from parser\n Object replace = this._argTable.get(CMD.REPLACE);\n Object version = this._argTable.get(CMD.VERSION);\n\n //check consistent state\n if (replace != null && version != null) {\n if (!this._using) {\n this._logger.info(this._getUsage());\n }\n ++this._errorCount;\n return false;\n }\n\n //set client according to parameters\n if (replace != null)\n this._client.set(Client.OPTION_REPLACEFILE, true);\n if (version != null)\n this._client.set(Client.OPTION_VERSIONFILE, true);\n if (this._argTable.get(CMD.SAFEREAD) != null)\n this._client.set(Client.OPTION_SAFEREAD, true);\n if (this._argTable.get(CMD.RECEIPT) != null)\n this._client.set(Client.OPTION_RECEIPT, true);\n if (this._argTable.get(CMD.CRC) != null) {\n this._client.set(Client.OPTION_COMPUTECHECKSUM, true);\n this._logger.info(\"File resume transfer enabled.\\n\");\n }\n\n //get the invoke command string\n String invoke = (String) this._argTable.get(CMD.INVOKE);\n if (invoke != null) {\n invoke.trim();\n if (invoke.length() == 0)\n invoke = null;\n }\n\n //set exit on error flag\n boolean exitOnError = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEEXITONERROR) != null)\n exitOnError = true;\n\n //set invoke async flag\n boolean invokeAsync = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEASYNC) != null)\n invokeAsync = true;\n \n //---------------------------\n \n this._client.set(Client.OPTION_RESTART, true); \n \n //---------------------------\n \n //check format option, and build new formatter\n String format = (String) this._argTable.get(CMD.FORMAT);\n this._dateFormatter = new DateTimeFormatter(format); \n\n //---------------------------\n \n //check replicate, enable if set\n if (this._argTable.get(CMD.REPLICATE) != null) {\n this._client.set(Client.OPTION_REPLICATE, true);\n this._logger.info(\"File replication enabled.\\n\");\n }\n \n if (this._argTable.get(CMD.REPLICATEROOT) != null) {\n String rootStr = (String) this._argTable.get(CMD.REPLICATEROOT);\n try { \n this._client.setReplicationRoot(rootStr);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n ++this._errorCount;\n return false;\n }\n }\n\n //---------------------------\n \n //check diff, enable if set\n if (this._argTable.get(CMD.DIFF) != null) {\n this._client.set(Client.OPTION_DIFF, true);\n }\n \n //---------------------------\n \n String msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + \"Subscribing to [\" + ftString + \"] file type.\\n\";\n\n if (this._mailmessage)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n //---------------------------\n \n boolean success = true;\n boolean newconnection = false;\n boolean timeToExit = false;\n\n //construct a subscription client that will generate new file events\n //final List newFiles = new Vector(); \n final PushFileEventQueue<String> newFileQueue = \n new PushFileEventQueue<String>(); \n final Map clientOptions = (Map) this._argTable.clone(); \n if (!clientOptions.containsKey(CMD.OUTPUT))\n clientOptions.put(CMD.OUTPUT, \".\"); \n \n try {\n _subscriptionClient = new PushSubscriptionClient(\n this._domainFile, clientOptions, \n Constants.AUTOGETFILES); \n } catch (SessionException sesEx) {\n msg = \"Unable to construct subscription client. Aborting...\";\n this._logger.error(msg);\n this._logger.debug(null, sesEx);\n throw sesEx;\n }\n \n //---------------------------\n \n //construct subscription event listener that adds new files to local\n //file collection\n SubscriptionEventListener subListener = new SubscriptionEventListener() { \n public void eventOccurred(SubscriptionEvent event)\n {\n _logger.trace(\"Received new subscription event\"); \n Object obj = event.getObject();\n \n if (obj instanceof Result)\n {\n //get the filename and add it to our queue!\n Result result = (Result) obj;\n \n //test if this file should be retrieve or not\n String filename = result.getName(); \n synchronized(newFileQueue)\n {\n newFileQueue.addItem(filename);\n }\n }\n } \n };\n \n //add anon. listener to client\n _subscriptionClient.addSubscriptionEventListener(subListener);\n \n //---------------------------\n \n //launch subscription client on own thread\n Thread subThread = new Thread(_subscriptionClient);\n subThread.setName(\"Subscription_Thread_\"+ftString);\n subThread.start();\n \n //---------------------------\n \n //enter loop\n while (_subscriptionClient.isAlive()) {\n long issueTime = System.currentTimeMillis();\n \n //---------------------------\n \n //lock newFiles collection, create array of filenames from\n //contents. \n String[] files = null;\n synchronized(newFileQueue)\n {\n newFileQueue.advanceQueue();\n List<String> filenameList = newFileQueue.getItemsInProcess();\n files = filenameList.toArray(new String[0]);\n \n// int numFiles = newFiles.size();\n// if (numFiles > 0)\n// {\n// files = new String[numFiles];\n// for (int i = 0; i < numFiles; ++i)\n// {\n// \n// files[i] = (String) newFiles.get(i);\n// }\n// }\n }\n \n // call 'get' using the filename array.\n if (files != null && files.length > 0)\n {\n this._client.get(files);\n }\n \n //---------------------------\n\n // reset the epoch to null to trigger client API to\n // use the last queried time.\n //queryTime = null;\n timeToExit = false;\n newconnection = false;\n \n //---------------------------\n \n //handle resulting files\n while (this._client.getTransactionCount() > 0) {\n Result result = this._client.getResult();\n if (result == null) \n {\n continue;\n } \n else if (result.getErrno() == Constants.NO_FILES_MATCH) \n {\n // no new files at this time\n continue;\n } \n else if (result.getErrno() == Constants.OK) \n {\n boolean proceed = _handleNewFile(result, outputDir, \n invoke, exitOnError, \n invokeAsync,\n Constants.AUTOGETFILES);\n if (!proceed)\n {\n timeToExit = true;\n break;\n }\n \n //invoke event handlers\n this._triggerFileResultEvent(Constants.AUTOGETFILES, result);\n \n result.commit();\n //newFiles.remove(result.getName()); //synch'ed Vector\n newFileQueue.removeItem(result.getName());\n continue;\n } \n else if (result.getErrno() == Constants.FILE_EXISTS) \n {\n this._logger.info(result.getMessage());\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n result.commit();\n //newFiles.remove(result.getName()); //synch'ed Vector\n newFileQueue.removeItem(result.getName());\n continue;\n } \n else if (result.getErrno() == Constants.IO_ERROR) \n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + \"Lost connection to [\"\n + ftString + \"]. Attempting restart\\n\";\n if (this._mailmessage && !this._mailSilentRecon)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n\n //invoke error handlers\n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n this._client.logout();\n \n this._client = this._createAutoQueryClient();\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\nRestored subscription session to [\"\n + ftString + \"].\\n\";\n if (this._mailmessage && !this._mailSilentRecon)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n if (outputDir != null)\n this._client.changeDir(outputDir);\n if (replace != null)\n this._client.set(Client.OPTION_REPLACEFILE, true);\n if (version != null)\n this._client.set(Client.OPTION_VERSIONFILE, true);\n if (this._argTable.get(CMD.CRC) != null)\n this._client.set(Client.OPTION_COMPUTECHECKSUM, true);\n if (this._argTable.get(CMD.SAFEREAD) != null)\n this._client.set(Client.OPTION_SAFEREAD, true);\n \n //fix as part of AR118105 -------------------\n //check replicate, enable if set\n if (this._argTable.get(CMD.REPLICATE) != null) \n this._client.set(Client.OPTION_REPLICATE, true); \n if (this._argTable.get(CMD.REPLICATEROOT) != null) \n {\n String rootStr = (String) this._argTable.get(CMD.REPLICATEROOT); \n try { \n this._client.setReplicationRoot(rootStr);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n }\n } \n \n //check diff\n if (this._argTable.get(CMD.DIFF) != null) {\n this._client.set(Client.OPTION_DIFF, true);\n }\n //end of fix --------------------------------------\n \n \n newconnection = true;\n break;\n } \n else if (result.getErrno() == Constants.FILE_NOT_FOUND)\n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + result.getMessage() + \n \", file not found on server. Skipping file.\" + \"\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n \n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n result.commit();\n //newFiles.remove(result.getName()); //synch'ed Vector\n newFileQueue.removeItem(result.getName());\n continue;\n }\n else \n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + ERROR_TAG + result.getMessage() + \"\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n this._logger.debug(\"ERRNO = \" + result.getErrno());\n \n this._triggerFileResultError(Constants.AUTOGETFILES, result);\n \n //is this error associated with a file? If so, more processing\n //is needed.\n String filename = result.getName();\n if (filename != null)\n {\n //if exitOnError set, then stop subscription\n //to avoid losing any files\n if (exitOnError) \n {\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\n\";\n msg += ERROR_TAG + \"Subscription [\"\n + ftString + \"]: Aborted.\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.error(msg);\n this._logger.error(msg);\n\n ++this._errorCount;\n timeToExit = true;\n break;\n }\n //otherwise, just skip this file and log message\n else \n { \n //newFiles.remove(filename);\n newFileQueue.removeItem(result.getName());\n msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString()\n + \"\\n\";\n msg += ERROR_TAG + \"Subscription [\"\n + ftString + \"]: Skipping '\"+filename+\"'\\n\";\n if (this._mailmessage)\n this._emailMessageLogger.warn(msg);\n this._logger.warn(msg);\n }\n }\n continue;\n }\n } //end_while_transactions_exist\n\n //---------------------------\n \n //if timeToExit was set, break out of outer loop\n if (timeToExit)\n break;\n\n //if we have the same connection, check if we should nap\n if (!newconnection) \n { \n this._logger.debug(\"Waiting for new files...\");\n try {\n //assume we are gonna sleep...\n boolean shouldSleep = true;\n while(shouldSleep)\n {\n //check to see if we really should sleep\n synchronized(newFileQueue) {shouldSleep = newFileQueue.isEmpty();}\n shouldSleep = shouldSleep && _subscriptionClient.isAlive();\n if (shouldSleep)\n Thread.sleep(sleeptime);\n }\n } catch (InterruptedException e) {\n break; // exit the infinite loop and return\n }\n }\n } //end_while_sub_alive\n\n //---------------------------\n \n //logout of client, close subscription client\n if (this._client != null && this._client.isLoggedOn())\n this._client.logout();\n \n if (_subscriptionClient != null && _subscriptionClient.isAlive())\n _subscriptionClient.close();\n \n //---------------------------\n \n return success;\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Fail to request connection: \" + e.getMessage());\n }", "public Producer getProducerByEmailFetchingAddressFetchingProfile(String producerEmail);", "pb4server.DealHeartAskReq getDealHeartAskReq();", "private EnsembleProvider buildProvider(Properties properties) {\n //String servers = properties.getProperty(\"host.rest.servers\"); //hosts.servers = 127.0.0.1,127.0.0.2\n \tString servers = \"192.168.31.10\"; //hosts.servers = 127.0.0.1,127.0.0.2\n if (servers == null || servers.isEmpty()) {\n throw new IllegalArgumentException(\"host.servers cant be empty\");\n }\n //List<String> hostnames = Arrays.asList(servers.split(\",\"));\n List<String> hostnames = Arrays.asList(\"192.168.31.10\");\n //String port = properties.getProperty(\"host.rest.port\");\n String port = \"2181\";\n Integer restPort = 80; //default\n if (port != null) {\n restPort = Integer.valueOf(port);\n }\n //final String backupAddress = properties.getProperty(\"host.backup\");//127.0.0.1:2181\n final String backupAddress = \"127.0.0.1:2181\";//127.0.0.1:2181\n //if network is error,you should sepcify a backup zk-connectString\n Exhibitors exhibitors = new Exhibitors(hostnames, restPort, new Exhibitors.BackupConnectionStringProvider() {\n @Override\n public String getBackupConnectionString() throws Exception {\n return backupAddress;\n }\n });\n //rest,as meaning of getting fresh zk-connectString list.\n ExhibitorRestClient restClient = new DefaultExhibitorRestClient();\n //String restUriPath = properties.getProperty(\"host.rest.path\");\n //String period = properties.getProperty(\"host.rest.period\");\n String restUriPath = properties.getProperty(\"host.rest.path\");\n String period = properties.getProperty(\"host.rest.period\");\n Integer pollingMs = 180000; //3 min\n if (period != null) {\n pollingMs = Integer.valueOf(period);\n }\n return new ExhibitorEnsembleProvider(exhibitors, restClient, restUriPath, pollingMs, new RetryNTimes(10, 1000));\n }", "private void fetch(byte[] target) throws IOException {\n\t\tint actuallyRead=0;\n\t\tint required=target.length;\n\t\tlog.debug(\"Need to read \"+required+\" to fill buffer\");\n\t\twhile(actuallyRead<required) {\n\t\t\tactuallyRead+=fromDevice.read(target,actuallyRead,required-actuallyRead);\n\t\t\tlog.debug(\"Now read \"+actuallyRead);\n\t\t}\n\t}", "public void reload(){\n Map<String,ExchangeRateProvider> newProviders = new ConcurrentHashMap<>();\n for(ExchangeRateProvider prov : Bootstrap.getServices(ExchangeRateProvider.class)){\n newProviders.put(prov.getProviderContext().getProvider(), prov);\n }\n this.conversionProviders = newProviders;\n }", "@Override\r\n\tpublic void run() {\n while(true){\r\n \tURIResource uriResource = null;\r\n\t\t\tboolean waitAndContinue = false;\r\n\t\t\tsynchronized (this.pool) {\r\n\t\t\t\tif (this.pool.isEmpty()) {\r\n\t\t\t\t\twaitAndContinue = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\turiResource = this.pool.poll();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(waitAndContinue){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(10) ;\r\n\t\t\t\t} catch (InterruptedException 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\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(uriResource ==null){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//获取权威文档URI\r\n\t\t\tURIResource dereferenceDoc = null;\r\n\t\t\tFetch fetch = new Fetch(uriResource.getURI(),this.meta);\r\n\t\t\tdereferenceDoc = fetch.getDereferencDocument();\r\n\t\t\t//check 权威文档内容,如果符合要求,则进行存储三元组以及文档dereferencInfo;否则则删除旧版本\r\n\t\t\t//无论成功与失败都要记录文件尝试下载的记录。\r\n\t\t\tif (dereferenceDoc != null) {\r\n\t\t\t\t//!!!!!!注意这里的timestamp其实不能是当前系统的时间\r\n\t\t\t\tlong timestamp = System.currentTimeMillis();\r\n\t\t\t\tOntModel model = fetch.checkContent(dereferenceDoc);\r\n\t\t\t\tStore store = new Store();\r\n\t\t\t\ttry{\r\n\t\t\t\tif (model != null) {\r\n\t\t\t\t\t// 更新新的三元组\r\n\t\t\t\t\tstore.updateRDFDocument(dereferenceDoc, model, timestamp) ;\r\n\t\t\t\t\t//设置dereference document信息\r\n\t\t\t\t\tstore.setDereferenceInfo(dereferenceDoc.getURI(), dereferenceDoc.getURI());\r\n\t\t\t\t\tif(!uriResource.equals(dereferenceDoc)){\r\n\t\t\t\t\t\tstore.setDereferenceInfo(uriResource.getURI(), dereferenceDoc.getURI());\r\n\t\t\t\t\t\tstore.deleteRDFDocument(uriResource) ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodel.close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 删除旧版本三元组\r\n\t\t\t\t\tstore.deleteRDFDocument(dereferenceDoc) ;\r\n\t\t\t\t}\r\n\t\t\t\t//如果前面语句发生错误,那么这条语句不能执行。\r\n\t\t\t\tstore.setLastPingTime(uriResource.getURI(), timestamp) ;\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tfetch.close();\r\n\t\t\t\tstore.reset();\r\n\t\t\t}\r\n\t\t\tsynchronized(this.lockOfURIStatus){\r\n\t\t\t\tthis.busy.remove(uriResource);\r\n\t\t\t\tthis.done.add(uriResource);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\twhile (flag) {\n\t\t\t\t\n\t\t\t\tgetDoorbellData(App.address+\"CGetData.php?uid=\"+id+\"&getType=b1\");\n\t\t\t\tgetPIRData(App.address+\"CGetData.php?uid=\"+id+\"&getType=5\");\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(2*1000); //暂定延时2s\n\t\t\t\t\t\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tThread.interrupted();\n\t\t}", "private void readBytes() {\n byte[] emgBytes = new byte[EMG_BYTE_BUFFER];\n\n while(running) {\n try {\n // Wait until a complete set of data is ready on the socket. The\n while (running && emgSock.getInputStream().available() < EMG_BYTE_BUFFER) {\n Thread.sleep(50);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Read a complete group of multiplexed samples\n emgSock.getInputStream().read(emgBytes, 0, EMG_BYTE_BUFFER);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n synchronized (this) {\n // Demultiplex, parse the byte array, and add the appropriate samples to the history buffer.\n\n for (int i = 0; i < EMG_BYTE_BUFFER / 4; i++) {\n if (i % 16 == (m1.getSensorNr()-1)) {\n float f = ByteBuffer.wrap(emgBytes, 4 * i, 4).getFloat();\n emgHistory.add(f * 1000); // convert V -> mV\n } else if (i % 16 == (m2.getSensorNr()-1)) {\n float f = ByteBuffer.wrap(emgBytes, 4 * i, 4).getFloat();\n emgHistory2.add(f * 1000); // convert V -> mV\n }\n }\n }\n\n // If there is no touch zoom action in progress, update the plots with the newly acquired data.\n if (mode == NONE && running) {\n runOnUiThread(new Runnable() {\n public void run() {\n UpdatePlots();\n }\n });\n }\n }\n }", "public void consumeEnergy() {\n\t if (!world.isRemote && this.getEnergyCost() > 0 &&\n\t this.getEnergyCurrent() >= this.getEnergyCost()) {\n\t this.energyStorage.extractEnergy(this.getEnergyCost(), false);\n\t //it drained, notify client \n\t this.markDirty();\n\t }\n\t }", "com.hps.july.persistence.StorageCard getAgregate() throws java.rmi.RemoteException, javax.ejb.FinderException;", "List<Transfer> requestDownloads(Leecher leecher);", "@Override\r\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t\tLong currenttime = System.currentTimeMillis();\r\n\t\t\t\t\t\t\twhile (!bPullUpStatus) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ((System.currentTimeMillis() - currenttime) > App.WAITFORHTTPTIME) {\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}else if(App.getNewsRecviceStatus(NewsOperation.this)==false){\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUp置位成功!!\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}" ]
[ "0.56937253", "0.5617301", "0.54405445", "0.52283907", "0.5223427", "0.5164311", "0.5145316", "0.5141089", "0.5127982", "0.5109664", "0.5103669", "0.5102167", "0.5013571", "0.5001675", "0.4981413", "0.49558872", "0.49522635", "0.493596", "0.49250975", "0.49227998", "0.49064296", "0.48951623", "0.48845437", "0.48802483", "0.48673543", "0.48607525", "0.48516378", "0.48514014", "0.48288548", "0.48212984", "0.47878703", "0.47869846", "0.47841036", "0.47769335", "0.47489354", "0.47474828", "0.4723559", "0.47198033", "0.4705383", "0.46995723", "0.46897516", "0.46729854", "0.46715486", "0.4670858", "0.46646324", "0.4664515", "0.4652402", "0.4651763", "0.46505684", "0.4642263", "0.4638167", "0.46357474", "0.4612188", "0.46094403", "0.46089238", "0.46045524", "0.46042526", "0.4603507", "0.4601262", "0.45986527", "0.4595081", "0.45899126", "0.4588372", "0.4584852", "0.4580753", "0.45787388", "0.45771843", "0.45766565", "0.45765334", "0.45716146", "0.45707518", "0.45686278", "0.456797", "0.45679212", "0.45665166", "0.45656478", "0.45649582", "0.4564886", "0.45633078", "0.45587593", "0.4555671", "0.4554353", "0.45465747", "0.45276436", "0.45241615", "0.45230994", "0.45201817", "0.4517616", "0.45156687", "0.45151246", "0.45117867", "0.45114967", "0.4509534", "0.4506703", "0.4500731", "0.44890276", "0.4486926", "0.44859028", "0.44807947", "0.44772634" ]
0.6153537
0
Fetches EPG immediately if current EPG data are outdated, i.e., not successfully updated by routine fetching service due to various reasons.
@MainThread void fetchImmediatelyIfNeeded();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void retryRequired(){\n startFetching(query);\n }", "private boolean isFetchNeeded() {\n return true;\n }", "private void fetchData() {\r\n if (fetchDialogDataInBackground != null && fetchDialogDataInBackground.getStatus() != AsyncTask.Status.FINISHED)\r\n fetchDialogDataInBackground.cancel(true);\r\n fetchDialogDataInBackground = new FetchDialogDataInBackground();\r\n fetchDialogDataInBackground.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\r\n }", "private void loadDataFromErp(boolean forceRefesh) {\r\n\t\tfireEvent(new ProcessingEvent());\r\n\t\tloadGoodStanding();\r\n\t\t/*\r\n\t\t * memberDelegate.withCallback(new AbstractAsyncCallback<Boolean>() {\r\n\t\t * \r\n\t\t * @Override public void onSuccess(Boolean hasLoaded) { fireEvent(new\r\n\t\t * ProcessingCompletedEvent()); loadData(getApplicationRefId());\r\n\t\t * getView().setLastUpdateToNow(); if (!hasLoaded) {\r\n\t\t * Window.alert(\"There was a problem loading ERP Data\"); } else {\r\n\t\t * loadGoodStanding(); } } }).getDataFromErp(getMemberId(),\r\n\t\t * forceRefesh);\r\n\t\t */\r\n\r\n\t}", "protected void updateLoading()\n {\n scheduled = false;\n\n if (!valid)\n return;\n\n while (loading.size() < numConnections) {\n updateActiveStats();\n\n final TileInfo tile;\n synchronized (toLoad) {\n if (toLoad.isEmpty())\n break;\n tile = toLoad.last();\n if (tile != null) {\n toLoad.remove(tile);\n }\n }\n if (tile == null) {\n break;\n }\n\n tile.state = TileInfoState.Loading;\n synchronized (loading) {\n if (!loading.add(tile)) {\n Log.w(\"RemoteTileFetcher\", \"Tile already loading: \" + tile.toString());\n }\n }\n\n if (debugMode)\n Log.d(\"RemoteTileFetcher\",\"Starting load of request: \" + tile.fetchInfo.urlReq);\n\n // Set up the fetching task\n tile.task = client.newCall(tile.fetchInfo.urlReq);\n\n if (tile.isLocal) {\n // Try reading the data in the background\n new CacheTask(this,tile).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,(Void)null);\n } else {\n startFetch(tile);\n }\n }\n\n updateActiveStats();\n }", "public void fetchData()\n {\n FetchingDataTask fetchingDataTask = new FetchingDataTask();\n fetchingDataTask.execute();\n }", "public interface EpgFetcher {\n\n /**\n * Starts the routine service of EPG fetching. It use {@link JobScheduler} to schedule the EPG\n * fetching routine. The EPG fetching routine will be started roughly every 4 hours, unless the\n * channel scanning of tuner input is started.\n */\n @MainThread\n void startRoutineService();\n\n /**\n * Fetches EPG immediately if current EPG data are out-dated, i.e., not successfully updated by\n * routine fetching service due to various reasons.\n */\n @MainThread\n void fetchImmediatelyIfNeeded();\n\n /** Fetches EPG immediately. */\n @MainThread\n void fetchImmediately();\n\n /** Notifies EPG fetch service that channel scanning is started. */\n @MainThread\n void onChannelScanStarted();\n\n /** Notifies EPG fetch service that channel scanning is finished. */\n @MainThread\n void onChannelScanFinished();\n\n @MainThread\n boolean executeFetchTaskIfPossible(JobService jobService, JobParameters params);\n\n @MainThread\n void stopFetchingJob();\n}", "private void autoRefreshStaleMailbox() {\n if (!mIsRefreshable) {\n // Not refreshable (special box such as drafts, or magic boxes)\n return;\n }\n if (!mRefreshManager.isMailboxStale(getMailboxId())) {\n return;\n }\n onRefresh(false);\n }", "public void fetchCalls() {\n cancelFetch();\n invalidate();\n fetchNewCalls();\n fetchOldCalls();\n }", "@Override\n public void onRefresh() {\n load_remote_data();\n }", "@Override\n public void onRefresh() {\n fetchShopAsync(0);\n }", "public abstract void fetch();", "private Callable<List<Price>> fetchDataIfNeeded(Calendar currentDate) {\n return () -> {\n List<Price> fetchedList = Collections.emptyList();\n\n Calendar date = repository.getLastFetchedDate();\n if (date == null) {\n // need to fetch last few days as data for all period is sampled once per two days\n fetchedList = Observable.zip(repository.fetchAllPrices(), repository.fetchPrices(DAYS_TO_FETCH),\n (list1, list2) -> mergeAndSort(list1, list2))\n .blockingFirst();\n } else {\n int dayDifference = calendarUtils.calculateDifferenceInDays(currentDate, date);\n if (dayDifference > 0) {\n fetchedList = repository.fetchPrices(dayDifference).blockingFirst();\n }\n }\n\n return fetchedList;\n };\n }", "@Override\n protected void forceRefresh() {\n if (getEntity() != null) {\n super.forceRefresh();\n }\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(Vars.onAdd){\n\t\t\t//createJsonRefresh(shared.getSharedValue(\"mLASTTIMESTAMP\").toString());\n\t\t\tif(shared.getSharedValue(\"mLASTTIMESTAMP\").toString().equalsIgnoreCase(\"N/A\")){\n\t\t\t\tif (comman.isNetworkAvailable(context)) {\n\t\t\t\t\tcreateJsonRefresh(timeStamp);\n\n\t\t\t\t}else{\n\t\t\t\t\tonLoad();\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\tif (comman.isNetworkAvailable(context)) {\n\t\t\t\t\tcreateJsonRefresh(shared.getSharedValue(\"mLASTTIMESTAMP\").toString());\n\t\t\t\t}else{\n\t\t\t\t\tonLoad();\n\t\t\t\t}\n\t\t\t}\n\t\t\tVars.onAdd= false;\n\t\t}\n\t}", "public void refresh()\n\t{\n\t\t\tConnectivityManager connMgr = (ConnectivityManager)\n\t\t getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\t\t if (networkInfo != null && networkInfo.isConnected()) {\n\t\t // fetch data\n\t\t \tDownloadXmlTask task = new DownloadXmlTask();\n\t\t task.execute(\"http://api.androidhive.info/pizza/?format=xml\");\n\t\t \t\n\t\t\t\t\n\t\t } else {\n\t\t // display error\n\t\t \tLog.v(\"Network\", \"Error: Network is not available\");\n\t\t\t \n\t\t }\n\t}", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\t new GetDataTask().execute();\n\t\t\t}", "public void doLazyDataFetch()\n {\n if (m_fetchedRowCount == rowCount)\n m_fetchedRowCount = 0;\n else\n m_fetchedRowCount++;\n \n for (Enumeration e = m_dataDirectorListeners.elements(); e.hasMoreElements(); )\n {\n DataDirectorListener listener = (DataDirectorListener)e.nextElement();\n listener.waitDataAvailable(new WaitDataAvailableEvent(this));\n }\n }", "@Override\n protected void onStartLoading() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n if (mResult != null) // If we currently have a result available, deliver it immediately.\n deliverResult(mResult);\n\n if (isReload() || mResult == null)\n forceLoad();\n }\n });\n }", "protected void ensureResultsAreFetched(int last) {\n\t\twhile(last > cacheStatus) {\n\t\t\tfetchNextBlock();\n\t\t}\n\t}", "@Override\r\n\t\tpublic boolean isRefreshNeeded() {\n\t\t\treturn false;\r\n\t\t}", "@Override\r\n\t\tpublic boolean isRefreshNeeded() {\n\t\t\treturn false;\r\n\t\t}", "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }", "private void fetchOldCalls() {\n fetchCalls(QUERY_OLD_CALLS_TOKEN, false);\n }", "@Override\r\n\t\t\t\t\tpublic boolean isRefreshNeeded() {\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic boolean isRefreshNeeded() {\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "public void FetchOutfit(double clo_value_request) {\n mCloRequest = clo_value_request;\n mHasCloRequest = true;\n if (mTasksLeft==0){\n onAllTasksCompleted();\n }\n }", "@Override\n public void onRefresh() {\n updateListings();\n new GetDataTask().execute();\n }", "@Override\n public void onRefresh() {\n if (isNetworkAvailable2()) {\n //Reloading the latest kernel and rom.\n ArrayList<String> fileArray = new ArrayList<>();\n srl.setRefreshing(true);\n getNXVersionFromURL();\n soldierRomCheck(fileArray);\n } else {\n //If there is no Internet Connection, sending you back to InternetCheck activity.\n Intent a = new Intent(MainActivity.this, InternetCheck.class);\n startActivity(a);\n }\n }", "private void pullBikes() {\n try {\n if (!connected) {\n this.reconnectSupplier();\n }\n\n synchronized (this.writeLock) {\n if (!this.dataVersion.equals(supplier.getDataVersion())) {\n DataPatch<ArrayList<Bike>> dataPatch = supplier.getNewBikes(dataVersion);\n for (Bike bike : dataPatch.getData()) {\n cache.put(bike.getItemNumber(), bike);\n }\n dataVersion = dataPatch.getDataVersion();\n }\n }\n } catch (RemoteException e) {\n System.out.println(\"Cannot load new bikes from supplier, keep using cached data\");\n e.printStackTrace();\n connected = false; // connection lost so remove reference to supplier, reacquire later\n }\n }", "private synchronized void onUpdate() {\n if (pollingJob == null || pollingJob.isCancelled()) {\n int refresh;\n\n try {\n refresh = getConfig().as(OpenSprinklerConfig.class).refresh;\n } catch (Exception exp) {\n refresh = this.refreshInterval;\n }\n\n pollingJob = scheduler.scheduleWithFixedDelay(refreshService, DEFAULT_WAIT_BEFORE_INITIAL_REFRESH, refresh,\n TimeUnit.SECONDS);\n }\n }", "@Override\n public void run() {\n if (checkParameters()) {\n notifyError();\n } else {\n ADRepository repository = new ADRepository(schema);\n\n List<ADEntity> entities = repository.fetchQuery(buildQuery(), getOrder());\n nofityEntitiesLoaded(processResult(entities));\n }\n }", "@Override\r\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t\tLong currenttime = System.currentTimeMillis();\r\n\t\t\t\t\t\t\twhile (!bPullUpStatus) {\r\n\t\t\t\t\t\t\t\tif ((System.currentTimeMillis() - currenttime) > App.WAITFORHTTPTIME) {\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}else if(App.getNewsRecviceStatus(NewsOperation.this)==false){\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUp置位成功!!\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t\tLong currenttime = System.currentTimeMillis();\r\n\t\t\t\t\t\t\twhile (!bPullUpStatus) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ((System.currentTimeMillis() - currenttime) > App.WAITFORHTTPTIME) {\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}else if(App.getNewsRecviceStatus(NewsOperation.this)==false){\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUp置位成功!!\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "@Override\n public void onRefresh() {\n category = searchSpinner.getSelectedItem().toString();\n if(connection.isOnline(MainActivity.this)){\n swipeContainer.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n new LoadMeetsAsync().execute();\n }\n else {\n swipeContainer.setRefreshing(false);\n }\n }", "private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }", "public void fetcherLesEo() {\r\n\t\r\n\t// Commence par fetcher les params ... et si Ok, fetche les EO !\r\n\tif (recupererValParams() && valParams != null) {\r\n\r\n\t NSArray bindings = new NSArray(valParams);\r\n\t EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat(chaineQualif, bindings);\r\n\t EOFetchSpecification fetchSpec = new EOFetchSpecification(nomEntite,qualifier, eoSortOrderings);\r\n\r\n\t fetchSpec.setRefreshesRefetchedObjects(true);\r\n\r\n\t NSArray res = null;\r\n\t res = monEc.objectsWithFetchSpecification(fetchSpec);\r\n\t listeEOFetches = res;\r\n\t \r\n\t // si on demande � ce qu'� l'init il n'y ait pas de ligne s�lectionn�e par d�faut, alors pas d'Item choisi (en cascade)\r\n\t if (noSelectionPossible) setItemChoisi(null);\r\n\t else {\r\n\t\tif (listeEOFetches != null && listeEOFetches.count() > 0)\r\n\t\t setItemChoisi((EOGenericRecord)listeEOFetches.objectAtIndex(0));\r\n\t\telse setItemChoisi(null);\r\n\t }\r\n\t}\r\n\t// les parametres n'ont pu être récupérés : vider le popUp...\r\n\telse {\r\n listeEOFetches = null;\r\n // pas d'Item choisi (en cascade)\r\n setItemChoisi(null);\r\n\t}\r\n }", "@Override\n public void onRefresh() {\n // INIT: fetch recipes conforming to query\n // recipeImport task populates the list on completion\n if (DEV) {\n a.clear();\n a.add(new Recipe(a, \"Recipe API turned off\", 0));\n swipe.setRefreshing(false);\n } else {\n new recipeImport().execute(query);\n }\n }", "private boolean _autoGet() throws SessionException\n {\n if (this._argTable.get(CMD.PUSH) != null)\n return this._autoGetPush();\n else if (this._argTable.get(CMD.QUERY) != null)\n return this._autoGetQuery();\n else \n return this._autoGetPull();\n }", "protected Void doInBackground(String... params) {\n notifyLocalPlayerReady();\n\n while (connectionActive) {\n\n if (!remotePlayerReady){\n\n // Ask the server if the remote player is ready yet.\n checkRemotePlayerReady();\n\n }else {\n\n if (unlimitedCollection || shouldUpdate) {\n\n updates++;\n updateComplete = false;\n\n sendLocalParamData();\n retrieveRemoteParamData();\n sendLocalEventData();\n retrieveRemoteEventData();\n\n shouldUpdate = false;\n updateComplete = true;\n hasNewData = true;\n\n }\n\n }\n\n }\n\n return null;\n\n }", "@Override\n public void refreshData() {\n\n if (InternetConnection.checkConnection(context)) {\n ApiService apiService = RetroClient.getApiService();\n Call<String> call = apiService.getFactdata();\n Log.e(TAG, \"request ongetData url :\" + call.request().url());\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n Log.e(TAG, \"response : ongetData :\" + response.body());\n parseResponse(response.body());\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Log.e(TAG, \"onFailure ongetData : \" + t.getMessage());\n }\n });\n } else {\n factDataView.displayMessage(context.getString(R.string.nonetwork), false);\n }\n }", "@Override\n public void onRefresh() {\n isNetworkAvailable(connectionHandler, 5000);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n String initializedKey = getActivity().getString(R.string.pref_stocks_initialized_key);\n boolean initialized = prefs.getBoolean(initializedKey, false);\n\n QuoteSyncJob.syncImmediately(getActivity());\n\n if (!mConnected && adapter.getItemCount() == 0) {\n swipeRefreshLayout.setRefreshing(false);\n error.setText(getString(R.string.error_no_network));\n error.setVisibility(View.VISIBLE);\n } else if (!mConnected) {\n swipeRefreshLayout.setRefreshing(false);\n Toast.makeText(getActivity(), R.string.toast_no_connectivity, Toast.LENGTH_LONG).show();\n } else if (PrefUtils.getStocks(getActivity()).size() == 0) {\n swipeRefreshLayout.setRefreshing(false);\n error.setText(getString(R.string.error_no_stocks));\n error.setVisibility(View.VISIBLE);\n } else {\n error.setVisibility(View.GONE);\n }\n }", "private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name of the stock.\r\n // MAXWAIT is 20 minutes, since we are 1 second loops.\r\n // 60 loops is 1 minute and 20 of those is 20 minutes\r\n final int MAXWAIT = 60 * 20;\r\n int counter = 0;\r\n do\r\n {\r\n try\r\n {\r\n Thread.currentThread().sleep(ONE_SECOND);\r\n }\r\n catch (InterruptedException exc)\r\n {\r\n // Do Nothing - Try again\r\n }\r\n if (counter++ > MAXWAIT)\r\n { // Abort the Lookup for historic data\r\n this.cancel();\r\n return -1;\r\n }\r\n }\r\n while (\"\".equals(sd.getSymbol().getDataSz().trim()));\r\n\r\n return 0;\r\n }", "@Override\r\n\r\n\tpublic E pollFirst() {\n\t\treturn poll();\r\n\t}", "private void refreshXML() {\n\t\t// Build a new thread to handle the request, since fetching files from\n\t\t// a remove server shouldn't block screen drawing.\n\t\tToast.makeText(\n\t\t\t\tthis,\n\t\t\t\tgetString(R.string.xml_requested_from) + \": \"\n\t\t\t\t\t\t+ PreferencesManager.getXmlUri(this), Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t\t// We use a separate runnable class instead of an anonymous inner class\n\t\t// so that when the async request is completed, it can signal the viewer\n\t\t// to toast.\n\t\tFetchThread ft = new FetchThread(this);\n\t\tft.start();\n\t}", "@Override\r\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t\tLong currenttime = System.currentTimeMillis();\r\n\t\t\t\t\t\t\twhile (!bPullUpStatus) {\r\n\t\t\t\t\t\t\t\tif ((System.currentTimeMillis() - currenttime) > App.WAITFORHTTPTIME+5000) {\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUp置位成功!!\");\r\n\t\t\t\t\t\t\tbPullUpStatus = false;\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "public void onFetchCompleted () {}", "@Override public void askPressionAsync() throws MeteoServiceException\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tcomConnexion.askPressionAsync();\n\t\t\t}\n\t\tcatch (Exception e)\n\t\t\t{\n\t\t\tthrow new MeteoServiceException(\"[MeteoService] : askPressionAsync failure\", e);\n\t\t\t}\n\t\t}", "@Override\r\n\t\t\tpublic void onRefresh() {\n\t\t\t\tgetLichHoc();\r\n\t\t\t}", "public void fetchDataStock(){\n// stocks.add(new Stock(1,\"bitcoin\",new Double(7000),new Double(7500),new Double(5),null));\n\n stockFetcher = new StockAsyncTask ();\n stockFetcher.execute();\n\n\n // TODO:\n\n refresh(5000);\n\n\n }", "void fetchNudges() {\n Log.d(LOG_TAG, \"Fetch nudges started\");\n mExecutors.networkIO().execute(() -> {\n try {\n\n if (mNudgeAdapter != null) {\n\n if (mUserRef != null) {\n //Fetch more data\n if (mNudgeAdapter.getItemCount() != 0) {\n DocumentSnapshot snapshot = mFirestoreAdapter.getSnapshot(mFirestoreAdapter.getItemCount() - 1);\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit)\n .startAfter(snapshot);\n\n } else {\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit);\n\n }\n } else Log.d(LOG_TAG, \"fetchNudges, user reference is null \");\n\n Log.d(LOG_TAG, \"Fetch Nudges, setting query\");\n mNudgeAdapter.setQuery(mNudgesQuery);\n }\n } catch (Exception e) {\n // Server probably invalid\n e.printStackTrace();\n }\n });\n }", "private void getFlowData() {\n\t\tdbService.getCacheLastUpdated(Tables.STATIONS, new ListCallback<GenericRow>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\tString currentMap = localStorage.getItem(\"KEY_CURRENT_MAP\");\n\t\t\t\tboolean shouldUpdate = true;\n\n\t\t\t\tif (!result.isEmpty()) {\n\t\t\t\t\tdouble now = System.currentTimeMillis();\n\t\t\t\t\tdouble lastUpdated = result.get(0).getDouble(CachesColumns.CACHE_LAST_UPDATED);\n\t\t\t\t\tshouldUpdate = (Math.abs(now - lastUpdated) > (3 * 60000)); // Refresh every 3 minutes.\n\t\t\t\t}\n\n\t\t\t view.showProgressIndicator();\n\t\t\t \n\t\t\t if (!currentMap.equalsIgnoreCase(\"seattle\")) {\n\t\t\t \tshouldUpdate = true;\n\t\t\t\t\tlocalStorage.setItem(\"KEY_CURRENT_MAP\", \"seattle\");\n\t\t\t }\n\t\t\t \n\t\t\t if (shouldUpdate) {\n\t\t\t \ttry {\n\t\t\t \t String url = Consts.HOST_URL + \"/api/flowdata/MinuteDataNW\";\n\t\t\t \t JsonpRequestBuilder jsonp = new JsonpRequestBuilder();\n\t\t\t \t jsonp.setTimeout(30000); // 30 seconds\n\t\t\t \t jsonp.requestObject(url, new AsyncCallback<FlowDataFeed>() {\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t \t\t\t\tview.hideProgressIndicator();\n\t\t\t \t\t\t\tGWT.log(\"Failure calling traffic flow api.\");\n\t\t\t \t\t\t}\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onSuccess(FlowDataFeed result) {\n\t\t\t \t\t\t\tstationItems.clear();\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\tif (result.getFlowData() != null) {\n\t\t\t \t\t\t\t\tint numStations = result.getFlowData().getStations().length();\n\t\t\t \t\t\t\t\tString timestamp = result.getFlowData().getTimestamp();\n\t\t\t \t\t\t\t\ttimestamp = timestamp.replaceAll(\"PST|PDT\", \"\");\n\t\t\t \t\t\t\t\tDate date = parseDateFormat.parse(timestamp);\n\t\t\t \t\t\t\t\tString lastUpdated = displayDateFormat.format(date);\n\t\t\t \t\t\t\t\tlocalStorage.setItem(\"KEY_LAST_UPDATED\", lastUpdated);\n\t\t\t \t\t\t\t\tStationItem item;\n\t\t\t \t\t\t\t\t\n\t\t\t \t\t\t\t\tfor (int i = 0; i < numStations; i++) {\n\t\t\t \t\t\t\t\t\tString stationId = result.getFlowData().getStations().get(i).getId();\n\t\t\t \t\t\t\t\t\tString status = result.getFlowData().getStations().get(i).getStat();\n\t\t\t \t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\tif (stationItemsMap.containsKey(stationId) && status.equalsIgnoreCase(\"good\")) {\n\t\t\t\t \t\t\t\t\t\titem = new StationItem();\n\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t \t\t\t\t\t\titem.setId(stationId);\n\t\t\t \t\t\t\t\t\t\titem.setVolume(result.getFlowData().getStations().get(i).getVol());\n\t\t\t \t\t\t\t\t\t\titem.setSpeed(result.getFlowData().getStations().get(i).getSpd());\n\t\t\t \t\t\t\t\t\t\titem.setOccupancy(result.getFlowData().getStations().get(i).getOcc());\n\t\t\t \t\t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\t\tstationItems.add(item);\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\t\n\t\t\t \t\t\t\t// Purge existing stations covered by incoming data\n\t\t\t \t\t\t\tdbService.deleteStations(new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t// Bulk insert all the new stations and data.\n\t\t\t\t\t\t\t\t\t\tdbService.insertStations(stationItems, new RowIdListCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\tview.hideProgressIndicator();\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<Integer> rowIds) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Update the cache table with the time we did the update\n\t\t\t\t\t\t\t\t\t\t\t\tList<CacheItem> cacheItems = new ArrayList<CacheItem>();\n\t\t\t\t\t\t\t\t\t\t\t\tcacheItems.add(new CacheItem(Tables.STATIONS, System.currentTimeMillis()));\n\t\t\t\t\t\t\t\t\t\t\t\tdbService.updateCachesTable(cacheItems, new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all the stations and data just inserted.\n\t\t\t\t\t\t\t\t\t\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetStations(result);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t \t\t});\n\n\t\t\t \t} catch (Exception e) {\n\t\t\t \t\t// TODO Do something with the exception\n\t\t\t \t}\n\t\t\t } else {\n\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\tgetStations(result);\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 }\n\t\t\t}\n\t\t});\n\t}", "public NetworkEvent fetch() throws InterruptedException {\n\t\treturn eventQueue.take();\n\t}", "public CountDownLatch fetchRepo(PitchParams pp) {\n\n final String grmKey = GitRepoModel.genKey(pp);\n log.debug(\"fetchRepo: pp={}\", pp);\n CountDownLatch freshLatch = new CountDownLatch(1);\n CountDownLatch activeLatch =\n repoLatchMap.putIfAbsent(grmKey, freshLatch);\n\n if (activeLatch != null) {\n\n /*\n * Non-null activeLatch implies a fetchRepo() operation\n * is already in progress for this /{user}/{repo}. So\n * activeLatch so caller can block until operation completes.\n */\n log.debug(\"fetchRepo: pp={}, already in progress, \" +\n \"returning existing activeLatch={}\", pp, activeLatch);\n return activeLatch;\n\n } else {\n\n GRS grs = grsManager.get(pp);\n final GRSService grsService = grsManager.getService(grs);\n String apiCall = grsService.repo(pp);\n\n log.debug(\"fetchRepo: apiCall={}\", apiCall);\n final long start = System.currentTimeMillis();\n\n WSRequest apiRequest = wsClient.url(apiCall);\n\n grs.getHeaders().forEach((k,v) -> {\n apiRequest.setHeader(k, v);\n });\n\n CompletableFuture<WSResponse> apiFuture =\n apiRequest.get().toCompletableFuture();\n\n CompletableFuture<GitRepoModel> rmFuture =\n apiFuture.thenApplyAsync(apiResp -> {\n\n log.debug(\"fetchRepo: pp={}, fetch meta time-taken={}\",\n pp, (System.currentTimeMillis() - start));\n\n log.info(\"{}: API Rate Limit Status [ {}, {} ]\",\n grs.getName(),\n apiResp.getHeader(API_RATE_LIMIT),\n apiResp.getHeader(API_RATE_LIMIT_REMAINING));\n\n try {\n\n if (apiResp.getStatus() == HTTP_OK) {\n\n try {\n\n JsonNode json = apiResp.asJson();\n GitRepoModel grm = grsService.model(pp, json);\n\n /*\n * Update pitchCache with new GitRepoModel\n * generated using GitHub API response data.\n */\n pitchCache.set(grm.key(), grm, cacheTimeout.grm(pp));\n\n } catch (Exception ex) {\n /*\n * Prevent any runtime errors, such as JSON parsing,\n * from propogating to the front end.\n */\n log.warn(\"fetchRepo: pp={}, unexpected ex={}\", pp, ex);\n }\n\n } else {\n\n log.debug(\"fetchRepo: pp={}, fail status={}\",\n pp, apiResp.getStatus());\n\n try {\n\n String remainingHdr =\n apiResp.getHeader(API_RATE_LIMIT_REMAINING);\n int rateLimitRemaining =\n Integer.parseInt(remainingHdr);\n\n if (rateLimitRemaining <= 0) {\n log.warn(\"WARNING! {} API rate limit exceeded.\", grs.getName());\n }\n\n } catch (Exception rlex) {\n }\n }\n\n } catch (Exception rex) {\n log.warn(\"fetchRepo: pp={}, unexpected runtime ex={}\", pp, rex);\n }\n\n /*\n * Current operation completed, so remove latch associated\n * with operation from repoLatchMap to permit future operations\n * on this /{user}/{repo}.\n */\n releaseCountDownLatch(repoLatchMap, grmKey);\n\n /*\n * Operation completed, valid result cached, no return required.\n */\n return null;\n\n }, backEndThreads.POOL)\n .handle((result, error) -> {\n\n if (error != null) {\n\n log.warn(\"fetchRepo: pp={}, fetch error={}\", pp, error);\n releaseCountDownLatch(repoLatchMap, grmKey);\n }\n\n return null;\n });\n\n return freshLatch;\n }\n }", "private void refreshEvents() {\r\n\t\ttry {\r\n\t\t\tif (SimpleSetting.ShowAlerts.getBoolean(true)) {\r\n\t\t\t\tloadUpcomingEvents();\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tRTeamLog.i(SUFFIX, \"Exception while refreshing events: %s\", e.getMessage());\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onLowMemory() {\n\t\tif(mImageFetcher != null){\n\t\t\tmImageFetcher.setPauseWork(true);\n\t\t\tmImageFetcher.setExitTasksEarly(true);\n\t\t\tmImageFetcher.flushCache();\n\t\t\tmImageFetcher.closeCache();\n\t\t}\n\t\tsuper.onLowMemory();\n\t}", "private RetrieveResult waitForRetrieveCompletion(AsyncResult asyncResult) throws Exception {\n int poll = 0;\n long waitTimeMilliSecs = ONE_SECOND;\n String asyncResultId = asyncResult.getId();\n RetrieveResult result = null;\n do {\n Thread.sleep(waitTimeMilliSecs);\n // Double the wait time for the next iteration\n waitTimeMilliSecs *= 2;\n if (poll++ > MAX_NUM_POLL_REQUESTS) {\n throw new Exception(\"Request timed out. If this is a large set \" +\n \"of metadata components, check that the time allowed \" +\n \"by MAX_NUM_POLL_REQUESTS is sufficient.\");\n }\n result = metadataConnection.checkRetrieveStatus(\n asyncResultId, true);\n System.out.println(this.username+ \". >> Retrieve Status: \" + result.getStatus());\n } while (!result.isDone());\n\n return result;\n }", "public void fetchEvents (RJGUIController.XferCatalogMod xfer) {\n\n\t\tSystem.out.println(\"Fetching Events\");\n\t\tcur_mainshock = null;\n\n\t\t// Will be fetching from Comcat\n\n\t\thas_fetched_catalog = true;\n\n\t\t// See if the event ID is an alias, and change it if so\n\n\t\tString xlatid = GUIEventAlias.query_alias_dict (xfer.x_eventIDParam);\n\t\tif (xlatid != null) {\n\t\t\tSystem.out.println(\"Translating Event ID: \" + xfer.x_eventIDParam + \" -> \" + xlatid);\n\t\t\txfer.modify_eventIDParam(xlatid);\n\t\t}\n\n\t\t// Fetch mainshock into our data structures\n\t\t\n\t\tString eventID = xfer.x_eventIDParam;\n\t\tfcmain = new ForecastMainshock();\n\t\tfcmain.setup_mainshock_poll (eventID);\n\t\tPreconditions.checkState(fcmain.mainshock_avail, \"Event not found: %s\", eventID);\n\n\t\tcur_mainshock = fcmain.get_eqk_rupture();\n\n\t\t// Finish setting up the mainshock\n\n\t\tsetup_for_mainshock (xfer);\n\n\t\t// Make the search region\n\n\t\tsetup_search_region (xfer);\n\n\t\t// Get the aftershocks\n\n\t\tComcatOAFAccessor accessor = new ComcatOAFAccessor();\n\n\t\tcur_aftershocks = accessor.fetchAftershocks (\n\t\t\tcur_mainshock,\n\t\t\tfetch_fcparams.min_days,\n\t\t\tfetch_fcparams.max_days,\n\t\t\tfetch_fcparams.min_depth,\n\t\t\tfetch_fcparams.max_depth,\n\t\t\tfetch_fcparams.aftershock_search_region,\n\t\t\tfetch_fcparams.aftershock_search_region.getPlotWrap(),\n\t\t\tfetch_fcparams.min_mag\n\t\t);\n\n\t\t// Perform post-fetch actions\n\n\t\tpostFetchActions (xfer);\n\n\t\treturn;\n\t}", "@Override\n\tpublic void onLowMemory() {\n\t\tif (mImageFetcher != null) {\n\t\t\tmImageFetcher.setPauseWork(true);\n\t\t\tmImageFetcher.setExitTasksEarly(true);\n\t\t\tmImageFetcher.flushCache();\n\t\t\tmImageFetcher.closeCache();\n\t\t}\n\t\tsuper.onLowMemory();\n\t}", "@Override\n public void run() {\n Node serverValue = serverSyncTree.getServerValue(query.getSpec());\n if (serverValue != null) {\n source.setResult(\n InternalHelpers.createDataSnapshot(\n query.getRef(), IndexedNode.from(serverValue)));\n return;\n }\n serverSyncTree.setQueryActive(query.getSpec());\n final DataSnapshot persisted = serverSyncTree.persistenceServerCache(query);\n if (persisted.exists()) {\n // Prefer the locally persisted value if the server is not responsive.\n scheduleDelayed(() -> source.trySetResult(persisted), GET_TIMEOUT_MS);\n }\n connection\n .get(query.getPath().asList(), query.getSpec().getParams().getWireProtocolParams())\n .addOnCompleteListener(\n ((DefaultRunLoop) ctx.getRunLoop()).getExecutorService(),\n (@NonNull Task<Object> task) -> {\n if (source.getTask().isComplete()) {\n return;\n }\n if (!task.isSuccessful()) {\n if (persisted.exists()) {\n source.setResult(persisted);\n } else {\n source.setException(Objects.requireNonNull(task.getException()));\n }\n } else {\n /*\n * We need to replicate the behavior that occurs when running `once()`. In other words,\n * we need to create a new eventRegistration, register it with a view and then\n * overwrite the data at that location, and then remove the view.\n */\n Node serverNode = NodeUtilities.NodeFromJSON(task.getResult());\n QuerySpec spec = query.getSpec();\n // EventRegistrations require a listener to be attached, so a dummy\n // ValueEventListener was created.\n keepSynced(spec, /*keep=*/ true, /*skipDedup=*/ true);\n List<? extends Event> events;\n if (spec.loadsAllData()) {\n events = serverSyncTree.applyServerOverwrite(spec.getPath(), serverNode);\n } else {\n events =\n serverSyncTree.applyTaggedQueryOverwrite(\n spec.getPath(),\n serverNode,\n getServerSyncTree().tagForQuery(spec));\n }\n repo.postEvents(\n events); // to ensure that other listeners end up getting their cached\n // events.\n source.setResult(\n InternalHelpers.createDataSnapshot(\n query.getRef(),\n IndexedNode.from(serverNode, query.getSpec().getIndex())));\n keepSynced(spec, /*keep=*/ false, /*skipDedup=*/ true);\n }\n });\n }", "public boolean delayedReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_DELAYED];\n\t\t}", "public void load2() throws Exception {\n String query = \"select * from catalog_snapshot where item_id = \" + item_id + \" and facility_id = '\" + facility_id + \"'\";\n query += \" and fac_item_id = '\" + this.fac_item_id + \"'\";\n DBResultSet dbrs = null;\n ResultSet rs = null;\n try {\n dbrs = db.doQuery(query);\n rs = dbrs.getResultSet();\n if (rs.next()) {\n setItemId( (int) rs.getInt(\"ITEM_ID\"));\n setFacItemId(rs.getString(\"FAC_ITEM_ID\"));\n setMaterialDesc(rs.getString(\"MATERIAL_DESC\"));\n setGrade(rs.getString(\"GRADE\"));\n setMfgDesc(rs.getString(\"MFG_DESC\"));\n setPartSize( (float) rs.getFloat(\"PART_SIZE\"));\n setSizeUnit(rs.getString(\"SIZE_UNIT\"));\n setPkgStyle(rs.getString(\"PKG_STYLE\"));\n setType(rs.getString(\"TYPE\"));\n setPrice(BothHelpObjs.makeBlankFromNull(rs.getString(\"PRICE\")));\n setShelfLife( (float) rs.getFloat(\"SHELF_LIFE\"));\n setShelfLifeUnit(rs.getString(\"SHELF_LIFE_UNIT\"));\n setUseage(rs.getString(\"USEAGE\"));\n setUseageUnit(rs.getString(\"USEAGE_UNIT\"));\n setApprovalStatus(rs.getString(\"APPROVAL_STATUS\"));\n setPersonnelId( (int) rs.getInt(\"PERSONNEL_ID\"));\n setUserGroupId(rs.getString(\"USER_GROUP_ID\"));\n setApplication(rs.getString(\"APPLICATION\"));\n setFacilityId(rs.getString(\"FACILITY_ID\"));\n setMsdsOn(rs.getString(\"MSDS_ON_LINE\"));\n setSpecOn(rs.getString(\"SPEC_ON_LINE\"));\n setMatId( (int) rs.getInt(\"MATERIAL_ID\"));\n setSpecId(rs.getString(\"SPEC_ID\"));\n setMfgPartNum(rs.getString(\"MFG_PART_NO\"));\n\n //trong 3-27-01\n setCaseQty(BothHelpObjs.makeZeroFromNull(rs.getString(\"CASE_QTY\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n HelpObjs.monitor(1,\n \"Error object(\" + this.getClass().getName() + \"): \" + e.getMessage(), null);\n throw e;\n } finally {\n dbrs.close();\n }\n return;\n }", "public void onStartLoading() {\n Cursor cursor = this.mCursor;\n if (cursor != null) {\n deliverResult(cursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "void onFetchDataStarted();", "private void exeRefresh()\n\t{\n\t this.setCursor(cl_dat.M_curWTSTS_pbst);\n\t\tgetDSPMSG(\"Before\");\n\t\tcl_dat.M_flgLCUPD_pbst = true;\n\t\tsetMSG(\"Decreasing Stock Master\",'N');\n\t\tdecSTMST();\n\t\tsetMSG(\"Updating Stock Master\",'N');\n\t\texeSTMST();\n\t\tupdCDTRN(\"D\"+cl_dat.M_strCMPCD_pbst,\"FGXXRCT\");\t\n\t\tupdCDTRN(\"D\"+cl_dat.M_strCMPCD_pbst,\"FGXXISS\");\n\t\t/*if(chkREFRCT.isSelected())\n\t\t{\n\t\t\tsetMSG(\"Refreshing Receipt Masters.\",'N');\n\t\t\t\n\t\t}\n\t\tif(chkREFISS.isSelected())\n\t\t{\n\t\t\tsetMSG(\"Refreshing Issue Masters.\",'N');\n\t\t\t\n\t\t}*/\n\t\tgetDSPMSG(\"After\");\n\t\tif(cl_dat.M_flgLCUPD_pbst)\n\t\t\tsetMSG(\"Data refreshed successfully\",'N');\n\t\telse\n\t\t\tsetMSG(\"Data not refreshed successfully\",'E');\n\t\tthis.setCursor(cl_dat.M_curDFSTS_pbst);\n\t\n\t}", "@Override\r\n\tpublic E poll() {\n\t\treturn null;\r\n\t}", "protected void checkUpdate() {\n \t\t// only update from remote server every so often.\n \t\tif ( ( System.currentTimeMillis() - lastUpdated ) > refreshInterval ) return;\n \t\t\n \t\tClusterTask task = getSessionUpdateTask();\n \t\tObject o = CacheFactory.doSynchronousClusterTask( task, this.nodeId );\n \t\tthis.copy( (Session) o );\n \t\t\n \t\tlastUpdated = System.currentTimeMillis();\n \t}", "public void refresh() {\n\n // Show message if theNews are empty\n if (this.theNews.getValue() == null || this.theNews.getValue().size() == 0) {\n log.warn(\"No news, fetching from contracts...\");\n }\n\n // Background thread\n\n {\n Executors.newSingleThreadExecutor()\n .execute(\n () -> {\n List<News> news = this.contracts.retrieveNews(50);\n\n // GUI thread\n new Handler(Looper.getMainLooper())\n .post(\n () -> {\n this.theNews.setValue(news);\n });\n });\n }\n }", "private void refreshAnnouncements() {\n if (Util.getInstance(getContext()).isOnline()) {\n errorMessage = getString(R.string.general_error_connection_failed);\n errorMessage += getString(R.string.general_error_refresh);\n // Get announcement data. Request new messages only.\n int messageNumber = databaseLoader.getChannelDBM().getMaxMessageNumberAnnouncement(channelId);\n ChannelAPI.getInstance(getActivity()).getAnnouncements(channelId, messageNumber);\n } else {\n if (!isAutoRefresh) {\n errorMessage = getString(R.string.general_error_no_connection);\n errorMessage += getString(R.string.general_error_refresh);\n // Only show error message if refreshing was triggered manually.\n toast.setText(errorMessage);\n toast.show();\n // Reset the auto refresh flag.\n isAutoRefresh = true;\n // Can't refresh. Hide loading animation.\n swipeRefreshLayout.setRefreshing(false);\n }\n }\n }", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "@Override\n public void onRefresh() {\n getUserOnlineStatus();\n }", "@Override\n\t\t\t\t\tpublic void onRefresh() {\n\t\t\t\t\t\tisRefreshing = true;\n\t\t\t\t\t\tsyncArticle();\n\t\t\t\t\t}", "public static void reload()\r\n {\r\n reloadAsynch();\r\n waitWhileLoading();\r\n }", "private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }", "private void refreshData() {\n // Prevent unnecessary refresh.\n if (mRefreshDataRequired) {\n // Mark all entries in the contact info cache as out of date, so\n // they will be looked up again once being shown.\n mAdapter.invalidateCache();\n fetchCalls();\n mRefreshDataRequired = false;\n }\n }", "private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }", "public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }", "@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }", "default boolean pollOnExecutionFailed() {\n return false;\n }", "private void fetchUpComingChannels() {\n\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n //Queue use default volley Response and Error listener\n RequestManager\n .queue()\n .useBackgroundQueue()\n .addRequest(new UpcomingChannelJsonRequest(offSet++), mRequestCallback)\n .start();\n }", "@Override\n public void onRefresh() {\n\n GetFirstData();\n }", "private void _loadCatalog() {\n if (discoveryEndpoint != null) {\n try {\n ResponseEntity<String> response = restTemplate.getForEntity(discoveryEndpoint, String.class);\n\n if (response.getStatusCode() == HttpStatus.OK) {\n String body = response.getBody();\n this.catalog = CdsHooksUtil.GSON.fromJson(body, CdsHooksCatalog.class);\n startPendingRequests();\n return;\n }\n } catch (Exception e) {\n log.warn(\"Failed to load CDS catalog for \" + discoveryEndpoint\n + \".\\nRetries remaining: \" + retries + \".\");\n }\n\n retry();\n }\n }", "void fetchForRentHousesData();", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t\tqueryData();\r\n\t}", "@Override\r\n\tpublic void onFetchFailure(String msg) {\n\t}", "protected boolean provideRefresh() {\n return false;\n }", "private void checkOcspResponseFresh(SingleResp resp) throws OCSPException\n {\n\n Date curDate = Calendar.getInstance().getTime();\n\n Date thisUpdate = resp.getThisUpdate();\n if (thisUpdate == null)\n {\n throw new OCSPException(\"OCSP: thisUpdate field is missing in response (RFC 5019 2.2.4.)\");\n }\n Date nextUpdate = resp.getNextUpdate();\n if (nextUpdate == null)\n {\n throw new OCSPException(\"OCSP: nextUpdate field is missing in response (RFC 5019 2.2.4.)\");\n }\n if (curDate.compareTo(thisUpdate) < 0)\n {\n LOG.error(curDate + \" < \" + thisUpdate);\n throw new OCSPException(\"OCSP: current date < thisUpdate field (RFC 5019 2.2.4.)\");\n }\n if (curDate.compareTo(nextUpdate) > 0)\n {\n LOG.error(curDate + \" > \" + nextUpdate);\n throw new OCSPException(\"OCSP: current date > nextUpdate field (RFC 5019 2.2.4.)\");\n }\n LOG.info(\"OCSP response is fresh\");\n }", "private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}", "private void fetch(String serverUrl) {\n if(isOnline()) {\n currentStationStatus = \"Loading Stream...\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n } else {\n currentStationStatus = \"No Internet Connection\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n return;\n }\n //Log.i(LOG_TAG, \"Make Asynctask to fetch meta data\");\n new FetchMetaDataTask().execute(serverUrl);\n }", "private Future<JsonObject> fetchItem(String id) {\n Promise<JsonObject> p = Promise.promise();\n client\n .get(catPort, catHost, catItemPath)\n .addQueryParam(ID, id)\n .send()\n .onFailure(\n ar -> {\n ar.printStackTrace();\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n obj -> {\n JsonObject res = obj.bodyAsJsonObject();\n if (obj.statusCode() == 200)\n {\n if (res.getString(STATUS).equals(status.SUCCESS.toString().toLowerCase()))\n p.complete(obj.bodyAsJsonObject().getJsonArray(RESULTS).getJsonObject(0));\n }\n else{\n if (obj.statusCode() == 404)\n p.fail(ITEMNOTFOUND + id);\n else{\n LOGGER.error(\"failed fetchItem: \" + res);\n p.fail(INTERNALERROR);\n }\n\n }\n });\n return p.future();\n }", "@Override\n protected void lazyLoad() {\n if (!isPrepared || !isVisible) {\n return;\n }\n initResumeInfo();\n }", "public synchronized void waitUntilLoad() {\n\t\twhile (!this.loaded) {\n\t\t\tSystem.out.println(\"Waiting for news to load\");\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t}", "JobResponse refresh();", "@Override\n public Cursor loadInBackground() {\n Cursor data = MoviesDbUtils.readDbSortedByPreference(MainActivity.this, sortByPreference, NUMBER_OF_ROWS);\n\n // if cursor is empty and favorites isn't the preference selected then download and insert new data\n // This should happen only the first time that app is opened. Keep in mind that if user doesn't\n // have any favorite movie the cursor will return empty too.\n if (data.getCount() == 0 && !sortByPreference.equals(getString(R.string.pref_order_by_favorite_value))){\n if (NetworkUtils.isOnline(MainActivity.this)){\n MoviesDbUtils.insertNewDataFromTheCloud(MainActivity.this, getString(R.string.pref_order_by_popularity_value));\n MoviesDbUtils.insertNewDataFromTheCloud(MainActivity.this, getString(R.string.pref_order_by_rating_value));\n return MoviesDbUtils.readDbSortedByPreference(MainActivity.this, sortByPreference, NUMBER_OF_ROWS);\n }\n }\n return data;\n }", "E poll();", "void updateIfNeeded()\n throws Exception;", "public void refreshData() {\n\n if (!mUpdatingData) {\n new RefreshStateDataTask().execute((Void) null);\n }\n }", "@Override\n public void run() {\n final JPPFClientConnectionStatus status = driver.getConnection().getStatus();\n if (status.isWorkingStatus()) StatsHandler.getInstance().requestUpdate(driver);\n }", "public void m3980iv() {\n Process.setThreadPriority(10);\n while (!this.mClosed) {\n try {\n this.f3568qK = this.f3566Tz.mo7564ix();\n Thread.sleep(this.f3562Tv);\n } catch (InterruptedException e) {\n C1401bh.m4076u(\"sleep interrupted in AdvertiserDataPoller thread; continuing\");\n }\n }\n }", "private void m72693hi() {\n if (!this.aeu) {\n throw new IllegalStateException(\"No preceding call to #readHistoricalData\");\n } else if (this.aev) {\n this.aev = false;\n if (!TextUtils.isEmpty(this.aeq)) {\n new C0712e().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Object[]{new ArrayList(this.aep), this.aeq});\n }\n }\n }" ]
[ "0.6023463", "0.5970335", "0.5821129", "0.57155854", "0.5535754", "0.5489077", "0.5469073", "0.5423823", "0.54111576", "0.537699", "0.5362291", "0.52900976", "0.52849376", "0.52734697", "0.52733696", "0.52591276", "0.5230334", "0.52141696", "0.5209694", "0.52080435", "0.5189441", "0.5189441", "0.51891124", "0.51821613", "0.5172062", "0.5172062", "0.51719177", "0.51402265", "0.5131764", "0.5130834", "0.5126314", "0.51062804", "0.5086439", "0.5085367", "0.50739247", "0.5068413", "0.50660026", "0.5059684", "0.5052976", "0.5037492", "0.5030887", "0.5023902", "0.501557", "0.50073236", "0.5006137", "0.5005241", "0.49987978", "0.49915808", "0.49911398", "0.4980519", "0.49772787", "0.49771935", "0.4973714", "0.4972101", "0.49715015", "0.49710414", "0.4963928", "0.49577785", "0.49571225", "0.49543783", "0.4953637", "0.49506968", "0.494752", "0.4945931", "0.49417263", "0.49297088", "0.49278378", "0.49272758", "0.4925411", "0.49248588", "0.491094", "0.49104583", "0.49100843", "0.49092096", "0.49061692", "0.4901908", "0.49009973", "0.48977014", "0.48922956", "0.48811445", "0.48700252", "0.48677823", "0.48666975", "0.48650312", "0.48593396", "0.4859198", "0.48581284", "0.48531023", "0.48520735", "0.48482087", "0.48438707", "0.48397207", "0.48333946", "0.48211724", "0.48199472", "0.48155096", "0.4811708", "0.48106986", "0.48072222", "0.480276" ]
0.55463004
4
Notifies EPG fetch service that channel scanning is started.
@MainThread void onChannelScanStarted();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void notifyScanStarted() {\n for (ScanListener l : listeners) l.scanStarted(contextId);\n }", "@MainThread\n void onChannelScanFinished();", "protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }", "@Override\n\t\t\tpublic void callStarted(String channel) {\n\t\t\t}", "public void notifyStartRetrievingCovers(long id);", "private void startDiscovery() {\n client.startDiscovery(getResources().getString(R.string.service_id), endpointDiscoveryCallback, new DiscoveryOptions(STRATEGY));\n }", "public void scan()\n {\n if (mEnable) {\n // TODO: Listener only gets new devices. Somehow callback him with already paired devices\n if(!mScanning) {\n mScanning = true;\n mBluetoothAdapter.startDiscovery();\n }\n }\n }", "@Override\n protected void startScan() {\n startAutomaticRefresh();\n }", "void discoverFinished();", "@Override\n public void onDiscoveryComplete() {\n BusProvider.getInstance().post(new DiscoveryCompleteEvent());\n }", "@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}", "private synchronized void start()\n\t{\n\t\tregisterReceiver(\n\t\t\t\tmConnectivityReceiver,\n\t\t\t\tnew IntentFilter( ConnectivityManager.CONNECTIVITY_ACTION )\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t// Show notification in status bar\n\t\t\tshowNotification();\n\t\t} catch ( Exception e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "protected void startupExternal() throws Exception {\n if (configURL != null) {\n logObj.debug(\"creating channel with configuration from \" + configURL);\n channel = new JChannel(configURL);\n } else {\n String configString = buildConfigString();\n logObj.debug(\"creating channel with properties: \" + configString);\n channel = new JChannel(configString);\n }\n\n // Important - discard messages from self\n channel.setOpt(Channel.LOCAL, Boolean.FALSE);\n channel.connect(externalSubject);\n logObj.debug(\"channel connected.\");\n\n if (receivesExternalEvents()) {\n adapter = new PullPushAdapter(channel, this);\n }\n }", "@Override\n public void onScanStarted() {\n Log.d(TAG, \"Scan Started\");\n }", "private void checkUSBConnectionOnStartUp(){\n //Notification and icon\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this, \"765\");\n Intent chargingStatus = registerReceiver(powerConnectionReceiver, filter);\n int plugged = chargingStatus.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);\n isPowerConnected = plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB;\n if(SensorService.isPowerConnected){\n builder.setContentTitle(\"Earthquake Detection Enabled\")\n .setSmallIcon(R.drawable.ic_earthquake)\n .setAutoCancel(true);\n // Main Activity icon change: StateBroadcast\n sendBroadcast(new Intent().setAction(EARTHQUAKE_STATE));\n }\n else{\n builder.setContentTitle(\"Fall Detection Enabled\")\n .setSmallIcon(R.drawable.ic_falling_man)\n .setAutoCancel(true);\n // Main Activity icon change: StateBroadcast\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n }\n notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(1, builder.build());\n }", "private void notifyOnOpen() {\n synchronized (globalLock) {\n if (isRunning) {\n onOpen();\n }\n }\n }", "@Override\n protected void onPreExecute() {\n callbackListener.onScanStart(\"Running a deep scan... this will take awhile...\");\n super.onPreExecute();\n }", "private void startDiscovery() {\n\t\tbtAdapter.cancelDiscovery();\n\t\tbtAdapter.startDiscovery();\n\t}", "void notifyStart();", "@Override\r\n\tpublic void onDiscoverySelected() {\n\t\tLog.d(TAG, \"onDiscoverySelected()\");\r\n\t\tmManager.discoverPeers(mChannel, new WifiP2pManager.ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tLog.d(TAG, \"onSucess()\");\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"Peers Avaliable!\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(int reason) {\r\n\t\t\t\tLog.d(TAG, \"onFailure()\");\r\n\t\t\t\tString message = reason == WifiP2pManager.P2P_UNSUPPORTED ? \"P2P_UNSUPORTED\" : \"BUSY\" ;\r\n\t\t\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"No Peers Avaliable, reason: \"+message, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "protected void notifyScanFinished() {\n for (ScanListener l : listeners) l.scanFinished(contextId);\n }", "private void eventLookupStarted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter++;\n\t\t}\n\t}", "public void msgReadyForParts()\n\t{\n\t\tprint(\"Gantry: Feeder ready for party\");\n\t\tgantry_events.add(GantryEvents.FeederReadyForBin);\n\t//\tlog.add(new LoggedEvent(\"msgReadyForParts received from Feeder\"));\n\t\tstateChanged();\n\t}", "public void onEnable()\n\t{\n\t\t//Tells the user that the plugin is starting up.\n\t\tlog.info(\"Started up.\");\n\t}", "boolean onNotifyMessageChannelReady(@Nullable Bundle extras);", "@Override\n public void onResume()\n {\n super.onResume();\n mReceiver = new WiFiServerBroadCastReciever(mManager, mChannel, this);\n registerReceiver(mReceiver, mIntentFilter);\n\n searchDevices();\n\n }", "void start(Channel channel, Object msg);", "public void onServiceConnected() {\r\n\t\tapiEnabled = true;\r\n\r\n\t\t// Display the list of calls\r\n\t\tupdateList();\r\n }", "public void onScanViewReady() {\n\t\tupdateGuiState();\n\n\t\tif (!mInitialised) {\n\t\t\t// Broadcast receiver\n\t\t\tregisterReceiver(mReceiver, mFilter);\n\n\t\t\tif (mBtAdapter.isEnabled()) {\n\t\t\t\t// Start straight away\n\t\t\t\tstartBluetoothLeService();\n\t\t\t} else {\n\t\t\t\t// Request BT adapter to be turned on\n\t\t\t\tIntent enableIntent = new Intent(\n\t\t\t\t\t\tBluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableIntent, REQ_ENABLE_BT);\n\t\t\t}\n\t\t\tmInitialised = true;\n\t\t} else {\n\t\t\t// mScanView.notifyDataSetChanged();\n\t\t}\n\t}", "@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)\n public void onCaptureDeviceDiscoveryChange(DeviceDiscoveryCompleteEvent event) {\n enableManualDiscoveryButton(true);\n if(event.isComplete()) {\n Toast.makeText(getApplicationContext(), \"Manual device discovery is complete\" , Toast.LENGTH_SHORT).show();\n }\n }", "public void start() {\n\t\tconnection.start((sender, message) -> message.accept(new Visitor(sender)));\n\t\tloadData();\n\t}", "public void connectionInitiated(ShellLaunchEvent ev);", "protected void notifyStart(\n )\n {\n for(IListener listener : listeners)\n {listener.onStart(this);}\n }", "public abstract void startPeriodicallScan();", "@Override\n public void connected(final OfficeConnectionEvent event) {\n\n // Reset the task count and make the task executor available.\n taskCount.set(0);\n taskExecutor.setAvailable(true);\n }", "@Override\n public void onEnabled() {\n mDiscovery.startDiscovery(mEvents, mWifiStateManager.getWifiManager());\n updateList();\n }", "public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}", "private void processPendingRegistrations()\n throws ClosedChannelException {\n Iterator<SocketChannel> it = pendingRegistrations.iterator();\n while (it.hasNext() == true) {\n SocketChannel channel = it.next();\n it.remove();\n\n TransmissionTracker tracker = socketToTracker.get(channel);\n channel.register(selector, SelectionKey.OP_CONNECT, tracker);\n }\n }", "@Override\r\n\tpublic void onChannelOnlineCount(LinkedHashMap<String, Integer> online)\r\n\t{\n\t\tif (channelListener != null)\r\n\t\t{\r\n\t\t\tchannelListener.onChannelOnlineCount(online);\r\n\t\t}\r\n\t}", "public void listen() {\n DeviceManager cpuUsage = new CPUUsageManager();\n cpuUsage.printStatus();\n \n }", "public void start() {\n try {\n consumer.start();\n } catch (MQClientException e) {\n e.printStackTrace();\n }\n System.out.println(\"Consumer Started.\");\n }", "@Override\n\tprotected void initAsService() {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Initiating service...\");\n\t\t}\n\t\trunnerFuture = activityRunner.schedule(this::scanModulesHealth, 500, TimeUnit.MILLISECONDS);\n\t}", "void connectionHandlerResumeScanning();", "protected void serverStarting(final ComponentManager manager) {\n OpenGammaComponentServerMonitor.create(manager.getRepository());\n }", "private void doDiscovery() {\n\t\t// Indicate scanning in the title\n\t\t// setProgressBarIndeterminateVisibility(true);\n\t\tsetTitle(R.string.scanning);\n\n\t\t// Turn on sub-title for new devices\n\t\tfindViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);\n\n\t\t// If we're already discovering, stop it\n\t\tif (m_BtAdapter.isDiscovering()) {\n\t\t\tm_BtAdapter.cancelDiscovery();\n\t\t}\n\n\t\t// Request discover from BluetoothAdapter\n\t\tm_BtAdapter.startDiscovery();\n\t}", "public void notifyStartup();", "@Override\n public void run() {\n if (needRefreshRegistration(registrationUri, resolvedDeployment)) {\n sendRegistrationEvent(resolvedDeployment);\n }\n }", "public void fetchEvents (RJGUIController.XferCatalogMod xfer) {\n\n\t\tSystem.out.println(\"Fetching Events\");\n\t\tcur_mainshock = null;\n\n\t\t// Will be fetching from Comcat\n\n\t\thas_fetched_catalog = true;\n\n\t\t// See if the event ID is an alias, and change it if so\n\n\t\tString xlatid = GUIEventAlias.query_alias_dict (xfer.x_eventIDParam);\n\t\tif (xlatid != null) {\n\t\t\tSystem.out.println(\"Translating Event ID: \" + xfer.x_eventIDParam + \" -> \" + xlatid);\n\t\t\txfer.modify_eventIDParam(xlatid);\n\t\t}\n\n\t\t// Fetch mainshock into our data structures\n\t\t\n\t\tString eventID = xfer.x_eventIDParam;\n\t\tfcmain = new ForecastMainshock();\n\t\tfcmain.setup_mainshock_poll (eventID);\n\t\tPreconditions.checkState(fcmain.mainshock_avail, \"Event not found: %s\", eventID);\n\n\t\tcur_mainshock = fcmain.get_eqk_rupture();\n\n\t\t// Finish setting up the mainshock\n\n\t\tsetup_for_mainshock (xfer);\n\n\t\t// Make the search region\n\n\t\tsetup_search_region (xfer);\n\n\t\t// Get the aftershocks\n\n\t\tComcatOAFAccessor accessor = new ComcatOAFAccessor();\n\n\t\tcur_aftershocks = accessor.fetchAftershocks (\n\t\t\tcur_mainshock,\n\t\t\tfetch_fcparams.min_days,\n\t\t\tfetch_fcparams.max_days,\n\t\t\tfetch_fcparams.min_depth,\n\t\t\tfetch_fcparams.max_depth,\n\t\t\tfetch_fcparams.aftershock_search_region,\n\t\t\tfetch_fcparams.aftershock_search_region.getPlotWrap(),\n\t\t\tfetch_fcparams.min_mag\n\t\t);\n\n\t\t// Perform post-fetch actions\n\n\t\tpostFetchActions (xfer);\n\n\t\treturn;\n\t}", "@Override\r\n\tpublic void run() {\n\t\tIntent intent = new Intent(\"android.intent.action.BOOT_COMPLETED\"); \r\n\t\tresolveInfo = context.getPackageManager().queryBroadcastReceivers(intent, 0);\r\n\t}", "@Override\n public void startListening() {\n //Download proj upon connection response from cs\n RxBus.INSTANCE\n .listen(DownloadProjectUseCase.Request.class)\n .subscribe(request -> {\n this.projectForDownload = request.projectForDownload;\n downloadProject(request.projectForDownload);\n });\n\n //Retry download proj when there is a problem\n RxBus.INSTANCE\n .listen(RetryCacheProblemUseCase.Request.class)\n .subscribe(request -> {\n downloadProject(projectForDownload);\n });\n\n }", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "public void start() {\n \t\tLog.info(\"Starting service of repository requests\");\n \t\ttry {\n \t\t\tresetNameSpace();\n \t\t} catch (Exception e) {\n \t\t\tLog.logStackTrace(Level.WARNING, e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tbyte[][]markerOmissions = new byte[2][];\n \t\tmarkerOmissions[0] = CommandMarkers.COMMAND_MARKER_REPO_START_WRITE;\n \t\tmarkerOmissions[1] = CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION;\n \t\t_markerFilter = new Exclude(markerOmissions);\n \t\t\n \t\t_periodicTimer = new Timer(true);\n \t\t_periodicTimer.scheduleAtFixedRate(new InterestTimer(), PERIOD, PERIOD);\n \n \t}", "void onFetchDataStarted();", "void scanModulesHealth() {\n\t\t// activate main module action\n\t\tactivateMainModuleAction();\n\n\t\tlog.debug(\"Scanning modules.\");\n\t\tactionsFactory.executeAtomicModuleAction(this, \"metrics-check\", () -> iterateRegisteredModules(ACTIVITY_LABEL), false);\n\n\t\tif (!isWorking() || Objects.isNull(runnerFuture)) {\n\t\t\tlog.debug(\"Scanning is stopped.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.debug(\"Rescheduling service for {} millis\", delay);\n\t\trunnerFuture = activityRunner.schedule(this::scanModulesHealth, delay, TimeUnit.MILLISECONDS);\n\t}", "public interface ScanResultsAvailable {\n public void onReceiveScanResults();\n}", "private void uponInConnectionUp(InConnectionUp event, int channelId) {\n }", "public void startDiscovery() {\n if (mApiClient != null) {\n Weave.DEVICE_API.startLoading(mApiClient, mDiscoveryListener);\n }\n }", "public void startScan()\n {\n Toolbox.toast(getContext(), \"Starting scan...\");\n //------------------------------------------------------------\n // Clear the list of devices and make sure user has Bluetooth\n // turned on\n clearDeviceLists();\n if ( !Toolbox.checkBLEAdapter(bleAdapter) )\n {\n Toolbox.requestUserBluetooth(mainActivity);\n }\n else\n {\n scanLeDevice(true);\n }\n }", "void onListeningStarted();", "public void notifyTurn()\n {\n playerObserver.onTurnStart();\n }", "@Override\n protected void preClientStart() {\n client.registerListener(new BuddycloudLocationChannelListener(\n getContentResolver()\n ));\n client.registerListener(new BuddycloudChannelMetadataListener(\n getContentResolver()\n ));\n BCConnectionAtomListener atomListener = new BCConnectionAtomListener(\n getContentResolver(), this);\n registerListener(atomListener);\n }", "public void run() {\n sendServerRegistrationMessage();\n if (serviceConnectedListener != null) {\n serviceConnectedListener.onServiceConnected(serviceDevice);\n }\n\n isRegistered = true;\n }", "@Override\n public boolean announce() {\n\taddDataConsumerInfo(dataConsumer);\n return true;\n }", "private void broadcastReadyAction() {\n Log.d(TAG, \"broadcastReadyAction start\");\n final Intent intent = new Intent();\n intent.setAction(BeaconsMonitoringService.SERVICE_READY_ACTION);\n getBaseContext().sendBroadcast(intent);\n Log.d(TAG, \"broadcastReadyAction end\");\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\ttry\n\t\t{\n\t\t\tregisterReceiver(mMessageReceiver, new IntentFilter(\"updateUnreadCount\"));\n\t\t\tinquiryUserMessage();\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\tcatchException(this, ex);\n\t\t}\n\t}", "public void start() {\n\t\ttrackerThread.start();\n\t}", "public void acceptNewChannel(Channel channel)\n {\n ProviderSession provSession = new ProviderSession(_xmlMsgData, _itemEncoder);\n ++_connectionCount;\n provSession.init(_channelHandler.addChannel(channel, provSession, true));\n }", "@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}", "public void onServiceConnected() {\r\n \t// Display the list of sessions\r\n\t\tupdateList();\r\n }", "public void onConnected() {\n userName = conn.getUsername();\n tellManagers(\"I have arrived.\");\n tellManagers(\"Running {0} version {1} built on {2}\", BOT_RELEASE_NAME, BOT_RELEASE_NUMBER, BOT_RELEASE_DATE);\n command.sendCommand(\"set noautologout 1\");\n command.sendCommand(\"set style 13\");\n command.sendCommand(\"-notify *\");\n Collection<Player> players = tournamentService.findScheduledPlayers();\n for (Player p : players) {\n command.sendCommand(\"+notify {0}\", p);\n }\n conn.addDatagramListener(conn, Datagram.DG_NOTIFY_ARRIVED);\n conn.addDatagramListener(conn, Datagram.DG_NOTIFY_LEFT);\n\n Runnable task = new SafeRunnable() {\n\n @Override\n public void safeRun() {\n onConnectSpamDone();\n }\n };\n //In 2 seconds, call onConnectSpamDone().\n scheduler.schedule(task, 4, TimeUnit.SECONDS);\n System.out.println();\n }", "public void onServiceConnected();", "public void startCollectAppsTraffic() {\n\t\tsubmitCollectAppsTrafficTask();\n\t}", "void firePeerDiscovered(TorrentId torrentId, Peer peer);", "private void doDiscovery() {\n if (D) Log.d(TAG, \"doDiscovery()\");\n\n // Indicate scanning in the title\n setProgressBarIndeterminateVisibility(true);\n setTitle(R.string.scanning);\n\n // Turn on sub-title for new devices\n findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);\n\n // If we're already discovering, stop it\n if (mBtAdapter.isDiscovering()) {\n mBtAdapter.cancelDiscovery();\n }\n\n // Request discover from BluetoothAdapter\n mBtAdapter.startDiscovery();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"WiFi SCAN\", \"RESULT RETURN:\"+new Date().getTime());\n synchronized (scanned) {\n scanned.notify();\n }\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n\t \t\t\t\tpublic void run() {\n\t \t\t\t\t\tString connectivity_context = Context.WIFI_SERVICE;\n\t \t\t\t\t\tfinal WifiManager wifi = (WifiManager) getSystemService(connectivity_context); \n\t \t\t\t\t\tif (wifi.isWifiEnabled()) {\n\t \t\t wifi.startScan();\n\t \t\t\t\t\t}\n\t \t\t\t\t}", "@Override\n public void run()\n {\n final String actionDescription = \"Register configuration listener\";\n\n boolean listenerRegistered = false;\n\n while (keepTrying)\n {\n /*\n * First register a listener for the group's configuration.\n */\n while ((! listenerRegistered) && (keepTrying))\n {\n try\n {\n IntegrationGroupConfigurationClient configurationClient = new IntegrationGroupConfigurationClient(accessServiceServerName,\n accessServiceRootURL);\n eventClient.registerListener(localServerUserId,\n new GovernanceEngineOutTopicListener(groupName,\n groupHandler,\n configurationClient,\n localServerUserId,\n auditLog));\n listenerRegistered = true;\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.CONFIGURATION_LISTENER_REGISTERED.getMessageDefinition(localServerName,\n accessServiceServerName));\n }\n catch (UserNotAuthorizedException error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.SERVER_NOT_AUTHORIZED.getMessageDefinition(localServerName,\n accessServiceServerName,\n accessServiceRootURL,\n localServerUserId,\n error.getReportedErrorMessage()),\n error);\n waitToRetry();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_CONFIGURATION_LISTENER.getMessageDefinition(localServerName,\n accessServiceServerName,\n error.getClass().getName(),\n error.getMessage()),\n error);\n\n waitToRetry();\n }\n }\n\n while (keepTrying)\n {\n /*\n * Request the configuration for the governance group. If it fails just log the error but let the\n * integration daemon server continue to start. It is probably a temporary outage with the metadata server\n * which can be resolved later.\n */\n try\n {\n groupHandler.refreshConfig();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.INTEGRATION_GROUP_NO_CONFIG.getMessageDefinition(groupHandler.getIntegrationGroupName(),\n error.getClass().getName(),\n error.getMessage()),\n error.toString(),\n error);\n }\n\n waitToRetry();\n }\n\n waitToRetry();\n }\n }", "private void fetchUpComingChannels() {\n\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n //Queue use default volley Response and Error listener\n RequestManager\n .queue()\n .useBackgroundQueue()\n .addRequest(new UpcomingChannelJsonRequest(offSet++), mRequestCallback)\n .start();\n }", "@Override\n protected void onStart() {\n super.onStart();\n mFetchChatRoomListUseCase.registerListener(this);\n }", "protected void onDiscoveryFailed() {\n logAndShowSnackbar(\"Could not subscribe.\");\n }", "@Override\n\tpublic void setup()\n\t{\n\t\tCoreNotifications.get().addListener(this, ICoreContextOperationListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureInputListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureRuntimeListener.class);\n\t\tCoreNotifications.get().addListener(this, ICoreProcedureOperationListener.class);\n\t}", "final void rescanService(EventBus eventBus) {\n eventBus.send(config.getAnnounceAddress(), new JsonObject().put(\"status\", Status.UNKNOWN));\n }", "@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }", "public interface EpgFetcher {\n\n /**\n * Starts the routine service of EPG fetching. It use {@link JobScheduler} to schedule the EPG\n * fetching routine. The EPG fetching routine will be started roughly every 4 hours, unless the\n * channel scanning of tuner input is started.\n */\n @MainThread\n void startRoutineService();\n\n /**\n * Fetches EPG immediately if current EPG data are out-dated, i.e., not successfully updated by\n * routine fetching service due to various reasons.\n */\n @MainThread\n void fetchImmediatelyIfNeeded();\n\n /** Fetches EPG immediately. */\n @MainThread\n void fetchImmediately();\n\n /** Notifies EPG fetch service that channel scanning is started. */\n @MainThread\n void onChannelScanStarted();\n\n /** Notifies EPG fetch service that channel scanning is finished. */\n @MainThread\n void onChannelScanFinished();\n\n @MainThread\n boolean executeFetchTaskIfPossible(JobService jobService, JobParameters params);\n\n @MainThread\n void stopFetchingJob();\n}", "@Override\n protected void onResume() {\n super.onResume();\n IntentFilter filter = new IntentFilter();\n filter.addAction(RSSService.REFRESH);\n registerReceiver(receiver, filter);\n }", "private void startListeningForFingerprint() {\n int i = this.mFingerprintRunningState;\n if (i == 2) {\n setFingerprintRunningState(3);\n } else if (i != 3) {\n int currentUser = getCurrentUser();\n if (isUnlockWithFingerprintPossible(currentUser)) {\n CancellationSignal cancellationSignal = this.mFingerprintCancelSignal;\n if (cancellationSignal != null) {\n cancellationSignal.cancel();\n }\n this.mFingerprintCancelSignal = new CancellationSignal();\n Slog.v(\"KeyguardUpdateMonitor\", \"startListeningForFingerprint()\");\n this.mFpm.authenticate(null, this.mFingerprintCancelSignal, 0, this.mFingerprintAuthenticationCallback, null, currentUser);\n setFingerprintRunningState(1);\n }\n }\n }", "public void startAutomaticRefresh() {\n logger.info(\"startAutomaticRefresh\");\n try {\n String serviceType = \"_openhab-kinect._tcp.local.\";\n dnsService = JmDNS.create();\n dnsService.addServiceListener(serviceType, mdnsServiceListener);\n logger.info(\"startAutomaticRefresh 2\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onConnected(Bundle bundle) {\n Intent gARIntent = new Intent(getApplicationContext(), Algorithm.class);\n PendingIntent gARPending = PendingIntent.getService(getApplicationContext(), 0, gARIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //do AR per 6 secs\n ActivityRecognition.ActivityRecognitionApi.requestActivityUpdates(gARClient, 6000, gARPending);\n\n }", "private void listenForNotificationEvents() {\n\t\twhile (!shutdownRequested) {\n\t\t\ttry {\n\t\t\t\tNotificationJob job = notificationQueue.poll( 1000, TimeUnit.MILLISECONDS );\n\t\t\t\t\n\t\t\t\tif (job != null) {\n\t\t\t\t\tprocessNotificationJob( job );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Ignore and continue looping until shutdown requested\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "public void start() {\n synchronized (car) {\n LOG.fine(\"Validating APPLY Record\");\n try {\n dir = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".DIR\"), Dir.CLEAR);\n dir.registerListener(new DirListener());\n val = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".VAL\"), 0);\n mess = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".MESS\"), \"\");\n omss = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".OMSS\"), \"\");\n clid = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".CLID\"), 0);\n\n car.start();\n for (CadRecord cad : cads) {\n cad.start();\n cad.getCar().registerListener(new CarListener());\n }\n } catch (CAException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n }", "protected void onOSGiConnected() {\n osgiNotified = true;\n }", "@Test\n public void sendBackgroundScanChannelsRequest() throws Exception {\n WifiScanner.ScanSettings requestSettings = createRequest(channelsToSpec(5150), 30000,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n WifiNative.ScanSettings nativeSettings = new NativeScanSettingsBuilder()\n .withBasePeriod(30000)\n .withMaxApPerScan(MAX_AP_PER_SCAN)\n .withMaxScansToCache(BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH)\n .addBucketWithChannels(30000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5150)\n .build();\n doSuccessfulBackgroundScan(requestSettings, nativeSettings);\n }", "public void startListeningForConnection() {\n startInsecureListeningThread();\n }", "public void start() throws BluetoothStateException {\n\t\tDeviceDiscoverer.getInstance().startInquiry(DiscoveryAgent.GIAC, this);\n\t}", "void onDeviceFound(TxRxScanResult scanResult);", "void notifyStarted(MessageSnapshot snapshot);", "@ReactMethod\n public void start() {\n ChirpError error = chirpConnect.start();\n if (error.getCode() > 0) {\n onError(context, error.getMessage());\n } else {\n isStarted = true;\n }\n }", "@Override\n public void scanInitiated(List<WireScanner> lstDevs, MainScanController.SCAN_MODE mode) {\n \n // Make sure there is something to do\n if (lstDevs.size() == 0)\n return;\n \n // Set the currently active devices\n// this.lstActDevs.clear();\n// this.lstActDevs.addAll(lstDevs);\n \n // Reset the plots\n this.pltSignal.clear();\n // this.pltTraces.scaleAbsissa(lstDevs);\n \n \n // See if we are monitoring live data\n if (!this.butLiveData.isSelected()) \n return;\n \n try {\n this.mplLiveData.emptyPool();\n this.buildMonitorPool(lstDevs);\n this.mplLiveData.begin(true);\n \n } catch (ConnectionException e) {\n getLogger().logException(getClass(), e, \"Unable to start monitor pool\");\n \n } catch (MonitorException e) {\n getLogger().logException(getClass(), e, \"Unable to start monitor pool\");\n \n } catch (NoSuchChannelException e) {\n getLogger().logException(getClass(), e, \"Unable to start monitor pool\");\n \n }\n }", "public void onPluginStart()\n\t{\n\t\tfor (Integer event : this.getNetworkCommands())\n\t\t\tCalicoEventHandler.getInstance().addListener(event.intValue(), this, CalicoEventHandler.ACTION_PERFORMER_LISTENER);\n\t\t\n\t\tCanvasStatusBar.addMenuButtonRightAligned(CreateCustomScrapButton.class);\n\t\t\n\t\t//Add an additional voice to the bubble menu\n\t\t//CGroup.registerPieMenuButton(SaveToPaletteButton.class);\n\t\t\n\t\t//Register to the events I am interested in from Calico's core events\n\t\t//Example: CalicoEventHandler.getInstance().addListener(NetworkCommand.VIEWING_SINGLE_CANVAS, this, CalicoEventHandler.PASSIVE_LISTENER);\n\n\t}" ]
[ "0.6404666", "0.6323082", "0.61772436", "0.5877182", "0.5696908", "0.56580794", "0.5512868", "0.5492008", "0.5477619", "0.5454373", "0.5431998", "0.5427001", "0.54038996", "0.54027665", "0.53919154", "0.5389618", "0.52871644", "0.5285341", "0.52558714", "0.52490115", "0.52392805", "0.5234245", "0.5231533", "0.52246654", "0.5193667", "0.51865065", "0.51680326", "0.5162566", "0.5149395", "0.514655", "0.5146401", "0.51431334", "0.51428217", "0.51372313", "0.5135429", "0.5132472", "0.51288015", "0.5128619", "0.51251024", "0.51248693", "0.51208806", "0.51114607", "0.5099", "0.5093203", "0.5091745", "0.50903296", "0.5087225", "0.50810695", "0.5080433", "0.50792265", "0.5075318", "0.5070873", "0.5064513", "0.5058007", "0.5050168", "0.5047615", "0.50432414", "0.5034741", "0.50338036", "0.5029556", "0.5028072", "0.5026253", "0.50208986", "0.50047356", "0.50016195", "0.49992013", "0.4986207", "0.49848735", "0.4981558", "0.4977221", "0.4974369", "0.49736252", "0.4966822", "0.4960995", "0.49596226", "0.49596193", "0.49592513", "0.4951001", "0.49458468", "0.49432847", "0.49426082", "0.49403822", "0.49314228", "0.49279857", "0.49236697", "0.4919357", "0.4917945", "0.49177372", "0.49174914", "0.49162823", "0.49079758", "0.49030936", "0.49007973", "0.48993596", "0.4897479", "0.48915446", "0.48878768", "0.48878458", "0.48867533", "0.48858795" ]
0.6907777
0
Notifies EPG fetch service that channel scanning is finished.
@MainThread void onChannelScanFinished();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void notifyScanFinished() {\n for (ScanListener l : listeners) l.scanFinished(contextId);\n }", "void discoverFinished();", "@MainThread\n void onChannelScanStarted();", "@Override\n public void onDiscoveryComplete() {\n BusProvider.getInstance().post(new DiscoveryCompleteEvent());\n }", "@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n\t\t\tSystem.out.println(\"Channel closed\");\n\t\t\t// @TODO if lost, try to re-establish the connection\n\t\t}", "public void scanningComplete() {\n\t\tif (!state.equals(ControlState.READY)) {\r\n\t\t\tthrow new RuntimeException(\"ReturnBookControl: cannot call scanningComplete except in READY state\");\r\n\t\t}\t\r\n\t\tuserInterface.setState(ReturnBookUI.UI_STATE.COMPLETED);\t\t\r\n\t}", "void finish(Channel channel, Object msg);", "@Override\r\n\tpublic void onScanComplete() \r\n\t{\n\t\tif(_scanActionMode != null)\r\n\t\t\t_scanActionMode.finish();\r\n\t}", "private void eventLookupCompleted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter--;\n\t\t\tif (lookupCounter == 0)\n\t\t\t\tlookupCounterMutex.notifyAll();\n\t\t}\n\t}", "@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}", "private void processPendingRegistrations()\n throws ClosedChannelException {\n Iterator<SocketChannel> it = pendingRegistrations.iterator();\n while (it.hasNext() == true) {\n SocketChannel channel = it.next();\n it.remove();\n\n TransmissionTracker tracker = socketToTracker.get(channel);\n channel.register(selector, SelectionKey.OP_CONNECT, tracker);\n }\n }", "@Override\n\t\tpublic void operationComplete(ChannelFuture arg0) throws Exception {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\tpublic void completed(Integer result, AsynchronousSocketChannel channel) {\n\n\t\t\t\t\t\t//AsyncSocketTransport.this.transportListeners.forEach(l -> l.onReceived(buf));\n\t\t\t\t\t\tsubscriber.onNext(new Packet(session, buf));\n\n\t\t\t\t\t\t// start to read next message again\n\t\t\t\t\t\tstartRead(channel);\n\t\t\t\t\t}", "@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }", "void onNotifyChipConnectionClosed();", "void onListeningFinished();", "@Override\r\n\t\tpublic void operationComplete(ChannelProgressiveFuture future) {\n }", "public void onFetchCompleted () {}", "private void fireOutputRecovered() {\n previousEvent = OUTPUT_RECOVERED;\n ownerPool.getIPCEventProcessor().execute(new OrderedExecutorService.KeyRunnable<StreamOutputChannel<PAYLOAD>>() {\n\n @Override\n public void run() {\n for (IPCEventListener l : outputRecoverListeners) {\n l.triggered(outputRecoveredEvent);\n }\n }\n\n @Override\n public StreamOutputChannel<PAYLOAD> getKey() {\n return StreamOutputChannel.this;\n }\n });\n }", "public void run() {\n\t\tfor (ConConsumer consumer : _consumers) {\n\t\t\tconsumer.register();\n\t\t}\n\t\t// commit the channels <\n\t\t// wait for the tasks finish >\n\t\t_monitor.checkFinish();\n\t\t// wait for the tasks finish <\n\t\t_threadPool.shutdown();\n\t}", "@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n }", "protected void notifyScanStarted() {\n for (ScanListener l : listeners) l.scanStarted(contextId);\n }", "@Override\n public void onEndRetrieval() {\n try {\n logger.debug(\"MetricsReceiver onEndRetrieval.\");\n if(!isResetConn){\n logger.info(\"onEndRetrieval PerformanceMetricsCountForEachRun: \" + metricsCount);\n }\n this.out.close();\n this.client.close();\n\n } catch (IOException ex) {\n logger.error(\"Can't close resources.\", ex);\n }\n }", "@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }", "@Override\r\n\tpublic void onDiscoverySelected() {\n\t\tLog.d(TAG, \"onDiscoverySelected()\");\r\n\t\tmManager.discoverPeers(mChannel, new WifiP2pManager.ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tLog.d(TAG, \"onSucess()\");\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"Peers Avaliable!\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(int reason) {\r\n\t\t\t\tLog.d(TAG, \"onFailure()\");\r\n\t\t\t\tString message = reason == WifiP2pManager.P2P_UNSUPPORTED ? \"P2P_UNSUPORTED\" : \"BUSY\" ;\r\n\t\t\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"No Peers Avaliable, reason: \"+message, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void run() {\n if (needRefreshRegistration(registrationUri, resolvedDeployment)) {\n sendRegistrationEvent(resolvedDeployment);\n }\n }", "@Override\n public void operationComplete(ChannelFuture future) {\n logger.info(\"channel close!\");\n future.channel().disconnect();\n future.channel().close();\n }", "public void deliver() {\n try {\n if (null != this.listener) {\n ContentObject pending = null;\n CCNInterestListener listener = null;\n synchronized (this) {\n if (null != this.data && null != this.listener) {\n pending = this.data;\n this.data = null;\n listener = (CCNInterestListener) this.listener;\n }\n }\n if (null != pending) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback (\" + pending + \" data) for: {0}\", this.interest.name());\n synchronized (this) {\n this.deliveryPending = false;\n }\n manager.unregisterInterest(this);\n Interest updatedInterest = listener.handleContent(pending, interest);\n if (null != updatedInterest) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback: updated interest to express: {0}\", updatedInterest.name());\n manager.expressInterest(this.owner, updatedInterest, listener);\n }\n } else {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback skipped (no data) for: {0}\", this.interest.name());\n }\n } else {\n synchronized (this) {\n if (null != this.sema) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Data consumes pending get: {0}\", this.interest.name());\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINEST)) Log.finest(Log.FAC_NETMANAGER, \"releasing {0}\", this.sema);\n this.sema.release();\n }\n }\n if (null == this.sema) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback skipped (not valid) for: {0}\", this.interest.name());\n }\n }\n } catch (Exception ex) {\n _stats.increment(StatsEnum.DeliverContentFailed);\n Log.warning(Log.FAC_NETMANAGER, \"failed to deliver data: {0}\", ex);\n Log.warningStackTrace(ex);\n }\n }", "@Override\n synchronized public void onTaskCompletionResult() {\n if (DataContainer.getInstance().pullValueBoolean(DataKeys.PLAY_REFERRER_FETCHED, context) && DataContainer.getInstance().pullValueBoolean(DataKeys.GOOGLE_AAID_FETCHED, context)) {\n deviceInformationUtils.prepareInformations();\n deviceInformationUtils.debugData();\n long lastLaunch = pullValueLong(ITrackingConstants.CONF_LAST_LAUNCH_INTERNAL, context);\n trackLaunchHandler(lastLaunch);\n }\n }", "@Override\n public void onSuccess(Void unusedResult) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Connection requested with: \" + endpointId);\n }", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "void onCloseBleComplete();", "public void incomingClose(APDUEvent e)\n {\n LOGGER.finer(\"Close...\");\n assoc.getPDUAnnouncer().deleteObserver(event_adapter);\n assoc.getPDUAnnouncer().deleteObservers();\n event_adapter = null;\n assoc.shutdown();\n \n try\n {\n assoc.join();\n }\n catch ( java.lang.InterruptedException ie )\n {\n }\n LOGGER.finer(\"Done joining with assoc thread\");\n \n LOGGER.finer(\"Deleting tasks...\");\n // Blow away any active search tasks. When these tasks finalize, \n // they should make\n // sure they release any resources held by the creating Searchable object\n active_searches.clear();\n search_service.destroy();\n search_service = null;\n \n \n assoc = null;\n }", "public void notifyEnd() {\n\n\t}", "void handleSubchannelTerminated() {\n executorPool.returnObject(executor);\n terminatedLatch.countDown();\n }", "@Override\n public void scanActuatorsStopped() {\n }", "public interface ScanResultsAvailable {\n public void onReceiveScanResults();\n}", "void connectionHandlerResumeScanning();", "@Override\n public void operationComplete(ChannelFuture future)\n throws Exception\n {\n if (future.isSuccess())\n {\n listener.sendSusccess(message);\n }\n else if (future.isCancelled())\n {\n listener.oncancellSend(message);\n }\n else if (!future.isSuccess())\n {\n listener.sendFailed(message, future.cause());\n }\n }", "protected void handleInvestigationComplete(final DetectionEvent de,\n\t\t\tlong time, final ScenarioActivityMonitor monitor)\n\t{\n\t}", "public void deliver() {\n try {\n Interest pending = null;\n ArrayList<Interest> pendingExtra = null;\n CCNFilterListener listener = null;\n synchronized (this) {\n if (null != this.interest && null != this.listener) {\n pending = interest;\n interest = null;\n if (null != this.extra) {\n pendingExtra = extra;\n extra = null;\n }\n }\n listener = (CCNFilterListener) this.listener;\n }\n if (null != pending) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Filter callback for: {0}\", prefix);\n listener.handleInterest(pending);\n if (null != pendingExtra) {\n int countExtra = 0;\n for (Interest pi : pendingExtra) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) {\n countExtra++;\n Log.finer(Log.FAC_NETMANAGER, \"Filter callback (extra {0} of {1}) for: {2}\", countExtra, pendingExtra.size(), prefix);\n }\n listener.handleInterest(pi);\n }\n }\n } else {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Filter callback skipped (no interests) for: {0}\", prefix);\n }\n } catch (RuntimeException ex) {\n _stats.increment(StatsEnum.DeliverInterestFailed);\n Log.warning(Log.FAC_NETMANAGER, \"failed to deliver interest: {0}\", ex);\n Log.warningStackTrace(ex);\n }\n }", "void onCountFinished();", "private void fetchUpComingChannels() {\n\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n //Queue use default volley Response and Error listener\n RequestManager\n .queue()\n .useBackgroundQueue()\n .addRequest(new UpcomingChannelJsonRequest(offSet++), mRequestCallback)\n .start();\n }", "@Override\n public void onScanCompleted(String path, Uri uri) {\n }", "void onDownloadComplete(EzDownloadRequest downloadRequest);", "public void serviceSearchCompleted(int transID, int respCode) {\n synchronized (lock) {\n lock.notify();\n }\n }", "@Override\n public void scanCompleted(List<WireScanner> lstDevs) {\n this.mplLiveData.stopAll();\n this.mplLiveData.emptyPool(); // CKA April 25, 2014\n }", "@Override\n public void channelReadComplete(final ChannelHandlerContext ctx) {\n ctx.flush();\n }", "public void onFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(\n\t\t\t\t\tnew Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tAlertDialog.showInformMessage(message);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\t\t\t\n\t\t\t}", "public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n/* 313 */ processPendingReadCompleteQueue();\n/* 314 */ ctx.fireChannelReadComplete();\n/* */ }", "private void uponInConnectionUp(InConnectionUp event, int channelId) {\n }", "public void onCompletion();", "private void uponOutConnectionUp(OutConnectionUp event, int channelId) {\n }", "public void onScanCompleted(String path, Uri uri) {\n }", "public void onScanCompleted(String path, Uri uri) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"WiFi SCAN\", \"RESULT RETURN:\"+new Date().getTime());\n synchronized (scanned) {\n scanned.notify();\n }\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }", "boolean onNotifyMessageChannelReady(@Nullable Bundle extras);", "public void onScanCompleted(String path, Uri uri) {\n\t\t\tmediaScanConn.disconnect();\n\t\t}", "public void inquiryCompleted(int discType) {\n synchronized (inquiryCompletedEvent) {\n inquiryCompletedEvent.notifyAll();\n }\n }", "protected void addChannelToReadCompletePendingQueue() {\n/* 354 */ while (!Http2MultiplexHandler.this.readCompletePendingQueue.offer(this)) {\n/* 355 */ Http2MultiplexHandler.this.processPendingReadCompleteQueue();\n/* */ }\n/* */ }", "public void end()\n {\n keepingAlive = false;\n if (channel == null)\n {\n channel = connectFuture.getChannel();\n connectFuture.cancel();\n }\n if (channel != null)\n {\n channel.close();\n }\n }", "public interface EpgFetcher {\n\n /**\n * Starts the routine service of EPG fetching. It use {@link JobScheduler} to schedule the EPG\n * fetching routine. The EPG fetching routine will be started roughly every 4 hours, unless the\n * channel scanning of tuner input is started.\n */\n @MainThread\n void startRoutineService();\n\n /**\n * Fetches EPG immediately if current EPG data are out-dated, i.e., not successfully updated by\n * routine fetching service due to various reasons.\n */\n @MainThread\n void fetchImmediatelyIfNeeded();\n\n /** Fetches EPG immediately. */\n @MainThread\n void fetchImmediately();\n\n /** Notifies EPG fetch service that channel scanning is started. */\n @MainThread\n void onChannelScanStarted();\n\n /** Notifies EPG fetch service that channel scanning is finished. */\n @MainThread\n void onChannelScanFinished();\n\n @MainThread\n boolean executeFetchTaskIfPossible(JobService jobService, JobParameters params);\n\n @MainThread\n void stopFetchingJob();\n}", "@Override\n\t\t\t\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t\t\t\t\tmDelegateConnected.onConnect(false);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (mBluetoothGatt != null) {\n\t\t\t\t\t\t\t\t\t\tmBluetoothGatt.close();\n\t\t\t\t\t\t\t\t\t\tmBluetoothGatt = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Let the user launch a new connection request\n\t\t\t\t\t\t\t\t\twaitingForConnResp = false;\n\t\t\t\t\t\t\t\t}", "void searchFinished (Search search);", "void onConnectDeviceComplete();", "public void msgReadyForParts()\n\t{\n\t\tprint(\"Gantry: Feeder ready for party\");\n\t\tgantry_events.add(GantryEvents.FeederReadyForBin);\n\t//\tlog.add(new LoggedEvent(\"msgReadyForParts received from Feeder\"));\n\t\tstateChanged();\n\t}", "@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}", "void completeTurn() {\n\n\t\tremoveNotification();\n\n\t\tString matchId = match.getMatchId();// The Id for our match\n\t\tString pendingParticipant = GPGHelper.getOpponentId(\n\t\t\t\tgameHelper.getApiClient(), match);// We set who's turn it\n\t\t// is next since\n\t\t// we're done,\n\t\t// should always be\n\t\t// opponents turn\n\t\t// for us.\n\t\tbyte[] gameState = writeGameState(match);// We build the game state\n\t\t\t\t\t\t\t\t\t\t\t\t\t// bytes from the current\n\t\t\t\t\t\t\t\t\t\t\t\t\t// game state.\n\n\t\t// This actually tries to send our data to Google.\n\t\tGames.TurnBasedMultiplayer.takeTurn(gameHelper.getApiClient(), matchId,\n\t\t\t\tgameState, pendingParticipant).setResultCallback(\n\t\t\t\tnew ResultCallback<TurnBasedMultiplayer.UpdateMatchResult>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResult(UpdateMatchResult result) {\n\t\t\t\t\t\tturnUsed = true;\n\n\t\t\t\t\t\t// TODO:Handle this better\n\t\t\t\t\t\tif (!GooglePlayGameFragment.this.checkStatusCode(match,\n\t\t\t\t\t\t\t\tresult.getStatus().getStatusCode())) {\n\t\t\t\t\t\t\tLog.d(\"test\", result.getStatus().getStatusCode()\n\t\t\t\t\t\t\t\t\t+ \" Something went wrong\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t}", "public void notifyCompletion( URL resource )\r\n {\r\n if( getAdapter().isDebugEnabled() )\r\n {\r\n getAdapter().debug( \"downloaded: \" + resource );\r\n }\r\n }", "@Override\n public void run()\n {\n final String actionDescription = \"Register configuration listener\";\n\n boolean listenerRegistered = false;\n\n while (keepTrying)\n {\n /*\n * First register a listener for the group's configuration.\n */\n while ((! listenerRegistered) && (keepTrying))\n {\n try\n {\n IntegrationGroupConfigurationClient configurationClient = new IntegrationGroupConfigurationClient(accessServiceServerName,\n accessServiceRootURL);\n eventClient.registerListener(localServerUserId,\n new GovernanceEngineOutTopicListener(groupName,\n groupHandler,\n configurationClient,\n localServerUserId,\n auditLog));\n listenerRegistered = true;\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.CONFIGURATION_LISTENER_REGISTERED.getMessageDefinition(localServerName,\n accessServiceServerName));\n }\n catch (UserNotAuthorizedException error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.SERVER_NOT_AUTHORIZED.getMessageDefinition(localServerName,\n accessServiceServerName,\n accessServiceRootURL,\n localServerUserId,\n error.getReportedErrorMessage()),\n error);\n waitToRetry();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_CONFIGURATION_LISTENER.getMessageDefinition(localServerName,\n accessServiceServerName,\n error.getClass().getName(),\n error.getMessage()),\n error);\n\n waitToRetry();\n }\n }\n\n while (keepTrying)\n {\n /*\n * Request the configuration for the governance group. If it fails just log the error but let the\n * integration daemon server continue to start. It is probably a temporary outage with the metadata server\n * which can be resolved later.\n */\n try\n {\n groupHandler.refreshConfig();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.INTEGRATION_GROUP_NO_CONFIG.getMessageDefinition(groupHandler.getIntegrationGroupName(),\n error.getClass().getName(),\n error.getMessage()),\n error.toString(),\n error);\n }\n\n waitToRetry();\n }\n\n waitToRetry();\n }\n }", "@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}", "@Override\n public void onFinish() {\n if(mListener != null && ContactUtils.checkAlphaOTAChannel(mContext)){\n mListener.checkDataContact(mDataIdContact, mIdContactSuggest, mNameContact, mPhoneContact);\n }\n }", "@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t\tsuper.channelReadComplete(ctx);\n\t}", "@Override\n\tpublic void receiveChannelInfo(Camera camera, int avChannel, int resultCode) {\n\t\t\n\t}", "@Override\n public void connected(final OfficeConnectionEvent event) {\n\n // Reset the task count and make the task executor available.\n taskCount.set(0);\n taskExecutor.setAvailable(true);\n }", "public void connectionLost(String channelID);", "void notifyCompleted(MessageSnapshot snapshot);", "public void onComplete() {\r\n\r\n }", "public void onConnectionClosed() {\r\n\t\tcurrentConnections.decrementAndGet();\r\n\t}", "static void registerDone(ChannelFuture future) {\n/* 135 */ if (!future.isSuccess()) {\n/* 136 */ Channel childChannel = future.channel();\n/* 137 */ if (childChannel.isRegistered()) {\n/* 138 */ childChannel.close();\n/* */ } else {\n/* 140 */ childChannel.unsafe().closeForcibly();\n/* */ } \n/* */ } \n/* */ }", "void onDeviceFound(TxRxScanResult scanResult);", "@Override\n public void onConnectionFailed(Die die, Exception e) {\n Log.d(TAG, \"Connection failed\", e);\n dicePlus = null;\n BluetoothManipulator.startScan();\n }", "@Override\n public void run() {\n Log.d(TAG, \"resolve: Timing out\");\n if (multicastLock.isHeld()) {\n multicastLock.release();\n\n if (nsdManagerResolverAvailState != null) {\n nsdManagerResolverAvailState.signalFree();\n }\n }\n }", "@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelReadComplete\");\n\t\tsuper.channelReadComplete(ctx);\n\t}", "void onFetchDataCompleted();", "public void fetchEvents (RJGUIController.XferCatalogMod xfer) {\n\n\t\tSystem.out.println(\"Fetching Events\");\n\t\tcur_mainshock = null;\n\n\t\t// Will be fetching from Comcat\n\n\t\thas_fetched_catalog = true;\n\n\t\t// See if the event ID is an alias, and change it if so\n\n\t\tString xlatid = GUIEventAlias.query_alias_dict (xfer.x_eventIDParam);\n\t\tif (xlatid != null) {\n\t\t\tSystem.out.println(\"Translating Event ID: \" + xfer.x_eventIDParam + \" -> \" + xlatid);\n\t\t\txfer.modify_eventIDParam(xlatid);\n\t\t}\n\n\t\t// Fetch mainshock into our data structures\n\t\t\n\t\tString eventID = xfer.x_eventIDParam;\n\t\tfcmain = new ForecastMainshock();\n\t\tfcmain.setup_mainshock_poll (eventID);\n\t\tPreconditions.checkState(fcmain.mainshock_avail, \"Event not found: %s\", eventID);\n\n\t\tcur_mainshock = fcmain.get_eqk_rupture();\n\n\t\t// Finish setting up the mainshock\n\n\t\tsetup_for_mainshock (xfer);\n\n\t\t// Make the search region\n\n\t\tsetup_search_region (xfer);\n\n\t\t// Get the aftershocks\n\n\t\tComcatOAFAccessor accessor = new ComcatOAFAccessor();\n\n\t\tcur_aftershocks = accessor.fetchAftershocks (\n\t\t\tcur_mainshock,\n\t\t\tfetch_fcparams.min_days,\n\t\t\tfetch_fcparams.max_days,\n\t\t\tfetch_fcparams.min_depth,\n\t\t\tfetch_fcparams.max_depth,\n\t\t\tfetch_fcparams.aftershock_search_region,\n\t\t\tfetch_fcparams.aftershock_search_region.getPlotWrap(),\n\t\t\tfetch_fcparams.min_mag\n\t\t);\n\n\t\t// Perform post-fetch actions\n\n\t\tpostFetchActions (xfer);\n\n\t\treturn;\n\t}", "protected void onDiscoveryFailed() {\n logAndShowSnackbar(\"Could not subscribe.\");\n }", "@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }", "public void finished() {\r\n\t\t// Mark ourselves as finished.\r\n\t\tif (finished) { return; }\r\n\t\tfinished = true;\r\n\t\tif (ic != null) {\r\n\t\t\tjvr.removeEventListener(ic);\r\n\t\t\ttry {\r\n\t\t\t\tdx.stopch(dxdev,dx.EV_ASYNC);\r\n\t\t\t}\r\n\t\t\tcatch (JVRException e) { logger.throwing(getClass().getName(),\"finished\",e); }\r\n\t\t}\r\n\t\t// Notify any \"waiters\" that we are done.\r\n\t\tsynchronized (this) { notifyAll(); }\r\n\t\t// Fire an event for asynchronous JVR event listeners.\r\n\t\tnew JVREvent(this,\"finished\").fire();\r\n\t\t// For debugging only.\r\n\t\t// logger.info(\"(FINISHED)\\n\" + this);\r\n\t}", "@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 }", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "@Override\n\tpublic void finish() {\n\t\ttry {\n\t\t\tunregisterReceiver(closeReceiver);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t}\n\t\tsuper.finish();\n\t}", "void onDiscoverPeersSuccess();", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase MSG_SEARCH_FINISHED:\n\t\t\t\t\tafterSearch();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t}", "protected void onThreadFinish() {\n\t\t// notify test finish\n\t\tparent.finishLock.countDown();\n\n\t\t// print finish summary message\n\t\tprintThreadFinishMessage();\n\t}", "void onScanResult(final IScanResult result);", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }" ]
[ "0.6656752", "0.6378516", "0.6155611", "0.60236675", "0.5969147", "0.57528365", "0.5692029", "0.5601687", "0.55736744", "0.5560468", "0.55367243", "0.5489791", "0.54508334", "0.5403128", "0.5379649", "0.53671885", "0.5346298", "0.5254292", "0.52370787", "0.52295935", "0.5226638", "0.52166253", "0.52163965", "0.52040166", "0.52038467", "0.5167385", "0.5162916", "0.5125191", "0.50755966", "0.50657356", "0.5064422", "0.50600374", "0.5051363", "0.50450414", "0.50380623", "0.5033278", "0.5031597", "0.501246", "0.50055397", "0.5005507", "0.4995765", "0.49939904", "0.49917066", "0.4990662", "0.49847472", "0.49709955", "0.49585375", "0.49507654", "0.49447462", "0.4941217", "0.49382132", "0.493682", "0.49366045", "0.49337798", "0.49332803", "0.4931203", "0.4930841", "0.4928823", "0.4916639", "0.49124005", "0.4910265", "0.4906418", "0.4904213", "0.49030927", "0.4902691", "0.48862427", "0.48858133", "0.48832688", "0.48714656", "0.4869094", "0.48686954", "0.48653337", "0.4858009", "0.48550946", "0.48493814", "0.4845267", "0.48444912", "0.4836044", "0.48350942", "0.4832892", "0.48301536", "0.4827436", "0.48169708", "0.48129302", "0.48104182", "0.48068225", "0.48049513", "0.4800805", "0.48007628", "0.4797559", "0.47950804", "0.47941786", "0.47938138", "0.47900474", "0.4788743", "0.4786865", "0.47860226", "0.47835547", "0.47825468", "0.47825468" ]
0.69921935
0
There are 35 key buttons available (KEYS.length), but the language may need a smaller amount (Start.keysArraySize) Starting with k = 1 to skip the header row
public void loadKeyboard() { keysInUse = keyList.size(); partial = keysInUse % (KEYS.length - 2); totalScreens = keysInUse / (KEYS.length - 2); if (partial != 0) { totalScreens++; } int visibleKeys; if (keysInUse > KEYS.length) { visibleKeys = KEYS.length; } else { visibleKeys = keysInUse; } for (int k = 0; k < visibleKeys; k++) { TextView key = findViewById(KEYS[k]); key.setText(keyList.get(k).baseKey); String tileColorStr = COLORS[Integer.parseInt(keyList.get(k).keyColor)]; int tileColor = Color.parseColor(tileColorStr); key.setBackgroundColor(tileColor); } if (keysInUse > KEYS.length) { TextView key34 = findViewById(KEYS[KEYS.length - 2]); key34.setBackgroundResource(R.drawable.zz_backward_green); key34.setRotationY(getResources().getInteger(R.integer.mirror_flip)); key34.setText(""); TextView key35 = findViewById(KEYS[KEYS.length - 1]); key35.setRotationY(getResources().getInteger(R.integer.mirror_flip)); key35.setBackgroundResource(R.drawable.zz_forward_green); key35.setText(""); } for (int k = 0; k < KEYS.length; k++) { TextView key = findViewById(KEYS[k]); if (k < keysInUse) { key.setVisibility(View.VISIBLE); key.setClickable(true); } else { key.setVisibility(View.INVISIBLE); key.setClickable(false); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateAllKeys(){\n\t\tboolean isWhite;\n//\t\tint pitchOffset = 21;\n\t\tint pitchOffset = 1;\n\t\tint keyWidth = this.width / this.numKeys;\n\t\t\n\t\tfor(int i = 0; i<88; i++){\n\t\t\tswitch (i%12){\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 8:\n\t\t\tcase 10:\tisWhite = false;\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\tisWhite = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(isWhite)\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height, keyWidth, i+ pitchOffset, isWhite);\n\t\t\telse\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height / 2, (keyWidth * 2)/3, i+ pitchOffset, isWhite);\n\t\t}\n\t}", "private void setUpKeyboardButtons() {\n mQWERTY = \"qwertyuiopasdfghjklzxcvbnm_\";\n mQWERTYWithDot = \"qwertyuiopasdfghjklzxcvbnm.\";\n\n mKeySize = mQWERTY.length();\n\n mLetterButtons = new Button[mQWERTY.length()];\n mKeyObjects = new KeyObject[mQWERTY.length() + 10];\n mIsShiftPressed = false;\n\n\n for (int i = 0; i < mQWERTY.length(); i++) {\n int id = getResources().getIdentifier(mQWERTY.charAt(i) + \"Button\", \"id\", getPackageName());\n mLetterButtons[i] = (Button) findViewById(id);\n\n final int finalI = i;\n mLetterButtons[i].setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n // create KeyObject when button is pressed and assign pressed features\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n mKeyObjects[finalI] = new KeyObject();\n\n Rect buttonShape = new Rect();\n v.getLocalVisibleRect(buttonShape);\n\n mKeyObjects[finalI].setPressedPressure(event.getPressure());\n mKeyObjects[finalI].setPressedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXPressed(event.getX());\n mKeyObjects[finalI].setCoordYPressed(event.getY());\n\n mKeyObjects[finalI].setCenterXCoord(buttonShape.exactCenterX());\n mKeyObjects[finalI].setCenterYCoord(buttonShape.exactCenterY());\n }\n\n // assign release features, check if button is canceled\n if (event.getAction() == MotionEvent.ACTION_UP) {\n mKeyObjects[finalI].setReleasedPressure(event.getPressure());\n mKeyObjects[finalI].setReleasedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXReleased(event.getX());\n mKeyObjects[finalI].setCoordYReleased(event.getY());\n\n if (mIsShiftPressed) {\n mKeyObjects[finalI].setKeyChar(Character.toUpperCase(mQWERTYWithDot.charAt(finalI)));\n } else {\n mKeyObjects[finalI].setKeyChar(mQWERTYWithDot.charAt(finalI));\n }\n\n Log.d(TAG, mKeyObjects[finalI].toString());\n\n\n // add key to buffer and update EditText\n if (mKeyBuffer.add(mKeyObjects[finalI]))\n if (mIsShiftPressed) {\n mPasswordEditText.append((mQWERTYWithDot.charAt(finalI) + \"\").toUpperCase());\n switchToLowerCase();\n } else {\n mPasswordEditText.append(mQWERTYWithDot.charAt(finalI) + \"\");\n }\n }\n\n return false;\n }\n });\n }\n\n mShiftButton = (Button) findViewById(R.id.shiftButton);\n mShiftButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mIsShiftPressed) {\n switchToLowerCase();\n } else {\n switchToUpperCase();\n }\n }\n });\n }", "public void addKeys() {\n\t\tbtnDot = new JButton(\".\");\n\t\tbtnDot.setBounds(42, 120, 40, 40);\n\t\tthis.add(btnDot); //Handle case\n\t\t\n\t\tbtn0 = new JButton(\"0\");\n\t\tbtn0.setBounds(81, 120, 40, 40);\n\t\tthis.add(btn0);\n\t\tnumberButtonList = new ArrayList<JButton>(10);\n\t\tnumberButtonList.add(btn0);\n\t\t\n\t\tbtnC = new JButton(\"C\");\n\t\tbtnC.setBounds(120, 120, 40, 40);\n\t\tthis.add(btnC);\n\t\t\n\t\tbtnStar = new JButton(\"*\");\n\t\tbtnStar.setBounds(159, 120, 40, 40);\n\t\tthis.add(btnStar);\n\t\toperationButtonList = new ArrayList<JButton>(10);\n\t\toperationButtonList.add(btnStar);\n\t\t\n\t\tbtnPi = new JButton(\"π\");\n\t\tbtnPi.setBounds(198, 120, 40, 40);\n\t\tthis.add(btnPi);\n\t\t//numberButtonList.add(btnPi); //Special case\n\t\tvalueButtons.add(btnPi);\n\t\t\n\t\tbtnLn = new JButton(\"ln\");\n\t\tbtnLn.setBounds(237, 120, 40, 40);\n\t\tthis.add(btnLn);\n\t\tresultOperations.add(btnLn);\n\t\t\n\t\t//Row 2\n\t\t\n\t\tbtn3 = new JButton(\"3\");\n\t\tbtn3.setBounds(42, 80, 40, 40);\n\t\tthis.add(btn3);\n\t\tnumberButtonList.add(btn3);\n\t\t\n\t\tbtn2 = new JButton(\"2\");\n\t\tbtn2.setBounds(81, 80, 40, 40);\n\t\tthis.add(btn2);\n\t\tnumberButtonList.add(btn2);\n\t\t\n\t\tbtn1 = new JButton(\"1\");\n\t\tbtn1.setBounds(120, 80, 40, 40);\n\t\tthis.add(btn1);\n\t\tnumberButtonList.add(btn1);\n\t\t\n\t\tbtnDivide = new JButton(\"/\");\n\t\tbtnDivide.setBounds(159, 80, 40, 40);\n\t\tthis.add(btnDivide);\n\t\toperationButtonList.add(btnDivide);\n\t\t\n\t\tbtnE = new JButton(\"e\");\n\t\tbtnE.setBounds(198, 80, 40, 40);\n\t\tthis.add(btnE);\n\t\tvalueButtons.add(btnE);\n\t\t//numberButtonList.add(btnE); //Special case\n\t\t\n\t\tbtnTan = new JButton(\"tan\");\n\t\tbtnTan.setBounds(237, 80, 40, 40);\n\t\tthis.add(btnTan);\n\t\tresultOperations.add(btnTan);\n\t\t\n\t\t//Row 3\n\t\t\n\t\tbtn6 = new JButton(\"6\");\n\t\tbtn6.setBounds(42, 40, 40, 40);\n\t\tthis.add(btn6);\n\t\tnumberButtonList.add(btn6);\n\t\t\n\t\tbtn5 = new JButton(\"5\");\n\t\tbtn5.setBounds(81, 40, 40, 40);\n\t\tthis.add(btn5);\n\t\tnumberButtonList.add(btn5);\n\t\t\n\t\tbtn4 = new JButton(\"4\");\n\t\tbtn4.setBounds(120, 40, 40, 40);\n\t\tthis.add(btn4);\n\t\tnumberButtonList.add(btn4);\n\t\t\n\t\tbtnMinus = new JButton(\"-\");\n\t\tbtnMinus.setBounds(159, 40, 40, 40);\n\t\tthis.add(btnMinus);\n\t\toperationButtonList.add(btnMinus);\n\t\t\n\t\tbtnSqRt = new JButton(\"√\");\n\t\tbtnSqRt.setBounds(198, 40, 40, 40);\n\t\tthis.add(btnSqRt);\n\t\tresultOperations.add(btnSqRt);\n\t\t\n\t\tbtnCos = new JButton(\"cos\");\n\t\tbtnCos.setBounds(237, 40, 40, 40);\n\t\tthis.add(btnCos);\n\t\tresultOperations.add(btnCos);\n\t\t\n\t\t//Row 4\n\t\t\n\t\tbtn9 = new JButton(\"9\");\n\t\tbtn9.setBounds(42, 0, 40, 40);\n\t\tthis.add(btn9);\n\t\tnumberButtonList.add(btn9);\n\t\t\n\t\tbtn8 = new JButton(\"8\");\n\t\tbtn8.setBounds(81, 0, 40, 40);\n\t\tthis.add(btn8);\n\t\tnumberButtonList.add(btn8);\n\t\t\n\t\tbtn7 = new JButton(\"7\");\n\t\tbtn7.setBounds(120, 0, 40, 40);\n\t\tthis.add(btn7);\n\t\tnumberButtonList.add(btn7);\n\t\t\n\t\tbtnPlus = new JButton(\"+\");\n\t\tbtnPlus.setBounds(159, 0, 40, 40);\n\t\tthis.add(btnPlus);\n\t\toperationButtonList.add(btnPlus);\n\t\t\n\t\tbtnPower = new JButton(\"^\");\n\t\tbtnPower.setBounds(198, 0, 40, 40);\n\t\tthis.add(btnPower);\n\t\toperationButtonList.add(btnPower);\n\t\t\n\t\tbtnSin = new JButton(\"sin\");\n\t\tbtnSin.setBounds(237, 0, 40, 40);\n\t\tthis.add(btnSin);\n\t\tresultOperations.add(btnSin);\n\t}", "private void initKeys() { \n //add left, down, right, up\n playerKeys.add(new keyList(KeyInput.KEY_J, KeyInput.KEY_K, KeyInput.KEY_L, KeyInput.KEY_I));\n }", "private void updateKeyboard() {\n\n int keysLimit;\n if(totalScreens == keyboardScreenNo) {\n keysLimit = partial;\n for (int k = keysLimit; k < (KEYS.length - 2); k++) {\n TextView key = findViewById(KEYS[k]);\n key.setVisibility(View.INVISIBLE);\n }\n } else {\n keysLimit = KEYS.length - 2;\n }\n\n for (int k = 0; k < keysLimit; k++) {\n TextView key = findViewById(KEYS[k]);\n int keyIndex = (33 * (keyboardScreenNo - 1)) + k;\n key.setText(keyList.get(keyIndex).baseKey); // KP\n key.setVisibility(View.VISIBLE);\n // Added on May 15th, 2021, so that second and following screens use their own color coding\n String tileColorStr = COLORS[Integer.parseInt(keyList.get(keyIndex).keyColor)];\n int tileColor = Color.parseColor(tileColorStr);\n key.setBackgroundColor(tileColor);\n }\n\n }", "@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n if (mode == 0){\r\n mode = 1; //starts the game\r\n }\r\n\r\n if(e.getKeyChar() == 'w')\r\n {\r\n buttons[0][0] = true;\r\n }\r\n if(e.getKeyChar() == 'a')\r\n {\r\n buttons[0][1] = true;\r\n }\r\n if(e.getKeyChar() == 's')\r\n {\r\n buttons[0][2] = true;\r\n }\r\n if(e.getKeyChar() == 'd')\r\n {\r\n buttons[0][3] = true;\r\n }\r\n if(e.getKeyChar() == 'f')\r\n {\r\n buttons[0][4] = true;\r\n }\r\n if(e.getKeyChar() == 'g')\r\n {\r\n buttons[0][5] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n buttons[1][0] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_LEFT)\r\n {\r\n buttons[1][1] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n buttons[1][2] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_RIGHT)\r\n {\r\n buttons[1][3] = true;\r\n }\r\n if(e.getKeyChar() == '.')\r\n {\r\n buttons[1][4] = true;\r\n }\r\n if(e.getKeyChar() == '/')\r\n {\r\n buttons[1][5] = true;\r\n }\r\n }", "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 }", "short getDefaultKeyIx();", "public void setKeyPressed(int keyCode){\n this.keys[keyCode] = true;\n\n }", "void createKeyBindings() {\n\t\tint nextKey = fContainerManager.isMirrored() ? SWT.ARROW_LEFT : SWT.ARROW_RIGHT;\n\t\tint previousKey = fContainerManager.isMirrored() ? SWT.ARROW_RIGHT : SWT.ARROW_LEFT;\n\t\t\n\t\t// Navigation\n\t\tsetKeyBinding(SWT.ARROW_UP, ST.LINE_UP);\t\n\t\tsetKeyBinding(SWT.ARROW_DOWN, ST.LINE_DOWN);\n\t\t\t\n\t\tsetKeyBinding(SWT.HOME, ST.LINE_START);\n\t\tsetKeyBinding(SWT.END, ST.LINE_END);\n\t\tsetKeyBinding(SWT.HOME | SWT.MOD1, ST.TEXT_START);\n\t\tsetKeyBinding(SWT.END | SWT.MOD1, ST.TEXT_END);\n\t\tsetKeyBinding(nextKey | SWT.MOD1, ST.WORD_NEXT);\n\t\tsetKeyBinding(previousKey | SWT.MOD1, ST.WORD_PREVIOUS);\n\n\t\tsetKeyBinding(SWT.PAGE_UP, ST.PAGE_UP);\n\t\tsetKeyBinding(SWT.PAGE_DOWN, ST.PAGE_DOWN);\n\t\tsetKeyBinding(SWT.PAGE_UP | SWT.MOD1, ST.WINDOW_START);\n\t\tsetKeyBinding(SWT.PAGE_DOWN | SWT.MOD1, ST.WINDOW_END);\n\t\tsetKeyBinding(nextKey, ST.COLUMN_NEXT);\n\t\tsetKeyBinding(previousKey, ST.COLUMN_PREVIOUS);\n\t\t\n\t\t// Selection\n\t\tsetKeyBinding(SWT.ARROW_UP | SWT.MOD2, ST.SELECT_LINE_UP);\t\n\t\tsetKeyBinding(SWT.ARROW_DOWN | SWT.MOD2, ST.SELECT_LINE_DOWN);\n\n\t\tsetKeyBinding(SWT.HOME | SWT.MOD2, ST.SELECT_LINE_START);\n\t\tsetKeyBinding(SWT.END | SWT.MOD2, ST.SELECT_LINE_END);\n\t\tsetKeyBinding(SWT.HOME | SWT.MOD1 | SWT.MOD2, ST.SELECT_TEXT_START);\t\n\t\tsetKeyBinding(SWT.END | SWT.MOD1 | SWT.MOD2, ST.SELECT_TEXT_END);\n\t\tsetKeyBinding(nextKey | SWT.MOD1 | SWT.MOD2, ST.SELECT_WORD_NEXT);\n\t\tsetKeyBinding(previousKey | SWT.MOD1 | SWT.MOD2, ST.SELECT_WORD_PREVIOUS);\n\t\t\n\t\tsetKeyBinding(SWT.PAGE_UP | SWT.MOD2, ST.SELECT_PAGE_UP);\n\t\tsetKeyBinding(SWT.PAGE_DOWN | SWT.MOD2, ST.SELECT_PAGE_DOWN);\n\t\tsetKeyBinding(SWT.PAGE_UP | SWT.MOD1 | SWT.MOD2, ST.SELECT_WINDOW_START);\n\t\tsetKeyBinding(SWT.PAGE_DOWN | SWT.MOD1 | SWT.MOD2, ST.SELECT_WINDOW_END);\n\t\tsetKeyBinding(nextKey | SWT.MOD2, ST.SELECT_COLUMN_NEXT);\n\t\tsetKeyBinding(previousKey | SWT.MOD2, ST.SELECT_COLUMN_PREVIOUS);\t\n\t \t \t\n\t\t// Modification\n\t\t// Cut, Copy, Paste\n\t\tsetKeyBinding('X' | SWT.MOD1, ST.CUT);\n\t\tsetKeyBinding('C' | SWT.MOD1, ST.COPY);\n\t\tsetKeyBinding('V' | SWT.MOD1, ST.PASTE);\n\t\n\t\t// Cut, Copy, Paste Wordstar style\n\t\tsetKeyBinding(SWT.DEL | SWT.MOD2, ST.CUT);\n\t\tsetKeyBinding(SWT.INSERT | SWT.MOD1, ST.COPY);\n\t\tsetKeyBinding(SWT.INSERT | SWT.MOD2, ST.PASTE);\n\t\t\n\t\tsetKeyBinding(SWT.BS | SWT.MOD2, ST.DELETE_PREVIOUS);\n\t\tsetKeyBinding(SWT.BS, ST.DELETE_PREVIOUS);\n\t\tsetKeyBinding(SWT.DEL, ST.DELETE_NEXT);\n\t\tsetKeyBinding(SWT.BS | SWT.MOD1, ST.DELETE_WORD_PREVIOUS);\n\t\tsetKeyBinding(SWT.DEL | SWT.MOD1, ST.DELETE_WORD_NEXT);\n\t\t\n\t\t// Miscellaneous\n\t\tsetKeyBinding(SWT.INSERT, ST.TOGGLE_OVERWRITE);\n\t}", "protected void keyPressed(int keyCode) {\n switch (gameStatus) {\n\t case notInitialized: if (keyCode==END_KEY) midlet.killApp();\n\t break;\n\t case Finished:\n\t case gameOver: if (ticks<TOTAL_OBSERVING_TIME) if (ticks>ANTI_CLICK_DELAY && ticks<FINAL_PICTURE_OBSERVING_TIME)\n\t ticks=FINAL_PICTURE_OBSERVING_TIME+1;\n\t case demoPlay:\n case titleStatus : {\n\t\t // System.out.println(\"kk:\"+keyCode/*+\", ac:\"+getGameAction(keyCode)+\", acn:\"+getKeyName(keyCode)*/);\n\t\t switch (keyCode) {\n\t\t\t\t case MENU_KEY:\n\t\t\t\t midlet.ShowMainMenu();\n\t\t\t\t break;\n\t\t\t\t case END_KEY: midlet.ShowQuitMenu(false);\n\t\t\t\t break;\n\t\t\t\t default:\n\t\t\t\t if (gameStatus == demoPlay || ticks>=TOTAL_OBSERVING_TIME){\n\t gameStatus=titleStatus;\n\t\t\t ticks=0;\n\t\t\t blink=false;\n\t\t\t\t\t repaint();\n\t\t\t\t }\n\t\t }\n\t\t\t\t //midlet.commandAction(midlet.newGameCommand,this);\n } break;\n case playGame : {\n\n\t\t\t int action = getGameAction(keyCode);\n\t\t\t if (keyCode == MENU_KEY) midlet.ShowGameMenu(); else\n\t\t\t if (keyCode == END_KEY) midlet.ShowQuitMenu(true); else\n\t switch (keyCode/*action*/) {\n\t\t\t\t case Canvas.KEY_NUM6/*RIGHT*/: direct=StarGun_SB.DIRECT_RIGHT; break;\n\t case Canvas.KEY_NUM4/*LEFT*/: direct=StarGun_SB.DIRECT_LEFT; break;\n\t\t\t\t case Canvas.KEY_NUM3: direct=StarGun_SB.DIRECT_ANGLE_LEFT; break;\n\t\t\t\t case Canvas.KEY_NUM1: direct=StarGun_SB.DIRECT_ANGLE_RIGHT; break;\n\t\t\t\t case Canvas.KEY_NUM9/*RIGHT*/: direct=StarGun_SB.DIRECT_RIGHT|StarGun_SB.DIRECT_ANGLE_RIGHT; break;\n\t case Canvas.KEY_NUM7/*LEFT*/: direct=StarGun_SB.DIRECT_LEFT|StarGun_SB.DIRECT_ANGLE_LEFT; break;\n\t\t\t\t case Canvas.KEY_NUM5/*FIRE*/: direct=StarGun_SB.DIRECT_FIRE; break;\n\n\t\t\t\tdefault:direct=StarGun_SB.DIRECT_NONE;\n\t }\n }\n }\n }", "@Override\r\n public void keyPressed( KeyEvent cIniKeyEvent)\r\n {\n }", "public void keyPressed() {\r\n \t\tkeys[keyCode] = true;\r\n \t}", "private JButton getBtnKey(int i) {\r\n\t\tif (btnKey == null) {\r\n\t\t\tbtnKey = new JButton[12];\r\n\t\t}\r\n\t\t\r\n\t\tif (btnKey[i] == null) {\r\n\t\t\tbtnKey[i] = new JButton(String.valueOf(i + 1));\r\n\t\t\tswitch(i) {\r\n\t\t\t\tcase KEY_AST:\r\n\t\t\t\t\tbtnKey[i].setText(\"*\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KEY_0:\r\n\t\t\t\t\tbtnKey[i].setText(\"0\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KEY_POUND:\r\n\t\t\t\t\tbtnKey[i].setText(\"#\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbtnKey[i].addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\ttxtInput.setText(txtInput.getText() + ((JButton)e.getSource()).getText());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn btnKey[i];\r\n\t}", "private void setKey(int length) {\n final char[] chars = new char[length];\n for (int i = 0; i < length; i++) {\n chars[i] = ASCII[random.nextInt(ASCII.length)];\n }\n textKey.setText(new String(chars));\n textKey.selectAll();\n textKey.requestFocus();\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == e.VK_UP){\n\t\t\tkeys[0] = true;\n\t\t} else if(e.getKeyCode() == e.VK_DOWN){\n\t\t\tkeys[1] = true;\n\t\t}else if(e.getKeyCode() == e.VK_RIGHT){\n\t\t\tkeys[2] = true;\n\t\t}else if(e.getKeyCode() == e.VK_LEFT){\n\t\t\tkeys[3] = true;\n\t\t}\n\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tkeys[e.getKeyCode()]=true;\t}", "@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 }", "@Override\r\n public void keyPressed(KeyEvent e) {\r\n // set true to every key pressed\r\n keys[e.getKeyCode()] = true;\r\n }", "private void setKey() {\n\t\t \n\t}", "@Override\r\n public void keyReleased(KeyEvent e)\r\n {\r\n \r\n if(e.getKeyChar() == 'w')\r\n {\r\n buttons[0][0] = false;\r\n }\r\n if(e.getKeyChar() == 'a')\r\n {\r\n buttons[0][1] = false;\r\n }\r\n if(e.getKeyChar() == 's')\r\n {\r\n buttons[0][2] = false;\r\n }\r\n if(e.getKeyChar() == 'd')\r\n {\r\n buttons[0][3] = false;\r\n }\r\n if(e.getKeyChar() == 'f')\r\n {\r\n buttons[0][4] = false;\r\n }\r\n if(e.getKeyChar() == 'g')\r\n {\r\n buttons[0][5] = false;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n buttons[1][0] = false;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_LEFT)\r\n {\r\n buttons[1][1] = false;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n buttons[1][2] = false;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_RIGHT)\r\n {\r\n buttons[1][3] = false;\r\n }\r\n if(e.getKeyChar() == '.')\r\n {\r\n buttons[1][4] = false;\r\n }\r\n if(e.getKeyChar() == '/')\r\n {\r\n buttons[1][5] = false;\r\n }\r\n }", "private void initCommandButtons(char[] levelLetters) {\n\t\tthis.btnTopFirst = (Button) findViewById(R.id.buttonTopFirst);\n\t\tthis.btnTopSecond = (Button) findViewById(R.id.buttonTopSecond);\n\t\tthis.btnTopThird = (Button) findViewById(R.id.buttonTopThird);\n\t\tthis.btnTopFourth = (Button) findViewById(R.id.buttonTopFourth);\n\n\t\tthis.btnBotFirst = (Button) findViewById(R.id.buttonBotFirst);\n\t\tthis.btnBotSecond = (Button) findViewById(R.id.buttonBotSecond);\n\t\tthis.btnBotThird = (Button) findViewById(R.id.buttonBotThird);\n\t\tthis.btnBotFourth = (Button) findViewById(R.id.buttonBotFourth);\n\t\tthis.letterButtons = new Button[] { btnBotFirst, btnBotSecond,\n\t\t\t\tbtnBotThird, btnBotFourth, btnTopFirst, btnTopSecond,\n\t\t\t\tbtnTopThird, btnTopFourth };\n\t\tthis.btnEndWord = (Button) findViewById(R.id.btnEndWord);\n\n\t\t// End word should be disabled by default\n\t\tthis.btnEndWord.setEnabled(false);\n\n\t\t// Populate level letters\n\t\tint index = 0;\n\t\tfor (Button btn : this.letterButtons) {\n\t\t\tbtn.setText(\"\" + levelLetters[index]);\n\t\t\tindex++;\n\t\t}\n\t}", "public interface KeyCode {\n\n // Alphabet keys:\n int A_UPPER_CASE = 65;\n int B_UPPER_CASE = 66;\n int C_UPPER_CASE = 67;\n int D_UPPER_CASE = 68;\n int E_UPPER_CASE = 69;\n int F_UPPER_CASE = 70;\n int G_UPPER_CASE = 71;\n int H_UPPER_CASE = 72;\n int I_UPPER_CASE = 73;\n int J_UPPER_CASE = 74;\n int K_UPPER_CASE = 75;\n int L_UPPER_CASE = 76;\n int M_UPPER_CASE = 77;\n int N_UPPER_CASE = 78;\n int O_UPPER_CASE = 79;\n int P_UPPER_CASE = 80;\n int Q_UPPER_CASE = 81;\n int R_UPPER_CASE = 82;\n int S_UPPER_CASE = 83;\n int T_UPPER_CASE = 84;\n int U_UPPER_CASE = 85;\n int V_UPPER_CASE = 86;\n int W_UPPER_CASE = 87;\n int X_UPPER_CASE = 88;\n int Y_UPPER_CASE = 89;\n int Z_UPPER_CASE = 90;\n\n // int A_LOWER_CASE = 97;\n // int B_LOWER_CASE = 98;\n // int C_LOWER_CASE = 99;\n // int D_LOWER_CASE = 100;\n // int E_LOWER_CASE = 101;\n // int F_LOWER_CASE = 102;\n // int G_LOWER_CASE = 103;\n // int H_LOWER_CASE = 104;\n // int I_LOWER_CASE = 105;\n // int J_LOWER_CASE = 106;\n // int K_LOWER_CASE = 107;\n // int L_LOWER_CASE = 108;\n // int M_LOWER_CASE = 109;\n // int N_LOWER_CASE = 110;\n // int O_LOWER_CASE = 111;\n // int P_LOWER_CASE = 112;\n // int Q_LOWER_CASE = 113;\n // int R_LOWER_CASE = 114;\n // int S_LOWER_CASE = 115;\n // int T_LOWER_CASE = 116;\n // int U_LOWER_CASE = 117;\n // int V_LOWER_CASE = 118;\n // int W_LOWER_CASE = 119;\n // int X_LOWER_CASE = 120;\n // int Y_LOWER_CASE = 121;\n // int Z_LOWER_CASE = 122;\n\n // Numeric keys:\n int NUMPAD_0 = 96;\n int NUMPAD_1 = 97;\n int NUMPAD_2 = 98;\n int NUMPAD_3 = 99;\n int NUMPAD_4 = 100;\n int NUMPAD_5 = 101;\n int NUMPAD_6 = 102;\n int NUMPAD_7 = 103;\n int NUMPAD_8 = 104;\n int NUMPAD_9 = 105;\n\n int NUM_0 = 48;\n int NUM_1 = 49;\n int NUM_2 = 50;\n int NUM_3 = 51;\n int NUM_4 = 52;\n int NUM_5 = 53;\n int NUM_6 = 54;\n int NUM_7 = 55;\n int NUM_8 = 56;\n int NUM_9 = 57;\n\n int PERSIAN_0 = 1776;\n int PERSIAN_1 = 1777;\n int PERSIAN_2 = 1778;\n int PERSIAN_3 = 1779;\n int PERSIAN_4 = 1780;\n int PERSIAN_5 = 1781;\n int PERSIAN_6 = 1782;\n int PERSIAN_7 = 1783;\n int PERSIAN_8 = 1784;\n int PERSIAN_9 = 1785;\n\n // Function keys:\n int F1 = 112;\n int F2 = 113;\n int F3 = 114;\n int F4 = 115;\n int F5 = 116;\n int F6 = 117;\n int F7 = 118;\n int F8 = 119;\n int F9 = 120;\n int F10 = 121;\n int F11 = 122;\n int F12 = 123;\n\n // Control Keys:\n int BACKSPACE = 8;\n int TAB = 9;\n int ENTER = 13;\n int SHIFT = 16;\n int CTRL = 17;\n int ALT = 18;\n int PAUSE_BREAK = 19;\n int CAPS_LOCK = 20;\n int ESCAPE = 27;\n int PAGEUP = 33;\n int PAGEDOWN = 34;\n int END = 35;\n int HOME = 36;\n int LEFT = 37;\n int UP = 38;\n int RIGHT = 39;\n int DOWN = 40;\n int PRINT_SCREEN = 44;\n int INSERT = 45;\n int DELETE = 46;\n\n // Other Keys:\n int SPACE = 32;\n int EQUALITY = 61;\n int LEFT_WINDOW_KEY = 91;\n int RIGHT_WINDOW_KEY = 92;\n int SELECT_KEY = 93; // besides of right control key (context menu key, usually works like right click)\n int MULTIPLY = 106;\n int ADD = 107;\n int SUBTRACT = 109;\n int DECIMAL_POINT = 110;// . in numpad section\n int DIVIDE = 111;\n int NUM_LOCK = 144;\n int SCROLL_LOCK = 145;\n int SEMI_COLON = 186;// ;\n int EQUAL_SIGN = 187;// =\n int COMMA = 188;// ,\n int DASH = 189;// -\n int PERIOD = 190;// . in alphabet section\n int FORWARD_SLASH = 191;// /\n int GRAVE_ACCENT = 192; // `\n int OPEN_BRACKET = 219; // [\n int BACK_SLASH = 220; // \\\n int CLOSE_BRAKET = 221; // ]\n int SINGLE_QUOTE = 222; // '\n}", "int getNumKeys();", "@SuppressWarnings(\"serial\")\n private void enableGamePlayKeys() {\n if (CLASSIC_MODE.equals(myGameMode)) {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"left\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"right\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"down\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"rotateCW\");\n }\n else {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"left\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"right\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"down\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"rotateCW\");\n }\n\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), \"drop\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_P, 0), \"pause\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, 0), \"rotateCCW\");\n\n getActionMap().put(\"left\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.left();\n }\n });\n\n getActionMap().put(\"right\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.right();\n }\n });\n\n getActionMap().put(\"down\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.down();\n }\n });\n\n getActionMap().put(\"rotateCW\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.rotateCW();\n }\n });\n\n getActionMap().put(\"rotateCCW\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.rotateCCW();\n }\n });\n\n getActionMap().put(\"right\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.right();\n }\n });\n\n getActionMap().put(\"drop\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.drop();\n }\n });\n\n getActionMap().put(\"pause\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n if (myTimer.isRunning()) {\n pauseTimer();\n } else {\n startTimer();\n }\n }\n });\n }", "private JPanel getPnlKeypad() {\r\n\t\tif (pnlKeypad == null) {\r\n\t\t\tGridLayout gridLayout = new GridLayout(4,3);\r\n\t\t\tgridLayout.setRows(4);\r\n\t\t\tpnlKeypad = new JPanel();\r\n\t\t\tpnlKeypad.setLayout(gridLayout);\r\n\t\t\tfor(int i = KEY_1; i <= KEY_POUND; i++) {\r\n\t\t\t\tpnlKeypad.add(getBtnKey(i), null);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pnlKeypad;\r\n\t}", "public void keyPressed(KeyEvent e){\n keyCode= e.getKeyCode();// kode kelidi ke feshar dade mishawad ra darad.\n /* dar dasturate in If, kelide Enter wa ArrowKeys Fa'al mishawand-*/\n if(cellSelCounter==1 &&(e.getSource()==jp || e.getSource()==jtf[klp1][klp2]))\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){\n if(i!=-1 && i!=30)\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.yellow){\n if(i<=29 && i>=0 && j>=0 && j<=25){// nabayad az mahdudeye Khaneha Kharej shod.\n if(keyCode==10 || keyCode==40){ // 10 baraye kelide Enter wa 40 baraye kelide DownArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);// khanye gabli sefid mishawad.\n if(++i!=30)// nabayad az mahdudeye khaneha kharej shod.\n jtf[i][j].setBackground(Color.blue);// khaneye paeini abi mishawad.\n jp.grabFocus();\n }\n if(keyCode==39 && jtf[i][j].getBackground()!=Color.yellow){// 39 baraye kelide RightArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n if(++j!=26)\n jtf[i][j].setBackground(Color.blue);\n jp.grabFocus();\n }\n if(keyCode==37 && jtf[i][j].getBackground()!=Color.yellow){// 37 baraye kelide LeftArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n if(--j!=-1)\n jtf[i][j].setBackground(Color.blue);\n jp.grabFocus();\n }\n if(keyCode==38){// 38 baraye kelide UpArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n if(--i!=-1)\n jtf[i][j].setBackground(Color.blue);\n jp.grabFocus();\n }\n }//payane if(i<=29 && i>=0 && j>=0 && j<=25).\n }// payane if(jtf[i][j].getBackground()...\n cellSelCounter=1;\n }// payane Barresiye Kelidhaye jahati wa Enter\n /* ba estefade az dasture ife zir, Kelidhaye harfi wa ragami barresi mishawad*/\n if(cellSelCounter==1 && e.getSource()==jp && !e.isAltDown() && !e.isControlDown() && !e.isShiftDown())\n if(/*kelide A-Z*/(keyCode>=65 && keyCode<=90) || /*Kelide 1-9*/(keyCode>=48 && keyCode<=57) ||\n /*Kelid NUMpad*/(keyCode>=96 && keyCode<=105) || (/* backSpace */keyCode==8) || (/* Space */keyCode==32))\n for(int i=0;i<30;i++) // bazadane yeki az kelidhaye-\n for(int j=0;j<26;j++) // -harfi ya adadi waya BackSpase ya Space-\n if(jtf[i][j].getBackground()==Color.blue){// -khaneye fa'al gable neweshtan mishawad.\n jtf[i][j].setBackground(Color.yellow);\n jtf[i][j].setEnabled(true);\n jtf[i][j].grabFocus();\n if(keyCode!=8)// agar kelide BackSpace Bashad, matn pak mishawad.\n jtf[i][j].setText(\"\"+e.getKeyChar());\n else\n jtf[i][j].setText(\"\");\n setEdit();\n setNotSaved();\n setTxp(i, j);\n cellSelCounter=1;\n }// payane barresiye kelidhaye harfi wa adadi\n if(keyCode==27 && (e.getSource()==jp || e.getSource()==jtf[klp1][klp2]) )\n for(int i=0; i<30; i++)// agare kelide Escape (Esc) zade shawad, tamamiye khaneha geyre fal mishawand\n for(int j=0; j<26; j++){\n if(jtf[i][j].getBackground()==Color.yellow)\n jtf[i][j].setText(\"\");\n jtf[i][j].setEnabled(false);\n jtf[i][j].setBackground(Color.white);\n jp.grabFocus();\n setNotEdit();\n setNotSelected();\n }// payane barresiye Kelide Esc\n if (e.isControlDown())// kelidhaye miyanBor Shenasaie maishwand\n switch(keyCode){\n case (int)'N':// Menuye New\n new AL(1).actionPerformed(null);\n break;\n case (int)'O':// menuye Open\n new AL(2).actionPerformed(null);\n break;\n case (int)'S':// menuye Save\n if (e.isShiftDown())// agar Shift ham gerefte shawad, Save as Entekhab migardad\n new AL(4).actionPerformed(null);\n else// agar fagat control gerefte shawad, save entekhab mishawad.\n new AL(3).actionPerformed(null);\n break;\n case (int)'X':// menuye Cut\n new AL(6).actionPerformed(null);\n break;\n case (int)'C':// Menuye Copy\n new AL(7).actionPerformed(null);\n break;\n case (int)'V':// Menuye Paste\n new AL(8).actionPerformed(null);\n break;\n case (int)'A':\n new AL(14).actionPerformed(null);\n break;\n case 49:// 49 baraye kelide 1 wa menuye Max ast\n new AL(9).actionPerformed(null);\n break;\n case 50:// 50 baraye kelide 2 wa menuye Min ast\n new AL(10).actionPerformed(null);\n break;\n case 51:// 51 baraye kelide 3 wa menuye Sum ast\n new AL(11).actionPerformed(null);\n break;\n case 52:// 52 baraye kelide 4 wa menuye Average ast\n new AL(12).actionPerformed(null);\n break;\n case 53:// 53 baraye kelide 5 wa menuye Count ast\n new AL(13).actionPerformed(null);\n break;\n } // payane Barresiye ShortKeys\n if(e.isAltDown()) // barresiye menoye Exit wa Kelide F4\n if (keyCode==115)\n new AL(5).actionPerformed(null);// menoye Exit farakhani mishawad\n }", "public JLayeredPane makeKeys() {\n\t\t// Initialize\n\t\tString name = \"\";\n\t\tint x = 55;\n\t\tint y = 0;\n\n\t\t// Create layerPane\n\t\tJLayeredPane keyBoard = new JLayeredPane();\n\t\tkeyBoard.setPreferredSize(new Dimension(900, 162));\n\t\tkeyBoard.add(Box.createRigidArea(new Dimension(x, 0)));\n\n\t\t// Add the white key buttons\n\t\tfor (int i = 0; i < NUM_OCTAVES; i++) {\n\t\t\tfor (int j = 0; j < NUM_KEYS; j++) {\n\t\t\t\tImageIcon img = new ImageIcon(\"images/\" + notes[j] + \".png\");\n\t\t\t\tJButton jb = new JButton(img);\n\t\t\t\tname = notes[j] + octave[i];\n\t\t\t\tjb.setName(name);\n\t\t\t\tjb.setActionCommand(name);\n\t\t\t\tjb.addActionListener(this);\n\t\t\t\tjb.setBounds(x, y, 35, 162);\n\t\t\t\tkeyBoard.add(jb, new Integer(1));\n\t\t\t\tkeyBoard.add(Box.createRigidArea(new Dimension(2, 0)));\n\t\t\t\tx += 37;\n\t\t\t}\n\t\t}\n\n\t\t// Reinitialize\n\t\tx = 0;\n\n\t\t// Add the black keys\n\t\tfor (int i = 0; i < NUM_OCTAVES; i++) {\n\n\t\t\tImageIcon img = new ImageIcon(\"images/blackKey.png\");\n\n\t\t\t// Make 5 \"keys\"\n\n\t\t\tJButton jb0 = new JButton(img);\n\t\t\tname = sharps[0] + octave[i];\n\t\t\tjb0.setName(name);\n\t\t\tjb0.setActionCommand(name);\n\t\t\tjb0.addActionListener(this);\n\n\t\t\tJButton jb1 = new JButton(img);\n\t\t\tname = sharps[1] + octave[i];\n\t\t\tjb1.setName(name);\n\t\t\tjb1.setActionCommand(name);\n\t\t\tjb1.addActionListener(this);\n\n\t\t\tJButton jb2 = new JButton(img);\n\t\t\tname = sharps[2] + octave[i];\n\t\t\tjb2.setName(name);\n\t\t\tjb2.setActionCommand(name);\n\t\t\tjb2.addActionListener(this);\n\n\t\t\tJButton jb3 = new JButton(img);\n\t\t\tname = sharps[3] + octave[i];\n\t\t\tjb3.setName(name);\n\t\t\tjb3.setActionCommand(name);\n\t\t\tjb3.addActionListener(this);\n\n\t\t\tJButton jb4 = new JButton(img);\n\t\t\tname = sharps[4] + octave[i];\n\t\t\tjb4.setName(name);\n\t\t\tjb4.setActionCommand(name);\n\t\t\tjb4.addActionListener(this);\n\n\t\t\t// Place the 5 keys\n\t\t\tjb0.setBounds(77 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb0, new Integer(2));\n\n\t\t\tjb1.setBounds(115 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb1, new Integer(2));\n\n\t\t\tjb2.setBounds(188 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb2, new Integer(2));\n\n\t\t\tjb3.setBounds(226 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb3, new Integer(2));\n\n\t\t\tjb4.setBounds(264 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb4, new Integer(2));\n\t\t}\n\t\t// Return the keyboard\n\t\treturn keyBoard;\n\t}", "@Override\n\tpublic void keyPressed() {\n\t\t\n\t}", "private void button1KeyPressed(KeyEvent e) {\n }", "public void generateKeys(){\n\t\t//Apply permutation P10\n\t\tString keyP10 = permutation(key,TablesPermutation.P10);\n\t\tresults.put(\"P10\", keyP10);\n\t\t//Apply LS-1\n\t\tString ls1L = leftShift(keyP10.substring(0,5),1);\n\t\tString ls1R = leftShift(keyP10.substring(5,10),1);\n\t\tresults.put(\"LS1L\", ls1L);\n\t\tresults.put(\"LS1R\", ls1R);\n\t\t//Apply P8 (K1)\n\t\tk1 = permutation(ls1L+ls1R, TablesPermutation.P8);\n\t\tresults.put(\"K1\", k1);\n\t\t//Apply LS-2\n\t\tString ls2L = leftShift(ls1L,2);\n\t\tString ls2R = leftShift(ls1R,2);\n\t\tresults.put(\"LS2L\", ls2L);\n\t\tresults.put(\"LS2R\", ls2R);\n\t\t//Apply P8 (K2)\n\t\tk2 = permutation(ls2L+ls2R, TablesPermutation.P8);\n\t\tresults.put(\"K2\", k2);\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tint cmdType = 0, nr = 0, speed;\r\n\t\tString name = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif( e.getKeyCode() == KeyEvent.VK_CONTROL ) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Ctrl\");\r\n\t\t\tfor(Cmd c : Cmds) {\r\n\t\t\t\tif( c.getName().equals(\"Ctrl1\") || c.getName().equals(\"Ctrl2\") || c.getName().equals(\"Ctrl3\") )\r\n\t\t\t\t{\r\n\t\t\t\t\tc.setY(-50);\r\n\t\t\t\t\r\n\t\t\t\t cmdType = rand.nextInt(3);\r\n\t\t nr = 1 + rand.nextInt(9);\r\n\t\t\t\t if(cmdType == 0)\r\n\t\t\t\t \tname = \"Ctrl\";\r\n\t\t\t\t else if(cmdType == 1)\r\n\t\t\t\t \tname = \"Alt\";\r\n\t\t\t\t else\r\n\t\t\t\t \tname = \"Shift\";\r\n\t\t\t\t \r\n\t\t\t\t speed = 1+rand.nextInt(3);\r\n\t\t\t\t name = name+\"\"+nr;\r\n\t\t\t\t\r\n\t\t\t\t c.setName(name);\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}", "@Override\r\n\tpublic void keyPressed() {\n\t\tl.key();\r\n\t\t\r\n\t}", "public static void displayKeyboard(){\n\t\tfor(int i=0;i<16;i++)\n\t\t\tfor(int j=0;j<16;j++)\n\t\t\t\tif(i*16+j<36){\n\t\t\t\t\tdisplay[i][j].setIcon(keyboardIconArray[i*16+j]);\n\t\t\t\t\tdisplay[i][j].setSelectedIcon(keyboardSelectedArray[i*16+j]);\n\t\t\t\t}\t\n\t}", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void keyPressed(KeyEvent e) {\n \n \n }", "void setKeySize(int size);", "private KeyIterator()\n {\n currentIndex = 0;\n numberLeft = numberOfEntries;\n }", "void keyEventUpdate( int numKeys, String key ) ;", "@Override\n public int getCount() {\n return mBuildKeys.length + 1;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n MethodGroup = new javax.swing.ButtonGroup();\n keyTable = new GUI.TableKey();\n keyWindow = new GUI.KeyWindow();\n keyTableLabel = new javax.swing.JLabel();\n keyWindowLabel = new javax.swing.JLabel();\n keyField = new javax.swing.JTextField();\n keyTableKeyField = new javax.swing.JTextField();\n keyFieldLabel = new javax.swing.JLabel();\n keyChangeButton = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n originalTextArea = new javax.swing.JTextArea();\n originalTextAreaLabel = new javax.swing.JLabel();\n encryptedTextAreaLabel = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n encryptedTextArea = new javax.swing.JTextArea();\n EncryptionMethodLabel = new javax.swing.JLabel();\n AutomaticButton = new javax.swing.JRadioButton();\n ManualButton = new javax.swing.JRadioButton();\n keyTableKeyFieldLabel = new javax.swing.JLabel();\n keyTableKeyButton = new javax.swing.JButton();\n EncryptButton = new javax.swing.JButton();\n DecryptButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Vigenére cipher encryption tool\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setIconImages(null);\n setResizable(false);\n addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n formKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n formKeyReleased(evt);\n }\n });\n\n keyTable.setFont(new java.awt.Font(\"Times New Roman\", 0, 11)); // NOI18N\n keyTable.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n keyTableMouseClicked(evt);\n }\n });\n keyTable.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n keyTableKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n keyTableKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n keyTableKeyTyped(evt);\n }\n });\n\n javax.swing.GroupLayout keyTableLayout = new javax.swing.GroupLayout(keyTable);\n keyTable.setLayout(keyTableLayout);\n keyTableLayout.setHorizontalGroup(\n keyTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 541, Short.MAX_VALUE)\n );\n keyTableLayout.setVerticalGroup(\n keyTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 541, Short.MAX_VALUE)\n );\n\n keyWindow.setTableKey(keyTable);\n keyWindow.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n keyWindowMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout keyWindowLayout = new javax.swing.GroupLayout(keyWindow);\n keyWindow.setLayout(keyWindowLayout);\n keyWindowLayout.setHorizontalGroup(\n keyWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 201, Short.MAX_VALUE)\n );\n keyWindowLayout.setVerticalGroup(\n keyWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 21, Short.MAX_VALUE)\n );\n\n keyTableLabel.setText(\"Keying table\");\n\n keyWindowLabel.setText(\"Upcomming keys\");\n\n keyField.setText(\"Key\");\n keyField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n keyFieldActionPerformed(evt);\n }\n });\n\n keyTableKeyField.setText(\"Table Key\");\n\n keyFieldLabel.setText(\"Cipher key\");\n\n keyChangeButton.setText(\"Change key\");\n keyChangeButton.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n keyChangeButtonMouseClicked(evt);\n }\n });\n keyChangeButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n keyChangeButtonActionPerformed(evt);\n }\n });\n\n originalTextArea.setEditable(false);\n originalTextArea.setColumns(20);\n originalTextArea.setLineWrap(true);\n originalTextArea.setRows(5);\n originalTextArea.setOpaque(false);\n originalTextArea.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n originalTextAreaMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(originalTextArea);\n\n originalTextAreaLabel.setText(\"Original text\");\n\n encryptedTextAreaLabel.setText(\"Encrypted text\");\n\n encryptedTextArea.setEditable(false);\n encryptedTextArea.setColumns(20);\n encryptedTextArea.setLineWrap(true);\n encryptedTextArea.setRows(5);\n encryptedTextArea.setOpaque(false);\n encryptedTextArea.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n encryptedTextAreaMouseClicked(evt);\n }\n });\n jScrollPane2.setViewportView(encryptedTextArea);\n\n EncryptionMethodLabel.setText(\"Encryption method\");\n\n MethodGroup.add(AutomaticButton);\n AutomaticButton.setText(\"Automatic\");\n AutomaticButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AutomaticButtonActionPerformed(evt);\n }\n });\n\n MethodGroup.add(ManualButton);\n ManualButton.setSelected(true);\n ManualButton.setText(\"Manual\");\n ManualButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ManualButtonActionPerformed(evt);\n }\n });\n\n keyTableKeyFieldLabel.setText(\"Table key\");\n\n keyTableKeyButton.setText(\"Change key\");\n keyTableKeyButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n keyTableKeyButtonActionPerformed(evt);\n }\n });\n\n EncryptButton.setText(\"Encrypt\");\n EncryptButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n EncryptButtonActionPerformed(evt);\n }\n });\n\n DecryptButton.setText(\"Decrypt\");\n DecryptButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n DecryptButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(keyTable, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(keyTableLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(keyFieldLabel)\n .addComponent(keyTableKeyFieldLabel)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(originalTextAreaLabel, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(encryptedTextAreaLabel, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(keyWindowLabel, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(keyWindow, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(keyField)\n .addComponent(keyTableKeyField))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(EncryptButton, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(DecryptButton, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(keyTableKeyButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(keyChangeButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))\n .addComponent(EncryptionMethodLabel)\n .addGroup(layout.createSequentialGroup()\n .addComponent(AutomaticButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(ManualButton)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(keyTableLabel)\n .addComponent(originalTextAreaLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(keyTable, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(encryptedTextAreaLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(keyWindowLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(keyWindow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(EncryptButton)\n .addComponent(DecryptButton)))\n .addGap(8, 8, 8)\n .addComponent(keyFieldLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(keyChangeButton)\n .addComponent(keyField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(keyTableKeyFieldLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(keyTableKeyButton)\n .addComponent(keyTableKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(EncryptionMethodLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(AutomaticButton)\n .addComponent(ManualButton))))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void createBeginningButtons() {\n\t createStartButtons(myResources.getString(\"game1\"), 0, 0);\n\t\tcreateStartButtons(myResources.getString(\"game2\"), 0, 1);\n\t\tcreateStartButtons(myResources.getString(\"game3\"), 0, 2);\n\t\tcreateStartButtons(myResources.getString(\"game4\"), 0, 3);\n\t\tcreateStartButtons(myResources.getString(\"game5\"), 0, 4);\n\t\tcreateInstructionButton();\n\t\tcreateStartingLabel();\n\t\tcreateGridSizeButton();\n }", "private void initKeys()\n {\n // You can map one or several inputs to one named action\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_J));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_L));\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_I));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_K));\n inputManager.addMapping(\"Orient\", new KeyTrigger(KeyInput.KEY_O));\n\n // Add the names to the action listener.\n inputManager.addListener(analogListener, \"Left\", \"Right\", \"Up\", \"Down\", \"Orient\");\n }", "@Override\n public void keyPressed(KeyEvent e) {\n keys[e.getKeyCode()]=true;\n for(int i=0;i<keyBind.length;i++){\n keyBind[i]=keys[keyn[i]];\n }\n }", "public void setKeys(KeyStyle[] keys){\n\t\t_keys=keys;\n\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "public void setKey(char key){ this.key = key;}", "private void jList1KeyPressed(java.awt.event.KeyEvent evt) {\n if(evt.getKeyCode() == 40 && index < 5){\n //stampaRisultati();\n df.setRoundingMode(RoundingMode.UP);\n theta_result.setText(df.format(risultati[index+1][0])+\"\");\n theta_result.setForeground(Color.red);\n dev_standard_result.setText(df.format(risultati[index+1+6][0])+\"\");\n dev_standard_result.setForeground(Color.red);\n confidence_result.setText(\"[ \"+df.format(risultati[index+1+11][0])+\" ; \"+df.format(risultati[index+1+11][1])+\" ]\");\n confidence_result.setForeground(Color.red);\n index++;\n }\n if(evt.getKeyCode() == 38 && index >0){\n df.setRoundingMode(RoundingMode.UP);\n theta_result.setText(df.format(risultati[index-1][0])+\"\");\n theta_result.setForeground(Color.red);\n dev_standard_result.setText(df.format(risultati[index-1+6][0])+\"\");\n dev_standard_result.setForeground(Color.red);\n confidence_result.setText(\"[ \"+df.format(risultati[index-1+11][0])+\" ; \"+df.format(risultati[index-1+11][1])+\" ]\");\n confidence_result.setForeground(Color.red);\n index--;\n }\n }", "@Override\n public void onKeyDown(MHKeyEvent e)\n {\n \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 }", "public void keyPressed(int keyCode) {\n switch (keyCode) {\n // 0,1,2,3 are speed keys.\n\n // 0: Pause - set a very long delay until the next update\n case Canvas.KEY_NUM0:\n delay = 1000000;\n delayCount = 1000000;\n\n break;\n\n // 1: Full speed - set no delay until next update\n case Canvas.KEY_NUM1:\n delay = 0;\n delayCount = 0;\n\n break;\n\n // 2: Speed up - if not already at full speed, decrease delay\n case Canvas.KEY_NUM2:\n\n if (delay > 0) {\n delay--;\n }\n\n delayCount = 0;\n\n break;\n\n // 3: Slow down - if not already at minimum speed, increase delay\n case Canvas.KEY_NUM3:\n\n if (delay < 20) {\n delay++;\n }\n\n delayCount = 0;\n\n break;\n\n // 4,5 are pattern keys\n\n // 4: Select and load previous pattern in library. If at the\n // start of the library, or using a random pattern, will start\n // again at the last pattern.\n case Canvas.KEY_NUM4:\n pattern--;\n\n if (pattern < 0) {\n pattern = patternLibrary.length - 1;\n }\n\n patternName = patternLibrary[pattern][0];\n loadStateFromString(patternLibrary[pattern][1]);\n\n break;\n\n // 5: Select and load next pattern in library. If at the\n // end of the library, or using a random pattern, will start\n // again at the first pattern.\n case Canvas.KEY_NUM5:\n pattern++;\n\n if (pattern >= patternLibrary.length) {\n pattern = 0;\n }\n\n patternName = patternLibrary[pattern][0];\n loadStateFromString(patternLibrary[pattern][1]);\n\n break;\n\n // *: Loads a random state\n case Canvas.KEY_STAR:\n loadRandomState();\n\n break;\n }\n }", "public synchronized Enumeration<Short> keys() {\n return new Enumerator(KEYS);\n }", "@Override\r\n public void keyPressed (KeyEvent e) {\n if (myLastKeyPressed == e.getKeyCode()) {\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n }\r\n else {\r\n myLastKeyPressed = e.getKeyCode();\r\n }\r\n myKeys.add(e.getKeyCode());\r\n }", "private void prepNumberKeys() {\r\n int numDigits = 10;\r\n for (int i = 0; i < numDigits; i++) {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke((char) ('0' + i)), \"key\" + i);\r\n MAIN_PANEL.getActionMap()\r\n .put(\"key\" + i, new KeyAction(String.valueOf(i)));\r\n } \r\n }", "public int getKeyMenu() {\r\n return getKeyEscape();\r\n }", "public static synchronized int getKeyClickLength() {\r\n\t\treturn Button.keys.getKeyClickLength();\r\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}", "int getKeyCode();", "void setKey(int i, int key);", "@Override\n public void keyPressed(KeyEvent e) {\n\n\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "private static int[] createAlternates() {\r\n\t\t// Initializes the key list\r\n\t\talternateKeys = new int[6];\r\n\t\t// Adds the KeyEvents to their respected index\r\n\t\talternateKeys[UP] = KeyEvent.VK_UP;\r\n\t\talternateKeys[LEFT] = KeyEvent.VK_LEFT;\r\n\t\talternateKeys[DOWN] = KeyEvent.VK_DOWN;\r\n\t\talternateKeys[RIGHT] = KeyEvent.VK_RIGHT;\r\n\t\talternateKeys[BUTTONA] = 2;\r\n\t\talternateKeys[BUTTONB] = 3;\r\n\t\t// Return (to the constructor, which is send to the super constructor)\r\n\t\treturn alternateKeys;\r\n\t}", "@Override public int numRows() {\n return listOfKeys.size();\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "public abstract void keyPressed(int k);", "public void keyPressed() { \n\t\twantsFrameBreak = true;\n\t\t//key = e.getKeyChar();\n\t\tkeyPressed = true;\n\t\tif (System.nanoTime() - acted > .033e9f) {\n\t\t\t_keyPressed();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tsuper.keyPressed(e);\n\t\t\t\tif (e.getKeyCode() == e.VK_UP) {\n\n\t\t\t\t\tjp.zc.up = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_DOWN) {\n\t\t\t\t\tjp.zc.down = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_LEFT) {\n\t\t\t\t\tjp.zc.left = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_RIGHT) {\n\t\t\t\t\tjp.zc.right = true;\n\t\t\t\t}\n\n\t\t\t\tif (e.getKeyCode() == e.VK_W) {\n\n\t\t\t\t\tjp.gyj.up = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_S) {\n\t\t\t\t\tjp.gyj.down = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_A) {\n\t\t\t\t\tjp.gyj.left = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_D) {\n\t\t\t\t\tjp.gyj.right = true;\n\t\t\t\t}\n\n\t\t\t\tif (e.getKeyCode() == e.VK_NUMPAD1) {\n\t\t\t\t\tif(jp.zc.att==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.zc.att=true;\n\t\t\t\t\tjp.zc.presstime+=1;\n\t\t\t\t\tjp.zc.xuli();\n\t\t\t\t\t}\n\t\t\t\t \n\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_J) {\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(jp.gyj.att==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\tjp.gyj.att=true;\n\t\t\t\t\t\tjp.gyj.presstime+=1;\n\t\t\t\t\t\tjp.gyj.xuli();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (e.getKeyCode() == e.VK_K) {\n\t\t\t\t\t\n\t\t\t\t\tif(jp.gyj.xuli==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.gyj.status=AStatus.DEFENT;\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(e.getKeyCode()==e.VK_U)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tJineng jn=jp.gyj.jns.get(0);\n\t\t\t\t\tif(jn.jnstatus==JNstatus.USEABLE)\n\t\t\t\t\t{\n\t\t\t\t\tjn.usejineng(jp.gyj);\n\t\t\t\t\tjn.jinengtime=10;\n\t\t\t\t\tjn.jnstatus=JNstatus.USEING;\t\t\t\t\n\t\t\t\t\tThread jn1yundong =new Thread(()->{\n\t\t\t\t\t\twhile(jn.jnstatus==JNstatus.USEING)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tjn.yundong();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(40);\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\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\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tjn1yundong.start();\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\tif(e.getKeyCode()==e.VK_NUMPAD4)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tJineng jn=jp.zc.jns.get(0);\n\t\t\t\t\tif(jn.jnstatus==JNstatus.USEABLE)\n\t\t\t\t\t{\n\t\t\t\t\tjn.usejineng(jp.zc);\n\t\t\t\t\tjn.jinengtime=10;\n\t\t\t\t\tjn.jnstatus=JNstatus.USEING;\t\t\t\t\n\t\t\t\t\tThread jn1yundong =new Thread(()->{\n\t\t\t\t\t\twhile(jn.jnstatus==JNstatus.USEING)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tjn.yundong();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(40);\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\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\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tjn1yundong.start();\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\t\n\t\t\t\tif (e.getKeyCode() == e.VK_NUMPAD2) {\n\t\t\t\t\tif(jp.zc.xuli==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.zc.status=AStatus.DEFENT;\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\n\t\t\t}", "private static void panelKeyPressAction(KeyEvent event) {\n \n if (event.getKeyCode() == KeyEvent.VK_UP || event.getKeyCode() == KeyEvent.VK_DOWN) {\n String userCommand = \"\";\n if (event.getKeyCode() == KeyEvent.VK_UP) {\n userCommandCount++;\n if (userCommandCount > mMainLogic.getOldUserCommandSize()) {\n userCommandCount--;\n }\n userCommand = mMainLogic.getOldUserCommand(userCommandCount);\n } else {\n userCommandCount--;\n if (userCommandCount < 0) {\n userCommandCount = 0;\n } else {\n userCommand = mMainLogic.getOldUserCommand(userCommandCount);\n }\n }\n input.requestFocus();\n input.setText(userCommand);\n input.setCaretPosition(userCommand.length());\n }\n \n if (event.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {\n \tuserScrollCount++;\n \tif (userScrollCount + AppConst.UI_CONST.MAX_NUMBER_ROWS > mTableRowCount) {\n \t\tuserScrollCount--;\n \t}\n \t\n \ttable.scrollRectToVisible(new Rectangle(0, \n \t\t\t\t\t\t\t\t\t\t\tuserScrollCount * table.getRowHeight(), \n \t\t\t\t\t\t\t\t\t\t\ttable.getWidth(), \n \t\t\t\t\t\t\t\t\t\t\tAppConst.UI_CONST.MAX_NUMBER_ROWS * table.getRowHeight()));\n \t\n }\n if (event.getKeyCode() == KeyEvent.VK_PAGE_UP) {\n \t\n \tuserScrollCount--;\n \tif (userScrollCount < 0) {\n \t\tuserScrollCount++;\n \t}\n \t\n \ttable.scrollRectToVisible(new Rectangle(0, \n \t\t\t\t\t\t\t\t\t\t\tuserScrollCount * table.getRowHeight(), \n \t\t\t\t\t\t\t\t\t\t\ttable.getWidth(), \n \t\t\t\t\t\t\t\t\t\t\tAppConst.UI_CONST.MAX_NUMBER_ROWS * table.getRowHeight()));\n }\n }", "public GameKeyLisener() {\r\n\t\tplayerA_up_key_Pressed = false;\r\n\t\tplayerA_down_key_Pressed = false;\r\n\t\tplayerA_right_key_Pressed=false;\r\n\t\tplayerA_left_key_Pressed=false;\r\n\t\t\r\n\t\tplayerB_up_key_Pressed = false;\r\n\t\tplayerB_down_key_Pressed = false;\r\n\t\tplayerB_right_key_Pressed = false;\r\n\t\tplayerB_left_key_Pressed = false;\r\n\t\t\r\n\t\tenterKeyPressed = false;\r\n\t}", "public static void setKey(byte[] key) {\n SquareAttack.key = key.clone();\n MainFrame.printToConsole(\"Chosen key:\");\n for (byte b : key) {\n MainFrame.printToConsole(\" \".concat(MainFrame.byteToHex(b)));\n }\n MainFrame.printToConsole(\"\\n\");\n }", "void keys() {\n for (int i = 0; i < size; i++) {\n System.out.println(keys[i] + \" \" + values[i]);\n }\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}" ]
[ "0.6751668", "0.61231035", "0.6015982", "0.59329563", "0.58759755", "0.58620304", "0.578672", "0.5767238", "0.5730676", "0.57052124", "0.5703807", "0.570023", "0.5642408", "0.56250954", "0.5597209", "0.5587602", "0.555122", "0.55331856", "0.5530777", "0.5527012", "0.55145055", "0.54952866", "0.54789454", "0.54774016", "0.54637027", "0.54560953", "0.5447873", "0.5447854", "0.5413411", "0.541025", "0.54096717", "0.53916866", "0.53819805", "0.5377386", "0.5374134", "0.53686726", "0.53488445", "0.5347058", "0.53468215", "0.53436035", "0.5340688", "0.5327454", "0.53045976", "0.5303314", "0.5297697", "0.528148", "0.528148", "0.528148", "0.52759403", "0.52741116", "0.52735615", "0.52721286", "0.5268002", "0.52643", "0.52581877", "0.524992", "0.5247669", "0.5235948", "0.52316225", "0.523151", "0.5227392", "0.522696", "0.52197814", "0.5213883", "0.5213883", "0.5213883", "0.5213883", "0.5213883", "0.5213883", "0.5213883", "0.52118015", "0.5207942", "0.52054095", "0.52054095", "0.52054095", "0.52054095", "0.52054095", "0.52054095", "0.52054095", "0.52054095", "0.5205283", "0.52041984", "0.51992565", "0.51958627", "0.5179319", "0.51790303", "0.5167741", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574", "0.51599574" ]
0.64522713
1
This routine will only be called from complex keyboards (more keys than will fit on the basic 35key layout)
private void updateKeyboard() { int keysLimit; if(totalScreens == keyboardScreenNo) { keysLimit = partial; for (int k = keysLimit; k < (KEYS.length - 2); k++) { TextView key = findViewById(KEYS[k]); key.setVisibility(View.INVISIBLE); } } else { keysLimit = KEYS.length - 2; } for (int k = 0; k < keysLimit; k++) { TextView key = findViewById(KEYS[k]); int keyIndex = (33 * (keyboardScreenNo - 1)) + k; key.setText(keyList.get(keyIndex).baseKey); // KP key.setVisibility(View.VISIBLE); // Added on May 15th, 2021, so that second and following screens use their own color coding String tileColorStr = COLORS[Integer.parseInt(keyList.get(keyIndex).keyColor)]; int tileColor = Color.parseColor(tileColorStr); key.setBackgroundColor(tileColor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void keyPressed(KeyEvent e) {\n \n \n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "void correctKeyPress();", "@Override\n public void keyPressed(KeyEvent e) {\n\n\n }", "public void generateAllKeys(){\n\t\tboolean isWhite;\n//\t\tint pitchOffset = 21;\n\t\tint pitchOffset = 1;\n\t\tint keyWidth = this.width / this.numKeys;\n\t\t\n\t\tfor(int i = 0; i<88; i++){\n\t\t\tswitch (i%12){\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 8:\n\t\t\tcase 10:\tisWhite = false;\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\tisWhite = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(isWhite)\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height, keyWidth, i+ pitchOffset, isWhite);\n\t\t\telse\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height / 2, (keyWidth * 2)/3, i+ pitchOffset, isWhite);\n\t\t}\n\t}", "@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (hasHardKeyboard) {\n\t\t\t// Check the status\n\t\t\tSoftKeyboard sKB = (SoftKeyboard) keyboardSwitch.getCurrentKeyboard();\n\t\t\tif(!checkHardKeyboardAvailable(sKB)){\n\t\t\t\treturn super.onKeyDown(keyCode, event);\n\t\t\t}\n\t\t\t\n\t\t\t// Shift + Space\n\t\t\tif(handleShiftSpacekey(keyCode, event)){\n\t\t\t\tisAltUsed = false; // Clear Alt status\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t// Handle HardKB event on Chinese mode only\n\t\t\tif (sKB.isChinese()) {\n\t\t\t\t// Milestone first row key (If alt is pressed before, emulate 1 - 0 keys)\n\t\t\t\tif(isAltUsed || event.isAltPressed()){\n\t\t\t\t\tboolean isTriggered = false;\n\t\t\t\t\tswitch(keyCode){\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_Q: //35\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_1; //8\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_W: //36\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_2; //9\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_E: //37\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_3; //10\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_R: //38\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_4; //11\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_T: //39\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_5; //12\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_Y: //40\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_6; //13\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_U: //41\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_7; //14\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_I: //42\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_8; //15\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_O: //43\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_9; //16\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_P: //44\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_0; //17\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_V: // MS1/2 fix (Alt + V = -)\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_MINUS;\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase KeyEvent.KEYCODE_COMMA: // MS2 fix (Alt + , = ;)\n\t\t\t\t\t\t\tkeyCode = KeyEvent.KEYCODE_SEMICOLON;\n\t\t\t\t\t\t\tisTriggered = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(isTriggered){\n\t\t\t\t\t\tclearKeyboardMetaState();\n\t\t\t\t\t\tisAltUsed = false;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// Pressed Alt key only\n\t\t\t\t\t\t// Record if Alt key was pressed before\n\t\t\t\t\t\tisAltUsed = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Simulate soft keyboard press\n\t\t\t\tif (keyMapping.containsKey(keyCode)) {\n\t\t\t\t\tonKey(keyMapping.get(keyCode), null);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Handle Delete\n\t\t\t\tif(keyCode == KeyEvent.KEYCODE_DEL){\n\t\t\t\t\tonKey(SoftKeyboard.KEYCODE_DELETE, null);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Handle Space\n\t\t\t\tif(keyCode == KeyEvent.KEYCODE_SPACE){\n\t\t\t\t\tonKey(SoftKeyboard.KEYCODE_SPACE, null);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Handle Enter\n\t\t\t\tif(keyCode == KeyEvent.KEYCODE_ENTER){\n\t\t\t\t\tonKey(SoftKeyboard.KEYCODE_ENTER, null);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}", "protected void keyTyped(char par1, int par2) {}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed() {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\n\t}", "public interface KeyCode {\n\n // Alphabet keys:\n int A_UPPER_CASE = 65;\n int B_UPPER_CASE = 66;\n int C_UPPER_CASE = 67;\n int D_UPPER_CASE = 68;\n int E_UPPER_CASE = 69;\n int F_UPPER_CASE = 70;\n int G_UPPER_CASE = 71;\n int H_UPPER_CASE = 72;\n int I_UPPER_CASE = 73;\n int J_UPPER_CASE = 74;\n int K_UPPER_CASE = 75;\n int L_UPPER_CASE = 76;\n int M_UPPER_CASE = 77;\n int N_UPPER_CASE = 78;\n int O_UPPER_CASE = 79;\n int P_UPPER_CASE = 80;\n int Q_UPPER_CASE = 81;\n int R_UPPER_CASE = 82;\n int S_UPPER_CASE = 83;\n int T_UPPER_CASE = 84;\n int U_UPPER_CASE = 85;\n int V_UPPER_CASE = 86;\n int W_UPPER_CASE = 87;\n int X_UPPER_CASE = 88;\n int Y_UPPER_CASE = 89;\n int Z_UPPER_CASE = 90;\n\n // int A_LOWER_CASE = 97;\n // int B_LOWER_CASE = 98;\n // int C_LOWER_CASE = 99;\n // int D_LOWER_CASE = 100;\n // int E_LOWER_CASE = 101;\n // int F_LOWER_CASE = 102;\n // int G_LOWER_CASE = 103;\n // int H_LOWER_CASE = 104;\n // int I_LOWER_CASE = 105;\n // int J_LOWER_CASE = 106;\n // int K_LOWER_CASE = 107;\n // int L_LOWER_CASE = 108;\n // int M_LOWER_CASE = 109;\n // int N_LOWER_CASE = 110;\n // int O_LOWER_CASE = 111;\n // int P_LOWER_CASE = 112;\n // int Q_LOWER_CASE = 113;\n // int R_LOWER_CASE = 114;\n // int S_LOWER_CASE = 115;\n // int T_LOWER_CASE = 116;\n // int U_LOWER_CASE = 117;\n // int V_LOWER_CASE = 118;\n // int W_LOWER_CASE = 119;\n // int X_LOWER_CASE = 120;\n // int Y_LOWER_CASE = 121;\n // int Z_LOWER_CASE = 122;\n\n // Numeric keys:\n int NUMPAD_0 = 96;\n int NUMPAD_1 = 97;\n int NUMPAD_2 = 98;\n int NUMPAD_3 = 99;\n int NUMPAD_4 = 100;\n int NUMPAD_5 = 101;\n int NUMPAD_6 = 102;\n int NUMPAD_7 = 103;\n int NUMPAD_8 = 104;\n int NUMPAD_9 = 105;\n\n int NUM_0 = 48;\n int NUM_1 = 49;\n int NUM_2 = 50;\n int NUM_3 = 51;\n int NUM_4 = 52;\n int NUM_5 = 53;\n int NUM_6 = 54;\n int NUM_7 = 55;\n int NUM_8 = 56;\n int NUM_9 = 57;\n\n int PERSIAN_0 = 1776;\n int PERSIAN_1 = 1777;\n int PERSIAN_2 = 1778;\n int PERSIAN_3 = 1779;\n int PERSIAN_4 = 1780;\n int PERSIAN_5 = 1781;\n int PERSIAN_6 = 1782;\n int PERSIAN_7 = 1783;\n int PERSIAN_8 = 1784;\n int PERSIAN_9 = 1785;\n\n // Function keys:\n int F1 = 112;\n int F2 = 113;\n int F3 = 114;\n int F4 = 115;\n int F5 = 116;\n int F6 = 117;\n int F7 = 118;\n int F8 = 119;\n int F9 = 120;\n int F10 = 121;\n int F11 = 122;\n int F12 = 123;\n\n // Control Keys:\n int BACKSPACE = 8;\n int TAB = 9;\n int ENTER = 13;\n int SHIFT = 16;\n int CTRL = 17;\n int ALT = 18;\n int PAUSE_BREAK = 19;\n int CAPS_LOCK = 20;\n int ESCAPE = 27;\n int PAGEUP = 33;\n int PAGEDOWN = 34;\n int END = 35;\n int HOME = 36;\n int LEFT = 37;\n int UP = 38;\n int RIGHT = 39;\n int DOWN = 40;\n int PRINT_SCREEN = 44;\n int INSERT = 45;\n int DELETE = 46;\n\n // Other Keys:\n int SPACE = 32;\n int EQUALITY = 61;\n int LEFT_WINDOW_KEY = 91;\n int RIGHT_WINDOW_KEY = 92;\n int SELECT_KEY = 93; // besides of right control key (context menu key, usually works like right click)\n int MULTIPLY = 106;\n int ADD = 107;\n int SUBTRACT = 109;\n int DECIMAL_POINT = 110;// . in numpad section\n int DIVIDE = 111;\n int NUM_LOCK = 144;\n int SCROLL_LOCK = 145;\n int SEMI_COLON = 186;// ;\n int EQUAL_SIGN = 187;// =\n int COMMA = 188;// ,\n int DASH = 189;// -\n int PERIOD = 190;// . in alphabet section\n int FORWARD_SLASH = 191;// /\n int GRAVE_ACCENT = 192; // `\n int OPEN_BRACKET = 219; // [\n int BACK_SLASH = 220; // \\\n int CLOSE_BRAKET = 221; // ]\n int SINGLE_QUOTE = 222; // '\n}", "@Override\r\n\tpublic void keyPressed(KeyEvent keyPressed)\r\n\t{\r\n\t\t\r\n\t}", "Keyboard(){\r\n //Mapping of drawing order to note values\r\n //White keys first\r\n this.draw.put(0, 0);\r\n this.draw.put(1, 2);\r\n this.draw.put(2, 4);\r\n this.draw.put(3, 5);\r\n this.draw.put(4, 7);\r\n this.draw.put(5, 9);\r\n this.draw.put(6, 11);\r\n this.draw.put(7, 12);\r\n this.draw.put(8, 14);\r\n this.draw.put(9, 16);\r\n this.draw.put(10, 17);\r\n this.draw.put(11, 19);\r\n this.draw.put(12, 21);\r\n this.draw.put(13, 23);\r\n this.draw.put(14, 24);\r\n\r\n //Now black keys\r\n this.draw.put(15, 1);\r\n this.draw.put(16, 3);\r\n //SKIP\r\n this.draw.put(18, 6);\r\n this.draw.put(19, 8);\r\n this.draw.put(20, 10);\r\n //SKIP\r\n this.draw.put(22, 13);\r\n this.draw.put(23, 15);\r\n //SKIP\r\n this.draw.put(25, 18);\r\n this.draw.put(26, 20);\r\n this.draw.put(27, 22);\r\n \r\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t}", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "@SuppressWarnings(\"serial\")\n private void enableGamePlayKeys() {\n if (CLASSIC_MODE.equals(myGameMode)) {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"left\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"right\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"down\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"rotateCW\");\n }\n else {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"left\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"right\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"down\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"rotateCW\");\n }\n\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), \"drop\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_P, 0), \"pause\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, 0), \"rotateCCW\");\n\n getActionMap().put(\"left\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.left();\n }\n });\n\n getActionMap().put(\"right\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.right();\n }\n });\n\n getActionMap().put(\"down\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.down();\n }\n });\n\n getActionMap().put(\"rotateCW\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.rotateCW();\n }\n });\n\n getActionMap().put(\"rotateCCW\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.rotateCCW();\n }\n });\n\n getActionMap().put(\"right\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.right();\n }\n });\n\n getActionMap().put(\"drop\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.drop();\n }\n });\n\n getActionMap().put(\"pause\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n if (myTimer.isRunning()) {\n pauseTimer();\n } else {\n startTimer();\n }\n }\n });\n }", "public void loadKeyboard() {\n keysInUse = keyList.size();\n partial = keysInUse % (KEYS.length - 2);\n totalScreens = keysInUse / (KEYS.length - 2);\n if (partial != 0) {\n totalScreens++;\n }\n\n int visibleKeys;\n if (keysInUse > KEYS.length) {\n visibleKeys = KEYS.length;\n } else {\n visibleKeys = keysInUse;\n }\n\n for (int k = 0; k < visibleKeys; k++) {\n TextView key = findViewById(KEYS[k]);\n key.setText(keyList.get(k).baseKey);\n String tileColorStr = COLORS[Integer.parseInt(keyList.get(k).keyColor)];\n int tileColor = Color.parseColor(tileColorStr);\n key.setBackgroundColor(tileColor);\n }\n if (keysInUse > KEYS.length) {\n TextView key34 = findViewById(KEYS[KEYS.length - 2]);\n key34.setBackgroundResource(R.drawable.zz_backward_green);\n key34.setRotationY(getResources().getInteger(R.integer.mirror_flip));\n key34.setText(\"\");\n TextView key35 = findViewById(KEYS[KEYS.length - 1]);\n key35.setRotationY(getResources().getInteger(R.integer.mirror_flip));\n key35.setBackgroundResource(R.drawable.zz_forward_green);\n key35.setText(\"\");\n }\n\n for (int k = 0; k < KEYS.length; k++) {\n\n TextView key = findViewById(KEYS[k]);\n if (k < keysInUse) {\n key.setVisibility(View.VISIBLE);\n key.setClickable(true);\n } else {\n key.setVisibility(View.INVISIBLE);\n key.setClickable(false);\n }\n\n }\n\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\r\n\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\n \r\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t}", "@Override\n public void keyPressed(KeyEvent e) {\n\n }", "@Override\n public void keyPressed(KeyEvent e) {\n\n }", "@Override\n public void onKeyDown(MHKeyEvent e)\n {\n \n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t}", "@Override\n public void keyPressed(KeyEvent e) {\n keys[e.getKeyCode()]=true;\n for(int i=0;i<keyBind.length;i++){\n keyBind[i]=keys[keyn[i]];\n }\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\r\n\t}", "@Override\n\tpublic void onKey(KeyEvent e) {\n\n\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\n\r\n }", "@Override\r\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t}", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode()-65>=0&&e.getKeyCode()-65<=25) {\n\t\t\tk1.pressed(e.getKeyCode()-65, false);\n\t\t\tk2.pressed(-1, false);\n\t\t\tif(keyDown==e.getKeyCode()-65) {\n\t\t\t\tkeyDown = -1;\n\t\t\t}\n\t\t}\n\t}", "public void processKeyEvent(Component paramComponent, KeyEvent paramKeyEvent)\n/* */ {\n/* 1118 */ if (consumeProcessedKeyEvent(paramKeyEvent)) {\n/* 1119 */ return;\n/* */ }\n/* */ \n/* */ \n/* 1123 */ if (paramKeyEvent.getID() == 400) {\n/* 1124 */ return;\n/* */ }\n/* */ \n/* 1127 */ if ((paramComponent.getFocusTraversalKeysEnabled()) && \n/* 1128 */ (!paramKeyEvent.isConsumed()))\n/* */ {\n/* 1130 */ AWTKeyStroke localAWTKeyStroke1 = AWTKeyStroke.getAWTKeyStrokeForEvent(paramKeyEvent);\n/* 1131 */ AWTKeyStroke localAWTKeyStroke2 = AWTKeyStroke.getAWTKeyStroke(localAWTKeyStroke1.getKeyCode(), localAWTKeyStroke1\n/* 1132 */ .getModifiers(), \n/* 1133 */ !localAWTKeyStroke1.isOnKeyRelease());\n/* */ \n/* */ \n/* */ \n/* 1137 */ Set localSet = paramComponent.getFocusTraversalKeys(0);\n/* */ \n/* 1139 */ boolean bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1140 */ boolean bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1142 */ if ((bool1) || (bool2)) {\n/* 1143 */ consumeTraversalKey(paramKeyEvent);\n/* 1144 */ if (bool1) {\n/* 1145 */ focusNextComponent(paramComponent);\n/* */ }\n/* 1147 */ return; }\n/* 1148 */ if (paramKeyEvent.getID() == 401)\n/* */ {\n/* 1150 */ this.consumeNextKeyTyped = false;\n/* */ }\n/* */ \n/* 1153 */ localSet = paramComponent.getFocusTraversalKeys(1);\n/* */ \n/* 1155 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1156 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1158 */ if ((bool1) || (bool2)) {\n/* 1159 */ consumeTraversalKey(paramKeyEvent);\n/* 1160 */ if (bool1) {\n/* 1161 */ focusPreviousComponent(paramComponent);\n/* */ }\n/* 1163 */ return;\n/* */ }\n/* */ \n/* 1166 */ localSet = paramComponent.getFocusTraversalKeys(2);\n/* */ \n/* 1168 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1169 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1171 */ if ((bool1) || (bool2)) {\n/* 1172 */ consumeTraversalKey(paramKeyEvent);\n/* 1173 */ if (bool1) {\n/* 1174 */ upFocusCycle(paramComponent);\n/* */ }\n/* 1176 */ return;\n/* */ }\n/* */ \n/* 1179 */ if ((!(paramComponent instanceof Container)) || \n/* 1180 */ (!((Container)paramComponent).isFocusCycleRoot())) {\n/* 1181 */ return;\n/* */ }\n/* */ \n/* 1184 */ localSet = paramComponent.getFocusTraversalKeys(3);\n/* */ \n/* 1186 */ bool1 = localSet.contains(localAWTKeyStroke1);\n/* 1187 */ bool2 = localSet.contains(localAWTKeyStroke2);\n/* */ \n/* 1189 */ if ((bool1) || (bool2)) {\n/* 1190 */ consumeTraversalKey(paramKeyEvent);\n/* 1191 */ if (bool1) {\n/* 1192 */ downFocusCycle((Container)paramComponent);\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "@Override\n public void keyTyped(KeyEvent e) {\n \n }", "@Override\n public void onKeyPressed(KeyEvent event) {\n }", "private void consumeNextKeyTyped(KeyEvent paramKeyEvent)\n/* */ {\n/* 1082 */ this.consumeNextKeyTyped = true;\n/* */ }", "@Override\r\n public void keyPressed(KeyEvent ke) {\n }", "@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(keyDown!=e.getKeyCode()-65&&e.getKeyCode()-65>=0&&e.getKeyCode()-65<=25) {\n\t\t\tif(keyDown>-1) {\n\t\t\t\tk1.pressed(keyDown, false);\n\t\t\t\tk2.pressed(-1, false);\n\t\t\t}\n\t\t\tk1.pressed(e.getKeyCode()-65, true);\n\t\t\t\n\t\t\tint n = machine.run(e.getKeyCode()-65);\n\t\t\tk2.pressed(n, true);\n\t\t\tkeyDown = e.getKeyCode()-65;\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\tmachine.space();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n\t\t\tmachine.back();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tmachine.enter();\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}" ]
[ "0.6892827", "0.68432766", "0.6807426", "0.6807426", "0.6807426", "0.67919916", "0.67600566", "0.67551893", "0.67453295", "0.6733397", "0.6688257", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6680019", "0.6680019", "0.6680019", "0.6680019", "0.6680019", "0.6680019", "0.6680019", "0.6680019", "0.6680019", "0.6653176", "0.66449326", "0.66449326", "0.66449326", "0.66449326", "0.6633711", "0.662904", "0.662604", "0.6624321", "0.6620667", "0.6618747", "0.66138786", "0.6604987", "0.6601889", "0.6601889", "0.6588231", "0.65866774", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.65829635", "0.6578202", "0.6578202", "0.65739864", "0.65673226", "0.65673226", "0.6564248", "0.6562454", "0.6562454", "0.6562454", "0.6562454", "0.6562454", "0.6562454", "0.6562454", "0.6562454", "0.65545374", "0.65545374", "0.65545374", "0.65545374", "0.6529431", "0.6526366", "0.65260124", "0.6517371", "0.6511597", "0.6508166", "0.6505506", "0.6503511", "0.6485668", "0.6481896", "0.6481896", "0.6481896", "0.6481896", "0.6481896", "0.6481896", "0.6481249", "0.64788574", "0.6471821", "0.6471821", "0.6471821", "0.6471821" ]
0.6954829
0
Write your code here
public static String findNumber(List<Integer> arr, int k) { return "NO"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public void ganar() {\n // TODO implement here\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "CD withCode();", "public void mo38117a() {\n }", "private stendhal() {\n\t}", "public void mo4359a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "Programming(){\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void furyo ()\t{\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\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}", "public void working()\n {\n \n \n }", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void baocun() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "private void kk12() {\n\n\t}", "public void mo55254a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "public void mo9848a() {\n }", "protected void mo6255a() {\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 }", "public void mo55254a() {\n }", "public void themesa()\n {\n \n \n \n \n }", "private void yy() {\n\n\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}", "public void perder() {\n // TODO implement here\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void oneUserExample()\t{\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void mo3376r() {\n }", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void cocinar(){\n\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo5382o() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "@Override\n public void execute() {\n \n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo21793R() {\n }", "public void mo12930a() {\n }", "private void test() {\n\n\t}", "public void mo6081a() {\n }", "static void feladat5() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo3749d() {\n }", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public final void cpp() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "void kiemTraThangHopLi() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void skystonePos5() {\n }", "@Override\n protected void execute() {\n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\n\tpublic void HowtoEat() {\n\t\tSystem.out.println(\"Fırında Ye!!\");\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}" ]
[ "0.6385292", "0.62825674", "0.6094859", "0.59705144", "0.59174407", "0.5879631", "0.58751583", "0.58699447", "0.5869017", "0.58553624", "0.5826625", "0.5825323", "0.58233553", "0.577183", "0.576982", "0.5769503", "0.57691693", "0.5748044", "0.57379705", "0.573767", "0.57285726", "0.57275313", "0.5722168", "0.5715661", "0.5709839", "0.5709839", "0.5704307", "0.5681891", "0.5681891", "0.5673934", "0.5651873", "0.56415623", "0.5629833", "0.56136686", "0.560722", "0.5603319", "0.55986965", "0.55838263", "0.55780625", "0.55713314", "0.55659115", "0.55621606", "0.5556605", "0.5549954", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55281407", "0.5525562", "0.55151445", "0.55151445", "0.55058944", "0.5503766", "0.55010456", "0.5500997", "0.5495365", "0.54874974", "0.5482034", "0.5477928", "0.54772", "0.5475188", "0.5473774", "0.54694617", "0.54655695", "0.54646754", "0.5460583", "0.54583234", "0.54577816", "0.5457681", "0.54538816", "0.5452503", "0.54493356", "0.54453313", "0.5444872", "0.5440357", "0.54393566", "0.54381615", "0.5435557", "0.54309005", "0.5428512", "0.54260683", "0.5423332", "0.5419551", "0.5419505", "0.5419252", "0.54156613", "0.5414246", "0.54133856", "0.5403345", "0.5401036", "0.5401036", "0.5394768", "0.53913885", "0.5389031", "0.5386461", "0.5383817", "0.5380636" ]
0.0
-1
Created by linge on 2018/5/5.
public interface CodeEnum { Integer getCode(); String getMeaning(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void m50366E() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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\tpublic void one() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {}", "private void init() {\n\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override public int describeContents() { return 0; }", "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\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void method_4270() {}", "public abstract void mo70713b();", "private Rekenhulp()\n\t{\n\t}", "public void mo6081a() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void jugar() {}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}" ]
[ "0.58331555", "0.570064", "0.5587954", "0.5587954", "0.5580262", "0.5568506", "0.5552307", "0.55520844", "0.5550977", "0.55505157", "0.5493686", "0.54817945", "0.5429696", "0.53971684", "0.5390705", "0.5376013", "0.5375558", "0.5372604", "0.5372299", "0.5359621", "0.5346206", "0.5346067", "0.5345098", "0.5337952", "0.53285855", "0.53278977", "0.5326854", "0.5326854", "0.5326854", "0.5326854", "0.5326854", "0.530556", "0.5288921", "0.52887416", "0.5286757", "0.5279427", "0.5276001", "0.5265575", "0.5260246", "0.5247565", "0.5242064", "0.5228498", "0.52210677", "0.52186984", "0.52084595", "0.52046514", "0.52000463", "0.52000463", "0.52000463", "0.5193159", "0.5193159", "0.5193159", "0.5193159", "0.5193159", "0.5193159", "0.51916486", "0.51916486", "0.51916486", "0.51838845", "0.5181301", "0.5181301", "0.5173856", "0.5167637", "0.5167601", "0.515994", "0.515452", "0.5147342", "0.5147091", "0.5147091", "0.51433605", "0.5140306", "0.5140306", "0.5140306", "0.51314545", "0.51192546", "0.5118099", "0.51013625", "0.5101235", "0.5101164", "0.5101164", "0.5101164", "0.5101164", "0.5101164", "0.5101164", "0.5101164", "0.51010823", "0.5100976", "0.5100976", "0.50933367", "0.50925773", "0.50906074", "0.50842345", "0.5072877", "0.5068331", "0.50652343", "0.5063351", "0.5062626", "0.5058958", "0.50585854", "0.5057261", "0.5052185" ]
0.0
-1
Created by wyyu on 2018/5/8.
public interface OnPositionChangeListener { void onChange(int position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo6081a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n\n \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 }", "public void mo55254a() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void m50366E() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@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 inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void gored() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private final zzgy zzgb() {\n }", "@Override\n public void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "public Pitonyak_09_02() {\r\n }", "public void mo55254a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private UsineJoueur() {}", "@Override\n protected void init() {\n }", "protected boolean func_70814_o() { return true; }", "private TMCourse() {\n\t}", "@Override\r\n\tpublic void init() {}", "protected void mo6255a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo12930a() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tprotected void initialize() {\n\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "public void mo9848a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private Singletion3() {}", "static void feladat4() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}" ]
[ "0.60735846", "0.6050517", "0.5739666", "0.5722127", "0.5722127", "0.56991094", "0.5688242", "0.5665442", "0.56584847", "0.56354845", "0.5565524", "0.5561346", "0.5550301", "0.5527021", "0.5518675", "0.55050707", "0.5486104", "0.5476565", "0.5476558", "0.54717284", "0.5465446", "0.54565525", "0.54527706", "0.54121333", "0.54105383", "0.54105264", "0.54102623", "0.5409764", "0.5396012", "0.5396012", "0.5396012", "0.5396012", "0.5396012", "0.5396012", "0.5396012", "0.5392368", "0.53885674", "0.53870535", "0.53864294", "0.5376273", "0.5373335", "0.5373335", "0.5365571", "0.5362327", "0.536144", "0.536144", "0.536144", "0.536144", "0.536144", "0.536144", "0.53471684", "0.5340073", "0.533914", "0.533845", "0.53341347", "0.53332925", "0.53332925", "0.53332925", "0.53332925", "0.53332925", "0.53306943", "0.5325627", "0.53255373", "0.53061795", "0.5302405", "0.5293718", "0.52831113", "0.5281642", "0.5275767", "0.5268388", "0.5265522", "0.5260895", "0.5260895", "0.5260732", "0.5260732", "0.5260732", "0.52527845", "0.52524054", "0.5246896", "0.52452904", "0.5237282", "0.52362776", "0.52325946", "0.52325946", "0.5215258", "0.5214173", "0.5214173", "0.5214173", "0.51989716", "0.51960015", "0.51960015", "0.51960015", "0.5191136", "0.5187669", "0.5184727", "0.51840186", "0.51830643", "0.5181256", "0.5180102", "0.5171697", "0.5168395" ]
0.0
-1
Consulta tipo SELECT o las de modificar datos
public static Statement usarBD( Connection con ) { try { Statement statement = con.createStatement(); statement.setQueryTimeout(30); // poner timeout 30 msg return statement; } catch (SQLException e) { lastError = e; log( Level.SEVERE, "Error en uso de base de datos", e ); e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SelectQuery createSelectQuery();", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "Tablero consultarTablero();", "public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Descripcion as nombre_unidad_medida\";\n/* 420 */ s = s + \" from cal_plan_metas m,sis_multivalores tm,sis_multivalores est,Sis_Multivalores Um\";\n/* 421 */ s = s + \" where \";\n/* 422 */ s = s + \" m.tipo_medicion =tm.valor\";\n/* 423 */ s = s + \" and tm.tabla='CAL_TIPO_MEDICION'\";\n/* 424 */ s = s + \" and m.estado =est.valor\";\n/* 425 */ s = s + \" and est.tabla='CAL_ESTADO_META'\";\n/* 426 */ s = s + \" and m.Unidad_Medida = Um.Valor\";\n/* 427 */ s = s + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\";\n/* 428 */ s = s + \" and m.codigo_ciclo=\" + codigoCiclo;\n/* 429 */ s = s + \" and m.codigo_plan=\" + codigoPlan;\n/* 430 */ s = s + \" and m.codigo_meta=\" + codigoMeta;\n/* 431 */ boolean rtaDB = this.dat.parseSql(s);\n/* 432 */ if (!rtaDB) {\n/* 433 */ return null;\n/* */ }\n/* */ \n/* 436 */ this.rs = this.dat.getResultSet();\n/* 437 */ if (this.rs.next()) {\n/* 438 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 441 */ catch (Exception e) {\n/* 442 */ e.printStackTrace();\n/* 443 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarCalMetas \", e);\n/* */ } \n/* 445 */ return null;\n/* */ }", "public ResultSet querySelect(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\n\t \t\t// Exécution d'une requête de lecture\n\t \t\tResultSet result = statement.executeQuery(query);\n\t \t\t\n\t \t\treturn result;\n\t \t}", "@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, id_soggetto_fk,\",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\",\n \"where id_soggetto = #{idSoggetto,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n SoggettoPersonaleScolastico selectByPrimaryKey(Long idSoggetto);", "@Select({ \"select\", \"id_sistema, ds_sistema\", \"from public.tb_sistema\",\n\t\t\t\"where id_sistema = #{idSistema,jdbcType=INTEGER}\" })\n\t@Results({ @Result(column = \"id_sistema\", property = \"idSistema\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"ds_sistema\", property = \"dsSistema\", jdbcType = JdbcType.VARCHAR) })\n\tSistema selectByPrimaryKey(Integer idSistema);", "public ResultSet select(String pCampos, String pTabla, String pCondicion) {\n ResultSet rs = null; //obtener los datos del select\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n sentencia = \" SELECT \" + pCampos + \" FROM \" + pTabla; // se crea el select\n if (!pCondicion.isEmpty()) {\n sentencia += \" WHERE \" + pCondicion;\n }\n rs = s.executeQuery(sentencia); // \n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n }\n return rs;\n }", "SELECT createSELECT();", "public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public String consultaParametrosEstado(String estado){\n String select =\"SELECT parsadm_parsadm, parsadm_nombre, parsadm_estado, parsadm_valor FROM ad_tparsadm where parsadm_estado = '\"+estado+\"'\";\n \n return select;\n }", "public ResultSet selecionar(String tabela);", "Object executeSelectQuery(String sql) { return null;}", "public interface TipoDao {\r\n\r\n /**\r\n * Inserta un nuevo registro en la tabla Tipos.\r\n */\r\n public TipoPk insert(Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Actualiza un unico registro en la tabla Tipos.\r\n */\r\n public void update(TipoPk pk, Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Elimina un unico registro en la tabla Tipos.\r\n */\r\n public void delete(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un unico registro en la tabla Tipos que conicida con la\r\n * primary-key especificada.\r\n */\r\n public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el criterio\r\n * 'id_tipo = :idTipo'.\r\n */\r\n public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el\r\n * criterio 'nombre_tipo LIKE %:nombre%'.\r\n */\r\n public Tipo[] findByName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el\r\n * criterio 'nombre_tipo = :nombre'.\r\n */\r\n public Tipo findByFullName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todas las filas de la tabla Tipos.\r\n */\r\n public Tipo[] findAll() throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con la\r\n * sentencia SQL especificada arbitrariamente\r\n */\r\n public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el WHERE\r\n * SQL especificado arbitrariamente\r\n */\r\n public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Sets the value of maxRows\r\n */\r\n public void setMaxRows(int maxRows);\r\n\r\n /**\r\n * Gets the value of maxRows\r\n */\r\n public int getMaxRows();\r\n\r\n /**\r\n * Retorna la conexión actual del usuario\r\n * \r\n * @return Connection\r\n */\r\n public Connection getUserConn();\r\n\r\n /**\r\n * Setea la conexión a usar con la BD\r\n * \r\n * @param userConn\r\n */\r\n public void setUserConn(Connection userConn);\r\n\r\n}", "public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}", "public Institucion buscarInstitucionDeSolicitud(String cod_solicitud){\n\tString sql=\"select * from institucion where cod_institucion='\"+cod_solicitud+\"';\";\n\t\n\treturn db.queryForObject(sql, new InstitucionRowMapper());\n}", "public abstract EntitySelect<T> getEntitySelect();", "@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, id_soggetto_fk, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n List<SoggettoPersonaleScolastico> selectAll();", "Prueba selectByPrimaryKey(Integer id);", "private StringBuilder getSqlSelectContadorDocProrroga() {\n StringBuilder query = new StringBuilder();\n\n query.append(\" \");\n query.append(\" SELECT \\n\");\n query.append(\" PRO.ID_PRORROGA_ORDEN, \\n\");\n query.append(\" PRO.ID_ORDEN, \\n\");\n query.append(\" PRO.FECHA_CARGA, \\n\");\n query.append(\" PRO.RUTA_ACUSE,\\n\");\n query.append(\" PRO.CADENA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.FIRMA_CONTRIBUYENTE, \\n\");\n query.append(\" PRO.APROBADA, \\n\");\n query.append(\" PRO.ID_ASOCIADO_CARGA, \\n\");\n query.append(\" PRO.ID_AUDITOR, \\n\");\n query.append(\" PRO.ID_FIRMANTE, \\n\");\n query.append(\" PRO.RUTA_RESOLUCION, \\n\");\n query.append(\" PRO.CADENA_FIRMANTE, \\n\");\n query.append(\" PRO.FIRMA_FIRMANTE,\\n\");\n query.append(\" PRO.FECHA_FIRMA, \\n\");\n query.append(\" PRO.ID_ESTATUS, \\n\");\n query.append(\" PRO.FOLIO_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_NYV, \\n\");\n query.append(\" PRO.FECHA_NOTIF_CONT, \\n\");\n query.append(\" PRO.FECHA_SURTE_EFECTOS, \\n\");\n query.append(\" PRO.ID_NYV, \\n\");\n query.append(\" (SELECT COUNT(0) FROM \");\n query.append(FecetDocProrrogaOrdenDaoImpl.getTableName());\n query.append(\" DOCPRO WHERE PRO.ID_PRORROGA_ORDEN = DOCPRO.ID_PRORROGA_ORDEN) TOTAL_DOC_PRORROGA, \\n\");\n query.append(\" ASOCIADO.ID_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.RFC_CONTRIBUYENTE, \\n\");\n query.append(\" ASOCIADO.RFC, \\n\");\n query.append(\" ASOCIADO.ID_ORDEN, \\n\");\n query.append(\" ASOCIADO.ID_TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.NOMBRE, \\n\");\n query.append(\" ASOCIADO.CORREO, \\n\");\n query.append(\" ASOCIADO.TIPO_ASOCIADO, \\n\");\n query.append(\" ASOCIADO.FECHA_BAJA, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD, \\n\");\n query.append(\" ASOCIADO.FECHA_ULTIMA_MOD_IDC, \\n\");\n query.append(\" ASOCIADO.MEDIO_CONTACTO, \\n\");\n query.append(\" ASOCIADO.ESTATUS, \\n\");\n query.append(\" ESTATUS.ID_ESTATUS, \\n\");\n query.append(\" ESTATUS.DESCRIPCION, \\n\");\n query.append(\" ESTATUS.MODULO, \\n\");\n query.append(\" ESTATUS.ID_MODULO \\n\");\n\n query.append(\"FROM \");\n query.append(getTableName());\n query.append(\" PRO \\n\");\n query.append(\" INNER JOIN FECEC_ESTATUS ESTATUS \\n\");\n query.append(\" ON PRO.ID_ESTATUS = ESTATUS.ID_ESTATUS \\n\");\n query.append(\" LEFT JOIN FECET_ASOCIADO ASOCIADO \\n\");\n query.append(\" ON PRO.ID_ASOCIADO_CARGA = ASOCIADO.ID_ASOCIADO \\n\");\n return query;\n }", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);", "public void buscar(){\n \n String atributo=txtBuscar.getText();\n String consulta=extraerCombo();\n DefaultTableModel modelo=da.consultar(consulta, atributo);\n tblConsultar.setModel(modelo);\n lblTotal.setText(\"Se encontraron: \"+Integer.toString(da.getTotalRegistros())+\" resultados\");\n \n }", "public Pedido select(Integer codigo) {\r\n\t\ttry (Connection con = db.getConnection()) {\r\n\r\n\t\t\tString sql = \"SELECT * FROM pedidos WHERE codigo = ?\";\r\n\r\n\t\t\tPreparedStatement cmd = con.prepareStatement(sql);\r\n\r\n\t\t\tcmd.setInt(1, codigo);\r\n\t\t\tResultSet rs = cmd.executeQuery();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tPedido pedido = new Pedido();\r\n\t\t\t\tpedido.setCodigo(codigo);\r\n\t\t\t\tpedido.setCod_vend(rs.getInt(\"cod_vend\"));\r\n\t\t\t\tpedido.setCod_cli(rs.getInt(\"cod_cli\"));\r\n\t\t\t\tpedido.setData_pedido(rs.getDate(\"data_pedido\"));\r\n\t\t\t\tpedido.setData_entrega(rs.getDate(\"data_entrega\"));\r\n\t\t\t\tpedido.setFrete(rs.getDouble(\"frete\"));\r\n\t\t\t\tpedido.setStatus(Status_ped.valueOf(rs.getString(\"status\")));\r\n\t\t\t\t\r\n\t\t\t\tList<Item> itens = new ArrayList();\r\n\t\t\t\tsql = \"SELECT * FROM detalhes_pedidos WHERE cod_ped = ?\";\r\n\t\t\t\tcmd = con.prepareStatement(sql);\r\n\t\t\t\tcmd.setInt(1, codigo);\r\n\t\t\t\trs = cmd.executeQuery();\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\tItem item = new Item();\r\n\t\t\t\t\titem.setCod_ped(rs.getInt(\"cod_ped\"));\r\n\t\t\t\t\titem.setProduto(ProdutoDAO.select(rs.getInt(\"cod_prod\")));\r\n\t\t\t\t\titem.setQuantidade(rs.getInt(\"quantidade\"));\r\n\t\t\t\t\titens.add(item);\r\n\t\t\t\t}\r\n\t\t\t\tpedido.setItens(itens);\r\n\t\t\t\t\r\n\t\t\t\treturn pedido;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public Usuarios(String Cedula){ //método que retorna atributos asociados con la cedula que recibamos\n conexion = base.GetConnection();\n PreparedStatement select;\n try {\n select = conexion.prepareStatement(\"select * from usuarios where Cedula = ?\");\n select.setString(1, Cedula);\n boolean consulta = select.execute();\n if(consulta){\n ResultSet resultado = select.getResultSet();\n if(resultado.next()){\n this.Cedula= resultado.getString(1);\n this.Nombres= resultado.getString(2);\n \n this.Sexo= resultado.getString(3);\n this.Edad= resultado.getInt(4);\n this.Direccion= resultado.getString(5);\n this.Ciudad=resultado.getString(6);\n this.Contrasena=resultado.getString(7);\n this.Estrato=resultado.getInt(8);\n this.Rol=resultado.getString(9);\n }\n resultado.close();\n }\n conexion.close();\n } catch (SQLException ex) {\n System.err.println(\"Ocurrió un error: \"+ex.getMessage().toString());\n }\n}", "public int persisteInformacionInsertSelect(String queryInserSelect, String idProceso) throws Exception;", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n }\n }", "UsuarioDetalle cargaDetalle(int id);", "public DefaultTableModel cargarDatos () {\r\n DefaultTableModel modelo = new DefaultTableModel(\r\n new String[]{\"ID SALIDA\", \"IDENTIFICACIÓN CAPITÁN\", \"NÚMERO MATRICULA\", \"FECHA\", \"HORA\", \"DESTINO\"}, 0); //Creo un objeto del modelo de la tabla con los titulos cargados\r\n String[] info = new String[6];\r\n String query = \"SELECT * FROM actividad WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n info[0] = rs.getString(\"id_salida\");\r\n info[1] = rs.getString(\"identificacion_navegate\");\r\n info[2] = rs.getString(\"numero_matricula\");\r\n info[3] = rs.getString(\"fecha\");\r\n info[4] = rs.getString(\"hora\");\r\n info[5] = rs.getString(\"destino\");\r\n Object[] fila = new Object[]{info[0], info[1], info[2], info[3], info[4], info[5]};\r\n modelo.addRow(fila);\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return modelo;\r\n }", "@Select({ \"select\", \"priorita_id, priorita_cod, priorita_desc, validita_inizio, validita_fine, utente_operazione, \",\n\t\t\t\"data_creazione, data_modifica, data_cancellazione\", \"from d_notifica_priorita\",\n\t\t\t\"where priorita_id = #{prioritaId,jdbcType=INTEGER}\" })\n\t@Results({ @Result(column = \"priorita_id\", property = \"prioritaId\", jdbcType = JdbcType.INTEGER, id = true),\n\t\t\t@Result(column = \"priorita_cod\", property = \"prioritaCod\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"priorita_desc\", property = \"prioritaDesc\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"validita_inizio\", property = \"validitaInizio\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"validita_fine\", property = \"validitaFine\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"utente_operazione\", property = \"utenteOperazione\", jdbcType = JdbcType.VARCHAR),\n\t\t\t@Result(column = \"data_creazione\", property = \"dataCreazione\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"data_modifica\", property = \"dataModifica\", jdbcType = JdbcType.TIMESTAMP),\n\t\t\t@Result(column = \"data_cancellazione\", property = \"dataCancellazione\", jdbcType = JdbcType.TIMESTAMP) })\n\tDNotificaPriorita selectByPrimaryKey(Integer prioritaId);", "private String getSelectQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeReadQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }", "public void llenarDatos() {\n String nombre = \"\";\n String descripcion = \"\";\n try {\n ResultSet resultado = buscador.getResultSet(\"select nombre, descripcion from NODO where ID = \" + IDNodoPadre + \";\");\n if (resultado.next()) {\n nombre = resultado.getObject(\"nombre\").toString();\n descripcion = resultado.getObject(\"descripcion\").toString();\n }\n } catch (SQLException e) {\n System.out.println(\"*SQL Exception: *\" + e.toString());\n }\n campoNombre.setText(nombre);\n campoDescripcion.setText(descripcion);\n //Si esta asociada a categorias\n if(conCategorias)\n llenarComboCategoria();\n else{\n comboCategoria.setVisible(false);\n labelCategoria.setVisible(false);\n }\n }", "@Override\r\n\tpublic String select() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(numPerPage*(pageIndex-1));\r\n\t\tparamList.add(numPerPage);\r\n\t\tthis.setResultMesg(adminDao.doCount(), adminDao.doSelect(paramList));\r\n\t\treturn SUCCESS;\r\n\t}", "public FlujoDetalleDTO cargarRegistro(int codigoFlujo, int secuencia) {\n/* */ try {\n/* 201 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.enviar_hermana,t.enviar_si_hermana_cerrada,t.ind_cliente_inicial,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" and t.secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 243 */ boolean rtaDB = this.dat.parseSql(s);\n/* 244 */ if (!rtaDB) {\n/* 245 */ return null;\n/* */ }\n/* 247 */ this.rs = this.dat.getResultSet();\n/* 248 */ if (this.rs.next()) {\n/* 249 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 252 */ catch (Exception e) {\n/* 253 */ e.printStackTrace();\n/* 254 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarFlujoDetalle\", e);\n/* */ } \n/* 256 */ return null;\n/* */ }", "public ResultSet obtenerDatosConsulta(String idConsultaMedica) throws SQLException\r\n {\r\n OperacionesConsultaMedica operacionesConsultaMedica = new OperacionesConsultaMedica();\r\n return operacionesConsultaMedica.obtenerDatosConsulta(idConsultaMedica);\r\n }", "public interface SelectDao<T> {\n\t\n\tpublic T findByCode(String code);\n\t\n\tpublic List<T> findByName(String name);\n\t\n\tpublic List<T> findByPhone(String phone);\n\t\n\tpublic List<T> getData(String column);\n\t\n}", "public abstract Statement queryToRetrieveData();", "List selectByExample(CTipoComprobanteExample example) throws SQLException;", "public static void ConsultarReq(String codCurso) {\n try {\n DefaultTableModel model = (DefaultTableModel) Vistas.ConsultaCursoReq.tblConsultaCurso.getModel();\n model.setRowCount(0);\n String consulta = \"Select distinct curreq.codigoCursoReq AS 'Requerimiento', Curso.nombreCurso AS 'Nombre curso'\\n\"\n + \"from Curso cur\\n\"\n + \"inner join Curso_Requisito curreq\\n\"\n + \"ON (Cur.codigoCurso= curreq.codigoCurso)\\n\"\n + \"join Curso \\n\"\n + \"ON (Curso.codigoCurso = curreq.codigoCursoReq)\"\n + \"WHERE cur.codigoCurso ='\" + codCurso + \"' \";\n ResultSet res = Modelo.ConexionSQL.consulta(consulta);\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getString(1));\n v.add(res.getString(2));\n model.addRow(v);\n Vistas.ConsultaCursoReq.tblConsultaCurso.setModel(model);\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage(), \"Error conexion\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public T consultaGenerica(String comandoSql) throws SQLException {\n T entidade = null;\n try (Connection conect = MySqlConexao.geraConexao()) {\n try (PreparedStatement params = conect.prepareStatement(comandoSql)) {\n try (ResultSet dados = params.executeQuery()) {\n if (dados.first()) {\n entidade = montaEntidade(dados);\n }\n }\n }\n if (!conect.isClosed()) {\n conect.close();\n }\n } catch (IOException ex) {\n Logger.getLogger(MySqlDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return entidade;\n }", "public ArrayList<ServicioDTO> consultarServicios(String columna, String informacion) throws Exception {\r\n ArrayList<ServicioDTO> dtos = new ArrayList<>();\r\n conn = Conexion.generarConexion();\r\n String sql = \"\";\r\n if (columna.equals(\"nom\")) \r\n sql = \" WHERE SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ?\";\r\n else if (columna.equals(\"cod\"))\r\n sql = \" WHERE SerCodigo = ? \";\r\n if (conn != null) {\r\n PreparedStatement stmt = conn.prepareStatement(\"SELECT SerCodigo, \"\r\n + \"SerNombre, SerCaracter, SerNotas, SerHabilitado \"\r\n + \"FROM tblservicio\" + sql);\r\n if (columna.equals(\"cod\")) {\r\n stmt.setString(1, informacion);\r\n } else if (columna.equals(\"nom\")) {\r\n stmt.setString(1, informacion);\r\n stmt.setString(2, \"%\" + informacion);\r\n stmt.setString(3, informacion + \"%\");\r\n stmt.setString(4, \"%\" + informacion + \"%\");\r\n }\r\n ResultSet rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n ServicioDTO dto = new ServicioDTO();\r\n dto.setCodigo(rs.getInt(1));\r\n dto.setNombre(rs.getString(2));\r\n dto.setCaracter(rs.getString(3));\r\n dto.setNotas(rs.getString(4));\r\n String habilitado = rs.getString(5);\r\n if(habilitado.equals(\"si\"))\r\n dto.setHabilitado(true);\r\n else\r\n dto.setHabilitado(false);\r\n dtos.add(dto);\r\n }\r\n stmt.close();\r\n rs.close();\r\n conn.close();\r\n }\r\n return dtos;\r\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "public void EjecutarConsulta() {\n try {\n Consultar(\"select * from \"+table);\n this.resultSet = preparedStatement.executeQuery();\n } catch (Exception e) {\n// MessageEmergent(\"Fail EjecutarConsulta(): \"+e.getMessage());\n }\n }", "public void PoblarINFO(String llamado) {//C.P.M Aqui llega como argumento llamado\r\n try {\r\n rs = modelo.Obteninfo();//C.P.M Mandamos a poblar la informacion de negocio\r\n if (llamado.equals(\"\")) {//C.P.M si el llamado llega vacio es que viene de la interface\r\n while (rs.next()) {//C.P.M recorremos el resultado para obtener los datos\r\n vista.jTNombreempresa.setText(rs.getString(1));//C.P.M los datos los enviamos a la vista de la interface\r\n vista.jTDireccion.setText(rs.getString(2));\r\n vista.jTTelefono.setText(rs.getString(3));\r\n vista.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n if (llamado.equals(\"factura\")) {//C.P.M de lo contrario es llamado de factura y los valores se van a la vista de vactura \r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n vistafactura.jTNombreempresa.setText(rs.getString(1));//C.P.M enviamos los datos a la vista de factura\r\n vistafactura.jTDireccion.setText(rs.getString(2));\r\n vistafactura.jTTelefono.setText(rs.getString(3));\r\n vistafactura.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n } catch (SQLException ex) {//C.P.M Notificamos a el usuario si ocurre algun error\r\n JOptionPane.showMessageDialog(null,\"Ocurio un error al intentar consultar la informacion del negocio\");\r\n }\r\n }", "@Override\r\n public Set<PhotoDTO> selectPhotosByType(String type) {\r\n PreparedStatement selectAllPhoto = dalService.getPreparedStatement(\r\n \"SELECT * ,f.state FROM project.photos p ,project.furniture f,project.furniture_types t \"\r\n + \"WHERE p.photo_id =f.favorite_photo AND \"\r\n + \"f.furniture_type=t.furniture_type_id AND t.name=?\");\r\n try {\r\n selectAllPhoto.setString(1, type);\r\n try (ResultSet rs = selectAllPhoto.executeQuery()) {\r\n Set<PhotoDTO> setPhotoDTOs = new HashSet<PhotoDTO>();\r\n while (rs.next()) {\r\n PhotoDTO photo = setPhotoDto(rs);\r\n photo.setFurnitureState(rs.getString(\"state\"));\r\n setPhotoDTOs.add(photo);\r\n }\r\n return setPhotoDTOs;\r\n }\r\n } catch (SQLException e) {\r\n throw new FatalException(e.getMessage().toString());\r\n }\r\n }", "HotelType selectByPrimaryKey(Integer typeiId);", "public List<NhanVien> select() {\n String sql = \"SELECT * FROM NhanVien\";\n return select(sql);\n }", "public java.sql.ResultSet consultaporespecialidadfecha(String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public abstract List<Usuario> seleccionarTodos();", "public static Utente queryUserType(String user, String password) throws SQLException{\n\t\t\tUtente mUser = null;\n\t\t\tModeratore mMod = null;\n\t\t\tString query = \"SELECT * \"\n\t\t\t\t\t+ \"FROM utente JOIN utente_gioco ON (utente.id = utente_gioco.id) \"\n\t\t\t\t\t+ \"WHERE username=? AND password=? ;\";\n\t\t\t\n\t\t\tConnection con = connectToDB();\n\t\t\tPreparedStatement cmd = con.prepareStatement(query);\n\t\t\tcmd.setString(1, user);\n\t\t\tcmd.setString(2, password);\n\t\t\t\n\t\t\tResultSet res = cmd.executeQuery();\n\t\t\t\n\t\t\t// Stampiamone i risultati riga per riga\n\t\t\twhile (res.next()) {\n\t\t\t\tSystem.out.println(res.getString(TIPO));\n\t\t\t\tif(res.getString(TIPO).equals(\"giocatore\")){\n\t\t\t\t\tmUser = new Utente();\n\t\t\t\t\t// Popola utente.\n\t\t\t\t\tmUser.setID(res.getInt(\"id\"));\n\t\t\t\t\tmUser.setNome(res.getString(\"nome\"));\n\t\t\t\t\tmUser.setCognome(res.getString(\"cognome\"));\n\t\t\t\t\tmUser.setEmail(res.getString(\"email\"));\n\t\t\t\t\tmUser.setUsername(res.getString(\"username\"));\n\t\t\t\t\tmUser.setPassword(res.getString(\"password\"));\n\t\t\t\t\tmUser.setPuntiXP(res.getInt(\"puntixp\"));\n\t\t\t\t\tmUser.setLivello();\n\t\t\t}\n\t\t\t\telse if (res.getString(TIPO).equals(\"moderatore\")){\n\t\t\t\t\tmMod = new Moderatore();\n\t\t\t\t\t// Popola utente.\n\t\t\t\t\tmMod.setID(res.getInt(\"id\"));\n\t\t\t\t\tmMod.setNome(res.getString(\"nome\"));\n\t\t\t\t\tmMod.setCognome(res.getString(\"cognome\"));\n\t\t\t\t\tmMod.setEmail(res.getString(\"email\"));\n\t\t\t\t\tmMod.setUsername(res.getString(\"username\"));\n\t\t\t\t\tmMod.setPassword(res.getString(\"password\"));\n\t\t\t\t\tmMod.setPuntiXP(res.getInt(\"puntixp\"));\n\t\t\t\t\tmMod.setLivello();\n\t\t\t\t}\n\t\t\t}\n\t\t\tres.close();\n\t\t\tcmd.close();\n\t\t\tif(mMod == null && mUser == null ) return null;\n\t\t\tif(mMod == null && mUser != null) return mUser;\n\t\t\tif(mMod != null && mUser == null) return mMod;\n\t\t\treturn null;\n\t\t}", "@Override\r\n public ProductosPuntoVenta[] findByDynamicSelect(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + sql);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(sql);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "@Override\r\n public Resultado consultar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n // instanciando DAO de acordo com a classe\r\n IDAO dao = daos.get(nmClass);\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"PESQUISAR\");\r\n if (msg.isEmpty()) {\r\n if (dao.consultar(entidade).isEmpty()) {\r\n //caso dados não foram encontrados\r\n resultado.setMsg(\"dados nao encontrados\");\r\n } else {\r\n //caso dados foram encontrados \r\n resultado.setMsg(\"pesquisa feita com sucesso\");\r\n }\r\n resultado.setEntidades(dao.consultar(entidade));\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "public java.sql.ResultSet consultapormedicoespecialidadfecha(String CodigoMedico,String CodigoEspecialidad,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pmd.codigo=\"+CodigoMedico+\" and pes.codigo=\"+CodigoEspecialidad+\" and phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicoespecialidadfecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number, id_firstcontact_doctor, password FROM patients;\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"password\", column = \"password\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n List<Patient> getAllPatientsDataToTable();", "public HospedagemBean select (int cdHospedagem, Connection conexao) throws Exception{\n\t\t\tstmt = conexao.prepareStatement(\"SELECT H.CD_HOSPEDAGEM, R.CD_RESERVA, C.CD_PESSOA, C.NM_PESSOA, F.CD_FUNCIONARIO, H.DT_ENTRADA, H.VC_PERC_DESCONTO FROM T_AM_LDB_HOSPEDAGEM H INNER JOIN T_AM_LDB_PESSOA C ON H.CD_CLIENTE = C.CD_PESSOA INNER JOIN T_AM_LDB_FUNCIONARIO F ON H.CD_FUNCIONARIO = F.CD_FUNCIONARIO INNER JOIN T_AM_LDB_RESERVA R ON H.CD_RESERVA = R.CD_RESERVA WHERE H.CD_HOSPEDAGEM = ?\");\n\t\t\tstmt.setInt(1, cdHospedagem);\n\t\t\trs = stmt.executeQuery();\n\t\t\trs.next();\n\t\t\tHospedagemBean hp = new HospedagemBean();\n\t\t\thp.setCodigoHospedagem(rs.getInt(\"CD_HOSPEDAGEM\"));\n\t\t\tReservaBean r = new ReservaBean();\n\t\t\tr.setCodigoReserva(rs.getInt(\"CD_RESERVA\"));\n\t\t\thp.setReserva(r);\n\t\t\tClienteBean c = new ClienteBean();\n\t\t\tc.setCodigoPessoa(rs.getInt(\"CD_PESSOA\"));\n\t\t\tc.setNomePessoa(rs.getString(\"NM_PESSOA\"));\n\t\t\thp.setCliente(c);\n\t\t\tFuncionarioBean f = new FuncionarioBean();\n\t\t\tf.setCodigoPessoa(rs.getInt(\"CD_FUNCIONARIO\"));\n\t\t\thp.setFuncionario(f);\n\t\t\tCalendar cal = null;\n\t\t\tcal = Calendar.getInstance();\n\t\t\tcal.setTime(rs.getDate(\"DT_ENTRADA\"));\n\t\t\thp.setDataEntrada(cal);\n\t\t\thp.setDesconto(rs.getInt(\"VC_PERC_DESCONTO\"));\n\t\t\treturn hp;\n\t}", "@Override\n\tpublic List<MyFoodDTO> selectAll() {\n\t\tString sql = \" SELECT * FROM view_식품정보 \";\n\t\tPreparedStatement pStr = null;\n\t\ttry {\n\t\t\tpStr = dbConn.prepareStatement(sql);\n\t\t\tList<MyFoodDTO> brList = this.select(pStr);\n\t\t\tpStr.close();\n\t\t\treturn brList;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "String getSelect();", "String getSelect();", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);", "protected abstract void select();", "public java.sql.ResultSet consultapormedicofecha2(String CodigoMedico,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \tSystem.out.println(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \t\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //LiquidacionImpor\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tLiquidacionImpor entity = new LiquidacionImpor();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=LiquidacionImporDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=LiquidacionImporDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,LiquidacionImporDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Importaciones.LiquidacionImpor.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseLiquidacionImpor(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();", "public synchronized ConsultaSQL getConsultaSQL(String TipoConsulta) throws Exception, IndexOutOfBoundsException, NullPointerException {\r\n\t\trecorreArbol(findConsultaSQL(TipoConsulta));\r\n\t\tcreateParameters();\r\n\t\tconssql.setParams(listaParams);\r\n\t\treturn conssql;\r\n\t}", "List<Usertype> selectAll();", "Select createSelect();", "public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;", "@Query(\"SELECT * FROM \"+Usuario.TABLE_NAME+\" WHERE nombre_usuario\" +\" = :nombre_u\")\n Usuario getUsuarioNombreUsuario(String nombre_u);", "Tipologia selectByPrimaryKey(BigDecimal id);", "public TableModel GetPagineOpera (int cod, String Opera) throws SQLException {\n\t\t\n Connection dbConnection = model.connectionDataBase.ConnectionDB.Connect();\n\n // Execute the query and get the ResultSet\n PreparedStatement stmt = dbConnection.prepareStatement(\"SELECT * FROM pagine_opera INNER JOIN opera ON pagine_opera.cod_opera = opera.cod WHERE opera.cod = ? AND opera.nome = ?\");\n stmt.setInt(1, cod);\n stmt.setString(2, Opera);\n \n ResultSet rs = stmt.executeQuery();\n TableModel tm = DbUtils.resultSetToTableModel(rs);\n dbConnection.close();\n\n return tm;\n\t\t\n\t}", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "HospitalType selectByPrimaryKey(String id);", "public List selectAllFromUsuario() throws IOException {\n erro = false;\n List usuarios = null;\n try {\n usuarios = con.query(\"Select * from usuario\", new BeanPropertyRowMapper(Usuario.class));\n } catch (CannotGetJdbcConnectionException ex) {\n logger.gravarDadosLog(\"ERRO\", \"SELECT\" , \"Não foi possivel realizar a consulta dos usuário cadastrados.\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n \n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"SELECT\" , \"A busca de usuários cadastrados foi realizada com sucesso.\");\n }\n erro = false;\n return usuarios;\n }", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "AliUserInfoDO selectByPrimaryKey(Long id);", "private void CargarListaFincas() {\n listaFincas = controlgen.GetComboBox(\"SELECT '-1' AS ID, 'Seleccionar' AS DESCRIPCION\\n\" +\n \"UNION\\n\" +\n \"SELECT `id` AS ID, `descripcion` AS DESCRIPCION\\n\" +\n \"FROM `fincas`\\n\"+\n \"/*UNION \\n\"+\n \"SELECT 'ALL' AS ID, 'TODOS' AS DESCRIPCION*/\");\n \n Utilidades.LlenarComboBox(cbFinca, listaFincas, \"DESCRIPCION\");\n \n }", "public Map<String,String> selectByCode(Context pActividad,int pId)\n {\n //tenemos que devolver un mapa con los valores resultantes del Select, solo sera una row\n Map<String,String> rst = new HashMap<String,String>();\n\n try\n {\n AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(pActividad, \"administracion\", null, 1);\n SQLiteDatabase db = admin.getWritableDatabase();\n\n //lanzamos una sentencia select --> el resultado de esta query vamos ha hacer que se guarde en una variable de tipo cursor\n //raw query es un metodo que hace eso precisamente, el resultado de un select a un cursor\n Cursor filas = db.rawQuery(\"Select descripcion, precio from Articulos where codigo = \" + pId, null);\n if (filas.moveToFirst())\n {\n rst.put(\"descripcion\", filas.getString(0));\n rst.put(\"precio\", filas.getString(1));\n }\n }\n catch (Exception e)\n {\n Toast.makeText(pActividad,\"Error al recuperar valores\",Toast.LENGTH_SHORT).show();\n }\n finally\n {\n return rst;\n }\n }", "public void selectFromTable(){\n //SQL query\n String query = \"SELECT fNavn, eNavn, konto_Navn, konto_Reg, konto_ID, konto_Saldo FROM person JOIN konti ON Person_ID = fk_Person_ID\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nFornavn: \\t\\tEfternavn: \\t\\tKonto: \\t\\tReg.nr: \\t\\tKontonr.: \\t\\tSaldo: \\n____________________________________\");\n\n //get data\n while (rs.next()){\n String fNavn = rs.getString(\"fNavn\"); //returns fornavn\n String eNavn = rs.getString(\"eNavn\"); //returns efternavn\n String kontoNavn = rs.getString(\"konto_Navn\"); //returns kontonavn\n int kontoReg = rs.getInt(\"konto_Reg\"); //returns kontoreg\n double kontoID = rs.getDouble(\"konto_ID\"); //returns kontoID\n double kontoSaldo = rs.getDouble(\"konto_Saldo\"); //returns kontoSaldo\n System.out.println(fNavn + \"\\t\\t\" + eNavn + \"\\t\\t\" + kontoNavn + \"\\t\\t\" + kontoReg + \"\\t\\t\" + kontoID + \"\\t\\t\" + kontoSaldo);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n\n\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<Tipo> listaTipo() throws SQLException{\n String sql= \"SELECT * FROM aux_tipo_obra\";\n ResultSet rs = null ;\n try {\n PreparedStatement stmt = connection.prepareStatement(sql);\n rs=stmt.executeQuery();\n List<Tipo> listaTipo = new ArrayList<>();\n \n while(rs.next()){\n Tipo tipo = new Tipo();\n tipo.setId(rs.getInt(\"id_tipo\"));\n tipo.setTipo(rs.getString(\"Tipo\"));\n listaTipo.add(tipo); \n }\n return listaTipo;\n }\n catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }", "private void pesquisaTipoAnimal() throws SQLException {\n\n conexao conexao = new conexao();\n conexao.getConexao();\n String selectSQL = \"SELECT * FROM tipoAnimal A \";\n\n Statement pstmtCon;\n pstmtCon = conexao.getConexao().createStatement();\n\n ResultSet rs = pstmtCon.executeQuery(selectSQL);\n\n pesquisa_ComboTipoAnimal.removeAllItems();\n pesquisa_ComboTipoAnimal.addItem(\"Selecionar\");\n\n while (rs.next()) {\n\n pesquisa_ComboTipoAnimal.addItem(rs.getString(\"descricao\"));\n\n }\n\n rs.close();\n pstmtCon.close();\n }", "private static DTOSalida getDTOSalida(String query) throws MareException { \n UtilidadesLog.info(\"DAOGestionComisiones.getDTOSalida(String query): Entrada\");\n RecordSet rs = new RecordSet();\n DTOSalida dtos = new DTOSalida();\n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n UtilidadesLog.debug(query); \n try {\n rs = bs.dbService.executeStaticQuery(query);\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.getDTOSalida(String query): Salida\");\n return dtos; \n }", "public void refresh() {\n String sql = \"\";\n sql += \"select m.id\"\n + \", m.data\"\n + \", CAST(CONCAT(dep.nome, ' [', dep.id, ']') AS CHAR(50)) as deposito\"\n + \", cau.descrizione as causale\"\n + \", m.articolo\"\n + \", if (cau.segno = -1 , -m.quantita, m.quantita) as quantita\"\n + \", m.note\"\n + \", cast(concat(IF(m.da_tipo_fattura = 7, 'Scontr.', \"\n + \" IF(m.da_tabella = 'test_fatt', 'Fatt. Vend.', \"\n + \" IF(m.da_tabella = 'test_ddt', 'DDT Vend.',\"\n + \" IF(m.da_tabella = 'test_fatt_acquisto', 'Fatt. Acq.',\"\n + \" IF(m.da_tabella = 'test_ddt_acquisto', 'DDT Acq.', m.da_tabella)))))\"\n + \" , da_serie, ' ', da_numero, '/', da_anno, ' - [ID ', da_id, ']') as CHAR)as origine\"\n // + \", m.da_tabella\"\n // + \", m.da_anno\"\n // + \", m.da_serie\"\n // + \", m.da_numero\"\n // + \", m.da_id\"\n + \", m.matricola\"\n + \", m.lotto\"\n + \", a.codice_fornitore, a.codice_a_barre from movimenti_magazzino m left join articoli a on m.articolo = a.codice\"\n + \" left join tipi_causali_magazzino cau on m.causale = cau.codice\"\n + \" left join depositi dep ON m.deposito = dep.id\";\n sql += \" where 1 = 1\";\n System.out.println(\"articolo_selezionato_filtro_ref = \" + articolo_selezionato_filtro_ref);\n System.out.println(\"articolo_selezionato_filtro_ref get = \" + articolo_selezionato_filtro_ref.get());\n if (articolo_selezionato_filtro_ref.get() != null && StringUtils.isNotBlank(articolo_selezionato_filtro_ref.get().codice)) {\n sql += \" and m.articolo like '\" + Db.aa(articolo_selezionato_filtro_ref.get().codice) + \"'\";\n }\n if (filtro_barre.getText().length() > 0) {\n sql += \" and a.codice_a_barre like '%\" + Db.aa(filtro_barre.getText()) + \"%'\";\n }\n if (filtro_lotto.getText().length() > 0) {\n sql += \" and m.lotto like '%\" + Db.aa(filtro_lotto.getText()) + \"%'\";\n }\n if (filtro_matricola.getText().length() > 0) {\n sql += \" and m.matricola like '%\" + Db.aa(filtro_matricola.getText()) + \"%'\";\n }\n if (filtro_fornitore.getText().length() > 0) {\n sql += \" and a.codice_fornitore like '%\" + Db.aa(filtro_fornitore.getText()) + \"%'\";\n }\n if (filtro_deposito.getSelectedIndex() >= 0) {\n sql += \" and m.deposito = \" + cu.s(filtro_deposito.getSelectedKey());\n }\n sql += \" order by m.data desc, id desc\";\n System.out.println(\"sql movimenti: \" + sql);\n griglia.dbOpen(Db.getConn(), sql, Db.INSTANCE, true);\n griglia.dbSelezionaRiga();\n }", "@Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number,id_firstcontact_doctor FROM patients \" +\n \"WHERE id_patient = #{patientId}\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n Patient getPatient(int patientId);", "public Select getSelect()\n {\n return select;\n }", "List<Tipologia> selectByExample(TipologiaExample example);", "@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "private void buscar() {\n try { \n conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/sistema_gmg\", \"root\", \"1405\");\n\n st = conexion.createStatement();\n \n rs = st.executeQuery(\"select * from ciclos where ciclo like '%\" + this.jtf_buscar.getText() + \"%'\");\n\n jtf_id_ciclo.setText(null);\n jtf_ciclo.setText(null);\n jtf_finicio.setText(null);\n jtf_ftermino.setText(null);\n \n jt_ciclos.setModel(DbUtils.resultSetToTableModel(rs));\n \n jb_cancelar.setEnabled(true); \n rs = st.executeQuery(\"select *from ciclos\");\n } catch (SQLException ex) {\n Logger.getLogger(JF_Alumnos.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<Tutores> readAllJPQL() throws SecurityException{ \n String sql=\"Select tu from Tutores tu\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }", "public Usuario[] findByDynamicSelect(String sql, Object[] sqlParams) throws SQLException;" ]
[ "0.63857055", "0.6311399", "0.6297534", "0.6267562", "0.625015", "0.62430555", "0.61199725", "0.60856384", "0.6079987", "0.60787725", "0.60585034", "0.605291", "0.60315764", "0.6030673", "0.60292375", "0.59989536", "0.5990452", "0.59300447", "0.59214556", "0.5915605", "0.5869955", "0.58634984", "0.58607334", "0.5858347", "0.5820323", "0.5819097", "0.5812589", "0.58017725", "0.57997656", "0.579817", "0.57903457", "0.5789518", "0.5782539", "0.57729125", "0.5771838", "0.5770981", "0.5760369", "0.5753145", "0.57522625", "0.5743448", "0.5742725", "0.5739696", "0.5733371", "0.57311416", "0.5726772", "0.571455", "0.5709614", "0.5705822", "0.57044524", "0.5701734", "0.5700855", "0.5699832", "0.5693405", "0.56849897", "0.5682013", "0.5680689", "0.56749034", "0.5670617", "0.56701237", "0.56641054", "0.56608355", "0.5653352", "0.56470746", "0.56417084", "0.56403697", "0.56403697", "0.5636719", "0.5635832", "0.56342566", "0.56341696", "0.56307113", "0.56237805", "0.5620017", "0.5615913", "0.56137824", "0.5613516", "0.56112134", "0.56111807", "0.5602206", "0.5600987", "0.5598159", "0.5593733", "0.5593649", "0.55921316", "0.5585487", "0.5579822", "0.5577758", "0.55733985", "0.5566808", "0.55663496", "0.5564806", "0.5564678", "0.556428", "0.55612373", "0.55583864", "0.55545586", "0.5551842", "0.55507416", "0.5545321", "0.5544279", "0.55405676" ]
0.0
-1
Crea tablas, si ya existen las deja tal cual estan
public static Statement usarCrearTablasBD( Connection con ) { try { Statement statement = con.createStatement(); statement.setQueryTimeout(30); // poner timeout 30 msg statement.executeUpdate("create table if not exists items " + "(id integer, name string, timeperunit real)"); log( Level.INFO, "Creada base de datos", null ); return statement; } catch (SQLException e) { lastError = e; log( Level.SEVERE, "Error en creación de base de datos", e ); e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "tbls createtbls();", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n casillas[i][j] = new Casilla();\n }\n }\n }", "private void criaJTable() {\n tabela = new JTable(modelo);\n modelo.addColumn(\"Codigo:\");\n modelo.addColumn(\"Data inicio:\");\n modelo.addColumn(\"Data Fim:\");\n modelo.addColumn(\"Valor produto:\");\n modelo.addColumn(\"Quantidade:\");\n\n preencherJTable();\n }", "private void createTables() {\n\n\t\tAutoDao.createTable(db, true);\n\t\tAutoKepDao.createTable(db, true);\n\t\tMunkaDao.createTable(db, true);\n\t\tMunkaEszkozDao.createTable(db, true);\n\t\tMunkaKepDao.createTable(db, true);\n\t\tMunkaTipusDao.createTable(db, true);\n\t\tPartnerDao.createTable(db, true);\n\t\tPartnerKepDao.createTable(db, true);\n\t\tProfilKepDao.createTable(db, true);\n\t\tSoforDao.createTable(db, true);\n\t\tTelephelyDao.createTable(db, true);\n\t\tPushMessageDao.createTable(db, true);\n\n\t}", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "@Test\n public void testTableFactoryCreateNoOtherTables() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertNull(tableController.getTableMap().get(1));\n assertNotNull(tableController.getTableMap().get(2));\n assertNull(tableController.getTableMap().get(3));\n }", "private void createTable(){\n Object[][] data = new Object[0][8];\n int i = 0;\n for (Grupo grupo : etapa.getGrupos()) {\n Object[][] dataAux = new Object[data.length+1][8];\n System.arraycopy(data, 0, dataAux, 0, data.length);\n dataAux[i++] = new Object[]{grupo.getNum(),grupo.getAtletas().size(),\"Registar Valores\",\"Selecionar Vencedores\", \"Selecionar Atletas\"};\n data = dataAux.clone();\n }\n\n //COLUMN HEADERS\n String columnHeaders[]={\"Numero do Grupo\",\"Número de Atletas\",\"\",\"\",\"\"};\n\n tableEventos.setModel(new DefaultTableModel(\n data,columnHeaders\n ));\n //SET CUSTOM RENDERER TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(3).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(4).setCellRenderer(new ButtonRenderer());\n\n //SET CUSTOM EDITOR TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(3).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(4).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n\n }", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "public void construirTabla(String tipo) {\r\n\r\n\t\t\r\n\t\tif(tipo == \"lis\") {\r\n\t\t\tlistaPersonas = datarPersonas();\r\n\t\t} else if (tipo == \"bus\") {\r\n\t\t\tlistaPersonas = datarPersonasBusqueda();\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> titulosList=new ArrayList<>();\r\n\t\t\r\n\t\t//Estos son los encabezados de las columnas\r\n\t\t\r\n\t\ttitulosList.add(\"DNI\");\r\n\t\ttitulosList.add(\"NOMBRE\");\r\n\t\ttitulosList.add(\"APELLIDO\");\r\n\t\ttitulosList.add(\"CUENTA BANCARIA\");\r\n\t\ttitulosList.add(\"PASSWORD\");\r\n\t\ttitulosList.add(\"FECHA DE NACIMIENTO\");\r\n\t\ttitulosList.add(\"TELEFONO\");\r\n\t\ttitulosList.add(\"CORREO ELECTRONICO\");\r\n\t\ttitulosList.add(\"ROL\");\r\n\t\ttitulosList.add(\"Modificar\");\r\n\t\ttitulosList.add(\"Eliminar\"); \r\n\t\t\t\t\r\n\t\t//se asignan los títulos de las columnas para enviarlas al constructor de la tabla\r\n\t\t\r\n\t\tString titulos[] = new String[titulosList.size()];\r\n\t\tfor (int i = 0; i < titulos.length; i++) {\r\n\t\t\ttitulos[i]=titulosList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tObject[][] data = arrayDatos(titulosList);\r\n\t\tcrearTabla(titulos,data);\r\n\t\t\r\n\t}", "TABLE createTABLE();", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void MakeTableData()\r\n {\n classes = ResetClasses();\r\n \r\n // 'WHATS ON' TAB SELECTED\r\n if (selectedTab == 0)\r\n {\r\n // iterate through days\r\n for (int i = 0; i < daysPerWeek; i++)\r\n {\r\n // iterate through times and rooms\r\n for (int j = 0; j < totalSlots; j++)\r\n {\r\n LessonClass a = weekArray[(weekNo -1)].dayArray[i].dayMap.get(roomNtime[j]);\r\n if (a != null)\r\n {\r\n if (byAllFlag == true)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n else if (bySubjectFlag == true)\r\n {\r\n if (a.subject == subComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n else if (byTutorFlag == true)\r\n {\r\n if (a.tutorName == tutComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // 'DIARY' TAB SELECTED\r\n else if (selectedTab == 1)\r\n {\r\n if (userLoggedIn != null)\r\n { \r\n // iterate through days\r\n for (int i = 0; i < daysPerWeek; i++)\r\n {\r\n // iterate through times and rooms\r\n for (int j = 0; j < totalSlots; j++)\r\n {\r\n // pertinent tracks if ID is in register\r\n boolean pertinent = false;\r\n LessonClass a = weekArray[(weekNo -1)].dayArray[i].dayMap.get(roomNtime[j]);\r\n if (a != null)\r\n {\r\n for (String s : a.register)\r\n {\r\n if (userLoggedIn.equals(s))\r\n {\r\n pertinent = true;\r\n }\r\n } \r\n \r\n if (byAllFlag == true && pertinent == true)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n else if (bySubjectFlag == true && pertinent == true)\r\n {\r\n if (a.subject == subComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n else if (byTutorFlag == true && pertinent == true)\r\n {\r\n if (a.tutorName == tutComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "Table createTable();", "public synchronized void criarTabela(){\n \n String sql = \"CREATE TABLE IF NOT EXISTS CPF(\\n\"\n + \"id integer PRIMARY KEY AUTOINCREMENT,\\n\"//Autoincrement\n// + \"codDocumento integer,\\n\"\n + \"numCPF integer\\n\"\n + \");\";\n \n try (Connection c = ConexaoJDBC.getInstance();\n Statement stmt = c.createStatement()) {\n // create a new table\n stmt.execute(sql);\n stmt.close();\n c.close();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage()); \n// System.out.println(e.getMessage());\n }\n System.out.println(\"Table created successfully\");\n }", "private void createTables() throws SQLException\r\n {\r\n createTableMenuItems();\r\n createTableOrdersWaiting();\r\n }", "private void EjemplollenarTabla(JSONArray arr) {\n TableLayout tl = new TableLayout(null);\n while (tl.getChildCount() > 1)//vacia la table, excepto el encabezado\n tl.removeViewAt(1);\n for (int i = 0; i < arr.length(); i++) {//recorre el arreglo y llena la tabla\n try {\n JSONObject obj = arr.getJSONObject(i);\n TableRow tr = new TableRow(this);\n tr.setGravity(Gravity.CENTER);\n tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT));\n\n TextView nombre = new TextView(getApplicationContext());\n nombre.setText(obj.getString(\"nombre\"));\n nombre.setTextColor(Color.BLACK);\n nombre.setTextSize(16f);\n tr.addView(nombre);\n\n TextView importado = new TextView(getApplicationContext());\n importado.setText(obj.getString(\"importado\"));\n importado.setTextColor(Color.BLACK);\n importado.setTextSize(16f);\n tr.addView(importado);\n\n TextView precio = new TextView(getApplicationContext());\n precio.setText(obj.getString(\"precio\"));\n precio.setTextColor(Color.BLACK);\n precio.setTextSize(16f);\n tr.addView(precio);\n\n TextView tipo = new TextView(getApplicationContext());\n tipo.setText(obj.getString(\"tipo\"));\n tipo.setTextColor(Color.BLACK);\n tipo.setTextSize(16f);\n tr.addView(tipo);\n\n TextView preciof = new TextView(getApplicationContext());\n preciof.setText(obj.getString(\"precio\"));\n preciof.setTextColor(Color.BLACK);\n preciof.setTextSize(16f);\n tr.addView(preciof);\n\n tl.addView(tr, new TableLayout.LayoutParams(TableLayout.LayoutParams.FILL_PARENT, TableLayout.LayoutParams.WRAP_CONTENT));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"CPF\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Endereço\");\n cabecalho.add(\"E-mail\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Cliente cliente : new NCliente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(cliente.getId() + \"\");\n linha.add(cliente.getNome());\n linha.add(cliente.getCpf());\n linha.add(cliente.getTelefone());\n linha.add(cliente.getEndereco());\n linha.add(cliente.getEmail());\n linha.add(cliente.getData_nascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblClientes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void createTables(){\n Map<String, String> name_type_map = new HashMap<>();\n List<String> primaryKey = new ArrayList<>();\n try {\n name_type_map.put(KEY_SINK_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_DETAIL, MyDatabase.TYPE_VARCHAR);\n primaryKey.add(KEY_SINK_ADDRESS);\n myDatabase.createTable(TABLE_SINK, name_type_map, primaryKey, null);\n }catch (MySQLException e){ //数据表已存在\n e.print();\n }\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_DETAIL, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_ADDRESS,MyDatabase.TYPE_VARCHAR);\n primaryKey.clear();\n primaryKey.add(KEY_NODE_PARENT);\n primaryKey.add(KEY_NODE_ADDRESS);\n myDatabase.createTable(TABLE_NODE, name_type_map, primaryKey, null);\n }catch (MySQLException e){\n e.print();\n }\n\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_DATA_TIME, MyDatabase.TYPE_TIMESTAMP);\n name_type_map.put(KEY_DATA_VAL, MyDatabase.TYPE_FLOAT);\n primaryKey.clear();\n primaryKey.add(KEY_DATA_TIME);\n primaryKey.add(KEY_NODE_ADDRESS);\n primaryKey.add(KEY_NODE_PARENT);\n myDatabase.createTable(TABLE_DATA, name_type_map, primaryKey, null);\n }catch (MySQLException e) {\n e.print();\n }\n }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\n private void createTable(ArrayList<Object> objects){\n log.setText(\"\");\n if(!objects.isEmpty()) {\n ArrayList<String> list = new ArrayList<String>();\n int index = 0, row = 0, column = 0;\n for (Field field : objects.get(0).getClass().getDeclaredFields()) {\n list.add(field.getName());\n }\n String[] columnName = new String[list.size()];\n for(String s:list) {\n columnName[index] = s;\n index++;\n }\n Object data[][] = getData(objects, index);\n if(data.length != 0) {\n tableMode = new DefaultTableModel(data, columnName);\n }\n else {\n tableMode = null;\n }\n }\n else {\n tableMode = null;\n }\n }", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "void prepareTables();", "boolean createTable();", "Tablero consultarTablero();", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "@Override\n\tpublic void handle(ActionEvent arg0) {\n\t\tCreateTables creator = new CreateTables(tlp);\n\t\tcreator.createLogTable();\n//\t\tcreator.createRacesTable();\n//\t\tcreator.createTravelHistoryTable();\n\t\tSystem.out.println(\"log exist: \"+creator.checkExistingTable(\"log\"));\n\t\tSystem.out.println(\"races exist: \"+creator.checkExistingTable(\"races\"));\n\t\tSystem.out.println(\"travelhistory exist: \"+creator.checkExistingTable(\"travelhistory\"));\n\t}", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "private ArrayList<FornecedorModelo> iniciaTabela() {\n int i;\n DefaultTableModel model=(DefaultTableModel)tblFornecedor.getModel();\n // atribui 0 linhas à coluna\n model.setNumRows(0);\n // atribui um tamanho fixo a coluna codigo\n tblFornecedor.getColumnModel().getColumn(0).setPreferredWidth(2);\n ArrayList<FornecedorModelo> listaFornecedores = new ArrayList<FornecedorModelo>();\n listaFornecedores = new FornecedorControle().listarFornecedor();\n //adiciona alunos as tabelas\n for (i=0;i<=listaFornecedores.size()-1;i++){\n model.addRow(\n new Object[]{\n listaFornecedores.get(i).getCodFornecedor(),\n listaFornecedores.get(i).getNomeFantasia(),\n listaFornecedores.get(i).getRazaoSocial(),\n listaFornecedores.get(i).getEndereco(),\n listaFornecedores.get(i).getEmail(),\n listaFornecedores.get(i).getTelefone(),\n listaFornecedores.get(i).getCnpj(),\n Boolean.FALSE\n }\n );\n }\n return listaFornecedores;\n }", "public void doCreateTable();", "@Test\n public void testTableFactoryCreate() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertEquals(1, tableController.getTableMap().get(2).size());\n }", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "private void CreatTable() {\n String sql = \"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME\n + \" (name varchar(30) primary key,password varchar(30));\";\n try{\n db.execSQL(sql);\n }catch(SQLException ex){}\n }", "private void CriarTabelaHorarios(SQLiteDatabase db) {\r\n\t\tdb.execSQL(String.format(\"CREATE TABLE %s (\"\r\n\t\t\t\t+ \"%s INTEGER PRIMARY KEY, \" + \"%s VARCHAR(10), \"\r\n\t\t\t\t+ \"%s NUMBER(7,2), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \"\r\n\t\t\t\t+ \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(7), \"\r\n\t\t\t\t+ \"%s VARCHAR(100));\", HorariosColumns.INSTANCIA.getTABELA(),\r\n\t\t\t\tHorariosColumns.CAMPO_ID, HorariosColumns.CAMPO_DATA,\r\n\t\t\t\tHorariosColumns.CAMPO_DATA_NUM, HorariosColumns.CAMPO_HORA1,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA2, HorariosColumns.CAMPO_HORA3,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA4, HorariosColumns.CAMPO_SALDO,\r\n\t\t\t\tHorariosColumns.CAMPO_EXTRA));\r\n\t}", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "public static void existOrCreateTable(Class classz){\n String tname = classz.getSimpleName();\n NLog.i(\"sqlo table name:%s\", tname);\n if( tables.get(tname) == null )\n createTable(classz);\n }", "private void inicializarComponentes() \n\t{\n\t\tthis.table=new JTable(); \n\t\ttablas.setBackground(Color.white);\n\t\tscroll =new JScrollPane(table); // Scroll controla la tabla\n\t\tthis.add(scroll,BorderLayout.CENTER);\n\t\tthis.add(tablas,BorderLayout.NORTH);\n\t\t\n\t}", "public void limparTabela(String tabela){\n \n if(tabela.equals(\"hora\")){\n modHT.setRowCount(0);\n modMF.setRowCount(0);\n txtEntrada_Horario.requestFocus();\n }else if(tabela.equals(\"marc\")){\n modMF.setRowCount(0);\n txtEntrada_Marcacoes.requestFocus();\n }\n \n //Limpa as tabelas de Atraso e Extras\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n }", "private void buildTables(){\r\n\t\tarticleTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\tarticleTable.setPageLength(5);\r\n\t\tlabel = new Label(\"No article found\");\r\n\t\tlabel2 = new Label(\"No image found\");\r\n\t\timageTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\timageTable.setPageLength(5);\r\n\t}", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "public boolean createAllTables (){\n try {\n this.execute(CREATE_PEOPLE);\n this.execute(CREATE_AUTHOR);\n this.execute(CREATE_EMPLOYEE);\n this.execute(CREATE_MEETING);\n this.execute(CREATE_COVERPRICE);\n this.execute(CREATE_PRICEPARAMETERS);\n this.execute(CREATE_ORDER);\n this.execute(CREATE_CORRECTIONS);\n this.execute(CREATE_BOOK);\n this.execute(CREATE_COVERLINK);\n return true;\n } catch (SQLException | IOException | ClassNotFoundException e) {\n log.error(e);\n return false;\n }\n }", "protected abstract void addTables();", "FromTable createFromTable();", "public void createTables() throws Exception{\n\t\tcreate_table(\"tab_global\", \"param\", 1);\n\t\t\n\t\tPut put = new Put(Bytes.toBytes(\"row_userid\"));\n\t\tlong id = 0;\n\t\tput.add(Bytes.toBytes(\"param\"), \n\t\t\t\tBytes.toBytes(\"userid\"), \n\t\t\t\tBytes.toBytes(id));\n\t\tHTable ht = new HTable(conf, \"tab_global\");\n\t\tht.put(put);\n\t\t\n\t\tcreate_table(\"tab_user2id\", \"info\", 1);\n\t\tcreate_table(\"tab_id2user\", \"info\", 1);\n\t\t\n\t\t//table_follow\t{userid}\tname:{userid}\n\t\tcreate_table(\"tab_follow\", \"name\", 1);\n\t\t\n\t\t//table_followed\trowkey:{userid}_{userid} CF:userid\n\t\tcreate_table(\"tab_followed\", \"userid\", 1);\n\t\t\n\t\t//tab_post\trowkey:postid\tCF:post:username post:content post:ts\n\t\tcreate_table(\"tab_post\", \"post\", 1);\n\t\tput = new Put(Bytes.toBytes(\"row_postid\"));\n\t\tid = 0;\n\t\tput.add(Bytes.toBytes(\"param\"), \n\t\t\t\tBytes.toBytes(\"postid\"), \n\t\t\t\tBytes.toBytes(id));\n\t\tht.put(put);\n\t\t\n\t\t//tab_inbox\t\trowkey:userid+postid\tCF:postid\n\t\tcreate_table(\"tab_inbox\", \"postid\", 1);\n\t\tht.close();\n\t}", "public static boolean checkOrCreateTable(jsqlite.Database db, String tableName){\n\t\t\n\t\tif (db != null){\n\t\t\t\n\t String query = \"SELECT name FROM sqlite_master WHERE type='table' AND name='\"+tableName+\"'\";\n\n\t boolean found = false;\n\t try {\n\t Stmt stmt = db.prepare(query);\n\t if( stmt.step() ) {\n\t String nomeStr = stmt.column_string(0);\n\t found = true;\n\t Log.v(\"SPATIALITE_UTILS\", \"Found table: \"+nomeStr);\n\t }\n\t stmt.close();\n\t } catch (Exception e) {\n\t Log.e(\"SPATIALITE_UTILS\", Log.getStackTraceString(e));\n\t return false;\n\t }\n\n\t\t\tif(found){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t// Table not found creating\n Log.v(\"SPATIALITE_UTILS\", \"Table \"+tableName+\" not found, creating..\");\n\t\t\t\t\n if(tableName.equalsIgnoreCase(\"punti_accumulo_data\")){\n\n \tString create_stmt = \"CREATE TABLE 'punti_accumulo_data' (\" +\n \t\t\t\"'PK_UID' INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n \t\t\t\"'ORIGIN_ID' TEXT, \" +\n \t\t\t\"'DATA_SCHEDA' TEXT, \" +\n \t\t\t\"'DATA_AGG' TEXT, \" +\n \t\t\t\"'NOME_RILEVATORE' TEXT, \" +\n \t\t\t\"'COGNOME_RILEVATORE' TEXT, \" +\n \t\t\t\"'ENTE_RILEVATORE' TEXT, \" +\n \t\t\t\"'TIPOLOGIA_SEGNALAZIONE' TEXT, \" +\n \t\t\t\"'PROVENIENZA_SEGNALAZIONE' TEXT, \" +\n \t\t\t\"'CODICE_DISCARICA' TEXT, \" +\n \t\t\t\"'TIPOLOGIA_RIFIUTO' TEXT, \" +\n \t\t\t\"'COMUNE' TEXT, \" +\n \t\t\t\"'LOCALITA' TEXT, \" +\n \t\t\t\"'INDIRIZZO' TEXT, \" +\n \t\t\t\"'CIVICO' TEXT, \" +\n \t\t\t\"'PRESA_IN_CARICO' TEXT, \" +\n \t\t\t\"'EMAIL' TEXT, \" +\n \t\t\t\"'RIMOZIONE' TEXT, \" +\n \t\t\t\"'SEQUESTRO' TEXT, \" +\n \t\t\t\"'RESPONSABILE_ABBANDONO' TEXT, \" +\n \t\t\t\"'QUANTITA_PRESUNTA' NUMERIC);\";\n\n \tString add_geom_stmt = \"SELECT AddGeometryColumn('punti_accumulo_data', 'GEOMETRY', 4326, 'POINT', 'XY');\";\n \tString create_idx_stmt = \"SELECT CreateSpatialIndex('punti_accumulo_data', 'GEOMETRY');\";\n \n \t// TODO: check if all statements are complete\n \t\n \ttry { \t\n \t\tStmt stmt01 = db.prepare(create_stmt);\n\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t\t//TODO This will never happen, CREATE statements return empty results\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Table Created\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// TODO: Check if created, fail otherwise\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01 = db.prepare(add_geom_stmt);\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Geometry Column Added \"+stmt01.column_string(0));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01 = db.prepare(create_idx_stmt);\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Index Created\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01.close();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (jsqlite.Exception e) {\n\t\t\t\t\t\tLog.e(\"UTILS\", Log.getStackTraceString(e));\n\t\t\t\t\t}\n \treturn true;\n }\n\t\t\t}\n\t\t}else{\n\t\t\tLog.w(\"UTILS\", \"No valid database received, aborting..\");\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private EstabelecimentoTable() {\n\t\t\t}", "private void atualizarTabela() {\n if (cbLista.getSelectedIndex() == -1) {\n btnAddTarefa.setEnabled(false);\n btnAlterarTarefa.setEnabled(false);\n btnExcluirTarefa.setEnabled(false);\n } else {\n btnAddTarefa.setEnabled(true);\n btnAlterarTarefa.setEnabled(true);\n btnExcluirTarefa.setEnabled(true);\n }\n\n TarefaDAO tarefaDAO = new TarefaDAO();\n TarefaTableModel ttm = new TarefaTableModel();\n lista = ((Lista) cbLista.getSelectedItem());\n if (lista != null) {\n ttm.setLista(tarefaDAO.getTarefasByLista(lista));\n } else {\n ttm.setLista(new ArrayList<>());\n }\n tbTarefa.setModel(ttm);\n\n }", "protected void createInitialTables() throws SQLException {\n\t\n\t\t// create one table per type with the corresponding attributes\n\t\tfor (String type: entityType2attributes.keySet()) {\n\t\t\tcreateTableForEntityType(type);\n\t\t}\n\t\t\n\t\t// TODO indexes !\n\t\t\n\t}", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public void cargarTabla(String servidor){\n String base_de_datos1=cbBaseDeDatos.getSelectedItem().toString();\n String sql =\"USE [\"+base_de_datos1+\"]\\n\" +\n \"SELECT name FROM sysobjects where xtype='U' and category <> 2\";\n // JOptionPane.showMessageDialog(null,\"SQL cargarbases \"+sql);\n Conexion cc = new Conexion();\n Connection cn=cc.conectarBase(servidor, base_de_datos1);\n modeloTabla=new DefaultTableModel();\n String fila[]=new String[1] ;\n String[] titulos={\"Tablas\"} ;\n try {\n Statement psd = cn.createStatement();\n ResultSet rs=psd.executeQuery(sql);\n if(modeloTabla.getColumnCount()<2){\n modeloTabla.addColumn(titulos[0]);\n //modeloTabla.addColumn(titulos[1]);\n }\n while(rs.next()){\n fila[0]=rs.getString(\"name\");\n // fila[1]=\"1\";\n modeloTabla.addRow(fila);\n }\n tblTablas.setModel(modeloTabla);\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex+\" al cargar tabla\");\n }\n }", "public boolean maketable() {\n String query = \"\";\n if (connect != null) {\n try {\n java.sql.DatabaseMetaData dbmd = connect.getMetaData();\n ResultSet rs = dbmd.getTables(null, null, \"PLAYERNAME\", null);\n if (rs.next()) {//If it is existed\n System.out.println(\"table exists\");\n } else {//otherwise, create the table\n query = \"create table score(\\n\"\n + \"nickname varchar(40) not null,\\n\"\n + \"levels integer not null,\\n\"\n + \"highscore integer,\\n\"\n + \"numberkill integer,\\n\"\n + \"constraint pk_nickname_score PRIMARY KEY (nickname)\\n\"\n + \")\";\n ps = connect.prepareStatement(query);\n ps.execute();//Execute the SQL statement\n System.out.println(\"new table created\");\n }\n } catch (SQLException ex) {\n System.out.println(\"table create failed\");\n ex.printStackTrace();\n }\n } else {\n System.out.println(\"Connect failed.\");\n }\n return true;\n }", "public static void createAllTables(SQLiteDatabase db, boolean ifNotExists) {\n CriuzesDao.createTable(db, ifNotExists);\n Criuzes_TMPDao.createTable(db, ifNotExists);\n CabinsDao.createTable(db, ifNotExists);\n Cabins_TMPDao.createTable(db, ifNotExists);\n ExcursionsDao.createTable(db, ifNotExists);\n Excursions_TMPDao.createTable(db, ifNotExists);\n GuestsDao.createTable(db, ifNotExists);\n Guests_TMPDao.createTable(db, ifNotExists);\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private void createTable() {\n\t\tfreqTable = new TableView<>();\n\n\t\tTableColumn<WordFrequency, Integer> column1 = new TableColumn<WordFrequency, Integer>(\"No.\");\n\t\tcolumn1.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"serialNumber\"));\n\n\t\tTableColumn<WordFrequency, String> column2 = new TableColumn<WordFrequency, String>(\"Word\");\n\t\tcolumn2.setCellValueFactory(new PropertyValueFactory<WordFrequency, String>(\"word\"));\n\n\t\tTableColumn<WordFrequency, Integer> column3 = new TableColumn<WordFrequency, Integer>(\"Count\");\n\t\tcolumn3.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"count\"));\n\n\t\tList<TableColumn<WordFrequency, ?>> list = new ArrayList<TableColumn<WordFrequency, ?>>();\n\t\tlist.add(column1);\n\t\tlist.add(column2);\n\t\tlist.add(column3);\n\n\t\tfreqTable.getColumns().addAll(list);\n\t}", "private static void lanzaTablero() {\r\n\t\t// for (contadorPelotas = 0; contadorPelotas<numPelotasEnTablero;) { // Cambiado porque ahora el contador va dentro del objeto\r\n\t\twhile (tablero.size()<tablero.tamMaximo()) {\r\n\t\t\t// Crea pelota nueva\r\n\t\t\t// Con constructor por defecto sería:\r\n\t\t\t// Pelota p = new Pelota();\r\n\t\t\t//\tp.x = r.nextInt(5) * ANCHO_CASILLA + (ANCHO_CASILLA/2); // Posición aleatoria de centro en 5 filas\r\n\t\t\t//\tp.y = r.nextInt(5) * ALTO_CASILLA + (ALTO_CASILLA/2); // Posición aleatoria de centro en 5 columnas\r\n\t\t\t//\tp.radio = r.nextInt(21) + 50; // Radio aleatorio entre 50 y 70\r\n\t\t\t//\tp.color = COLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ];\r\n\t\t\t// Con constructor con parámetros:\r\n\t\t\tPelota p = new Pelota(\r\n\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\tCOLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ]\r\n\t\t\t);\r\n\t\t\t// boolean existeYa = yaExistePelota( tablero, p, contadorPelotas ); // Método movido a la clase GrupoPelotas\r\n\t\t\tboolean existeYa = tablero.yaExistePelota( p ); // Observa que el contador deja de ser necesario\r\n\t\t\tif (!existeYa) {\r\n\t\t\t\t// Se dibuja la pelota y se añade al array\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\t// tablero[contadorPelotas] = p; // Sustituido por el objeto:\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t\t// contadorPelotas++; // El contador deja de ser necesario (va incluido en el objeto GrupoPelotas)\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Comprueba que el tablero sea posible (no hay solo N-2 pelotas de un color dado)\r\n\t\tchar tabPosible = ' ';\r\n\t\tdo { // Repite hasta que el tablero sea posible\r\n\t\t\t\r\n\t\t\tif (tabPosible!=' ') {\r\n\t\t\t\tboolean existeYa = true;\r\n\t\t\t\tPelota p = null;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tp = new Pelota(\r\n\t\t\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\t\t\ttabPosible\r\n\t\t\t\t\t);\r\n\t\t\t\t\texisteYa = tablero.yaExistePelota( p );\r\n\t\t\t\t} while (existeYa);\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t}\r\n\t\t\tquitaPelotasSiLineas( false );\r\n\t\t\ttabPosible = tableroPosible();\r\n\t\t} while (tabPosible!=' ');\r\n\t\tv.setMensaje( tablero.size() + \" pelotas creadas.\" );\r\n\t}", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "public void createDepartamentoTable() throws SQLException {\n\t\tString sql = \"create table departamento (piso int, depto varchar(100), expensas double,\ttitular varchar(100))\";\n\t\tConnection c = DBManager.getInstance().connect();\n\t\tStatement s = c.createStatement();\n\t\ts.executeUpdate(sql);\n\t\tc.commit();\n\t\t\t\n\t}", "void initTable();", "protected boolean createTable() {\n\t\t// --- 1. Dichiarazione della variabile per il risultato ---\n\t\tboolean result = false;\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\t// n.d.\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tstmt.execute(getCreate());\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\t// n.d. Qui devo solo dire al chiamante che è andato tutto liscio\n\t\t\tresult = true;\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\t// n.d.\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tstmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().debug(\"failed to create publisher table\",e);\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}", "public void initTable();", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "private void tableAdapt(ArrayList<String[]> lista, boolean isTraslateAvalible) {\n TableLayout table = (TableLayout) findViewById(R.id.table);\n //declaramos el objeto que nos creará la tabla dinámica\n TableModel tbModel = new TableModel(MainActivity.this, table);\n //indicamos los encabezados de la tabla\n if (isTraslateAvalible) {\n tbModel.setHeaders(new String[]{\"N\", \"Object\", \"Traslated\", \"Accuracy\"});\n } else {\n tbModel.setHeaders(new String[]{\"N\", \"Object\", \"Accuracy\"});\n }\n //enviamos los datos del cuerpo de la tabla\n tbModel.setRows(lista);\n //configuramos la tabla, colores del encabezado y el cuerpo\n // tanto del texto como el fondo\n tbModel.setHeaderBackGroundColor(R.color.back_black);\n tbModel.setRowsBackGroundColor(R.color.back_white);\n\n tbModel.setHeadersForeGroundColor(R.color.back_white);\n tbModel.setRowsForeGroundColor(R.color.back_black);\n //Modifica la tabla a partir de los datos enviados y los parámetros enviados\n tbModel.makeTable();\n\n MyLogs.info(\" FIN \");\n }", "public boolean buildTable() {\n int count = table.getChildCount();\n for (int i = 0; i < count; i++) {\n View child = table.getChildAt(i);\n if (child instanceof TableRow) ((ViewGroup) child).removeAllViews();\n }\n\n //Dynamically adds rows based on the size of the destinations array\n for(int i = 0; i < orderedDestinations.size(); i++){\n // Inflates the search_results_table_row_attributes.xml file\n TableRow row = (TableRow) inflater.inflate(R.layout.search_results_table_row_attributes, null);\n\n //Finds oritentation and alters the row width if in landscape\n if(getResources().getConfiguration().orientation == 2) {\n LinearLayout ll = ((LinearLayout)row.findViewById(R.id.layout_contents));\n ll.getLayoutParams().width = 1700;\n ll.requestLayout();\n }\n\n //adds contents of the destination to the row\n ((TextView)row.findViewById(R.id.desti)).setText((i+1) + \") \" + orderedDestinations.get(i).name);\n ((TextView)row.findViewById(R.id.address)).setText(orderedDestinations.get(i).address);\n table.addView(row);\n }\n return true;\n }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "private void makeTable() {\n String [] cols = new String[] {\"Planets\", \"Weights (in lbs)\", \"Weights (in kgs)\"};\n model = new DefaultTableModel(result,cols) {\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n table = new JTable(model);\n JScrollPane scrollPane = new JScrollPane(table);\n scrollPane.setPreferredSize(new Dimension(310,155));\n middlePanel.add(scrollPane);\n revalidate();\n repaint();\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "public abstract void createTables() throws DataServiceException;", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public DetalleTablaComplementario() {\r\n }", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "private boolean crearColumnas(Table t)\n\t{\n\t\ttry {\n\t\t TableColumn tc1 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc2 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc3 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc4 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc5 = new TableColumn(t, SWT.CENTER);\n\t\t tc1.setText(\"Fecha - Hora\");\n\t\t tc2.setText(\"Tipo Doc.\");\n\t\t tc3.setText(\"Serie - nro.\");\n\t\t tc4.setText(\"Remitente\");\n\t\t tc5.setText(\"Ya impreso\");\n\n\t\t tc1.setWidth(100);\n\t\t tc2.setWidth(100);\n\t\t tc3.setWidth(120);\n\t\t tc4.setWidth(200);\n\t\t tc5.setWidth(80);\n\t\t t.setHeaderVisible(true);\n\t \treturn true;\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "TableFull createTableFull();", "public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }", "private void llenarTabla() {\n\t\t// TODO Auto-generated method stub\n\t\tif (gestionando.equals(\"Empleado\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> empleados = administradorDelegado.listarEmpleadosObservables();\n\t\t\t\ttable.setItems(empleados);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if (gestionando.equals(\"Recolector\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> recolectores = administradorDelegado.listarRecolectoresObservables();\n\t\t\t\ttable.setItems(recolectores);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public static void createTable(Database db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"LIVE_KIND_OBJ\\\" (\" + //\n \"\\\"_id\\\" INTEGER PRIMARY KEY AUTOINCREMENT ,\" + // 0: keyL\n \"\\\"COL_NAME\\\" TEXT NOT NULL ,\" + // 1: colName\n \"\\\"COL_ID\\\" TEXT NOT NULL ,\" + // 2: colId\n \"\\\"HAVE_CHILDREN\\\" INTEGER NOT NULL ,\" + // 3: haveChildren\n \"\\\"CHAL_NUM\\\" INTEGER NOT NULL ,\" + // 4: chalNum\n \"\\\"PAGE_NUM\\\" INTEGER NOT NULL ,\" + // 5: pageNum\n \"\\\"C_KNUM\\\" INTEGER NOT NULL ,\" + // 6: cKNum\n \"\\\"P_TYPE\\\" INTEGER NOT NULL );\"); // 7: pType\n // Add Indexes\n db.execSQL(\"CREATE UNIQUE INDEX \" + constraint + \"IDX_LIVE_KIND_OBJ_COL_ID_COL_NAME ON \\\"LIVE_KIND_OBJ\\\"\" +\n \" (\\\"COL_ID\\\" ASC,\\\"COL_NAME\\\" ASC);\");\n }", "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "private void loadTables(String NroGuia){\r\n log_Guide log_guide = new log_Guide();\r\n \r\n if (NroGuia.isEmpty()){\r\n tb_factura.setItems(null);\r\n }else{\r\n log_guide.setTp_factura(Ln.getInstance().find_Archguid(NroGuia, \"\"));\r\n loadTableBill(tb_factura, log_guide.getTp_factura() ); \r\n }\r\n }", "public void novaTabla(int dimX, int dimY, int brMina) {\r\n\t\tthis.tabla = new Tabla(dimX, dimY, brMina);\r\n\t}", "private void IniciarTabla(){\n \n // limpia los datos de los Label y los datos relacionados a la actualizacion de los datos e inhabilita y habilitar botones\nthis.jLabelId.setText(\"Id\");\nthis.jnombre.setText(\"\");\ngrabarCambios.setEnabled(false);\njBotonAgregar.setEnabled(true);\n\n DefaultTableModel dfm = new DefaultTableModel();\n tabla = this.jTabla;\n tabla.setModel(dfm);\n \n // agrega los datos al index de la tabla \n dfm.setColumnIdentifiers(new Object[]{\"id\",\"Comuna\",\"Estado\"});\n Conexion cn = new Conexion();\n rs = cn.SeleccionarTodosComunas();\n try{\n // se recorre rs donde estan los resultados de la busqueda de los datos de la tabla comuna\n while(rs.next()){\n String activo =\"\";\n if (rs.getInt(\"COM_ESTADO\")==1) {\n activo = \"activo\";\n } else {\n activo = \"no activo\";};\n // se agrega la fila con los datos de la columna \n dfm.addRow(new Object[]{rs.getInt(\"COM_ID\"),rs.getString(\"COM_NOMBRE\"),activo});\n }\n \n } catch(Exception e){\n System.out.println(\"Error Revisar funcion TableModel\" + e);\n }\n }", "private TimeTable createTimeTableStary(){\n\n final String dateString = \"03.07.2017\";\n SimpleDateFormat formater = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Date timetableDate = null;\n try {\n timetableDate = formater.parse(dateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Subject> testSubs = new ArrayList<>();\n testSubs.add(new Subject(\"Př\",\"Teoretická informatika\",732,\"UAI\",\"08:00\",\"09:30\", Calendar.MONDAY, \"BB\", \"1\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Př\",\"Bakalářská angličtina NS 3\",230,\"OJZ\",\"10:00\",\"11:30\", Calendar.TUESDAY, \"BB\", \"4\",\"3.10.2016\",\"2.1.2017\",true));\n testSubs.add(new Subject(\"Cv\",\"Teoretická informatika\",732,\"UAI\",\"14:30\",\"16:00\", Calendar.TUESDAY, \"AV\", \"Pč4\",\"3.10.2016\",\"2.1.2017\",true));\n\n\n return new TimeTable (timetableDate, testSubs);\n\n }", "public void createTableComplaintsData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tDatabaseMetaData d=con.getMetaData();\n\t\t\t\tResultSet rs=d.getTables(null,null,\"ComplaintsData\",null);\n\t\t\t\tif(rs.next())\n\t\t\t\t{\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData table exist\");\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tString Create_Table=\"create table ComplaintsData(Customer_Name varchar(100),Address varchar(100),Contact varchar(30),Product varchar(100),Serial_No varchar(50),Module_No varchar(50),Complaint_No varchar(50),Category varchar(30))\";\n\t\t\t\t\tPreparedStatement ps=con.prepareStatement(Create_Table);\n\t\t\t\t\tps.executeUpdate();\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData created successfully!\");\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "Rows createRows();", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "@Override\n\tpublic void willCreateTables(Connection con, DataMap map) throws Exception {\n\t\tDbEntity e = map.getDbEntity(\"PRIMITIVES_TEST\");\n\t\tif (e != null) {\n\t\t\te.getAttribute(\"BOOLEAN_COLUMN\").setMandatory(true);\n\t\t}\n\t\tDbEntity e1 = map.getDbEntity(\"INHERITANCE_SUB_ENTITY3\");\n\t\tif (e1 != null) {\n\t\t\te1.getAttribute(\"SUBENTITY_BOOL_ATTR\").setMandatory(true);\n\t\t}\n\t\tDbEntity e2 = map.getDbEntity(\"MT_TABLE_BOOL\");\n\t\tif (e2 != null) {\n\t\t\te2.getAttribute(\"BOOLEAN_COLUMN\").setMandatory(true);\n\t\t}\n\t\tDbEntity e3 = map.getDbEntity(\"QUALIFIED1\");\n\t\tif (e3 != null) {\n\t\t\te3.getAttribute(\"DELETED\").setMandatory(true);\n\t\t}\n\n\t\tDbEntity e4 = map.getDbEntity(\"QUALIFIED2\");\n\t\tif (e4 != null) {\n\t\t\te4.getAttribute(\"DELETED\").setMandatory(true);\n\t\t}\n\n\t\tDbEntity e5 = map.getDbEntity(\"Painting\");\n\t\tif (e5 != null) {\n\t\t\tif (e5.getAttribute(\"NEWCOL2\") != null) {\n\t\t\t\te5.getAttribute(\"DELETED\").setMandatory(true);\n\t\t\t}\n\t\t}\n\n\t\tDbEntity e6 = map.getDbEntity(\"SOFT_TEST\");\n\t\tif (e6 != null) {\n\t\t\te6.getAttribute(\"DELETED\").setMandatory(true);\n\t\t}\n\n\t}", "public void createTableMain() {\n db.execSQL(\"create table if not exists \" + MAIN_TABLE_NAME + \" (\"\n + KEY_ROWID_MAIN + \" integer primary key autoincrement, \"\n + KEY_TABLE_NAME_MAIN + \" string not null, \"\n + KEY_MAIN_LANGUAGE_1 + \" integer not null, \"\n + KEY_MAIN_LANGUAGE_2 + \" integer not null);\");\n }", "PivotTable createPivotTable();", "DataTable createDataTable();", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }", "public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }" ]
[ "0.74570864", "0.7144324", "0.7058261", "0.7057378", "0.704657", "0.70408195", "0.6999121", "0.6952599", "0.6914007", "0.6744346", "0.6736228", "0.67230225", "0.67155117", "0.6686992", "0.667234", "0.66068304", "0.65318745", "0.6524594", "0.65234005", "0.64946026", "0.64909333", "0.6476652", "0.6460889", "0.6431784", "0.6426931", "0.6419293", "0.64191145", "0.640001", "0.6398493", "0.63693047", "0.6360157", "0.63596845", "0.634185", "0.6338315", "0.6323787", "0.63213307", "0.6314313", "0.63103735", "0.63022065", "0.628841", "0.6287426", "0.62868726", "0.6264934", "0.62624824", "0.6252275", "0.6249768", "0.6247693", "0.6233082", "0.62242025", "0.6220512", "0.62051976", "0.6192299", "0.61855274", "0.6175672", "0.6172317", "0.6171468", "0.616251", "0.61568147", "0.61488813", "0.6141478", "0.6137599", "0.6134075", "0.61232394", "0.6113816", "0.61130124", "0.6110177", "0.61095434", "0.6109381", "0.6106107", "0.6104974", "0.61031395", "0.61025065", "0.609605", "0.609161", "0.60839087", "0.6082715", "0.6079495", "0.607667", "0.607314", "0.60718805", "0.6048433", "0.6045258", "0.60389113", "0.60348296", "0.60332656", "0.60323924", "0.6028256", "0.6025896", "0.6023938", "0.6017485", "0.6004427", "0.5994347", "0.59857833", "0.59835744", "0.5982792", "0.5982399", "0.5981741", "0.5981353", "0.597989", "0.59797716" ]
0.5979931
98
Reinicia las tablas (elimina y crea)
public static Statement reiniciarBD( Connection con ) { try { Statement statement = con.createStatement(); statement.setQueryTimeout(30); // poner timeout 30 msg statement.executeUpdate("drop table if exists items"); log( Level.INFO, "Reiniciada base de datos", null ); return usarCrearTablasBD( con ); } catch (SQLException e) { log( Level.SEVERE, "Error en reinicio de base de datos", e ); lastError = e; e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }", "public void LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }", "public void limpiartabla(JTable listaempleados){\n modelo = (DefaultTableModel) listaempleados.getModel();\n while(modelo.getRowCount()>0)modelo.removeRow(0);\n }", "public void tblLimpiar(JTable tabla, DefaultTableModel modelo1){\n for (int i = 0; i < tabla.getRowCount(); i++) {\n modelo1.removeRow(i);\n i-=1;\n }\n }", "public void limpiarTabla(JTable tbl, DefaultTableModel plantilla) {\n for (int i = 0; i < tbl.getRowCount(); i++) {\n plantilla.removeRow(i);\n i -= 1;\n }\n }", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "public void borrarTablaCompleta() {\r\n\tvista.getBorrarTabla().addActionListener(r->{\r\n\t\tFile bd= new File(\"Database.db\");\r\n\t\tif(bd.exists() && bd.length()>10){\r\n\t\t\tBorrarDatos.borraTablaEntera(con);\r\n\t\t\tvista.getTxtBarraStatus().setText(\"TABLA ELIMINADA\");\r\n\t\t\ttableModelArte=null;\r\n\t\t\tautoRefresh();\r\n\t\t}else{\r\n\t\t\tvista.getTxtBarraStatus().setText(\"NO HAY NINGUNA TABLA QUE ELIMINAR\");\r\n\t\t}\r\n\t});\r\n\t}", "public void excluirDados() {\n\n int linha;\n\n if (verificarAbaAtiva() == 0) {\n linha = HorarioDeTrabalho.getSelectedRow();\n modHT = (DefaultTableModel) HorarioDeTrabalho.getModel();\n tratDados.excluirDadosTabela(modHT, linha);\n txtEntrada_Horario.requestFocus();\n } else {\n linha = MarcacoesFeitas.getSelectedRow();\n modMF = (DefaultTableModel) MarcacoesFeitas.getModel();\n tratDados.excluirDadosTabela(modMF, linha);\n txtEntrada_Marcacoes.requestFocus();\n }\n \n //Limpa as tabelas de Atraso e Extras\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n }", "private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }", "public void deletarTabela(String tabela){\n try{\n db.execSQL(\"DROP TABLE IF EXISTS \" + tabela);\n }catch (Exception e){\n\n }\n }", "public void limpiartabla(JTable pantallaclientes){\n modelo = (DefaultTableModel) pantallaclientes.getModel();\n while(modelo.getRowCount()>0) modelo.removeRow(0);\n }", "public static void vaciartabla(){\n DefaultTableModel modelo=(DefaultTableModel) jtproveedores.getModel(); \n for (int i = 0; i < jtproveedores.getRowCount(); i++) {\n modelo.removeRow(i);\n i-=1;\n } \n }", "public void limpiar(DefaultTableModel tabla) {\n for (int i = 0; i < tabla.getRowCount(); i++) {\n tabla.removeRow(i);\n i -= 1;\n }\n }", "private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }", "public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }", "public VistaBorrar() throws SQLException {\n initComponents();\n Conexion.getInstance();\n \n llenarTabla();\n \n //jTable1.setModel(defaultTableModel);\n //controladorListar = new ControladorListar();\n //ArrayList<Pelicula> listPelicula=controladorListar.getListadoPeliculaEliminar();\n //Object[] fila=new Object[2];\n //for(int x=0; x<listPelicula.size(); x++){\n // fila[0]=listPelicula.get(x).getCodigo();\n // fila[1]=listPelicula.get(x).getNombre();\n // defaultTableModel.addRow(fila);\n \n }", "private static void popuniTabelu() {\r\n\t\tDefaultTableModel dfm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\r\n\t\tdfm.setRowCount(0);\r\n\r\n\t\tfor (int i = 0; i < listaClanova.size(); i++) {\r\n\t\t\tClan c = listaClanova.getClan(i);\r\n\t\t\tdfm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\t}\r\n\t\tcentrirajTabelu();\r\n\t}", "public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "public void ordenarTablero() {\n Pieza.setCantMovimientosSinCambios(0);\n setTurno(1);\n suspenderJuego = false;\n //Limpiar el tablero\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].setPieza(null);\n }\n }\n int color = -1;\n for (int i = 0; i <= 1; i++) {\n tablero[0][i * 7].setPieza(new Torre(color));\n tablero[1][i * 7].setPieza(new Caballo(color));\n tablero[2][i * 7].setPieza(new Alfil(color));\n tablero[3][i * 7].setPieza(new Reina(color));\n Rey rey = new Rey(color);\n setRey(rey, color);\n tablero[4][i * 7].setPieza(rey);\n tablero[5][i * 7].setPieza(new Alfil(color));\n tablero[6][i * 7].setPieza(new Caballo(color));\n tablero[7][i * 7].setPieza(new Torre(color));\n for (int j = 0; j < 8; j++) {\n tablero[j][i == 0 ? 1 : 6].setPieza(new Peon(color));\n }\n color *= -1;\n }\n rePintarTablero();\n if (turnoComputadora == getTurno()) {\n jugarMaquinaSola(getTurno());\n }\n }", "private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }", "private void atualizarTabela() {\n if (cbLista.getSelectedIndex() == -1) {\n btnAddTarefa.setEnabled(false);\n btnAlterarTarefa.setEnabled(false);\n btnExcluirTarefa.setEnabled(false);\n } else {\n btnAddTarefa.setEnabled(true);\n btnAlterarTarefa.setEnabled(true);\n btnExcluirTarefa.setEnabled(true);\n }\n\n TarefaDAO tarefaDAO = new TarefaDAO();\n TarefaTableModel ttm = new TarefaTableModel();\n lista = ((Lista) cbLista.getSelectedItem());\n if (lista != null) {\n ttm.setLista(tarefaDAO.getTarefasByLista(lista));\n } else {\n ttm.setLista(new ArrayList<>());\n }\n tbTarefa.setModel(ttm);\n\n }", "public void borrarTodo()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\tStatement st = conexion.createStatement();\r\n\t\tst.execute(\"DROP TABLE usuarios\");\r\n\t\tst.execute(\"DROP TABLE prestamos\");\r\n\t\tst.execute(\"DROP TABLE libros\");\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "public void esborrarTaula() throws SQLException {\n bd.execSQL(\"DROP TABLE IF EXISTS \" + BD_TAULA);\n }", "private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }", "private void rydStuderendeJTable() {\n tm = (DefaultTableModel)jTable1.getModel();\n\n // vi rydder alle rækker fra JTable's TableModel\n while (tm.getRowCount()>0) {\n tm.removeRow(0);\n }\n }", "Tablero consultarTablero();", "public void atualizarTabela() {\n\t\tJTAlocar.setModel(modelAlocar = new TableModelAlocar(ManipulacaoXml.getInstace().todasAlocacoes()));\n\t}", "public void clearTables() {\r\n // your code here\r\n\t\ttry {\r\n\t\t\tdeleteReservationStatement.executeUpdate();\r\n\t\t\tdeleteBookingStatement.executeUpdate();\r\n\t\t\tdeleteUserStatement.executeUpdate();\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}", "public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "public void hapusSemuaDataMahasiswa(){\n SQLiteDatabase db = this.getWritableDatabase();\n\n db.execSQL(\"DELETE FROM \" + TABLE_NAME);\n }", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "public void reloadTableEmpleado() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (listae.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Empleado object = listae.get(i);\n this.AddtoTableEmpleado(object);\n }\n\n }", "public static void resetTableRam(){\r\n singleton.dtm = new DefaultTableModel();\r\n singleton.dtm.setColumnIdentifiers(ram);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n }", "public void PreencherTabela2() throws SQLException {\n\n String[] colunas = new String[]{\"ID do Pedido\", \"Numero Grafica\", \"Data Emissao\",\"Boleto\"};\n ArrayList dados = new ArrayList();\n Connection connection = ConnectionFactory.getConnection();\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ModeloPedido modeloPedido = new ModeloPedido();\n modeloPedido = pedidoDAO.buscaPorId(idPedidoClasse);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n dados.add(new Object[]{modeloPedido.getId(), modeloPedido.getNumeroGrafica(), format.format(modeloPedido.getDataEmissao()), modeloPedido.isBoleto()});\n\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n\n jTablePedido.setModel(modelo);\n jTablePedido.setRowSorter(new TableRowSorter(modelo));\n jTablePedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTablePedido.getColumnModel().getColumn(0).setResizable(false);\n jTablePedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTablePedido.getColumnModel().getColumn(1).setResizable(false);\n\n jTablePedido.getTableHeader().setReorderingAllowed(false);\n connection.close();\n }", "private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }", "public void limparTabela(String tabela){\n \n if(tabela.equals(\"hora\")){\n modHT.setRowCount(0);\n modMF.setRowCount(0);\n txtEntrada_Horario.requestFocus();\n }else if(tabela.equals(\"marc\")){\n modMF.setRowCount(0);\n txtEntrada_Marcacoes.requestFocus();\n }\n \n //Limpa as tabelas de Atraso e Extras\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n }", "public void dropTable();", "public void LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public void esborrarRegistresTaulaNews() throws SQLException {\n bd.execSQL(\"DELETE FROM \" + BD_TAULA );\n\n }", "public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }", "public static void effaceTable(JTable table, DefaultTableModel mode) {\n while (table.getRowCount() > 0) {\n mode.removeRow(table.getRowCount() - 1);\n }\n }", "public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "private void deleteOldTables(){\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence\");\n jdbcTemplate.execute(\"DROP TABLE OLDrole\");\n jdbcTemplate.execute(\"DROP TABLE OLDperson\");\n jdbcTemplate.execute(\"DROP TABLE OLDavailability\");\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence_profile\");\n }", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "public void eliminar_datos_de_tabla(String tabla_a_eliminar){\n try {\n Class.forName(\"org.postgresql.Driver\");\n Connection conexion = DriverManager.getConnection(cc);\n Statement comando = conexion.createStatement();\n //Verificar dependiendo del tipo de tabla lleva o no comillas\n \n String sql=\"delete from \\\"\"+tabla_a_eliminar+\"\\\"\";\n \n comando.executeUpdate(sql);\n \n comando.close();\n conexion.close();\n } catch(ClassNotFoundException | SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void resetTables(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(User.TABLE_USER_NAME, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }", "public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}", "private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n casillas[i][j] = new Casilla();\n }\n }\n }", "@Override\n\tpublic void organizarTabla() {\n\t\tif (isEditingMode) {\n\t\t\tisEditingMode = false;\n\t\t}\n\t\telse {\n\t\t\tisEditingMode = true;\n\t\t}\n\t\tarrayGaleriaAux = new Vector<WS_ImagenVO>(imagenAdapter.getListAdapter());\n\t\timagenAdapter.setEditar(isEditingMode);\n\t\timagenAdapter.notifyDataSetChanged();\n\t\tacomodarBotones(ButtonStyleShow.ButtonStyleShowSave);\n\t}", "public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public void resetTables() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_LOGIN, null, null);\n db.close();\n }", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}", "public void reset() {\r\n this.setTurnoRojo(true);\r\n for (int i = 0; i < tablero.length - 1; i++) {\r\n for (int j = 0; j < tablero[0].length - 1; j++) {\r\n tablero[i][j] = fichaVacia;\r\n }\r\n }\r\n\r\n for (int i = 0; i < tablero[0].length; i++) {\r\n tablero[0][i] = fichaBorde;\r\n tablero[9][i] = fichaBorde;\r\n }\r\n for (int i = 0; i < tablero.length; i++) {\r\n tablero[i][0] = fichaBorde;\r\n tablero[i][10] = fichaBorde;\r\n }\r\n\r\n for (int i = 1; i < 9; i++) {\r\n tablero[1][i + 1] = new Ficha(\"Azul\", i);\r\n tablero[8][9 - i] = new Ficha(\"Rojo\", i);\r\n\r\n }\r\n }", "public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }", "private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void llenarTabla() {\n\t\t// TODO Auto-generated method stub\n\t\tif (gestionando.equals(\"Empleado\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> empleados = administradorDelegado.listarEmpleadosObservables();\n\t\t\t\ttable.setItems(empleados);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if (gestionando.equals(\"Recolector\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> recolectores = administradorDelegado.listarRecolectoresObservables();\n\t\t\t\ttable.setItems(recolectores);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "void prepareTables();", "public void dropTable() {\n }", "public void imprimirTabuleiro() { \n\t\t\n\t\tfor(int i = 0; i < this.linhas; i++) {\n\t\t\tfor(int j = 0; j < this.colunas; j++) { \t\t\t\t\n\t\t\t\tSystem.out.print(this.tabuleiro[i][j] + \"\\t\"); \n\t\t\t}\n\t\t\tSystem.out.println(); \t\t\t\n\t\t}\n\t}", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "public void supprimerToutesLesLignes() {\n\t\tlisteVente.clear();\r\n\t\tfireTableDataChanged();\r\n\t}", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "public void drop() {\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME1);\n onCreate(db);\n }", "public void llenarTabla() {\n DefaultTableModel modelos = (DefaultTableModel) tableProducto.getModel();\n while (modelos.getRowCount() > 0) {\n modelos.removeRow(0);\n }\n MarcaDAO marcaDao = new MarcaDAO();\n CategoriaProductoDAO catProDao = new CategoriaProductoDAO();\n ProductoDAO proDao = new ProductoDAO();\n Marca marca = new Marca();\n CategoriaProducto catPro = new CategoriaProducto();\n\n for (Producto producto : proDao.findAll()) {\n DefaultTableModel modelo = (DefaultTableModel) tableProducto.getModel();\n modelo.addRow(new Object[10]);\n int nuevaFila = modelo.getRowCount() - 1;\n tableProducto.setValueAt(producto.getIdProducto(), nuevaFila, 0);\n tableProducto.setValueAt(producto.getNombreProducto(), nuevaFila, 1);\n tableProducto.setValueAt(producto.getCantidadProducto(), nuevaFila, 2);\n tableProducto.setValueAt(producto.getPrecioCompra(), nuevaFila, 3);\n tableProducto.setValueAt(producto.getPrecioVenta(), nuevaFila, 4);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 5);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 6);\n tableProducto.setValueAt(producto.getDescripcionProducto(), nuevaFila, 7);\n marca.setIdMarca(producto.getFK_idMarca());\n tableProducto.setValueAt(marcaDao.findBy(marca, \"idMarca\").get(0).getNombreMarca(), nuevaFila, 8);//PARA FK ID MARCA\n catPro.setIdCategoriaProducto(producto.getFK_idCategoriaProducto());\n tableProducto.setValueAt(catProDao.findBy(catPro, \"idCategoriaProducto\").get(0).getNombreCategoriaProducto(), nuevaFila, 9);\n //PARA FK ID CATEGORIA PRODUCTO\n\n }\n }", "public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}", "private void atualizarTabuleiro() throws Exception {\n JogoVelha jogo;\n \n // Recebe dados do jogo\n jogo = remoteApi.getJogo(this.idJogo);\n // Atualizar tabuleiro com o jogo recebido\n jButton11.setText(String.valueOf(jogo.getCelula(1, 1)));\n jButton12.setText(String.valueOf(jogo.getCelula(1, 2)));\n jButton13.setText(String.valueOf(jogo.getCelula(1, 3)));\n jButton21.setText(String.valueOf(jogo.getCelula(2, 1)));\n jButton22.setText(String.valueOf(jogo.getCelula(2, 2)));\n jButton23.setText(String.valueOf(jogo.getCelula(2, 3)));\n jButton31.setText(String.valueOf(jogo.getCelula(3, 1)));\n jButton32.setText(String.valueOf(jogo.getCelula(3, 2)));\n jButton33.setText(String.valueOf(jogo.getCelula(3, 3)));\n }", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}" ]
[ "0.787784", "0.7801997", "0.7363303", "0.72739065", "0.72086614", "0.70893663", "0.70777637", "0.7049081", "0.6929445", "0.6820389", "0.6813339", "0.6782135", "0.67786425", "0.6774805", "0.6735839", "0.6721539", "0.6715351", "0.67145747", "0.66825765", "0.66636866", "0.6660992", "0.66418636", "0.6620486", "0.66082686", "0.6580843", "0.65802836", "0.6577386", "0.6567389", "0.6564104", "0.65623665", "0.65618455", "0.6530779", "0.65192914", "0.6502394", "0.64982563", "0.6496233", "0.64948833", "0.6484267", "0.6469704", "0.64597493", "0.6424126", "0.64124346", "0.64026076", "0.6392724", "0.63924736", "0.63777333", "0.63740164", "0.6350749", "0.6340265", "0.6332131", "0.63317853", "0.63087636", "0.6301585", "0.62878835", "0.62869394", "0.62786543", "0.6276644", "0.62723136", "0.62719345", "0.6263146", "0.6259257", "0.62560165", "0.62524694", "0.6227489", "0.6216615", "0.620724", "0.6196275", "0.61959606", "0.6193223", "0.6172687", "0.6170999", "0.6170726", "0.6169492", "0.6164368", "0.6149083", "0.6142839", "0.6136784", "0.61316156", "0.6130569", "0.6108264", "0.6106859", "0.6090019", "0.60851496", "0.608165", "0.60761565", "0.60739946", "0.6073792", "0.60672677", "0.60658735", "0.60658485", "0.60622656", "0.6045346", "0.60444987", "0.60382015", "0.60312676", "0.6024074", "0.6020287", "0.60162735", "0.6010272", "0.60074824", "0.6004947" ]
0.0
-1
Cierra la bas de datos abierta
public static void cerrarBD( Connection con, Statement st ) { try { if (st!=null) st.close(); if (con!=null) con.close(); log( Level.INFO, "Cierre de base de datos", null ); } catch (SQLException e) { lastError = e; log( Level.SEVERE, "Error en cierre de base de datos", e ); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void limpiarDatos() {\n\t\t\n\t}", "public datosTaller() {\n this.cedulaCliente = new int[100]; //Atributo de la clase\n this.nombreCliente = new String[100]; //Atributo de la clase\n this.compraRealizada = new String[100]; //Atributo de la clase\n this.valorCompra = new float[100]; //Atributo de la clase\n this.posicionActual = 0; //Inicializacion de la posicion en la que se almacenan datos\n }", "public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}", "private void cargarDatosDefault() {\n\t\tPersonasJSON personas = new PersonasJSON();\n\t\tpersonas = personas.leerJSON(\"src/datosJSON/Personas.JSON\");\n\t\t\n\t\tfor(int i=0 ; i<personas.getCantidadPersonas(); i++) {\n\t\t\t\n\t\t\tString nombre = personas.getPersona(i).getNombre();\n\t\t\tint deporte = personas.getPersona(i).getDeporte();\n\t\t\tint musica = personas.getPersona(i).getMusica();\n\t\t\tint espectaculo = personas.getPersona(i).getEspectaculo();\n\t\t\tint ciencia = personas.getPersona(i).getCiencia();\n\t\t\t\n\t\t\tmodel.addRow(new String[]{ nombre, String.valueOf(deporte), String.valueOf(musica),\n\t\t\t\t\tString.valueOf(espectaculo), String.valueOf(ciencia) });\n\t\t}\n\t\t\n\t\tdatos.addAll(personas.getTodasLasPersonas());\n\t\t\n\t}", "public void datosBundle()\n {\n //creamos un Bundle para recibir los datos de MascotasFavoritas al presionar el boton de atras en la ActionBar\n Bundle datosBundleAtras = getActivity().getIntent().getExtras();\n //preguntamos si este objeto viene con datos o esta vacio\n if(datosBundleAtras!=null)\n {//si hay datos estos se los agregamos a un ArrayList de mascotas\n mascotas = (ArrayList<Mascota>) datosBundleAtras.getSerializable(\"listamascotasatras\");\n }else{\n //si el bundle No trae datos entonces se inicializara la lista con datos\n validarBundle=1;\n //return;\n }\n }", "public void inicializarDatos(aplicacion.Usuario u){\n //Pestaña Informacion\n this.usuario=fa.obtenerUsuarioVivo(u.getIdUsuario());\n ModeloTablaBuenasAcciones mba;\n mba = (ModeloTablaBuenasAcciones) tablaBA.getModel();\n mba.setFilas(usuario.getBuenasAcciones());\n ModeloTablaPecados mp;\n mp = (ModeloTablaPecados) tablaPecados.getModel();\n mp.setFilas(usuario.getPecados());\n textoNombre.setText(usuario.getNombre());\n textoUsuario.setText(usuario.getNombreUsuario());\n textoContrasena.setText(usuario.getClave());\n textoLocalidad.setText(usuario.getLocalidad());\n textoFechaNacimiento.setText(String.valueOf(usuario.getFechaNacimiento()));\n //PestañaVenganzas\n ModeloTablaUsuarios mu;\n mu = (ModeloTablaUsuarios) tablaUsuarios.getModel();\n mu.setFilas(fa.consultarUsuariosMenos(usuario.getIdUsuario(), textoNombreBusqueda.getText()));\n ModeloTablaVenganzas mv;\n mv = (ModeloTablaVenganzas) tablaVenganzas.getModel();\n mv.setFilas(fa.listaVenganzas());\n }", "public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }", "BaseDatosMemoria() {\n baseDatos = new HashMap<>();\n secuencias = new HashMap<>();\n }", "private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}", "private void getDatosPartoBB(){\n mDatosPartoBB = estudioAdapter.getListaDatosPartoBBSinEnviar();\n //ca.close();\n }", "public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "private byte[] datosInicio() {\n\tbyte comando = 1;\n\tbyte borna = (byte) sens.getNum_borna();\n\tbyte parametro1 = 0;\n\tbyte parametro2 = 0;\n\tbyte parametro3 = 0;\n\tbyte checksum = (byte) (comando + borna + parametro1 + parametro2 + parametro3);\n\n\t// Duermo para que le de tiempo a generar el puerto\n\ttry {\n\t Thread.sleep(IrrisoftConstantes.DELAY_SENSOR_RUN);\n\t} catch (InterruptedException e1) {\n\t if (logger.isErrorEnabled()) {\n\t\tlogger.error(\"Hilo interrumpido: \" + e1.getMessage());\n\t }\n\t}\n\n\tif (logger.isInfoEnabled()) {\n\t logger.info(\"Churro_Anemometro = \" + comando + \", \" + borna + \", \"\n\t\t + parametro1 + \", \" + parametro2 + \", \" + parametro3 + \", \"\n\t\t + checksum);\n\t}\n\n\tchurro[0] = comando;\n\tchurro[1] = borna;\n\tchurro[2] = parametro1;\n\tchurro[3] = parametro2;\n\tchurro[4] = parametro3;\n\tchurro[5] = checksum;\n\n\tif (!serialcon.serialPort.isOpened()) {\n\t SerialPort serialPort = new SerialPort(\n\t\t serialcon.serialPort.getPortName());\n\t serialcon.setSerialPort(serialPort);\n\t serialcon.conectaserial(sens.getNum_placa());\n\t}\n\n\treturn churro;\n }", "public FaMasterdata() {\n initComponents();\n \n load_buku();\n load_anggota();\n }", "@Override\r\n public void serializar() throws IOException {\n File fich=new File(\"datos.bin\");\r\n FileOutputStream fos = new FileOutputStream(fich);\r\n ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n oos.writeObject(gestor);\r\n oos.close();\r\n }", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "public void cargarDatos() {\n \n if(drogasIncautadoList==null){\n return;\n }\n \n \n \n List<Droga> datos = drogasIncautadoList;\n\n Object[][] matriz = new Object[datos.size()][4];\n \n for (int i = 0; i < datos.size(); i++) {\n \n \n //System.out.println(s[0]);\n \n matriz[i][0] = datos.get(i).getTipoDroga();\n matriz[i][1] = datos.get(i).getKgDroga();\n matriz[i][2] = datos.get(i).getQuetesDroga();\n matriz[i][3] = datos.get(i).getDescripcion();\n \n }\n Object[][] data = matriz;\n String[] cabecera = {\"Tipo Droga\",\"KG\", \"Quetes\", \"Descripción\"};\n dtm = new DefaultTableModel(data, cabecera);\n tableDatos.setModel(dtm);\n }", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "@Override\n public void eventoCargarData() {\n }", "private void cargarRegistro() {\n\t\tif (filaId != null) {\n\t\t\tCursor bar = bdHelper.getBar(filaId);\n // Indicamos que queremos controlar el Cursor\n\t\t\tstartManagingCursor(bar);\n\n\t\t\t// Obtenemos el campo categoria\n\t\t\tString categoria = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_CATEGORIA));\n\t\t\t// Seleccionamos la categoría en el Spinner\n\t\t\tfor (int i=0; i<categoriaSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) categoriaSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(categoria)){\n\t\t\t\t\tcategoriaSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Obtenemos el campo relacion calidad-precio\n\t\t\tString relacion = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_RELACION));\n\t\t\t// Seleccionamos en el Spinner la relacion c-p\n\t\t\tfor (int i=0; i<relacionSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) relacionSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(relacion)){\n\t\t\t\t\trelacionSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Obtenemos el campo del acompañante\n\t\t\tString acompanante = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_ACOMPANANTE));\n\t\t\t// Seleccionamos el formato en el Spinner\n\t\t\tfor (int i=0; i<acompananteSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) acompananteSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(acompanante)){\n\t\t\t\t\tacompananteSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Rellenamos las Vistas\n\t\t\tnombreText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_NOMBRE)));\n\t\t\tdireccionText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_DIRECCION)));\n\t\t\tnotasText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_NOTAS)));\n\t\t\tprecioText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_PRECIO)));\n\t\t\tvaloracionRB.setRating(bar.getFloat(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_VALORACION)));\n\n // Tratamos las fechas del registro\n\t\t\tlong fecha = bar.getLong(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_FEC_ULT_VIS));\n\t\t\tprimeraFecha.setTimeInMillis(fecha);\n\t\t\tfecha = bar.getLong(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_FEC_PRI_VIS));\n\t\t\tif (fecha>0) {\n\t\t\t\tultimaFecha=Calendar.getInstance();\n\t\t\t\tultimaFecha.setTimeInMillis(fecha);\n\t\t\t}\n\t\t\t// Dejamos de controlar el cursor de la BD\n\t\t\tstopManagingCursor(bar);\n\t\t}\n\t}", "public void inicializar() {\n\t\t// TODO Auto-generated method stub\n\t\tIDISFICHA=\"\";\n\t\tNOTAS=\"\";\n\t\tANOTACIONES=\"\";\n\t\tNOTAS_EJERCICIOS=\"\";\n\t}", "private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }", "public Bodega(@JsonProperty(value=\"id\") int id, @JsonProperty(value=\"estado\") char estado, @JsonProperty(value=\"tipo\") char tipo,@JsonProperty(value=\"ancho\") double ancho\r\n\t\t\t,@JsonProperty(value=\"largo\") double largo,@JsonProperty(value=\"plataformaExterna\") boolean plataformaExterna\r\n\t\t\t,@JsonProperty(value=\"tipoDeCarga\")TipoDeCarga tipoDeCarga,@JsonProperty(value=\"separacion\") double separacion\r\n\t\t\t, @JsonProperty(value=\"cuartosFrios\") List<CuartoFrio> cuartosFrios,@JsonProperty(value=\"entradas\") List<Operacion>entradas, @JsonProperty(value=\"salidas\") List<Operacion>salidas)\r\n\t{\r\n\t\tsuper(id,estado,tipo,entradas,salidas);\r\n\t\t\r\n\t\tthis.ancho=ancho;\r\n\t\tthis.largo=largo;\r\n\t\tthis.plataformaExterna=plataformaExterna;\r\n\t\tthis.tipoDeCarga=tipoDeCarga;\r\n\t\tthis.separacion=separacion;\r\n\t\tthis.setCuartosFrios(cuartosFrios);\r\n\t}", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }", "private void inicializarFicha(){\n \tTypeface tfBubleGum = Util.fontBubblegum_Regular(this);\n \tTypeface tfBenton = Util.fontBenton_Boo(this);\n \tTypeface tfBentonBold = Util.fontBenton_Bold(this);\n\t\tthis.txtNombre.setTypeface(tfBubleGum);\n\t\tthis.txtDescripcion.setTypeface(tfBenton);\n\t\tthis.lblTitulo.setTypeface(tfBentonBold);\n \tpanelCargando.setVisibility(View.GONE);\n \t\n \t//cargar los datos de las informaciones\n \tif(DataConection.hayConexion(this)){\n \t\tpanelCargando.setVisibility(View.VISIBLE);\n \t\tInfo.infosInterface = this;\n \t\tInfo.cargarInfo(this.app, this.paramIdItem);\n \t}else{\n \t\tUtil.mostrarMensaje(\n\t\t\t\t\tthis, \n\t\t\t\t\tgetResources().getString(R.string.mod_global__sin_conexion_a_internet), \n\t\t\t\t\tgetResources().getString(R.string.mod_global__no_dispones_de_conexion_a_internet) );\n \t}\n }", "public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\n\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t.setLimit(\"limit 25 offset 0\");\n\n\t\t\tList<Hisc_urgencia_odontologico> lista_datos = getServiceLocator()\n\t\t\t\t\t.getHisc_urgencia_odontologicoService().listar(parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Hisc_urgencia_odontologico hisc_urgencia_odontologico : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\thisc_urgencia_odontologico, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void datos_elegidos(){\n\n\n }", "public void cargarPantalla() throws Exception {\n Long oidCabeceraMF = (Long)conectorParametroSesion(\"oidCabeceraMF\");\n\t\tthis.pagina(\"contenido_matriz_facturacion_consultar\");\n\n DTOOID dto = new DTOOID();\n dto.setOid(oidCabeceraMF);\n dto.setOidPais(UtilidadesSession.getPais(this));\n dto.setOidIdioma(UtilidadesSession.getIdioma(this));\n MareBusinessID id = new MareBusinessID(\"PRECargarPantallaConsultarMF\"); \n Vector parametros = new Vector();\n \t\tparametros.add(dto);\n parametros.add(id);\n \t\tDruidaConector conector = conectar(\"ConectorCargarPantallaConsultarMF\", parametros);\n if (oidCabeceraMF!=null)\n asignarAtributo(\"VAR\",\"varOidCabeceraMF\",\"valor\",oidCabeceraMF.toString());\n\t\t asignar(\"COMBO\", \"cbTiposOferta\", conector, \"dtoSalida.resultado_ROWSET\");\n\t\t///* [1]\n\n\n\n\t\ttraza(\" >>>>cargarEstrategia \");\n\t\t//this.pagina(\"contenido_catalogo_seleccion\"); \n\t\t \n\t\tComposerViewElementList cv = crearParametrosEntrada();\n\t\tConectorComposerView conectorV = new ConectorComposerView(cv, this.getRequest());\n\t\tconectorV.ejecucion();\n\t\ttraza(\" >>>Se ejecuto el conector \");\n\t\tDruidaConector resultados = conectorV.getConector();\n\t\tasignar(\"COMBO\", \"cbEstrategia\", resultados, \"PRECargarEstrategias\");\n\t\ttraza(\" >>>Se asignaron los valores \");\n\t\t// */ [1]\n\t\t\n\n }", "public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }", "private void datosVehiculo(boolean esta_en_revista) {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://datos.labplc.mx/movilidad/vehiculos/\"+placa+\".json\");\n\t\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t\t JSONObject json2 = json.getJSONObject(\"consulta\");\n\t\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t\t JSONObject sys = jsonResponse.getJSONObject(\"tenencias\");\n\t\t\t \n\t\t\t if(sys.getString(\"tieneadeudos\").toString().equals(\"0\")){\n\t\t\t \tautoBean.setDescripcion_tenencia(getResources().getString(R.string.sin_adeudo_tenencia));\n\t\t\t \tautoBean.setImagen_teencia(imagen_verde);\n\t\t\t }else{\n\t\t\t \tautoBean.setDescripcion_tenencia(getResources().getString(R.string.con_adeudo_tenencia));\n\t\t\t \tautoBean.setImagen_teencia(imagen_rojo);\n\t\t\t \tPUNTOS_APP-=PUNTOS_TENENCIA;\n\t\t\t }\n\t\t\t \n\t\t\t JSONArray cast = jsonResponse.getJSONArray(\"infracciones\");\n\t\t\t String situacion;\n\t\t\t boolean hasInfraccion=false;\n\t\t\t for (int i=0; i<cast.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t situacion = (String) oneObject.getString(\"situacion\");\n\t\t\t\t\t\t\t if(!situacion.equals(\"Pagada\")){\n\t\t\t\t\t\t\t\t hasInfraccion=true;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t if(hasInfraccion){\n\t\t\t \t autoBean.setDescripcion_infracciones(getResources().getString(R.string.tiene_infraccion));\n\t\t\t\t \tautoBean.setImagen_infraccones(imagen_rojo);\n\t\t\t\t \tPUNTOS_APP-=PUNTOS_INFRACCIONES;\n\t\t\t }else{\n\t\t\t \t autoBean.setDescripcion_infracciones(getResources().getString(R.string.no_tiene_infraccion));\n\t\t\t\t autoBean.setImagen_infraccones(imagen_verde);\n\t\t\t }\n\t\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"verificaciones\");\n\t\t\t if(cast2.length()==0){\n\t\t\t \t autoBean.setDescripcion_verificacion(getResources().getString(R.string.no_tiene_verificaciones));\n\t\t\t\t\t autoBean.setImagen_verificacion(imagen_rojo);\n\t\t\t\t\t PUNTOS_APP-=PUNTOS_VERIFICACION;\n\t\t\t }\n\t\t\t\t\t Date lm = new Date();\n\t\t\t\t\t String lasmod = new SimpleDateFormat(\"yyyy-MM-dd\").format(lm);\n\t\t\t\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\tBoolean yaValide=true;\n\t\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t\t\tif(!esta_en_revista&&yaValide){\n\t\t\t\t\t\t\t\t\t\t autoBean.setMarca((String) oneObject.getString(\"marca\"));\n\t\t\t\t\t\t\t\t\t\t autoBean.setSubmarca((String) oneObject.getString(\"submarca\"));\n\t\t\t\t\t\t\t\t\t\t autoBean.setAnio((String) oneObject.getString(\"modelo\"));\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_revista(getResources().getString(R.string.sin_revista));\n\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_revista(imagen_rojo);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t Calendar calendar = Calendar.getInstance();\n\t\t\t\t\t\t\t\t\t\t int thisYear = calendar.get(Calendar.YEAR);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t if(thisYear-Integer.parseInt(autoBean.getAnio())<=10){\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_vehiculo(getResources().getString(R.string.carro_nuevo)+\" \"+getResources().getString(R.string.Anio)+\" \"+autoBean.getAnio());\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_vehiculo(imagen_verde);\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_vehiculo(getResources().getString(R.string.carro_viejo)+\" \"+getResources().getString(R.string.Anio)+\" \"+autoBean.getAnio());\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_vehiculo(imagen_rojo);\n\t\t\t\t\t\t\t\t\t\t\t PUNTOS_APP-=PUNTOS_ANIO_VEHICULO;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t yaValide=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t Date date1 = formatter.parse(lasmod);\n\t\t\t\t\t\t\t\t Date date2 = formatter.parse(oneObject.getString(\"vigencia\").toString());\n\t\t\t\t\t\t\t\t int comparison = date2.compareTo(date1);\n\t\t\t\t\t\t\t\t if((comparison==1||comparison==0)&&!oneObject.getString(\"resultado\").toString().equals(\"RECHAZO\")){\n\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_verificacion(getResources().getString(R.string.tiene_verificaciones)+\" \"+oneObject.getString(\"resultado\").toString());\n\t\t\t\t\t\t\t\t\t autoBean.setImagen_verificacion(imagen_verde); \n\t\t\t\t\t\t\t\t\t hasVerificacion=true;\n\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_verificacion(getResources().getString(R.string.no_tiene_verificaciones));\n\t\t\t\t\t\t\t\t\t autoBean.setImagen_verificacion(imagen_rojo);\n\t\t\t\t\t\t\t\t\t hasVerificacion=false;\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\n\t\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t\t } catch (ParseException e) {\n\t\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t if(!hasVerificacion){\n\t\t\t\t \t PUNTOS_APP-=PUNTOS_VERIFICACION;\n\t\t\t\t }\n\t\t\t \n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t\t\n\t}", "public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\n\t\t\t\t\t\"limit 25 offset 0\");\n\n\t\t\tList<Ficha_epidemiologia_n3> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n3.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Ficha_epidemiologia_n3 ficha_epidemiologia_n3 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\tficha_epidemiologia_n3, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void buscaxcodigo() {\r\n try {\r\n modelo.setCodigobarras(vista.jTbcodigobarras.getText());//C.P.M mandamos el codigo de barras ingresado\r\n rs = modelo.Buscarxcodigobarras();//C.P.M mandamos a consultar ese codigo de barras\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M instanciamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"Encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos las columnas de la consulta\r\n\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un vector con el tamano de las columnas de el resultado\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M recorremos el arreglo\r\n fila[i] = rs.getObject(i + 1);//C.P.M y vamos insertando el resultado\r\n }\r\n buscar.addRow(fila);//C.P.M le mandamos el arreglo como renglon nuevo\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar por codigo de barras\");\r\n }\r\n }", "public void PrepararBaseDatos() { \r\n try{ \r\n conexion=DriverManager.getConnection(\"jdbc:ucanaccess://\"+this.NOMBRE_BASE_DE_DATOS,this.USUARIO_BASE_DE_DATOS,this.CLAVE_BASE_DE_DATOS);\r\n \r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al realizar la conexion \"+e);\r\n } \r\n try { \r\n sentencia=conexion.createStatement( \r\n ResultSet.TYPE_SCROLL_INSENSITIVE, \r\n ResultSet.CONCUR_READ_ONLY); \r\n \r\n System.out.println(\"Se ha establecido la conexión correctamente\");\r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al crear el objeto sentencia \"+e);\r\n } \r\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Campo campoDataInizio;\n Campo campoDataFine;\n Campo campoConto;\n Date dataIniziale;\n Date dataFinale;\n int numPersone;\n ContoModulo modConto;\n\n\n String titolo = \"Esecuzione addebiti fissi\";\n AddebitoFissoPannello pannello;\n Date dataInizio;\n Pannello panDate;\n Campo campoStato;\n Filtro filtro;\n int codConto;\n int codCamera;\n\n\n try { // prova ad eseguire il codice\n\n /* recupera dati generali */\n modConto = Albergo.Moduli.Conto();\n codConto = this.getCodConto();\n codCamera = modConto.query().valoreInt(Conto.Cam.camera.get(), codConto);\n numPersone = CameraModulo.getNumLetti(codCamera);\n\n /* crea il pannello servizi e vi registra la camera\n * per avere l'anteprima dei prezzi*/\n pannello = new AddebitoFissoPannello();\n this.setPanServizi(pannello);\n pannello.setNumPersone(numPersone);\n this.setTitolo(titolo);\n\n// /* regola date suggerite */\n// dataFinale = Progetto.getDataCorrente();\n// dataInizio = Lib.Data.add(dataFinale, -1);\n\n /* pannello date */\n campoDataInizio = CampoFactory.data(nomeDataIni);\n campoDataInizio.decora().obbligatorio();\n// campoDataInizio.setValore(dataInizio);\n\n campoDataFine = CampoFactory.data(nomeDataFine);\n campoDataFine.decora().obbligatorio();\n// campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = CampoFactory.comboLinkSel(nomeConto);\n campoConto.setNomeModuloLinkato(Conto.NOME_MODULO);\n campoConto.setLarScheda(180);\n campoConto.decora().obbligatorio();\n campoConto.decora().etichetta(\"conto da addebitare\");\n campoConto.setUsaNuovo(false);\n campoConto.setUsaModifica(false);\n\n /* inizializza e assegna il valore (se non inizializzo\n * il combo mi cambia il campo dati e il valore si perde)*/\n campoConto.inizializza();\n campoConto.setValore(this.getCodConto());\n\n /* filtro per vedere solo i conti aperti dell'azienda corrente */\n campoStato = modConto.getCampo(Conto.Cam.chiuso.get());\n filtro = FiltroFactory.crea(campoStato, false);\n filtro.add(modConto.getFiltroAzienda());\n campoConto.getCampoDB().setFiltroCorrente(filtro);\n\n panDate = PannelloFactory.orizzontale(this.getModulo());\n panDate.creaBordo(\"Periodo da addebitare\");\n panDate.add(campoDataInizio);\n panDate.add(campoDataFine);\n panDate.add(campoConto);\n\n this.addPannello(panDate);\n this.addPannello(this.getPanServizi());\n\n this.regolaCamera();\n\n /* recupera la data iniziale (oggi) */\n dataIniziale = AlbergoLib.getDataProgramma();\n\n /* recupera la data di partenza prevista dal conto */\n modConto = ContoModulo.get();\n dataFinale = modConto.query().valoreData(Conto.Cam.validoAl.get(),\n this.getCodConto());\n\n /* recupera il numero di persone dal conto */\n numPersone = modConto.query().valoreInt(Conto.Cam.numPersone.get(),\n this.getCodConto());\n\n /* regola date suggerite */\n campoDataInizio = this.getCampo(nomeDataIni);\n campoDataInizio.setValore(dataIniziale);\n\n campoDataFine = this.getCampo(nomeDataFine);\n campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = this.getCampo(nomeConto);\n campoConto.setAbilitato(false);\n\n /* regola la data iniziale di riferimento per l'anteprima dei prezzi */\n Date data = (Date)campoDataInizio.getValore();\n this.getPanServizi().setDataPrezzi(data);\n\n /* regola il numero di persone dal conto */\n this.getPanServizi().setNumPersone(numPersone);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "void cargarDatos(Persona beanTabla) {\n this.oPersona = beanTabla;\n oFondoSolidaridad = new FondoSolidaridad();\n\n if (oPersona != null) {\n oBlFondoPrevision = new FondoPrevisionBl();\n listFondos = oBlFondoPrevision.listar(oPersona.getIdpersona());\n oFondoSolidaridad.setPersona(oPersona);\n if (listFondos.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"La persona no tiene fondos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n } else {\n for (FondoSolidaridad obj : listFondos) {\n oModeloFondoPrevision.add(obj);\n }\n\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Verifique sus datos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void inicializar() {\n\t\t// TODO Auto-generated method stub\n\t\tISHORARIO_IDISHORARIO=\"\";\n\t\tISAULA_IDISAULA=\"\";\n\t\tISCURSO_IDISCURSO=\"\";\n\t\t\n\t}", "public ABMServicio(ControladoraVisual unaControladora) {\n initComponents();\n unaControladoraVisual = unaControladora;\n modelo.addColumn(\"ID\");\n modelo.addColumn(\"Nombre\");\n modelo.addColumn(\"Descripcion\");\n modelo.addColumn(\"Precio\");\n cargarTabla();\n }", "private void cargarDatosUsuario() {\n this.textUsuario.setText(this.usuarioCargado.getUsuario());\n this.textContraseña.setText(this.usuarioCargado.getContraseña());\n this.textNombre.setText(this.usuarioCargado.getNombre());\n this.textApellido.setText(this.usuarioCargado.getApellido());\n this.textDocumento.setText(String.valueOf(this.usuarioCargado.getDocumento()));\n this.textTelefono.setText(String.valueOf(this.usuarioCargado.getTelefono()));\n this.textDireccion.setText(this.usuarioCargado.getDireccion());\n this.textoIdUsuairo.setText(String.valueOf(this.usuarioCargado.getId()));\n\n }", "private void inicializarcomponentes() {\n Comunes.cargarJList(jListBecas, becasFacade.getTodasBecasVigentes());\n \n }", "public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}", "public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }", "public void instalarBaseDatos()\r\n\t{\r\n\t\tString nombrebuscado = \"information_schema\";\r\n\t\tArrayList parametrosbd = parametrosConectorBaseDatos();\r\n\t\tif(parametrosbd != null)\r\n\t\t{\r\n\t\t\tif(parametrosbd.size()>0)\r\n\t\t\t{\r\n\t\t\t\tnombrebuscado =(String)parametrosbd.get(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString nombrebd = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector(\"information_schema\");\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tnombrebd = CrearBD.buscarBaseDatos(nombrebuscado, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(nombrebd == null)\r\n\t\t{\r\n\t\t\tint numerotablascreadas = 0;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conectora = new Conector(\"information_schema\");\r\n\t\t\t\tconectora.iniciarConexionBaseDatos();\r\n\t\t\t\tCrearBD.crearBaseDatos(nombrebuscado, conectora);\r\n\t\t\t\tconectora.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 1; i < 20; i++) \r\n\t\t\t\t{\r\n\t\t\t\t\tString nombretabla = i+\".sql\";\r\n\t\t\t\t\tString contenidotabla = ejecutarCodigoSQLtablas(nombretabla);\r\n\t\t\t\t\tif(!contenidotabla.equalsIgnoreCase(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorb = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorb.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(contenidotabla, conectorb);\r\n\t\t\t\t\t\tconectorb.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tnumerotablascreadas++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tConector conectorg = new Conector(nombrebuscado);\r\n\t\t\t\t\t\tconectorg.iniciarConexionBaseDatos();\r\n\t\t\t\t\t\tCrearBD.ejecutarCodigoSQL(\"DROP DATABASE \"+nombrebuscado, conectorg);\r\n\t\t\t\t\t\tconectorg.terminarConexionBaseDatos();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el archivo \"+nombretabla,\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numerotablascreadas == 19)\r\n\t\t\t\t{\r\n\t\t\t\t\tejecutarCodigoSQLdatos(nombrebuscado);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void obtener() {\r\n \t\r\n \tif (raiz!=null)\r\n {\r\n int informacion = raiz.dato;\r\n raiz = raiz.sig;\r\n end = raiz;\r\n System.out.println(\"Obtenemos el dato de la cima: \"+informacion);\r\n }\r\n else\r\n {\r\n System.out.println(\"No hay datos en la pila\");\r\n }\r\n }", "public void limpiarDatos()throws Exception{\n\t\tFormularioUtil.limpiarComponentes(groupboxEditar,idsExcluyentes);\n\t}", "private void remplirUtiliseData() {\n\t}", "public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_atencion_embarazadaService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_atencion_embarazada> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_atencion_embarazadaService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_atencion_embarazada his_atencion_embarazada : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_atencion_embarazada,\r\n\t\t\t\t\t\tthis));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "protected void loadData()\n {\n }", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}", "public void buscarDatos()throws Exception{\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue().toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\t\t\t\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\n\t\t\tList<Ficha_epidemiologia_n13> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n13.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\t\t\t\n\t\t\tfor (Ficha_epidemiologia_n13 ficha_epidemiologia_n13 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(ficha_epidemiologia_n13, this));\n\t\t\t}\n\t\t\t\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\t\t\t\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public Arbre(HashMap<String, String> data) throws ExcepcionArbolIncompleto {\n String[] strings = {\"codi\", \"posicioX_ETRS89\", \"posicioY_ETRS89\", \"latitud_WGS84\", \"longitud_WGS84\", \"tipusElement\", \"espaiVerd\", \"adreca\", \"alcada\", \"catEspecieId\", \"nomCientific\", \"nomEsp\", \"nomCat\", \"categoriaArbrat\", \"ampladaVorera\", \"plantacioDT\", \"tipAigua\", \"tipReg\", \"tipSuperf\", \"tipSuport\", \"cobertaEscocell\", \"midaEscocell\", \"voraEscocell\"};\n List<String> infoArbol = new ArrayList<>(Arrays.asList(strings));\n\n for (String s : infoArbol) {\n if (!data.containsKey(s)) {\n throw new ExcepcionArbolIncompleto();\n }\n }\n\n this.codi = data.get(\"codi\");\n this.posicioX_ETRS89 = data.get(\"posicioX_ETRS89\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"posicioX_ETRS89\"));\n this.posicioY_ETRS89 = data.get(\"posicioY_ETRS89\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"posicioY_ETRS89\"));\n this.latitud_WGS84 = data.get(\"latitud_WGS84\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"latitud_WGS84\"));\n this.longitud_WGS84 = data.get(\"longitud_WGS84\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"longitud_WGS84\"));\n this.tipusElement = data.get(\"tipusElement\");\n this.espaiVerd = data.get(\"espaiVerd\");\n this.adreca = data.get(\"adreca\");\n this.alcada = data.get(\"alcada\");\n this.catEspecieId = data.get(\"catEspecieId\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Integer.parseInt(data.get(\"catEspecieId\"));\n this.nomCientific = data.get(\"nomCientific\");\n this.nomEsp = data.get(\"nomEsp\");\n this.nomCat = data.get(\"nomCat\");\n this.categoriaArbrat = data.get(\"categoriaArbrat\");\n this.ampladaVorera = data.get(\"ampladaVorera\");\n this.plantacioDT = data.get(\"plantacioDT\");\n this.tipAigua = data.get(\"tipAigua\");\n this.tipReg = data.get(\"tipReg\");\n this.tipSuperf = data.get(\"tipSuperf\");\n this.tipSuport = data.get(\"tipSuport\");\n this.cobertaEscocell = data.get(\"cobertaEscocell\");\n this.midaEscocell = data.get(\"midaEscocell\");\n this.voraEscocell = data.get(\"voraEscocell\");\n }", "void loadData() throws SerializerException;", "Serializable retrieveAllData();", "public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parametro = lbxParametros.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tlbTotal_admisiones.setValue(\"\");\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (!value.isEmpty()) {\n\t\t\t\tif (parametro.equals(\"paramTodo\")) {\n\t\t\t\t\tparameters.put(\"paramTodo\", \"paramTodo\");\n\t\t\t\t\tparameters.put(\"value\", value);\n\t\t\t\t} else {\n\t\t\t\t\tparameters.put(parametro, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparameters.put(\"atendida\", chkFiltro_atendidas.isChecked());\n\t\t\tparameters.put(\"estado\", \"1\");// Estado 1 significa que esta activa\n\n\t\t\tif (lbxVias_ingreso.getSelectedItems().size() > 0\n\t\t\t\t\t|| chkFiltro_incluir_hosp.isChecked()\n\t\t\t\t\t|| chkFiltro_incluir_urgencia.isChecked()) {\n\t\t\t\tList<String> listado_vias = new ArrayList<String>();\n\t\t\t\tfor (Listitem listitem : lbxVias_ingreso.getSelectedItems()) {\n\t\t\t\t\tlistado_vias.add((String) listitem.getValue());\n\t\t\t\t}\n\n\t\t\t\t// incluimos las areas\n\t\t\t\tif (chkFiltro_incluir_hosp.isChecked()) {\n\t\t\t\t\tlistado_vias.add(IVias_ingreso.HOSPITALIZACIONES);\n\t\t\t\t}\n\n\t\t\t\tif (chkFiltro_incluir_urgencia.isChecked()) {\n\t\t\t\t\tlistado_vias.add(IVias_ingreso.URGENCIA);\n\t\t\t\t}\n\n\t\t\t\tbtnFiltro_ingreso.setImage(\"/images/filtro1.png\");\n\t\t\t\tparameters.put(\"vias_ingreso\", listado_vias);\n\t\t\t} else {\n\t\t\t\tbtnFiltro_ingreso.setImage(\"/images/filtro.png\");\n\t\t\t\tList<String> vias_ingreso = new ArrayList<String>();\n\t\t\t\tvias_ingreso.add(IVias_ingreso.HOSPITALIZACIONES);\n\t\t\t\tvias_ingreso.add(IVias_ingreso.URGENCIA);\n\t\t\t\tparameters.put(\"vias_ingreso_excluyentes\", vias_ingreso);\n\t\t\t}\n\n\t\t\tif (dtbxFecha_inicial.getValue() != null\n\t\t\t\t\t&& dtbxFecha_final.getValue() != null) {\n\t\t\t\tif (dtbxFecha_inicial.getValue().compareTo(\n\t\t\t\t\t\tdtbxFecha_final.getValue()) > 0) {\n\t\t\t\t\tthrow new ValidacionRunTimeException(\n\t\t\t\t\t\t\t\"La fecha inicial en la busqueda no puede ser mayor a la fecha final\");\n\t\t\t\t}\n\t\t\t\tparameters.put(\"fecha_inicial_p\", new Timestamp(\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\n\t\t\t\tparameters.put(\"fecha_final_p\", new Timestamp(dtbxFecha_final\n\t\t\t\t\t\t.getValue().getTime()));\n\t\t\t} else if (dtbxFecha_inicial.getValue() != null) {\n\t\t\t\tparameters.put(\"fecha_inicial_p\", new Timestamp(\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\n\t\t\t} else if (dtbxFecha_final.getValue() != null) {\n\t\t\t\tparameters.put(\"fecha_final_p\", new Timestamp(dtbxFecha_final\n\t\t\t\t\t\t.getValue().getTime()));\n\t\t\t}\n\n\t\t\tAdministradora administradora = bandboxAseguradora\n\t\t\t\t\t.getRegistroSeleccionado();\n\n\t\t\tif (administradora != null) {\n\t\t\t\tparameters.put(\"codigo_administradora\",\n\t\t\t\t\t\tadministradora.getCodigo());\n\t\t\t\tif (lbxContratos.getSelectedIndex() != 0) {\n\t\t\t\t\tContratos contratos = (Contratos) lbxContratos\n\t\t\t\t\t\t\t.getSelectedItem().getValue();\n\t\t\t\t\tparameters.put(\"id_plan\", contratos.getId_plan());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tList<String> listado_centros = new ArrayList<String>();\n\t\t\tif (!lbxCentros_atencion.getSelectedItems().isEmpty()) {\n\t\t\t\tfor (Listitem listitem : lbxCentros_atencion.getSelectedItems()) {\n\t\t\t\t\tCentro_atencion centro_atencion = (Centro_atencion) listitem\n\t\t\t\t\t\t\t.getValue();\n\t\t\t\t\tlistado_centros.add(centro_atencion.getCodigo_centro());\n\t\t\t\t}\n\t\t\t\tbtnFiltro_centros.setImage(\"/images/filtro1.png\");\n\t\t\t\tparameters.put(\"listado_centros\", listado_centros);\n\t\t\t} else {\n\t\t\t\tbtnFiltro_centros.setImage(\"/images/filtro.png\");\n\t\t\t}\n\t\t\tpopupViasIngreso.close();\n\t\t\tpopupCentros_atencion.close();\n\n\t\t\t// for (String key_map : parameters.keySet()) {\n\t\t\t// log.info(key_map + \" ===> \" + parameters.get(key_map));\n\t\t\t// }\n\n\t\t\tList<Admision> lista_datos = admisionService\n\t\t\t\t\t.listarResultados(parameters);\n\t\t\tlistboxResultado.getItems().clear();\n\n\t\t\tfor (Admision admision : lista_datos) {\n\t\t\t\tlistboxResultado.appendChild(crearFilas(admision, this));\n\t\t\t}\n\n\t\t\tlbTotal_admisiones.setValue(lista_datos.size() + \"\");\n\n\t\t\tlistboxResultado.setVisible(true);\n\t\t\t// listboxResultado.setMold(\"paging\");\n\t\t\t// listboxResultado.setPageSize(20);\n\n\t\t\tlistboxResultado.applyProperties();\n\t\t\tlistboxResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }", "private void agregarDatoATable() {\n\t\tString nombre = textNombre.getText();\n\t\tint deporte = (int)spinnerDeporte.getValue();\n\t\tint musica = (int)spinnerMusica.getValue();\n\t\tint espectaculo = (int)spinnerEspectaculo.getValue();\n\t\tint ciencia = (int)spinnerCiencia.getValue();\n\t\t\n\t\t//Reseteo los inputs para los proximos datos\n\t\ttextNombre.setText(\"\");\n\t\tspinnerDeporte.setValue(1);\n\t\tspinnerMusica.setValue(1);\n\t\tspinnerEspectaculo.setValue(1);\n\t\tspinnerCiencia.setValue(1);\n\t\t\n\t\t//Agrego todos los datos al array\n\t\tdatos.add(new Persona(nombre,deporte,musica,espectaculo,ciencia));\n\t\t\n\t\t//Agrego los datos a la JTable\n\t\tmodel.addRow(new String[]{ nombre, String.valueOf(deporte), String.valueOf(musica),\n\t\t\t\tString.valueOf(espectaculo), String.valueOf(ciencia) });\n\t\ttable.setModel(model);\n\t}", "private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }", "private static void comprobarBBDD() {\n\t\tSQLiteHelper usdbh = new SQLiteHelper(contexto, \"baseDeDatos\", null, 1);\n\n\t\tSQLiteDatabase db = usdbh.getReadableDatabase();\n\t\t\n\t\tlistaTarjetas.clear();\n\n\t\t// Si hemos abierto correctamente la base de datos\n\t\tif (db != null) {\n\t\t\t// Consultamos el valor esLaPrimeraVez\n\t\t\tCursor c = db.rawQuery(\"SELECT * from Tarjetas;\", null);\n\t\t\t// Nos aseguramos de que existe al menos un registro\n\t\t\t// Nos aseguramos de que existe al menos un registro\n\t\t\tif (c.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(c.getString(0), c\n\t\t\t\t\t\t\t.getString(1), c.getString(2), c.getString(3)));\n\t\t\t\t\t// Herramientas.getYo().setId(c.getString(0));\n\t\t\t\t} while (c.moveToNext());\n\t\t\t}\n\t\t\tif (listaTarjetas.size() == 0)\n\t\t\t{\n\t\t\t\tNfcAdapter nfcAdapter = nfcAdapter = NfcAdapter.getDefaultAdapter(contexto);\n\n\t\t\t\tif (nfcAdapter == null) { \n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(\"\", \"\",contexto.getResources().getString(R.string.textoVacio1),\"\"));\n\t\t\t\t}\n\t\t\t\telse if (!nfcAdapter.isEnabled()) {\n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(\"\", \"\",contexto.getResources().getString(R.string.textoVacio1),\"\"));\n\t\t\t\t} else {\n\t\t\t\t\tlistaTarjetas.add(new Tarjetas(\"\", \"\",contexto.getResources().getString(R.string.textoVacio2),\"\"));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tdb.close();\n\t\t}\n\t}", "public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_partoService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_parto> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_partoService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_parto his_parto : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_parto, this));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "void loadData();", "void loadData();", "public void limpiarDatos() {\r\n FormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\r\n tbxNro_identificacion.setValue(\"\");\r\n tbxNro_identificacion.setDisabled(false);\r\n deshabilitarCampos(true);\r\n\r\n }", "public DefaultTableModel cargarDatos () {\r\n DefaultTableModel modelo = new DefaultTableModel(\r\n new String[]{\"ID SALIDA\", \"IDENTIFICACIÓN CAPITÁN\", \"NÚMERO MATRICULA\", \"FECHA\", \"HORA\", \"DESTINO\"}, 0); //Creo un objeto del modelo de la tabla con los titulos cargados\r\n String[] info = new String[6];\r\n String query = \"SELECT * FROM actividad WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n info[0] = rs.getString(\"id_salida\");\r\n info[1] = rs.getString(\"identificacion_navegate\");\r\n info[2] = rs.getString(\"numero_matricula\");\r\n info[3] = rs.getString(\"fecha\");\r\n info[4] = rs.getString(\"hora\");\r\n info[5] = rs.getString(\"destino\");\r\n Object[] fila = new Object[]{info[0], info[1], info[2], info[3], info[4], info[5]};\r\n modelo.addRow(fila);\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return modelo;\r\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic void inicializaBD() {\n\t\t\n\t\t/*Registros de Orden*/\n\t\tint n1=1;\n\t\tString p1=\"Taco Azteca\", p2=\"Sopa\";\n\t\tjava.util.Date utilDate = new java.util.Date();\n\t\tjava.util.Date utilDate1 = new java.util.Date();\n\t\tutilDate.setMonth(1);\n\t\tutilDate.setYear(119);\n\t\tutilDate.setMinutes(1);\n\t\tutilDate1.setMonth(1);\n\t\tutilDate1.setYear(119);\n\t\tutilDate1.setMinutes(59);\n\t\tlong lnMilisegundos = utilDate.getTime();\n\t\tlong lnMilisegundos1 = utilDate1.getTime()+10;\n\t\tTimestamp fecha1= new Timestamp(lnMilisegundos);\n\t\tTimestamp fecha2 = new Timestamp(lnMilisegundos+9999999);\n\t\tTimestamp fecha3= new Timestamp(lnMilisegundos1);\n\t\tTimestamp fecha4 = new Timestamp(lnMilisegundos1+999999);\n\t\tOrden orden1 = new Orden(n1,p1, fecha1, fecha2, 60, 3);\n\t\tOrden orden2 = new Orden(n1,p2, fecha3, fecha4, 30, 3);\n\t\torden1.setEstado(3);\n\t\torden2.setEstado(3);\n\t\tordenRepository.save(orden1);\n\t\tordenRepository.save(orden2);\n\t\t\n\t\t/*Registros de producto*/\n\t\tProducto producto1 = new Producto();\n\t\tproducto1.setFecha(\"2020-05-10\");\n\t\tproducto1.setNombreProducto(\"Chiles Verdes\");\n\t\tproducto1.setDescripcion(\"Bolsas de 1 kg de Chiles\");\n\t\tproducto1.setCantidad(15);\n\t\tproducto1.setMinimo(20);\n\t\tproductoRepository.save(producto1);\n\t\t\n\t\tProducto producto2 = new Producto();\n\t\tproducto2.setFecha(\"2020-10-05\");\n\t\tproducto2.setNombreProducto(\"Papas\");\n\t\tproducto2.setDescripcion(\"Costal de 32 Kg de papas\");\n\t\tproducto2.setCantidad(58);\n\t\tproducto2.setMinimo(10);\n\t\tproductoRepository.save(producto2);\n\t\t\n\t\tProducto producto3 = new Producto();\n\t\tproducto3.setFecha(\"2020-10-20\");\n\t\tproducto3.setNombreProducto(\"Frijoles\");\n\t\tproducto3.setDescripcion(\"Costales de 13 kg de Frijoles\");\n\t\tproducto3.setCantidad(2);\n\t\tproducto3.setMinimo(20);\n\t\tproductoRepository.save(producto3);\n\t\t\n\t\tProducto producto4 = new Producto();\n\t\tproducto4.setFecha(\"2020-08-16\");\n\t\tproducto4.setNombreProducto(\"Sopa de fideo\");\n\t\tproducto4.setDescripcion(\"Bolsas de 500g de sopa de fideo\");\n\t\tproducto4.setCantidad(8);\n\t\tproducto4.setMinimo(10);\n\t\tproductoRepository.save(producto4);\n\t\t\n\t\t//Registro de recordatorio\n\t\tRecordatorio recordatorio = new Recordatorio();\n\t\trecordatorio.setId(1);\n\t\trecordatorio.setInfo(\"1. A partir de mañana se empezará a ofrecer los \\n\"\n\t\t\t\t+ \"beneficios para los clientes preferenciales\\n\"\n\t\t\t\t+ \"2. Los empleados que no se han registrado para \\n\"\n\t\t\t\t+ \"algo algotienen hasta el 25 de Julio para \\n\"\n\t\t\t\t+ \"registrarse.\");\n\t\trecordatorioRepository.save(recordatorio);\n\t\t\n\t\t//Registro empleados\n\t\tEmpleado empleado1 = new Empleado();\n\t\templeado1.setNombre(\"Paola\");\n\t\templeado1.setApellidos(\"Aguillón\");\n\t\templeado1.setEdad(24);\n\t\templeado1.setSueldo(2120.50);\n\t\templeado1.setOcupacion(\"Mesera\");\n\t\templeadoRepository.save(empleado1);\n\t\t\n\t\tEmpleado empleado2 = new Empleado();\n\t\templeado2.setNombre(\"Jorge\");\n\t\templeado2.setApellidos(\"Luna\");\n\t\templeado2.setEdad(20);\n\t\templeado2.setSueldo(2599.50);\n\t\templeado2.setOcupacion(\"Cocinero\");\n\t\templeadoRepository.save(empleado2);\n\t\t\n\t\tEmpleado empleado3 = new Empleado();\n\t\templeado3.setNombre(\"Mariana\");\n\t\templeado3.setApellidos(\"Mendoza\");\n\t\templeado3.setEdad(32);\n\t\templeado3.setSueldo(1810.80);\n\t\templeado3.setOcupacion(\"Ayudante general\");\n\t\templeadoRepository.save(empleado3);\n\t\t\n\t\tEmpleado empleado4 = new Empleado();\n\t\templeado4.setNombre(\"Diego\");\n\t\templeado4.setApellidos(\"Ayala\");\n\t\templeado4.setEdad(28);\n\t\templeado4.setSueldo(3560.60);\n\t\templeado4.setOcupacion(\"Chef\");\n\t\templeadoRepository.save(empleado4);\n\t\t\n\t\tCliente cliente1 = new Cliente();\n\t\tcliente1.setNombre(\"Mario\");\n\t\tcliente1.setCorreo(\"[email protected]\");\n\t\tcliente1.setPromocion(\"Sopa 2x1\");\n\t\tclienteRepository.save(cliente1);\n\n\t\t//Registro Ventas de menú\n\t\tVentasMenu dia1 = new VentasMenu();\n\t\tdia1.setFecha(LocalDate.of(2021,02,01));\n\t\tdia1.setMenu(\"Tacos,Sopa de papa, Agua de limón\");\n\t\tdia1.setVentas(20);\n\t\tventasMenuRepository.save(dia1);\n\t\t\n\t\tVentasMenu dia2 = new VentasMenu();\n\t\tdia2.setFecha(LocalDate.of(2021,02,02));\n\t\tdia2.setMenu(\"Tortas de papa,Sopa de verdura, Agua de piña\");\n\t\tdia2.setVentas(22);\n\t\tventasMenuRepository.save(dia2);\n\t\t\n\t\tVentasMenu dia21 = new VentasMenu();\n\t\tdia21.setFecha(LocalDate.of(2021,02,03));\n\t\tdia21.setMenu(\"Tortas de papa,Sopa de tortilla, Agua de mango\");\n\t\tdia21.setVentas(25);\n\t\tventasMenuRepository.save(dia21);\n\t\t\n\t\tVentasMenu dia211 = new VentasMenu();\n\t\tdia211.setFecha(LocalDate.of(2021,02,04));\n\t\tdia211.setMenu(\"Papas a la francesa,sopa de arroz, Agua de jamaica \");\n\t\tdia211.setVentas(30);\n\t\tventasMenuRepository.save(dia211);\n\t\t\n\t\t\n\t\t\n\t\t//Registro de menú\n\t\tMenu menu = new Menu();\n\t\tmenu.setId(1);\n\t\tmenu.setMen(\"Sopa \\n\"\n\t\t\t\t+ \"Consome\\n\"\n\t\t\t\t+ \"Arroz\\n\"\n\t\t\t\t+ \"Pasta\\n\"\n\t\t\t\t+ \"Chile relleno \\n\"\n\t\t\t\t+ \"Taco Azteca \\n\"\n\t\t\t\t+ \"Filete de Pescado empanizado\"\n\t\t + \"Enchiladas\\n\"\n\t\t + \"Gelatina\\n\"\n\t\t + \"Flan\\n\");\n\t\tmenuRepository.save(menu);\n\t\t\n\t\t//Registro de algunos proveedores\n\t\t\n\t\tProveedor proveedor1 = new Proveedor();\n\t\tproveedor1.setNomProveedor(\"Aaron\");\n\t\tproveedor1.setMarca(\"Alpura\");\n\t\tproveedor1.setTipo(\"Embutidos y lacteos\");\n\t\tproveedor1.setCosto(4600);\n\t\tproveedorRepository.save(proveedor1);\n\t\t\n\t\tProveedor proveedor2 = new Proveedor();\n\t\tproveedor2.setNomProveedor(\"Angelica\");\n\t\tproveedor2.setMarca(\"Coca-Cola\");\n\t\tproveedor2.setTipo(\"Bebidas\");\n\t\tproveedor2.setCosto(1810.11);\n\t\tproveedorRepository.save(proveedor2);\n\t\t\n\t\tProveedor proveedor3 = new Proveedor();\n\t\tproveedor3.setNomProveedor(\"Ernesto\");\n\t\tproveedor3.setMarca(\"Patito\");\n\t\tproveedor3.setTipo(\"Productos de limpieza\");\n\t\tproveedor3.setCosto(2455.80);\n\t\tproveedorRepository.save(proveedor3);\n\t\t\n\t\t// Registro Sugerencias \n\t\t\n\t\t \n\t\tSugerencia sugerencia= new Sugerencia();\n\t\tsugerencia.setIdSugeregncia(1);\n\t\tsugerencia.setNombre(\"Pedro\");\n\t\tsugerencia.setSugerencia(\"Pollo Frito\");\n\t\tsugerenciaRepository.save(sugerencia);\n\t\t\n\t\tSugerencia sugerencia1= new Sugerencia();\n\t\tsugerencia1.setIdSugeregncia(2);\n\t\tsugerencia1.setNombre(\"Miriam\");\n\t\tsugerencia1.setSugerencia(\"Sopes\");\n\t\tsugerenciaRepository.save(sugerencia1);\n\t\t\n\t\tSugerencia sugerencia2= new Sugerencia();\n\t\tsugerencia2.setIdSugeregncia(3);\n\t\tsugerencia2.setNombre(\"Rebeca\");\n\t\tsugerencia2.setSugerencia(\"Tamales Oaxaqueños\");\n\t\tsugerenciaRepository.save(sugerencia2);\n\t\t\n\t}", "private void getEncuestaSatisfaccions(){\n mEncuestaSatisfaccions = estudioAdapter.getEncuestaSatisfaccionSinEnviar();\n //ca.close();\n }", "private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "public void limpiarDatos() throws Exception {\n\t\tFormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\n\t}", "public void limpiarDatos() throws Exception {\n\t\tFormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\n\t}", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "protected void agregarUbicacion(){\n\n\n\n }", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "@Override\n\t@Transactional\n\tpublic List<DetalleCarrito> readAll() throws Exception {\n\t\treturn detalleCarritoRepository.findAll();\n\t}", "public ingresarDatos() {\n initComponents();\n Validacion();\n \n }", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "private DatosDeSesion() throws ExcepcionArchivoDePropiedadesNoEncontrado {\r\n this.poolDeConexiones = new PoolDeConexiones();\r\n }", "UsuarioDetalle cargaDetalle(int id);", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}" ]
[ "0.7139288", "0.654982", "0.65283537", "0.6499147", "0.64509696", "0.6400114", "0.63752687", "0.6353143", "0.6284738", "0.62844336", "0.6283639", "0.62270516", "0.6192039", "0.6178983", "0.61678714", "0.61491424", "0.61483055", "0.61476076", "0.6107674", "0.6103267", "0.60735947", "0.60708034", "0.60633653", "0.60523766", "0.6046471", "0.60408044", "0.60125417", "0.60043204", "0.5999445", "0.5981091", "0.5971069", "0.59708494", "0.5966417", "0.59593195", "0.5955317", "0.5945389", "0.5939954", "0.5935517", "0.59348583", "0.5923649", "0.59233725", "0.59193224", "0.590885", "0.58965844", "0.5891535", "0.5889983", "0.58841455", "0.5883853", "0.5877607", "0.58773285", "0.5872985", "0.5866807", "0.5861535", "0.5855919", "0.585068", "0.58497196", "0.5844652", "0.58420205", "0.58294916", "0.5823287", "0.5815728", "0.5812206", "0.58054155", "0.58009976", "0.57908124", "0.57908124", "0.5790627", "0.5784827", "0.57785565", "0.577694", "0.57710665", "0.57564735", "0.5754892", "0.5754892", "0.57533896", "0.5751416", "0.57488036", "0.57467765", "0.5745806", "0.5745766", "0.5741542", "0.5737175", "0.57234097", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197", "0.572197" ]
0.0
-1
Inserta datos en la BD
public static boolean itemInsert( Statement st, String name, int id, float timeperunit ) { String sentSQL = ""; try { // Secu se utiliza para escapar parametros extraños // Comilla simple para strings sentSQL = "insert into items (id, name, timeperunit) values(" + id + ", " + "'" + secu(name) + "', " + timeperunit + ")"; int val = st.executeUpdate( sentSQL ); log( Level.INFO, "BD añadida " + val + " fila\t" + sentSQL, null ); if (val!=1) { // Se tiene que añadir 1 - error si no log( Level.SEVERE, "Error en insert de BD\t" + sentSQL, null ); return false; } return true; } catch (SQLException e) { log( Level.SEVERE, "Error en BD\t" + sentSQL, e ); lastError = e; e.printStackTrace(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertarDatos(String query) throws SQLException{\n Statement st = conexion.createStatement(); // creamos el mismo objeto statement para realizar la insercion a la base de datos\n st.executeUpdate(query); // se ejecuta la consulta en la base de datos\n }", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void insert() throws SQLException;", "public void insereCliente(Cliente cliente){\n cliente.setClieCadDt(new Date());\r\n \r\n //nova conexão\r\n Connection connection = new ConnectionFactory().getConnection();\r\n \r\n //consulta\r\n String query = \"INSERT INTO cliente\"\r\n + \"(clie_debito,\"\r\n + \"clie_debito_ant,\"\r\n + \"clie_cpf,\"\r\n + \"clie_rg,\"\r\n + \"clie_cnh,\"\r\n + \"clie_nasc_dt,\"\r\n + \"clie_cad_dt,\"\r\n + \"clie_nm,\"\r\n + \"clie_end_ds,\"\r\n + \"clie_cid_ds,\"\r\n + \"clie_uf,\"\r\n + \"clie_telefone_ds,\"\r\n + \"clie_telefone_ddd,\"\r\n + \"clie_telefone_ddi)\"\r\n \r\n + \"VALUES(\"\r\n + \"?,\" //clie_debito\r\n + \"?,\" //clie_debito_ant\r\n + \"?,\" //clie_cpf\r\n + \"?,\" //clie_rg\r\n + \"?,\" //clie_cnh\r\n + \"?,\" //clie_nasc_dt\r\n + \"?,\" //clie_cad_dt\r\n + \"?,\" //clie_nm\r\n + \"?,\" //clie_end_ds\r\n + \"?,\" //clie_cid_ds\r\n + \"?,\" //clie_uf\r\n + \"?,\" //clie_telefone_ds\r\n + \"?,\" //clie_telefone_ddd\r\n + \"?)\";//clie_telefone_ddi\r\n \r\n try{\r\n PreparedStatement stmt = connection.prepareStatement(query);\r\n //débito atual do cliente\r\n stmt.setFloat(1, cliente.getClieDebito());\r\n //débito anterior do cliente\r\n stmt.setFloat(2, cliente.getClieDebitoAnt());\r\n //CPF\r\n stmt.setString(3, cliente.getClieCPF());\r\n //RG\r\n stmt.setString(4, cliente.getClieRG());\r\n //CNH\r\n stmt.setString(5, cliente.getClieCNH());\r\n \r\n //Data de nascimento\r\n stmt.setString(6, this.converteDataSimples(cliente.getClieNascDt()));\r\n //Data de cadastro no sistema\r\n stmt.setString(7, this.converteDataSimples(cliente.getClieCadDt()));\r\n \r\n //Nome do cliente\r\n stmt.setString(8, cliente.getClieNm());\r\n \r\n //Endereço do cliente(logradouro e número)\r\n stmt.setString(9, cliente.getClieEndDs());\r\n //Cidade do cliente\r\n stmt.setString(10, cliente.getClieCidDs());\r\n //UF do cliente\r\n stmt.setString(11, cliente.getClieUf());\r\n //Telefone do cliente\r\n stmt.setString(12, cliente.getClieTelefoneDs());\r\n //DDD do telefone\r\n stmt.setString(13, cliente.getClieTelefoneDDD());\r\n //DDI\r\n stmt.setString(14, cliente.getClieTelefoneDDI());\r\n \r\n stmt.execute(); //executa transação\r\n stmt.close(); //fecha conexção com o banco de dados\r\n \r\n }catch(SQLException u){\r\n throw new RuntimeException(u);\r\n }\r\n }", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "public void AgregarUsuario(Usuario usuario)\n {\n //encerramos todo en un try para manejar los errores\n try{\n //si no hay ninguna conexion entonces generamos una\n if(con == null)\n con = Conexion_Sql.getConexion();\n \n String sql = \"INSERT INTO puntajes(nombre,puntaje) values(?,?)\";\n \n PreparedStatement statement = con.prepareStatement(sql);\n statement.setString(1, usuario.RetornarNombre());\n statement.setInt(2, usuario.RetornarPremio());\n int RowsInserted = statement.executeUpdate();\n \n if(RowsInserted > 0)\n {\n System.out.println(\"La insercion fue exitosa\");\n System.out.println(\"--------------------------------------\");\n }\n else\n {\n System.out.println(\"Hubo un error con la insercion\");\n System.out.println(\"--------------------------------------\");\n }\n }\n catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n }", "public void simpanDataBuku(){\n String sql = (\"INSERT INTO buku (judulBuku, pengarang, penerbit, tahun, stok)\" \n + \"VALUES ('\"+getJudulBuku()+\"', '\"+getPengarang()+\"', '\"+getPenerbit()+\"'\"\n + \", '\"+getTahun()+\"', '\"+getStok()+\"')\");\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }", "private void insertarBd(Chats chat) {\n\t\tString sql = \"INSERT INTO chats (chat,fecha,idUsuario) VALUES(?,?,?)\";\n\n\t\ttry (PreparedStatement ps = con.prepareStatement(sql)) {\n\t\t\tps.setString(1, chat.getTexto());\n\t\t\tps.setDate(2,chat.getFecha() );\n\t\t\tps.setLong(3, chat.getIdUsuario());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tps.executeUpdate();\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "public void insert(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n //Abrindo o mapeamento dos dados para o insert\n ContentValues dados = new ContentValues();\n\n dados.put(\"id_participa_campanha\",doacao.getId_participa_campanha());\n dados.put(\"id_recurso\",doacao.getId_recurso());\n dados.put(\"data\",doacao.getData());\n dados.put(\"quantidade\",doacao.getQuantidade());\n\n\n sqLiteDatabase.insert(\"doacao\",null, dados);\n\n }", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "public void insertData() throws SQLException, URISyntaxException, FileNotFoundException {\n\t \t\t//On vide la base en premier\n\t \t\tdropDB();\n\t \t\t\n\t \t\t//Fichier contenant les jeux de test\n\t \t\tBufferedReader br = new BufferedReader(new FileReader(\"./data.txt\"));\n\t \t \n\t \t PreparedStatement pstmt = null;\n\t \t Connection conn = null;\n\t \t int id;\n\t \t String lastname, firstname, cardNumber, expirationMonth, expirationYear, cvv, query;\n\t \t try {\n\t \t conn = this.connectToBDD();\n\t \t \n\t \t String line = null;\n\t \t \n\t \t //On lit le fichier data.txt pour inserer en base\n\t \t while((line=br.readLine()) != null) {\n\t \t \t String tmp[]=line.split(\",\");\n\t \t \t id=Integer.parseInt(tmp[0]);\n\t\t\t \t lastname=tmp[1];\n\t\t\t \t firstname=tmp[2];\n\t\t\t \t cardNumber=tmp[3];\n\t\t\t \t expirationMonth=tmp[4];\n\t\t\t \t expirationYear=tmp[5];\n\t\t\t \t cvv=tmp[6];\n\t\t\t \t \n\t\t\t \t //Insertion des clients\n\t\t\t \t query = \"INSERT INTO consumer VALUES(\"+ id + \",'\" +firstname+\"','\"+lastname+\"')\";\n\t\t\t \t \n\t\t\t \t pstmt = conn.prepareStatement(query);\n\t\t\t \t pstmt.executeUpdate();\n\t\t\t \t \n\t\t\t \t \n\t\t\t \t //Insertion des comptes\n\t\t\t \t query = \"INSERT INTO account (card_number, expiration_month, expiration_year, cvv, remain_balance, consumer_id) \"\n\t\t \t\t\t\t+ \"VALUES ('\"+cardNumber+\"','\"+expirationMonth+\"','\"+expirationYear+\"','\"+cvv+\"',300,\"+id+\")\";\n\t\t\t \t\n\t\t\t \t pstmt = conn.prepareStatement(query);\n\t\t\t \t pstmt.executeUpdate();\n\t \t }\n\t \t \n\t \t \n\t \t } catch (Exception e) {\n\t \t System.err.println(\"Error: \" + e.getMessage());\n\t \t e.printStackTrace();\n\t \t }\n\t \t }", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "public void createDespesaDetalhe(ArrayList<PagamentoDespesasDetalhe> listaDespesasInseridas, int idDespesa) throws Exception {\n\r\n for(int i=0; i < listaDespesasInseridas.size(); i++){\r\n \r\n open(); //abre conexão com o banco de dados\r\n\r\n //define comando para o banco de dados\r\n stmt = con.prepareStatement(\"INSERT INTO pagamentoDespesasDetalhe(valor, dataPagamento, status, idDespesas, idFormaPagamento) VALUES (?,?,?,?,?)\");\r\n\r\n //atribui os valores das marcações do comando acima \r\n stmt.setFloat(1, listaDespesasInseridas.get(i).getValor());\r\n stmt.setString(2, listaDespesasInseridas.get(i).getDataPagamento());\r\n stmt.setInt(3, listaDespesasInseridas.get(i).getStatus());\r\n stmt.setInt(4, idDespesa);\r\n stmt.setInt(5, listaDespesasInseridas.get(i).getIdFormaPagamento());\r\n\r\n stmt.execute();//executa insert no banco de dados\r\n\r\n close();//fecha conexão com o banco de dados\r\n \r\n } \r\n\r\n }", "public void SaveUsuario(UsuarioDTO u) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n String sql = \"INSERT INTO Usuario(nombre,apellido,usuario,email,password,fecha_nacimiento,fecha_creacion)\"\n + \"VALUES (?,?,?,?,?,?,?)\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, u.getNombre());\n ps.setString(2, u.getApellido());\n ps.setString(3, u.getUsuario());\n ps.setString(4, u.getEmail());\n ps.setString(5, u.getPassword());\n ps.setDate(6, Date.valueOf(u.getFecha_Nacimiento()));\n ps.setDate(7, Date.valueOf(u.getFecha_Creacion()));\n ps.executeUpdate();\n } catch (SQLException ex) {\n System.out.println(\"A \" + ex.getMessage());\n } catch (Exception ex) {\n System.out.println(\"B \" + ex.getMessage());\n } finally {\n try {\n ps.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n }", "private void inserirQuests(){\n try {\n methods.InsereQuestsOnBD();\n //Toast.makeText(this,\"Inseridos dados com sucesso\",Toast.LENGTH_LONG).show();\n\n }\n catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }", "public static void insertActividad(Actividad actividad) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n int diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin;\n int[] fechaInicio = getFechaInt(actividad.getFechaInicio());\n diaInicio = fechaInicio[0];\n mesInicio = fechaInicio[1];\n anoInicio = fechaInicio[2];\n int[] fechaFin = getFechaInt(actividad.getFechaFin());\n diaFin = fechaFin[0];\n mesFin = fechaFin[1];\n anoFin = fechaFin[2];\n String query = \"INSERT INTO Actividades (login, descripcion, rol, duracionEstimada, diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin, duracionReal, estado, idFase) VALUES ('\"\n + actividad.getLogin() + \"','\"\n + actividad.getDescripcion() + \"','\"\n + actividad.getRolNecesario() + \"',\"\n + actividad.getDuracionEstimada() + \",\"\n + diaInicio + \",\"\n + mesInicio + \",\"\n + anoInicio + \",\"\n + diaFin + \",\"\n + mesFin + \",\"\n + anoFin + \",\"\n + actividad.getDuracionReal() + \",'\"\n + actividad.getEstado() + \"',\"\n + actividad.getIdFase() + \")\";\n try {\n ps = connection.prepareStatement(query);\n ps.executeUpdate();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "public boolean insertar(vpoliza dts) {\r\n sSql = \"INSERT INTO poliza\\n\"\r\n + \"(monto_total,fecha_inicio, fecha_venc, cliente_vehiculo_chapaId) \\n\"\r\n + \"VALUES\\n\"\r\n + \"(?,?,?,?);\";\r\n try {\r\n PreparedStatement pst = cn.prepareStatement(sSql);\r\n /*Se crea un objeto pst del tipo PreparedStatement (prepara la consulta sql)\r\n para insertar los datos en la base de datos mediante insert into*/\r\n pst.setInt(1, dts.getMonto_total());\r\n pst.setDate(2, dts.getFecha_inicio());\r\n pst.setDate(3, dts.getFecha_venc());\r\n \r\n pst.setString(4, dts.getCliente_vehiculo_chapaId());\r\n \r\n int n = pst.executeUpdate();\r\n \r\n if (n != 0) {\r\n return true;\r\n }\r\n return false;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n JOptionPane.showMessageDialog(null, \"LO SENTIMOS HA OCURRIDO UN ERROR >> \" + ex + \" <<\");\r\n return false;\r\n }\r\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void saveToDB() throws java.sql.SQLException\n\t{\n\t\tStringBuffer sSQL=null;\n Vector vParams=new Vector();\n\t\t//-- Chequeamos a ver si es un objeto nuevo\n\t\tif(getID_BBDD()==-1) {\n\t\t\tsSQL = new StringBuffer(\"INSERT INTO INF_BBDD \");\n\t\t\tsSQL.append(\"(NOMBRE,DRIVER,URL,USUARIO,CLAVE,JNDI\");\n\t\t\tsSQL.append(\") VALUES (?,?,?,?,?,?)\");\n\n vParams = new Vector();\n vParams.add(getNOMBRE());\n vParams.add(getDRIVER());\n vParams.add(getURL());\n vParams.add(getUSUARIO());\n vParams.add(getCLAVE());\n vParams.add(getJNDI());\n\t\t}\n\t\telse {\n\t\t\tsSQL = new StringBuffer(\"UPDATE INF_BBDD SET \");\n sSQL.append(\" NOMBRE=?\");\n sSQL.append(\", DRIVER=?\");\n sSQL.append(\", URL=?\");\n sSQL.append(\", USUARIO=?\");\n sSQL.append(\", CLAVE=?\");\n\t\t\tsSQL.append(\", JNDI=?\");\n\t\t\tsSQL.append(\" WHERE ID_BBDD=?\");\n\n vParams = new Vector();\n vParams.add(getNOMBRE());\n vParams.add(getDRIVER());\n vParams.add(getURL());\n vParams.add(getUSUARIO());\n vParams.add(getCLAVE());\n vParams.add(getJNDI());\n vParams.add(new Integer(getID_BBDD()));\n\t\t}\n\n\t\tAbstractDBManager dbm = DBManager.getInstance();\n dbm.executeUpdate(sSQL.toString(),vParams);\n\n // Actualizamos la caché\n com.emesa.bbdd.cache.QueryCache.reloadQuery(\"base_datos\");\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\n }\n }", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "private void TambahData(String judul,String penulis,String harga){\n try{ // memanipulasi kesalahan\n String sql = \"INSERT INTO buku VALUES(NULL,'\"+judul+\"','\"+penulis+\"',\"+harga+\")\"; // menambahkan data dengan mengkonekan dari php\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n stt.executeUpdate(sql); \n model.addRow(new Object[]{judul,penulis,harga}); // datanya akan tertambah dibaris baru di tabel model\n \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "public boolean insert(String pTabla, String pDatos) {\n Statement s = null; // se utiliza para inicializar la conexión\n String sentencia = \"\";\n try {\n s = this.conn.createStatement();\n //String campos = \"(cod_articulo, descripcion, precio_sin_impuesto, costo_proveedor, activo, existencia)\";\n sentencia = \"INSERT INTO \" + pTabla /*+ campos */+ \" VALUES (\" + pDatos + \");\"; // se crea el insert\n s.execute(sentencia); //\n return true;\n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n return false;\n }\n }", "void insert(CTipoComprobante record) throws SQLException;", "public void insert(Curso curso) throws SQLException {\n String query = \"\";\n Conexion db = new Conexion();\n\n query = \"INSERT INTO curso VALUES (NULL,?,?,?);\";\n \n PreparedStatement ps = db.conectar().prepareStatement(query);\n //Aquí se asignaran a los interrogantes(?) anteriores el valor oportuno en el orden adecuado\n ps.setString(1, curso.getNombre()); \n ps.setInt(2, curso.getFamilia());\n ps.setString(3, curso.getProfesor());\n \n\n if (ps.executeUpdate() > 0) {\n System.out.println(\"El registro se insertó exitosamente.\");\n } else {\n System.out.println(\"No se pudo insertar el registro.\");\n }\n\n ps.close();\n db.conexion.close();\n }", "public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void insertIntoDado(String query, Double porcentagem, Integer fkHardware, Integer fkComputador) throws IOException {\n erro = false;\n try {\n con.update(query, porcentagem, fkHardware, fkComputador);\n } catch (CannotGetJdbcConnectionException ex) {\n logger.gravarDadosLog(\"ERRO\",\"INSERT\" , \"Não foi possivel inserir dados no banco de dados na Azure\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n \n String hardware = \"\";\n switch (fkHardware) {\n case 1:\n hardware = \"CPU\";\n break;\n case 2:\n hardware = \"RAM\";\n break;\n case 3:\n hardware = \"GPU\";\n break;\n case 4:\n hardware = \"Disco 1\";\n break;\n case 5:\n hardware = \"Disco 2\";\n break;\n case 6:\n hardware = \"Disco 3\";\n break;\n }\n \n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"INSERT\" , \"O dado coletado de \" + hardware + \"(\" + porcentagem + \"%) foi registrado com sucesso.\");\n } \n erro = false;\n }", "public void inserir(Conserto conserto) throws SQLException{\r\n conecta = FabricaConexao.conexaoBanco();\r\n Date dataentradasql = new Date(conserto.getDataEntrada().getTime());\r\n //Date datasaidasql = new Date(conserto.getDataSaida().getTime());\r\n sql = \"insert into conserto (concodigo, condataentrada, condatasaida, concarchassi, conoficodigo) values (?, ?, ?, ?, ?)\";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, conserto.getCodigo());\r\n pstm.setDate(2, (Date) dataentradasql);\r\n pstm.setDate(3, null);\r\n pstm.setString(4, conserto.getCarro().getChassi());\r\n pstm.setInt(5, conserto.getOficina().getCodigo());\r\n pstm.execute();\r\n FabricaConexao.fecharConexao();\r\n \r\n }", "public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }", "public static int save(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into periode(tahun, awal, akhir) values(?,?,?)\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }", "private void inseredados() {\n // Insert Funcionários\n\n FuncionarioDAO daoF = new FuncionarioDAO();\n Funcionario func1 = new Funcionario();\n func1.setCpf(\"08654683970\");\n func1.setDataNasc(new Date(\"27/04/1992\"));\n func1.setEstadoCivil(\"Solteiro\");\n func1.setFuncao(\"Garcom\");\n func1.setNome(\"Eduardo Kempf\");\n func1.setRg(\"10.538.191-3\");\n func1.setSalario(1000);\n daoF.persisteObjeto(func1);\n\n Funcionario func2 = new Funcionario();\n func2.setCpf(\"08731628974\");\n func2.setDataNasc(new Date(\"21/08/1992\"));\n func2.setEstadoCivil(\"Solteira\");\n func2.setFuncao(\"Caixa\");\n func2.setNome(\"Juliana Iora\");\n func2.setRg(\"10.550.749-6\");\n func2.setSalario(1200);\n daoF.persisteObjeto(func2);\n\n Funcionario func3 = new Funcionario();\n func3.setCpf(\"08731628974\");\n func3.setDataNasc(new Date(\"03/05/1989\"));\n func3.setEstadoCivil(\"Solteiro\");\n func3.setFuncao(\"Gerente\");\n func3.setNome(\"joão da Silva\");\n func3.setRg(\"05.480.749-2\");\n func3.setSalario(3000);\n daoF.persisteObjeto(func3);\n\n Funcionario func4 = new Funcionario();\n func4.setCpf(\"01048437990\");\n func4.setDataNasc(new Date(\"13/04/1988\"));\n func4.setEstadoCivil(\"Solteiro\");\n func4.setFuncao(\"Garçon\");\n func4.setNome(\"Luiz Fernandodos Santos\");\n func4.setRg(\"9.777.688-1\");\n func4.setSalario(1000);\n daoF.persisteObjeto(func4);\n\n TransactionManager.beginTransaction();\n Funcionario func5 = new Funcionario();\n func5.setCpf(\"01048437990\");\n func5.setDataNasc(new Date(\"13/04/1978\"));\n func5.setEstadoCivil(\"Casada\");\n func5.setFuncao(\"Cozinheira\");\n func5.setNome(\"Sofia Gomes\");\n func5.setRg(\"3.757.688-8\");\n func5.setSalario(1500);\n daoF.persisteObjeto(func5);\n\n // Insert Bebidas\n BebidaDAO daoB = new BebidaDAO();\n Bebida bebi1 = new Bebida();\n bebi1.setNome(\"Coca Cola\");\n bebi1.setPreco(3.25);\n bebi1.setQtde(1000);\n bebi1.setTipo(\"Refrigerante\");\n bebi1.setDataValidade(new Date(\"27/04/2014\"));\n daoB.persisteObjeto(bebi1);\n\n Bebida bebi2 = new Bebida();\n bebi2.setNome(\"Cerveja\");\n bebi2.setPreco(4.80);\n bebi2.setQtde(1000);\n bebi2.setTipo(\"Alcoolica\");\n bebi2.setDataValidade(new Date(\"27/11/2013\"));\n daoB.persisteObjeto(bebi2);\n\n Bebida bebi3 = new Bebida();\n bebi3.setNome(\"Guaraná Antatica\");\n bebi3.setPreco(3.25);\n bebi3.setQtde(800);\n bebi3.setTipo(\"Refrigerante\");\n bebi3.setDataValidade(new Date(\"27/02/2014\"));\n daoB.persisteObjeto(bebi3);\n\n Bebida bebi4 = new Bebida();\n bebi4.setNome(\"Água com gás\");\n bebi4.setPreco(2.75);\n bebi4.setQtde(500);\n bebi4.setTipo(\"Refrigerante\");\n bebi4.setDataValidade(new Date(\"27/08/2013\"));\n daoB.persisteObjeto(bebi4);\n\n Bebida bebi5 = new Bebida();\n bebi5.setNome(\"Whisky\");\n bebi5.setPreco(3.25);\n bebi5.setQtde(1000);\n bebi5.setTipo(\"Alcoolica\");\n bebi5.setDataValidade(new Date(\"03/05/2016\"));\n daoB.persisteObjeto(bebi5);\n\n // Insert Comidas\n ComidaDAO daoC = new ComidaDAO();\n Comida comi1 = new Comida();\n comi1.setNome(\"Batata\");\n comi1.setQuantidade(30);\n comi1.setTipo(\"Kilograma\");\n comi1.setDataValidade(new Date(\"27/04/2013\"));\n daoC.persisteObjeto(comi1);\n\n Comida comi2 = new Comida();\n comi2.setNome(\"Frango\");\n comi2.setQuantidade(15);\n comi2.setTipo(\"Kilograma\");\n comi2.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi2);\n\n Comida comi3 = new Comida();\n comi3.setNome(\"Mussarela\");\n comi3.setQuantidade(15000);\n comi3.setTipo(\"Grama\");\n comi3.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi3);\n\n Comida comi4 = new Comida();\n comi4.setNome(\"Presunto\");\n comi4.setQuantidade(10000);\n comi4.setTipo(\"Grama\");\n comi4.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi4);\n\n Comida comi5 = new Comida();\n comi5.setNome(\"Bife\");\n comi5.setQuantidade(25);\n comi5.setTipo(\"Kilograma\");\n comi5.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi5);\n\n\n // Insert Mesas\n MesaDAO daoM = new MesaDAO();\n Mesa mes1 = new Mesa();\n mes1.setCapacidade(4);\n mes1.setStatus(true);\n daoM.persisteObjeto(mes1);\n\n Mesa mes2 = new Mesa();\n mes2.setCapacidade(4);\n mes2.setStatus(true);\n daoM.persisteObjeto(mes2);\n\n Mesa mes3 = new Mesa();\n mes3.setCapacidade(6);\n mes3.setStatus(true);\n daoM.persisteObjeto(mes3);\n\n Mesa mes4 = new Mesa();\n mes4.setCapacidade(6);\n mes4.setStatus(true);\n daoM.persisteObjeto(mes4);\n\n Mesa mes5 = new Mesa();\n mes5.setCapacidade(8);\n mes5.setStatus(true);\n daoM.persisteObjeto(mes5);\n\n // Insert Pratos\n PratoDAO daoPr = new PratoDAO();\n Prato prat1 = new Prato();\n List<Comida> comI = new ArrayList<Comida>();\n comI.add(comi1);\n prat1.setNome(\"Porção de Batata\");\n prat1.setIngredientes(comI);\n prat1.setQuantidadePorcoes(3);\n prat1.setPreco(13.00);\n daoPr.persisteObjeto(prat1);\n\n Prato prat2 = new Prato();\n List<Comida> comII = new ArrayList<Comida>();\n comII.add(comi2);\n prat2.setNome(\"Porção de Frango\");\n prat2.setIngredientes(comII);\n prat2.setQuantidadePorcoes(5);\n prat2.setPreco(16.00);\n daoPr.persisteObjeto(prat2);\n\n Prato prat3 = new Prato();\n List<Comida> comIII = new ArrayList<Comida>();\n comIII.add(comi1);\n comIII.add(comi3);\n comIII.add(comi4);\n prat3.setNome(\"Batata Recheada\");\n prat3.setIngredientes(comIII);\n prat3.setQuantidadePorcoes(3);\n prat3.setPreco(13.00);\n daoPr.persisteObjeto(prat3);\n\n Prato prat4 = new Prato();\n List<Comida> comIV = new ArrayList<Comida>();\n comIV.add(comi2);\n comIV.add(comi3);\n comIV.add(comi4);\n prat4.setNome(\"Lanche\");\n prat4.setIngredientes(comIV);\n prat4.setQuantidadePorcoes(3);\n prat4.setPreco(13.00);\n daoPr.persisteObjeto(prat4);\n\n Prato prat5 = new Prato();\n prat5.setNome(\"Porção especial\");\n List<Comida> comV = new ArrayList<Comida>();\n comV.add(comi1);\n comV.add(comi3);\n comV.add(comi4);\n prat5.setIngredientes(comV);\n prat5.setQuantidadePorcoes(3);\n prat5.setPreco(13.00);\n daoPr.persisteObjeto(prat5);\n\n // Insert Pedidos Bebidas\n PedidoBebidaDAO daoPB = new PedidoBebidaDAO();\n PedidoBebida pb1 = new PedidoBebida();\n pb1.setPago(false);\n List<Bebida> bebI = new ArrayList<Bebida>();\n bebI.add(bebi1);\n bebI.add(bebi2);\n pb1.setBebidas(bebI);\n pb1.setIdFuncionario(func5);\n pb1.setIdMesa(mes5);\n daoPB.persisteObjeto(pb1);\n\n PedidoBebida pb2 = new PedidoBebida();\n pb2.setPago(false);\n List<Bebida> bebII = new ArrayList<Bebida>();\n bebII.add(bebi1);\n bebII.add(bebi4);\n pb2.setBebidas(bebII);\n pb2.setIdFuncionario(func4);\n pb2.setIdMesa(mes4);\n daoPB.persisteObjeto(pb2);\n\n TransactionManager.beginTransaction();\n PedidoBebida pb3 = new PedidoBebida();\n pb3.setPago(false);\n List<Bebida> bebIII = new ArrayList<Bebida>();\n bebIII.add(bebi2);\n bebIII.add(bebi3);\n pb3.setBebidas(bebIII);\n pb3.setIdFuncionario(func2);\n pb3.setIdMesa(mes2);\n daoPB.persisteObjeto(pb3);\n\n PedidoBebida pb4 = new PedidoBebida();\n pb4.setPago(false);\n List<Bebida> bebIV = new ArrayList<Bebida>();\n bebIV.add(bebi2);\n bebIV.add(bebi5);\n pb4.setBebidas(bebIV);\n pb4.setIdFuncionario(func3);\n pb4.setIdMesa(mes3);\n daoPB.persisteObjeto(pb4);\n\n PedidoBebida pb5 = new PedidoBebida();\n pb5.setPago(false);\n List<Bebida> bebV = new ArrayList<Bebida>();\n bebV.add(bebi1);\n bebV.add(bebi2);\n bebV.add(bebi3);\n pb5.setBebidas(bebV);\n pb5.setIdFuncionario(func1);\n pb5.setIdMesa(mes5);\n daoPB.persisteObjeto(pb5);\n\n // Insert Pedidos Pratos\n PedidoPratoDAO daoPP = new PedidoPratoDAO();\n PedidoPrato pp1 = new PedidoPrato();\n pp1.setPago(false);\n List<Prato> praI = new ArrayList<Prato>();\n praI.add(prat1);\n praI.add(prat2);\n praI.add(prat3);\n pp1.setPratos(praI);\n pp1.setIdFuncionario(func5);\n pp1.setIdMesa(mes5);\n daoPP.persisteObjeto(pp1);\n\n PedidoPrato pp2 = new PedidoPrato();\n pp2.setPago(false);\n List<Prato> praII = new ArrayList<Prato>();\n praII.add(prat1);\n praII.add(prat3);\n pp2.setPratos(praII);\n pp2.setIdFuncionario(func4);\n pp2.setIdMesa(mes4);\n daoPP.persisteObjeto(pp2);\n\n PedidoPrato pp3 = new PedidoPrato();\n pp3.setPago(false);\n List<Prato> praIII = new ArrayList<Prato>();\n praIII.add(prat1);\n praIII.add(prat2);\n pp3.setPratos(praIII);\n pp3.setIdFuncionario(func2);\n pp3.setIdMesa(mes2);\n daoPP.persisteObjeto(pp3);\n\n PedidoPrato pp4 = new PedidoPrato();\n pp4.setPago(false);\n List<Prato> praIV = new ArrayList<Prato>();\n praIV.add(prat1);\n praIV.add(prat3);\n pp4.setPratos(praIV);\n pp4.setIdFuncionario(func3);\n pp4.setIdMesa(mes3);\n daoPP.persisteObjeto(pp4);\n\n PedidoPrato pp5 = new PedidoPrato();\n pp5.setPago(false);\n List<Prato> praV = new ArrayList<Prato>();\n praV.add(prat1);\n praV.add(prat2);\n praV.add(prat3);\n praV.add(prat4);\n pp5.setPratos(praV);\n pp5.setIdFuncionario(func1);\n pp5.setIdMesa(mes5);\n daoPP.persisteObjeto(pp5);\n\n }", "public void insereDadosMySQL(String tabela, String colunas, boolean matricula, boolean data, boolean brasao2) throws IOException {\n status = true;\n ByteArrayOutputStream bytesImg = new ByteArrayOutputStream();\n ImageIO.write((BufferedImage) imagemRedimensionada, extensao, bytesImg);\n bytesImg.flush();\n byte[] logo = bytesImg.toByteArray();\n bytesImg.close();\n /**\n * Transforma a imagem do logotipo e brasao em um array de bytes para enviar ao banco de dados\n */\n byte[] brasao = null;\n if (brasao2) {\n ByteArrayOutputStream bytesImg2 = new ByteArrayOutputStream();\n ImageIO.write((BufferedImage) imagemRedimensionada2, extensao2, bytesImg2);\n bytesImg2.flush();\n brasao = bytesImg2.toByteArray();\n bytesImg2.close();\n }\n\n String[] aux = colunas.split(\",\");\n String values = \"?\";\n for (int i = 0; i < aux.length - 1; i++) {\n values += \",?\";\n }\n try {\n PreparedStatement p = conexao.prepareStatement(\"INSERT INTO \" + tabela + \"(\" + colunas + \") VALUES (\" + values + \")\");\n // System.out.println(\"INSERT INTO \" + tabela + \"(\" + colunas + \") VALUES (\" + values + \")\");\n p.setString(1, dadosTitulo);\n p.setString(2, dados);\n p.setString(3, dados2);\n p.setString(4, dados3);\n if (matricula) {\n p.setString(5, this.matricula.getText());\n if (data) {\n p.setDate(6, new java.sql.Date(dataProva.getDate().getTime()));\n p.setString(7, arquivo.getName());\n p.setBytes(8, logo);\n if (brasao2) {\n p.setString(9, arquivo2.getName());\n p.setBytes(10, brasao);\n }\n } else {\n p.setDate(6, new java.sql.Date(dataRecebimento.getDate().getTime()));\n p.setDate(7, new java.sql.Date(dataEntrega.getDate().getTime()));\n p.setString(8, arquivo.getName());\n p.setBytes(9, logo);\n if (brasao2) {\n p.setString(10, arquivo2.getName());\n p.setBytes(11, brasao);\n }\n }\n } else {\n if (data) {\n p.setDate(5, new java.sql.Date(dataProva.getDate().getTime()));\n p.setString(6, arquivo.getName());\n p.setBytes(7, logo);\n if (brasao2) {\n p.setString(8, arquivo2.getName());\n p.setBytes(9, brasao);\n }\n } else {\n p.setDate(5, new java.sql.Date(dataRecebimento.getDate().getTime()));\n p.setDate(6, new java.sql.Date(dataEntrega.getDate().getTime()));\n p.setString(7, arquivo.getName());\n p.setBytes(8, logo);\n if (brasao != null) {\n p.setString(9, arquivo2.getName());\n p.setBytes(10, brasao);\n }\n }\n }\n p.executeUpdate();\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n // System.out.println(\"catch 2\");\n }\n }", "public void processInsertar() {\n }", "public void insertEstudio(){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n //Metodo apra almacenar fecha en SQLite\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = sdf.format(new Date());\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"fecha\", date); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n registro.put(\"co_actividad\", \"1\"); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estudios\", null, registro);\n BasesDeDatos.close();\n\n }", "public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }", "public void inserir(Comentario c);", "public boolean insertarNuevoClienteCA(Cliente cliente, List<Cuenta> listaCuentas) {\n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n int codigoCliente = cliente.getCodigo();\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n //Considerando que el cliente puede tener mas de una cuenta\n for (Cuenta cuenta : listaCuentas) {\n \n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, codigoCliente);\n enviarDividido3.executeUpdate();\n }\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "public boolean inserisciDatiGiudice(Giudice giudice) {\n\t\tString query = \"INSERT INTO giudice(username,password,nome,cognome,codicefiscale,recapitotelefonico,numcivico,cap,via) \"\r\n\t\t\t\t+ \"VALUES(?,?,?,?,?,?,?,?,?)\"; \t\t\r\n\t\tPreparedStatement ps;\r\n\t\tconn=DBManager.startConnection();\r\n\t\ttry {\r\n\t\t\tps = conn.prepareStatement(query);\r\n\t\t\tps.setString(1, giudice.getUsername());\r\n\t\t\tps.setString(2, giudice.getPassword());\r\n\t\t\tps.setString(3, giudice.getNome());\r\n\t\t\tps.setString(4, giudice.getCognome());\r\n\t\t\tps.setString(5, giudice.getCodicefiscale());\r\n\t\t\tps.setString(6, giudice.getRecapitotelefonico());\r\n\t\t\tps.setString(7, giudice.getNumcivico());\r\n\t\t\tps.setString(8, giudice.getCap());\r\n\t\t\tps.setString(9, giudice.getVia());\r\n\t\t\tps.executeUpdate();\r\n\t\t\t//if(rs.next()) {\r\n\t\t\t//res.setUsername(rs.getString(\"username\") );\r\n\t\t\t//res.setId(rs.getString(\"id\"));\r\n\t\t\t//res.setCap(rs.getString(\"cap\"));\r\n\t\t\t//res.setVia(rs.getString(\"via\")); \r\n\t\t\t//res.setNome(rs.getString(\"nome\"));\r\n\t\t\t//res.setCognome(rs.getString(\"cognome\"));\r\n\t\t\t//res.setCodicefiscale(rs.getString(\"codicefiscale\"));\r\n\t\t\t//res.setNumcivico(rs.getString(\"numcivico\"));} \r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tDBManager.closeConnection();\r\n\t\treturn true;\r\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public boolean insertarNuevoClienteVista(Cliente cliente, Cuenta cuenta) {\n \n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n \n \n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, cliente.getCodigo());\n enviarDividido3.executeUpdate();\n \n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }", "public void insert(String champs,String valeur) throws SQLException {\n\t\t///Cette partie pour créer un string = \"?, ?; ?...\"\n\t\t///tel que le nombre des points d'interrogation égale au nombre des champs.\n\t\t///Pour l'utiliser dans la syntaxe \"INSERT\" du SQL. \n\t\t//Tableau de champs et valeur .\n String[] champsTab = champs.split(\", \");\n String[] valeurTab = valeur.split(\", \");\n\t\tArrayList<String> valueQST = new ArrayList<String>();\n\t\tfor(int i=0; i<(champs.split(\", \")).length; i++) {\n\t\t\tvalueQST.add(\"?\");\n\t\t}\n\t\t//valueQSTStr = \"?, ?, ?...\"\n\t\tString valueQSTStr = valueQST.toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t/////////////////////////////////////////////////////////////////////\n String sql = \"INSERT INTO personnel(\"+champs+\") VALUES(\"+valueQSTStr+\")\"; \n Connection conn = connecter(); \n PreparedStatement pstmt = conn.prepareStatement(sql);\n int j=0;\n for(int i=0 ; i<champsTab.length;i++) {\n \tj=i+1;\n \tif(!champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv|salaire\")) {\n \tif(champsTab.length>valeurTab.length) {\n \t\tif(champsTab[i].matches(\"Date_Fin_Contract\")){\n \t\tpstmt.setString(j,\"\");\t\n \t\t}else pstmt.setString(j,valeurTab[i]);\n \t}else pstmt.setString(j,valeurTab[i]);\n \t}\n \tif(champsTab[i].matches(\"salaire\")) {\n \t\tpstmt.setFloat(j,Float.parseFloat(valeurTab[i]));\n \t}\n \tif(champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv\")) {\n \t\tpstmt.setInt(j,Integer.parseInt(valeurTab[i]));\n \t}\n }\n pstmt.executeUpdate();\n\t\tconn.close();\n }", "public boolean insert(Vacante vacante) {\n try {\n //Variable que lleva la sentencia SQL\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n String sql = \"INSERT INTO vacante VALUES(?,?,?,?,?)\";\n //Permite ejecutar una sentencia SQL\n PreparedStatement ps = conn.getConnection().prepareStatement(sql);\n ps.setInt(1, vacante.getId());\n ps.setString(2, format.format(vacante.getFechaPublicacion()));\n ps.setString(3, vacante.getNombre());\n ps.setString(5, vacante.getDetalle());\n ps.setString(4, vacante.getDescripcion());\n ps.executeUpdate();\n return true;\n\n } catch (Exception e) {\n System.out.println(\"Error VacanteDao.insert\" + e.getMessage());\n return false;\n }\n\n }", "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "public static void insert(int codigo, String descripcion, double precioCompra, double precioVenta, int stock) {\n String sql = \"INSERT INTO articulo(Codigo, Nombre, PrecioC, PrecioV, Stock) \"\n + \"VALUES(\"\n +codigo\n +\",'\"+descripcion+\n \"',\"+precioCompra+\n \",\"+precioVenta+\n \",\"+stock+\")\";\n try(Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.executeUpdate();\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se ha podido insertar el articulo \"+codigo + \" en la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n }", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "public void insertData() throws SQLException {\n pst=con.prepareStatement(\"insert into employee values(?,?,?)\");\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(1,id);\n System.out.println(\"Enter Name: \");\n String name=sc.next();\n pst.setString(2,name);\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(3,city);\n pst.execute();\n System.out.println(\"Data inserted successfully\");\n }", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "public void insert(Connection db) throws SQLException {\n this.insert(db, this.questionId);\n }", "private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }", "public static void insertData(UserDetail detail, Connection con) {\n\tString city=\"\";\n\tString[] cities=detail.getCities();\n\tif(cities!=null) {\n\tfor(int i=0;i<cities.length;i++) {\n\t\tcity=city+\",\"+cities[i];\n\t\n\t}\n}\n\t\n\tString sql= \"inser into db26.UserDetail values(?,?,?)\";\n\t\n\ttry {\n\t\tPreparedStatement p= con.prepareStatement(sql);\n\t\tp.setString(1, detail.getName());\n\t\tp.setString(2, detail.getGender());\n\t\tp.setString(3, city);\n\t\tp.executeUpdate();\n\t\tp.close();\n\t}catch(SQLException e) {\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t\t\n\t}", "public void daoInsertar(Miembro m) throws SQLException {\r\n\t\t\r\n\t\tPreparedStatement ps= con.prepareCall(\"INSERT INTO miembros (nombre, apellido1, apellido2, edad, cargo)VALUES(?,?,?,?,?)\");\r\n\t\tps.setString(1,m.getNombre());\r\n\t\tps.setString(2,m.getApellido1());\r\n\t\tps.setString(3,m.getApellido2());\r\n\t\tps.setInt(4,m.getEdad());\r\n\t\tps.setInt(5,m.getCargo());\r\n\t\tps.executeUpdate();\r\n\t\tps.close();\r\n\t}", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }", "public void guardarDietaComida(DietaComida dietaComida){\r\n try {\r\n \r\n String sql = \"INSERT INTO dietacomida (idDieta,idComida) VALUES ( ? , ? );\";\r\n \r\n PreparedStatement ps = con.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\r\n ps.setInt(1, dietaComida.getIdDieta());\r\n ps.setInt(2, dietaComida.getIdComida());\r\n \r\n ps.executeQuery();\r\n \r\n ResultSet rs = ps.getGeneratedKeys();\r\n\r\n /* if (rs.next()) {\r\n dietaComida.setId(rs.getInt(1));\r\n } else {\r\n System.out.println(\"No se pudo obtener el id luego de insertar una DietaComida\");\r\n }*/\r\n ps.close();\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"Error al insertar una DietaComida \" + ex.getMessage());\r\n }\r\n }", "public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }", "private boolean insert()throws Exception{\n String query = \"INSERT INTO \" + tableName + \" VALUES(?, ?, ?)\";\n PreparedStatement pstm = this.con.prepareStatement(query);\n\n pstm.setObject(1, Name.getText().trim());\n pstm.setObject(2, City.getText().trim());\n pstm.setObject(3, Phone.getText().trim());\n\n int result = pstm.executeUpdate();\n\n return (result > 0);\n }", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "public void insertEstadisticas(String IdPregunta, Integer validacicion, String co_nivel, String co_categoria){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"co_estudios\", consultarEstudioUltimaId() );\n registro.put(\"co_pregunta\", IdPregunta);\n registro.put(\"co_nivel\", co_nivel);\n registro.put(\"co_categoria\", co_categoria);\n registro.put(\"validacion\", validacicion);\n\n System.out.println( \" ------------- Insert RESPUESTA ------------------\");\n System.out.println( \" IdEstudio \" + validacicion );\n\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estadisticas\", null, registro);\n BasesDeDatos.close();\n\n }", "@Test\n\tpublic void test() {\n\t\tmyPDO pdo = myPDO.getInstance();\n\t\tString sql = \"INSERT INTO `RESTAURANT` (`NUMRESTO`,`MARGE`,`NBSALLES`,`NBEMPLOYEE`,`ADRESSE`,`PAYS`,`NUMTEL`,`VILLE`,`CP`) VALUES (?,?,?,?,?,?,?,?,?)\";\n\t\tpdo.prepare(sql);\n\t\tObject[] data = new Object[9];\n\t\tdata[0] = null;\n\t\tdata[1] = 10;\n\t\tdata[2] = 2;\n\t\tdata[3] = 2;\n\t\tdata[4] = \"test\";\n\t\tdata[5] = \"France\";\n\t\tdata[6] = \"0656056560\";\n\t\tdata[7] = \"reims\";\n\t\tdata[8] = \"51100\";\n\t\tpdo.execute(data,true);\n\t}", "public boolean InsertarInformacionInmueble(String id,String direccion,String lugarReferencia,String tamano, String estrato,String tipo,String habitaciones,String usuario,String precio){\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"insert into inmuebles (direccion,lugarReferencia,tamano,estrato,tipo,habitaciones,idUsuario,precio) values(?,?,?,?,?,?,?,?)\");\n\t\t\tstatement.setString(1, direccion);\n\t\t\tstatement.setString(2, lugarReferencia);\n\t\t\tstatement.setInt(3, Integer.parseInt(tamano));\n\t\t\tstatement.setInt(4, Integer.parseInt(estrato));\n\t\t\tstatement.setString(5, tipo);\n\t\t\tstatement.setInt(6, Integer.parseInt(habitaciones));\n\t\t\tstatement.setString(7, usuario);\n\t\t\tstatement.setInt(8, Integer.parseInt(precio));\n\t\t\tstatement.execute();\n\t\t\tstatement.close();\n\t\t\treturn true;\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception);\n\t\t\treturn false;\n\t\t}\n\t}", "public void insertaMensaje(InfoMensaje m) throws Exception;", "public void insert(taxi ta)throws ClassNotFoundException,SQLException\r\n {\n String taxino=ta.getTaxino();\r\n String drivername=ta.getDrivername();\r\n String driverno=ta.getDriverno();\r\n String taxitype=ta.getTaxitype();\r\n String state=ta.getState();\r\n String priority=ta.getPriority();\r\n connection= dbconnection.createConnection();\r\nString sqlString=\"INSERT INTO taxi (taxino,drivername,driverno,taxitype,state,priority) VALUES ('\"+taxino+\"','\"+drivername+\"','\"+driverno+\"','\"+taxitype+\"','\"+state+\"','\"+priority+\"')\";\r\n PreparedStatement preparedStmt = connection.prepareStatement(sqlString); \r\n preparedStmt.execute(); \r\n connection.close();\r\n \r\n }", "public String InsertarAnuncioGeneral(AnuncioGeneralDTO anuncio){\n int status=0;\n String message=\"Funciona bien\";\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioGeneral\"));\n \n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2,anuncio.getTitulo());\n ps.setString(3,anuncio.getCuerpo());\n \n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n // DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss dd/MM/yyyy\");\n // String fecha = dateFormat.format(anuncio.getFechaPublicacion());\n // java.sql.Date fechaPublicacion=new java.sql.Date(dateFormat.parse(fecha).getTime());\n ps.setDate(4, fechaPublicacion);\n message=\"Cargo bien la fecha\";\n ps.setString(5,anuncio.getPropietario().getEmail());\n ps.setString(6,anuncio.getEstadoAnuncio().toString());\n status=ps.executeUpdate();\n\n \n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n message=\"funciona bien\";\n }catch(Exception e){\n e.toString();\n }\n\n return message;\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "@Override\n\tpublic void insertTask(DetailedTask dt) throws SQLException, ClassNotFoundException\n\t{\n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t\t Statement stmt = null;\n\t\t \n\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t\t c.setAutoCommit(false);\n\t\t \n\t\t logger.info(\"Opened database successfully (insertTask)\");\n\n\t\t stmt = c.createStatement();\n\t\t String sql = \"INSERT INTO task (status, id, description, strasse, plz, ort, latitude, longitude,\"\n\t\t + \" typ, information, auftragsfrist, eingangsdatum, items, hilfsmittel, images) \"\n\t\t + \"VALUES ('\"+dt.getStatus()+\"', \"+dt.getId()+\", '\"+dt.getDescription()+\"', '\"\n\t\t +dt.getStrasse()+\"', \"+dt.getPlz()+\", '\"+dt.getOrt()+\"', \"+dt.getLatitude()+\", \"\n\t\t +dt.getLongitude()+\", '\"+dt.getType()+\"', '\"+dt.getInformation()+\"', \"+dt.getAuftragsfrist()\n\t\t +\", \"+dt.getEingangsdatum()+\", '\"+gson.toJson(dt.getItems())+\"', '\"\n\t\t +gson.toJson(dt.getHilfsmittel())+\"', '\"+dt.getImages()+\"' );\";\n\n\t\t stmt.executeUpdate(sql);\n\n\t\t stmt.close();\n\t\t c.commit();\n\t\t c.close();\n\t\t \n\t\t logger.info(\"Task inserted successfully\");\n\t }", "public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }", "public void agregaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \"INSERT INTO antnopato\\n \"+\n \"(`id_antNP`,\\n\" +\n \"`religion_antNP`,\\n\" +\n \"`lugarNaci_antNP`,\\n\" +\n \"`estaCivil_antNP`,\\n\" +\n \"`escolaridad_antNP`,\\n\" +\n \"`higiene_antNP`,\\n\" +\n \"`actividadFisica_antNP`,\\n\" +\n \"`frecuencia_antNP`,\\n\" +\n \"`sexualidad_antNP`,\\n\" +\n \"`numParejas_antNP`,\\n\" +\n \"`sangre_antNP`,\\n\" +\n \"`alimentacion_antNP`,\\n\" +\n \"`id_paciente`,\\n\"+\n \"`escoCompInco_antNP`,\\n\"+\n \"`frecVeces_antNP`)\\n\"+\n \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos han sido guardados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void insertDB() {\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to insert values of a User object into the database\n String query = \"INSERT INTO User VALUES ('\" + userID + \"','\" + password + \"','\" + firstName + \"','\" +\n lastName + \"');\";\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n //shows a message that a new user has been added successfully\n System.out.println(\"new user has been added into the data base successfully\");\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n Message errorMessage = new Message(\"Error\", \"Something wrong happened, when there was a attempt to add user into the database. Try again later.\");\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n }", "private void insertar(String nombre, String edad) {\n\n BDAdapter db = new BDAdapter(this);\n db.abrirBD();\n\n boolean guardado = db.insertarContacto(nombre, edad);\n\n //Si se ha guardado bien reseteamos los eddittext, sino mostramos un error\n if (guardado) {\n\n edtNombre.setText(\"\");\n edtEdad.setText(\"\");\n\n Toast.makeText(this, \"Guardado con éxito\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n Toast.makeText(this, \"No se puede guardar\", Toast.LENGTH_SHORT).show();\n\n }\n\n db.cerrarBD();\n\n }", "public static int insertarUsuario(String nombre,String email){\n String sql = \"insert into usuarios(nombre, email) values ('\"+nombre+\"','\"+email+\"')\";\n Conexion conexion = new Conexion();\n \n PreparedStatement prest;\n\n try { \n // Preparamos la inserción de datos mediante un PreparedStatement\n prest = conexion.getConexion().prepareStatement(sql);\n\n // Procedemos a indicar los valores que queremos insertar\n // Usamos los métodos setXXX(indice, valor)\n // indice indica la posicion del argumento ?, empieza en 1\n // valor es el dato que queremos insertar\n //prest.setString(1, nombre);\n //prest.setString(2, email);\n\n // Ejecutamos la sentencia de inserción preparada anteriormente\n int nfilas = prest.executeUpdate();\n \n // Cerramos el recurso PreparedStatement \n prest.close();\n \n // Cerramos la conexión \n conexion.cerrarConexion();\n // La inserción se realizó con éxito, devolvemos filas afectadas\n return nfilas;\n } catch (SQLException e) {\n System.out.println(\"Problemas durante la inserción de datos en la tabla Jugadores\");\n System.out.println(e);\n return -1;\n }\n }", "public void cadastrar(Usuario usuario) {\n\t\tString sql = \"insert into usuario(nome, login,senha)values(?,?,?)\";\n\t\ttry(PreparedStatement preparestatement = con.prepareStatement(sql)) {\n\t\t\t\n\t\t\tpreparestatement.setString(1, usuario.getNome()); //substitui o ? pelo dado do usuario\n\t\t\tpreparestatement.setString(2, usuario.getLogin());\n\t\t\tpreparestatement.setString(3, usuario.getSenha());\n\t\t\t\n\t\t\t//executando comando sql\n\t\t\t\n\t\t\tpreparestatement.execute();\n\t\t\tpreparestatement.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void insertUser(String firstname, String lastname, String email) {\n/* 53 */ Connection conn = null;\n/* 54 */ PreparedStatement pstmt = null;\n/* 55 */ String sql = null;\n/* */ \n/* */ try {\n/* 58 */ conn = getConn();\n/* 59 */ System.out.println(\"db접속 성공\");\n/* 60 */ sql = \"insert into members(firstname,lastname,email) values(?,?,?)\";\n/* 61 */ pstmt = conn.prepareStatement(sql);\n/* 62 */ pstmt.setString(1, firstname);\n/* 63 */ pstmt.setString(2, lastname);\n/* 64 */ pstmt.setString(3, email);\n/* 65 */ int i = pstmt.executeUpdate();\n/* */ }\n/* 67 */ catch (Exception e) {\n/* 68 */ e.printStackTrace();\n/* */ } finally {\n/* 70 */ closeDB();\n/* */ } \n/* */ }", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void simpanDataProduk(){\n loadDataProduk();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"INSERT INTO barang(kode_barang, nama_barang, merk_barang, jumlah_stok, harga)\"\n + \"VALUES('\"+ kode_barang +\"','\"+ nama_barang +\"','\"+ merk_barang +\"','\"+ jumlah_stok +\"','\"+ harga +\"')\";\n PreparedStatement p = (PreparedStatement) koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataProduk();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "public void insertIntoDadoAws(String query, Double porcentagem, Integer fkHardware, Integer fkComputador) throws IOException {\n erro = false;\n try{\n conAws.update(query, porcentagem, fkHardware, fkComputador);\n } catch (CannotGetJdbcConnectionException ex) {\n //Logger.getLogger(ControllerDashboard.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Nao foi encontrado um banco de dados local.\");\n logger.gravarDadosLog(\"ERRO\",\"INSERT\" , \"Não foi possivel inserir dados no banco de dados local.\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n String hardware = \"\";\n switch (fkHardware) {\n case 1:\n hardware = \"CPU\";\n break;\n case 2:\n hardware = \"RAM\";\n break;\n case 3:\n hardware = \"GPU\";\n break;\n case 4:\n hardware = \"Disco 1\";\n break;\n case 5:\n hardware = \"Disco 2\";\n break;\n case 6:\n hardware = \"Disco 3\";\n break;\n }\n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"INSERT\" , \"O dado coletado de \" + hardware + \"(\" + porcentagem + \"%) foi registrado com sucesso no banco de dados local.\");\n }\n erro = false;\n }", "public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "public static void main(String[] args) {\n Connection connection = null;\r\n\r\n try{\r\n // establezco la connecion con la base de datos jdbc en el puerto 3306 con usuario y contrasenia root\r\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/jdbc\",\"root\",\"root\");\r\n // pongo auto commit en false esto hace que no se comite cada cueri y que se cada vez que lance\r\n // el comando commit se ejecuta el bloque query\r\n connection.setAutoCommit(false);\r\n\r\n // hago la sentencia preparada\r\n PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO estudiante (dni, nombre, apellido) VALUES (?, ?, ?);\");\r\n // modifico los \"?\" de la sentencia preparada con mis datos\r\n preparedStatement.setInt(1,40640217);\r\n preparedStatement.setString(2,\"Santiago\");\r\n preparedStatement.setString(3,\"Lampropulos\");\r\n\r\n // ejecuto la consulta preparada\r\n preparedStatement.executeUpdate();\r\n\r\n //traigo los datos de la tabla estudiante\r\n ResultSet resultSet = preparedStatement.executeQuery(\"SELECT * FROM estudiante\");\r\n\r\n // realizo el commit para que se guarden los cambios\r\n connection.commit();\r\n\r\n //muestro toda la tabla\r\n while(resultSet.next()){\r\n System.out.println(resultSet.getString(2)+\"\\t\"+resultSet.getString(\"nombre\")+\"\\t\"+resultSet.getString(\"apellido\"));\r\n }\r\n\r\n }catch (SQLException exceptionConnection){\r\n System.out.println(exceptionConnection);\r\n try{\r\n // si se creo la base de datos revierte el commit que se hizo\r\n if(connection!=null){\r\n connection.rollback();\r\n }\r\n }catch (SQLException exceptionCarth){\r\n //atrapo excepciones\r\n System.out.println(exceptionCarth);\r\n }\r\n\r\n\r\n }finally {\r\n // el bloque finally se ejecute sin inportar si viene de un catch o del try\r\n try{\r\n //si se crea una coneccion con base de datos la cierro\r\n if(connection!= null){\r\n connection.close();\r\n }\r\n }catch (SQLException eFinally){\r\n //atrapo excepciones\r\n System.out.println(eFinally);\r\n }\r\n }\r\n\r\n }", "public void dyinsert(DYBoardDTO dto) {\n\t\t\n\t\tDBConn dbconn= DBConn.getDB();\n\t\tConnection conn= null;\n\t\ttry {\n\t\t\tconn=dbconn.getConn();\n\t\t\tconn.setAutoCommit(false);\n\t\t\t\n\t\t\tDYBoardDAO dao = DYBoardDAO.getdao();\n\t\t\tdao.dyinsert(conn,dto);\n\t\t\t\n\t\t\tconn.commit();\n\t\t}catch(NamingException | SQLException e) {\n\t\t\tSystem.out.println(e);\n\t\t\ttry {conn.rollback();}catch(SQLException e2) {}\n\t\t}finally {\n\t\t\tif(conn!=null)try {conn.close();}catch(SQLException e) {}\n\t\t}\n\t\t\n\t}", "private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }", "@Override\r\n public void inserirConcursando(Concursando concursando) throws Exception {\n rnConcursando.inserir(concursando);\r\n }", "public void insertDB() {\n sql = \"Insert into Order (OrderID, CustomerID, Status) VALUES ('\"+getCustomerID()+\"','\"+getCustomerID()+\"', '\"+getStatus()+\"')\";\n db.insertDB(sql);\n \n }", "@Override\n\tpublic void inserir(CLIENTE cliente) {\n\t\t\n\t\tString sql = \"INSERT INTO CLIENTE (NOME_CLIENTE) VALUES (?)\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, cliente.getNomeCliente());\n\t\t\t\n\t\t\tps.execute();\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void CrearBDatos(Connection conn, String sNombreBDatos) {\r\n\t\tString \tsqlDB=consultas.CrearBDatos(sNombreBDatos),\r\n\t\t\t\tsqlUsarDB=consultas.UsarBDatos(sNombreBDatos),\r\n\t\t\t\tsqlTablaCliente=consultas.CrearTablaCliente(),\r\n\t\t\t\tsqlTablaDepartamento=consultas.CrearTablaDepartamentos(),\r\n\t\t\t\tsqlTablaFuncionarios=consultas.CrearTablaFuncionarios(),\r\n\t\t\t\tsqlTablaHorasFun=consultas.CrearTablaHorasFunc(),\r\n\t\t\t\tsqltablaServicios=consultas.CrearTablaServicios();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tStatement stmt=conn.createStatement();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tstmt.executeUpdate(sqlDB);\r\n\t\t\t\tstmt.executeUpdate(sqlUsarDB);\r\n\t\t\t\tstmt.executeUpdate(sqlTablaCliente);\r\n\t\t\t\tstmt.executeUpdate(sqlTablaDepartamento);\t\t\t\t\r\n\t\t\t\tstmt.executeUpdate(sqlTablaFuncionarios);\r\n\t\t\t\tstmt.executeUpdate(sqltablaServicios);\r\n\t\t\t\tstmt.executeUpdate(sqlTablaHorasFun);\r\n\t\t\t\tstmt.close();\r\n\t\t\t\r\n\t\t\t}catch (SQLException e){stmt.close(); e.getStackTrace();}\r\n\t\t}catch (SQLException e){\te.getStackTrace();}\r\n\t\tAgregarDepartamentos(conn);\r\n\r\n\t}", "@Transactional\r\n\r\n\t@Override\r\n\tpublic void insertar(Distrito distrito) {\n\t\tem.persist(distrito);\t\r\n\t}" ]
[ "0.75188", "0.7418744", "0.7062719", "0.7003312", "0.69794834", "0.6908579", "0.6904742", "0.6903021", "0.6896655", "0.68092954", "0.67884314", "0.6763867", "0.67546904", "0.67509425", "0.67336196", "0.66965", "0.66958964", "0.6684094", "0.6676867", "0.6668375", "0.6668006", "0.66552025", "0.663002", "0.6597331", "0.65914756", "0.65902627", "0.65889555", "0.6586308", "0.65849733", "0.65671355", "0.65578306", "0.65511405", "0.6539343", "0.6535867", "0.65180296", "0.65094507", "0.6500505", "0.64977294", "0.64808214", "0.64787835", "0.64710164", "0.6468748", "0.6463939", "0.64516884", "0.64510167", "0.64341706", "0.6423444", "0.64121896", "0.6404338", "0.6403354", "0.6394615", "0.63830733", "0.6380034", "0.6379954", "0.637688", "0.63674974", "0.63617057", "0.6360727", "0.6357322", "0.6351795", "0.63476425", "0.634648", "0.63456434", "0.63384765", "0.6338283", "0.6329615", "0.6328526", "0.63268447", "0.6313391", "0.63025194", "0.62935495", "0.6281312", "0.6280698", "0.62595296", "0.62552613", "0.62547815", "0.6251659", "0.6250672", "0.6249674", "0.6249278", "0.624812", "0.6246961", "0.6244379", "0.62408227", "0.6234724", "0.6222421", "0.62128085", "0.62089413", "0.62041074", "0.62039375", "0.6199896", "0.6199888", "0.61952734", "0.6195211", "0.6186786", "0.61796725", "0.617629", "0.6171978", "0.6170946", "0.61693114", "0.6165438" ]
0.0
-1
Carga los items que hay en la tabla
public static List<Item> loadItems(Statement st) { List<Item> items = new ArrayList<>(); String sentSQL = ""; try { sentSQL = "select * from items"; ResultSet rs = st.executeQuery(sentSQL); // Iteramos sobre la tabla result set // El metodo next() pasa a la siguiente fila, y devuelve true si hay más filas while (rs.next()) { int id = rs.getInt("id"); String name = rs.getString("name"); float timePerUnit = rs.getFloat("timeperunit"); Item item = new Item(id, name, timePerUnit); items.add(item); log(Level.INFO,"Fila leida: " + item, null); } log(Level.INFO, "BD consultada: " + sentSQL, null); } catch (SQLException e) { log(Level.SEVERE, "Error en BD\t" + sentSQL, e); lastError = e; e.printStackTrace(); } return items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n \n Object[] rowdata={\n item.getiId(),\n item.getDescription(),\n item.getQtyOnHand(),\n item.getUnitPrice()\n \n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "private void cargarTablaConPaquetes() {\n tcId.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"codigo\"));\n tcdescripcion.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"descripcion\"));\n tcDestino.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"destino\"));\n tcEntregado.setCellValueFactory(\n new PropertyValueFactory<Paquete, Boolean>(\"entregado\"));\n\n tbPaqueteria.setItems(data);\n tbPaqueteria.getSelectionModel().selectFirst();\n\n //TODO futura implementacion\n //setDobleClickFila();\n }", "public void cargarDatos() {\n \n if(drogasIncautadoList==null){\n return;\n }\n \n \n \n List<Droga> datos = drogasIncautadoList;\n\n Object[][] matriz = new Object[datos.size()][4];\n \n for (int i = 0; i < datos.size(); i++) {\n \n \n //System.out.println(s[0]);\n \n matriz[i][0] = datos.get(i).getTipoDroga();\n matriz[i][1] = datos.get(i).getKgDroga();\n matriz[i][2] = datos.get(i).getQuetesDroga();\n matriz[i][3] = datos.get(i).getDescripcion();\n \n }\n Object[][] data = matriz;\n String[] cabecera = {\"Tipo Droga\",\"KG\", \"Quetes\", \"Descripción\"};\n dtm = new DefaultTableModel(data, cabecera);\n tableDatos.setModel(dtm);\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "public void loadItemsTable(String reqId) {\n dao.setup();\n ObservableList<RequisitionItemEntity> items = FXCollections.observableArrayList(dao.read(RequisitionItemEntity.class));\n dao.exit();\n\n TableColumn<RequisitionItemEntity, String> poIdCol = new TableColumn<>(\"Purchase ID\");\n poIdCol.setCellValueFactory(new PropertyValueFactory<RequisitionItemEntity, String>(\"poid\"));\n\n TableColumn<RequisitionItemEntity, String> reqIdCol = new TableColumn<>(\"Requisiton ID\");\n reqIdCol.setCellValueFactory(new PropertyValueFactory<>(\"reqid\"));\n\n TableColumn<RequisitionItemEntity, Number> supidCol = new TableColumn<>(\"Supplier ID\");\n supidCol.setCellValueFactory(new PropertyValueFactory<>(\"supplier_id\"));\n\n TableColumn<RequisitionItemEntity, Double> tamontCol = new TableColumn<>(\"Total Amount\");\n tamontCol.setCellValueFactory(new PropertyValueFactory<>(\"total_amount\"));\n\n for (RequisitionItemEntity item : items){\n if(reqId == item.getReqId())\n tableItems.getItems().add(item);\n }\n\n tableItems.getColumns().addAll(poIdCol,reqIdCol,supidCol,tamontCol);\n\n\n }", "private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }", "public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }", "public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }", "private void getTravelItems() {\n String[] columns = Columns.getTravelColumnNames();\n Cursor travelCursor = database.query(TABLE_NAME, columns, null, null, null, null, Columns.KEY_TRAVEL_ID.getColumnName());\n travelCursor.moveToFirst();\n while (!travelCursor.isAfterLast()) {\n cursorToTravel(travelCursor);\n travelCursor.moveToNext();\n }\n travelCursor.close();\n }", "public void getAllItem (ArrayList<itemTodo> list){\n Cursor cursor = this.getReadableDatabase().rawQuery(\"select judul, deskripsi, priority from \"+nama_table,null);\n while (cursor.moveToNext()){\n list.add(new itemTodo(cursor.getString(0), cursor.getString(1), cursor.getString(2)));\n }\n }", "private JTable itensNaoRecebidos() {\n\t\tinitConexao();\t\t\n try {\t \n\t String select = \"SELECT cod_item_r, nome_item_r, valor_item_r FROM Item_receita WHERE recebimento_item_r = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de receita\", \"Valor total\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_r\"),rs.getString(\"valor_item_r\"),\"Receber\", rs.getString(\"cod_item_r\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 2, \"itemNaoRecebido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "Tablero consultarTablero();", "private void cargar(List<Personas> listaP) {\n int total= listaP.size();\n Object [][] tab = new Object [total][10];\n int i=0;\n Iterator iter = listaP.iterator();\n while (iter.hasNext()){\n Object objeto = iter.next();\n Personas pro = (Personas) objeto;\n\n tab[i][0]=pro.getLocalidadesid().getProvinciasId();\n tab[i][1]=pro.getLocalidadesid();\n tab[i][2]=pro.getCuilcuit();\n tab[i][3]=pro.getApellido();\n tab[i][4]=pro.getNombres();\n tab[i][5]=pro.getCalle();\n tab[i][6]=pro.getAltura();\n tab[i][7]=pro.getPiso();\n tab[i][8]=pro.getEmail();\n// if(pro.getEmpleados().equals(\"\")){\n tab[i][9]=\"Cliente\";\n // }else{\n // tab[i][7]=\"Empleado\";\n // }\n i++;\n }\njTable1 = new javax.swing.JTable();\n\njTable1.setModel(new javax.swing.table.DefaultTableModel(\ntab,\nnew String [] {\n \"Provincia\", \"Localidad\", \"DNI/Cuit\", \"Apellido\", \"Nombres\", \"Calle\", \"Altura\", \"Piso\", \"Email\", \"Tipo\"\n}\n));\n jScrollPane1.setViewportView(jTable1);\n }", "private void getTodoItemsFromDatabase(){\n Cursor result = todoDatabaseHelper.getAllData();\n if(result.getCount() > 0){\n //there is some data\n while(result.moveToNext()){\n TodoItem todoItem = new TodoItem(result.getInt(0) ,result.getString(1), result.getString(2));\n todoItem.setSelected(false);\n todoItem.setCollapsed(true);\n todoItems.add(todoItem);\n }\n }\n }", "public void listarutilizador() {\n \n \n List<Utilizador> cs =new UtilizadorJpaController().findUtilizadorEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeutilizador.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Utilizador c : cs) {\n tbm.addRow(new String[1]);\n listadeutilizador.setValueAt(c.getIdutilizador(), i, 0);\n listadeutilizador.setValueAt(c.getNome(), i, 1);\n listadeutilizador.setValueAt(c.getUtilizador(), i, 2);\n listadeutilizador.setValueAt(c.getIdprevilegio().getPrevilegio(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// Distrito di = new DistritoJpaController().getDistritoByLoc(f.getIdlocalidade());\n// Localidade lo = new LocalidadeJpaController().findLocalidade(f.getIdlocalidade());\n// listaderelatorio.setValueAt(di.getDistrito(), i, 0);//lo.getIdposto().getIddistrito().getDistrito(), i, 0);\n// listaderelatorio.setValueAt(lo.getLocalidade(), i, 1);\n \n//// listadeformando.setValueAt(f.getSexo(), i, 2);\n// listaderelatorio.setValueAt(f.getQhomem(), i, 2);\n// listaderelatorio.setValueAt(f.getQmulher(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// \n// \n i++;\n }\n \n \n \n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}", "private void CargarDatos() {\n personasTable.setItems(FXCollections.observableList(\n PersonasDataSource.ListaPersonas()\n ));\n }", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "private void addRows() {\n this.SaleList.forEach(Factura -> {\n this.modelo.addRow(new Object[]{\n Factura.getId_Factura(),\n Factura.getPersona().getNombre(),\n Factura.getFecha().getTimestamp(),\n Factura.getCorreo(),\n Factura.getGran_Total()});\n });\n }", "public void popular(){\n DAO dao = new DAO();\n modelo.setNumRows(0);\n\n for(Manuais m: dao.selecTudoManuaisVenda()){\n modelo.addRow(new Object[]{m.getId(),m.getNome(),m.getClasse(),m.getEditora(),m.getPreco()+\".00 MZN\"});\n \n }\n }", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "private void selectAll() {\n //To change body of generated methods, choose Tools | Templates.\n \n tabelpulsa.setModel(model);\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n \n \n try {\n Connection c=koneksidb.getkoneksi();\n Statement s=c.createStatement();\n ResultSet r=s.executeQuery(\"select* from pulsa\");\n while(r.next()){\n Object[] pulsa = new Object[5]; \n pulsa[0]=r.getString(\"operator\");\n pulsa[1]=r.getString(\"id_pulsa\");\n pulsa[2]=r.getString(\"harga_default\");\n pulsa[3]=r.getString(\"harga_jual\");\n pulsa[4]=r.getString(\"harga_member\");\n model.addRow(pulsa);\n }\n }catch (SQLException e){\n System.out.println(\"terjadi error :\" +e);\n }\n }", "private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public void listarQuartos(JTable table) {\r\n\t\ttry {\r\n\t\t\tStatement st = conexao.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(\"SELECT idQuartos,tipo FROM quartos\");\r\n\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\r\n\t\t}\r\n\t\tcatch (SQLException e) {}\r\n\t}", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public void recargar(ArrayList<EntidadBE> proveedores){\n DefaultTableModel modelo=(DefaultTableModel) dgvProveedor.getModel();\n for(int i=modelo.getRowCount()-1; i>=0; i--){\n modelo.removeRow(i);\n }\n\n dgvProveedor.clearSelection();\n\n for(int i=0;i<proveedores.size();i++){\n modelo.addRow(new Object[4]);\n dgvProveedor.setValueAt(proveedores.get(i).getIdEntidad(),i,0 );\n dgvProveedor.setValueAt(proveedores.get(i).getRazonSocial(),i,1 );\n\n }\n }", "public List<TblRetur>getAllDataRetur();", "private void TampilData(){\n try{ //\n String sql = \"SELECT * FROM buku\"; // memanggil dari php dengan tabel buku\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n rss = stt.executeQuery(sql); \n while (rss.next()){ \n Object[] o = new Object [3]; // membuat array 3 dimensi dengan nama object\n \n o[0] = rss.getString(\"judul\"); // yang pertama dengan ketentuan judul\n o[1] = rss.getString(\"penulis\"); // yang kedua dengan ketentuan penulis\n o[2] = rss.getInt(\"harga\"); // yang ketiga dengan ketentuan harga\n model.addRow(o); // memasukkan baris dengan mengkonekan di tabel model\n } \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "private void llenar_tabla() {\n \n try {\n DefaultTableModel modelo;\n conexion cnx = new conexion();\n Connection registros = cnx.conexion();\n String[] nombre_atributos = {\"id_producto\", \"nombre\",\"id_categoria\"};\n String sql = (\"SELECT *FROM producto\");\n modelo = new DefaultTableModel(null, nombre_atributos);\n Statement st = (Statement) registros.createStatement();\n ResultSet rs = st.executeQuery(sql);\n String[] filas = new String[3];\n\n while (rs.next()) {\n filas[0] = rs.getString(\"id_producto\");\n filas[1] = rs.getString(\"nombre\");\n filas[2] = rs.getString(\"id_categoria\");\n modelo.addRow(filas);\n\n }\n jtabla.setModel(modelo);\n registros.close();\n } catch (SQLException ex) {\n Logger.getLogger(responsable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void carga_bd_empleados(){\n try {\n Connection conectar = Conexion.conectar();\n PreparedStatement pst = conectar.prepareStatement(\n \"select nombre, edad, cargo, direccion, telefono from empleados\");\n\n ResultSet rs = pst.executeQuery();\n\n table = new JTable(model);\n jScrollPane1.setViewportView(table);\n table.setBackground(Color.yellow);\n\n model.addColumn(\"Nombre\");\n model.addColumn(\"Edad\");\n model.addColumn(\"Cargo\");\n model.addColumn(\"Direccion\");\n model.addColumn(\"Telefono\");\n\n while (rs.next()) {\n Object[] fila = new Object[8];\n //material mimaterial = new material();\n\n for (int i = 0; i < 5; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n// model.addRow(fila);\n Empleado mimaterial = this.ChangetoEmpleado(fila);\n this.AddToArrayTableEmpleado(mimaterial);\n\n }\n\n conectar.close();\n \n } catch (SQLException e) {\n System.err.println(\"Error al llenar tabla\" + e);\n JOptionPane.showMessageDialog(null, \"Error al mostrar informacion\");\n\n }\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "List<ItemStockDO> selectAll();", "private void preencheTable(){\n\t\t\n\t\tlistaArquivos.setItemCount(0);\n\t\t\n\t\tfor(File f : arquivos){\n\t\t\tTableItem it = new TableItem(listaArquivos, SWT.NONE);\n\t\t\tit.setText(0, f.getName());\n\t\t\tit.setText(1, formataDouble(f.length()));\n\t\t\tit.setText(2, formataData(f.lastModified()));\n\t\t}\n\t\t\n\t}", "public void refreshItemsFromTable() {\n\n // Get the items that weren't marked as completed and add them in the\n // adapter\n\n AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>(){\n @Override\n protected Void doInBackground(Void... params) {\n try {\n final List<ToDoItem> results = refreshItemsFromMobileServiceTable();\n //Offline Sync\n //final List<ToDoItem> results = refreshItemsFromMobileServiceTableSyncTable();\n getActivity ().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.clear();\n for (ToDoItem item : results) {\n mAdapter.add(item);\n }\n }\n });\n } catch (final Exception e){\n createAndShowDialogFromTask(e, \"Error\");\n }\n\n return null;\n }\n };\n\n runAsyncTask(task);\n }", "public void reloadTableEmpleado() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (listae.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Empleado object = listae.get(i);\n this.AddtoTableEmpleado(object);\n }\n\n }", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "public void reloadTableCliente() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (lista.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Cliente object = lista.get(i);\n this.AddtoTableCliente(object);\n }\n\n }", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a la cantidad de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) { //C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1); //C.P.M vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public void LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "private ArrayList<Entidad> GetArrayItems(){\n // ArrayList<Entidad> listItems = new ArrayList<>();\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n\n return listItems;\n }", "List<ItemPedido> findAll();", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public void ProductsContent(DefaultTableModel tableModel, int parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql =\"SELECT productos.descripcion, productos.presentacion, productos.precio, contenido.cantidad, \"\n + \"contenido.importe FROM productos JOIN contenido JOIN requisiciones ON productos.id_producto = \"\n + \"contenido.producto AND contenido.requisicion = requisiciones.id_requisicion \"\n + \"WHERE requisiciones.id_requisicion = ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setInt(1, parameter);\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i <= columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i <= columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "public void llenarTabla() {\n DefaultTableModel modelos = (DefaultTableModel) tableProducto.getModel();\n while (modelos.getRowCount() > 0) {\n modelos.removeRow(0);\n }\n MarcaDAO marcaDao = new MarcaDAO();\n CategoriaProductoDAO catProDao = new CategoriaProductoDAO();\n ProductoDAO proDao = new ProductoDAO();\n Marca marca = new Marca();\n CategoriaProducto catPro = new CategoriaProducto();\n\n for (Producto producto : proDao.findAll()) {\n DefaultTableModel modelo = (DefaultTableModel) tableProducto.getModel();\n modelo.addRow(new Object[10]);\n int nuevaFila = modelo.getRowCount() - 1;\n tableProducto.setValueAt(producto.getIdProducto(), nuevaFila, 0);\n tableProducto.setValueAt(producto.getNombreProducto(), nuevaFila, 1);\n tableProducto.setValueAt(producto.getCantidadProducto(), nuevaFila, 2);\n tableProducto.setValueAt(producto.getPrecioCompra(), nuevaFila, 3);\n tableProducto.setValueAt(producto.getPrecioVenta(), nuevaFila, 4);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 5);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 6);\n tableProducto.setValueAt(producto.getDescripcionProducto(), nuevaFila, 7);\n marca.setIdMarca(producto.getFK_idMarca());\n tableProducto.setValueAt(marcaDao.findBy(marca, \"idMarca\").get(0).getNombreMarca(), nuevaFila, 8);//PARA FK ID MARCA\n catPro.setIdCategoriaProducto(producto.getFK_idCategoriaProducto());\n tableProducto.setValueAt(catProDao.findBy(catPro, \"idCategoriaProducto\").get(0).getNombreCategoriaProducto(), nuevaFila, 9);\n //PARA FK ID CATEGORIA PRODUCTO\n\n }\n }", "@Override\n\tpublic void loadData(){\n\t\tsuper.loadData();\n\t\topenProgressDialog();\n\t\tBmobQuery<Goods> query = new BmobQuery<Goods>();\n\t\tpageSize = 5;\n\t\tquery.setLimit(pageSize);\n\t\tquery.setSkip((pageNum - 1) * pageSize);\n\t\tif(point == 1){\n\t\t\tquery.addWhereEqualTo(\"type\", type);\n\t\t}else if(point == 2){\n\t\t\tquery.addWhereEqualTo(\"tradeName\", type);\n\t\t}\n\t\tquery.findObjects(this, new FindListener<Goods>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\t// TODO Auto-generated method st\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(int code,String msg){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(mContext, \"查询失败\", Toast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t}\n\t\t});\n\n\t}", "private void LeastMoviableItem() {\n DefaultTableModel dtm=(DefaultTableModel) leastmoviableitemtable.getModel();\n ArrayList<MoviableItem> findleastmoviableitem;\n try {\n findleastmoviableitem = LeastMoviableItemController.findleastmoviableitem();\n for (MoviableItem moviableItem : findleastmoviableitem) {\n Object[]rowdata={moviableItem.getItemcode(),moviableItem.getDescription(),moviableItem.getSalse()}; \n dtm.addRow(rowdata);\n }\n } catch (ClassNotFoundException | SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n \n\n }", "private void populateFields() {\n pedidos = pdao.listaTodos();\n cCliente = new HashSet();\n cEstado = new HashSet();\n cCidade = new HashSet();\n cFornecedor = new HashSet();\n\n for (int i = 0; i < pedidos.size(); i++) {\n cCliente.add(pedidos.get(i).getCliente().getNome());\n cEstado.add(pedidos.get(i).getCliente().getEstado());\n cCidade.add(pedidos.get(i).getCliente().getCidade());\n for (int j = 0; j < pedidos.get(i).getItens().size(); j++) {\n cFornecedor.add(pedidos.get(i).getItens().get(j).getProduto().getFornecedor().getNome());\n }\n }\n\n clientes = new ArrayList<>(cCliente);\n fornecedores = new ArrayList<>(cFornecedor);\n\n Iterator i = cCliente.iterator();\n while (i.hasNext()) {\n jCBCliente.addItem(i.next());\n }\n\n i = null;\n i = cEstado.iterator();\n while (i.hasNext()) {\n jCBEstado.addItem(i.next());\n }\n\n i = null;\n i = cCidade.iterator();\n while (i.hasNext()) {\n jCBCidade.addItem(i.next());\n }\n i = null;\n i = cFornecedor.iterator();\n while (i.hasNext()) {\n jCBFornecedor.addItem(i.next());\n }\n\n }", "private void preencherTabelaVeiculoCarga() {\n\n ArrayList dados = new ArrayList();\n cargaDao = new CargaDao();\n Carga carga;\n String[] colunas = new String[]{\"ID\", \"DESCRICAO\", \"STATUS\"};\n\n try {\n final List<Object> listaCarga = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n\n if (listaCarga != null && listaCarga.size() > 0) {\n for (Object cargaAtual : listaCarga) {\n carga = (Carga) cargaAtual;\n dados.add(new Object[]{carga.getIdCarga(), carga.getDescricao(), carga.getStatus()});\n }\n }\n\n ModeloTabela modTabela = new ModeloTabela(dados, colunas);\n jTB_VeiculoCarga.setModel(modTabela);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setPreferredWidth(100);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setPreferredWidth(300);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setPreferredWidth(150);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setResizable(false);\n\n jTB_VeiculoCarga.getTableHeader().setReorderingAllowed(false);\n jTB_VeiculoCarga.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n jTB_VeiculoCarga.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n jTB_VeiculoCarga.addMouseListener(new MouseAdapter() {\n\n @Override\n public void mouseClicked(MouseEvent e) {\n try {\n List<Object> lista = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n cargaSelecionada = (Carga) lista.\n get(jTB_VeiculoCarga.convertRowIndexToModel(jTB_VeiculoCarga.getSelectedRow()));\n\n // if (veiculoDao.listarVeiculosAtivos().size() > 0 && veiculoDao.listarVeiculosAtivos() != null) {}\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(FormVeiculoCargas.this, \"Erro genérico1: \" + ex.getMessage());\n ex.printStackTrace(System.err);\n }\n }\n\n });\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Erro genérico2: \" + e.getMessage());\n }\n }", "public List<ActividadEntitie> LoadAllActividades() {\r\n\t\t\r\n\t\tCursor cursor = this.myDatabase.query(ActividadTablaEntidad.nombre_tabla,\r\n\t\t\t\t new String[] {ActividadTablaEntidad.id,ActividadTablaEntidad.actividad_codigo,ActividadTablaEntidad.actividad_descripcion}, \r\n\t\t\t\t null,null,null,null,ActividadTablaEntidad.actividad_codigo);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\tActividadEntitie datos = null;\r\n\t\tArrayList<ActividadEntitie> actividadList = null;\r\n\t\t\r\n\t\tif (cursor != null ) {\r\n\t\t\t\r\n\t\t\tactividadList = new ArrayList<ActividadEntitie>();\r\n\t\t\t\r\n\t\t\t\r\n\t\t if (cursor.moveToFirst()) {\r\n\t\t do {\r\n\t\t \t\r\n\t\t \tdatos = new ActividadEntitie();\r\n\t\t \tdatos.set_codigoActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_codigo)));\r\n\t\t \tdatos.set_descripcionActividad(cursor.getString(cursor.getColumnIndex(ActividadTablaEntidad.actividad_descripcion)));\r\n\t\t \tdatos.set_id(cursor.getLong(cursor.getColumnIndex(ActividadTablaEntidad.id)));\r\n\t\t \t\r\n\t\t \tactividadList.add(datos);\r\n\t\t \t\r\n\t\t }while (cursor.moveToNext());\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\tif(cursor != null)\r\n cursor.close();\r\n\t\t\r\n\t\treturn actividadList;\r\n\t}", "public ExibeTarefas() {\n initComponents();\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n jTable1.setRowSorter(new TableRowSorter(modelo));\n readJTable();\n readItemBox();\n }", "public void cargarTabla(String servidor){\n String base_de_datos=\"Renta de Autos\";\n String sql =\"USE [\"+base_de_datos+\"]\\n\" +\n \"SELECT name FROM sysobjects where xtype='U' and name='Clientes' \";\n Conexion cc = new Conexion();\n Connection cn=cc.conectarBase(servidor, base_de_datos);\n \n try {\n Statement psd = cn.createStatement();\n ResultSet rs=psd.executeQuery(sql);\n while(rs.next()){\n cbTablas.addItem(rs.getString(\"name\"));\n }\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex+\" al cargar tabla\");\n }\n }", "List<Map<String, Object>> getAllItems(String tableName);", "public DefaultTableModel cargarDatos () {\r\n DefaultTableModel modelo = new DefaultTableModel(\r\n new String[]{\"ID SALIDA\", \"IDENTIFICACIÓN CAPITÁN\", \"NÚMERO MATRICULA\", \"FECHA\", \"HORA\", \"DESTINO\"}, 0); //Creo un objeto del modelo de la tabla con los titulos cargados\r\n String[] info = new String[6];\r\n String query = \"SELECT * FROM actividad WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n info[0] = rs.getString(\"id_salida\");\r\n info[1] = rs.getString(\"identificacion_navegate\");\r\n info[2] = rs.getString(\"numero_matricula\");\r\n info[3] = rs.getString(\"fecha\");\r\n info[4] = rs.getString(\"hora\");\r\n info[5] = rs.getString(\"destino\");\r\n Object[] fila = new Object[]{info[0], info[1], info[2], info[3], info[4], info[5]};\r\n modelo.addRow(fila);\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return modelo;\r\n }", "public void readdata(ArrayList<AddData> daftar){\n Cursor crsr = this.getReadableDatabase().rawQuery(\"select todo, description, priority from \"+nama_tabel, null);\n while (crsr.moveToNext()){\n daftar.add(new AddData(crsr.getString(0), crsr.getString(1), crsr.getString(2)));\n }\n }", "private void listarDatos() {\n DBConnection conListar = new DBConnection();\n DefaultTableModel tableModel = new DefaultTableModel();\n String querty = \"SELECT P.codigo AS Cod_Prod, P.nombre, P.precio_compra AS P_Compra, P.precio_venta AS P_Venta, P.cantidad AS Stock, C.nombre AS Categoria FROM productos AS P JOIN categorias AS C ON P.categorias_id = C.categorias_id\";\n \n tableModel.addColumn(\"Cod. Prod\");\n tableModel.addColumn(\"Nombre\");\n tableModel.addColumn(\"P. Compra\");\n tableModel.addColumn(\"P. Venta\");\n tableModel.addColumn(\"Stock\");\n tableModel.addColumn(\"Categoria\");\n tableStock.setModel(tableModel);\n \n String datos[] = new String[6];\n\n try {\n Statement st = conListar.connetion().createStatement();\n ResultSet rs = st.executeQuery(querty);\n \n while (rs.next()) {\n \n datos[0] = rs.getString(1);\n datos[1] = rs.getString(2);\n datos[2] = rs.getString(3);\n datos[3] = rs.getString(4);\n datos[4] = rs.getString(5);\n datos[5] = rs.getString(6);\n \n tableModel.addRow(datos);\n \n }\n tableStock.setModel(tableModel);\n\n } catch (SQLException e) {\n System.out.println(e.getMessage() + e);\n JOptionPane.showMessageDialog(null, \"Insercion!\", \"Error\", JOptionPane.ERROR);\n } finally {\n try {\n conListar.closeConnection();\n System.err.println(\"Conexion listar stock cerrada\");\n } catch (SQLException ex) {\n Logger.getLogger(Stock.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n }", "public void clicTable(View v) {\n try {\n conteoTab ct = clc.get(tb.getIdTabla() - 1);\n\n if(ct.getEstado().equals(\"0\")) {\n String variedad = ct.getVariedad();\n String bloque = ct.getBloque();\n Long idSiembra = ct.getIdSiembra();\n String idSiempar = String.valueOf(idSiembra);\n\n long idReg = ct.getIdConteo();\n int cuadro = ct.getCuadro();\n int conteo1 = ct.getConteo1();\n int conteo4 = ct.getConteo4();\n int total = ct.getTotal();\n\n txtidReg.setText(\"idReg:\" + idReg);\n txtCuadro.setText(\"Cuadro: \" + cuadro);\n cap_1.setText(String.valueOf(conteo1));\n cap_2.setText(String.valueOf(conteo4));\n cap_ct.setText(String.valueOf(total));\n txtId.setText(\"Siembra: \" + idSiempar);\n txtVariedad.setText(\"Variedad: \" + variedad);\n txtBloque.setText(\"Bloque: \" + bloque);\n }else{\n Toast.makeText(this, \"No se puede cargar el registro por que ya ha sido enviado\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (Exception E) {\n Toast.makeText(getApplicationContext(), \"No has seleccionado aún una fila \\n\" + E, Toast.LENGTH_LONG).show();\n }\n }", "public void ConsultaVehiculosSQlite() {\n preguntas = mydb.getCartList();\n for( int i = 0 ; i < preguntas.size() ; i++ ){\n //Toast.makeText(getApplicationContext(), preguntas.get( i ).getPregunta(), Toast.LENGTH_SHORT).show();\n persons.add(new Solicitud(\"Pregunta \" + String.valueOf(i+1) +\": \"+preguntas.get( i ).getPregunta(),\"Fecha: \"+ preguntas.get( i ).getFecha(), R.drawable.solicitudes,\"Motivo: \"+preguntas.get( i ).getMotivo(),\"Observacion: \"+preguntas.get( i ).getObservacion(),\"\"));\n }\n }", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "@Override\n\tpublic List<ItemFactura> findAllItemFacturas() {\n\t\treturn itemFacturaDao.findAll();\n\t}", "public List<ItemsResponse> getListItems(ItemsRequest req) throws DAOException {\n\t\tlogger.debug(\" --- getListItems [ HNotaDAO ] --- \" );\n\t\tlogger.debug(\" --- request : \"+req.toString()+\" --- \" );\n\t\t\n\t\t\n\t\tList<ItemsResponse> lista = null;\n\t\tStringBuilder query = new StringBuilder();\n\n\t\tint limit = req.getLimit();\n\t\tint page = req.getPage();\n\n\t\tif (limit == 0 || page == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint to = limit * page;\n\t\tint from = (to - limit) + 1;\n\n\t\tquery.append(\" SELECT * FROM (SELECT @rownum:=@rownum+1 rank , q.* \");\n\t\tquery.append(\" \t\tFROM ( SELECT n.FC_ID_CONTENIDO AS id , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_TITULO AS title, \");\n query.append(\" \t\t\t n.FC_CN AS user , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_DESCRIPCION AS description , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FD_FECHA_PUBLICACION AS date , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_TIPO_NOTA AS typeItem, \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_FRIENDLY_URL AS url_item , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_ESTATUS_NOTA AS status , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_IMAGEN_PRINCIPAL AS image , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_ID_CATEGORIA AS idCategories , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_DESCRIPCION AS descCategories, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_DESCRIPCION AS descSport, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_ID_DEPORTE AS idSport \");\n\t\tquery.append(\" \t\t\t\tFROM yog_ba_h_nota n \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_categoria categoria ON n.FC_ID_CATEGORIA = categoria.FC_ID_CATEGORIA \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_deporte deporte ON n.FC_ID_DEPORTE = deporte.FC_ID_DEPORTE \");\n\t\tquery.append(\" \t\t \t\t WHERE 1=1 \");\n\t\t\n\t\tif (req.getType().equals(\"categoria\")) {\n\t\t\tquery.append(\" AND categoria.FC_ID_CATEGORIA = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\t\n\t\tif (req.getType().equals(\"deporte\")) {\n\t\t\tquery.append(\" AND deporte.FC_ID_DEPORTE = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\tif (req.getStatus() != null && !req.getStatus().equals(\"\"))\n\t\t\tquery.append(\" AND n.FC_ID_ESTATUS_NOTA = '\" + req.getStatus() + \"' \");\n\n\t\tquery.append(\" ORDER BY FD_FECHA_PUBLICACION DESC ) AS q ,(SELECT @rownum:=0) num ) r \");\n\t\tquery.append(\" WHERE r.rank >= \" + from + \" AND r.rank <= \" + to + \" \");\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\ttry {\n\n\t\t\tlista = jdbcTemplate.query(query.toString(), new BeanPropertyRowMapper<ItemsResponse>(ItemsResponse.class));\n\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\"--- Error getListItems [ HNotaDAO ] :\", e);\n\n\t\t\tthrow new DAOException(e.getMessage());\n\n\t\t}\n\n\t\treturn lista;\n\n\t}", "public Cursor CargarTodosLosDatos()\n {\n return db.query(DATABASE_TABLE, new String[] {KEY_ATRIBUTO01}, null, null, null, null, null);\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "public static void items(){\n\t\ttry{\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\n\t\t\tStatement query = conn.createStatement();\n\t\t\tResultSet re = query.executeQuery(\"select * from item\");\n\t\t\tString spc = \" \";\n\t\t\twhile (re.next()){\n\t\t\t\tSystem.out.println(re.getInt(\"itemid\")+spc+re.getString(\"title\")+spc+re.getDouble(\"price\"));\n\t\t\t}\n\t\t}catch(Exception ecx){\n\t\t\tecx.printStackTrace();\n\t\t}\n\t}", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "private void showAllDataStok() {\n tableStok.getSelectionModel().removeListSelectionListener(this);\n listStok = daoStok.getAllStok();\n dtmStok.getDataVector().removeAllElements();\n for (Stokdigudang s : listStok) {\n dtmStok.addRow(new Object[]{\n s.getIDBarang(),\n s.getNamaBarang(),\n s.getStok(),\n s.getBrand(),\n s.getHarga(),\n s.getIDKategori().getNamaKategori(),\n s.getIDSupplier().getNamaPerusahaan(),\n s.getTanggalDidapat()\n });\n }\n tableStok.getSelectionModel().addListSelectionListener(this);\n }", "private void LoadItems() {\n\n Call<NewsResponce> callNews = null;\n\n if (SourceId != null && DateTo != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, DateTo, currentPage, SourceId);\n\n } else if (SourceId != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, currentPage, SourceId);\n\n } else if (SourceId != null && DateTo != null) {\n callNews = newsApiInterface.GetEverythingDateTo(NewsClient.API_KEY, DateTo, currentPage, SourceId);\n\n } else {\n DialogAlert(R.string.dialog_title_no_criterias, R.string.dialog_message_no_criterias);\n }\n\n if (callNews != null)\n callNews.enqueue(new Callback<NewsResponce>() {\n @Override\n public void onResponse(Call<NewsResponce> call, final Response<NewsResponce> response) {\n if (response.body() != null) {\n if (response.body().getTotalResults() > articleList.size()) {\n articleList.addAll(response.body().getArticles());\n newsAdapter.notifyDataSetChanged();\n ++currentPage;\n }\n } else\n articleList.clear();\n\n Log.d(TAG, articleList.size() + \"\");\n }\n\n @Override\n public void onFailure(Call<NewsResponce> call, Throwable t) {\n Log.e(TAG, t.getMessage());\n }\n });\n }", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "public List<Table> selectAll_de() throws Exception {\n\t\treturn tableDao.selectAll_de();\r\n\t}", "public void setItem() {\n DatabaseReference dr_item = database.getReference();\n dr_item.child(\"User\").child(user.getUid()).child(\"Keranjang\").child(\"Item\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n int hartot = 0;\n if(id_barang!=null){\n id_barang.clear();\n }\n if(quantity!=null){\n quantity.clear();\n }\n if(harga_barang!=null){\n harga_barang.clear();\n }\n if(id_item!=null){\n id_item.clear();\n }\n\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n IdBarang id = data.getValue(IdBarang.class);\n\n id_barang.add(id);\n }\n\n for (int i = 0; i < id_barang.size(); i++) {\n int qty = id_barang.get(i).getQuantity();\n int hrg = id_barang.get(i).getHarga();\n String id = id_barang.get(i).getId();\n hartot = hartot + hrg;\n\n id_item.add(id);\n quantity.add(qty);\n harga_barang.add(hrg);\n\n tv_harga_total.setText(\"Rp. \" + String.valueOf(hartot));\n }\n setBarang();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "private void fillData() {\n table.setRowList(data);\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "void clearAllItemsTable();", "public List<ItemsResponse> getListItemsByTitle(ItemsRequestByTitle req) throws DAOException {\n\t\tlogger.debug(\" --- getListItemsByTitle [ HNotaDAO ] --- \" );\n\t\tlogger.debug(\" --- request : \"+req.toString()+\" --- \" );\n\t\t\n\t\t\n\t\tList<ItemsResponse> lista = null;\n\t\tStringBuilder query = new StringBuilder();\n\n\t\tint limit = req.getLimit();\n\t\tint page = req.getPage();\n\n\t\tif (limit == 0 || page == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint to = limit * page;\n\t\tint from = (to - limit) + 1;\n\n\t\tquery.append(\" SELECT * FROM (SELECT @rownum:=@rownum+1 rank , q.* \");\n\t\tquery.append(\" \t\tFROM ( SELECT n.FC_ID_CONTENIDO AS id , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_TITULO AS title, \");\n query.append(\" \t\t\t n.FC_CN AS user , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_DESCRIPCION AS description , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FD_FECHA_PUBLICACION AS date , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_TIPO_NOTA AS typeItem, \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_FRIENDLY_URL AS url_item , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_ESTATUS_NOTA AS status , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_IMAGEN_PRINCIPAL AS image , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_ID_CATEGORIA AS idCategories , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_DESCRIPCION AS descCategories, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_DESCRIPCION AS descSport, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_ID_DEPORTE AS idSport \");\n\t\tquery.append(\" \t\t\t\tFROM yog_ba_h_nota n \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_categoria categoria ON n.FC_ID_CATEGORIA = categoria.FC_ID_CATEGORIA \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_deporte deporte ON n.FC_ID_DEPORTE = deporte.FC_ID_DEPORTE \");\n\t\tquery.append(\" \t\t \t\t WHERE 1=1 \");\n\t\t\n\t\tif (req.getType().equals(\"categoria\")) {\n\t\t\tquery.append(\" \tAND categoria.FC_ID_CATEGORIA = '\" + req.getId() + \"' \");\n\t\t}\n\n\t\tif (req.getType().equals(\"deporte\")) {\n\t\t\tquery.append(\" AND deporte.FC_ID_DEPORTE = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\tif (req.getAuthor() != null && !req.getAuthor().equals(\"\"))\n\t\t\tquery.append(\" \t AND n.FC_CN = '\" + req.getAuthor() + \"' \");\n\t\t\n\n\t\tif (req.getTitle() != null && !req.getTitle().equals(\"\"))\n\t\t\tquery.append(\" \t\tAND N.FC_TITULO LIKE '%\" + req.getTitle() + \"%' \");\n\n\t\tif (req.getStatus() != null && !req.getStatus().equals(\"\"))\n\t\t\tquery.append(\" AND n.FC_ID_ESTATUS_NOTA = '\" + req.getStatus() + \"' \");\n\n\t\t\n\t\tquery.append(\" ORDER BY FD_FECHA_PUBLICACION DESC ) AS q ,(SELECT @rownum:=0) num ) r \");\n\t\tquery.append(\" WHERE r.rank >= \" + from + \" AND r.rank <= \" + to + \" \");\n\t\t\n\t\t\n\t\t\n\n\t\ttry {\n\n\t\t\tlista = jdbcTemplate.query(query.toString(), new BeanPropertyRowMapper<ItemsResponse>(ItemsResponse.class));\n\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\" --- Error getListItemsByTitle [ HNotaDAO ] : \", e);\n\n\t\t\tthrow new DAOException(e.getMessage());\n\n\t\t}\n\n\t\treturn lista;\n\n\t}", "private void enlazarListadoTabla() {\n tblCursos.setItems(listaCursos);\n\n //Enlazar columnas con atributos\n clmNombre.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"nombre\"));\n clmAmbito.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"familiaProfesional\"));\n clmDuracion.setCellValueFactory(new PropertyValueFactory<Curso, Integer>(\"duracion\"));\n }" ]
[ "0.7409845", "0.695955", "0.671654", "0.66379106", "0.6583168", "0.65735465", "0.6480199", "0.645094", "0.6445774", "0.64390695", "0.6435435", "0.64144176", "0.6329757", "0.631583", "0.6303939", "0.62780565", "0.62647086", "0.62322384", "0.62243134", "0.61960185", "0.6190826", "0.6186908", "0.61812496", "0.6178193", "0.6172844", "0.61687547", "0.615702", "0.6149379", "0.6142102", "0.613141", "0.6117686", "0.60965514", "0.6086654", "0.6071557", "0.606848", "0.6051543", "0.6045566", "0.60376835", "0.6035175", "0.60197103", "0.60196745", "0.59962744", "0.5980489", "0.5979156", "0.597564", "0.59745646", "0.5973351", "0.59714156", "0.596947", "0.59579325", "0.595705", "0.59504396", "0.59491307", "0.59475523", "0.5945583", "0.59300303", "0.5926025", "0.5922471", "0.59188825", "0.5914068", "0.59074384", "0.58997804", "0.5896645", "0.5894802", "0.58923584", "0.5890664", "0.58884466", "0.5888439", "0.58861715", "0.5883948", "0.587058", "0.5869917", "0.5868396", "0.5863432", "0.5860658", "0.58567286", "0.5855529", "0.5848511", "0.5846464", "0.58463526", "0.58295554", "0.58276916", "0.58262104", "0.5823312", "0.5817944", "0.5814746", "0.5813234", "0.58108515", "0.58087695", "0.57968557", "0.5794629", "0.5794245", "0.5790562", "0.5790258", "0.57888055", "0.57863677", "0.57697374", "0.5768389", "0.57655543", "0.576517" ]
0.64153916
11
TODO Autogenerated method stub
public static void main(String[] args) { stringhandler obj=new stringhandler(); obj.input(); obj.display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
create empty symbol table
public SymbolTable() { classScope = new Hashtable<String, Values>(); subScope = new Hashtable<String, Values>(); currScope = classScope; subArgIdx = 0; subVarIdx = 0; classStaticIdx = 0; classFieldIdx = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SymbolTable()\r\n {\r\n // Create the tables stack and add the top level\r\n tables = new ArrayDeque<HashMap<String,T>>();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts = new ArrayDeque<Integer>();\r\n counts.add( 0 );\r\n }", "public SymbolTable() {\n scopes = new ArrayList<>();\n currentScopeLevel = NO_SCOPE;\n }", "public SymbolTable(){\r\n\t\tthis(INIT_CAPACITY);\r\n\t}", "public SymbolTableEntry(){\n\t}", "private void buildSymbolTables() {\n new SymbolsTableBuilder(data).read(this);//.dump();\n }", "public SymbolTable(int size) {\n table = new Hashtable<String, SymbolTableEntry>(size);\n }", "SymTable() {\n\t\tmap = new HashMap<String, Sym>();\n\t\tlist.add(map);\n\t}", "public BSTSymbolTable()\r\n\t{\r\n\t\tdata = new IterativeBinarySearchTree<Entry>();\r\n\t}", "private SequentialSearchSymbolTable() {\n\t\t\tkeySet = new ArrayList<>();\n\t\t\tvalueSet = new ArrayList<>();\n\t\t\tsize = 0;\n\t\t}", "public SymbolTable(int capacity){\r\n\t\tN = 0;\r\n\t\tM = capacity;\r\n\t\tkeys = new String[M];\r\n\t\tvals = new Character[M];\r\n\t}", "@SuppressWarnings(\"unused\")\n private void initSymbolTable() {\n MethodType I_V = new MethodType(Type.Int, Type.Void);\n MethodType I_R = new MethodType(Type.Int, Type.Real);\n MethodType I_S = new MethodType(Type.Int, Type.String);\n MethodType I_D = new MethodType(Type.Int, Type.NodeSet);\n MethodType R_I = new MethodType(Type.Real, Type.Int);\n MethodType R_V = new MethodType(Type.Real, Type.Void);\n MethodType R_R = new MethodType(Type.Real, Type.Real);\n MethodType R_D = new MethodType(Type.Real, Type.NodeSet);\n MethodType R_O = new MethodType(Type.Real, Type.Reference);\n MethodType I_I = new MethodType(Type.Int, Type.Int);\n MethodType D_O = new MethodType(Type.NodeSet, Type.Reference);\n MethodType D_V = new MethodType(Type.NodeSet, Type.Void);\n MethodType D_S = new MethodType(Type.NodeSet, Type.String);\n MethodType D_D = new MethodType(Type.NodeSet, Type.NodeSet);\n MethodType A_V = new MethodType(Type.Node, Type.Void);\n MethodType S_V = new MethodType(Type.String, Type.Void);\n MethodType S_S = new MethodType(Type.String, Type.String);\n MethodType S_A = new MethodType(Type.String, Type.Node);\n MethodType S_D = new MethodType(Type.String, Type.NodeSet);\n MethodType S_O = new MethodType(Type.String, Type.Reference);\n MethodType B_O = new MethodType(Type.Boolean, Type.Reference);\n MethodType B_V = new MethodType(Type.Boolean, Type.Void);\n MethodType B_B = new MethodType(Type.Boolean, Type.Boolean);\n MethodType B_S = new MethodType(Type.Boolean, Type.String);\n MethodType D_X = new MethodType(Type.NodeSet, Type.Object);\n MethodType R_RR = new MethodType(Type.Real, Type.Real, Type.Real);\n MethodType I_II = new MethodType(Type.Int, Type.Int, Type.Int);\n MethodType B_RR = new MethodType(Type.Boolean, Type.Real, Type.Real);\n MethodType B_II = new MethodType(Type.Boolean, Type.Int, Type.Int);\n MethodType S_SS = new MethodType(Type.String, Type.String, Type.String);\n MethodType S_DS = new MethodType(Type.String, Type.Real, Type.String);\n MethodType S_SR = new MethodType(Type.String, Type.String, Type.Real);\n MethodType O_SO = new MethodType(Type.Reference, Type.String, Type.Reference);\n\n MethodType D_SS =\n new MethodType(Type.NodeSet, Type.String, Type.String);\n MethodType D_SD =\n new MethodType(Type.NodeSet, Type.String, Type.NodeSet);\n MethodType B_BB =\n new MethodType(Type.Boolean, Type.Boolean, Type.Boolean);\n MethodType B_SS =\n new MethodType(Type.Boolean, Type.String, Type.String);\n MethodType S_SD =\n new MethodType(Type.String, Type.String, Type.NodeSet);\n MethodType S_DSS =\n new MethodType(Type.String, Type.Real, Type.String, Type.String);\n MethodType S_SRR =\n new MethodType(Type.String, Type.String, Type.Real, Type.Real);\n MethodType S_SSS =\n new MethodType(Type.String, Type.String, Type.String, Type.String);\n\n /*\n * Standard functions: implemented but not in this table concat().\n * When adding a new function make sure to uncomment\n * the corresponding line in <tt>FunctionAvailableCall</tt>.\n */\n\n // The following functions are inlined\n\n _symbolTable.addPrimop(\"current\", A_V);\n _symbolTable.addPrimop(\"last\", I_V);\n _symbolTable.addPrimop(\"position\", I_V);\n _symbolTable.addPrimop(\"true\", B_V);\n _symbolTable.addPrimop(\"false\", B_V);\n _symbolTable.addPrimop(\"not\", B_B);\n _symbolTable.addPrimop(\"name\", S_V);\n _symbolTable.addPrimop(\"name\", S_A);\n _symbolTable.addPrimop(\"generate-id\", S_V);\n _symbolTable.addPrimop(\"generate-id\", S_A);\n _symbolTable.addPrimop(\"ceiling\", R_R);\n _symbolTable.addPrimop(\"floor\", R_R);\n _symbolTable.addPrimop(\"round\", R_R);\n _symbolTable.addPrimop(\"contains\", B_SS);\n _symbolTable.addPrimop(\"number\", R_O);\n _symbolTable.addPrimop(\"number\", R_V);\n _symbolTable.addPrimop(\"boolean\", B_O);\n _symbolTable.addPrimop(\"string\", S_O);\n _symbolTable.addPrimop(\"string\", S_V);\n _symbolTable.addPrimop(\"translate\", S_SSS);\n _symbolTable.addPrimop(\"string-length\", I_V);\n _symbolTable.addPrimop(\"string-length\", I_S);\n _symbolTable.addPrimop(\"starts-with\", B_SS);\n _symbolTable.addPrimop(\"format-number\", S_DS);\n _symbolTable.addPrimop(\"format-number\", S_DSS);\n _symbolTable.addPrimop(\"unparsed-entity-uri\", S_S);\n _symbolTable.addPrimop(\"key\", D_SS);\n _symbolTable.addPrimop(\"key\", D_SD);\n _symbolTable.addPrimop(\"id\", D_S);\n _symbolTable.addPrimop(\"id\", D_D);\n _symbolTable.addPrimop(\"namespace-uri\", S_V);\n _symbolTable.addPrimop(\"function-available\", B_S);\n _symbolTable.addPrimop(\"element-available\", B_S);\n _symbolTable.addPrimop(\"document\", D_S);\n _symbolTable.addPrimop(\"document\", D_V);\n\n // The following functions are implemented in the basis library\n _symbolTable.addPrimop(\"count\", I_D);\n _symbolTable.addPrimop(\"sum\", R_D);\n _symbolTable.addPrimop(\"local-name\", S_V);\n _symbolTable.addPrimop(\"local-name\", S_D);\n _symbolTable.addPrimop(\"namespace-uri\", S_V);\n _symbolTable.addPrimop(\"namespace-uri\", S_D);\n _symbolTable.addPrimop(\"substring\", S_SR);\n _symbolTable.addPrimop(\"substring\", S_SRR);\n _symbolTable.addPrimop(\"substring-after\", S_SS);\n _symbolTable.addPrimop(\"substring-before\", S_SS);\n _symbolTable.addPrimop(\"normalize-space\", S_V);\n _symbolTable.addPrimop(\"normalize-space\", S_S);\n _symbolTable.addPrimop(\"system-property\", S_S);\n\n // Extensions\n _symbolTable.addPrimop(\"nodeset\", D_O);\n _symbolTable.addPrimop(\"objectType\", S_O);\n _symbolTable.addPrimop(\"cast\", O_SO);\n\n // Operators +, -, *, /, % defined on real types.\n _symbolTable.addPrimop(\"+\", R_RR);\n _symbolTable.addPrimop(\"-\", R_RR);\n _symbolTable.addPrimop(\"*\", R_RR);\n _symbolTable.addPrimop(\"/\", R_RR);\n _symbolTable.addPrimop(\"%\", R_RR);\n\n // Operators +, -, * defined on integer types.\n // Operators / and % are not defined on integers (may cause exception)\n _symbolTable.addPrimop(\"+\", I_II);\n _symbolTable.addPrimop(\"-\", I_II);\n _symbolTable.addPrimop(\"*\", I_II);\n\n // Operators <, <= >, >= defined on real types.\n _symbolTable.addPrimop(\"<\", B_RR);\n _symbolTable.addPrimop(\"<=\", B_RR);\n _symbolTable.addPrimop(\">\", B_RR);\n _symbolTable.addPrimop(\">=\", B_RR);\n\n // Operators <, <= >, >= defined on int types.\n _symbolTable.addPrimop(\"<\", B_II);\n _symbolTable.addPrimop(\"<=\", B_II);\n _symbolTable.addPrimop(\">\", B_II);\n _symbolTable.addPrimop(\">=\", B_II);\n\n // Operators <, <= >, >= defined on boolean types.\n _symbolTable.addPrimop(\"<\", B_BB);\n _symbolTable.addPrimop(\"<=\", B_BB);\n _symbolTable.addPrimop(\">\", B_BB);\n _symbolTable.addPrimop(\">=\", B_BB);\n\n // Operators 'and' and 'or'.\n _symbolTable.addPrimop(\"or\", B_BB);\n _symbolTable.addPrimop(\"and\", B_BB);\n\n // Unary minus.\n _symbolTable.addPrimop(\"u-\", R_R);\n _symbolTable.addPrimop(\"u-\", I_I);\n }", "public void generate (java.util.Hashtable symbolTable, com.sun.tools.corba.se.idl.SymtabEntry entry)\n {\n this.symbolTable = symbolTable;\n this.entry = entry;\n init ();\n\n openStream ();\n if (stream == null)\n return;\n writeHeading ();\n writeBody ();\n writeClosing ();\n closeStream ();\n }", "public void instantiateTable(){\n hashTable = new LLNodeHash[16];\n }", "private void createSymbolTable( Grammar grammar, State state, List<Action> tshifts, List<Action> ntshifts)\n {\n state.stackOps = new StackOp[ tshifts.size()];\n for( int i=0; i<state.stackOps.length; i++)\n {\n StackOp shift = new StackOp();\n state.stackOps[ i] = shift;\n \n int[] symbol = tshifts.get( i).symbols;\n if ( symbol.length == 2)\n {\n shift.low = symbol[ 0];\n shift.high = symbol[ 1];\n }\n else if ( symbol.length == 1)\n {\n shift.low = symbol[ 0];\n shift.high = symbol[ 0];\n }\n }\n }", "private void createStocksTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE stocks \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY, \" + \"owner INT, \"\n\t\t\t\t\t+ \"shareAmount INT, \" + \"purchasePrice DOUBLE, \" + \"symb VARCHAR(10), \"\n\t\t\t\t\t+ \"timePurchased BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table stocks\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of stocks table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public SymbolTable(Program program) {\n tableValid = true;\n this.parentSymbolTable = null;\n this.entries = new HashMap<>();\n SymbolTableBuilder stb = new SymbolTableBuilder(program, this);\n if (!stb.isBuildSuccessful()) {\n tableValid = false;\n }\n }", "public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }", "public SymTab(){\n \tclasses = new HashMap<String, ClassNode>();\n \tmethods = new HashMap<String, MethodNode>();\n }", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "void initTable();", "public void addToSymbolsTable(Token t) {\n\t\tif (!t.hasError()\n && (t.getType().equals(\"Constante\") || (t.getType().equals(\"Cadena\")))\n && !reservedWords.containsKey(t.getToken())\n && !symbolsTable.contains(t.getToken())\n ) {\n\n\t\t\tsymbolsTable.add(t);\n\t\t\t//System.out.println(\"[V] Token added line: \" + line + \" TokenType: \"\n\t\t\t//\t\t+ t.getType() + \" Token: \" + t.getToken());\n\t\t} else {\n\t\t\t//System.out.println(\"[X] Token NOT added to the symbol table. line: \"\n\t\t\t//\t\t+ line + \" TokenType: \" + t.getType() + \" Token: \"\n\t\t\t//\t\t+ t.getToken());\n\t\t}\n\n\t}", "@Override\n\tpublic void buildSymbolTable(STableI table, Stack<STableI> stStack, int entryLoc, int tableLoc)\n\t\t\tthrows CompileTimeError {\n\t\t\n\t}", "public void setSymbolTable(SymbolTable st) {\n\t this.st = st;\n\t }", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "public void initTable();", "public void makeEmpty() {\n defTable = new DList[sizeBucket];\n for(int i=0; i<sizeBucket; i++) {\n defTable[i] = new DList();\n }\n size = 0;\n }", "public interface SymbolTable\n{\n /**\n * Indicates that a symbol's integer ID could not be determined. That's\n * generally the case when constructing value instances that are not yet\n * contained by a datagram.\n */\n public final static int UNKNOWN_SYMBOL_ID = -1;\n\n\n /**\n * Gets the unique name of this symbol table.\n *\n * @return the unique name, or {@code null} if {@link #isLocalTable()}.\n */\n public String getName();\n\n\n /**\n * Gets the version of this symbol table.\n *\n * @return at least one, or zero if {@link #isLocalTable()}.\n */\n public int getVersion();\n\n\n /**\n * Determines whether this symbol table is local, and therefore unnamed\n * and unversioned.\n * <p>\n * If this method returns {@code true}, then both {@link #isSharedTable()}\n * and {@link #isSystemTable()} will return {@code false}.\n */\n public boolean isLocalTable();\n\n /**\n * Determines whether this symbol table is shared, and therefore named,\n * versioned, and {@linkplain #isReadOnly() read-only}.\n * <p>\n * If this method returns {@code true}, then {@link #isLocalTable()}\n * will return {@code false}.\n */\n public boolean isSharedTable();\n\n /**\n * Determines whether this instance is substituting for an imported\n * shared table for which no exact match was found in the catalog.\n * Such tables are not authoritative and may not even have any symbol text\n * at all (as is the case when no version of an imported table is found).\n * <p>\n * Substitute tables are always shared, non-system tables.\n *\n */\n public boolean isSubstitute();\n\n /**\n * Determines whether this symbol table is a system symbol table, and\n * therefore shared, named, versioned, and\n * {@linkplain #isReadOnly() read-only}.\n * <p>\n * If this method returns {@code true}, then {@link #isLocalTable()}\n * will return {@code false} and {@link #isSharedTable()} will return\n * {@code true}.\n */\n public boolean isSystemTable();\n\n\n /**\n * Determines whether this symbol table can have symbols added to it.\n * Shared symtabs are always read-only.\n * Local symtabs can also be {@linkplain #makeReadOnly() made read-only}\n * on demand, which enables some optimizations when writing data but will\n * cause failures if new symbols are encountered.\n *\n * @return true if this table is read-only, false if symbols may\n * be added.\n *\n * @see #makeReadOnly()\n *\n\n */\n public boolean isReadOnly();\n\n\n /**\n * Prevents this symbol table from accepting any more new symbols.\n * Shared symtabs are always read-only.\n * Making a local symtab read-only enables some optimizations when writing\n * data, but will cause failures if new symbols are encountered.\n *\n * @see #isReadOnly()\n *\n\n */\n public void makeReadOnly();\n\n\n /**\n * Gets the system symbol table being used by this local table.\n * <p>\n * If {@link #isSystemTable()} then this method returns {@code this}.\n * Otherwise, if {@link #isSharedTable()} then this method returns\n * {@code null}.\n *\n * @return not <code>null</code>, except for non-system shared tables.\n */\n public SymbolTable getSystemSymbolTable();\n\n\n /**\n * Gets the identifier for the Ion version (and thus the system symbol\n * table) used by this table.\n * The version identifier is a string of the form {@code \"$ion_X_Y\"}.\n *\n * @return the version identifier; or {@code null} for non-system shared\n * tables.\n */\n public String getIonVersionId();\n\n\n /**\n * Gets the sequence of shared symbol tables imported by this (local)\n * symbol table. The result does not include a system table.\n * <p>\n * If this local table imported a shared table for which the relevant\n * {@link IonCatalog} has the same name but different version and/or max_id,\n * then that entry will be a substitute table with the\n * correct version and max_id, wrapping the original shared symbol table\n * that was found.\n * <p>\n * If this local table imported a shared table for which the relevant\n * {@link IonCatalog} has no entry with the same name, but the import\n * declaration has a max_id available, then that entry will\n * be a substitute table with max_id undefined symbols.\n *\n * @return {@code null} if this is a shared or system table, otherwise a\n * non-null but potentially zero-length array of shared tables (but no\n * system table).\n */\n public SymbolTable[] getImportedTables();\n\n\n /**\n * Gets the highest symbol id reserved by this table's imports (including\n * system symbols). Any id higher than this value is a local symbol\n * declared by this table. This value is zero for shared symbol tables,\n * since they do not utilize imports.\n */\n public int getImportedMaxId();\n\n\n /**\n * Gets the highest symbol id reserved by this table.\n *\n * @return the largest integer such that {@link #findKnownSymbol(int)} could\n * return a non-<code>null</code> result. Note that there is no promise\n * that it <em>will</em> return a name, only that any larger id will not\n * have a name defined.\n */\n public int getMaxId();\n\n\n /**\n * Adds a new symbol to this table, or finds an existing definition of it.\n * <p>\n * The resulting {@link SymbolToken} has the same String instance that\n * was first interned. In order to reduce memory\n * footprint, callers should generally replace their copy of the text with\n * the string in the result.\n * <p>\n * This method will not necessarily return the same instance given the\n * same input.\n *\n * @param text the symbol text to intern.\n *\n * @return the interned symbol, with both text and SID defined; not null.\n *\n * @throws IonException if this symtab {@link #isReadOnly()} and\n * the text isn't already interned.\n *\n * @see #find(String)\n *\n\n */\n public SymbolToken intern(String text);\n\n\n /**\n * Finds a symbol already interned by this table.\n * <p>\n * This method will not necessarily return the same instance given the\n * same input.\n *\n * @param text the symbol text to find.\n *\n * @return the interned symbol, with both text and SID defined;\n * or {@code null} if it's not already interned.\n *\n * @see #intern(String)\n *\n\n */\n public SymbolToken find(String text);\n\n\n /**\n * Gets the symbol ID associated with a given symbol name.\n *\n * @param name must not be null or empty.\n * @return the id of the requested symbol, or\n * {@link #UNKNOWN_SYMBOL_ID} if it's not defined.\n *\n * @throws NullPointerException if {@code name} is null.\n */\n public int findSymbol(String name);\n\n\n /**\n * Gets the interned text for a symbol ID.\n *\n * @param id the requested symbol ID.\n * @return the interned text associated with the symbol ID,\n * or {@code null} if the text is not known.\n *\n * @throws IllegalArgumentException if {@code id < 1}.\n */\n public String findKnownSymbol(int id);\n\n\n /**\n * Creates an iterator that will return all non-imported symbol names, in\n * order of their symbol IDs. The iterator will return {@code null} where\n * there is an undefined sid.\n * <p>\n * The first string returned by the iterator has a symbol ID that is one\n * more than {@link #getImportedMaxId()}, and the last string has symbol\n * ID equals to {@link #getMaxId()}.\n *\n * @return a new iterator.\n */\n public Iterator<String> iterateDeclaredSymbolNames();\n\n\n /**\n * Writes an Ion representation of this symbol table.\n *\n * @param writer must not be null.\n * @throws IOException if thrown by the writer.\n */\n public void writeTo(IonWriter writer)\n throws IOException;\n}", "public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}", "public HashTable()\n\t{\n\t\tthis(START_TABELLENGROESSE);\n\t}", "TABLE createTABLE();", "public static void initSymbol(String fileName, Parser parser, SymbolTable symbol) {\n\n //add the R0,R1 ...\n for (int i = 0; i < 16; i++) {\n symbol.addEntry(\"R\" + i, i);\n }\n\n //add the save symbols\n symbol.addEntry(\"SCREEN\", 16384);\n symbol.addEntry(\"KBD\", 24576);\n symbol.addEntry(\"SP\", 0);\n symbol.addEntry(\"LCL\", 1);\n symbol.addEntry(\"ARG\", 2);\n symbol.addEntry(\"THIS\", 3);\n symbol.addEntry(\"THAT\", 4);\n\n int counterCommands = 0;\n List<String> symbolToAdd = new ArrayList<String>();\n //add the label command\n while (parser.hasMoreCommands()) {\n parser.advance();\n String type = parser.commandType();\n if (!type.equals(\"L_COMMAND\")) {\n if (symbolToAdd.size() > 0) {\n for (String s : symbolToAdd) {\n symbol.addEntry(s, counterCommands);\n }\n if (symbolToAdd.size() > 0) {\n symbolToAdd.subList(0, symbolToAdd.size()).clear();\n }\n }\n counterCommands++;\n }\n if (type.equals(\"L_COMMAND\")) {\n symbolToAdd.add(parser.symbol());\n }\n }\n\n }", "public SymbolTable(SymbolTable parentST, String id) {\n\t\tthis.scopeName = id;\n this.parentSymbolTable = parentST;\n this.entries = new HashMap<>();\n this.methodEntries = new HashMap<>();\n }", "public Symbol(Hashtable symbols,String name,int value,int type) {\n\tthis.name = name;\n\tthis.value = value;\n\tthis.type = type;\n\tmdefs = new Vector();\n\tif (symbols != null) symbols.put(name,this);\n }", "public void createPairTable() {\r\n //create total Table\r\n pairTable = new HashMap<>();\r\n\r\n //fill with values \r\n Play[] cAce = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cTen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] cNine = {Play.NONE, S, P, P, P, P, P, S, P, P, S, S};\r\n Play[] cEight = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cSeven = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cSix = {Play.NONE, H, P, P, P, P, P, H, H, H, H, H};\r\n Play[] cFive = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] cFour = {Play.NONE, H, H, H, H, P, P, H, H, H, H, H};\r\n Play[] cThree = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cTwo = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n\r\n pairTable.put(1, cAce);\r\n pairTable.put(2, cTwo);\r\n pairTable.put(3, cThree);\r\n pairTable.put(4, cFour);\r\n pairTable.put(5, cFive);\r\n pairTable.put(6, cSix);\r\n pairTable.put(7, cSeven);\r\n pairTable.put(8, cEight);\r\n pairTable.put(9, cNine);\r\n pairTable.put(10, cTen);\r\n pairTable.put(11, cAce);\r\n }", "private DSLGrammarMap buildDummyGrammarMap() {\n DSLGrammarMap grammarMap = new DSLGrammarMap();\n {\n FunctionSymbol f = grammarMap.mkFunctionSymbol(\"f\", \"int\");\n f.addParameter(\"int\", \"x1\");\n }\n {\n FunctionSymbol g = grammarMap.mkFunctionSymbol(\"g\", \"int\");\n g.addParameter(\"int\", \"x1\");\n }\n {\n FunctionSymbol eq = grammarMap.mkFunctionSymbol(\"eq\", \"bool\");\n eq.addParameter(\"Poly\", \"x1\");\n eq.addParameter(\"Poly\", \"x2\");\n }\n return grammarMap;\n }", "protected abstract void initialiseTable();", "public QuantDataHashTable() {\n\t\t\n\t\tquantData = new Hashtable<String, Double>();\n\t\t\n\t}", "public BstTable() {\n\t\tbst = new Empty<Key, Value>();\n\t}", "public void setSymbolTable(HashMap<String, Fraction> table) {\n\n\t\tthis.symbolTable = table;\n\t}", "HashTable() {\n int trueTableSize = nextPrime(tableSize);\n HT = new FlightDetails[nextPrime(trueTableSize)];\n }", "public void makeEmpty() { \r\n for (int i = 0; i < hash_table.length; i++) {\r\n if (hash_table[i] != null) {\r\n hash_table[i] = null;\r\n }\r\n }\r\n size = 0;\r\n }", "public HashTable(int tableSize) {\n\t\ttable = new ArrayList<>(tableSize);\n\t\tcapacity = tableSize;\n\t\tfor (int i = 0; i < tableSize; i++) {\n\t\t\ttable.add(new SequentialSearchSymbolTable<K, V>());\n\t\t}\n\t}", "public static void createTable(SQLiteDatabase db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"STOCK\\\" (\" + //\n \"\\\"_id\\\" INTEGER PRIMARY KEY ,\" + // 0: id\n \"\\\"SYMBOL\\\" TEXT NOT NULL UNIQUE ,\" + // 1: symbol\n \"\\\"NAME\\\" TEXT NOT NULL ,\" + // 2: name\n \"\\\"EPS\\\" REAL,\" + // 3: eps\n \"\\\"YEAR_HIGH\\\" REAL,\" + // 4: yearHigh\n \"\\\"YEAR_LOW\\\" REAL,\" + // 5: yearLow\n \"\\\"OPEN\\\" REAL,\" + // 6: open\n \"\\\"PERCENT_CHANGE\\\" TEXT,\" + // 7: percentChange\n \"\\\"EX_DIVIDEND_DATE\\\" INTEGER,\" + // 8: exDividendDate\n \"\\\"DIVIDEND_PAY_DATE\\\" INTEGER,\" + // 9: dividendPayDate\n \"\\\"DIVIDEND_AVERAGE\\\" REAL);\"); // 10: dividendAverage\n }", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "public TableDeclaration() {\n }", "public static SymbolTable getInstance() { return instance ; }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic HashTable()\r\n\t{\r\n\t\ttable = new HashEntry[SIZES[sizeIdx]];\r\n\t}", "private SymbolData[]\n\t\t\tmakeSymbolMap(Map<StandardSymbolData, JsName> symbolTable) {\n\t\tfinal Set<String> nameUsed = new HashSet<String>();\n\t\tfinal Map<JsName, Integer> nameToFragment = new HashMap<JsName, Integer>();\n\t\tfor (int i = 0; i < jsProgram.getFragmentCount(); i++) {\n\t\t\tfinal Integer fragId = i;\n\t\t\tnew JsVisitor() {\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsForIn x, JsContext ctx) {\n\t\t\t\t\tif (x.getIterVarName() != null) {\n\t\t\t\t\t\tnameUsed.add(x.getIterVarName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsFunction x, JsContext ctx) {\n\t\t\t\t\tif (x.getName() != null) {\n\t\t\t\t\t\tnameToFragment.put(x.getName(), fragId);\n\t\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsLabel x, JsContext ctx) {\n\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsNameOf x, JsContext ctx) {\n\t\t\t\t\tif (x.getName() != null) {\n\t\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsNameRef x, JsContext ctx) {\n\t\t\t\t\t// Obviously this isn't even that accurate. Some of them are\n\t\t\t\t\t// variable names, some of the are property. At least this\n\t\t\t\t\t// this give us a safe approximation. Ideally we need\n\t\t\t\t\t// the code removal passes to remove stuff in the scope\n\t\t\t\t\t// objects.\n\t\t\t\t\tif (x.isResolved()) {\n\t\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsParameter x, JsContext ctx) {\n\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsVars.JsVar x, JsContext ctx) {\n\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t// alcina - add classlits to name/fragment\n\t\t\t\t\tif (x.getName().getIdent().startsWith(\n\t\t\t\t\t\t\t\"com_google_gwt_lang_ClassLiteralHolder_\")) {\n\t\t\t\t\t\tnameToFragment.put(x.getName(), fragId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.accept(jsProgram.getFragmentBlock(i));\n\t\t}\n\t\t// TODO(acleung): This is a temp fix. Once we know this is safe. We\n\t\t// new to rewrite it to avoid extra ArrayList creations.\n\t\t// Or we should just consider serializing it as an ArrayList if\n\t\t// it is that much trouble to determine the true size.\n\t\tList<SymbolData> result = new ArrayList<SymbolData>();\n\t\tfor (Map.Entry<StandardSymbolData, JsName> entry : symbolTable\n\t\t\t\t.entrySet()) {\n\t\t\tStandardSymbolData symbolData = entry.getKey();\n\t\t\tsymbolData.setSymbolName(entry.getValue().getShortIdent());\n\t\t\tInteger fragNum = nameToFragment.get(entry.getValue());\n\t\t\tif (fragNum != null) {\n\t\t\t\tsymbolData.setFragmentNumber(fragNum);\n\t\t\t}\n\t\t\tif (nameUsed.contains(entry.getValue().getIdent())\n\t\t\t\t\t|| entry.getKey().isClass()) {\n\t\t\t\tresult.add(symbolData);\n\t\t\t}\n\t\t}\n\t\treturn result.toArray(new SymbolData[result.size()]);\n\t}", "public SymbolTable getSymbolTable() {\n return this.symbolTable;\n }", "public TempTable() {\r\n\t\t\tsuper();\r\n\t\t\tthis.clauses = new ArrayList<TempTableHeaderCell>();\r\n\t\t}", "public Object clone() {\n\t\tSymbolTable st = new SymbolTable();\n\t\tst.var = (HashMap<String, Variable>) var.clone();\n\t\tst.name = new HashMap<String, NameSSA>();\n\t\tfor (String n : name.keySet()) {\n\t\t\tst.name.put(n, (NameSSA) name.get(n).clone());\n\t\t}\n\t\tst.save = (Stack<HashMap<String, ?>>) save.clone();\n\t\treturn st;\n\t}", "Table createTable();", "Table8 create(Table8 table8);", "public static void createTable() {\n\n // Create statement\n Statement statement = null;\n try {\n statement = Database.getDatabase().getConnection().createStatement();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n // Attempt to create table\n try {\n statement.execute(\n \"CREATE TABLE \" + Constants.SANITATION_TABLE + \"(\" +\n \"requestID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\" +\n \"nodeID VARCHAR(100) References \" + Constants.LOCATION_TABLE + \" (nodeID), \" +\n \"priority VARCHAR(10), \" +\n \"status VARCHAR(100), \" +\n \"description VARCHAR(100), \" +\n \"requesterID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"requestTime TIMESTAMP, \" +\n \"servicerID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"claimedTime TIMESTAMP, \" +\n \"completedTime TIMESTAMP, \" +\n \"CONSTRAINT priority_enum CHECK (priority in ('LOW', 'MEDIUM', 'HIGH')), \" +\n \"CONSTRAINT status_enum CHECK (status in ('INCOMPLETE', 'COMPLETE')))\"\n );\n } catch (SQLException | NullPointerException e) {\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic HashTableMap() {\r\n\t\tK = new LinkedList[10];\r\n\t\tV = new LinkedList[10];\r\n\t}", "private void createTable() {\n\t\tfreqTable = new TableView<>();\n\n\t\tTableColumn<WordFrequency, Integer> column1 = new TableColumn<WordFrequency, Integer>(\"No.\");\n\t\tcolumn1.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"serialNumber\"));\n\n\t\tTableColumn<WordFrequency, String> column2 = new TableColumn<WordFrequency, String>(\"Word\");\n\t\tcolumn2.setCellValueFactory(new PropertyValueFactory<WordFrequency, String>(\"word\"));\n\n\t\tTableColumn<WordFrequency, Integer> column3 = new TableColumn<WordFrequency, Integer>(\"Count\");\n\t\tcolumn3.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"count\"));\n\n\t\tList<TableColumn<WordFrequency, ?>> list = new ArrayList<TableColumn<WordFrequency, ?>>();\n\t\tlist.add(column1);\n\t\tlist.add(column2);\n\t\tlist.add(column3);\n\n\t\tfreqTable.getColumns().addAll(list);\n\t}", "tbls createtbls();", "public HashTable()\n\t{\n\t\tthis(NUM_BUCKETS);\n\t}", "public SymbolTable copy() {\n\t\tSymbolTable st = new SymbolTable();\n\t\tst.var = (HashMap<String, Variable>) var.clone();\n\t\tst.name = new HashMap<String, NameSSA>();\n\t\tfor (String n : name.keySet()) {\n\t\t\tst.name.put(n, (NameSSA) name.get(n).clone());\n\t\t}\n\t\treturn st;\n\t}", "private void createHashtable()\n {\n int numLanguages = languages.length;\n mapping = new Hashtable(numLanguages, 1.0f);\n for (int i = 0; i < numLanguages; i++)\n mapping.put(languages[i], values[i]);\n }", "private static ElfType32.Elf32_Sym parseSymbolTable(byte[] header){\n\t\tElf32_Sym sym = new Elf32_Sym();\n\t\tsym.st_name = Utils.copyBytes(header, 0, 4);\n\t\tsym.st_value = Utils.copyBytes(header, 4, 4);\n\t\tsym.st_size = Utils.copyBytes(header, 8, 4);\n\t\tsym.st_info = header[12];\n\t\t//FIXME 这里有一个问题,就是这个字段读出来的值始终是0\n\t\tsym.st_other = header[13];\n\t\tsym.st_shndx = Utils.copyBytes(header, 14, 2);\n\t\treturn sym;\n\t}", "public MyHashTable( )\r\n\t{\r\n\t\tthis(DEFAULTTABLESIZE);\r\n\t\t\r\n\t\t\t\r\n\t}", "private void initSimpleTable(){\n List<Names> balloonVisibilityList = new ArrayList<Names>();\n balloonVisibilityList.add(Extensions.Names.FEATURE);\n\n List<Names> hList = new ArrayList<Names>();\n hList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> wList = new ArrayList<Names>();\n wList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> xList = new ArrayList<Names>();\n xList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> yList = new ArrayList<Names>();\n yList.add(Extensions.Names.BASIC_LINK);\n\n simpleTable.put(GxConstants.TAG_BALLOON_VISIBILITY, balloonVisibilityList);\n simpleTable.put(GxConstants.TAG_H, hList);\n simpleTable.put(GxConstants.TAG_W, wList);\n simpleTable.put(GxConstants.TAG_X, xList);\n simpleTable.put(GxConstants.TAG_Y, yList);\n }", "@Override\n public void createTable() {\n String[] TABLE_COLUMNS_ATLAS = {\n TableColumn.ChecklistTable.CID + \" INTEGER PRIMARY KEY AUTOINCREMENT\",\n TableColumn.ChecklistTable.PID + \" INTEGER NOT NULL\",\n TableColumn.ChecklistTable.REAL + \" INTEGER DEFAULT 0\",\n TableColumn.ChecklistTable.UNIT_ID + \" INTEGER\",\n TableColumn.ChecklistTable.WAREHOUSE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.QUEUE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.CATEGORIES_ID + \" INTEGER\",\n TableColumn.ChecklistTable.DATE + \" DATE\",\n TableColumn.ChecklistTable.RECORDTIME + \" DATE\",\n TableColumn.ChecklistTable.CONFIRM + \" INTEGER DEFAULT 0\"\n };\n\n //TODO: create table\n database.execSQL(makeSQLCreateTable(TABLE_NAME, TABLE_COLUMNS_ATLAS));\n\n addColumn(TableColumn.ChecklistTable.CONFIRM, \" INTEGER DEFAULT 0\");\n\n //TODO: show table\n XCursor cursor = selectTable();\n printData(TABLE_NAME, cursor);\n cursor.close();\n }", "public HashMap<String, Fraction> getSymbolTable() {\n\n\t\treturn symbolTable;\n\t}", "public SymbolChecking(){\n\t\t\ttop=null;\n\t\t\tlength=0;\n\t\t}", "public SymTable\ngetSymTable();", "public void doCreateTable();", "public HashDictionary (int size) {\r\n\t\tthis.size = size;\r\n\t\ttable = new Node[size];\r\n\t\tfor (int i=0;i<size;i++) {\r\n\t\t\ttable[i]=null;\r\n\t\t}\r\n\t}", "public HashTable() {\n\t\tthis(DEFAULT_TABLE_SIZE);\n\t}", "public SimpleHashtable() {\r\n\t\tthis(DEFAULT_TABLE_SIZE);\r\n\t}", "public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }", "public void createTable(String tableName) {\n db.execSQL(\"create table if not exists '\" + tableName.replaceAll(\"\\\\s\", \"_\") + \"' (\"\n + KEY_ROWID + \" integer primary key autoincrement, \"\n + KEY_QUESTION + \" string not null, \"\n + KEY_ANSWER + \" string not null);\");\n }", "public static Set<Symbol> getSymbols(SymbolTable st) {\n Set<Symbol> ret = new LinkedHashSet<Symbol>();\n if (st == null) {\n return ret;\n }\n for (IDExpression key : getTable(st).keySet()) {\n if (key instanceof Identifier) {\n Symbol symbol = ((Identifier)key).getSymbol();\n if (symbol != null) {\n ret.add(symbol);\n }\n }\n }\n return ret;\n }", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "public void dumpTable() {\n Enumeration elements = table.elements();\n while (elements.hasMoreElements()){\n SymbolTableEntry printEntry = (SymbolTableEntry) elements.nextElement();\n printName(printEntry);\n }\n }", "public HashTable(int size) {\n logicalSize = 0;\n defaultSize = size;\n table = new Handle[size];\n }", "QHT() {\r\n /*\r\n ***TO-DO***\r\n Default constructor\r\n should initialize the hash table with default capacity\r\n */\r\n initCap = 2;\r\n for (int i = 1; i < DEFAULT_EXP; i++) {\r\n initCap *= 2;\r\n }\r\n htable = new KVPair[initCap];\r\n }", "public void clear()\r\n {\r\n // Create the tables stack and add the top level\r\n tables.clear();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts.clear();\r\n counts.add( 0 ); \r\n }", "public void createTable() throws LRException\n\t{\n\t\tgetBackground();\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\t// Create a new (empty) record\n\t\tcreate(new Hashtable(),myData);\n\t\tif (myData.record==null) throw new LRException(DataRMessages.nullRecord(getName()));\n\t\ttry\n\t\t{\n\t\t\tbackground.newTransaction();\n\t\t\tmyData.record.createNewTable(background.getClient(),true);\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "protected SchemaGrammar(SymbolTable symbolTable) {\n fSymbolTable = symbolTable;\n fTargetNamespace = SchemaSymbols.URI_SCHEMAFORSCHEMA;\n \n fGlobalAttrDecls = new SymbolHash(1);\n fGlobalAttrGrpDecls = new SymbolHash(1);\n fGlobalElemDecls = new SymbolHash(1);\n fGlobalGroupDecls = new SymbolHash(1);\n fGlobalNotationDecls = new SymbolHash(1);\n fGlobalIDConstraintDecls = new SymbolHash(1);\n \n SchemaDVFactory schemaFactory = SchemaDVFactory.getInstance();\n fGlobalTypeDecls = schemaFactory.getBuiltInTypes();\n addGlobalTypeDecl(fAnyType);\n \n }", "private void setupTokenHashTable() {\n this.tokenHashTable = new Hashtable<>();\n \t\n /* Identifier Token */\n this.getTokenHashTable().put(1001, \"idTK\");\n this.getTokenHashTable().put(1002, \"integerTK\");\n \t\n /* Operators and Delimiters */\n this.getTokenHashTable().put(1003, \"equalsTK\");\n this.getTokenHashTable().put(1004, \"lessThanTK\");\n this.getTokenHashTable().put(1005, \"greaterThanTK\");\n this.getTokenHashTable().put(1006, \"compareEqualTK\");\n this.getTokenHashTable().put(1007, \"colonTK\");\n this.getTokenHashTable().put(1008, \"plusTK\");\n this.getTokenHashTable().put(1009, \"minusTK\");\n this.getTokenHashTable().put(1010, \"multiplyTK\");\n this.getTokenHashTable().put(1011, \"divideTK\");\n this.getTokenHashTable().put(1012, \"modulusTK\");\n this.getTokenHashTable().put(1013, \"periodTK\");\n this.getTokenHashTable().put(1014, \"leftParenTK\");\n this.getTokenHashTable().put(1015, \"rightParenTK\");\n this.getTokenHashTable().put(1016, \"commaTK\");\n this.getTokenHashTable().put(1017, \"leftBraceTK\");\n this.getTokenHashTable().put(1018, \"rightBraceTK\");\n this.getTokenHashTable().put(1019, \"semicolonTK\");\n this.getTokenHashTable().put(1020, \"leftBracketTK\");\n this.getTokenHashTable().put(1021, \"rightBracketTK\");\n \n /* Extra Tokens */\n this.getTokenHashTable().put(1022, \"EofTK\");\n this.getTokenHashTable().put(-2, \"Invalid Character\");\n this.getTokenHashTable().put(-3, \"Invalid Comment\");\n }", "@Test\n\tpublic void constructorWithSymbolHasTheSymbolWiredCorrectly() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tassertEquals(SYMBOL, unit.getSymbol());\n\t}", "public void insert(SymbolTableEntry newEntry) {\n if (table.containsKey(newEntry.getName())) {\n table.remove(newEntry.getName());\n }\n table.put(newEntry.getName(), newEntry);\n }", "private void createTab() {\n tab = new char[tabSize];\n for (int i = 0; i < tabSize; i++) {\n tab[i] = tabChar;\n }\n }", "public HashTableMap() {\r\n this.capacity = 10; // with default capacity = 10\r\n this.size = 0;\r\n this.array = new LinkedList[capacity];\r\n\r\n }", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "public HashTable(int size) {\n \tnumElements = 0;\n Table = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n \tTable.add(new List<>());\n } \n }", "public Symbol create(char input) {\n if (cacheSymbol.containsKey(input)) {\n return cacheSymbol.get(input);\n } else {\n Symbol symbol = (Symbol) Factory.getInstance().create(TypeData.SYMBOL);\n symbol.setSymbol(input);\n cacheSymbol.put(input, symbol);\n return symbol;\n }\n }", "public static void buildSymTable(CommonTree tree) {\n\t\tListIterator<?> tmp = tree.getChildren().listIterator();\n\t\tArrayList<CommonTree> elements = new ArrayList<CommonTree>();\n\t\twhile (tmp.hasNext())\n\t\t\telements.add((CommonTree) tmp.next()); /* Any type errors found here! */\n\t\tListIterator<CommonTree> iter = elements.listIterator();//= tree.getChildren().listIterator();\n\t\t//end type checking//\n\n\n\t\twhile(iter.hasNext()) {\n\t\t\tCommonTree element = iter.next();//this does go here \n\n\t\t\tif (element.getChildCount() == 2 && element.getText().equalsIgnoreCase(\"DECL\")){\n\t\t\t\tsymTable.insertSymbol(new Symbol(element.getChild(1).getText(),element.getChild(0).getText()));\n\t\t\t\t//System.out.println(\"Left: \" + element.getChild(0).getText());\n\t\t\t\t//System.out.println(\"Right: \" + element.getChild(1).getText());\n\t\t\t}\n\t\t\telse if (element.getChildCount() == 1){\n\t\t\t\t//System.out.println(\"Dest: \" + element.getChild(0).getText());\n\n\t\t\t}\n\t\t\telse if(element.getChildCount() == 0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbuildSymTable(element);\n\t\t\t}\n\t\t}\n\n\t}", "public HashTable(int s){\n\t\tthis.table = new Record[s];\n\t\tthis.contains = 0;\n\t}", "protected void createInitialTables() throws SQLException {\n\t\n\t\t// create one table per type with the corresponding attributes\n\t\tfor (String type: entityType2attributes.keySet()) {\n\t\t\tcreateTableForEntityType(type);\n\t\t}\n\t\t\n\t\t// TODO indexes !\n\t\t\n\t}", "public SymbolTable(File symbolDataFile) throws FileNotFoundException\n {\n symbolPairs = new ArrayIndexList<SymbolPair>();\n Scanner fileScan = new Scanner(symbolDataFile);\n String[] splitLine;\n while (fileScan.hasNextLine())\n {\n /* http://stackoverflow.com/questions/5067942/what-is-the-best-way-to-extract-the-first-word-from-a-string-in-java\n First word = ticker symbol, rest of line = company name\n */\n splitLine = fileScan.nextLine().split(\" \", 2);\n symbolPairs.add(symbolPairs.size(), (new SymbolPair(splitLine[0], splitLine[1].trim())));\n }\n }", "private AlarmDeviceTable() {}", "public MyHashTable() {\n\t\tthis(DefaultCapacity);\n\t}", "public void createNewTable() {\n String dropOld = \"DROP TABLE IF EXISTS card;\";\n\n // SQL statement for creating a new table\n String sql = \"CREATE TABLE IF NOT EXISTS card (\\n\"\n + \"id INTEGER PRIMARY KEY AUTOINCREMENT, \\n\"\n + \"number TEXT, \\n\"\n + \"pin TEXT,\\n\"\n + \"balance INTEGER DEFAULT 0\"\n + \");\";\n\n try (Connection connection = connect();\n Statement stmt = connection.createStatement()) {\n\n //drop old table\n stmt.execute(dropOld);\n\n //create a new table\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(\"Exception3: \" + e.getMessage());\n }\n }", "public void clearHashTable()\n {\n int index;\n\n for(index = 0; index < tableSize; index++)\n {\n tableArray[index] = null;\n }\n }", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "public HashTableChained() {\n sizeBucket = 101;\n defTable = new DList[sizeBucket];\n for(int i=0; i<sizeBucket; i++) {\n defTable[i] = new DList();\n }\n size = 0;\n }", "public TableImpl() { columns = new Column[0]; }" ]
[ "0.7534974", "0.7378576", "0.7349397", "0.7125747", "0.711972", "0.7035065", "0.6941032", "0.6908145", "0.6906442", "0.6632646", "0.6598488", "0.6502878", "0.64865816", "0.6446378", "0.6437982", "0.63778937", "0.6359636", "0.6333439", "0.63098526", "0.62637395", "0.61741334", "0.61598945", "0.610544", "0.6091917", "0.60842717", "0.608232", "0.6065396", "0.60338175", "0.60245365", "0.6005514", "0.5948768", "0.58852464", "0.5871992", "0.5861466", "0.58537537", "0.58426887", "0.58255434", "0.58143103", "0.58142376", "0.5814013", "0.5813743", "0.5782994", "0.5772619", "0.5759797", "0.5757919", "0.5735735", "0.57179147", "0.5659314", "0.5641913", "0.56348795", "0.5615413", "0.5592716", "0.55840415", "0.5576286", "0.5570279", "0.55647135", "0.555809", "0.55550176", "0.5553817", "0.55526066", "0.5508374", "0.5499639", "0.5492529", "0.54661345", "0.5438121", "0.5432468", "0.5430789", "0.5427638", "0.54243076", "0.54234695", "0.54186046", "0.54175615", "0.54151094", "0.5407299", "0.540714", "0.5401892", "0.53986335", "0.53955287", "0.53936774", "0.5377078", "0.5371081", "0.5370459", "0.5368941", "0.53670216", "0.53647625", "0.5358111", "0.5358065", "0.5357615", "0.53370935", "0.5317839", "0.53167146", "0.5314216", "0.5314061", "0.53114593", "0.5297447", "0.5286756", "0.5284334", "0.52779925", "0.5269561", "0.5269396" ]
0.67375517
9
create identifier with name, type and kind. Gives it a scope
public void Define(String name, String type, String kind) { int i = -1; Values tmp = null; if(kind.equals(STATIC) || kind.equals(FIELD)) { switch(kind) { case STATIC: i = classStaticIdx++; break; case FIELD: i = classFieldIdx++; break; } tmp = classScope.put(name, new Values(type, kind, i)); if(tmp != null) { System.out.println("Multiple declarations of class identifier: " + name); System.exit(1); } } else if(kind.equals(ARG) || kind.equals(VAR)) { switch(kind) { case ARG: i = subArgIdx++; break; case VAR: i = subVarIdx++; break; } tmp = subScope.put(name, new Values(type, kind, i)); if(tmp != null) { System.out.println("Multiple declarations of subroutine identifier: " + name); System.exit(1); } } else throw new IllegalArgumentException("Identifier '" + name + "' has an invalid 'kind': " + kind); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IdentifierType createIdentifierType();", "IdentifiersType createIdentifiersType();", "private static ExpressionTree createQualIdent(WorkingCopy workingCopy, String typeName) {\n TypeElement typeElement = workingCopy.getElements().getTypeElement(typeName);\n if (typeElement == null) {\n typeElement = workingCopy.getElements().getTypeElement(\"java.lang.\" + typeName);\n if (typeElement == null) {\n return workingCopy.getTreeMaker().Identifier(typeName);\n }\n }\n return workingCopy.getTreeMaker().QualIdent(typeElement);\n }", "String getIdentifierName(String name, String type);", "IdentifierReferenceQualifier createIdentifierReferenceQualifier();", "WithCreate withKind(String kind);", "private Identifier(Scope scope, Type type, String name, String value){\n if(scope == null || type == null || name == null || value == null){\n throw new IllegalStateException(\"Cannot assign nullvalue\");\n }\n this.scope = scope;\n this.type = type;\n this.name = name;\n this.value = value;\n }", "Scope createScope();", "private IIdentifierElement createIdentifier() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(ICarrierSet.ELEMENT_TYPE, null, null);\n\t}", "org.hl7.fhir.Identifier addNewIdentifier();", "public Obj(ObjKind kind, String name, Type type) {\n this.kind = kind;\n this.name = name;\n this.type = type;\n\n\n\n if(kind==ObjKind.PROC||kind==ObjKind.TYPE){\n localScope=new Scope();\n nPars=0;\n }\n }", "Identifier getId();", "interface WithKind {\n /**\n * Specifies the kind property: The Kind of the resource..\n *\n * @param kind The Kind of the resource.\n * @return the next definition stage.\n */\n WithCreate withKind(String kind);\n }", "void createRelationshipTypeToken( int id, String name );", "public void newScope() {\n Map<String, Type> scope = new HashMap<String, Type>();\n scopes.push(scope);\n Map<String, Type> typeScope = new HashMap<String, Type>();\n typeScopes.push(typeScope);\n }", "Resource create(Session session, IRI identifier, IRI type);", "java.lang.String getIdentifier();", "ConceptType createConceptType();", "I getIdentifier();", "NamedType createNamedType();", "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 }", "static Identifier makeTypeCons(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CONSTRUCTOR, name);\r\n }\r\n }", "private TypeDb createTypeInstance(long id, String nameEn) {\n TypeDb typeDb = new TypeDb();\n typeDb.setId(id);\n typeDb.setTypeNameEn(nameEn);\n typeDb.setTypeNameRu(new TypeMapper().toRu(nameEn));\n return typeDb;\n }", "void addId(II identifier);", "static String makeKey(String id,\n String for_,\n String attrname,\n String attrtype) {\n return format(KEY_FMT, id, for_, attrname, attrtype);\n }", "void createKeyword(String name);", "public void registerScope(OntologyScope scope);", "public SymName(String n) {\n\tn = n.trim();\n\tfullName = n;\n\tcomp = Util.findComponents(n);\n\tnum_comp = comp.length;\n\ttype = new int[num_comp];\n }", "public Command createLabelCommand(String identifier, int type, Qualifier qualifier);", "public IdentifierType(String name, String description)\r\n\t{\r\n\t\tsetName(name);\r\n\t\tsetDescription(description);\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public static String assignIdentifier(PatientIdentifierType type) {\t\t\r\n\t\ttry {\r\n\t\t\tClass identifierSourceServiceClass = Context.loadClass(\"org.openmrs.module.idgen.service.IdentifierSourceService\");\r\n\t\t\tObject idgen = Context.getService(identifierSourceServiceClass);\r\n\t Method generateIdentifier = identifierSourceServiceClass.getMethod(\"generateIdentifier\", PatientIdentifierType.class, String.class);\r\n\t \r\n\t // note that generate identifier returns null if this identifier type is not set to be auto-generated\r\n\t return (String) generateIdentifier.invoke(idgen, type, \"auto-assigned during patient creation\");\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlog.error(\"Unable to access IdentifierSourceService for automatic id generation. Is the Idgen module installed and up-to-date?\", e);\r\n\t\t} \r\n\t\t\r\n\t\treturn null;\r\n\t}", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "private void encodeNameIdAttributes(Encoder encoder, DataType type) throws IOException {\n\t\tif (type instanceof BuiltIn) {\n\t\t\tencoder.writeString(ATTRIB_NAME,\n\t\t\t\t((BuiltIn) type).getDecompilerDisplayName(displayLanguage));\n\t\t}\n\t\telse {\n\t\t\tencoder.writeString(ATTRIB_NAME, type.getName());\n\t\t\tlong id = progDataTypes.getID(type);\n\t\t\tif (id > 0) {\n\t\t\t\tencoder.writeUnsignedInteger(ATTRIB_ID, id);\n\t\t\t}\n\t\t}\n\t}", "VariableDeclaration createVariableDeclaration();", "public T getIdentifier();", "ConceptsType createConceptsType();", "Rule STIdentifier() {\n // Push 1 IdentifierNode onto value stack\n return Sequence(\n Sequence(\n FirstOf(Letter(), \"_\"),\n ZeroOrMore(FirstOf(IndentChar(), \"-\"))),\n actions.pushIdentifierNode(),\n WhiteSpace());\n }", "public String getIdentifierString();", "public Object visitIdent(GoIRIdentNode node){\n\t\tTypeInfo m = lexicalscope.get(node.getIdentifier());\n\t\tif(m != null) {\n\t\t\treturn m.getType();\n\t\t}\n\t\treturn \"\";\n\t}", "TrustedIdProvider create();", "private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }", "IdentifiersFactory getIdentifiersFactory();", "WithCreate withIdProvider(String idProvider);", "public ConstellationIdentifier identifier();", "public IdentifierDt addIdentifier() {\n\t\tIdentifierDt newType = new IdentifierDt();\n\t\tgetIdentifier().add(newType);\n\t\treturn newType; \n\t}", "int getIdentifier();", "public LlvmValue visit(IdentifierType n){\n\t\tSystem.out.format(\"identifiertype*******\\n\");\n\t\t\n\t\t//%class.name\n\t\tStringBuilder name = new StringBuilder();\n\t\t\n\t\tname.append(n.name);\n\t\t\n\t\t//System.out.format(\"name: %s\\n\",name.toString());\n\t\t\n\t\t//Cria classType -> %class.name\n\t\tLlvmClassInfo classType = new LlvmClassInfo(name.toString());\t\n\n\t\treturn classType;\n\t}", "ParameterIdentification createParameterIdentification();", "String typeName();", "public String createKey(String type) {\n int i = 0;\n for(i=0; i<EnumFactory.numberOfTypes; i++) {\n if (type.equals(EnumFactory.typeStrings[i])) {\n break;\n }\n }\n countKeys[i]++;\n String key = String.format(\"%s$%d\", EnumFactory.typeStrings[i],countKeys[i]);\n return key;\n }", "DataNameReference createDataNameReference();", "void createLabelToken( String name, int id );", "private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }", "UniqueType createUniqueType();", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "protected abstract String getIdentifier();", "VarDecl createVarDecl();", "public int identifier();", "Variable createVariable();", "Variable createVariable();", "public String getIdentifier();", "public String getIdentifier();", "public int getIdentifier();", "GroupIdentifierType getType();", "RecordType newRecordType(String recordTypeId, QName name) throws TypeException;", "private static Scope buildScope() {\n return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE, Scope.R_EMAILADDRESS);\n }", "public interface ID_TYPE {\r\n public static final int OWNER = 1;\r\n public static final int ATTENDANT = 2;\r\n public static final int DRIVER = 3;\r\n }", "EReference createEReference();", "@NonNull String identifier();", "public Definition(String declaredName, PhotranTokenRef tokenRef, Classification classification, Visibility visibility, Type type)\n {\n this.classification = classification;\n \tthis.tokenRef = tokenRef;\n \tthis.declaredName = declaredName;\n \tthis.canonicalizedName = canonicalize(declaredName);\n this.visibility = visibility; //Visibility.INHERIT_FROM_SCOPE;\n this.type = type;\n this.arraySpec = null;\n }", "public static NameID getNewName(String name, Traversable tr) {\n SymbolTable symtab = IRTools.getAncestorOfType(tr, SymbolTable.class);\n String header = (name == null) ? \"temp\" : name;\n NameID ret = new NameID(header);\n int suffix = 0;\n while (findSymbol(symtab, ret) != null) {\n ret = new NameID(header + (suffix++));\n }\n return ret;\n }", "public void outAIdExp(AIdExp node) throws TypeException{\n TId id = node.getId();\n java.lang.String name = id.getText();\n Type t = lookUpVarType(name, golite.weeder.LineNumber.getLineNumber(node));\n typemap.put(node,t);\n\t/*\n\t if(t==null) throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(node) + \"] Identifier \" + name + \" used that cannot be found in symbol table.\");\n\t else typemap.put(node,t);\n\t*/\n }", "public void makeName(String str) {\n this.name = str + iL++;\n }", "public SelectionScopeBase(String scopeName)\n {\n\tthis.scopeName = scopeName;\n }", "String kind();", "String kind();", "public String getNamedId();", "SecurityScope createSecurityScope();", "QuoteType createQuoteType();", "public au.gov.asic.types.DocumentIdentifierType addNewAsicIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.DocumentIdentifierType target = null;\n target = (au.gov.asic.types.DocumentIdentifierType)get_store().add_element_user(ASICIDENTIFIER$0);\n return target;\n }\n }", "TrustedIdProvider create(Context context);", "CodeType createCodeType();", "public String asIdentifier() {\n\t\treturn this.keyword.toLowerCase().replace(' ', '_').replace('.', '_');\n\t}", "public short createAttribute(AttributeType type, String name, boolean indexed, EnumSet<AttributeFlags> flags) {\n short id = nextAttributeId++;\n attributes.add(new ResidentAttributeRecord(type, name, id, indexed, flags));\n Collections.sort(attributes);\n return id;\n }", "TypeDecl createTypeDecl();", "AlphabetNameReference createAlphabetNameReference();", "public interface Identifier {\n\n public String getIdentifier();\n\n}", "TIAssignment createTIAssignment();", "org.hl7.fhir.CodeableConcept addNewName();", "GetRecordByIdType createGetRecordByIdType();", "public void setIdentifier(FactIdentifier param) {\r\n localIdentifierTracker = true;\r\n\r\n this.localIdentifier = param;\r\n\r\n\r\n }", "public ImagingStudy addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {\n\t\tif (myIdentifier == null) {\n\t\t\tmyIdentifier = new java.util.ArrayList<IdentifierDt>();\n\t\t}\n\t\tmyIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));\n\t\treturn this; \n\t}", "Type createType();", "Type createType();" ]
[ "0.73043776", "0.685808", "0.6686718", "0.63949937", "0.6252675", "0.6232631", "0.6209589", "0.6178322", "0.61430347", "0.59493136", "0.5930297", "0.57385355", "0.5736476", "0.5701347", "0.56145495", "0.5597537", "0.5592815", "0.5582504", "0.5568833", "0.5551583", "0.55363834", "0.55284566", "0.54865515", "0.544464", "0.54317445", "0.54217273", "0.54112065", "0.5408053", "0.5382983", "0.53789", "0.53719246", "0.5344855", "0.5344855", "0.5344855", "0.5344855", "0.5344855", "0.5344855", "0.5344855", "0.5344597", "0.5330092", "0.53208554", "0.5312555", "0.5303347", "0.5301574", "0.529181", "0.5275286", "0.52699435", "0.5250808", "0.5243891", "0.5241701", "0.52409446", "0.5237769", "0.52281946", "0.520038", "0.5200197", "0.5197497", "0.516701", "0.5166673", "0.51569355", "0.51344687", "0.51307887", "0.5122335", "0.51211363", "0.5101632", "0.50931096", "0.50931096", "0.5083736", "0.5083736", "0.50820214", "0.50774336", "0.50762385", "0.50746447", "0.50731736", "0.50645787", "0.5054675", "0.50381213", "0.50326365", "0.50274044", "0.502263", "0.50194913", "0.5013057", "0.5013057", "0.50124985", "0.50102973", "0.5008216", "0.5005668", "0.5005595", "0.50054866", "0.49988917", "0.49953216", "0.49904147", "0.49883", "0.498594", "0.49848506", "0.49826083", "0.49731308", "0.49705935", "0.49697298", "0.4968654", "0.4968654" ]
0.6114365
9
return number of variables in the given kind
public int VarCount(String kind) { int count = 0; Hashtable<String, Values> tmpScope = null; Enumeration<String> e; if(kind.equals(SymbolTable.VAR) || kind.equals(SymbolTable.ARG)) tmpScope = subScope; else if(kind.equals(SymbolTable.FIELD) || kind.equals(SymbolTable.STATIC)) tmpScope = classScope; else { System.out.println("Expected static, field, argument, or variable kind."); System.exit(1); } e = tmpScope.keys(); while(e.hasMoreElements()) { String key = e.nextElement(); if(tmpScope.get(key) != null && tmpScope.get(key).getKind().equals(kind)) count++; } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVarsCount();", "public abstract int nVars();", "public int get_var_count()\r\n {\r\n\r\n int retVal = get_var_count_0(nativeObj);\r\n\r\n return retVal;\r\n }", "private int num_class_vars(ClassInfo cinfo) {\n\n RootInfo class_root = RootInfo.getClassPpt(cinfo, Runtime.nesting_depth);\n assert class_root.children.size() == 1;\n DaikonVariableInfo static_root = class_root.children.get(0);\n return static_root.children.size();\n }", "public int getNumVars()\n {\n \treturn numVars;\n }", "int countTypedParameters();", "public abstract void tellNumVars(int numVars);", "int realnVars();", "public int getTotalVariables() ;", "int numberOfDimensions();", "int getDimensionsCount();", "int countTypedFeatures();", "private int getVariablesNumberInMap() {\n\t\tSet<String> variables = KeyValue.getFirstLevelKeys();\n\t\tint count = 0;\n\t\tfor (String name : variables) {\n\t\t\tif (!name.contains(\"~\")) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int getNrOfVariables(){\n\t\treturn sqlVariables.length;\n\t}", "int dimensionality();", "public Integer getVarTrPatternCount( String var ) ;", "public int getNbVar() {\n return nbVar;\n }", "public int GetVariableTypes(String plotName)\n {\n Hashtable namestovar = new Hashtable();\n namestovar.put(\"Boundary\", new Integer(MATERIAL));\n namestovar.put(\"Contour\", new Integer(SCALAR | SPECIES));\n namestovar.put(\"Curve\", new Integer(CURVE));\n namestovar.put(\"FilledBoundary\", new Integer(MATERIAL));\n namestovar.put(\"Histogram\", new Integer(SCALAR | ARRAY));\n namestovar.put(\"Kerbel\", new Integer(MESH));\n namestovar.put(\"Label\", new Integer(MESH | SCALAR | VECTOR | MATERIAL | SUBSET | TENSOR | SYMMETRICTENSOR | LABEL | ARRAY));\n namestovar.put(\"Mesh\", new Integer(MESH));\n namestovar.put(\"Molecule\", new Integer(SCALAR));\n namestovar.put(\"MultiCurve\", new Integer(CURVE));\n namestovar.put(\"ParallelCoordinates\", new Integer(0)); //SCALAR | ARRAY));\n namestovar.put(\"Poincare\", new Integer(VECTOR));\n namestovar.put(\"Pseudocolor\", new Integer(SCALAR | SPECIES));\n namestovar.put(\"Scatter\", new Integer(SCALAR));\n namestovar.put(\"Spreadsheet\", new Integer(SCALAR));\n namestovar.put(\"Subset\", new Integer(SUBSET | MESH));\n namestovar.put(\"Surface\", new Integer(SCALAR | SPECIES));\n namestovar.put(\"Tensor\", new Integer(TENSOR | SYMMETRICTENSOR));\n namestovar.put(\"Topology\", new Integer(SCALAR));\n namestovar.put(\"Truecolor\", new Integer(VECTOR));\n namestovar.put(\"Vector\", new Integer(VECTOR));\n namestovar.put(\"Volume\", new Integer(SCALAR | SPECIES));\n namestovar.put(\"WellBore\", new Integer(MESH));\n\n return ((Integer)namestovar.get(plotName)).intValue();\n }", "public static int numTypes(){\n byte[] types = genAllTypes();\n return types.length;\n }", "public int typeSize() {\n if (isUnknown() || isPolymorphic())\n return 0;\n int c = 0;\n if (!isNotBool())\n c++;\n if (!isNotStr())\n c++;\n if (!isNotNum())\n c++;\n if (object_labels != null) {\n boolean is_function = false;\n boolean is_array = false;\n boolean is_native = false;\n boolean is_dom = false;\n boolean is_other = false;\n for (ObjectLabel objlabel : object_labels) {\n if (objlabel.getKind() == Kind.FUNCTION)\n is_function = true;\n else if (objlabel.getKind() == Kind.ARRAY)\n is_array = true;\n else if (objlabel.isHostObject()) {\n switch (objlabel.getHostObject().getAPI().getShortName()) {\n case \"native\":\n is_native = true;\n break;\n case \"dom\":\n is_dom = true;\n break;\n default:\n is_other = true;\n }\n } else\n is_other = true;\n }\n if (is_function)\n c++;\n if (is_array)\n c++;\n if (is_native)\n c++;\n if (is_dom)\n c++;\n if (is_other)\n c++;\n }\n if (getters != null)\n c++;\n if (setters != null)\n c++;\n if (c == 0 && (isMaybeNull() || isMaybeUndef())) {\n c = 1;\n }\n return c;\n }", "@Override\n\tpublic int size()\n\t{\n\t\tint count = 0;\n\t\tfor (Variable var : FactorGraphIterables.variables(rootGraph()))\n\t\t{\n\t\t\tif (var.getPrior() != null)\n\t\t\t{\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "int getNumSampleDimensions();", "private int getVariablesNumberInTree() {\n\t\tList<Node> l = getFirstLevelSubnodes();\n\n\t\treturn l != null ? l.size() : 0;\n\t}", "private void countParams() {\n if( paramCount >= 0 ) {\n return;\n }\n Iterator<AnyType> parser = name.getSignature( types );\n paramCount = needThisParameter ? 1 : 0;\n while( parser.next() != null ) {\n paramCount++;\n }\n valueType = parser.next();\n while( parser.hasNext() ) {\n valueType = parser.next();\n paramCount--;\n }\n }", "int getNumParameters();", "int sizeOfGeneralNameArray();", "int getParametersCount();", "int getParametersCount();", "public void setTotalVariables( int totalVars ) ;", "int getValuesCount();", "int getFieldCount();", "public int size(){\n\t\treturn types.size();\n\t}", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "long countByExample(IymDefAssignmentExample example);", "int getParameterCount();", "public static int vars(int varCount, Node n) {\n for (int i = 0; i < n.tokens.size(); i++) {\n if (n.tokens.get(i).tokenID == Token.TokenID.IDENT_tk) {\n if (varCount > 0) {\n int k = find(n.tokens.get(i).instanc);\n if (k == -1) {\n //do nothing\n } else {\n support.error(\"This variable has already been defined: \" + n.tokens.get(i).instanc);\n }\n }\n push(n.tokens.get(i));\n varCount++;\n }\n\n }\n if (n.child1 != null) {\n varCount = +vars(varCount, n.child1);\n }\n\n return varCount;\n }", "public int getNumberOfMemberVariables() {\n return members.size();\n }", "int sizeOfObjectDefinitionArray();", "public int get_nactive_vars()\n {\n \n int retVal = get_nactive_vars_0(nativeObj);\n \n return retVal;\n }", "int cardinality();", "public int getFieldCount(String fieldName);", "int nParametricStates();", "public static int getFieldsCount(Class clazz){\n\t\treturn clazz.getDeclaredFields().length;\n\t}", "public long getNumDefinedData();", "public int getParameterCount();", "public final int dimension() { return _N; }", "int getParamsCount();", "int getConstraintsCount();", "public java.lang.Short getVariableType() {\r\n return variableType;\r\n }", "private int numVarRefExprs(AssignOperator aOp) {\n List<Mutable<ILogicalExpression>> exprs = aOp.getExpressions();\n int count = 0;\n for (Mutable<ILogicalExpression> exp : exprs) {\n if (exp.getValue().getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {\n AbstractFunctionCallExpression afcExpr = (AbstractFunctionCallExpression) exp.getValue();\n for (Mutable<ILogicalExpression> arg : afcExpr.getArguments()) {\n if (arg.getValue().getExpressionTag() == LogicalExpressionTag.VARIABLE) {\n count++;\n }\n }\n }\n }\n\n return count;\n }", "static int varno(String v) {\n int i=0;\n if (varlist==null) {System.out.println(\"Varlist null\");}\n while (i<varlist.size() && !v.equals( ((Variable)(varlist.get(i))).ident)) {i++;}\n if (i==varlist.size()) {i=-1;}\n return i;\n }", "public int countByType(long typeId);", "public static int numElements_data(int dimension) {\n int array_dims[] = { 60, };\n if (dimension < 0 || dimension >= 1) throw new ArrayIndexOutOfBoundsException();\n if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n return array_dims[dimension];\n }", "int sizeOfClassificationArray();", "public int getSize() throws Exception {\n int size = 0;\n java.util.Vector fieldVector = getFieldVector();\n for (int i = 0; i < fieldVector.size(); i++) {\n Field field = (Field) (fieldVector.elementAt(i));\n Class type = field.getType();\n if (type == Byte.TYPE) {\n size += 1;\n }\n else if (type == Short.TYPE) {\n size += 2;\n }\n else if (type == Integer.TYPE) {\n size += 4;\n }\n else if (type == Long.TYPE) {\n size += 8;\n }\n else if (type == Double.TYPE) {\n size += 8;\n }\n else if (type.getName().equals(\"[B\")) {\n size += ( (byte[]) (field.get(this))).length;\n }\n }\n return size;\n }", "public long getAllLiteralCount();", "public int dimensionCount() {\n\t\treturn point.length;\n\t}", "@Override\n\tpublic int getVariableSize()\n\t{\n\t\treturn con.getVariableSize() - 1;\n\t}", "int sizeOfFeatureArray();", "int sizeOfFeatureArray();", "int sizeOfTrafficVolumeArray();", "public int h(Variable n)\n {\n int h = n.getDomain().size();\n return h;\n }", "@Override\n public int variableSize() {\n return CONSTANT.wordSize;\n }", "public java.lang.Short getVarRepNumberOfReplacement() {\r\n return varRepNumberOfReplacement;\r\n }", "private static PrimitiveType getTypeForCounts(int planeCnt, int sphereConvexCnt,\n\t\t\tint sphereConcaveCnt, int coneConvexCnt, int coneConcaveCnt) {\n\t\tint max = Math.max(\n\t\t\t\tplaneCnt,\n\t\t\t\tMath.max(sphereConvexCnt,\n\t\t\t\t\t\tMath.max(sphereConcaveCnt, Math.max(coneConvexCnt, coneConcaveCnt))));\n\n\t\tif (max == planeCnt) {\n\t\t\treturn PrimitiveType.PLANE;\n\t\t} else if (max == sphereConvexCnt) {\n\t\t\treturn PrimitiveType.SPHERE_CONVEX;\n\t\t} else if (max == sphereConcaveCnt) {\n\t\t\treturn PrimitiveType.SPHERE_CONCAVE;\n\t\t} else if (max == coneConvexCnt) {\n\t\t\treturn PrimitiveType.CONE_CONVEX;\n\t\t} else\n\t\t\treturn PrimitiveType.CONE_CONCAVE;\n\t}", "int getConceptLanguagesCount();", "int getFieldsCount();", "int getFieldsCount();", "public static int numElements_infos_metadata(int dimension) {\n int array_dims[] = { 2, };\n if (dimension < 0 || dimension >= 1) throw new ArrayIndexOutOfBoundsException();\n if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n return array_dims[dimension];\n }", "public int getConstantCount() {\r\n return EnthalpyVapour.CONSTANT_COUNT;\r\n }", "private int sizeForType(int type) {\n return sizeForTypeHistorical(type);\n\n }", "public int getNumIndependentParameters();", "public int getNumOfClasses();", "public static int getDimensions (Object o)\n\t{\n\t\tint dimensions = 0;\n\t\t\n\t\tfor (Class c = o.getClass(); c.isArray(); c = c.getComponentType())\n\t\t{\n\t\t\tdimensions++;\n\t\t}\n\t\t\n\t\treturn dimensions;\n\t}", "public int nbParameters() {\n\treturn getParameters().size();\n }", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "public abstract void setVarCount(int varCount);", "public static int numDimensions_data() {\n return 1;\n }", "public int getNumFields()\n {\n return getFieldTypMap().size();\n }", "int sizeOfPlanFeatureArray();", "public int size (){\n return N;\n }", "int sizeOfGuideArray();", "public int getViewTypeCount() {\n \t\tint total = 1;\n \t\tfor(Adapter adapter : this.sections.values())\n \t\t\ttotal += adapter.getViewTypeCount();\n \t\treturn total;\n \t}", "int getMetricDescriptorsCount();", "public int nrOfExpressions();", "public int size() {\n\t\treturn nvPairs.size() >> 1;\n\t}", "public int numFeatures() {\n return FTypes.values().length;\n }", "int getInputsCount();", "int getInputsCount();", "int getInputsCount();", "int countFeatures();", "int countFeatures();", "int getStateValuesCount();", "IntegerLiteral getSize();", "int getDetectionRulesCount();", "public int noOfSides();", "int getMetaInformationCount();", "int getMetaInformationCount();", "int getMetaInformationCount();", "int getMetaInformationCount();" ]
[ "0.7069962", "0.69664973", "0.6689787", "0.64129305", "0.63766515", "0.6196396", "0.61681813", "0.6076217", "0.5841842", "0.5819644", "0.5746088", "0.57112074", "0.5710455", "0.5695296", "0.5687991", "0.5640369", "0.56362665", "0.5630404", "0.56136733", "0.55746233", "0.55704373", "0.5536254", "0.5533659", "0.54890454", "0.54794186", "0.53675216", "0.5359372", "0.5359372", "0.5321935", "0.53211325", "0.5309767", "0.52823967", "0.5251799", "0.5238832", "0.5236827", "0.5234952", "0.52321845", "0.52269775", "0.5205908", "0.52005863", "0.5198357", "0.5194194", "0.519281", "0.5182533", "0.51802", "0.51786685", "0.5169748", "0.5166554", "0.51653516", "0.51600635", "0.515748", "0.51505476", "0.5143107", "0.51405334", "0.512148", "0.51109195", "0.50956315", "0.5094064", "0.5091493", "0.5091493", "0.50657153", "0.506171", "0.50582033", "0.50532013", "0.5047959", "0.5038502", "0.5031069", "0.5031069", "0.5023864", "0.50213856", "0.5007932", "0.50034726", "0.50005585", "0.4988386", "0.4973613", "0.49713007", "0.4966144", "0.4964054", "0.49623486", "0.49594593", "0.49546555", "0.49538073", "0.49517894", "0.4945911", "0.49393362", "0.49378762", "0.49313903", "0.492886", "0.492886", "0.492886", "0.49279878", "0.49279878", "0.49259007", "0.49243662", "0.49174392", "0.4915982", "0.4915153", "0.4915153", "0.4915153", "0.4915153" ]
0.84611946
0
returns index of identifier
public int IndexOf(String name) { Values tmp = currScope.get(name); if(tmp != null) return tmp.getIndex(); if(currScope != classScope) { tmp = classScope.get(name); if(tmp != null) return tmp.getIndex(); } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "public int nextIndexOf(String identifier){\n Token token;\n int tempCurrentToken = currentToken, result;\n \n nextTokenOf(identifier);\n result = currentToken;\n currentToken = tempCurrentToken;\n return result;\n }", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "public int getIndex();", "public int getIndex();", "public int getIndex();", "int getIdentifier();", "public int getIndexNumber(){\n return id;\r\n }", "public int getIdentifier();", "public int identifier();", "short getKeyIx();", "public int index();", "public int checkIndex(String identifier) {\n\t\tint aimedIndex = -1;\n\t\tfor(Train train: trainlist){\n\t\t\tif(train.toString().equals(identifier))\n\t\t\t\taimedIndex = trainlist.indexOf(train);\n\t\t}\n\t\treturn aimedIndex;\t\n\t}", "public int nameIndex();", "int index();", "public abstract int getIndex();", "private int getIndexById(String id) {\n Base element;\n int i = 0;\n int result = -1;\n try {\n element = this.simpleArray.get(i);\n while (element != null) {\n if (id.equals(element.getId())) {\n result = i;\n break;\n }\n element = this.simpleArray.get(++i);\n }\n } catch (ArrayIndexOutOfBoundsException e) {\n e.printStackTrace();\n }\n return result;\n }", "private int getIndex(String id) {\n for (int i = 0; i < this.container.size(); i++) {\n if (id.equals(this.container.get(i).getId())) {\n return i;\n }\n }\n return -1;\n }", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "Index getIndex(String symbol);", "public int getIndex()\n {\n return getInt(\"Index\");\n }", "private int getArrayIndex() {\n\t\tswitch (getId()) {\n\t\tcase 3493:\n\t\t\treturn Recipe_For_Disaster.AGRITH_NA_NA_INDEX;\n\t\tcase 3494:\n\t\t\treturn Recipe_For_Disaster.FLAMBEED_INDEX;\n\t\tcase 3495:\n\t\t\treturn Recipe_For_Disaster.KARAMEL_INDEX;\n\t\tcase 3496:\n\t\t\treturn Recipe_For_Disaster.DESSOURT_INDEX;\n\t\t}\n\t\treturn -1;\n\t}", "public abstract long getIndex();", "public int getIndex(\n )\n {return index;}", "Expression getIndexExpr();", "public int getIndex() {\n \t\treturn index;\n \t}", "public int getIndex(){\r\n \treturn index;\r\n }", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public final int getIndex(){\n return index_;\n }", "public int getIndex()\n {\n return index;\n }", "int getIndex() {\n\t\treturn index;\n\t}", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "private int correspondingIndex(ObjectID oid, ObjectID[] id_seq_at_replica)\r\n\t{\n\t\tint iadj;\r\n\t\tfor (iadj = 0; iadj < id_seq_at_replica.length; iadj++)\r\n\t\t\tif (oid.equals(id_seq_at_replica[iadj])) break;\r\n\t\treturn correspondingIndex(oid, id_seq_at_replica, iadj++);\r\n\t}", "public abstract int indexFor(Object obj);", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public int getIndex() {\r\n return ordinal();\r\n }", "public int getIndex() {\r\n\t\treturn index;\r\n\t}", "int index(){\n\n\t\t\n\t\tif (cursor == null) \n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn index;\n\t}", "public int getIndex() {\n return index;\n }", "public int getIndex()\n {\n return index;\n }", "@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }", "public int getIndex()\n/* */ {\n/* 46 */ return this.index;\n/* */ }", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public String getIdentifier() {\n\t\treturn config.getUIName()+\"[\"+getIndex()+\"]\";\n\t}", "I getIdentifier();", "public int getIndex(int position);", "int getIndex(){\r\n\t\treturn index;\r\n\t}", "public static int getIndex(String s) {\n\t\tint index=-1; \n\t\tfor(int i = 0 ; i < dataList.size() ; i ++ ) {\n\t\t\tif(dataList.get(i).name.equals(s)) {\n\t\t\t\t\n\t\t\t\tindex =i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "java.lang.String getIdentifier();", "public int getIndex() {\r\n return _index;\r\n }", "public int getIndex() {\r\n return _index;\r\n }", "private int indexOf(SeqItem el)\n\t{\n\t\treturn indexOf((short)el.getIndex());\n\t}", "public int getIndex() {\r\n return index;\r\n }", "short getFirstOpenIndexInArgument(UUID id);", "public int getIndex()\n {\n return m_index;\n }", "public int getIdentifier()\n {\n return identifier;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "private int getIndex(int key) {\n\t\treturn key % MAX_LEN;\n\t}", "String getFirstIndex();", "protected int getItemIndex(String key){\n for (int i = 0; i < itemsInTable.size(); i++){\n if (itemsInTable.get(i).equals(key)) return i;\n }\n return -1;\n }", "public int getIndex() {\n\t\treturn 0;\n\t}", "@VTID(10)\n int getIndex();", "int getKey(int i);", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() { return this.index; }", "public Integer indexOf(String s){\n\t\tInteger i;\n\t\tif((i=indices.get(s))!=null)\n\t\t\treturn i;\n\t\telse\n\t\t\treturn Integer.valueOf(-1);\n\t}", "public int getIndexOf(K key);", "private int correspondingIndex(ObjectID oid, ObjectID[] id_seq_at_replica, int start)\r\n\t{\n\t\tint iadj = start;\r\n\t\tint index = -1;\r\n\t\twhile (index == -1) {\r\n\t\t\tindex = indexOf(id_seq_at_replica[iadj++]);\r\n\t\t}\r\n\t\treturn index;\r\n\t}", "protected int indexFromName(String name) {\n for (int index = 0; index < values.length; index++) {\n if (getNames()[index] == name) {\n return index;\n }\n }\n return -1;\n }", "public Integer getIdx() {\r\n\t\treturn idx;\r\n\t}", "public String getIndex() {\n\t\treturn index;\n\t}", "public String getIndex() {\n\t\treturn index;\n\t}" ]
[ "0.7707111", "0.7444213", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.74152493", "0.74152493", "0.74152493", "0.7363603", "0.73217976", "0.7293966", "0.72204626", "0.7167069", "0.7109483", "0.7043808", "0.70007664", "0.70003474", "0.6985768", "0.6958957", "0.6929171", "0.6850903", "0.6824717", "0.682203", "0.68169475", "0.6798998", "0.6783507", "0.67700326", "0.6760956", "0.6756555", "0.67549455", "0.6745713", "0.6745713", "0.6745713", "0.6745447", "0.67147475", "0.669429", "0.6684797", "0.6668917", "0.66574", "0.6653878", "0.6653878", "0.66410863", "0.6640213", "0.66325396", "0.662858", "0.6621593", "0.6617737", "0.6614285", "0.6610295", "0.6610295", "0.6610295", "0.66097313", "0.66074365", "0.65986437", "0.65918404", "0.6589353", "0.6581032", "0.65794903", "0.65794903", "0.65747", "0.65731514", "0.6559923", "0.655495", "0.6537272", "0.6522987", "0.6522987", "0.6522987", "0.6522987", "0.6522987", "0.65227425", "0.65206385", "0.6492144", "0.64873695", "0.6481434", "0.64798254", "0.64728934", "0.64601743", "0.64601743", "0.64601743", "0.64601743", "0.64601743", "0.64601743", "0.64557916", "0.6443481", "0.6432895", "0.6405918", "0.6403477", "0.6396556", "0.63871396", "0.63860303", "0.63860303" ]
0.0
-1
returns the kind of the identifier
public String KindOf(String name) { Values tmp = currScope.get(name); String kind = null; if(tmp != null) return tmp.getKind(); if(currScope != classScope) { tmp = classScope.get(name); if(tmp != null) return tmp.getKind(); } return "NONE"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String kind();", "String kind();", "Kind kind();", "String getIdentifierName(String name, String type);", "public String getIdentifyKind() {\n return identifyKind;\n }", "Kind getKind();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "IdentifierType createIdentifierType();", "public String kind() { return kind; }", "public int identifier();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getKind() {\n return kind;\n }", "GroupIdentifierType getType();", "public String returnKind(){ return kind; }", "public String type();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "String typeName();", "I getIdentifier();", "java.lang.String getIdentifier();", "String productKind();", "public Long getTypeid() {\n return typeid;\n }", "public Integer getIdentType() {\n return identType;\n }", "public TypeIdentifierSnippet getTypeIdentifier() {\n return typeIdentifier;\r\n }", "public int getIdentifier();", "int getIdentifier();", "public T getIdentifier();", "public String getIdentifierString();", "String primaryImplementationType();", "public String getKind() {\n return this.kind;\n }", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "Identifier getId();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();" ]
[ "0.79453474", "0.79453474", "0.73199767", "0.72423744", "0.71344125", "0.7077922", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7010905", "0.6972343", "0.69089127", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68817943", "0.68781465", "0.685411", "0.68442225", "0.6813027", "0.6809172", "0.6809172", "0.6809172", "0.6809172", "0.6809172", "0.6809172", "0.6809172", "0.6809172", "0.6790628", "0.6790628", "0.6790628", "0.6790628", "0.6790628", "0.6758659", "0.6745235", "0.67341775", "0.67096406", "0.6703545", "0.669528", "0.66945684", "0.66786873", "0.66317946", "0.66234034", "0.6601445", "0.6579328", "0.65652144", "0.6551353", "0.6551353", "0.6551353", "0.6551353", "0.6551353", "0.6551353", "0.6551353", "0.6547628", "0.6529062", "0.6529062", "0.6529062", "0.6529062", "0.6529062", "0.6529062", "0.6529062", "0.6529062", "0.6529062" ]
0.0
-1
returns type of identifier
public String TypeOf(String name) { Values tmp = currScope.get(name); if(tmp != null) return tmp.getType(); if(currScope != classScope) { tmp = classScope.get(name); if(tmp != null) return tmp.getType(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IdentifierType createIdentifierType();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String getIdentifierName(String name, String type);", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public TypeIdentifierSnippet getTypeIdentifier() {\n return typeIdentifier;\r\n }", "type getType();", "public String type();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public T getIdentifier();", "public Object visitIdent(GoIRIdentNode node){\n\t\tTypeInfo m = lexicalscope.get(node.getIdentifier());\n\t\tif(m != null) {\n\t\t\treturn m.getType();\n\t\t}\n\t\treturn \"\";\n\t}", "String typeName();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public Long getTypeid() {\n return typeid;\n }", "public abstract int getType();", "public abstract int getType();", "public abstract int getType();", "Coding getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();" ]
[ "0.79441816", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.78460723", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.7685625", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.75422233", "0.7515703", "0.74682355", "0.74358296", "0.739077", "0.739077", "0.739077", "0.739077", "0.739077", "0.739077", "0.739077", "0.739077", "0.7314537", "0.7314537", "0.7314537", "0.7314537", "0.7314537", "0.724726", "0.7244941", "0.7143821", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71292394", "0.71287256", "0.71176004", "0.71176004", "0.71176004", "0.70954424", "0.70750564", "0.70750564", "0.70750564", "0.70750564" ]
0.0
-1
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app.
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; ArrayList<String> ArrayDescripcionMarker = new ArrayList<String>(); ArrayList<String> ArrayX = new ArrayList<String>(); ArrayList<String> ArrayY = new ArrayList<String>(); Integer tamanio=0; new DataMainActivitBuscarUbicacionReservas(mapa.this).execute(); System.out.println("aca lista1 ANTESSSS" +getIntent().getStringArrayListExtra("miLista")); System.out.println("aca tamaño ANTESSSS" +getIntent().getIntExtra("tamanio",0)); System.out.println("aca lista2 ANTESSS" +getIntent().getStringArrayListExtra("miLista2")); System.out.println("aca listaCLIENTE ANTESSS" +getIntent().getStringArrayListExtra("milistaCliente")); //cantidad de reservas/markes a dibujar tamanio = getIntent().getIntExtra("tamanio",0); /// Casteo la lista que tiene las latitudes double[] failsArray = new double[tamanio]; //create an array with the size of the failList for (int i = 0; i < tamanio; ++i) { //iterate over the elements of the list failsArray[i] = Double.parseDouble(getIntent().getStringArrayListExtra("miLista").get(i)); //store each element as a double in the array // failsArray[i] = Double.parseDouble(lista.get(i)); //store each element as a double in the array } /// Casteo la lista que tiene las longitudes double[] failsArray2 = new double[tamanio]; //create an array with the size of the failList for (int i = 0; i < tamanio; ++i) { //iterate over the elements of the list failsArray2[i] = Double.parseDouble(getIntent().getStringArrayListExtra("miLista2").get(i)); //store each element as a double in the array // failsArray2[i] = Double.parseDouble(lista2.get(i)); //store each element as a double in the array } ///// Recorro las listas y genero el marker. for (int i = 0; i < tamanio; i++){ LatLng vol_1 = new LatLng(failsArray[i], failsArray2[i]); mMap.addMarker(new MarkerOptions().position(vol_1).title(getIntent().getStringArrayListExtra("milistaCliente").get(i))); // mMap.addMarker(new MarkerOptions().position(vol_1)); mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(vol_1, 12f)); } ///////////// DIUJO ZONAS - POLIGIONOS ///////////////// Polygon polygon1 = mMap.addPolygon(new PolygonOptions() .add(new LatLng(-34.4466867, -58.7446665), new LatLng(-34.4755556, -58.7870237), new LatLng( -34.5313786, -58.7034557), new LatLng(-34.5005326, -58.6488037)) .strokeColor(Color.RED)); polygon1.setTag("ZONA 1"); polygon1.setStrokeWidth(4f); Polygon polygon2 = mMap.addPolygon(new PolygonOptions() .add(new LatLng(-34.4466867, -58.7446665), new LatLng(-34.4810476,-58.6806737), new LatLng( -34.4541926,-58.6249857), new LatLng( -34.3982066,-58.6507117)) .strokeColor(BLUE)); polygon2.setTag("ZONA 2"); polygon2.setStrokeWidth(4f); Polygon polygon3 = mMap.addPolygon(new PolygonOptions() .add(new LatLng(-34.4810476,-58.6806737), new LatLng(-34.5005326, -58.6488037), new LatLng( -34.4786136,-58.6067997), new LatLng( -34.4547056,-58.6234267)) .strokeColor(Color.GREEN)); polygon3.setTag("ZONA 3"); polygon3.setStrokeWidth(4f); ///////////// FIN DIUJO ZONAS - POLIGIONOS ///////////////// /* //DIBUJO ZONAS DE CIRCULOS Circle circle = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.455587, -58.685503)) .radius(1800) .strokeColor(Color.RED)); circle.setStrokeWidth(4f); circle.setTag("Zona1"); Circle circle2 = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.480523, -58.717237)) .radius(1600) .strokeColor(Color.BLUE)); circle2.setStrokeWidth(4f); circle2.setTag("Zona2"); Circle circle3 = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.450193, -58.725039)) .radius(1800) .strokeColor(Color.GREEN)); circle2.setStrokeWidth(4f); circle2.setTag("Zona2"); Circle circle4 = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.469302, -58.653062)) .radius(1500) .strokeColor(Color.YELLOW)); circle2.setStrokeWidth(4f); circle2.setTag("Zona2"); //funcion que revisa si un punto esta dentro del circulo zona 1 float[] disResultado = new float[2]; // LatLng pos = new LatLng(40.416775, -3.703790); LatLng pos = new LatLng(-34.470327, -58.683718); double lat = pos.latitude; //getLatitude double lng = pos.longitude;//getLongitude Location.distanceBetween( pos.latitude, pos.longitude, circle.getCenter().latitude, circle.getCenter().longitude, disResultado); if(disResultado[0] > circle.getRadius()){ System.out.println("FUERAAAA ZONA 1" ); } else { System.out.println("DENTROOO ZONA 1" ); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n lat = addresses.get(0).getLatitude();\n lng = addresses.get(0).getLongitude();\n } catch (Exception e) {\n lat = -34;\n lng = 151;\n }\n\n LatLng sydney = new LatLng(lat, lng);\n googleMap.addMarker(new MarkerOptions().position(sydney).title(\"WSU Paramatta\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n googleMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney, Australia, and move the camera.\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(17.2231, 78.2827);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Hyderbbad\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n initializeMap();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n // Add a marker in Sydney and move the camera\n if (loc != -1 && loc != 0) {\n locationManager.removeUpdates(this);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(MainActivity.locations.get(loc), 10));\n\n mMap.addMarker(new MarkerOptions().position(MainActivity.locations.get(loc)).title(MainActivity.places.get(loc)));\n } else {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationManager.requestLocationUpdates(provider, 400, 1, this);\n\n }\n mMap.setOnMapLongClickListener(this);\n }", "@SuppressLint(\"MissingPermission\")\n @Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"MAP_FRAG\", \"MapCallback\");\n\n mMap = googleMap;\n\n Log.d(\"MAP\", mMap.toString());\n\n mMap.setPadding(0, 0, 0, 300);\n\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(Common.latitude, Common.longitude))\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_mark_red)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Common.latitude, Common.longitude), 15.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getMarkers();\n\n // Add a marker in Sydney and move the camera\n LatLng penn = new LatLng(39.952290, -75.197060);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(penn, 15));\n mMap.setMyLocationEnabled(true);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setCompassEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mapReady = true;\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng Bangalore = new LatLng(12.972442, 77.580643);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(Bangalore)\n .zoom(17)\n .bearing(90)\n .tilt(30)\n .build();\n mMap.addMarker(new MarkerOptions().position(Bangalore).title(\"Marker in Bangalore\"));\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n //below line is use to add custom marker on our map.\n .icon(BitmapFromVector(getApplicationContext(), R.drawable.ic_flag)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(43.777365,-79.3406);\n LatLng loc22=new LatLng(43.775748,-79.336674);\n LatLng loc3=new LatLng(43.769240,-79.360010);\n LatLng loc4=new LatLng(43.769290,-79.400101);\n LatLng loc5=new LatLng(43.769552,-79.601201);\n mMap.addMarker(new MarkerOptions().position(sydney).title(values[0]));\n mMap.addMarker(new MarkerOptions().position(loc22).title(values[1]));\n mMap.addMarker(new MarkerOptions().position(loc3).title(values[2]));\n mMap.addMarker(new MarkerOptions().position(loc4).title(values[3]));\n mMap.addMarker(new MarkerOptions().position(loc5).title(values[4]));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng position = new LatLng(latitude, longitude);\n\n // centre the map around the specified location\n mMap.animateCamera(CameraUpdateFactory.newLatLng(position));\n\n // add a marker at the specified location\n MarkerOptions options = new MarkerOptions();\n mMap.addMarker(options.position(position).title(locationName));\n\n // configure the map settings\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n // enable the zoom controls\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n\n /* // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in city and move the camera\n LatLng cityCoord = new LatLng(lat, lng);\n float zoom = (float) 9.0;\n mMap.addMarker(new MarkerOptions().position(cityCoord).title(cityAddr));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(cityCoord, zoom));\n }", "public static void onMapReady() {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n LatLng singapore = new LatLng(1.338709, 103.819519);\n googleMap.addMarker(new MarkerOptions().position(singapore)\n .title(\"Marker in Singapore\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(singapore));\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11),3000,null);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n addMarkers();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng place = new LatLng(Double.parseDouble(lat),Double.parseDouble(longitude));\n\n mMap.addMarker(new MarkerOptions().position(place));\n moveToCurrentLocation(place);\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n googleMap.setMyLocationEnabled(true);\r\n\r\n LocationManager locationManager = (LocationManager)\r\n getSystemService(Context.LOCATION_SERVICE);\r\n Criteria criteria = new Criteria();\r\n\r\n Location currentLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\r\n\r\n LatLng sydney = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 13));\r\n\r\n } else {\r\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\r\n }\r\n\r\n updateMarkersData(googleMap);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n CameraUpdate cUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(35.68, 139.76), 12);\n //mMap.addMarker(new MarkerOptions().position(new LatLng(35.68, 139.76)).title(\"Marker in Tokyo\"));\n mMap.moveCamera(cUpdate);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng wroclaw = new LatLng(51.110, 17.034);\n mMap.addMarker(new MarkerOptions().position(wroclaw));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(wroclaw, 12));\n mMap.clear();\n // Setting a click event handler for the map\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n bSelect.setEnabled(true);\n // Creating a marker\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting the position for the marker\n markerOptions.position(latLng);\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(\"NOWY: \" + latLng.latitude + \" : \" + latLng.longitude);\n\n markerOptions.alpha(0.6f);\n // Clears the previously touched position\n mMap.clear();\n\n // Animating to the touched position\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n\n location = latLng.latitude + \" \" + latLng.longitude;\n\n setupMarker();\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(1*1000)\n .setFastestInterval(5 * 100);\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Log.i(TAG, \"map is ready\");\r\n mMap = googleMap;\r\n\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(this);\r\n mMap.setOnMyLocationClickListener(this);\r\n\r\n startLocationUpdates();\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n frLatLng = new LatLng(getLatitude, getLongitude);\n\n map = googleMap;\n map.getUiSettings().setMyLocationButtonEnabled(false);\n\n if (ActivityCompat.checkSelfPermission(getContext()\n , Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(getContext(),\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n\n map.addMarker(new MarkerOptions().position(frLatLng)).setTitle(getString(R.string.my_location));\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(frLatLng, 520));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng montesson = new LatLng(48.9190286,2.1380955);\n mMap.addMarker(new MarkerOptions().position(montesson).title(\"Marker in Montesson\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(montesson));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n int i = 12;\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n i);\n\n }\n mMap.setMyLocationEnabled(true); //when location changed call line. loaction manager\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latitude, longitude);\n addMarker(myLocation, name);\n moveCamera(myLocation, 3);\n\n //search a place\n /*searchInput = (EditText) findViewById(R.id.map_search_input);\n searchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if(actionId == EditorInfo.IME_ACTION_SEARCH\n || actionId == EditorInfo.IME_ACTION_DONE\n || actionId == KeyEvent.ACTION_DOWN\n || actionId == KeyEvent.KEYCODE_ENTER)\n //search location\n geoLocate();\n return false;\n }\n });*/\n\n //add location\n addButton = findViewById(R.id.map_add_button);\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.putExtra(\"latitude\", marker.getPosition().latitude);\n intent.putExtra(\"longitude\", marker.getPosition().longitude);\n intent.putExtra(\"name\", marker.getTitle());\n setResult(4, intent);\n finish();\n }\n });\n\n //long tap to add a marker\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(@NonNull LatLng latLng) {\n addMarker(latLng, name);\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(this);\n markerIconBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.ic_driver_check_in);\n\n mFillColor = Color.HSVToColor(50, new float[]{0, 1, 1});\n mStrokeColor = Color.BLACK;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n updateLocationUI();\n getDeviceLocation();\n // Add a marker in Sydney and move the camera\n //float zoom = 15;\n //LatLng gbc = new LatLng(43.676209, -79.410703);\n //mMap.addMarker(new MarkerOptions().position(gbc).title(\"Marker in GBC\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(gbc, zoom));\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(121.5729889, 25.0776557);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"This is my first Maker\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng CSN = new LatLng(51.87, -8.481);\n mMap.setMapType(MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(CSN).title(\"Marker at CSN college\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CSN, 15F));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n LatLng charlotte = new LatLng(35.22, -80.84);\r\n //currentMarker = mMap.addMarker(new MarkerOptions().position(charlotte).title(\"Charlotte, NC\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(charlotte));\r\n //currentMarker.setTag(0);\r\n\r\n mMap.setOnMapLongClickListener(this);\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n //&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n ) {\r\n // TODO: Consider calling\r\n\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\r\n @Override\r\n public boolean onMyLocationButtonClick() {\r\n Log.d(\"maps\", \"On my location button click\");\r\n return false;\r\n }\r\n });\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TEST\", \"MAP READY\");\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n LatLng curLocation = new LatLng(latitude,longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(curLocation,15.0f);\n setPin(latitude,longitude, null);\n mMap.moveCamera(cameraUpdate);\n for(int i = 0; i < restaurantList.size(); i++){\n double lat = restaurantList.get(i).getLatitude();\n double lng = restaurantList.get(i).getLongitude();\n setPin(lat, lng, restaurantList.get(i));\n }\n //Check we have the users permission to access their location\n // if we dont have it, we have to request it\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n\n } else {\n //we dont have permission, so we have to ask for it\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_LOCATION_REQUEST_CODE);\n //run asychronously.. show an alert dialog\n //user can choose allow or deny\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setTrafficEnabled(true);\n googleMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(onMyLocationChangeListener);\n\n // mMap.setPadding(0, 0, 0, 100);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(65.9667, -18.5333))\n .title(\"Hello world\"));\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng loc = new LatLng(v, v1);\n mMap.addMarker(new\n MarkerOptions().position(loc).title(\"0000000000\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"you are in sydney\").draggable(true));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMarkerDragListener(this);\n mMap.setOnMapLongClickListener(this);\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n // Home Mark\n LatLng home = new LatLng(41.374736, 2.168308);\n float zoom = 13;\n\n // Inicialitzem mapa\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); //Tipus de mapa\n mMap.addMarker(new MarkerOptions().position(home).title(\"IOC\")); //Marcador inicial\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(home, zoom)); //Centrem mapa en el marcador inicial\n\n this.setMapLongClick(mMap);\n this.enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n final LatLng[] myLoc = {new LatLng(1, 1)};\n mMap.setMyLocationEnabled(true);\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n// @Override\n// public void onMyLocationChange(Location location) {\n// myLoc[0] = new LatLng(location.getLatitude(), location.getLongitude());\n// mMap.addCircle(new CircleOptions().center(myLoc[0]));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc[0], 15));\n// }\n// });\n\n mMap.addCircle(new CircleOptions().center(new LatLng(lat, lng)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lng), 18));\n\n mMap.setOnPoiClickListener(new GoogleMap.OnPoiClickListener() {\n @Override\n public void onPoiClick(PointOfInterest poi) {\n\n }\n });\n\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n\n showItems(lat, lng, radius);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng posini = new LatLng(3.4,-76.5);\n myMarker = mMap.addMarker(new MarkerOptions().position(posini));\n\n requestLocation();\n\n googleMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n if (!flag) {\n\n addMarker();\n flag = true;\n }\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(logTag,\"4\");\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST);\n return;\n }\n mMap.setOnMapLongClickListener(this);\n mMap.setOnInfoWindowClickListener( this );\n mMap.setOnMapClickListener(this);\n mMap.setMyLocationEnabled(true);\n ll=new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options = new MarkerOptions().position(ll);\n options.title(getAddressFromLatLng(ll));\n\n Log.d(logTag,\"5\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng hn = new LatLng(14.079526, -87.180662);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(hn));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(hn,7));\n helperFacturacion = new FacturacionHelper(MapListClientesActivity.this);\n\n\n addMarkers();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},101);\r\n }\r\n loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n populateMap(loc);\r\n try {\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()), 15.0f));\r\n }catch(Exception blyat){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"No hemos podido acceder a tu localización, revisa el estado de GPS y reinicia la app\");\r\n builder.show();\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n try{\n Geocoder geo = new Geocoder(this);\n\n //Get address provided for location as Address object\n List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);\n Address address = geo.getFromLocationName(location.getAddress(),1).get(0);\n\n LatLng position= new LatLng(address.getLatitude(),address.getLongitude());\n\n googleMap.addMarker(new MarkerOptions().position(position)\n .title(location.getTitle()));\n googleMap.setMinZoomPreference(12);\n googleMap.setMaxZoomPreference(15);\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(position));\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch(IndexOutOfBoundsException e){\n e.printStackTrace();\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\n @SuppressWarnings({\"MissingPermission\"})\n public void onMapReady(GoogleMap googleMap) {\n\n Log.d(TAG, \"Map is ready.\");\n mMap = googleMap;\n\n mMap.setMyLocationEnabled(true);\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n mGoogleApiClient);\n\n setMarkerToCurrentLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(LocationStorage.getInstance().getLocation().getLatitude(), LocationStorage.getInstance().getLocation().getLongitude());\n// BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_large_marker);\n Marker marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Current Location\").snippet(\"Hold and drag to your desired location\"));\n marker.showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(sydney, 15);\n mMap.animateCamera(cameraUpdate);\n marker.setDraggable(true);\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng latLng=marker.getPosition();\n Location temp = new Location(LocationManager.GPS_PROVIDER);\n temp.setLatitude(latLng.latitude);\n temp.setLongitude(latLng.longitude);\n LocationStorage.getInstance().setLocation(temp);\n }\n });\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n//\n// return true;\n// }\n// });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mcircleOptions = mcircleOptions.center(sydney);\n mcircleOptions = mcircleOptions.radius(500);\n mcircleOptions = mcircleOptions.strokeWidth(2);\n mcircleOptions = mcircleOptions.strokeColor(Color.argb(100, 255, 73, 73));\n mcircleOptions = mcircleOptions.fillColor(Color.argb(100, 255, 73, 73));\n mMap.addCircle(mcircleOptions);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n !=\n PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mlatLng = latLng;\n mMap.clear();\n mMap.addMarker(new MarkerOptions().position(mlatLng));\n mcircleOptions = mcircleOptions.center(mlatLng);\n mMap.addCircle(mcircleOptions);\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n geocoder = new Geocoder(Maps.this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(mlatLng.latitude, mlatLng.longitude, 1);\n for (int i=0; i < addresses.get(0).getMaxAddressLineIndex(); i++) {\n Log.e(\"Address\", addresses.get(0).getAddressLine(i) + \"\");\n caddress = addresses.get(0).getAddressLine(i);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n loc_data = getSharedPreferences(\"loc_data\", MODE_PRIVATE);\n SharedPreferences.Editor loc_data_editor = loc_data.edit();\n loc_data_editor.putString(\"lat\", Double.toString(mlatLng.latitude));\n loc_data_editor.putString(\"lng\", Double.toString(mlatLng.longitude));\n loc_data_editor.putString(\"add\", caddress + \"\");\n loc_data_editor.commit();\n }\n });\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n\r\n //Initialize Google Play Services\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n initializeOtherSettlements(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n initializeQuestLocations(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnPoiClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), 9));\n\n final PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n\n autocompleteFragment.getView().setBackgroundColor(Color.WHITE);\n autocompleteFragment.getView().setVisibility(View.GONE);\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n //Bias results towards the user's current location\n /*autocompleteFragment.setBoundsBias(new LatLngBounds(\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude),\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude)));*/\n\n //Get info about the selected place.\n //Log.i(TAG, \"Place: \" + place.getName());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n updateMapHistory();\n updateCustomTimeUI();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n enableMyLocation();\n buildGoogleApiClient();\n\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n String info = sTitle;\n // Add a marker in Sydney and move the camera\n LatLng pos = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(pos).title(info));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 8));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n gpsTracker = new GPSTracker(this);\n\n // TODO Cek Permission >= Marshmellow\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&\n checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION\n }, 110);\n return;\n }\n }\n\n if (gpsTracker.canGetLocation()) {\n latawal = gpsTracker.getLatitude();\n lonawal = gpsTracker.getLongitude();\n namelocationawal = myLocation(latawal, lonawal);\n }\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latawal, lonawal);\n locawal.setText(namelocationawal);\n mMap.addMarker(new MarkerOptions().position(myLocation).title(namelocationawal));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 14));\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.setPadding(30, 80, 30, 80);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng oregon = new LatLng(45.3, -122);\n mMap.addMarker(new MarkerOptions().position(oregon).title(\"Marker in Oregon\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(oregon));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n /* mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n LatLng ifto = new LatLng(-10.199202218157746, -48.31158433109522);\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.addMarker(new MarkerOptions().position(ifto).title(\"IFTO Campus Palmas\"));\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n\n mMap.getUiSettings().setCompassEnabled(true);\n// mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setIndoorLevelPickerEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n mMap.getUiSettings().setAllGesturesEnabled(true);\n getDeviceLocation();\n mMap.setOnMarkerDragListener(this);\n\n }\n }", "public void onMapReady(GoogleMap googleMap , double lati, double longi) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(lati, longi);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mGoogleMap = map;\n mGoogleMap.setMyLocationEnabled(true);\n Log.d(TAG, \"Map Ready\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n\n mMap = googleMap;\n\n attachLocationListener();\n\n\n mMap.setOnMarkerDragListener(this);\n\n }", "public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(1));\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n\r\n /// This allows the user to zoom in and out of the map\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n mMap.getUiSettings().isMyLocationButtonEnabled();\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n //Agafar la localitzacio actual per mostrar-ho al mapa\n LocationManager locationManager = (LocationManager)\n getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n LatLng actual = new LatLng((location.getLatitude()),location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(actual,13));\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(getContext());\n mMap = googleMap;\n mMap.setMinZoomPreference(13.0f);\n mMap.setMaxZoomPreference(20.0f);\n mMap.setOnMapClickListener(this);\n mMap.setInfoWindowAdapter(this);\n mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.\n ACCESS_FINE_LOCATION}, 1);\n } else {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n mMap.setMyLocationEnabled(true);\n\n buildGoogleApiClient();\n mGoogleApiClient.connect();\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n mMap = map;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng point) {\n mMap.clear();\n buildMarker(\"User Tap\", \"This is snippet\", point, true);\n @SuppressLint(\"DefaultLocale\") String latLong = String.format(\"%f,%f\", point.latitude, point.longitude);\n String endPoint = String.format(placesURL,latLong, String.valueOf(distance), BuildConfig.API_KEY);\n Location locationSelected = new Location(mLastKnownLocation);\n locationSelected.setLatitude(point.latitude);\n locationSelected.setLongitude(point.longitude);\n showPlacesNearby(locationSelected, endPoint);\n }\n });\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n mMap.clear();\n }\n });\n\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n mMap.clear();\n updateLocationUI();\n getDeviceLocation();\n return true;\n }\n });\n\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setAllGesturesEnabled(mLock);\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n riderLat = getIntent().getDoubleExtra(DriverActivity.RIDER_LATITUDE_EXTRA, 0.0);\n riderLong = getIntent().getDoubleExtra(DriverActivity.RIDER_LONGITUDE_EXTRA, 0.0);\n LatLng rider = new LatLng(riderLat, riderLong);\n riderMarker = mMap.addMarker(new MarkerOptions()\n .position(rider)\n .title(\"Rider\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(this, \"You don't have location permission\", Toast.LENGTH_LONG).show();\n return;\n }\n\n Location hereNow = mLocationManager.getLastKnownLocation(mBestProvider);\n if (hereNow != null) {\n onLocationChanged(hereNow);\n }\n\n mLocationManager.requestLocationUpdates(mBestProvider, 400, 1, this);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n //Enable Current location\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.\n PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.\n ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, MY_REQUEST_INT);\n\n }\n\n\n return;\n\n } else {\n mMap.setMyLocationEnabled(true);\n\n\n }\n\n\n // Add a marker in Sydney and move the camera\n //LatLng sydney = new LatLng(-34, 151);\n //mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot))\n // );\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney,16),5000,null);\n //new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot));\n\n //LatLng latLng = new LatLng(-1.2652560778411037, 36.81265354156495);\n //mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Parklands\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n //BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.blackspot);\n ////LatLng harmbug = new LatLng(-37, 120);\n //mMap.addMarker(new MarkerOptions().position(harmbug).title(\"Marker in Harmbug\")\n //.icon(icon));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(harmbug,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(harmbug));\n\n //LatLng kenya = new LatLng(-2.456, 37);\n //mMap.addMarker(new MarkerOptions().position(kenya).title(\"Marker in Kenya\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(kenya,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(kenya));\n\n LatLng sydney = new LatLng(-0.8041213212075744, 36.53117179870606);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Blackspot at Kinungi\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney, 18), 5000, null);\n\n LatLng gilgil = new LatLng(-0.2167, 36.2667);\n mMap.addMarker(new MarkerOptions().position(gilgil).title(\"Blackspot at Gilgil\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(gilgil));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(gilgil, 18), 5000, null);\n\n LatLng njoro = new LatLng(-0.3290, 35.9440);\n mMap.addMarker(new MarkerOptions().position(njoro).title(\"Blackspot at Njoro\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(njoro));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(njoro, 18), 5000, null);\n\n LatLng bluepost = new LatLng(-1.0226988092777693, 37.06806957721711);\n mMap.addMarker(new MarkerOptions().position(bluepost).title(\"Blackspot at Bluepost Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(bluepost));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Nithi = new LatLng(-0.26649259802107667, 37.66248464584351);\n mMap.addMarker(new MarkerOptions().position(Nithi).title(\"Blackspot at Nithi Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Nithi));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Maungu = new LatLng(-3.558353542362671, 38.74993801116944);\n mMap.addMarker(new MarkerOptions().position(Maungu).title(\"Blackspot at Maungu Area\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Maungu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Misikhu = new LatLng(0.6662027919912484, 34.75215911865235);\n mMap.addMarker(new MarkerOptions().position(Misikhu).title(\"Blackspot at Misikhu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Misikhu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Muthaiga = new LatLng(-1.2614375406469367, 36.840720176696784);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Muthaiga Road\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Muthaiga));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Pangani = new LatLng(-1.2665003190843396, 36.834239959716804);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Pangani\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Pangani));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Pangani, 18), 5000, null);\n\n LatLng KU = new LatLng(-1.1823303731373749, 36.93703293800355);\n mMap.addMarker(new MarkerOptions().position(KU).title(\"Blackspot at KU\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(KU));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(KU, 18), 5000, null);\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Toast.makeText(this, \"Map is Ready\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n getDeviceLocation();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n init();\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng location = new LatLng(mLat, mLng);\n moveCamera(location, DEFAUT_ZOOM);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(\n this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Pula and move the camera\n LatLng pula = new LatLng(44.86726450096342, 13.850460687162476);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(pula, 13));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n enableUserLocation();\n zoomTooUserLocation();\n } else {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission\n .ACCESS_FINE_LOCATION)) {\n //we can show user dialog why this permission is necessery\n\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.mapstyle_day);\n mMap.setMapStyle(style);\n\n if (locationProvider != null) {\n enableLocationBullet();\n if (lastpos != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(lastpos));\n }\n }\n // Start clustermanager and add markers\n setUpClusterManager();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapReady = true;\n if (searchedRestaurants != null) {\n addRestaurants(searchedRestaurants, false);\n }\n\n Location loc = locationProvider.getLastLocation();\n if (!init) {\n zoomMapToPosition(loc, MY_LOCATION_ZOOM);\n init = true;\n }\n\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n ////run with it to check what is happening and remove it to see\n\n\n //Initialize Google Play Services\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n\r\n //Initialize Google Play Services\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(false);\n mUiSettings.setMapToolbarEnabled(false);\n mUiSettings.setZoomControlsEnabled(false);\n mUiSettings.setScrollGesturesEnabled(false);\n mUiSettings.setTiltGesturesEnabled(false);\n mUiSettings.setRotateGesturesEnabled(false);\n\n // Add a marker in Sydney and move the camera\n final LatLng airport = new LatLng(listAirport.get(index).getLatitude(), listAirport.get(index).getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(airport));\n mMap.setMinZoomPreference(10.0f);\n mMap.setMaxZoomPreference(10.0f);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n onClick(index, MapsActivity.class);\n }\n });\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n LatLng latlong = new LatLng(29.375859, 47.977405);\n googleMap.addMarker(new MarkerOptions().position(latlong).title(\"\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong, 9.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng livraria = new LatLng(maps.getLatitude(), maps.getLongitude());\n if(this.maps.getId() == 1){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Saraiva - Praia de Belas\"));\n } else if(this.maps.getId() == 2){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cultura - Bourbon Country\"));\n } else if(this.maps.getId() == 3){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cameron\"));\n } else if(this.maps.getId() == 4){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Siciliano\"));\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(livraria, 15f));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(LOG_TAG, \"called onMapReady()\");\n mMap = googleMap;\n\n // Set up UI for map\n mMap.setMyLocationEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings = mMap.getUiSettings(); // https://developers.google.com/maps/documentation/android-sdk/controls\n mUiSettings.setMyLocationButtonEnabled(false);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n\n\n // Move the camera to last known user location\n fusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() { // this -> getActivity()??\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng startingLocation = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(startingLocation) // Sets the center of the map\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null);\n Log.d(LOG_TAG, \" > moved map to last known location\");\n }\n }\n });\n addZoneHolesToMap(shiftZones);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng liege = new LatLng(50.620552, 5.581177);\n LatLng victime = new LatLng(50.620957, 5.582263);\n mMap.addMarker(new MarkerOptions()\n .position(liege)\n .title(\"You are here !\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW)));\n mMap.addMarker(new MarkerOptions()\n .position(victime)\n .title(\"Aurélie\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(liege,17));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng parque = new LatLng(latitud, longitud);\n mMap.addMarker(new MarkerOptions().position(parque).title(lugar).icon(BitmapDescriptorFactory.fromResource(R.drawable.icons8_terraria_48)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(parque));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitud, longitud),16.0f));\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n marker = googleMap.addMarker(markerOptions);\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapLoaded = true;\n waitForMapPlease();\n }\n });\n }" ]
[ "0.8188441", "0.80424875", "0.80367196", "0.80337155", "0.7998222", "0.7976972", "0.7957382", "0.7957201", "0.79550856", "0.7943012", "0.79364103", "0.7929936", "0.7914818", "0.7904191", "0.78881335", "0.78846306", "0.78846306", "0.78846306", "0.78846306", "0.78778464", "0.7844205", "0.7827516", "0.78199285", "0.7813242", "0.7795729", "0.7791789", "0.77871156", "0.77864116", "0.77626944", "0.7744311", "0.7742318", "0.77357626", "0.7729057", "0.76867473", "0.76731986", "0.7666306", "0.7665774", "0.76600856", "0.7659613", "0.7657662", "0.76562613", "0.76476425", "0.76405954", "0.7633125", "0.7628493", "0.76215583", "0.7620991", "0.7617646", "0.7617235", "0.7607823", "0.76043576", "0.7599345", "0.75981534", "0.75938034", "0.758472", "0.75844157", "0.75790685", "0.7571081", "0.7567399", "0.7564121", "0.75630164", "0.75550276", "0.7550444", "0.7544628", "0.75430435", "0.75379837", "0.75302666", "0.75269747", "0.7519619", "0.75179684", "0.7514995", "0.7493368", "0.74907905", "0.7490137", "0.74860406", "0.74739987", "0.7466897", "0.7462117", "0.7457712", "0.7456755", "0.74525076", "0.74503434", "0.7449058", "0.7447086", "0.7437128", "0.7429526", "0.7425311", "0.74169713", "0.74168414", "0.74164253", "0.74117726", "0.7410552", "0.74080205", "0.7399715", "0.73948216", "0.73934394", "0.7389121", "0.7388162", "0.7377256", "0.7369643", "0.7359355" ]
0.0
-1
getItem 1 because we have add 1 header
private String getItem(int position) { return data[position - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public TempTableHeader getHeader1() { return header1; }", "public String getHeader1() {\n return header1;\n }", "public String getHeader() {\n\t\tString item_text = getQuantityString(getCount());\n\t\tString header = getActivity().getString(R.string.browse_items_text, item_text, getCount());\n\t\treturn header;\n\t}", "int getFirstItemOnPage();", "public String getFirst(String headerName)\r\n/* 336: */ {\r\n/* 337:496 */ List<String> headerValues = (List)this.headers.get(headerName);\r\n/* 338:497 */ return headerValues != null ? (String)headerValues.get(0) : null;\r\n/* 339: */ }", "public TempTableHeader getHeader2() { return header2; }", "public Object getHeader() {\n return header;\n }", "String getHeader(String headerName);", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "java.lang.String getHeader();", "public Item getFirst();", "com.didiyun.base.v1.Header getHeader();", "@Override\n public int getItemCount() {\n if (addedHeader()) {\n return getData() == null ? 0 : (getData().size() + 1);\n } else {\n return getData() == null ? 0 : getData().size();\n }\n }", "TupleHeader getHeader() {\n return header;\n }", "private void addHeaderItems(final List<ItemBO> itemList)\n\t{\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal List<Integer> lineNumbersList = new ArrayList<Integer>(itemList.size());\n\t\t\tfinal List<ItemBO> headerItemsList = new ArrayList<ItemBO>();\n\t\t\tint processOrderLineNumber = 1;\n\t\t\tfor (final ItemBO anItem : itemList)\n\t\t\t{\n\t\t\t\tlineNumbersList.add(anItem.getLineNumber());\n\t\t\t\tif (ExternalSystem.EVRST == anItem.getExternalSystem())\n\t\t\t\t{\n\t\t\t\t\t//Header ItemBO for current ECC Item\n\t\t\t\t\tfinal ItemBO anHeader = new PartBO();\n\t\t\t\t\tanHeader.setDisplayPartNumber(anItem.getDisplayPartNumber());\n\t\t\t\t\tanHeader.setPartNumber(anItem.getPartNumber());\n\t\t\t\t\tanHeader.setComment(\"This is The Header Record :: \" + anItem.getPartNumber());\n\t\t\t\t\tanHeader.setInventory(anItem.getInventory());\n\t\t\t\t\tanHeader.setRequestedInventory(anItem.getRequestedInventory());\n\t\t\t\t\tanHeader.setScacCode(anItem.getScacCode());\n\t\t\t\t\tanHeader.setCarrierCode(anItem.getCarrierCode());\n\t\t\t\t\tanHeader.setShippingMethodCode(anItem.getShippingMethodCode());\n\t\t\t\t\tanHeader.setTransportationMethodCode(anItem.getTransportationMethodCode());\n\t\t\t\t\t((PartBO) anHeader).setHeader(true);\n\t\t\t\t\t((PartBO) anHeader).setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\tanHeader.setItemQty(anItem.getItemQty());\n\t\t\t\t\tanHeader.setExternalSystem(ExternalSystem.EVRST);\n\n\t\t\t\t\t//Make Sure Actual Item also has the same ProcessOrderLineNumber\n\t\t\t\t\tanItem.setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\theaderItemsList.add(anHeader);\n\t\t\t\t\tprocessOrderLineNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!headerItemsList.isEmpty())\n\t\t\t{\n\t\t\t\t//Find the Highest line number\n\t\t\t\tArrays.sort(lineNumbersList.toArray());\n\t\t\t\tint itemLineNumber = lineNumbersList.get(lineNumbersList.size() - 1);\n\t\t\t\tfor (final ItemBO headerItem : headerItemsList)\n\t\t\t\t{\n\t\t\t\t\theaderItem.setLineNumber(++itemLineNumber);\n\t\t\t\t}\n\t\t\t\t//Make Sure the Header Items are inserted first - Enforced by ECC RFC\n\t\t\t\titemList.addAll(0, headerItemsList);\n\t\t\t\tlogger.debug(\"addHeaderItems(...): Added Header Items for ECC Items \" + headerItemsList.size());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "ComponentHeaderType getHeader();", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "int getItem(int index);", "T addAtHead(T t) {\n return header.addAtHead(t);\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public String getWantedProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n String listedItemHeader = getElementText(pageFactory.listedItemHeader);\r\n return listedItemHeader;\r\n }", "StackType getFirstItem();", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "@Override\n public Object getGroup(int groupPosition)\n {\n return headers.get(groupPosition);\n }", "private String getHeaders(int index, int myArrayLength) {\n\t\t\n\t\tString myHeaders[] = new String[myArrayLength];\n\t\t\n\t\tmyHeaders[0] = \"Elements\";\n\t\tmyHeaders[1] = \" \";\n\t\tmyHeaders[2] = \"Lineal Search\";\n\t\tmyHeaders[3] = \" \";\n\t\tmyHeaders[4] = \"Binary Search\";\n\t\t\n\t\treturn myHeaders[index];\n\t\t\n\t}", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public abstract String getHeaderRow();", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public String getHeader();", "@Override\n\t\tpublic int getIntHeader(String name) {\n\t\t\treturn 0;\n\t\t}", "public String fieldHeader(int fld_i) { return flds[fld_i]; }", "public int getITEM() {\r\n return item;\r\n }", "@Override\n public Object getItem(int arg0) {\n return title[arg0];\n }", "public CSVItem getItemAt(int idx)\n\t{\n\t\treturn itemList.get(idx);\n\t}", "public String getHeaderField(int paramInt) {\n/* 278 */ return this.delegate.getHeaderField(paramInt);\n/* */ }", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }", "public PHeader getHeader() {\n\t\treturn header;\n\t}", "@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn arg0;\n\t\t}", "public LinkedListItr zeroth( )\n {\n return new LinkedListItr( header );\n }", "int getItems(int index);", "@Override\n\t\t\tpublic int getItemType(int realPosition) {\n\n\t\t\t\treturn realPosition % 5;\n\t\t\t}", "@Override\n\tpublic long getHeaderId(int position) {\n\t\treturn mModelRssItems.get(position).getPubdate().subSequence(0, 13)\n\t\t\t\t.charAt(12);\n\t}", "public String getHeader() {\n\t\treturn _header;\n\t}", "stockFilePT102.StockHeaderDocument.StockHeader getStockHeader();", "public byte[] getHeader() {\n\treturn header;\n }", "public abstract boolean isFirstLineHeader();", "R getFirstRowOrThrow();", "@Override\n\tpublic int getViewType() {\n\t\treturn RowType.HEADER_ITEM.ordinal();\n\t}", "@Override\r\n\t\t\tpublic Object getItem(int i) {\n\t\t\t\treturn i;\r\n\t\t\t}", "default V item( int i ) { return getDataAt( indexOfIndex( i ) ); }", "public String getHeaderNames(){return header.namesText;}", "E head() throws NoSuchElementException;", "@Test\n\tvoid withHeaderItemsWithWicketHeadNoDuplicates()\n\t{\n\t\ttester.startPage(SubPageWithHeaderItemsAndWicketHead.class);\n\t\tString responseAsString = tester.getLastResponseAsString();\n\n\t\t{\n\t\t\tint idxMetaPanelWicketHead = responseAsString\n\t\t\t\t.indexOf(\"meta name=\\\"panel-wicket-head\\\"\");\n\t\t\tint lastIdxMetaPanelWicketHead = responseAsString\n\t\t\t\t.lastIndexOf(\"meta name=\\\"panel-wicket-head\\\"\");\n\t\t\tassertEquals(idxMetaPanelWicketHead, lastIdxMetaPanelWicketHead);\n\t\t}\n\n\t\t{\n\t\t\tint idxWicketAjaxJs = responseAsString.indexOf(\"wicket-ajax-jquery.js\");\n\t\t\tint lastIdxWicketAjaxJs = responseAsString.lastIndexOf(\"wicket-ajax-jquery.js\");\n\t\t\tassertEquals(idxWicketAjaxJs, lastIdxWicketAjaxJs);\n\t\t}\n\n\t\t{\n\t\t\tint idxTitleElement = responseAsString\n\t\t\t\t.indexOf(\"<title>Apache Wicket Quickstart</title>\");\n\t\t\tint lastIdxTitleElement = responseAsString\n\t\t\t\t.lastIndexOf(\"<title>Apache Wicket Quickstart</title>\");\n\t\t\tassertEquals(idxTitleElement, lastIdxTitleElement);\n\t\t}\n\n\t\t{\n\t\t\tint idxMetaFromBasePage = responseAsString\n\t\t\t\t.indexOf(\"<meta name='fromBasePage' content='1'\");\n\t\t\tint lastIdxMetaFromBasePage = responseAsString\n\t\t\t\t.lastIndexOf(\"<meta name='fromBasePage' content='1'\");\n\t\t\tassertEquals(idxMetaFromBasePage, lastIdxMetaFromBasePage);\n\t\t}\n\n\t\t{\n\t\t\tint idxMetaFromSubPage = responseAsString\n\t\t\t\t.indexOf(\"<meta name=\\\"SubPageWithHeaderItemsAndWicketHead\\\"\");\n\t\t\tint lastIdxMetaFromSubPage = responseAsString\n\t\t\t\t.lastIndexOf(\"<meta name=\\\"SubPageWithHeaderItemsAndWicketHead\\\"\");\n\t\t\tassertEquals(idxMetaFromSubPage, lastIdxMetaFromSubPage);\n\t\t}\n\t}", "protected int getSectionByPosition(int position) {\r\n \t\tint result = INVALID_POSITION;\r\n \r\n\t\tfor (int i: (mAdapter.getHeaders().keySet())) {\r\n \t\t\tif (position < i) break;\r\n \t\t\telse result = i;\r\n \t\t}\r\n \r\n \t\treturn result;\r\n \t}", "private ArrayList<String> getArrayListEmptiesToo(String header) {\r\n ArrayList<String> headers = new ArrayList<>();\r\n int i = 0;\r\n int j;\r\n String head;\r\n while (header.indexOf(\"\\t\", i) > 0) {\r\n j = header.indexOf(\"\\t\", i);\r\n head = header.substring(i, j);\r\n //A.log(\"getArrayListEmptiesToo() head:\" + head + \" i:\" + i + \" j:\" + j);\r\n i = j + 1;\r\n if (\"\".equals(head)) {\r\n head = \" \";\r\n //s_log.warn(\"getArrayListEmptiesToo() head!:\" + head);\r\n }\r\n headers.add(head);\r\n }\r\n\r\n head = header.substring(i);\r\n if (\"\".equals(head)) {\r\n head = \" \";\r\n }\r\n //s_log.warn(\"getArrayListEmptiesToo() head:\" + head + \" i:\" + i);\r\n headers.add(head);\r\n\r\n //s_log.warn(\"getArrayListEmptiesToo() size:\" + headers.size() + \" header:\" + headers);\r\n return headers;\r\n }", "public E getHead() {\r\n\t\tif (head == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(0).data;\t\r\n\t\t}\r\n\t}", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public Object getItem(int position) {\n\t\treturn OReportOne.get(position);\n\t}", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public NetFlowHeader getHeader() throws IOException {\n if (header == null) {\n header = prepareHeader();\n }\n\n return header;\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public String headerLine() {\n return headerLine;\n }", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public int getHeading()\n\t{\n\t\treturn heading;\n\t}", "int size() {\n return this.header.size();\n }", "public Header getHeader() {\n\t\treturn this.header;\n\t}", "public HeaderData get(String key){\r\n\t\treturn map.get(key);\r\n\t}", "@Test\n void httpEntityHasHeader() {\n assertEquals(expectedKeyValue, nsClient.getHttpEntity()\n .getHeaders().getFirst(expectedKeyName));\n }", "@Override\n public ElementHeader getElementHeader()\n {\n return elementHeader;\n }", "public String getbyHeader(){\n String byHed=driver.findElement(byHeader).getText();\n return byHed;\n }", "public abstract String header();", "private void add0(int h, int i, final String name, final String value) {\n HeaderEntry e = entries[i];\n HeaderEntry newEntry;\n entries[i] = newEntry = new HeaderEntry(h, name, value);\n newEntry.next = e;\n\n // Update the linked list.\n newEntry.addBefore(head);\n }", "PurchaseOrderHeader getPurchaseOrderHeaderWhole(long pohId);", "public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public Object getGroup(int groupPosition) {\n return this._listDataHeader.get(groupPosition);\n }", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn data.get(arg0);\r\n\t}", "public String getHeader(final String name) {\n final Collection<String> strings = headers.get(name);\n return strings == null ? null : strings.iterator().next();\n }", "public int getItemNo() {\n return itemNo;\n }", "@Override\n public Object getItem(int arg0) {\n return arg0;\n }", "@Override\n public Object getItem(int arg0) {\n return arg0;\n }", "@Override\n public Object getItem(int arg0) {\n return arg0;\n }", "public T item() throws IOException, NoSuchElementException;", "PageHeader getPageHeader();", "PageHeader getPageHeader();", "public String getFirstItemDescription() {\r\n return firstItemDescription;\r\n }", "@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn grid_names.get(arg0);\r\n\t}", "@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn mRecords.get(arg0);\n\t\t}", "private PageId getHeaderPage(RelationInfo relInfo) {\n\t\treturn new PageId(0, relInfo.getFileIdx());\n\t}", "@Override\n public long getHeaderId(int position) {\n // return the first character of the country as ID because this is what\n // headers are based upon\n return wordList.get(position).getBox();\n }", "public native String getItem(Number index);", "public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "public String getHeader(String name, String delimiter) throws MessagingException {\n/* 382 */ if (this.headers == null)\n/* 383 */ loadHeaders(); \n/* 384 */ return this.headers.getHeader(name, delimiter);\n/* */ }", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "int head(){\n if(isEmpty()!=1){\n return values[0];\n }\n return -1;\n }", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }" ]
[ "0.6489713", "0.644132", "0.6312941", "0.6210191", "0.6125765", "0.6097907", "0.60889804", "0.6035356", "0.60130143", "0.6012538", "0.5985251", "0.59663284", "0.59625447", "0.5949381", "0.59273124", "0.5863609", "0.5849228", "0.5802239", "0.5797639", "0.5785042", "0.5778471", "0.57703644", "0.5767711", "0.57604814", "0.57041866", "0.57011753", "0.57011753", "0.56964386", "0.56888795", "0.5687084", "0.5658624", "0.5648352", "0.5647185", "0.5646266", "0.5643468", "0.5612843", "0.55993193", "0.5596488", "0.5562045", "0.5557992", "0.5552967", "0.5542394", "0.5537609", "0.55364", "0.55322707", "0.5530349", "0.5528615", "0.552844", "0.55257905", "0.55178577", "0.55130076", "0.55011815", "0.5497311", "0.549432", "0.5492011", "0.54900193", "0.5489705", "0.54879355", "0.5477919", "0.5476932", "0.54764354", "0.547388", "0.5467217", "0.5459901", "0.54532206", "0.5448909", "0.54488206", "0.5445311", "0.54357016", "0.5435552", "0.5433193", "0.5427653", "0.5427567", "0.5420944", "0.5420703", "0.5414282", "0.541081", "0.54087216", "0.54087156", "0.5407096", "0.54068583", "0.5406556", "0.5400313", "0.53995335", "0.53995335", "0.53995335", "0.5387967", "0.5387326", "0.5387326", "0.53870106", "0.53811365", "0.53804743", "0.5361574", "0.5358118", "0.53555715", "0.5353939", "0.5352652", "0.53378737", "0.53348184", "0.53273576", "0.53270894" ]
0.0
-1
Release Camera and cleanup.
public void destroy(){ Log.d(TAG, "onDestroy called"); runRunnable = false; if (mCamera != null) { mCamera.stopPreview(); mCamera.release(); mCamera = null; } isPaused = true; // TODO stop executorService //executor.shutdown(); cameraThread.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.release(); // release the camera for other applications\n mCamera = null;\n }\n }", "private static void releaseCameraAndPreview() {\n if (cam != null) {\n cam.release();\n cam = null;\n }\n }", "private void releaseCamera() {\n if(camera != null) {\n camera.stopPreview();\n camera.release();\n camera = null;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n }", "void releaseCamera() {\n\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n }\n }", "public void releaseCamera()\n {\n\n if (mcCamera != null)\n {\n //stop the preview\n mcCamera.stopPreview();\n //release the camera\n mcCamera.release();\n //clear out the camera\n mcCamera = null;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n }", "private void closeCamera() {\n if (null != cameraDevice) {\n cameraDevice.close();\n cameraDevice = null;\n }\n if (null != imageReader) {\n imageReader.close();\n imageReader = null;\n }\n }", "public void releaseCameraAndPreview() {\n if (mCameraActivity.mCamera != null) {\n mCameraActivity.mCamera.setPreviewCallback(null);\n mCameraActivity.mCamera.stopPreview();\n mImageCapture.mSurfaceHolder.removeCallback(mCameraPreview);\n mCameraPreview.surfaceDestroyed(mImageCapture.mSurfaceHolder);\n mSurfaceHolder.getSurface().release();\n mSurfaceHolder = null;\n releaseCamera();\n }\n }", "public synchronized void closeDriver() {\n if (camera != null) {\n camera.getCamera().release();\n camera = null;\n }\n }", "protected void closeCamera() {\n try {\n mCameraOpenCloseLock.acquire();\n if (null != mCameraDevice) {\n mCameraDevice.close();\n mCameraDevice = null;\n }\n if (null != mMediaRecorder) {\n mMediaRecorder.release();\n mMediaRecorder = null;\n }\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Interrupted while trying to lock camera closing.\");\n } finally {\n mCameraOpenCloseLock.release();\n }\n }", "private void shutdown() {\n mMediaRecorder.reset();\n mMediaRecorder.release();\n mCamera.release();\n\n // once the objects have been released they can't be reused\n mMediaRecorder = null;\n mCamera = null;\n }", "@Override\n public void surfaceDestroyed(SurfaceHolder holder)\n {\n this.releaseCamera();\n }", "public void closeCamera()\n {\n }", "protected void releaseVideoCapturebjects(boolean stopThread) {\n /** release video capture if !null */\n if (mVideoCapture != null) {\n\n /**\n * TODO:: need method to release camera2\n */\n try {\n mVideoCapture.mPreviewSession.stopRepeating();\n mVideoCapture.mPreviewSession.abortCaptures();\n mVideoCapture.mPreviewSession.close();\n mVideoCapture.mPreviewSession = null;\n\n mVideoCapture.mMediaRecorder.release();\n mVideoCapture.closeCamera();\n mVideoCapture.releaseVideoPreview();\n mVideoCapture = null;\n\n } catch (Exception e) {\n mVideoCapture.mPreviewSession = null;\n mVideoCapture = null;\n }\n }\n }", "public void closeDriver() {\n\t\tif (camera != null) {\n\t\t\tcamera.release();\n\t\t\tcamera = null;\n\t\t\tinitialized = false;\n\t\t}\n\t}", "public final void destroy(){\n stop();\n LIBRARY.CLEyeDestroyCamera(camera_);\n camera_ = null;\n PS3_LIST_.remove(this);\n }", "public void release() {\n\n mTextureRender = null;\n mSurfaceTexture = null;\n }", "public void release() {\r\n if (BuildConfig.DEBUG) {\r\n HiLog.debug(LABEL, \"release()\", new Object[0]);\r\n }\r\n if (!this.mNativeSurfaceHandle.equals(BigInteger.ZERO)) {\r\n this.mAgpContext.getEngine().destroySwapchain();\r\n Core.destroyAndroidSurface(this.mAgpContext.getDevice(), this.mNativeSurfaceHandle);\r\n this.mNativeSurfaceHandle = BigInteger.ZERO;\r\n }\r\n this.mAgpContext = null;\r\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n \tif(CameraActivity.mCamera == null) return; \n \tCameraActivity.mCamera.release();\n \tCameraActivity.mCamera = null;\n }", "@Override\r\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(myCamera!=null){\r\n\t\t\tmyCamera.stopPreview();\r\n\t\t\tmyCamera.release();//釋放相機\r\n\t\t\tmyCamera=null;\r\n\t\t}\r\n\t}", "public void releaseOCR(){\n \tif(baseApi != null){ baseApi.end(); baseApi = null; } \n\t\tmState = State.UNINITIALIZED;\n }", "public void releaseVideoPreview() {\n previewView.removeView(mVideoCapture.mTextureView);\n }", "private void stopAcquisition() {\n if (this.timer != null && !this.timer.isShutdown()) {\n try {\n // stop the timer\n this.timer.shutdown();\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n // log any exception\n System.err.println(\"Exception in stopping the frame capture, trying to release the camera now... \" + e);\n }\n }\n\n if (this.capture.isOpened()) {\n // release the camera\n this.capture.release();\n }\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n camera.stopPreview();\n camera.release();\n camera = null;\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n stopCamera();\n }", "private void closeCamera() {\n if (mCameraDevice != null) {\n mCameraDevice.close();\n mCameraDevice = null;\n }\n if (mIsRecording) {\n long elapsedMillis = SystemClock.elapsedRealtime() - mTimer.getBase();\n mTimer.stop();\n mTimer.setVisibility(View.GONE);\n scrollContents();\n mIsRecording = false;\n mRecordButton.setImageResource(R.drawable.ic_record_white);\n mMediaRecorder.stop();\n mMediaRecorder.reset();\n\n //Scan the file to appear in the device studio\n Intent mediaScannerIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n mediaScannerIntent.setData(Uri.fromFile(new File(mVideoFilePath)));\n sendBroadcast(mediaScannerIntent);\n\n logFirebaseVideoEvent(elapsedMillis);\n\n }\n if (mMediaRecorder != null) {\n mMediaRecorder.release();\n mMediaRecorder = null;\n }\n if (mAnimator != null && mAnimator.isStarted()) {\n mAnimator.cancel();\n }\n }", "protected static void stopInternalCamera() {\n if (internalCamera != null) {\n internalCamera.stopStreaming();\n internalCamera.closeCameraDevice();\n }\n }", "private void releaseMediaRecorder() {\n if (mediaRecorder == null) return;\n\n mediaRecorder.stop();\n mediaRecorder.reset(); // clear recorder configuration\n }", "public void releaseImagePreview() {\n previewView.removeView(mImageCapture.mCameraPreview);\n mImageCapture.mCameraPreview = null;\n }", "@Override\r\n\tpublic void surfaceDestroyed(SurfaceHolder holder) \r\n\t{\n\t\tmCamera.stopPreview();\r\n\t\tmCamera.release(); \r\n\t}", "private void stopAcquisition() {\r\n if (this.timer != null && !this.timer.isShutdown()) {\r\n try {\r\n // stop the timer\r\n this.timer.shutdown();\r\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\r\n } catch (InterruptedException e) {\r\n // log any exception\r\n System.err.println(\"Exception in stopping the frame capture, trying to close the video now... \" + e);\r\n }\r\n }\r\n\r\n if (this.capture.isOpened()) {\r\n // release the camera\r\n this.capture.release();\r\n }\r\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(mCamera != null)\n\t\t\tmCamera.release();\n\t}", "public void stop(){\n if (mCamera != null){\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n if (mHolder != null) {\n mHolder.getSurface().release();\n mHolder = null;\n }\n }", "@Override\n protected void onPause() {\n ReleaseCamera();\n super.onPause();\n }", "public void release() {\n changeToUninitialized();\n mHasDisplay = false;\n mPlayer.release();\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n camera.stopPreview();\n camera.release();\n camera = null;\n previewing = false;\n }", "public void release() {\n if (mEglDisplay != null && mEglSurface != null && mEglContext != null) {\n EGL14.eglMakeCurrent(this.mEglDisplay, this.mEglSurface, this.mEglSurface, this.mEglContext);\n EGL14.eglDestroySurface(mEglDisplay, mEglSurface);\n EGL14.eglDestroyContext(mEglDisplay, mEglContext);\n EGL14.eglTerminate(mEglDisplay);\n }\n EGL14.eglMakeCurrent(mEglDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);\n }", "private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}", "@Override\r\n public void release() {\r\n videoRendererStatus = NexVideoRendererStatus.VIDEO_RENDERER_NONE;\r\n if(mBaseView instanceof NexSurfaceTextureView) {\r\n ((NexSurfaceTextureView)mBaseView).release();\r\n }\r\n mNexPlayer = null;\r\n mSurface.release();\r\n setListener(null);\r\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n if (mCamera != null) {\n mCamera.setPreviewCallback(null);\n mCamera.stopPreview();\n mCamera.release();\n }\n mCamera = null;\n }", "public void release() {\n if (argonGLDisplay != EGL10.EGL_NO_DISPLAY) {\n // Android is unusual in that it uses a reference-counted EGLDisplay. So for\n // every eglInitialize() we need an eglTerminate().\n argonEGL.eglMakeCurrent(argonGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE,\n \t\tEGL10.EGL_NO_CONTEXT);\n argonEGL.eglDestroyContext(argonGLDisplay, argonGLContext);\n //EGL10.eglReleaseThread();\n argonEGL.eglTerminate(argonGLDisplay);\n }\n\n argonGLDisplay = EGL10.EGL_NO_DISPLAY;\n argonGLContext = EGL10.EGL_NO_CONTEXT;\n mEGLConfig = null;\n }", "private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n }", "@Override\n\tpublic void onDestroy() {\n\t\t\n\t\tLog.d(TAG,\"onDestroy\");\n\t\tif(mCameraDevices!=null){\n\t\t\tmCameraDevices.release();\n\t\t}\n\t\tshowFloatTool(false);\n\t\tsuper.onDestroy();\n\t}", "public void obtainCameraOrFinish() {\n mCamera = getCameraInstance();\n if (mCamera == null) {\n Toast.makeText(VideoCapture.getSelf(), \"Fail to get Camera\", Toast.LENGTH_LONG).show();\n VideoCapture.getSelf().finish();\n }\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(camera != null){\r\n\t\t\tcamera.stopPreview();\r\n\t\t\tcamera.release();\r\n\t\t\tcamera = null;\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\t\t\tif (mCamera != null) {\n\t\t\t\t\tmCamera.stopPreview();\t\t\t\t\t\t\t\t\t\t//Stop the preview \n\t\t\t\t}\n\t\t\t}", "public void freeCamera(final int id){\n\t\t//android.util.Log.d(TAG,\"freeCamera(\"+id+\")\");\n\t\tthis.cameras.delete(id);\n\t}", "public void release() {\n synchronized (mLock) {\n super.release();\n detachMediaController();\n setContentUri(PlayMode.NONE, null);\n setContentFd(PlayMode.NONE, null);\n setCurrentState(State.RELEASED);\n mContext = null;\n }\n }", "@Override\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\tLog.e(TAG, \"Surface Destroyed\");\n\t\tcamera.stopPreview();\n\t\tmPreviewRunning = false;\n\t\tcamera.release();\n\t\tcamera = null;\n\t}", "void cameraClosed();", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (mPreview != null) {\n mPreview.release();\n }\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (mPreview != null) {\n mPreview.release();\n }\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n\t\tcamera.stopPreview();\n\t\tif (camera != null){\n\t\t\tcamera.release();\n\t\t}\n\t\tautoFocusCallback.setHandler(null, 0);\n\t\tautoFocusCallback=null;\n\t\thandler=null;\n\t}", "public void onPause() {\n releaseCamera();\n }", "public void release() {\n\t\tif (state == State.RECORDING) {\n\t\t\tstopRecord();\n\t\t}\n\t\tif (audioRecorder != null) {\n\t\t\taudioRecorder.release();\n\t\t}\n\t\tstate = State.INITIALIZING;\n\t\tsRecorderManager = null;\n\t\taudioRecorder = null;\n\t}", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n sliceBuffer = null;\r\n super.finalize();\r\n }", "public void release() {\n\t\t\treset();\n\t\t\tmCurrentMediaPlayer.release();\n\t\t}", "public void finalize() {\r\n srcImage = null;\r\n destImage = null;\r\n buffer = null;\r\n validBuffer = null;\r\n idealBuffer = null;\r\n objectBuffer = null;\r\n super.finalize();\r\n }", "@Override\n public void stopCamera() {\n super.stopCamera();\n\n if(cameraListener != null)\n cameraListener.onCameraStop();\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (theCamera != null){\n theCamera.stopPreview();\n theCamera.release();\n theCamera = null;\n }\n }", "public void freeCameras(){\n\t\t//android.util.Log.d(TAG,\"freeCameras()\");\n\t\tfinal int size = this.cameras.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.cameras.delete(this.cameras.keyAt(index));\n\t\t}\n\t}", "@Override\r\n protected void onDestroy() {\n \r\n \r\n \r\n if(DJIDrone.getDjiCamera() != null)\r\n DJIDrone.getDjiCamera().setReceivedVideoDataCallBack(null);\r\n mDjiGLSurfaceView.destroy();\r\n super.onDestroy();\r\n }", "public final void release() { \n native_release();\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tvideoView.release();\r\n\t}", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n super.finalize();\r\n }", "@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \tmActivities.removeActivity(\"AddCamera\");\n \tunregisterReceiver(receiver);\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"onDestroy\");\n// mPhotoLoader.stop();\n if (mMatrixCursor != null)\n mMatrixCursor.close();\n }", "@Override\n\t\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\t\tif (DEBUG>=2) Log.d(TAG, \"surfaceDestroyed'd\");\n\n\t\t\t// Surface will be destroyed when we return, so stop the preview.\n\t\t\t// Because the CameraDevice object is not a shared resource, it's\n\t\t\t// very important to release it when the activity is paused.\n\t\t\tif (mCamera != null) {\n\t\t\t\tSHOWING_PREVIEW = false;\n\t\t\t\tmCamera.stopPreview();\n\t\t\t}\n\n\t\t\t//Log.d(TAG, \"surfaceDestroyed'd finish\");\n\t\t}", "protected synchronized void cleanup() {\n frameStorage.clear();\n if (frameIterator != null) {\n try {\n frameIterator.close();\n } catch (IOException ex) {\n logger.error(Thread.currentThread().getName() + \" IOException while closing the mediaReader\", ex);\n }\n }\n status = Status.STOPPED;\n frameIterator = null;\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n mCamera.stopPreview();\n mCamera.release();\n mHolder.removeCallback(mPreview);\n preview = false;\n }", "@Override\n public void releaseVideoFrames() {\n\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n if (cspPreview != null) {\n cspPreview.release();\n }\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMediaPlayUtil.getInstance().release();\n\t\tMediaPlayUtil.getInstance().stop();\n\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMediaPlayUtil.getInstance().stop();\n\t\tMediaPlayUtil.getInstance().release();\n\t}", "public void release()\n {\n _pixxConfiguration=null;\n }", "@Override\r\n protected void onDestroy() {\r\n Log.d(LOGTAG, \"onDestroy\");\r\n super.onDestroy();\r\n\r\n try {\r\n vuforiaAppSession.stopAR();\r\n } catch (ArException e) {\r\n Log.e(LOGTAG, e.getString());\r\n }\r\n\r\n // Unload texture:\r\n mTextures.clear();\r\n mTextures = null;\r\n\r\n System.gc();\r\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n\n stopRecording();\n }", "@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }", "public void stop() {\n synchronized (mLock) {\n //if (!mRunning)\n //{\n // throw new IllegalStateException(\"CameraStreamer is already stopped\");\n //} // if\n \t\n \tLog.d(TAG, \"Stop\");\n \t\n mRunning = false;\n if (mMJpegHttpStreamer != null) {\n mMJpegHttpStreamer.stop();\n mMJpegHttpStreamer = null;\n } // if\n \n if (mCamera != null) {\n mCamera.release();\n mCamera = null;\n } // if\n } // synchronized\n mLooper.quit();\n }", "@Override\n public void dispose() {\n Assets.instance.dispose();\n batch.dispose();\n grayScaleView.dispose();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//\t\tLog.e(\"destroy\", \"CameraActivity �׾�Ф�\");\n\t\t//\t\tsendMessage(\"exit\");\n\t\t//\t\tmodeEasyActivity.finish();\n\t}", "public void finalize() {\r\n\t\tdestImage = null;\r\n\t\tsrcImage = null;\r\n\t\tsuper.finalize();\r\n\t}", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n mask = null;\r\n\r\n if (keepProgressBar == false) {\r\n disposeProgressBar();\r\n }\r\n\r\n try {\r\n super.finalize();\r\n } catch (Throwable er) { }\r\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n releasePlayer();\n mMediaSession.setActive(false);\n }", "public void release() {\n HiLog.info(LOG_LABEL, \"release.\", new Object[0]);\n this.mCallMapById.clear();\n this.mRemote = null;\n disconnect();\n destroyHandler();\n this.mContext = null;\n this.mPendingCallAudioState = null;\n this.mCurrentCallAudioState = null;\n this.mPendingCanAddCall = null;\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n this.mIsConnected = false;\n this.mIsBound = false;\n this.mIsInCallServiceBinded = false;\n this.mIsPreConnected = false;\n Listener listener = this.mListener;\n if (listener != null) {\n listener.onReleased(this);\n this.mListener = null;\n }\n }", "private void releaseMediaPlayer(){\n if (mediaPlayer != null) {\n mediaPlayer.release();\n mediaPlayer = null;\n }\n }", "private void releasePlayer() {\n mVideoView.stopPlayback();\n }", "public Camera() {\n\t\treset();\n\t}", "@Override\n public void surfaceDestroyed(SurfaceHolder arg0) {\n release();\n threadFlag = false;\n }", "public void finalize() {\r\n fileName = null;\r\n fileDir = null;\r\n fileHeader = null;\r\n\r\n fileInfo = null;\r\n image = null;\r\n vr = null;\r\n\r\n if (rawFile != null) {\r\n\r\n try {\r\n rawFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n rawFile.finalize();\r\n }\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n raFile = null;\r\n }\r\n\r\n rawFile = null;\r\n nameSQ = null;\r\n jpegData = null;\r\n\r\n try {\r\n super.finalize();\r\n } catch (final Throwable er) {\r\n // ignore errors during memory cleanup..\r\n }\r\n }", "private void releaseResouces(boolean releaseMediaPlayer) {\n if (releaseMediaPlayer && mMediaPlayer != null) {\n mMediaPlayer.reset();\n mMediaPlayer.release();\n mMediaPlayer = null;\n }\n\t}", "public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n \tmediaplayer.release();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\treleaseCamera();\n\t}", "public void release(){\n\t\tthis.motor.forward();\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tquitAllFocus();\n\t\timg.setImageBitmap(null);\n\t\tclearMemory();\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\t//GARBAGE COLLECTOR\n\t\t\tSystem.gc();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public void dispose() {\r\n\r\n// ByteBuffer tmp = ByteBuffer.allocateDirect(4);\r\n// tmp.order(ByteOrder.nativeOrder());\r\n// IntBuffer handle = tmp.asIntBuffer();\r\n IntBuffer handle = BufferUtils.createIntBuffer(1);\r\n\r\n// colorTexture.dispose();\r\n if (hasDepth) {\r\n handle.put(depthbufferHandle);\r\n handle.flip();\r\n glDeleteRenderbuffersEXT(handle);\r\n }\r\n\r\n handle.put(framebufferHandle);\r\n handle.flip();\r\n glDeleteFramebuffersEXT(handle);\r\n\r\n }" ]
[ "0.8783288", "0.86759454", "0.85606974", "0.8538715", "0.85302943", "0.8492623", "0.84389055", "0.84389055", "0.8203248", "0.79976445", "0.75981474", "0.74966437", "0.73964405", "0.7384331", "0.7383074", "0.7332601", "0.73028404", "0.7228383", "0.7226533", "0.71962565", "0.7014874", "0.70147276", "0.69965374", "0.69943345", "0.6983632", "0.6905989", "0.6883753", "0.68756115", "0.68552357", "0.68496436", "0.6836127", "0.6811231", "0.6810362", "0.6805069", "0.67962885", "0.6788531", "0.67537457", "0.66899174", "0.6688907", "0.66846114", "0.66640973", "0.66231614", "0.6611841", "0.6585657", "0.65856475", "0.6584949", "0.6579601", "0.65780723", "0.6560568", "0.6555931", "0.65395254", "0.65311795", "0.6488257", "0.6484765", "0.6484765", "0.6475076", "0.6473532", "0.6465473", "0.6456788", "0.6434331", "0.6418705", "0.64107895", "0.639279", "0.63891304", "0.6383994", "0.63816035", "0.637633", "0.634397", "0.6328209", "0.6326148", "0.63147354", "0.6309904", "0.63053304", "0.63052076", "0.6299532", "0.6296603", "0.6291584", "0.62811846", "0.6278596", "0.6273876", "0.62683326", "0.6265008", "0.6244993", "0.6240482", "0.6227916", "0.6218047", "0.62159294", "0.6201108", "0.61979544", "0.6194668", "0.618688", "0.6182798", "0.6181247", "0.61590636", "0.6153703", "0.61437273", "0.6137286", "0.61332065", "0.61224693", "0.61111736" ]
0.71211326
20
Take a picture with the camera, this also handles the Mat objects
private Tuple<PatternCoordinates, Mat> pair(){ mCamera.takePicture(null, null, jpegCallBack); Tuple<PatternCoordinates, Mat> patternAndImagePair = null; switch(GlobalResources.getInstance().getImageSettings().getBackgroundMode()){ case ImageSettings.BACKGROUND_MODE_RGB: patternAndImagePair = patternDetectorAlgorithm.find(rgba, binary, false); break; case ImageSettings.BACKGROUND_MODE_GRAYSCALE: patternAndImagePair = patternDetectorAlgorithm.find(grey, binary, true); break; case ImageSettings.BACKGROUND_MODE_BINARY: patternAndImagePair = patternDetectorAlgorithm.find(binary, binary, true); } GlobalResources.getInstance().updateImage(patternAndImagePair.element2); return patternAndImagePair; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }", "private void takePicture() {\n\n captureStillPicture();\n }", "private void takePicture() {\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n\n }", "private void dispatchTakePictureIntent() { // to camera\n\n // must be\n StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();\n StrictMode.setVmPolicy(builder.build());\n\n //stworzenie nazwy pliku dla nowego zdjęcia, bedzie nadpisywana za każdym razem\n File outFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"example.jpg\");\n\n //zapisanie ścieżki do nowego zdjęcia z aparatu\n mCameraFileName = outFile.toString();\n Uri outUri = Uri.fromFile(outFile);\n Intent intent = new Intent();\n intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outUri);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n } else {\n Toast.makeText(this, \"External storage not available\", Toast.LENGTH_SHORT).show();\n }\n }", "public void takePictureFromCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, CAMERA_REQUEST_CODE);\n\n }", "public RoeImage takePicture() \r\n {\r\n // return variable\r\n RoeImage result = new RoeImage();\r\n \r\n // take picture \r\n this.cam.read(this.frame);\r\n \r\n // update timestamp for image capturing\r\n this.timestamp = System.currentTimeMillis();\r\n \r\n // add picture to result\r\n result.SetImage(this.frame);\r\n \r\n // add timestamp of captured image\r\n result.setTimeStamp(this.timestamp);\r\n\r\n // the image captured with properties\r\n return result;\r\n }", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public void takePicture()\n {\n\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n startActivityForResult(cameraIntent, TAKE_PHOTO_CODE);\n }", "@Override\n public void imageFromCamera() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }", "public void toTakeAPicture(View view) {\n requestCameraPermissions();\n Intent launchCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(launchCamera, Constants.CAM_REQUEST);\n\n\n\n }", "protected void open_camera_and_save_image() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Ensure that there is a camera activity to handle the intent.\n if(intent.resolveActivity(getPackageManager()) != null) {\n // create the file where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException e) {\n // error occurred while creating the file\n result.setText(R.string.fail_in_creating_photo);\n }\n\n if(photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.jiankaiwang.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n\n // pass to another external activity\n startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n }\n }\n }", "@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n /*apply image effects to new frame*/\n Mat mat= hangman.decapitate(inputFrame);\n\n /*check if users clicked the capture button and if external storage is writable for save it*/\n if(isToSaveBitmap && isExternalStorageWritable()){\n isToSaveBitmap=false;\n Bitmap bmp;\n try {\n bmp = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(mat, bmp);\n File dir = getAlbumStorageDir(\"hangman\");\n String path =dir.getPath()+File.separator+ \"hangman\" +System.currentTimeMillis() + \".JPG\";\n File capture= new File(path);\n\n OutputStream out = null;\n try {\n capture.createNewFile();\n out = new FileOutputStream(capture);\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n\n /*Inform the media store that a new image was saved*/\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());\n values.put(MediaStore.Images.Media.MIME_TYPE, \"image/jpeg\");\n values.put(MediaStore.MediaColumns.DATA, path);\n getBaseContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n /*if app was called with intent image capture */\n if(intentImageCapture){\n Intent result = new Intent(\"com.example.RESULT_ACTION\");\n result.setData(Uri.fromFile(capture));\n result.putExtra(Intent.EXTRA_STREAM,capture);\n result.setType(\"image/jpg\");\n setResult(Activity.RESULT_OK, result);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n catch (CvException e) {\n Log.e(\"Exception\", e.getMessage());\n e.printStackTrace();\n }\n }\n return mat;\n }", "@Override\n public void onClick(View v) {\n Cam.takePicture(shutterCallback, null, mPicture);\n// Cam.takePicture();\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent ( MediaStore.ACTION_IMAGE_CAPTURE );\n //dam bao chi co mot hoat dodng camera\n if (takePictureIntent.resolveActivity ( getPackageManager () ) != null) {\n // tao file ma anh gui den\n File photoFile = null;\n try {\n photoFile = createImageFile ();\n } catch (IOException ex) {\n //ERROR\n }\n // neu co file gui anh vao photoFIle\n if (photoFile != null) {\n pathToFile = photoFile.getAbsolutePath ();\n Uri photoURI = FileProvider.getUriForFile ( this ,\n \"com.example.diem_danh_sv.fileprovider\" ,\n photoFile );\n takePictureIntent.putExtra ( MediaStore.EXTRA_OUTPUT , photoURI );\n startActivityForResult ( takePictureIntent , REQUEST_ID_IMAGE_CAPTURE );\n }\n }\n }", "public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}", "private void clickpic() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // Open default camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\n // start the image capture Intent\n startActivityForResult(intent, 100);\n\n\n } else {\n Toast.makeText(getApplication(), \"Camera not supported\", Toast.LENGTH_LONG).show();\n }\n }", "public void onCameraPressed(View view) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\r\n\r\n // create a file handle for the phoot that will be taken\r\n this.photoFile = getFileForPhoto(this.filename);\r\n Uri fileProvider = FileProvider.getUriForFile(PersonDetailsActivity.this, \"com.example.labtest1\", this.photoFile);\r\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\r\n\r\n // Try to open the camera app\r\n if (intent.resolveActivity(getPackageManager()) != null) {\r\n startActivityForResult(intent, TAKE_PHOTO_ACTIVITY_REQUEST_CODE);\r\n }\r\n }", "@Override // com.master.cameralibrary.CameraViewImpl\n public void takePicture() {\n if (!isCameraOpened()) {\n throw new IllegalStateException(\"Camera is not ready. Call start() before takePicture().\");\n } else if (getAutoFocus()) {\n this.mCamera.cancelAutoFocus();\n this.mCamera.autoFocus(new Camera.AutoFocusCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass2 */\n\n public void onAutoFocus(boolean z, Camera camera) {\n Camera1.this.takePictureInternal();\n }\n });\n } else {\n takePictureInternal();\n }\n }", "public static void letCamera(Activity activity) {\n\t\tIntent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tstrImgPath = Environment.getExternalStorageDirectory().toString()\n\t\t\t\t+ \"/dlion/\";// �����Ƭ���ļ���\n\t\tString fileName = new SimpleDateFormat(\"yyyyMMddHHmmss\")\n\t\t\t\t.format(new Date()) + \".jpg\";// ��Ƭ����\n\t\tFile out = new File(strImgPath);\n\t\tif (!out.exists()) {\n\t\t\tout.mkdirs();\n\t\t}\n\t\tout = new File(strImgPath, fileName);\n\t\tstrImgPath = strImgPath + fileName;// ����Ƭ�ľ���·��\n\n\t\tUri uri = Uri.fromFile(out);\n\t\timageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);\n\t\timageCaptureIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 2);\n\t\tactivity.startActivityForResult(imageCaptureIntent, 1);\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tLog.d(\"Camara\", \"Esta antes de capturar la imagen\");\n\t\t\t\t\t\tmCamera.takePicture(null, null, mPicture);\n\t\t\t\t\t\t\n\t\t\t\t\t}", "private void openCamera() {\n Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // intent.setAction(Intent.ACTION_PICK);\n // intent.putExtra(MediaStore.EXTRA_OUTPUT,Image_uri);\n startActivityForResult(intent, camera_image_code);\n\n }", "private void takePicture() {\n lockFocus();\n }", "private void takePicture() {\n boolean hasPermission = parentActivity.hasPermissionToTakePhoto();\n if (hasPermission) {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getContext().getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // Continue only if the File was successfully created\n if (photoFile != null) {\n photoURI = FileProvider.getUriForFile(getContext(),\n \"saarland.cispa.trust.cispabay.file_provider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, RESULT_OK);\n }\n }\n\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n public void captureFromCamera(View view) {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Make sure that the user has given camera permissions.\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"Camera permission denied\");\n\n // If permission is denied, ask for permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n MY_PERMISSIONS_REQUEST_CAMERA);\n }\n else {\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n Log.e(TAG, \"Error creating file.\");\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.android.fileprovider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, CAMERA_REQUEST_CODE);\n }\n }\n }\n }", "public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }", "private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "private void takeAndSave(){\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Ensure there's a camera\n if(takePictureIntent.resolveActivity(getPackageManager())!=null){\n File photoFile = null;\n try{\n photoFile = createImageFile();\n }catch (IOException e){\n //Error message, maybe print out\n exit();\n }\n if(photoFile != null){\n Uri photoURI = FileProvider.getUriForFile(this, \"com.example.android.fileprovider\",photoFile);\n takePictureIntent.putExtra(MediaStore.Extra_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n }", "public void onCaptureClick(View button){\n\t\tcamera.takePicture(null, null, this);\n\t}", "private void launchCamera() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the temporary File where the photo should go\n try {\n photoFile = createTempImageFile(PhotoActivity.this);\n } catch (IOException ex) {\n // Error occurred while creating the File\n ex.printStackTrace();\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n\n // Get the path of the temporary file\n mTempPhotoPath = photoFile.getAbsolutePath();\n\n // Get the content URI for the image file\n Uri photoURI = FileProvider.getUriForFile(this,\n FILE_PROVIDER_AUTHORITY,\n photoFile);\n\n // Add the URI so the camera can store the image\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n\n // Launch the camera activity\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }\n }", "protected void startCamera() {\n profileImageCaptured = new File(\n Environment.getExternalStorageDirectory() + \"/\" + \"temp.png\");\n if (profileImageCaptured.exists())\n profileImageCaptured.delete();\n\n outputFileUri = Uri.fromFile(profileImageCaptured);\n Intent intent = new Intent(\n android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, CAMERA_REQUEST);\n\n }", "private void takePhoto() {\n Intent cameraIntent = new Intent(Intent.ACTION_PICK);\n cameraIntent.setType(\"image/*\");\n //startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);\n startActivityForResult(cameraIntent, GALLERY_PIC_REQUEST);\n }", "public void openCamera() {\n\n Uri photoURI = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + \".provider\", getTempImage());\n\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n photoURI = Uri.fromFile(getTempImage());\n }\n\n Intent cIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n cIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(cIntent, CAPTURE_PHOTO);\n }", "public void takePhoto(View view){\n Intent callCameraApplicationIntent = new Intent();\n //Todo: Se llama la accion de camara\n callCameraApplicationIntent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);\n\n File photoFile = null;\n try {\n photoFile = createImageFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n callCameraApplicationIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));\n //Todo: Se inicia la actividad y se pasa la constante ACTIVITY_START_CAMERA_APP al metodo onActivityResult\n startActivityForResult(callCameraApplicationIntent, ACTIVITY_START_CAMERA_APP);\n }", "public void takePhoto(){\n // We create the intent and the file\n Intent intent = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n File path = new File(Environment.getExternalStorageDirectory().toString() + PATH);\n if (!path.exists()) {\n path.mkdir();\n }\n File picture = new File(path.getAbsolutePath(),\"Foto.jpg\");\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(picture));\n // We have the path for the photo\n this.pictureId = Uri.fromFile(picture);\n // Begin the camera activity\n startActivityForResult(intent, CAMERA_APP);\n }", "public CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}", "public void openCamera(View view) {\n //do something here\n dispatchTakePictureIntent();\n\n }", "private void captureImage() {\n //Information about intents: http://developer.android.com/reference/android/content/Intent.html\n //Basically used to start up activities or send data between parts of a program\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Obtains the unique URI which sets up and prepares the image file to be taken, where it is to be placed,\n //and errors that may occur when taking the image.\n fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);\n //Stores this information in the Intent (which can be usefully passed on to the following Activity)\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n // start the image capture Intent (opens up the camera application)\n startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n }", "public void takePictureInternal() {\n if (!this.isPictureCaptureInProgress.getAndSet(true)) {\n this.mCamera.takePicture(null, null, null, new Camera.PictureCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass3 */\n\n public void onPictureTaken(byte[] bArr, Camera camera) {\n Camera1.this.isPictureCaptureInProgress.set(false);\n Camera1.this.mCallback.onPictureTaken(bArr);\n camera.cancelAutoFocus();\n camera.startPreview();\n }\n });\n }\n }", "public void openCamera(View view) {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n mImagePath = getFile();\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImagePath);\n startActivityForResult(takePictureIntent, TAKE_PIC_CODE);\n }", "private void captureImage() {\n\t\tIntent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );\n\t\tmFileUri = getOutputMediaFileUri(); // create a file to save the image\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, mFileUri); // set the image file name\n\t\t// start the image capture Intent\n\t\tstartActivityForResult( intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE );\n\t}", "private void pickFromCamera() {\n Intent startCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startCamera.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);\n startActivityForResult(startCamera, IMAGE_PICK_CAMERA_CODE);\n\n }", "private void takePicture() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // check if there is a camera app installed\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // build the photo file\n mPhotoFile = new File(getExternalFilesDir(null), code + \".jpg\");\n // get URI using a file provider\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.martindisch.fileprovider\",\n mPhotoFile);\n // put URI into Intent\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n // send Intent\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n } else {\n Toast.makeText(this, R.string.no_camera, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void run() {\n preview.startAnimation(fadein);\n //Launch camera layout\n camera_linear.startAnimation(fadein);\n //Launch capture button\n captureButton.startAnimation(fadein);\n //Make these components visible\n preview.setVisibility(View.VISIBLE);\n captureButton.setVisibility(View.VISIBLE);\n camera_linear.setVisibility(View.VISIBLE);\n //Create onClickListener for the capture button\n captureButton.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // get an image from the camera\n if(cameraRecorder.getSafeToTakePicture()) {\n Log.i(\"Taking Picture: \", \"Safe\");\n captureButton.setImageResource(R.drawable.kids_ui_record_anim_alt_mini);\n mCamera.takePicture(null, null, mPicture);\n cameraRecorder.setSafeToTakePicture(false);\n }\n\n else {\n Log.i(\"Taking Picture: \", \"Unsafe\");\n }\n }\n }\n );\n\n }", "private void pickFromCamera() {\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.TITLE, \"Temp Pic\");\n values.put(MediaStore.Images.Media.DESCRIPTION, \"Temp Description\");\n\n //put Image uri\n image_uri = UserProfile.this.getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n //intent to start Camera\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, image_uri);\n startActivityForResult(cameraIntent, IMAGE_PICK_CAMERA_CODE);\n }", "private void captureImage() {\n String imagename = \"urPics.jpg\";\n File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + imagename);\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n FileUri = Uri.fromFile(file);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, FileUri);\n // start the image capture Intent\n startActivityForResult(intent, REQUEST_CODE_CAMERA);\n }", "private void takePhoto() {\n Uri fileUri = FileProvider.getUriForFile(Mic.getmCtx(), \"com.jay.appdemo1.fileProvider\", getOutputMediaFile());\n Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 10); //限制的录制时长 以秒为单位\n// intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, 1024); //限制视频文件大小 以字节为单位\n// intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); //设置拍摄的质量0~1\n// intent.putExtra(MediaStore.EXTRA_FULL_SCREEN, false); // 全屏设置\n startActivityForResult(intent, RECORD_SYSTEM_VIDEO);\n }", "private void captureImageWithPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int rc = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA);\n if (rc == PackageManager.PERMISSION_GRANTED) {\n captureImage();\n } else {\n EasyPermissions.requestPermissions(\n this,\n getString(R.string.msg_no_camera_permission),\n RC_CAMERA,\n Manifest.permission.CAMERA);\n }\n } else {\n captureImage();\n }\n }", "private void captureStillPicture() {\n try {\n final Activity activity = getActivity();\n if (null == activity || null == mCameraDevice) {\n return;\n }\n // This is the CaptureRequest.Builder that we use to take a picture.\n final CaptureRequest.Builder captureBuilder =\n mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n captureBuilder.addTarget(mImageReader.getSurface());\n\n // Use the same AE and AF modes as the preview.\n captureBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n setAutoFlash(captureBuilder);\n\n // Orientation\n int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));\n\n CameraCaptureSession.CaptureCallback CaptureCallback\n = new CameraCaptureSession.CaptureCallback() {\n\n @Override\n public void onCaptureCompleted(@NonNull CameraCaptureSession session,\n @NonNull CaptureRequest request,\n @NonNull TotalCaptureResult result) {\n Log.e(TAG, \"Saved:\" + mFile);\n Log.d(TAG, mFile.toString());\n unlockFocus();\n }\n };\n\n mCaptureSession.stopRepeating();\n mCaptureSession.abortCaptures();\n mCaptureSession.capture(captureBuilder.build(), CaptureCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public void takePhoto(View view) throws IOException {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n //check if there is any application capable of handling the intent\n if (intent.resolveActivity(getPackageManager()) != null) {\n //startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n File imageFile = null;\n imageFile = getImageFile();\n\n if (imageFile != null) {\n Uri imageUri = FileProvider.getUriForFile(this, \"com.hfad.picturetaker.fileprovider\", imageFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);\n startActivityForResult(intent, IMAGE_REQUEST);\n }\n }\n\n }", "private void launchCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(getContext(), \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getContext().getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }", "void startCamera() throws IOException {\n if (ContextCompat.checkSelfPermission(this, WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED ||\n ContextCompat.checkSelfPermission(this, CAMERA) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{WRITE_EXTERNAL_STORAGE, CAMERA},\n WRITE_EXTERNAL_STORAGE_REQUEST);\n return;\n }\n dispatchTakePictureIntent();\n\n }", "private void launchCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference for future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(getContext(), \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getContext().getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.android.fileprovider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }\n }", "private void cameraIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) {\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,\n Uri.fromFile(photoFile));\n ((MessageActivity) context).startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }", "public void getImageFromCamera() {\n String capturedPath = \"image_\" + System.currentTimeMillis() + \".jpg\";\n File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()\n + \"/DCIM\", capturedPath);\n file.getParentFile().mkdirs();\n mCapturedImageUri = Uri.fromFile(file);\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageUri);\n startActivityForResult(intent, CAPTURE_IMAGE_REQUEST_CODE);\n }", "public void openCamera() {\n \n\n }", "private void captureImage() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n try {\n mImageFile = createImageFile();\n } catch (IOException ex) {\n Log.e(TAG, ex.getLocalizedMessage(), ex);\n }\n\n // Continue only if the File was successfully created\n if (mImageFile != null) {\n// intent.putExtra(MediaStore.EXTRA_OUTPUT,\n// Uri.fromFile(mImageFile));\n startActivityForResult(intent, IMAGE_CAPTURE_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.error_capture_image, Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, R.string.no_cam_app, Toast.LENGTH_SHORT).show();\n }\n }", "public void takePhoto(View view) {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n } else {\n Toast.makeText(this, \"Uh oh something went wrong with taking a photo\",\n Toast.LENGTH_SHORT).show();\n }\n }", "public void onLaunchCamera(View view) {\n Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\n\n data.insertAnImage(OptionID.get(alg), null);\n Cursor imageCursor = data.getImageData(OptionID.get(alg));\n imageCursor.moveToNext();\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(getPhotoFileUri(imageCursor.getString(0))))); // set the image file name\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }", "@Override\n public void openVideoCapture(Map<String, Object> parameters) throws Exception {\n checkNotNull(camera, \"Camera required\");\n ImageView viewCamera = checkNotNull((ImageView) parameters.get(\"viewCamera\"),\n \"Camera's ImageView required\");\n\n videoCapture.open(camera.getWebCamIndex());\n\n videoCapture.set(3, camera.getWidth());\n videoCapture.set(4, camera.getHeight());\n\n Runnable frameGrabber = () -> viewCamera.setImage(grabFrame(new HashMap<>()));\n timer = Executors.newSingleThreadScheduledExecutor();\n timer.scheduleAtFixedRate(frameGrabber, 0, 33, TimeUnit.MICROSECONDS);\n }", "public void takePicture() {\n LightMeter lightMeter = new LightMeter(film.getSpeed());\n shutter.setSeconds(lightMeter.getRecommendedSpeed());\n aperture.setSize(lightMeter.getRecommendedAperture());\n shutter.trigger();\n }", "@Override\n public void onClick(View arg0) {\n try {\n mPreview.captureImage();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) {\n // Create the File where the photo should go\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n Log.e(TAG, \"error.\");\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,\n Uri.fromFile(photoFile));\n ((Activity) context).startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n else {\n Toast toast = Toast.makeText(context, \"Sorry, no camera app found.\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Ensure there is a camera activity to handle the intent\n if(takePictureIntent.resolveActivity(getPackageManager()) != null) {\n //Create file where photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n }catch (IOException e){\n //Error occured while creating the file\n System.out.println(\"Exception in dispatch: \" + e.toString());\n }\n //continue only if the file was created correctly\n if(photoFile != null){\n photoUri = FileProvider.getUriForFile(\n this, \"com.example.android.fileprovider\", photoFile\n );\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);\n startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }", "public void chooseCamera() {\n if (cameraFront) {\n int cameraId = findBackFacingCamera();\n if (cameraId >= 0) {\n //open the backFacingCamera\n //set a picture callback\n //refresh the preview\n\n mCamera = Camera.open(cameraId);\n setRotation(mCamera, mCamera.getParameters(), cameraId);\n // mCamera.setDisplayOrientation(90);\n mPicture = getPictureCallback();\n mPreview.refreshCamera(mCamera);\n }\n } else {\n int cameraId = findFrontFacingCamera();\n if (cameraId >= 0) {\n //open the backFacingCamera\n //set a picture callback\n //refresh the preview\n mCamera = Camera.open(cameraId);\n setRotation(mCamera, mCamera.getParameters(), cameraId);\n // mCamera.setDisplayOrientation(90);\n mPicture = getPictureCallback();\n mPreview.refreshCamera(mCamera);\n }\n }\n }", "private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }", "protected void setupCameraAndPreview() {\n\n //\n // always release\n //\n releaseImageObjects();\n releaseVideoCapturebjects(true);\n\n // now setup...\n if (isImageButtonSelected) {\n\n //\n // Image Camera can be fetched here\n //\n if (!isBackCameraSelected) {\n mCamera = getCameraInstance(frontCamera);\n } else {\n mCamera = getCameraInstance(backCamera);\n }\n\n if (mImageCapture == null) {\n // Initiate MImageCapture\n mImageCapture = new MImageCapture(MCameraActivity.this);\n }\n\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mImageCapture.mCameraPreview == null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n mImageCapture.setCameraPreview(this, mCamera);\n previewView.addView(mImageCapture.mCameraPreview);\n }\n } else {\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n\n /** handle video here... */\n if (mVideoCapture == null) {\n // now start over\n mVideoCapture = new MVideoCapture(this);\n }\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mVideoCapture.mTextureView != null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n previewView.addView(mVideoCapture.mTextureView);\n }\n }\n\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.custom_cameraactivity);\r\n mCamera = getCameraInstance();\r\n mCameraPreview = new CameraPreview(this, mCamera);\r\n FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview);\r\n preview.addView(mCameraPreview);\r\n\r\n Bundle extras = getIntent().getExtras();\r\n looc = extras.getString(\"coor\");\r\n\r\n Button captureButton = (Button) findViewById(R.id.button_capture);\r\n captureButton.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n mCamera.takePicture(null, null, mPicture);\r\n // havent try to use doinbackgroud test first\r\n\r\n }\r\n });\r\n }", "@Override\n public void onClick(View arg0) {\n if (arg0.getId() == R.id.fab) {\n takePicture();\n /* try {\n//use standard intent to capture an image\n Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n//we will handle the returned data in onActivityResult\n startActivityForResult(captureIntent, CAMERA_CAPTURE);\n } catch(ActivityNotFoundException anfe){\n//display an error message\n String errorMessage = \"Whoops - your device doesn't support capturing images!\";\n Toast toast = Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_SHORT);\n toast.show();\n }*/\n }\n\n }", "public void takePictureByCamera(Context context){\n\n String state = Environment.getExternalStorageState();\n if (state.equals(Environment.MEDIA_MOUNTED)) {\n Intent getImageByCamera = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n ((Activity)context).startActivityForResult(getImageByCamera, TAG_takepicture);\n }\n else {\n MyToast.showToast(context,\"please install SDcard\");\n }\n }", "@Override\n public void onClick(View v) {\n if(cameraRecorder.getSafeToTakePicture()) {\n Log.i(\"Taking Picture: \", \"Safe\");\n captureButton.setImageResource(R.drawable.kids_ui_record_anim_alt_mini);\n mCamera.takePicture(null, null, mPicture);\n cameraRecorder.setSafeToTakePicture(false);\n }\n\n else {\n Log.i(\"Taking Picture: \", \"Unsafe\");\n }\n }", "private void captureImage() {\n\n if (ContextCompat.checkSelfPermission(Main2Activity.this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(Main2Activity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);\n } else {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n try {\n\n photoFile = createImageFile();\n //displayMessage(getBaseContext(), photoFile.getAbsolutePath());\n //Log.i(\"path_check\", photoFile.getAbsolutePath());\n\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(Main2Activity.this,\n \"com.example.mobileai.fileprovider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, requestCode);\n }\n } catch (Exception ex) {\n // Error occurred while creating the File\n //displayMessage(getBaseContext(), ex.getMessage().toString());\n }\n\n\n } else {\n // displayMessage(getBaseContext(), \"Null\");\n }\n }\n\n\n }", "@Override\n public void onPictureTaken(byte[] bytes, Camera camera) {\n Intent intent = new Intent(getActivity(), ShowCaptureActivity.class);\n intent.putExtra(\"capture\", bytes);\n startActivity(intent);\n return;\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\r\n\t\t\t\tstartActivityForResult(Intent.createChooser(cameraIntent, \"Take your photo\"), TAKE_AVATAR_CAMERA_REQUEST);\r\n\t\t\t}", "private void takePhotosGoogle() throws Exception \n {\n UiObject swipeScreen = new UiObject(new UiSelector().resourceId(\"com.android.camera2:id/mode_options_overlay\"));\n swipeScreen.swipeRight(5);\n\n // switch to video mode\n UiObject changeModeToCapture = new UiObject(new UiSelector().descriptionMatches(\"Switch to Camera Mode\"));\n changeModeToCapture.click();\n sleep(sleepTime);\n\n // click to capture photos\n UiObject clickCaptureButton = new UiObject(new UiSelector().descriptionMatches(\"Shutter\"));\n\n for (int i = 0; i < iterations; i++) {\n clickCaptureButton.longClick();\n sleep(timeDurationBetweenEachCapture);\n }\n }", "public void onPictureTaken(byte[] arg0, Camera arg1) {\n \t String pname = \"/sdcard/\"+System.currentTimeMillis()+\".jpg\";\n\t FileOutputStream outStream = null;\n\t try {\n\t\t outStream = new FileOutputStream(pname);\n\t\t outStream.write(arg0);\n\t\t outStream.close(); \n\t \n\t\t Calendar calendar = Calendar.getInstance();\n\t \tjava.util.Date now = calendar.getTime();\n\t \tjava.util.Date today = new java.util.Date();\n\t\t\tjava.sql.Timestamp ti = new java.sql.Timestamp(now.getTime());\n\t\t\t// storing photo on SD Card and link in database...\n\t\t\t\n\t Toast.makeText(AddContact.this,\n\t \"Image \"+pname+\" saved \",\n\t Toast.LENGTH_LONG).show();\n\t Bitmap bm = BitmapFactory.decodeFile(pname);\n\t img2.setImageBitmap(bm);\n\t // data.Insert(name,strmn,strln,strmno,mshome,mswork,msother,mscust, streid,eswork,esother,mscust,pname,strtag,0);\n\t } catch (FileNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t camera.startPreview();\n }", "void onPictureTaken(byte[] data, Camera camera);", "@Override\n public void startCameraIntent() {\n Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(cameraIntent, PICK_FROM_CAMERA_REQUEST_CODE);\n }", "private void createCamera() {\n camera = getCameraInstance();\n // Setting the right parameters in the camera\n SetCameraParameters();\n // Create our Preview view and set it as the content of our activity.\n camera_preview = new CameraPreview(this, camera);\n // Adding the camera preview after the FrameLayout and before the mainact_btn_InOutAct\n // as a separated element.\n InOut_cameraLayout.addView(camera_preview, 0);\n }", "@FXML\r\n protected void startCamera() {\r\n // set a fixed width for the frame\r\n this.currentFrame.setFitWidth(600);\r\n // preserve image ratio\r\n this.currentFrame.setPreserveRatio(true);\r\n\r\n if (!this.cameraActive) {\r\n\r\n // start the video capture\r\n //this.capture.open(0);\r\n //Read the video (Chage video)\r\n this.capture.open(\"Faruri.m4v\");\r\n\r\n\r\n System.out.println(\"start capture...\");\r\n // is the video stream available?\r\n if (this.capture.isOpened()) {\r\n System.out.println(\"inif\");\r\n this.cameraActive = true;\r\n\r\n // grab a frame every 33 ms (30 frames/sec)\r\n Runnable frameGrabber = new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // effectively grab and process a single frame\r\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }\r\n };\r\n\r\n this.timer = Executors.newSingleThreadScheduledExecutor();\r\n this.timer.scheduleAtFixedRate(frameGrabber, 0, 33, TimeUnit.MILLISECONDS);\r\n\r\n // update the button content\r\n this.button.setText(\"Stop Video\");\r\n } else {\r\n // log the error\r\n System.err.println(\"Impossible to open the video...\");\r\n }\r\n } else {\r\n // the camera is not active at this point\r\n this.cameraActive = false;\r\n // update again the button content\r\n this.button.setText(\"Start Video\");\r\n\r\n // stop the timer\r\n this.stopAcquisition();\r\n }\r\n }", "public void cameraIntent() {\n startActivityForResult(new Intent(\"android.media.action.IMAGE_CAPTURE\"), 1);\n }", "private void openCamera() {\n currentDateTimeString = new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date());\n txtDate.setText(currentDateTimeString);\n txtDate.setEnabled(false);\n String state = Environment.getExternalStorageState();\n imageName = currentDateTimeString+\"@\"+userName+\"@\"+timestamp+ ApplicationConstant.EXTENTION_JPG;\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n mFileTemp = new File(ApplicationConstant.FOLDER_PATH, imageName);\n } else {\n mFileTemp = new File(getFilesDir(), imageName);\n }\n /*Uri.fromFile(mFileTemp)*/\n Uri photoURI = null;\n if (android.os.Build.VERSION.SDK_INT >= ApplicationConstant.API_LEVEL_23) {\n photoURI = FileProvider.getUriForFile(UploadActivity.this, BuildConfig.APPLICATION_ID + \".provider\", mFileTemp);\n } else {\n photoURI = Uri.fromFile(mFileTemp);\n }\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n } else {\n List<ResolveInfo> resInfoList = UploadActivity.this.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);\n for (ResolveInfo resolveInfo : resInfoList) {\n String packageName = resolveInfo.activityInfo.packageName;\n UploadActivity.this.grantUriPermission(packageName, photoURI, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n }\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent, ApplicationConstant.RESULT_OPEN_CAMERA);\n }", "public S<T> camImg(int code){\n\t Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t activity.startActivityForResult(intent, code);\n\t return this;\n\t }", "Camera getCamera();", "private void captureImage(){\n\t\t\n\t\t//Setup location\n\t\tLocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n\t\tLocation location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\t\t\n\t\tdouble latitude = location.getLatitude();\n\t\tdouble longitude = location.getLongitude();\n\t\t\n\t\tIntent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\n\t\tfileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE, latitude, longitude);\n\t\t\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\t\t\n\t\t//Start the image capture Intent\n\t\tstartActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n\t}", "private void captureImages() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n imageFileUri = FileUtil.getOutputMediaFileUri(FileUtil.MEDIA_TYPE_IMAGE); // create a file to save the image\n intent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri); // set the image file name\n\n // start the image capture Intent\n startActivityForResult(intent, FileUtil.CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }", "private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String cameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId);\n StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n imageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CAMERA_PERMISSION);\n return;\n }\n manager.openCamera(cameraId, stateCallback, null);\n } catch (CameraAccessException e) {\n Toast.makeText(this, \"Camera failed to open.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }", "private void dispatchTakePhotoIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n Log.e(TAG, \"dispatchTakePhotoIntent: \" + \"Error Creating file\");\n }\n\n // Continue only if the File was successfully created\n if (photoFile != null) {\n mImageURI = FileProvider.getUriForFile(this,\n \"com.davidhaas.mazeways.fileprovider\",\n photoFile);\n\n // Takes the picture\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImageURI);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n }", "private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String mCameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(mCameraId);\n StreamConfigurationMap map = characteristics.\n get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n mImageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) !=\n PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE) !=\n PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(CameraActivity.this, new\n String[]{Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CAMERA_PERMISSION);\n }\n manager.openCamera(mCameraId, mStateCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public void onLaunchCamera() {\n takePic.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // create Intent to take a picture and return control to the calling application\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(Driver_License_Scan.this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n });\n }", "public void mudaFoto(View view){\n Intent tirarFoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(tirarFoto, TIRAR_FOTO);\n }", "protected void cameraClicked() {\n\t\tif (this.pictureFromCameraString != null\n\t\t\t\t&& !\"\".equals(this.pictureFromCameraString)) {\n\t\t\timageAvailable();\n\t\t} else {\n\t\t\timageUnavailable();\n\t\t}\n\t\tthis.cameraIsActive = true;\n\t\tthis.camera.addStyleDependentName(\"highlighted\");\n\t\tthis.upload.removeStyleDependentName(\"highlighted\");\n\t\tthis.inputPanel.setWidget(this.cameraPanel);\n\t\tgetCameraPictureNative();\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); \n\t\t startActivityForResult(cameraIntent, CAMERA_REQUEST); \n\t\t\t\t\t}", "private void startCamera() {\n PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build();\n Preview preview = new Preview(previewConfig);\n preview.setOnPreviewOutputUpdateListener(output -> {\n ViewGroup parent = (ViewGroup) dataBinding.viewFinder.getParent();\n parent.removeView(dataBinding.viewFinder);\n parent.addView(dataBinding.viewFinder, 0);\n dataBinding.viewFinder.setSurfaceTexture(output.getSurfaceTexture());\n updateTransform();\n });\n\n\n // Create configuration object for the image capture use case\n // We don't set a resolution for image capture; instead, we\n // select a capture mode which will infer the appropriate\n // resolution based on aspect ration and requested mode\n ImageCaptureConfig imageCaptureConfig = new ImageCaptureConfig.Builder().setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY).build();\n\n // Build the image capture use case and attach button click listener\n ImageCapture imageCapture = new ImageCapture(imageCaptureConfig);\n dataBinding.captureButton.setOnClickListener(v -> {\n File file = new File(getExternalMediaDirs()[0], System.currentTimeMillis() + \".jpg\");\n imageCapture.takePicture(file, executor, new ImageCapture.OnImageSavedListener() {\n @Override\n public void onImageSaved(@NonNull File file) {\n String msg = \"Photo capture succeeded: \" + file.getAbsolutePath();\n Log.d(\"CameraXApp\", msg);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n\n @Override\n public void onError(@NonNull ImageCapture.ImageCaptureError\n imageCaptureError, @NonNull String message, @Nullable Throwable cause) {\n String msg = \"Photo capture failed: \" + message;\n Log.e(\"CameraXApp\", msg, cause);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n });\n });\n\n\n // Setup image analysis pipeline that computes average pixel luminance\n ImageAnalysisConfig analyzerConfig = new ImageAnalysisConfig.Builder().setImageReaderMode(\n ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build();\n // Build the image analysis use case and instantiate our analyzer\n ImageAnalysis analyzerUseCase = new ImageAnalysis(analyzerConfig);\n analyzerUseCase.setAnalyzer(executor, new LuminosityAnalyzer());\n\n CameraX.bindToLifecycle(this, preview, imageCapture, analyzerUseCase);\n }", "private void previewCapturedImage(){\n \ttry{\n \t\timgPreview.setVisibility(View.VISIBLE);\n \t\t\n \t\t//Bitmap Factory\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t\t\n \t\t//Downsizing image as it throws OutOfMemory Exception for large images\n \t\toptions.inSampleSize = 4;\n \t\t\n \t\tfinal Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);\n \t\t\n \t\timgPreview.setImageBitmap(bitmap);\n \t}catch(NullPointerException e){\n \t\te.printStackTrace();\n \t}catch(OutOfMemoryError e){\n \t\te.printStackTrace();\n \t}\n }", "@Override\n public void onClick(View v) {\n Intent camIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n camIntent.setType(\"image/*\");\n startActivityForResult(camIntent,CAMERA_REQUEST);\n }", "public interface TakeFrameListener {\n void onTake(Mat mat);\n}", "public void takeRGBPicture() {\n\t\ttry {\n\t\t\tpixels = this.takeStillAsRGB(width, height, false);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void createCameraPreview() {\n try {\n SurfaceTexture texture = textureView.getSurfaceTexture();\n assert texture != null;\n texture.setDefaultBufferSize(imageDimension.getWidth(), imageDimension.getHeight());\n Surface surface = new Surface(texture);\n captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n captureRequestBuilder.addTarget(surface);\n cameraDevice.createCaptureSession(Collections.singletonList(surface), new CameraCaptureSession.StateCallback(){\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n Toast.makeText(MainActivity.this, \"Configuration change\", Toast.LENGTH_SHORT).show();\n }\n }, null);\n } catch (CameraAccessException e) {\n Toast.makeText(MainActivity.this, \"Camera Surface failed to load.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }", "private void askCameraPermission(){\n /** {@PERMISSION_GRANTED} value is 0 that means if permission is granted then checkSelfPermission will inform us by int\n * and if {@checkSelfPermission} is not 0 that means permission is not granted so we need to ask the permission at run time\n * only for API above 23*/\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.CAMERA},CAMERA_CAPTURE_IMAGE_PERMISSION_CODE);\n }else{\n // if permission is granted then open camera directly\n dispatchTakePictureIntent();\n }\n }" ]
[ "0.7077448", "0.7054869", "0.70147943", "0.69895625", "0.6973897", "0.6963288", "0.6926101", "0.6793528", "0.66477394", "0.66328657", "0.6604378", "0.6596675", "0.6566915", "0.6562919", "0.65462404", "0.6544912", "0.6517298", "0.6503199", "0.64922714", "0.6477829", "0.64748853", "0.6463202", "0.64606977", "0.64587915", "0.64246976", "0.6404761", "0.6344009", "0.6340565", "0.6338396", "0.63368106", "0.63129634", "0.63041574", "0.6291684", "0.628351", "0.6280204", "0.6265673", "0.62630486", "0.6259935", "0.62586296", "0.6248962", "0.62408787", "0.62354225", "0.6210836", "0.6205688", "0.61853915", "0.61817133", "0.61747223", "0.61708045", "0.6168681", "0.6159077", "0.61573595", "0.6153611", "0.6139556", "0.61322194", "0.61013764", "0.6080031", "0.6067574", "0.60633004", "0.6061411", "0.6061175", "0.60506386", "0.60474336", "0.6045921", "0.6039122", "0.6034769", "0.60072213", "0.6002964", "0.6001423", "0.60006416", "0.59988713", "0.5990705", "0.5983647", "0.59518576", "0.5933974", "0.593037", "0.592168", "0.59109455", "0.5893429", "0.5893323", "0.5891564", "0.5876122", "0.586979", "0.58660746", "0.58525676", "0.58509696", "0.58481985", "0.5846819", "0.58433545", "0.5838284", "0.58304787", "0.5815929", "0.5810426", "0.5810021", "0.5792298", "0.5787095", "0.578262", "0.5777361", "0.576245", "0.5749767", "0.5749205", "0.5748522" ]
0.0
-1
TODO Autogenerated method stub
@Override public void updateByExample(Permissions obj, PermissionsDbObjExample ex) throws RuntimeException { }
{ "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 Long countByExample(Permissions obj, PermissionsDbObjExample ex) throws RuntimeException { 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
The index is useless in this model, so just ignore it.
public void insertNodeInto(MutableTreeNode child, MutableTreeNode par, int i) { insertNodeInto(child, par); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNoIndex() {\n noIndex= true;\n }", "public boolean indexAllowed() {\r\n return true;\r\n }", "@Override\n\tpublic void unIndexObject(ModelKey obj) throws ASException {\n\t\t\n\t}", "public boolean getNoIndex() {\n return noIndex;\n }", "public H_index() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void indexObject(ModelKey obj) throws ASException {\n\t\t\n\t}", "@Override\n\tpublic void clearIndex(Class<? extends ModelKey> clazz) {\n\t\t\n\t}", "void indexReset();", "public long index() {\n return manager.compactIndex();\n }", "public abstract void deselectAllIndexes();", "public Builder clearIndex() {\n bitField0_ = (bitField0_ & ~0x00000002);\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n bitField0_ = (bitField0_ & ~0x00000002);\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n bitField0_ = (bitField0_ & ~0x00000002);\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n bitField0_ = (bitField0_ & ~0x00000002);\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n bitField0_ = (bitField0_ & ~0x00000002);\n index_ = 0;\n onChanged();\n return this;\n }", "public void onIndexReset();", "public void clear() {\n index.clear();\n }", "public Builder clearIsIndexOnKeys() {\n\n isIndexOnKeys_ = false;\n onChanged();\n return this;\n }", "@Nullable\n public abstract Index getIndex();", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "@Override\r\n public ParaMap index(ParaMap inMap) throws Exception {\n return null;\r\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n\n index_ = 0;\n onChanged();\n return this;\n }", "public void beforeIndexCreated(Index index) {\n\n }", "private Reindex() {}", "private Reindex() {}", "abstract void onIndexDisrupted(String caseId);", "public Builder clearIsIndexOnValues() {\n\n isIndexOnValues_ = false;\n onChanged();\n return this;\n }", "public Builder clearIndex() {\n \n index_ = 0;\n onChanged();\n return this;\n }", "void stopIndexing();", "public NoneBloomCache(Index index) {\n\t\tsuper(index, ImmutableSettings.Builder.EMPTY_SETTINGS);\n\t}", "@Override\r\n\tpublic void removeToIndex(int index) {\n\t}", "@Test\n public void notStoreIndexWithoutRequest() throws Exception {\n final String name = \"talk\";\n final Talks talks = new Talks.InDir();\n talks.create(\"\", name);\n talks.get(name).modify(\n new Directives()\n .xpath(\"/talk\")\n .push().xpath(\"wire\").remove().pop()\n .add(\"wire\").add(\"href\").set(\"#1\").up()\n );\n new IndexesRequests().execute(talks);\n MatcherAssert.assertThat(\n talks.get(name).read(),\n Matchers.not(\n XhtmlMatchers.hasXPaths(\"/talk/request\")\n )\n );\n }", "@Test\n public void testDropIdxOnClient() {\n GridCacheDynamicLoadOnClientTest.srvNode.getOrCreateCache(DEFAULT_CACHE_NAME).query(new SqlFieldsQuery(((\"CREATE INDEX IDX_TST ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name desc)\"))).getAll();\n // Due to client receive created index asynchronously we need add the ugly sleep.\n doSleep(2000);\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"DROP INDEX \" + (GridCacheDynamicLoadOnClientTest.PERSON_SCHEMA)) + \".IDX_TST\"))).getAll();\n }", "public Builder clearIndex() {\n \n index_ = 0;\n onChanged();\n return this;\n }", "public void dropIndexes() {\n dropIndex(\"*\");\n }", "@Override\n\tpublic int getModelIndex() {\n\t\treturn 0;\n\t}", "public InvertedIndex() {\n\t\tthis.invertedIndex = new TreeMap<>();\n\t\tthis.counts = new TreeMap<>();\n\t}", "@Override\n\tpublic void clearIndex(String indexName) {\n\t\t\n\t}", "public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}", "public void onIndexUpdate();", "@Override\n protected boolean preserveIndicesUponCompletion() {\n return true;\n }", "void clearAllIndexes();", "boolean isNewIndex();", "public void enableIndexAutoCreation() {\n client.setIndexAutoCreationEnabled(true);\n }", "@ApiModelProperty(value = \"The index of the entity as it was found in the investment tables.\")\n public Integer getIndex() {\n return index;\n }", "public boolean isIndex() { return this.isIndex; }", "private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "@Inject\n\tpublic NoneFieldDataCache(Index index, @IndexSettings Settings indexSettings) {\n\t\tsuper(index, indexSettings);\n\t\tlogger.debug(\"Using no field cache\");\n\t}", "@Inject\n\tpublic NoneBloomCache(Index index, @IndexSettings Settings indexSettings) {\n\t\tsuper(index, indexSettings);\n\t}", "@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }", "public void unsetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STARTINDEX$10);\n }\n }", "@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }", "public void setIdxSearchNoHtml(boolean idxSearchNoHtml) {\n Preferences prefs = getPreferences();\n prefs.putBoolean(PROP_SEARCH_NO_HTML, idxSearchNoHtml);\n }", "@Override\n public void visit(Index node) {\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }", "@ProjectSingleton\npublic interface DeprecatedEntitiesByEntityIndex extends Index {\n\n boolean isDeprecated(@Nonnull OWLEntity entity);\n}", "void initiateRemoveIndexes(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "protected abstract List<String> getSecondaryIndexExcludeList();", "@Test\n public void unnamedPropertyRuleInExistingIndex() {\n builder\n .indexRule(\"nt:base\")\n .property(\"foo\")\n // remove \"name\" property explicitly\n .getBuilderTree().removeProperty(\"name\");\n NodeState initialIndexState = builder.build();\n\n // Use initial index def to add some other property rule - this should work\n new LuceneIndexDefinitionBuilder(initialIndexState.builder())\n .indexRule(\"nt:base\")\n .property(\"bar\");\n }", "public boolean shouldIndex(IDocument document);", "@Override\n\t\t\t\tpublic int convertRowIndexToModel(int index) {\n\t\t\t\t\treturn index;\n\t\t\t\t}", "public abstract void updateIndex();", "public InnodbIndexStatsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Override\n public Collection<? extends DBSTableIndex> getIndexes(DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "@Override\n\tpublic void indexObject(List<ModelKey> list) throws ASException {\n\t\t\n\t}", "public Indexer() {\n }", "@VTID(10)\n int getIndex();", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }", "public SimpleIndexFactory() {\n\t}", "@Test\n public void indexIsUsedForQueryWhenRegionIsEmpty() {\n try {\n CacheUtils.getCache();\n isInitDone = false;\n Query q =\n qs.newQuery(\"SELECT DISTINCT * FROM \" + SEPARATOR + \"portfolio where status = 'active'\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n\n @Override\n public void afterIndexLookup(Collection coll) {\n indexUsed = true;\n }\n });\n SelectResults set = (SelectResults) q.execute();\n if (set.size() == 0 || !indexUsed) {\n fail(\"Either Size of the result set is zero or Index is not used \");\n }\n indexUsed = false;\n\n region.clear();\n set = (SelectResults) q.execute();\n if (set.size() != 0 || !indexUsed) {\n fail(\"Either Size of the result set is not zero or Index is not used \");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.toString());\n } finally {\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }", "@Override\n\tpublic void unIndexObject(String indexName, String key) throws ASException {\n\t\t\n\t}", "private synchronized void remove(int index) {\r\n\t\tif (index >= 0 && index <= docModel.size())\r\n\t\t\ttry {\r\n\t\t\t\tdocModel.remove(index - 1);\r\n\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\t\tif (commandsQueue.size() == 0)\r\n\t\t\t\t\tupdateActiveUsers();\r\n\t\t\t}\r\n\t}", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}", "public void testAddingNewIndexWithoutIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n PSJdbcTableSchema tableSchema = createTableSchema(coldefs);\n setPrimaryKey(tableSchema);\n PSJdbcForeignKey fk = createForeignKey(tableSchema);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n\n Iterator<?> itIndex = tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE);\n PSJdbcIndex index = (PSJdbcIndex) itIndex.next();\n String IndexName = index.getName();\n String fkcolname = fk.getForeignKeyColumnNames().get(0);\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the index name has taken the first foreign key column name.\n assertTrue((StringUtils.equalsIgnoreCase(IndexName, \"IX_\" + fkcolname)));\n\n // Makes sure if the createForeignkeyIndexes attribute for mysql.\n assertTrue(dataTypeMap.isCreateForeignKeyIndexes());\n\n }", "@Test\n public void storesIndexIfNone() throws Exception {\n final String name = \"talk\";\n final Talks talks = new Talks.InDir();\n talks.create(\"\", name);\n talks.get(name).modify(\n new Directives()\n .xpath(\"/talk\").push().xpath(\"wire\").remove().pop()\n .add(\"wire\").add(\"href\").set(\"#1\").up().up()\n .add(\"request\").attr(\"id\", \"a12345\")\n .add(\"author\").set(\"yegor256\").up()\n .add(\"args\").up()\n .add(\"type\").set(\"deploy\").up()\n );\n new IndexesRequests().execute(talks);\n MatcherAssert.assertThat(\n talks.get(name).read(),\n XhtmlMatchers.hasXPaths(\"/talk/request[@index='1']\")\n );\n }", "private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }", "public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isIndex() {\n return index;\n }", "public Link getIndexLink() {\n\t\treturn null;\n\t}", "@Override\n public final int getIndex() {\n return index;\n }", "public Index getIndex() {\n return index;\n }", "public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public IndexIntervalCallNoParser() {\n super(LocatingStrategy.INDEX_INTERVAL);\n }", "@Override\r\n\tprotected void loadUniqueIndexMap(TestBooking entiy) {\n\t\t\r\n\t}", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@Nullable\n public abstract IndexEntry getIndexEntry();", "void setIndexed(boolean indexed);", "public InnodbIndexStats() {\n this(DSL.name(\"innodb_index_stats\"), null);\n }", "@Test public void doesntIndexCoreOrNonStringAnnotations() throws IOException {\n accept(storage.spanConsumer(), TestObjects.CLIENT_SPAN);\n\n assertThat(\n storage.session()\n .execute(\"SELECT blobastext(annotation) from annotations_index\")\n .all())\n .extracting(r -> r.getString(0))\n .containsExactlyInAnyOrder(\n \"frontend:http.path\",\n \"frontend:http.path:/api\",\n \"frontend:clnt/finagle.version:6.45.0\",\n \"frontend:foo\",\n \"frontend:clnt/finagle.version\");\n }" ]
[ "0.74701595", "0.6996879", "0.6554505", "0.65435654", "0.6314716", "0.6222652", "0.6092796", "0.6047805", "0.6006728", "0.5949259", "0.59446424", "0.5944192", "0.5944192", "0.5944192", "0.5944192", "0.59424525", "0.5922754", "0.5918477", "0.5917287", "0.5848612", "0.58416766", "0.5831859", "0.5831859", "0.5831859", "0.58050555", "0.5791619", "0.5791619", "0.57908237", "0.57743496", "0.5745721", "0.57456046", "0.5738617", "0.57384807", "0.57376486", "0.57308304", "0.5721712", "0.57213664", "0.57026315", "0.5696333", "0.56759965", "0.5672171", "0.566721", "0.5631531", "0.561408", "0.56119555", "0.5593765", "0.5593695", "0.5590421", "0.55823016", "0.55773735", "0.55677974", "0.5559478", "0.55558145", "0.5552954", "0.554099", "0.5537237", "0.553346", "0.55190235", "0.55187434", "0.5516988", "0.5505868", "0.54999804", "0.54977643", "0.54937905", "0.5493462", "0.5483983", "0.54808724", "0.54749", "0.54729", "0.54626274", "0.5461882", "0.5457611", "0.5437844", "0.54352635", "0.54251605", "0.5416494", "0.5414714", "0.5414714", "0.5414714", "0.541461", "0.54103607", "0.5408921", "0.5406288", "0.5405677", "0.5404449", "0.5404066", "0.5402927", "0.54028445", "0.5402803", "0.5402803", "0.5402803", "0.5402803", "0.54018104", "0.5392903", "0.538215", "0.538215", "0.538215", "0.5373919", "0.5372649", "0.5367541", "0.5364208" ]
0.0
-1