query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Creates a new IndexedProgram.
public IndexedProgram(int index, Program program) { this.index = index; this.program = program; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Program createProgram();", "Program createProgram();", "Program createProgram();", "Program program() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken progName = match(IDENTIFIER);\r\n\t\tBlock block = block();\r\n\t\treturn new Program (first, progName, block);\r\n\t}", "public Program program() {\n\n if (lexer.token != Symbol.PROGRAM) {\n error.signal(\"Missing PROGRAM keyword\");\n }\n\n lexer.nextToken();\n\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Missing PROGRAM identifier\");\n }\n\n Ident id = new Ident(lexer.getStringValue());\n\n lexer.nextToken();\n\n if (lexer.token != Symbol.BEGIN) {\n error.signal(\"Missing BEGIN keyword to PROGRAM\");\n }\n\n lexer.nextToken();\n\n ProgramBody pgm = pgm_body(); \n \n if (lexer.token != Symbol.END) {\n error.signal(\"Missing END keyword to PROGRAM\");\n }\n\n if(symbolTable.getFunction(\"main\") == null)\n error.show(\"The program must have a main function\");\n \n lexer.nextToken();\n\n return new Program(id, pgm);\n }", "Program program() throws SyntaxException {\n\t\tif(t.kind == IDENTIFIER){\n\t\t\tToken name = t, firstToken = t;\n\t\t\tconsume();\n\t\t\tArrayList<ASTNode> decsAndStatements = new ArrayList<>();\n\n\t\t\twhile (t.kind == KW_int || t.kind == KW_boolean || t.kind == KW_image\n\t\t\t\t\t|| t.kind == KW_url || t.kind == KW_file || t.kind == IDENTIFIER){\n\n\t\t\t\tif (t.kind == KW_int || t.kind == KW_boolean || t.kind == KW_image\n\t\t\t\t\t\t|| t.kind == KW_url || t.kind == KW_file){\n\t\t\t\t\tdecsAndStatements.add(declaration());\n\t\t\t\t}\n\t\t\t\telse if (t.kind == IDENTIFIER){\n\t\t\t\t\tdecsAndStatements.add(statement());\n\t\t\t\t}\n\t\t\t\tmatch(SEMI);\n\t\t\t}\n\n\t\t\treturn new Program(firstToken, name, decsAndStatements);\n\t\t}\n\t\telse {\n\t\t throw new SyntaxException(t, \"Input not valid. \\nProgram should start with an IDENTIFIER.\");\n }\n\t}", "@Override\n protected int createProgram(Context context) {\n return PGLNativeIpl.loadLipsHighLightProgram();\n }", "public Context(Program program) {\n this.instructionList = program.iterator();\n }", "public SimpleIndexFactory() {\n\t}", "public OTFModelGeneration(Program program) {\n\t\tsuper();\n\t\tthis.program = program;\n\t}", "private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }", "public interface IProgram {\n\n\t/**\n\t * Returns filename of the program. This is name of file that was\n\t * initially added to the database.\n\t * @return filename of the program.\n\t */\n\tpublic String getFilename();\n\n\t/**\n\t * Returns a sequence of bytes that forms source file in UTF-8 encoding. \n\t * @return a sequence of bytes that forms source file in UTF-8 encoding. \n\t */\n\tpublic byte[] getSource();\n\n\t/**\n\t * Returns list of tokens (unmodifiable).\n\t * \n\t * @return list of tokens (unmodifiable).\n\t */\n\tpublic List<IToken> getTokens();\n\n\t/**\n\t * Returns author of the program.\n\t * \n\t * @return author of the program.\n\t */\n\tpublic IAuthor getAuthor();\n\n}", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public Program(UUID id) {\n this.id = id;\n\n if (!Database.get().containKey(ID, id.toString()))\n throw new IllegalStateException(\"Cannot find the right data by this ID: \" + id.toString());\n\n Map<Column, Object> values = Database.get().getValues(PROGRAM_TABLE, new Where<>(ID, id.toString()));\n\n this.title = (String) values.get(TITLE);\n this.genre = (String) values.get(GENRE);\n }", "private static int createGlProgram(String vertexCode, String fragmentCode) {\n int vertex = loadShader(GLES20.GL_VERTEX_SHADER, vertexCode);\n if (vertex == 0) {\n return 0;\n }\n int fragment = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentCode);\n if (fragment == 0) {\n return 0;\n }\n int program = GLES20.glCreateProgram();\n if (program != 0) {\n GLES20.glAttachShader(program, vertex);\n GLES20.glAttachShader(program, fragment);\n GLES20.glLinkProgram(program);\n int[] linkStatus = new int[1];\n GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0);\n if (linkStatus[0] != GLES20.GL_TRUE) {\n LogUtil.error(TAG, \"Could not link program \" + GLES20.glGetProgramInfoLog(program));\n GLES20.glDeleteProgram(program);\n program = 0;\n }\n }\n return program;\n }", "private static int createProgram(int[] shaderIds){\n int shaderProgramId = glCreateProgram();\n\n for(int shader: shaderIds){\n if(shader != -1){\n glAttachShader(shaderProgramId, shader);\n }\n }\n glLinkProgram(shaderProgramId);\n\n int[] linkResult = {0};\n glGetProgramiv(shaderProgramId, GL_LINK_STATUS, linkResult);\n if(linkResult[0] == GL_FALSE){\n System.err.println(\"Failed to link shader program.\");\n String log = glGetProgramInfoLog(shaderProgramId);\n System.err.println(\"Log: \");\n System.err.println(log);\n }\n\n glValidateProgram(shaderProgramId);\n\n int[] validationResult = {0};\n glGetProgramiv(shaderProgramId, GL_VALIDATE_STATUS, validationResult);\n if(validationResult[0] == GL_FALSE){\n System.err.println(\"Failed to validate shader program.\");\n String log = glGetProgramInfoLog(shaderProgramId);\n System.err.println(\"Log: \");\n System.err.println(log);\n }\n\n return shaderProgramId;\n }", "RoverProgram createRoverProgram();", "public ProgramNode(String aName, DeclarationsNode globals, SubProgramDeclarationsNode functions, CompoundStatementNode main, Scope scope) {\n\t\tthis.name = aName;\n\t\tglobalVariables = globals;\n\t\tthis.functions = functions;\n\t\tthis.main = main;\n\t\tsymbolTable = scope;\n\t}", "public Program(UUID id, String title, String genre) {\n this.id = id;\n this.title = title;\n this.genre = genre;\n }", "public ITaGProgram(ATaGProgram aProgram, NetworkTopology nTopo) {\r\n this.numberOfCopiesOfTask = new int[aProgram.getTaskList().size()];\r\n\r\n for(ATaGTaskDeclaration atd: aProgram.getTaskList()){\r\n \r\n // Handle External Tasks\r\n if(atd.getFiringRule()[0] == ATaGTaskDeclaration.FIRING_EXTERN)\r\n {\r\n this.numberOfCopiesOfTask[atd.getID()] = 0;\r\n continue;\r\n }\r\n \r\n //TODO complete this with what?\r\n\r\n this.numberOfCopiesOfTask[atd.getID()] =\r\n getNumberOfInstantiatedTasks(atd, nTopo);\r\n }\r\n \r\n }", "InstAssignIndex createInstAssignIndex();", "public static int CreateProgram(int vertexShaderId, int fragmentShaderId) {\n final int programId = GLES20.glCreateProgram();\n if (programId == 0) {\n return 0;\n }\n GLES20.glAttachShader(programId, vertexShaderId);\n GLES20.glAttachShader(programId, fragmentShaderId);\n GLES20.glLinkProgram(programId);\n final int[] linkStatus = new int[1];\n GLES20.glGetProgramiv(programId, GLES20.GL_LINK_STATUS, linkStatus, 0);\n if (linkStatus[0] == 0) {\n GLES20.glDeleteProgram(programId);\n return 0;\n }\n return programId;\n }", "public PdfFontProgram() {\n super();\n }", "public static void main(String[] args) {\n new Program();\n }", "public int createProgram(GL2 gl2) {\r\n programID = gl2.glCreateProgram();\r\n\r\n for (int i = 0; i < vertexShaderList.size(); i++) {\r\n gl2.glAttachShader(programID, vertexShaderList.elementAt(i));\r\n }\r\n for (int i=0; i < geometryShaderList.size(); i++) {\r\n gl2.glAttachShader(programID, geometryShaderList.elementAt(i));\r\n }\r\n for (int i = 0; i < fragmentShaderList.size(); i++) {\r\n gl2.glAttachShader(programID, fragmentShaderList.elementAt(i));\r\n }\r\n //gl2.glLinkProgram(programID); \r\n /*\r\n if (! linkStatus(gl2, programID)) {\r\n System.exit(0); \r\n }\r\n */\r\n return programID;\r\n }", "public static void loadProgram() throws Exception{\n\t\t\n\t\tInteger instructionNumber = 0; \n\t\t\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(new File(ramProgram));\n\t\t\twhile (scanner.hasNext()){\n\t\t\t\tString next = scanner.nextLine();\n\t\t\t\tnext = next.trim();\n\t\t\t\tString [] array = next.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t\tif (next.startsWith(\"#\") || next.isEmpty()){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (array[0].endsWith(\":\")){\n\t\t\t\t\t\ttagList.add(new Tag(array[0], instructionNumber));\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (array.length){\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la etiqueta:\" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[1], \"\", getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[1], array[2], getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la instrucción: \" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (array.length){\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[0], \"\", getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[0], array[1], getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la instrucción: \" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tinstructionNumber++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tscanner.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\n\t\t}\n\t}", "public static IiTunes createiTunesApp() {\r\n return COM4J.createInstance( IiTunes.class, \"{DC0C2640-1415-4644-875C-6F4D769839BA}\" );\r\n }", "int glCreateProgram();", "@NativeType(\"bgfx_program_handle_t\")\n public static short bgfx_create_program(@NativeType(\"bgfx_shader_handle_t\") short _vsh, @NativeType(\"bgfx_shader_handle_t\") short _fsh, @NativeType(\"bool\") boolean _destroyShaders) {\n long __functionAddress = Functions.create_program;\n return invokeCCC(_vsh, _fsh, _destroyShaders, __functionAddress);\n }", "public static Index create(String name, Path path) {\n try {\n Files.createDirectory(path.resolve(INDEX));\n return new Index(name, path);\n\n } catch (IOException e) {\n throw new IOFailureException(e);\n }\n }", "@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "LuceneMemoryIndex createLuceneMemoryIndex();", "public CEventProgram()\r\n {\r\n }", "public interface Program extends AstItem {\n}", "static RadioManager.ProgramInfo makeProgramInfo(int programType,\n ProgramSelector.Identifier identifier, int signalQuality) {\n return new RadioManager.ProgramInfo(new ProgramSelector(programType, identifier, null,\n null), null, null, null, 0, signalQuality, new RadioMetadata.Builder().build(),\n new HashMap<String, String>());\n }", "public Node program() {\r\n\r\n this.CheckError(\"PROGRAM\");\r\n\r\n\r\n Node n_program = new Node(\"program\");\r\n n_program.setParent(null);\r\n System.out.println(\"read node from app: \"+n_program.getData());\r\n System.out.println(\" :parent: \"+n_program.getParent());\r\n\r\n Node n_declarations = n_program.setChildren(\"decl list\");\r\n System.out.println(\"read node from app :data: \"+n_declarations.getData());\r\n System.out.println(\" :parent: \"+n_declarations.getParent().getData());\r\n\r\n this.declaration(n_declarations);\r\n\r\n this.CheckError(\"BEGIN\");\r\n\r\n Node n_statementSequence = n_program.setChildren(\"stmt list\");\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.CheckError(\"END\");\r\n\r\n System.out.println(\":::: Parsing Successful Hamid ::::\");\r\n\r\n return n_program;\r\n //////////////////////////////////////////// writeout PROGRAM treee -----------------\r\n //////////////////////////////////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////////////////////////////\r\n ///////////output test generator\r\n /////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\n /*Node iteration = n_program;\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\"|\");\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n iteration = n_program.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\" \");\r\n iteration = n_program.getChildren(1);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println(\"\");\r\n System.out.print(\" \");\r\n Node iteration0= iteration.getChildren(0);\r\n for (int i=0; i<iteration0.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration1= iteration.getChildren(1);\r\n for (int i=0; i<iteration1.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration2= iteration.getChildren(2);\r\n for (int i=0; i<iteration2.childrenSize();i++){\r\n System.out.print(\"| \"+iteration2.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration3= iteration.getChildren(3);\r\n for (int i=0; i<iteration3.childrenSize();i++){\r\n System.out.print(\"| \"+iteration3.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration4= iteration.getChildren(4);\r\n for (int i=0; i<iteration4.childrenSize();i++){\r\n System.out.print(\"| \"+iteration4.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" w\\n\");\r\n System.out.print(\" \");\r\n Node iteration0w= iteration2.getChildren(0);\r\n for (int i=0; i<iteration0w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n Node iteration1w= iteration2.getChildren(1);\r\n for (int i=0; i<iteration1w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n iteration= iteration0w.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }*/\r\n\r\n }", "public PSAppIndexedItemIdContext(int type, int index)\n {\n if (!validateType(type))\n throw new IllegalArgumentException(\"invalid type\");\n \n if (!validateIndex(index))\n throw new IllegalArgumentException(\"index is invalid\");\n \n m_type = type;\n m_index = index;\n }", "public Object clone() {\n SPProgram prog = (SPProgram)super.clone();\n\n if (_piInfo != null) {\n prog._piInfo = (PIInfo)_piInfo.clone();\n }\n\n return prog;\n }", "Instruction createInstruction();", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "public Programa(ProgramaTokenManager tm) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }", "private int loadProgram(Program program, int start) throws MemoryFault {\n int address = start;\n for (int i : program.getCode()) {\n machine.memory.store(address++, i);\n }\n return address;\n }", "public Programa(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new ProgramaTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }", "public final void mPROGRAM() throws RecognitionException {\n try {\n int _type = PROGRAM;\n // /Users/benjamincoe/HackWars/C.g:18:9: ( '1212program1212' )\n // /Users/benjamincoe/HackWars/C.g:18:11: '1212program1212'\n {\n match(\"1212program1212\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "ShaderProgram(Context context, int vertexShaderResourceId, int fragmentShaderResourceId, ShaderType type) {\n\t\t// Compile the shaders and link the program.\n\t\tmProgram = ShaderHelper.getInstance().buildProgram(TextResourceReader.readTextFileFromResource(context, vertexShaderResourceId),\n\t\t\tTextResourceReader.readTextFileFromResource(context, fragmentShaderResourceId));\n\t}", "public static PrimaryIndexBuilder pkIndex() {\n return new PrimaryKeyBuilderImpl();\n }", "public ProgramParser(String prog, String input) {\n ProgramParser.programCode = new java.io.StringReader(prog);\n ProgramParser.stringInput = input;\n //System.out.println(\"Program: \" + prog + \" - input: \" + programInput);\n }", "public ProgramNode( String nameTmp,\n\t\t\tDeclarationsNode variablesTmp,\n\t\t\tSubProgramDeclarationsNode functionsTmp,\n\t\t\tCompoundStatementNode mainTmp ){\n\n\t\tname = nameTmp;\n\n\t\tvariables = variablesTmp;\n\n\t\tfunctions = functionsTmp;\n\n\t\tmain = mainTmp;\n\n\t}", "public Main() {\n this(DEFAULT_SIZE);\n }", "public Main() {\n this(DEFAULT_SIZE);\n }", "@Override\n\tpublic void accept(ASTVisitor v) {\n\t\tv.visitProgram(this);\n\t}", "protected Program getProgram() {\n final Holder<Program> holder = Holder.of( null );\n Hook.PROGRAM.run( holder );\n if ( holder.get() != null ) {\n return holder.get();\n }\n\n return Programs.standard();\n }", "public static Index of(int... indexes) {\n \t\treturn new Index(indexes.clone());\n \t}", "public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}", "private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n executableFile.delete();\r\n if (executableFile.createNewFile()) {\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".asm\"), \"utf-8\")); //create an object to write into the lst file\r\n\r\n String [] hex = generate.split(\" \");\r\n\r\n for (int index = 0; index < hex.length; index++) {\r\n String hex1 = hex[index].trim();\r\n System.out.println(hex1);\r\n\r\n int i = Integer.parseInt(hex1, 16);\r\n String bin = Integer.toBinaryString(i);\r\n System.out.println(bin);\r\n\r\n writer.write(bin); // once the instruction is converted to binary it is written into the exe file\r\n }\r\n\r\n writer.close();\r\n\r\n }\r\n }", "public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;", "public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }", "public static ProgramItemDTO valueOf(PersonalProgramDTO p) {\n return ProgramItemDTO.builder().id(p.getProgramId()).title(p.getProgramName())\n .description(p.getProgramSummary()).type(ProgramType.LEARNING_PATH).cms(ContentSourceType.LMS)\n .dueDate(p.getProgramDueDate() != null ? new DateTime(p.getProgramDueDate()).toDate() : null)\n .firstTopic(\"Ansible\") // Todo find real tag\n .personal(true).build();\n }", "private synchronized void criarIndice() throws Exception {\r\n\t\tIndexWriter indexWriter = getWriterPadrao(true);\r\n\t\ttry {\r\n\t\t\tindexWriter.getAnalyzer().close();\r\n\t\t\tindexWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tnew Programa();\n\t}", "Idiom createIdiom();", "ProgramEventEvent createProgramEventEvent();", "private void createProductIndex() {\n\t\tLinkedList<String> ids = new LinkedList<>(productIds.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<>(productIds.values());\n\t\tint k = 8;\n\t\tKFront kf = new KFront();\n\t\tkf.createKFront(k, ids);\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tkf.getTable().get(i).addAll(vals.get(i));\n\t\t}\n\n\t\tProductIndex pIndex = new ProductIndex(k);\n\t\tpIndex.insertData(kf.getTable(), kf.getConcatString());\n\t\tsaveToDir(PRODUCT_INDEX_FILE, pIndex);\n\t}", "public Program3 (String empName) {\r\n\t\tname = empName;\r\n\t}", "public interface Program {\n\n static EvalResult newEvalResult(Val val, EvalDetails evalDetails) {\n return new EvalResult(val, evalDetails);\n }\n\n /**\n * Eval returns the result of an evaluation of the Ast and environment against the input vars.\n *\n * <p>The vars value may either be an `interpreter.Activation` or a `map[string]interface{}`.\n *\n * <p>If the `OptTrackState` or `OptExhaustiveEval` flags are used, the `details` response will be\n * non-nil. Given this caveat on `details`, the return state from evaluation will be:\n *\n * <ul>\n * <li>`val`, `details`, `nil` - Successful evaluation of a non-error result.\n * <li>`val`, `details`, `err` - Successful evaluation to an error result.\n * <li>`nil`, `details`, `err` - Unsuccessful evaluation.\n * </ul>\n *\n * <p>An unsuccessful evaluation is typically the result of a series of incompatible `EnvOption`\n * or `ProgramOption` values used in the creation of the evaluation environment or executable\n * program.\n */\n EvalResult eval(Object vars);\n\n final class EvalResult {\n private final Val val;\n private final EvalDetails evalDetails;\n\n private EvalResult(Val val, EvalDetails evalDetails) {\n this.val = val;\n this.evalDetails = evalDetails;\n }\n\n public Val getVal() {\n return val;\n }\n\n public EvalDetails getEvalDetails() {\n return evalDetails;\n }\n }\n}", "Vertex createVertex();", "public static void main(String[] args) throws IOException {\n\t\tLineOfCode[] inputProgram = new LineOfCode[32];\n\t\t// Initialize an array of type LineOfMachineCode\n\t\tLineOfMachineCode[] instructions = new LineOfMachineCode[32];\n\t\tString[] opcodes = {\"LDA\", \"ADD\", \"SUB\", \"STA\", \"MPY\", \"DIV\", \n\t\t\t\t\"INP\", \"OUT\", \"JMP\", \"JMI\" }; \n\t\tString[] tokens = new String[80];\n\t\tString line = \"\";\n\t\t\n\t\t// prepare to read program from file\n\t\tFile filename = new File(\"MysteryProgram_0.txt\");\n\t\tScanner filescan = new Scanner(filename);\n\t\tScanner input = new Scanner(System.in);\n\t\tint numOfLines = 0; \n\t\t\n\t\t// Read the file containing the program one line at a time.\n\t\t// instantiate a LineOfCode Object for each line read in\n\t\t// and assign line tokens to the fields of the new object.\n\t\twhile(filescan.hasNext()){\n\t\t\tline = filescan.nextLine();\n\t\t\tString comments = \" \";\n\t\t\t// instantiate a LineOfCode object with empty fields\n\t\t\tinputProgram[numOfLines] = new LineOfCode();\n\t\t\t\n\t\t\tif(!line.isEmpty()){\n\t\t\ttokens = line.split(\"\\\\s+\");\n\t\t\t\n\t\t\t// if comments exits, create a comments string to holed them\n\t\t\t// and assign the comments to the appropriate instance variable\n\t\t\t\tif(tokens.length > 3 ){\n\t\t\t\t\tfor(int i = 3; i < tokens.length; i++ )\t\t\t\t\t\t\n\t\t\t\t\tcomments += tokens[i] + \" \";\t\n\t\t\t\t}else{\n\t\t\t\t\tcomments = \" \"; \n\t\t\t\t}\n\t\t\tinputProgram[numOfLines].setComments(comments);\n\t\t\t\n\t\t\t// check each token from the line and assign it to \n\t\t\t// its appropriate instance variable\n\t\t\tif(tokens[1].equals(\"DC\")){\n\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[1]);\n\t\t\t\tinputProgram[numOfLines].setLabel(tokens[0]);\n\t\t\t\tinputProgram[numOfLines].setOperand(tokens[2]);\n\t\t\t}else if(tokens[1].equals(\"DL\")){\n\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[1]);\n\t\t\t\tinputProgram[numOfLines].setLabel(tokens[0]);\n\t\t\t}else{// Big Else\t\t\t\n\t\t\t\t\n\t\t\t\t\tfor(int x = 0;x < opcodes.length; x++){\n\t\t\t\t\t\tif(opcodes[x].equals(tokens[0])){\n\t\t\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[0]);\n\t\t\t\t\t\tinputProgram[numOfLines].setOperand(tokens[1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(opcodes[x].equals(tokens[1])){\n\t\t\t\t\t\t\tinputProgram[numOfLines].setOpcode(tokens[1]);\n\t\t\t\t\t\t\tinputProgram[numOfLines].setLabel(tokens[0]);\n\t\t\t\t\t\t\tinputProgram[numOfLines].setOperand(tokens[2]);\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t} //for loop\n\t\t\t\n\t\t\t} //Big Else\n\t\t\t\t\n\t\t\t\n\t\t\t\tnumOfLines++;\n\t\t\t} \t//Super If\t\n\t\t\t\n\t\t} // while, \n\t\t\n\t\t\n\t\t// finished reading the file\n\t\tfilescan.close();\n\t\t\n\t\t// Assemble machine code out of each LineOfCode object \n\t\t// from the inputProgram array. \n\t\tfor(int i = 0; i < numOfLines; i++){\n\t\t\tinstructions[i] = new LineOfMachineCode();\n\t\t\t// handle pseudo-opcodes if they are present in the line\n\t\t\tif(inputProgram[i].getOpcode().equals(\"DL\"))\n\t\t\t\tinstructions[i].setOperand(0);\n\t\t\telse if(inputProgram[i].getOpcode().equals(\"DC\"))\n\t\t\t\t\tinstructions[i].setOperand(Integer.parseInt(inputProgram[i].getOperand()));\n\t\t\telse{\n\t\t\t\t// helper variables \n\t\t\t\tint opc = 0;\n\t\t\t\tint op = 0;\n\t\t\t\tfor(int j = 0; j < opcodes.length;j++){\n\t\t\t\t\tif(inputProgram[i].getOpcode().equals(opcodes[j])){\n\t\t\t\t\t\t// assign opcode in program to correct index of opcode array\n\t\t\t\t\t\topc = j; \n\t\t\t\t\t\tinstructions[i].setOpcode(opc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < numOfLines; k++){\n\t\t\t\t\tif(inputProgram[k].getLabel().equals(inputProgram[i].getOperand()))\n\t\t\t\t\t{\n\t\t\t\t\t\t// assign memory location of label to operand\n\t\t\t\t\t\top = k; \n\t\t\t\t\t\tinstructions[i].setOperand(op);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if opcode == 0 which is LDA how to handle it\n\t\t\t\t// handle operand greater than 9 ex. 12\n\t\t\t\tif(opc == 0 && op > 9)\n\t\t\t\t\t//System.out.print(opc + \"\" + op );\n\t\t\t\t\tinstructions[i].setOpcode(opc);\n\t\t\t\t\n\t\t\t\t//else if(opc == 0 && op < 10)\n\t\t\t\t\t//System.out.print(opc + \"0\" + op + \"\\n\");\n\t\t\telse{\t\n\t\t\t\t//System.out.print( (opc * 100 + op) + \"\\n\");\n\t\t\t\tinstructions[i].setOpcode(opc);\n\t\t\t\tinstructions[i].setOperand(op);\n\t\t\t\t}\n\t\t\t} // Big else\n\t\t\t\n\t\t\t\n\t\t\t// At this point we have everything converted to machine code\n\t\t\t// Option I - have another for loop start here to begin execution of lineOfMachineCode\n\t\t}// outer for \n\t\t\n\t\t// Vars used during execution Execute the program\n\t\tint pc = 0; \t\t\t\t\n\t\tint store = 0; \n\t\tint opcode = 0;\t\t \n\t\tint value = 0; \n\t\tint accumulator = 0; \t\t\t\n\t\t// Program execution\n\t\twhile( pc < numOfLines){\n\n\t\t\t\topcode = instructions[pc].getOpcode();\n\t\t\t\n\t\t\t\tif(opcode == 8){\n\t\t\t\tpc = instructions[pc].getOperand();\n\t\t\t\topcode = instructions[pc].getOpcode();\n\t\t\t\t}else if(opcode == 9 && accumulator < 0 ){\n\t\t\t\t\tpc = instructions[pc].getOperand();\n\t\t\t\t\topcode = instructions[pc].getOpcode();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\tswitch(opcode){\n\t\t\tcase 0: // LDA \n\t\t\t\tif(inputProgram[pc].getOpcode().equals(\"DC\"))\n\t\t\t\taccumulator = instructions[pc].getOperand();\n\t\t\t\telse if(inputProgram[pc].getOpcode().equals(\"DL\"))\n\t\t\t\t\taccumulator = instructions[pc].getOperand();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: //ADD\n\t\t\t\t\taccumulator += value;\n\t\t\t\tbreak;\n\t\t\tcase 2: //SUB\n\t\t\t\t\taccumulator -= value;\n\t\t\t\tbreak;\n\t\t\tcase 3: // STA\n\t\t\t\tstore = accumulator; \n\t\t\t\tbreak;\n\t\t\tcase 4: // MPY\n\t\t\t\t\taccumulator *= value;\n\t\t\t\tbreak;\n\t\t\tcase 5: // DIV\n\t\t\t\t\taccumulator /= value;\n\t\t\t\tbreak;\n\t\t\tcase 6: //INP\n\t\t\t\tSystem.out.println(\"Enter an Integer\");\n\t\t\t\tvalue = input.nextInt();\n\t\t\t\tbreak;\n\t\t\tcase 7: // OUT\n\t\t\t\tSystem.out.println(store);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Invalid opcode\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tpc++;\n\t\t}// while\n\t\tSystem.out.println(\"Total Lines: \" + numOfLines);\n\t}", "public InputProgram getInputProgram() {\n return inputProgram;\n }", "public Main() {\r\n\t}", "public Program getProgram() {\n return this.program;\n }", "public Indexer() {\n }", "public Main() {}", "@Override\n\tpublic String getActiveUniform(int program, int index, IntBuffer size, Buffer type) {\n\t\tthrow new UnsupportedOperationException(\"missing implementation\");\n\t}", "public ProgramManager() {\n display = new DisplayManager();\n fileName = \"resources/aLargeFile\";\n try {\n fileReader = new BufferedReader(new FileReader(fileName));\n } catch (FileNotFoundException e) {\n logger.error(e.getMessage());\n }\n wordStorage = new WordStorage();\n }", "public ProductIndexQuery() {\n\t}", "public static AddProject newInstance() {\n AddProject fragment = new AddProject();\n return fragment;\n }", "public static Key createPrimaryKey(Number idexped, Number idbulto)\n {\n return new Key(new Object[] {idexped, idbulto});\n }", "public static InvertedIndex createInvertedIndex(String arg1,String arg2) {\n\n\t\tPath path1 = Paths.get(arg1);\t\n\t\tReview r = new Review();\n\t\tQA qa = new QA();\n\t\tInvertedIndex reviews = ReadAndDisplayOperation.readFile(path1,r);\n\t\tpath1 = Paths.get(arg2);\n\t\tInvertedIndex qas = ReadAndDisplayOperation.readFile(path1,qa);\n\t\tqas.sortAll();\n\t\treturn qas;\n\t}", "static public ShaderProgram createDefaultShader() {\n String vertexShader = \"attribute vec4 \" + ShaderProgram.POSITION_ATTRIBUTE + \";\\n\" //\n + \"attribute vec2 \" + ShaderProgram.TEXCOORD_ATTRIBUTE + \"0;\\n\" //\n + \"uniform mat4 u_projTrans;\\n\" //\n + \"varying vec2 v_texCoords;\\n\" //\n + \"\\n\" //\n + \"void main()\\n\" //\n + \"{\\n\" //\n + \" v_texCoords = \" + ShaderProgram.TEXCOORD_ATTRIBUTE + \"0;\\n\" //\n + \" gl_Position = u_projTrans * \" + ShaderProgram.POSITION_ATTRIBUTE + \";\\n\" //\n + \"}\\n\";\n String fragmentShader = \"#ifdef GL_ES\\n\" //\n + \"#define LOWP lowp\\n\" //\n + \"precision mediump float;\\n\" //\n + \"#else\\n\" //\n + \"#define LOWP \\n\" //\n + \"#endif\\n\" //\n + \"varying vec2 v_texCoords;\\n\" //\n + \"uniform sampler2D u_texture;\\n\" //\n + \"void main()\\n\"//\n + \"{\\n\" //\n + \" gl_FragColor = texture2D(u_texture, v_texCoords);\\n\" //\n + \"}\";\n\n ShaderProgram shader = new ShaderProgram(vertexShader, fragmentShader);\n if (shader.isCompiled() == false)\n throw new IllegalArgumentException(\"couldn't compile shader: \" + shader.getLog());\n return shader;\n }", "public static CapitalIndexedBondSecurity.Builder builder() {\n return new CapitalIndexedBondSecurity.Builder();\n }", "public static Index open(String name, Path path) {\n if (!Files.isDirectory(path.resolve(INDEX))) {\n throw new InvalidRepositoryPathException();\n }\n try {\n return new Index(name, path);\n\n } catch (IOException ex) {\n throw new IOFailureException(ex);\n }\n }", "Reproducible newInstance();", "indexSet createindexSet();", "@NativeType(\"bgfx_program_handle_t\")\n public static short bgfx_create_compute_program(@NativeType(\"bgfx_shader_handle_t\") short _csh, @NativeType(\"bool\") boolean _destroyShaders) {\n long __functionAddress = Functions.create_compute_program;\n return invokeCC(_csh, _destroyShaders, __functionAddress);\n }", "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 DTProgramaFormacion verInfoPrograma(String nombreProg) throws ProgramaFormacionExcepcion;", "public static ASTProgram parseValidProgram(String text)\n {\n ASTProgram program = null;\n try {\n program = (new MyDecafParser()).parse(\n (new MyDecafLexer()).lex(text));\n } catch (IOException ex) {\n assertTrue(false);\n } catch (InvalidTokenException ex) {\n assertTrue(false);\n } catch (InvalidSyntaxException ex) {\n assertTrue(false);\n }\n return program;\n }", "private void newApplication() throws Exception{\n\t\t\n\t\tPrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(this.appfile)));\n\t\tint counter = 0;\n\t\t\n\t\twriter.println(\"Scholarship\");\n\t\twriter.println(this.scholarship);\n\t\twriter.println();\n\t\twriter.println(\"Student\");\n\t\twriter.println(this.student);\n\t\twriter.println();\n\t\twriter.println(\"GPA\");\n\t\twriter.println(this.gpa);\n\t\twriter.println();\n\t\twriter.println(\"Education Level\");\n\t\twriter.println(this.edulvl);\n\t\twriter.println();\n\t\twriter.println(\"Date\");\n\t\twriter.println(this.date);\n\t\twriter.println();\n\t\twriter.println(\"Status\");\n\t\twriter.println(this.status);\n\t\twriter.println();\n\t\twriter.println(\"Priority\");\n\t\twriter.println(this.priority);\n\t\twriter.println();\n\n\t\twriter.close();\n\t\t\n\t}", "private synchronized void enqueueProgram(int index, Program individual) {\n pendingPrograms.add(new IndexedProgram(index, individual));\n notifyAll();\n }", "public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }", "public IndexRecord()\n {\n }", "public Index initIndex(String indexName) {\n return new Index(this, indexName);\n }", "public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }", "Program parse() throws SyntaxException {\n\t\tProgram p = null;\n\t\tp = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}", "public Main() {\r\n }", "public Main() {\r\n }", "public String translate(Program p)\r\n\t{\r\n\t\tString headers= \"#include \\\"lcpl_runtime.h\\\" \\n\";\r\n\t\t\r\n\t\t/* static data : strings used in the program */\r\n\t\tString stringConstants;\r\n\t\t_GlobalStringRuntime gsr = new _GlobalStringRuntime();\r\n\t\tgsr.searchProgramForStrings(p);\r\n\t\tstringConstants = gsr.getStringCode();\r\n\t\t\r\n\t\t/* object layouts: pointer to RTTI followed by attributes */\r\n\t\tString objectLayouts;\r\n\t\t_Object_Layout ol = new _Object_Layout();\r\n\t\tol.generateObjectLayoutCode(p);\r\n\t\tobjectLayouts =ol.getObjLayoutCode();\r\n\t\t\r\n\t\t/* static data : class names, as strings */\r\n\t\tString classNames;\r\n\t\t_ClassName cn = new _ClassName();\r\n\t\tcn.generateClassNames(p);\r\n\t\tclassNames = cn.getClassNameCode();\r\n\t\t\r\n\t\t/* constructors */\r\n\t\tString constructorDeclarations;\r\n\t\t_ConstructDeclarations cd = new _ConstructDeclarations();\r\n\t\tcd.generateConstructDecl(p);\r\n\t\tconstructorDeclarations = cd.getConstructDeclCode();\r\n\t\t\r\n\t\t/* declaration of methods */\r\n\t\tString methodDeclarations;\r\n\t\t_MethodDeclarations md = new _MethodDeclarations();\r\n\t\tmd.generateMethodDeclCode(p);\r\n\t\tmethodDeclarations = md.getMethodDeclCode();\r\n\t\t\r\n\t\t/* runtime type information (RTTI) - class name, class size, parent class, vtable */\r\n\t\tString vtables;\r\n\t\t_RTTI_Layout rtti = new _RTTI_Layout();\r\n\t\trtti.generateLayoutCode(p);\r\n\t\tvtables = rtti.getLayoutCode();\r\n\t\t\r\n\t\t/* definitions of methods in the program, including constructors */\r\n\t\tString constructors;\r\n\t\t//\"void Main_init(struct TMain *self){ IO_init((struct TIO*)self); } \\n\";\r\n\t\t_ClassInit ci = new _ClassInit(rtti.vt, gsr.getLiterals());\r\n\t\tci.generateMethodsCode(p, rtti.getSortedClassesList());\r\n\t\tconstructors = ci.getInitMethodsCode();\r\n\t\t\r\n\t\tString startup= \"void startup(void) { struct TMain *main=__lcpl_new(&RMain); M4_Main_main(main); } \\n\";\r\n\t\tSystem.out.println(headers+stringConstants+objectLayouts+classNames+constructorDeclarations+methodDeclarations+vtables+constructors+startup);\r\n\t\t//System.out.println(stringConstants);\r\n\t\t/*\r\n\t\tSystem.out.println(\"=======headers========\");\r\n\t\tSystem.out.println(headers);\r\n\t\tSystem.out.println(\"=======stringConstanf========\");\r\n\t\tSystem.out.println(stringConstants);\r\n\t\tSystem.out.println(\"=======objectLayou========\");\r\n\t\tSystem.out.println(objectLayouts);\r\n\t\tSystem.out.println(\"=======classnames========\");\r\n\t\tSystem.out.println(classNames);\r\n\t\tSystem.out.println(\"=======constructDecl========\");\r\n\t\tSystem.out.println(constructorDeclarations);\r\n\t\tSystem.out.println(\"=======methodDecl========\");\r\n\t\tSystem.out.println(methodDeclarations);\r\n\t\tSystem.out.println(\"=======vtables========\");\r\n\t\tSystem.out.println(vtables);\r\n\t\tSystem.out.println(\"=======constructors========\");\r\n\t\tSystem.out.println(constructors);\r\n\t\tSystem.out.println(\"=======startup========\");\r\n\t\tSystem.out.println(startup);*/\r\n\t\treturn headers+stringConstants+objectLayouts+classNames+constructorDeclarations+methodDeclarations+vtables+constructors+startup;\r\n\t\t\r\n\t}", "public Program(Name name, Set<Session> sessionSet, Set<Tag> tags) {\n super(name, tags);\n requireNonNull(sessionSet);\n this.sessionSet.addAll(sessionSet);\n }", "public Main() {\n\t\tsuper();\n\t}" ]
[ "0.7017969", "0.7017969", "0.7017969", "0.6298247", "0.60550725", "0.5879775", "0.5553273", "0.55333287", "0.54488707", "0.5316871", "0.5296491", "0.526659", "0.5223908", "0.517145", "0.51596254", "0.51270986", "0.5121779", "0.5095094", "0.50109094", "0.5005311", "0.4972158", "0.49405757", "0.49190482", "0.49183118", "0.49014488", "0.48892292", "0.48869798", "0.4877333", "0.4870819", "0.48478973", "0.48478565", "0.48365825", "0.48260003", "0.48256236", "0.481767", "0.48093387", "0.48046055", "0.47932097", "0.4784218", "0.47727823", "0.47586563", "0.47551158", "0.4744862", "0.47175154", "0.47166586", "0.47003573", "0.46899867", "0.46873316", "0.46792617", "0.4670751", "0.4670751", "0.46646193", "0.46532756", "0.4647667", "0.46298122", "0.4625729", "0.46138948", "0.46114963", "0.46090505", "0.46021625", "0.45990095", "0.45940864", "0.45893374", "0.45879555", "0.45823354", "0.45815507", "0.45549613", "0.45494062", "0.45151404", "0.4514023", "0.4509541", "0.45013955", "0.45008624", "0.44933006", "0.44907278", "0.44899493", "0.4487002", "0.44865426", "0.44827464", "0.44754428", "0.44748843", "0.4465404", "0.44644666", "0.44613582", "0.44554886", "0.44504142", "0.44493744", "0.44457966", "0.44455662", "0.44391957", "0.44371098", "0.44295874", "0.4426418", "0.44260126", "0.4425439", "0.44221848", "0.44221848", "0.44218948", "0.44205156", "0.44175988" ]
0.74109745
0
query group flow control rule
public StringBuilder adminQueryGroupFlowCtrlRule(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result) { // build query entity GroupResCtrlEntity qryEntity = new GroupResCtrlEntity(); // get queried operation info, for createUser, modifyUser, dataVersionId if (!WebParameterUtils.getQueriedOperateInfo(req, qryEntity, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } // get group list if (!WebParameterUtils.getStringParamValue(req, WebFieldDef.COMPSGROUPNAME, false, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } final Set<String> groupNameSet = (Set<String>) result.getRetData(); // get and valid qryPriorityId info if (!WebParameterUtils.getQryPriorityIdParameter(req, false, TBaseConstants.META_VALUE_UNDEFINED, TServerConstants.QRY_PRIORITY_MIN_VALUE, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } int inQryPriorityId = (int) result.getRetData(); // get flowCtrlEnable's statusId info if (!WebParameterUtils.getFlowCtrlStatusParamValue(req, false, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } EnableStatus flowCtrlEnable = (EnableStatus) result.getRetData(); qryEntity.updModifyInfo(qryEntity.getDataVerId(), null, TBaseConstants.META_VALUE_UNDEFINED, inQryPriorityId, flowCtrlEnable, TBaseConstants.META_VALUE_UNDEFINED, null); Map<String, GroupResCtrlEntity> groupResCtrlEntityMap = defMetaDataService.getGroupCtrlConf(groupNameSet, qryEntity); // build return result int totalCnt = 0; WebParameterUtils.buildSuccessWithDataRetBegin(sBuffer); for (GroupResCtrlEntity resCtrlEntity : groupResCtrlEntityMap.values()) { if (resCtrlEntity == null) { continue; } if (totalCnt++ > 0) { sBuffer.append(","); } sBuffer = resCtrlEntity.toOldVerFlowCtrlWebJsonStr(sBuffer, true); } WebParameterUtils.buildSuccessWithDataRetEnd(sBuffer, totalCnt); return sBuffer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGroup() throws Exception {\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addGroupBegin();\n programBuilder.addRuleInstance( CalcMergeRule.INSTANCE );\n programBuilder.addRuleInstance( ProjectToCalcRule.INSTANCE );\n programBuilder.addRuleInstance( FilterToCalcRule.INSTANCE );\n programBuilder.addGroupEnd();\n\n checkPlanning( programBuilder.build(), \"select upper(name) from dept where deptno=20\" );\n }", "private StringBuilder innAddOrUpdGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result,\n boolean isAddOp) {\n // check and get operation info\n if (!WebParameterUtils.getAUDBaseInfo(req, isAddOp, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n BaseEntity opEntity = (BaseEntity) result.getRetData();\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n final Set<String> groupNameSet = (Set<String>) result.getRetData();\n // get and valid qryPriorityId info\n if (!WebParameterUtils.getQryPriorityIdParameter(req,\n false, TBaseConstants.META_VALUE_UNDEFINED,\n TServerConstants.QRY_PRIORITY_MIN_VALUE, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n int qryPriorityId = (int) result.getRetData();\n // get flowCtrlEnable's statusId info\n if (!WebParameterUtils.getFlowCtrlStatusParamValue(req,\n false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n EnableStatus flowCtrlEnable = (EnableStatus) result.getRetData();\n // get and flow control rule info\n int flowRuleCnt = WebParameterUtils.getAndCheckFlowRules(req,\n (isAddOp ? TServerConstants.BLANK_FLOWCTRL_RULES : null), sBuffer, result);\n if (!result.isSuccess()) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n String flowCtrlInfo = (String) result.getRetData();\n // add or modify records\n GroupResCtrlEntity ctrlEntity;\n List<GroupProcessResult> retInfoList = new ArrayList<>();\n for (String groupName : groupNameSet) {\n ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName);\n if (ctrlEntity == null) {\n if (isAddOp) {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result));\n } else {\n result.setFailResult(DataOpErrCode.DERR_NOT_EXIST.getCode(),\n DataOpErrCode.DERR_NOT_EXIST.getDescription());\n retInfoList.add(new GroupProcessResult(groupName, \"\", result));\n }\n } else {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result));\n }\n }\n return buildRetInfo(retInfoList, sBuffer);\n }", "public StringBuilder adminDelGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n // check and get operation info\n if (!WebParameterUtils.getAUDBaseInfo(req, false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n BaseEntity opEntity = (BaseEntity) result.getRetData();\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n Set<String> groupNameSet = (Set<String>) result.getRetData();\n // add or modify records\n GroupResCtrlEntity ctrlEntity;\n List<GroupProcessResult> retInfoList = new ArrayList<>();\n for (String groupName : groupNameSet) {\n ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName);\n if (ctrlEntity != null\n && ctrlEntity.getFlowCtrlStatus() != EnableStatus.STATUS_DISABLE) {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n TServerConstants.QRY_PRIORITY_DEF_VALUE, EnableStatus.STATUS_DISABLE,\n 0, TServerConstants.BLANK_FLOWCTRL_RULES, sBuffer, result));\n } else {\n result.setFullInfo(true, DataOpErrCode.DERR_SUCCESS.getCode(), \"Ok\");\n retInfoList.add(new GroupProcessResult(groupName, \"\", result));\n }\n }\n return buildRetInfo(retInfoList, sBuffer);\n }", "boolean exactMatch(FlowRule rule);", "public void testAllowDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "void startVisit(Group group);", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "public interface FlowRule extends PiTranslatable {\n\n IndexTableId DEFAULT_TABLE = IndexTableId.of(0);\n int MAX_TIMEOUT = 60;\n int MIN_PRIORITY = 0;\n int MAX_PRIORITY = 65535;\n\n /**\n * Reason for flow parameter received from switches.\n * Used to check reason parameter in flows.\n */\n enum FlowRemoveReason {\n IDLE_TIMEOUT,\n HARD_TIMEOUT,\n DELETE,\n GROUP_DELETE,\n METER_DELETE,\n EVICTION,\n NO_REASON;\n\n /**\n * Covert short to enum.\n * @return reason in enum\n * @param reason remove reason in integer\n */\n public static FlowRemoveReason parseShort(short reason) {\n switch (reason) {\n case -1 :\n return NO_REASON;\n case 0:\n return IDLE_TIMEOUT;\n case 1:\n return HARD_TIMEOUT;\n case 2 :\n return DELETE;\n case 3:\n return GROUP_DELETE;\n case 4:\n return METER_DELETE;\n case 5:\n return EVICTION;\n default :\n return NO_REASON;\n }\n }\n }\n\n /**\n * Returns the ID of this flow.\n *\n * @return the flow ID\n */\n FlowId id();\n\n /**\n * Returns the application id of this flow.\n *\n * @return an applicationId\n */\n short appId();\n\n /**\n * Returns the group id of this flow.\n *\n * @return an groupId\n */\n GroupId groupId();\n\n /**\n * Returns the flow rule priority given in natural order; higher numbers\n * mean higher priorities.\n *\n * @return flow rule priority\n */\n int priority();\n\n /**\n * Returns the identity of the device where this rule applies.\n *\n * @return device identifier\n */\n DeviceId deviceId();\n\n /**\n * Returns the traffic selector that identifies what traffic this rule\n * should apply to.\n *\n * @return traffic selector\n */\n TrafficSelector selector();\n\n /**\n * Returns the traffic treatment that applies to selected traffic.\n *\n * @return traffic treatment\n */\n TrafficTreatment treatment();\n\n /**\n * Returns the timeout for this flow requested by an application.\n *\n * @return integer value of the timeout\n */\n int timeout();\n\n /**\n * Returns the hard timeout for this flow requested by an application.\n * This parameter configure switch's flow hard timeout.\n * In case of controller-switch connection lost, this variable can be useful.\n * @return integer value of the hard Timeout\n */\n int hardTimeout();\n\n /**\n * Returns the reason for the flow received from switches.\n *\n * @return FlowRemoveReason value of reason\n */\n FlowRemoveReason reason();\n\n /**\n * Returns whether the flow is permanent i.e. does not time out.\n *\n * @return true if the flow is permanent, otherwise false\n */\n boolean isPermanent();\n\n /**\n * Returns the table id for this rule.\n *\n * @return an integer.\n * @deprecated in Loon release (version 1.11.0). Use {@link #table()} instead.\n */\n @Deprecated\n int tableId();\n\n /**\n * Returns the table identifier for this rule.\n *\n * @return a table identifier.\n */\n TableId table();\n\n /**\n * {@inheritDoc}\n *\n * Equality for flow rules only considers 'match equality'. This means that\n * two flow rules with the same match conditions will be equal, regardless\n * of the treatment or other characteristics of the flow.\n *\n * @param obj the reference object with which to compare.\n * @return {@code true} if this object is the same as the obj\n * argument; {@code false} otherwise.\n */\n boolean equals(Object obj);\n\n /**\n * Returns whether this flow rule is an exact match to the flow rule given\n * in the argument.\n * <p>\n * Exact match means that deviceId, priority, selector,\n * tableId, flowId and treatment are equal. Note that this differs from\n * the notion of object equality for flow rules, which does not consider the\n * flowId or treatment when testing equality.\n * </p>\n *\n * @param rule other rule to match against\n * @return true if the rules are an exact match, otherwise false\n */\n boolean exactMatch(FlowRule rule);\n\n /**\n * A flowrule builder.\n */\n interface Builder {\n\n /**\n * Assigns a cookie value to this flowrule. Mutually exclusive with the\n * fromApp method. This method is intended to take a cookie value from\n * the dataplane and not from the application.\n *\n * @param cookie a long value\n * @return this\n */\n Builder withCookie(long cookie);\n\n /**\n * Assigns the application that built this flow rule to this object.\n * The short value of the appId will be used as a basis for the\n * cookie value computation. It is expected that application use this\n * call to set their application id.\n *\n * @param appId an application id\n * @return this\n */\n Builder fromApp(ApplicationId appId);\n\n /**\n * Sets the priority for this flow rule.\n *\n * @param priority an integer\n * @return this\n */\n Builder withPriority(int priority);\n\n /**\n * Sets the deviceId for this flow rule.\n *\n * @param deviceId a device id\n * @return this\n */\n Builder forDevice(DeviceId deviceId);\n\n /**\n * Sets the table id for this flow rule, when the identifier is of type {@link TableId.Type#INDEX}. Default\n * value is 0.\n * <p>\n * <em>Important:</em> This method is left here for backward compatibility with applications that specifies\n * table identifiers using integers, e.g. as in OpenFlow. Currently there is no plan to deprecate this method,\n * however, new applications should favor using {@link #forTable(TableId)}.\n *\n * @param tableId an integer\n * @return this\n */\n Builder forTable(int tableId);\n\n /**\n * Sets the table identifier for this flow rule.\n * Default identifier is of type {@link TableId.Type#INDEX} and value 0.\n *\n * @param tableId table identifier\n * @return this\n */\n Builder forTable(TableId tableId);\n\n /**\n * Sets the selector (or match field) for this flow rule.\n *\n * @param selector a traffic selector\n * @return this\n */\n Builder withSelector(TrafficSelector selector);\n\n /**\n * Sets the traffic treatment for this flow rule.\n *\n * @param treatment a traffic treatment\n * @return this\n */\n Builder withTreatment(TrafficTreatment treatment);\n\n /**\n * Makes this rule permanent on the dataplane.\n *\n * @return this\n */\n Builder makePermanent();\n\n /**\n * Makes this rule temporary and timeout after the specified amount\n * of time.\n *\n * @param timeout an integer\n * @return this\n */\n Builder makeTemporary(int timeout);\n\n /**\n * Sets the idle timeout parameter in flow table.\n *\n * Will automatically make it permanent or temporary if the timeout is 0 or not, respectively.\n * @param timeout an integer\n * @return this\n */\n default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }\n\n /**\n * Sets hard timeout parameter in flow table.\n * @param timeout an integer\n * @return this\n */\n Builder withHardTimeout(int timeout);\n\n /**\n * Sets reason parameter received from switches .\n * @param reason a short\n * @return this\n */\n Builder withReason(FlowRemoveReason reason);\n\n /**\n * Builds a flow rule object.\n *\n * @return a flow rule.\n */\n FlowRule build();\n\n }\n}", "FlowRule build();", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "public void visitGroup(Group group) {\n\t}", "@Test(priority=44)\n\tpublic void campaign_user_with_invalid_filter_operator_for_group_id() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_invalid_filter_operator_for_group_id\", \"To validate whether user is able to get campaign and its users through campaign/user api with invalid filter operator for group_id\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\tString camp_group_id = group_id;\n\t\tString[] operators = {\"+\",\"!\",\"~\",\"#\",\"@\",\"$\",\"%\",\"^\",\"&\",\"*\",\"-\",\"/\",\":\"};\n\t\tString encoded_operator = \"\";\n\t\tfor(String operator:operators){\n\t\t\tencoded_operator = java.net.URLEncoder.encode(operator, \"UTF-8\");\n\t\t\tList<NameValuePair> list = new ArrayList<NameValuePair>();\n\t\t\tlist.add(new BasicNameValuePair(\"filter\", \"group_id\"+encoded_operator+camp_group_id));\n\t\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, list);\n\t\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with \"+ operator +\" filter operator for group_id\");\n\t\t\tSystem.out.println(\"Execute campaign/user api method with \"+ operator +\" filter operator for group_id\");\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t // Convert response to JSON object\t\n\t\t\t JSONParser parser = new JSONParser();\n\t\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t\t String result_data = json.get(\"result\").toString(); \n\t\t\t Assert.assertEquals(result_data, \"error\", \"Invalid result value is in resonse\");\n\t\t\t String err_data = json.get(\"err\").toString();\n\t\t\t Assert.assertEquals(err_data, \"Unsupported comparator used in filter on rule 1 : group_id\"+operator+camp_group_id);\n\t\t\t test.log(LogStatus.PASS, \"Check whether proper validation message is displayed when \"+ operator +\" filter operator is used for group_id\");\n\t\t\t}\t \n\t\t}\t\n\t}", "GroupOpt getGroup();", "public boolean applyCommonGroupingRule() {\n\t \n\t if(isApplicableSameGroupingRule() == false) {\n\t \tSystem.out.println(\"ERROR: Failure to apply Same Grouping Rewriting Rule\");\n\t \treturn false;\n\t }\n\t \n\t this.rset = new HashMap<Integer, Query>();\n\t this.rtype = RType.SAME_GROUPING_RULE;\n\t this.rqId = 1;\n\n\t Grouping gPart = this.qset.entrySet().iterator().next().getValue().getQueryTriple()._1();\n\t \n\t Measuring mPart = new Measuring();\n\t Operation opPart = new Operation();\n\t for(Map.Entry<Integer, Query> entry2 : this.qset.entrySet()){\n\t\t\tmPart.addMeasuring(entry2.getValue().getQueryTriple()._2());\n\t\t opPart.addOperation(entry2.getValue().getQueryTriple()._3());\n\t }\n\t Tuple3<Grouping, Measuring, Operation> query = new Tuple3<>(gPart, mPart, opPart);\n\t \n\t rset.put(rqId, new Query(query));\n\t return true;\n\t}", "Rule getRule();", "@Test\n public void testRuleDescription() throws Exception {\n\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addRuleByDescription( \"FilterToCalcRule\" );\n\n HepPlanner planner = new HepPlanner( programBuilder.build() );\n\n planner.addRule( FilterToCalcRule.INSTANCE );\n\n checkPlanning( planner, \"select name from sales.dept where deptno=12\" );\n }", "Group getNextExecutableGroup();", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "public interface ValidatingRule extends NormalisationRule\n{\n /**\n * Performs validation for the given stage by validating the input object using the criteria\n * defined for this rule.\n * \n * @param stage\n * A URI denoting the stage to use. This stage must be a valid stage for this type of\n * rule based on the result of validForStage(stage)\n * @param input\n * The input object to be validated by this rule.\n * @return True if the validation succeeded, or false otherwise.\n * @throws InvalidStageException\n * If the given stage was not valid.\n * @throws ValidationFailedException\n * If the validation failed.\n * @throws QueryAllException\n * If the validation process did not complete.\n */\n boolean normaliseByStage(URI stage, Object input) throws InvalidStageException, ValidationFailedException,\n QueryAllException;\n \n /**\n * Validates the given input object in the stage after query creation, but before query parsing.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterQueryCreation(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after query parsing, but before query\n * submission to the provider.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterQueryParsing(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after the RDF results have been imported from\n * the results for a provider, but before they have been merged into a pool with results from\n * other providers.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterResultsImport(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after the combined RDF statements in the pool\n * have been serialised to the results document.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterResultsToDocument(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after the RDF results have been merged into a\n * pool of RDF statements, but before they have been serialised to the results document.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageAfterResultsToPool(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage after results have been returned from a\n * provider, but before they have been parsed into RDF statements.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;\n \n /**\n * Validates the given input object in the stage where query variables are being normalised\n * based on the context of the provider.\n * \n * @param input\n * The input object to be validated.\n * @return True if the input object was valid and false otherwise.\n * @throws ValidationFailedException\n * If the validation failed.\n */\n boolean stageQueryVariables(Object input) throws ValidationFailedException;\n}", "@Test\n public void testFromFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from $cheesery ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from $cheesery\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "private void CreateSimpleDataBaseRules(String database) throws isisicatclient.IcatException_Exception {\n Grouping publishedDataAdmins = new Grouping();\r\n publishedDataAdmins.name = \"Disordered Materials Published Data Admins\";\r\n publishedDataAdmins.id = port.create(sessionId, publishedDataAdmins);\r\n\r\n //Add Frazer to that group\r\n /*UserGroup frazerToPdas = new UserGroup();\r\n frazerToPdas.grouping = publishedDataAdmins;\r\n frazerToPdas.user = frazer;\r\n frazerToPdas.id = port.create(sessionId, frazerToPdas);*/\r\n String databaseName = \" = '\" + database + \"'\";\r\n\r\n //Create on ParameterType\r\n Rule pdaCreateParamType = new Rule();\r\n pdaCreateParamType.grouping = publishedDataAdmins;\r\n pdaCreateParamType.crudFlags = \"CU\";\r\n pdaCreateParamType.what = \"ParameterType\";\r\n port.create(sessionId, pdaCreateParamType);\r\n String count;\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(i) FROM Investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for Investigation\r\n Rule pdaInvestigation = new Rule();\r\n pdaInvestigation.grouping = publishedDataAdmins;\r\n pdaInvestigation.crudFlags = \"CRUD\";\r\n pdaInvestigation.what = \"SELECT i FROM Investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaInvestigation);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(i) FROM Investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for InvestigationParameter\r\n Rule pdaInvParam = new Rule();\r\n pdaInvParam.grouping = publishedDataAdmins;\r\n pdaInvParam.crudFlags = \"CRUD\";\r\n pdaInvParam.what = \"SELECT ip FROM InvestigationParameter ip JOIN ip.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaInvParam);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(ip) FROM InvestigationParameter ip JOIN ip.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - InvestigationParameter - OK - \" + count);\r\n }\r\n\r\n //Rules for Dataset\r\n Rule pdaDs = new Rule();\r\n pdaDs.grouping = publishedDataAdmins;\r\n pdaDs.crudFlags = \"CRUD\";\r\n pdaDs.what = \"SELECT ds FROM Dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(ds) FROM Dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Dataset - OK - \" + count);\r\n }\r\n\r\n //Rules for DatasetParameter\r\n Rule pdaDsParam = new Rule();\r\n pdaDsParam.grouping = publishedDataAdmins;\r\n pdaDsParam.crudFlags = \"CRUD\";\r\n pdaDsParam.what = \"SELECT dsp FROM DatasetParameter dsp JOIN dsp.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDsParam);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(dsp) FROM DatasetParameter dsp JOIN dsp.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - DatasetParameter - OK - \" + count);\r\n }\r\n\r\n //Rules for Datafile\r\n Rule pdaDf = new Rule();\r\n pdaDf.grouping = publishedDataAdmins;\r\n pdaDf.crudFlags = \"CRUD\";\r\n pdaDf.what = \"SELECT df FROM Datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDf);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(df) FROM Datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Datafile - OK - \" + count);\r\n }\r\n\r\n //Rules for DatasetParameter\r\n Rule pdaDfParam = new Rule();\r\n pdaDfParam.grouping = publishedDataAdmins;\r\n pdaDfParam.crudFlags = \"CRUD\";\r\n pdaDfParam.what = \"SELECT dfp FROM DatafileParameter dfp JOIN dfp.datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDfParam);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(dfp) FROM DatafileParameter dfp JOIN dfp.datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - DatafileParameter - OK - \" + count);\r\n }\r\n //Rules for Sample via Investigation\r\n Rule pdaSampleViaInv = new Rule();\r\n pdaSampleViaInv.grouping = publishedDataAdmins;\r\n pdaSampleViaInv.crudFlags = \"CRUD\";\r\n pdaSampleViaInv.what = \"SELECT s FROM Sample s JOIN s.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleViaInv);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(s) FROM Sample s JOIN s.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Sample via Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for Sample Via Dataset\r\n Rule pdaSampleViaDs = new Rule();\r\n pdaSampleViaDs.grouping = publishedDataAdmins;\r\n pdaSampleViaDs.crudFlags = \"CRUD\";\r\n pdaSampleViaDs.what = \"SELECT s FROM Sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleViaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(s) FROM Sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Sample via Dataset - OK - \" + count);\r\n }\r\n\r\n //Rules for SampleParameter via Investigation\r\n Rule pdaSampleParamViaInv = new Rule();\r\n pdaSampleParamViaInv.grouping = publishedDataAdmins;\r\n pdaSampleParamViaInv.crudFlags = \"CRUD\";\r\n pdaSampleParamViaInv.what = \"SELECT sp FROM SampleParameter sp JOIN sp.sample s JOIN s.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleParamViaInv);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(sp) FROM SampleParameter sp JOIN sp.sample s JOIN s.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleParameter via Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for SampleParameter Via Dataset\r\n Rule pdaSampleParamViaDs = new Rule();\r\n pdaSampleParamViaDs.grouping = publishedDataAdmins;\r\n pdaSampleParamViaDs.crudFlags = \"CRUD\";\r\n pdaSampleParamViaDs.what = \"SELECT sp FROM SampleParameter sp JOIN sp.sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleParamViaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(sp) FROM SampleParameter sp JOIN sp.sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleParameter via Dataset - OK - \" + count);\r\n }\r\n\r\n //SampleType - create is independant, so need 'direct' 'C' access, and then to read their own?\r\n Rule pdaCreateSampleType = new Rule();\r\n pdaCreateSampleType.grouping = publishedDataAdmins;\r\n pdaCreateSampleType.crudFlags = \"CR\";\r\n pdaCreateSampleType.what = \"SampleType\";\r\n port.create(sessionId, pdaCreateSampleType);\r\n\r\n //Rules for SampleType via Investigation\r\n Rule pdaSampleTypeViaInv = new Rule();\r\n pdaSampleTypeViaInv.grouping = publishedDataAdmins;\r\n pdaSampleTypeViaInv.crudFlags = \"CRUD\";\r\n pdaSampleTypeViaInv.what = \"SELECT st FROM SampleType st JOIN st.samples s JOIN s.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleTypeViaInv);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(st) FROM SampleType st JOIN st.samples s JOIN s.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleType via Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for SampleType Via Dataset\r\n Rule pdaSampleTypeViaDs = new Rule();\r\n pdaSampleTypeViaDs.grouping = publishedDataAdmins;\r\n pdaSampleTypeViaDs.crudFlags = \"CRUD\";\r\n pdaSampleTypeViaDs.what = \"SELECT st FROM SampleType st JOIN st.samples s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleTypeViaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(st) FROM SampleType st JOIN st.samples s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleType via Dataset - OK - \" + count);\r\n }\r\n }", "public interface Rule {\n \n /**\n * Determine if a rule meets all of its conditions.\n * @param OpSystem The overall system for this rule.\n * @return true if the rule meets its condition.\n */\n public boolean meetsCondition(OpSystem system);\n}", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "public StringBuilder adminSetGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, true);\n }", "@Override\n\tprotected void runLine(Query query) {\n\t\tquery.inc();\n\t\tint i = Integer.parseInt(query.next());\n\t\tArrayList<Integer> originList = new ArrayList<Integer>();\n\t\toriginList.add(i - 1);\n\t\tArrayList<Integer> destinationList = new ArrayList<Integer>();\n\t\tparseSecondCondition(query, originList, destinationList);\n\t}", "public interface PlanEndRule {\r\n\tpublic abstract boolean continuePlan(Vector<Interupt> interupt, PlanHelperInterface planHelperInterface);\r\n\r\n\tpublic abstract String getHumanReadableDescription();\r\n}", "private void CreateDOIRules() throws isisicatclient.IcatException_Exception {\n Grouping doiReaders = new Grouping();\r\n doiReaders.name = \"DOI Readers\";\r\n doiReaders.id = port.create(sessionId, doiReaders);\r\n\r\n User doiUser = (User) port.search(sessionId, \"User[name='uows/1049734']\").get(0);\r\n UserGroup doiUserToGroup = new UserGroup();\r\n doiUserToGroup.user = doiUser;\r\n doiUserToGroup.grouping = doiReaders;\r\n doiUserToGroup.id = port.create(sessionId, doiUserToGroup);\r\n\r\n Rule doiInvestigation = new Rule();\r\n doiInvestigation.grouping = doiReaders;\r\n doiInvestigation.crudFlags = \"R\";\r\n doiInvestigation.what = \"SELECT i FROM Investigation i WHERE i.doi IS NOT NULL\";\r\n port.create(sessionId, doiInvestigation);\r\n\r\n //count = port.search(sessionId, \"SELECT COUNT(i) FROM Investigation i WHERE i.doi IS NOT NULL\").get(0).toString();\r\n //count = port.search(sessionId, \"SELECT COUNT(i) FROM Investigation i WHERE i.doi<> ''\").get(0).toString();\r\n Rule doiDataset = new Rule();\r\n doiDataset.grouping = doiReaders;\r\n doiDataset.crudFlags = \"R\";\r\n doiDataset.what = \"SELECT ds FROM Dataset ds WHERE ds.doi IS NOT NULL\";\r\n port.create(sessionId, doiDataset);\r\n\r\n Rule doiDatasetInv = new Rule();\r\n doiDatasetInv.grouping = doiReaders;\r\n doiDatasetInv.crudFlags = \"R\";\r\n doiDatasetInv.what = \"SELECT i FROM Investigation i JOIN i.datasets ds WHERE ds.doi IS NOT NULL\";\r\n port.create(sessionId, doiDatasetInv);\r\n\r\n Rule doiDatafile = new Rule();\r\n doiDatafile.grouping = doiReaders;\r\n doiDatafile.crudFlags = \"R\";\r\n doiDatafile.what = \"SELECT df FROM Datafile df WHERE df.doi IS NOT NULL\";\r\n port.create(sessionId, doiDatafile);\r\n\r\n Rule doiDatafileDataset = new Rule();\r\n doiDatafileDataset.grouping = doiReaders;\r\n doiDatafileDataset.crudFlags = \"R\";\r\n doiDatafileDataset.what = \"SELECT ds FROM Dataset ds JOIN ds.datafiles df WHERE df.doi IS NOT NULL\";\r\n port.create(sessionId, doiDatafileDataset);\r\n\r\n Rule doiDatafileInv = new Rule();\r\n doiDatafileInv.grouping = doiReaders;\r\n doiDatafileInv.crudFlags = \"R\";\r\n doiDatafileInv.what = \"SELECT i FROM Investigation i JOIN i.datasets ds JOIN ds.datafiles df WHERE df.doi IS NOT NULL\";\r\n port.create(sessionId, doiDatafileInv);\r\n\r\n }", "public final void ruleAction() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:296:2: ( ( ( rule__Action__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:297:1: ( ( rule__Action__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:297:1: ( ( rule__Action__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:298:1: ( rule__Action__Group__0 )\n {\n before(grammarAccess.getActionAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:299:1: ( rule__Action__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:299:2: rule__Action__Group__0\n {\n pushFollow(FOLLOW_rule__Action__Group__0_in_ruleAction517);\n rule__Action__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public boolean getInValidGroup(){return this.inValidGroup;}", "WhileLoopRule createWhileLoopRule();", "@Test\n public void testRun_DecisionWithEquals_IN_A1_D_A2_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow set to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow set to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dn = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, A1_ID);\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dn).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dn);\n\n // Initial node (id #1) creation and flow set to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A2_ID, wf.getContext().get(KEY));\n }", "java.lang.String getRule();", "public void testDenyDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n \n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "@Override\n public void testOneRequiredGroup() {\n }", "@Override\n public void testOneRequiredGroup() {\n }", "@DefaultImplementation(BlockingQueueGroupSelector.class)\npublic interface NextGroupSelector extends EventHandler<GroupEvent>, AutoCloseable {\n\n /**\n * Select the next group that will be processed.\n * The events of queries within the group will be executed.\n * The group info should have non-blocking operator chain manager\n * in order to reselect another operator chain manager when there are no active operator chain managers.\n * @return group info that will be executed next\n */\n Group getNextExecutableGroup();\n\n /**\n * Re-schedule the group to the selector.\n * @param groupInfo group info\n * @param miss true if the group has no active chain\n */\n void reschedule(Group groupInfo, boolean miss);\n\n /**\n * Re-schedule the groups to the selector.\n * @param groupInfos group infos\n */\n void reschedule(Collection<Group> groupInfos);\n\n /**\n * Remove the dispatched group.\n * @param group dispatched group\n * @return true if the dispatched group is removed\n */\n boolean removeDispatchedGroup(Group group);\n}", "interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup<WithCluster> {\n }", "@Override\n\t public void process(PacketContext context) {\n\t InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n/*\n InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n\t MacAddress hostId = ethPkt.getSourceMAC();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n\t DeviceId apId = pkt.receivedFrom().deviceId();\n*/\n // Do we know who this is for? If not, flood and bail.\n\t //log.info(\"Host id : {}\",id);\n\n Host dst = hostService.getHost(id);\n\n\t\n if (dst == null) {\n ipv6process(context, pkt);\n\t \n return;\n\t }\n/*\n\t if (pkt.receivedFrom().deviceId().equals(dst.location().deviceId())) {\n if (!context.inPacket().receivedFrom().port().equals(dst.location().port())) {\n\t\t log.info(\"Rule is installed.-1\");\n\t\t log.info(\"DeviceID: dst={}\", pkt.receivedFrom().deviceId(), dst.location().deviceId());\n installRule(context, dst.location().port());\n }\n return;\n }\n\t\t\t\t\n*/\t\n \t if((stPreApId.equals(stNowApId) && stype ==1) || (stPreApId.equals(stNowApId) && stype ==2)){\n\t\t log.info(\"##############test same ap -------------[ok]\\n\");\n\t\t log.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t //TODO ::\t\t\t\n\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t if (paths.isEmpty()) {\n\t\t // If there are no paths, flood and bail.\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t \n\t\t Path path = pickForwardPathIfPossible(paths,pkt.receivedFrom().port());\n\t\t if (path == null) {\n\t\t log.warn(\"Don't know where to go from here {} for {} -> {}\",\n\t\t pkt.receivedFrom(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC());\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t log.info(\"Rule is installed.-2\");\n\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\n\t\t mkList(hostId, apId, flowNum, pkt.receivedFrom().port(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC(), stype);\n\t\t saveFlowInfo(ethPkt.getDestinationMAC(),pkt.receivedFrom().deviceId(), stype);\n\t\t // stype = 0;\n\n\t }\n\n\n\t if(! stPreApId.equals(stNowApId) && stype ==3){\n\t\tif(! stNowApId.equals(\"\")){\n\t\t\tlog.info(\"##############test handover -------------[ok]\\n\");\n\t\t\tlog.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t\tlog.info(\"test : {}\",destList2.size());\n\n\t\t\t/*for(int i =0; i<destList2.size();i++){\n\t\t\t\tlog.info(\"test type 2 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList2.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-3\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}*/\n\n\t\t\tfor(int i =0; i<destList1.size();i++){\n\t\t\t\tlog.info(\"test type 1 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList1.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId());\n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-4\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (stype ==0) {\n\t\t\tlog.info(\"###-----------what is packet?\\n\");\n\t\t}\n\t\t\n\t }\n\t\tlog.info(\"#############-------------[waitting]\\n\");\n\t\t\n\t}", "public boolean applyCommonGroupingMeasuringRule() {\n\t\t\n\t if(isApplicableSameGroupingMeasuringRule() == false) {\n\t \tSystem.out.println(\"ERROR: Failure to apply Same Grouping Rewriting Rule\");\n\t \treturn false;\n\t }\n\t \n\t\tthis.rset = new HashMap<Integer, Query>();\n\t\tthis.rtype = RType.SAME_GROUPING_MEASURING_RULE;\n\t\tthis.rqId = 1;\n\t \n\t\tGrouping gPart = this.qset.entrySet().iterator().next().getValue().getQueryTriple()._1();\n\t\tMeasuring mPart = this.qset.entrySet().iterator().next().getValue().getQueryTriple()._2();\n\t\t\n\t\tOperation opPart = new Operation();\n\t\tfor(Map.Entry<Integer, Query> entry2 : this.qset.entrySet()){\n\t\t\topPart.addOperation(entry2.getValue().getQueryTriple()._3());\n\t\t}\n\t\tTuple3<Grouping, Measuring, Operation> query = new Tuple3<>(gPart, mPart, opPart);\n\t\trset.put(rqId, new Query(query));\n\t\treturn true;\n\t}", "public void finalPass() throws Exception {\n if (_Label != null)\n _Label.finalPass();\n \n if (_GroupExpressions != null)\n _GroupExpressions.finalPass();\n \n if (_Custom != null)\n _Custom.finalPass();\n \n if (_Filters != null)\n _Filters.finalPass();\n \n if (_ParentGroup != null)\n _ParentGroup.finalPass();\n \n // Determine if group is defined inside of a Matrix; these get\n // different runtime expression handling in FunctionAggr\n _InMatrix = false;\n for (ReportLink rl = this.Parent;rl != null;rl = rl.Parent)\n {\n if (rl instanceof Matrix)\n {\n _InMatrix = true;\n break;\n }\n \n if (rl instanceof Table || rl instanceof List || rl instanceof Chart)\n break;\n \n }\n return ;\n }", "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "@Test\n @WithMockUhUser(username = \"iamtst04\")\n public void optInTest() throws Exception {\n assertFalse(isInCompositeGrouping(GROUPING, tst[0], tst[3]));\n assertTrue(isInBasisGroup(GROUPING, tst[0], tst[3]));\n assertTrue(isInExcludeGroup(GROUPING, tst[0], tst[3]));\n\n //tst[3] opts into Grouping\n mapGSRs(API_BASE + GROUPING + \"/optIn\");\n }", "public final void ruleInput() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:141:2: ( ( ( rule__Input__Group__0 ) ) )\n // InternalWh.g:142:2: ( ( rule__Input__Group__0 ) )\n {\n // InternalWh.g:142:2: ( ( rule__Input__Group__0 ) )\n // InternalWh.g:143:3: ( rule__Input__Group__0 )\n {\n before(grammarAccess.getInputAccess().getGroup()); \n // InternalWh.g:144:3: ( rule__Input__Group__0 )\n // InternalWh.g:144:4: rule__Input__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Input__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getInputAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "Stream<PlanNode> resolveGroup(PlanNode node);", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test(priority=43)\t\n\tpublic void campaign_user_with_valid_filter_for_group_id() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_valid_filter_for_group_id\", \"To validate whether user is able to get campaign and its users through campaign/user api with valid filter for group_id\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\ttest_data = HelperClass.readTestData(class_name, \"campaign_user_with_valid_filter_for_group_id\");\n\t\tString camp_group_id = group_id;\n\t\tString[] operators = {\"=\",\"<=\",\">=\"};\n\t\tString encoded_operator = \"\";\n\t\tfor(String operator:operators){\n\t\t\tencoded_operator = java.net.URLEncoder.encode(operator, \"UTF-8\");\n\t\t\tList<NameValuePair> list = new ArrayList<NameValuePair>();\n\t\t\tlist.add(new BasicNameValuePair(\"filter\", \"group_id\"+encoded_operator+camp_group_id));\n\t\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, list);\n\t\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with valid filter for group_id\");\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t // Convert response to JSON object\t\n\t\t\t JSONParser parser = new JSONParser();\n\t\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t\t JSONArray array = (JSONArray)json.get(\"data\");\n\t\t\t // Check whether campaign list returns at least 1 record when valid group_id is passed for filter\n\t\t\t Assert.assertTrue(array.size()>=1, \"campaign/user does not return records when valid group_id is passed for filter.\");\n\t\t\t for(int i=0; i<array.size(); i++){\n\t\t\t\t // Get the campaign from the campaign list\n\t\t\t\t JSONObject campaign = (JSONObject)array.get(i);\n\t\t\t\t if(operator.equals(\"=\"))\t\t\t \n\t\t\t\t\t Assert.assertEquals(campaign.get(\"group_id\").toString(), camp_group_id, \"campaign/user api does not return campaigns according to passed group_id for filter. Defect Reported: CT-17152\");\t\t\t\t\t \n\t\t\t\t else if(operator.equals(\">=\"))\t\t\t \n\t\t\t\t\t Assert.assertTrue(Integer.parseInt(campaign.get(\"group_id\").toString())>=Integer.parseInt(camp_group_id), \"campaign/user api does not return campaigns according to applied filter for group_id. Defect Reported: CT-17152\");\n\t\t\t\t else\t\t\t \n\t\t\t\t\t Assert.assertTrue(Integer.parseInt(campaign.get(\"group_id\").toString())<=Integer.parseInt(camp_group_id), \"campaign/user api does not return campaigns according to applied filter for group_id\"+Integer.parseInt(campaign.get(\"group_id\").toString())+\". Defect Reported: CT-17152\");\n\t\t\t\t test.log(LogStatus.PASS, \"Check campaign/user api does not return campaigns according to passed group_id for filter.\");\n//\t\t\t\t JSONArray users_data = (JSONArray) campaign.get(\"users\");\n//\t\t\t\t Boolean user_exist = false;\n//\t\t\t\t for(int j=0; j<users_data.size(); j++){\n//\t\t\t\t\t JSONObject user = (JSONObject)users_data.get(j);\n//\t\t\t\t\t String group_id = user.get(\"group_id\").toString();\n//\t\t\t\t\t if(group_id.equals(camp_group_id)){\n//\t\t\t\t\t\t user_exist = true;\n//\t\t\t\t\t }\n//\t\t\t\t\t Assert.assertTrue(user_exist, \"Passed user_id does not exist in users list of campaign/user response.\");\n//\t\t\t\t }\n\t\t\t }\n\t\t\t}\t\n\t\t}\n\t}", "@Test\n public void testMatchLimitOneTopDown() throws Exception {\n\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addMatchOrder( HepMatchOrder.TOP_DOWN );\n programBuilder.addMatchLimit( 1 );\n programBuilder.addRuleInstance( UnionToDistinctRule.INSTANCE );\n\n checkPlanning( programBuilder.build(), UNION_TREE );\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "public final void rulePredicate() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:332:2: ( ( ( rule__Predicate__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:333:1: ( ( rule__Predicate__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:333:1: ( ( rule__Predicate__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:334:1: ( rule__Predicate__Group__0 )\n {\n before(grammarAccess.getPredicateAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:335:1: ( rule__Predicate__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:335:2: rule__Predicate__Group__0\n {\n pushFollow(FOLLOW_rule__Predicate__Group__0_in_rulePredicate586);\n rule__Predicate__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPredicateAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "@Test\n public void test3() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY 8 > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator filter = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe1 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "public void execute(Execution execution, EngineOperations engineOperations) {\n \n Activity currentActivity = execution.getActivity();\n String defaultFlowId = (String) currentActivity.getProperty(\"defaultFlow\");\n \n Activity nextActivity = null;\n SequenceFlow defaultSequenceFlow = null;\n \n boolean found = false;\n Iterator<SequenceFlow> sequenceFlowIterator = currentActivity.getOutgoingSequenceFlow().iterator();\n while (!found && sequenceFlowIterator.hasNext()) {\n \n SequenceFlow sequenceFlow = sequenceFlowIterator.next();\n \n // Get condition, if true -> evaluate\n String conditionExpression = null;\n \n if (sequenceFlow.hasProperty(\"condition\")) {\n conditionExpression = (String) sequenceFlow.getProperty(\"condition\");\n }\n \n if (sequenceFlow.getProperty(\"id\").equals(defaultFlowId)) {\n defaultSequenceFlow = sequenceFlow;\n } else if (conditionExpression != null) {\n \n // TODO: implement expressions! .... for the moment always true\n nextActivity = sequenceFlow.getTargetActivity();\n }\n \n }\n \n if (nextActivity != null) {\n goToNextActivity(nextActivity, execution, engineOperations);\n } else if (defaultSequenceFlow != null) {\n goToNextActivity(defaultSequenceFlow.getTargetActivity(), execution, engineOperations);\n } else {\n throw new RuntimeException(\"Could not find a sequenceflow with true condition nor default flow\");\n }\n }", "public final void ruleInput() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:416:2: ( ( ( rule__Input__Group__0 ) ) )\n // InternalBrowser.g:417:2: ( ( rule__Input__Group__0 ) )\n {\n // InternalBrowser.g:417:2: ( ( rule__Input__Group__0 ) )\n // InternalBrowser.g:418:3: ( rule__Input__Group__0 )\n {\n before(grammarAccess.getInputAccess().getGroup()); \n // InternalBrowser.g:419:3: ( rule__Input__Group__0 )\n // InternalBrowser.g:419:4: rule__Input__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Input__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getInputAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "void endVisit(Group group);", "@Test\n public void testGetFlowEntries() {\n Collection<FlowEntry> flowEntries = frProgramable.getFlowEntries();\n\n assertNotNull(flowEntries);\n //There will be 12 flow entries\n // 2 for IP Src Address filtering\n // 2 for EVC 7 - one each port\n // 8 for EVC 8 - one for host port, 7 on optics port because of ceVlanMap 12:14,20:22,25\n assertEquals(12, flowEntries.size());\n\n //Test the first Flow Entry\n Iterator<FlowEntry> feIter = flowEntries.iterator();\n while (feIter.hasNext()) {\n FlowEntry fe = feIter.next();\n assertTrue(fe.isPermanent());\n assertEquals(EA1000FlowRuleProgrammable.PRIORITY_DEFAULT, fe.priority());\n\n Set<Criterion> criteria = fe.selector().criteria();\n IPCriterion ipCr = null;\n PortNumber port = null;\n for (Criterion cr:criteria.toArray(new Criterion[criteria.size()])) {\n if (cr.type() == Criterion.Type.IPV4_SRC) {\n ipCr = (IPCriterion) cr;\n } else if (cr.type() == Criterion.Type.IN_PORT) {\n port = ((PortCriterion) cr).port();\n } else if (cr.type() == Criterion.Type.VLAN_VID) {\n VlanId vid = ((VlanIdCriterion) cr).vlanId();\n } else {\n fail(\"Unexpected Criterion type: \" + cr.type().toString());\n }\n }\n if (ipCr != null && (port == null || port.toLong() != 0L)) {\n fail(\"Port number not equal 0 when IP Src Address filter is present\");\n }\n\n List<Instruction> instructions = fe.treatment().allInstructions();\n\n if (fe.tableId() == 1) {\n //Note that in MockNetconf session 10.10.10.10/16 was entered\n //but it has been corrected to the following by the OF implementation\n assertEquals(\"10.10.0.0/16\", ipCr.ip().toString());\n assertEquals(FlowEntryState.ADDED, fe.state());\n } else if (fe.tableId() == 2) {\n //Likewise 20.30.40.50 has been truncated because of the 18 bit mask\n assertEquals(\"20.30.0.0/18\", ipCr.ip().toString());\n assertEquals(FlowEntryState.ADDED, fe.state());\n } else if (fe.tableId() == 7 || fe.tableId() == 8) {\n // 7 and 8 are EVC entries - 2 elements - IN_PORT and VLAN_ID\n assertEquals(2, fe.selector().criteria().size());\n //In MockNetconfSession we're rigged it so that the last two chars of the\n //flow id is the same as the VlanId\n short vlanId = ((VlanIdCriterion) fe.selector().getCriterion(Type.VLAN_VID)).vlanId().toShort();\n long flowId = fe.id().id();\n String flowIdStr = String.valueOf(flowId).substring(String.valueOf(flowId).length() - 2);\n assertEquals(flowIdStr, String.valueOf(vlanId));\n if (((PortCriterion) fe.selector().getCriterion(Type.IN_PORT)).port().toLong() == 1L) {\n assertEquals(Instruction.Type.L2MODIFICATION, instructions.get(0).type());\n }\n } else {\n fail(\"Unexpected Flow Entry Rule \" + fe.tableId());\n }\n }\n }", "LogicalOperator parseFRJoin(ArrayList<CogroupInput> gis, LogicalPlan lp) throws ParseException, PlanException{\n\n log.trace(\"Entering parseCogroup\");\n log.debug(\"LogicalPlan: \" + lp);\n\n int n = gis.size();\n log.debug(\"Number of cogroup inputs = \" + n);\n\n ArrayList<LogicalOperator> los = new ArrayList<LogicalOperator>();\n ArrayList<ArrayList<LogicalPlan>> plans = new ArrayList<ArrayList<LogicalPlan>>();\n MultiMap<LogicalOperator, LogicalPlan> groupByPlans = new MultiMap<LogicalOperator, LogicalPlan>();\n //Map<LogicalOperator, LogicalPlan> groupByPlans = new HashMap<LogicalOperator, LogicalPlan>();\n boolean[] isInner = new boolean[n];\n\n int arity = gis.get(0).plans.size();\n\n for (int i = 0; i < n ; i++){\n\n CogroupInput gi = gis.get(i);\n los.add(gi.op);\n ArrayList<LogicalPlan> planList = gi.plans;\n plans.add(gi.plans);\n int numGrpByOps = planList.size();\n log.debug(\"Number of group by operators = \" + numGrpByOps);\n\n if(arity != numGrpByOps) {\n throw new ParseException(\"The arity of the group by columns do not match.\");\n }\n for(int j = 0; j < numGrpByOps; ++j) {\n groupByPlans.put(gi.op, planList.get(j));\n for(LogicalOperator root: planList.get(j).getRoots()) {\n log.debug(\"Cogroup input plan root: \" + root);\n }\n }\n isInner[i] = gi.isInner;\n }\n\n LogicalOperator frj = new LOFRJoin(lp, new OperatorKey(scope, getNextId()), groupByPlans, isInner, gis.get(0).op);\n lp.add(frj);\n log.debug(\"Added operator \" + frj.getClass().getName() + \" object \" + frj + \" to the logical plan \" + lp);\n\n for(LogicalOperator op: los) {\n lp.connect(op, frj);\n log.debug(\"Connected operator \" + op.getClass().getName() + \" to \" + frj.getClass().getName() + \" in the logical plan\");\n }\n\n log.trace(\"Exiting parseFRJoin\");\n return frj;\n }", "private static void DoGroupBy()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tArrayList<String> groupingAtts = new ArrayList<String>();\n\t\tgroupingAtts.add(\"o_orderdate\");\n\t\tgroupingAtts.add(\"o_orderstatus\");\n\n\t\tHashMap<String, AggFunc> myAggs = new HashMap<String, AggFunc>();\n\t\tmyAggs.put(\"att1\", new AggFunc(\"none\",\n\t\t\t\t\"Str(\\\"status: \\\") + o_orderstatus\"));\n\t\tmyAggs.put(\"att2\", new AggFunc(\"none\", \"Str(\\\"date: \\\") + o_orderdate\"));\n\t\tmyAggs.put(\"att3\", new AggFunc(\"avg\", \"o_totalprice * Int (100)\"));\n\t\tmyAggs.put(\"att4\", new AggFunc(\"sum\", \"Int (1)\"));\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Grouping(inAtts, outAtts, groupingAtts, myAggs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public Rule_in_State get_unprocessed_rule();", "@Override\n public ArrayList<String> run(LogicGraph logicGraph, Entity runConfig) {\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" Execution Started\");\n ArrayList<String> status=new ArrayList<>();\n boolean anchor;\n ArrayList<GraphNode> flow=logicGraph.getNodes();\n int phaseStart=0, phaseEnd=0;\n for (int i=0;i<flow.size();i++){\n flow.get(i).getComponent().init();\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" \" +flow.get(i).getComponent().getClass().getName()+\" is initialized.\");\n }\n do {\n while(phaseEnd!=flow.size() && !flow.get(phaseEnd).getCategory().equals(\"Phase\")){\n phaseEnd++;\n }\n int count=0;\n do {\n count++;\n anchor=false;\n int i=phaseStart;\n Entity io=null;\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" phase \"+ phaseEnd+ \" in execution.\");\n try{\n io = flow.get(phaseStart).getComponent().process(io);\n for (i +=1; i < phaseEnd; i++) {\n if(io!=null){\n anchor=true;\n }\n io = flow.get(i).getComponent().process(io);\n }\n }catch (Exception e){\n status.add(\"Problem faced during execution of \"+flow.get(phaseEnd).getName());\n status.add(\"Problem at: \"+flow.get(i).getName());\n status.add(\"Cause: \"+e.getMessage());\n e.printStackTrace();\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" Error in Execution\" + status);\n return status;\n }\n } while (anchor);\n phaseStart=phaseEnd+1;\n phaseEnd++;\n System.out.println(\"phase over count:\"+count+\"\\nphasestart:\"+phaseStart+\"\\nphaseend:\"+phaseEnd);\n }while (phaseEnd<flow.size());\n status.add(\"success\");\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" Execution Completed \"+ status);\n\n return status;\n }", "protected IGrid applyRules(IRuleset ruleset, IGrid nextGeneration) {\n\t\tfor(int col = 0; col < this.gridConfiguration.getCols(); col++) {\n\t\t\tfor(int row = 0; row < this.gridConfiguration.getRows(); row++) {\n\t\t\t\tnextGeneration.setState(col, row, ruleset.getNextGenerationState(\n\t\t\t\t\t\tthis.getState(col, row),\n\t\t\t\t\t\tthis.getGridConfiguration().getNeighborhood().countNeighborsAlive(col, row, this),\n\t\t\t\t\t\tthis.getGridConfiguration().getNeighborhood().getNeighbors().size()));\n\t\t\t}\n\t\t}\n\n\t\treturn nextGeneration;\n\t}", "@Override\n\tpublic void execute()\n\t{\n\t\tSortedSet<String> active_agent_ids = sim.getactiveParticipantIdSet(\"group\");\n\t\tIterator<String> iter = active_agent_ids.iterator();\n\t\tString name;\n\t\tupdateLoanPlayers(active_agent_ids, iter);\n\n\t\tif (en.getRoundsPassed() == rounds)\n\t\t{\n\t\t\tdata.add(\n\t\t\t\t\t\t\t\" ==== Cycle \" + sim.getTime() + \" Begins (\" + en.getRoundsPassed() + ':' + en.getCurrentTurnType() + \") ==== \");\n\t\t\tdata.add(\n\t\t\t\t\t\t\t\"************************************************************************************************************ \");\n\t\t\tfor (Map.Entry<String, PoliticalGroup> entry : p_players.entrySet())\n\t\t\t{\n\t\t\t\twhile (iter.hasNext())\n\t\t\t\t{\n\t\t\t\t\tString id = iter.next();\n\t\t\t\t\tif (p_players.get(id) != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tname = p_players.get(id).getDataModel().getName();\n\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\"===============================\" + name + \"===============================\");\n\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\"Group population: \" + p_players.get(id).getDataModel().getMemberList().size());\n\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\"Current reserve: \" + p_players.get(id).getDataModel().getCurrentReservedFood());\n\t\t\t\t\t\tdata.add(\"Greediness: \" + PoliticalGroup.getGreediness(p_players.get(\n\t\t\t\t\t\t\t\t\t\tid).getDataModel()));\n\t\t\t\t\t\tdata.add(\"++++++LOAN HISTORY OF THIS GROUP++++++\");\n\n\t\t\t\t\t\t//Display debtors / loans given\n\t\t\t\t\t\tdata.add(\"Debtors History-------------------------------\");\n\t\t\t\t\t\tMap<String, List<Tuple<Double, Double>>> loansGiven = PoliticalGroup.getLoansGiven(p_players.get(\n\t\t\t\t\t\t\t\t\t\tid).getDataModel());\n\t\t\t\t\t\tif (loansGiven != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSet<String> debtors = loansGiven.keySet();\n\t\t\t\t\t\t\tfor (String deb : debtors)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tString gname;\n\t\t\t\t\t\t\t\tif (PublicEnvironmentConnection.getInstance().getGroupById(deb) == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = \"A DEAD GROUP\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = PublicEnvironmentConnection.getInstance().getGroupById(\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeb).getName();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\"---->Debtor: \" + gname + \" has been given: \" + loansGiven.get(\n\t\t\t\t\t\t\t\t\t\t\t\tdeb).size() + \" loans from this group!\");\n\t\t\t\t\t\t\t\tdouble amountBorrowed = 0;\n\t\t\t\t\t\t\t\tfor (Tuple<Double, Double> t : loansGiven.get(deb))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tamountBorrowed += t.getKey() * (1 + t.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\t\t\" This debtor has borrowed \" + amountBorrowed + \" units of food\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdata.add(\"No loans given at the moment!\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.add(\"Creditors History-------------------------------\");\n\t\t\t\t\t\t//Display debtors / loans given\n\t\t\t\t\t\tMap<String, List<Tuple<Double, Double>>> loansTaken = PoliticalGroup.getLoansTaken(p_players.get(\n\t\t\t\t\t\t\t\t\t\tid).getDataModel());\n\t\t\t\t\t\tif (loansTaken != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSet<String> creditors = loansTaken.keySet();\n\t\t\t\t\t\t\tfor (String cred : creditors)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tString gname;\n\t\t\t\t\t\t\t\tif (PublicEnvironmentConnection.getInstance().getGroupById(cred) == null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = \"A DEAD GROUP\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgname = PublicEnvironmentConnection.getInstance().getGroupById(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcred).getName();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\"---->Creditor: \" + gname + \" has given this group: \" + loansTaken.get(\n\t\t\t\t\t\t\t\t\t\t\t\tcred).size() + \" loans!\");\n\t\t\t\t\t\t\t\tdouble amountBorrowed = 0;\n\t\t\t\t\t\t\t\tfor (Tuple<Double, Double> t : loansTaken.get(cred))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tamountBorrowed += t.getKey() * (1 + t.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.add(\n\t\t\t\t\t\t\t\t\t\t\t\t\" This group has been given \" + amountBorrowed + \" units of food from this creditor\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdata.add(\"No loans taken at the moment!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdata.add(\" \");\n\t\t\t\titer = active_agent_ids.iterator();\n\t\t\t}\n\t\t\trounds++;\n\t\t}\n\t}", "public void setInValidGroup(boolean inValidGroup){this.inValidGroup = inValidGroup;}", "public interface GroupLogicalSetOperationCallback\n{\n\tvoid manipulated(final PICOErrorCode errorCode, final boolean isTrue);\n}", "public final void ruleClick() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:666:2: ( ( ( rule__Click__Group__0 ) ) )\n // InternalBrowser.g:667:2: ( ( rule__Click__Group__0 ) )\n {\n // InternalBrowser.g:667:2: ( ( rule__Click__Group__0 ) )\n // InternalBrowser.g:668:3: ( rule__Click__Group__0 )\n {\n before(grammarAccess.getClickAccess().getGroup()); \n // InternalBrowser.g:669:3: ( rule__Click__Group__0 )\n // InternalBrowser.g:669:4: rule__Click__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Click__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getClickAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public static void main(String[] args) throws ConfigurationException,\n RuleExecutionSetCreateException, IOException,\n RuleSessionTypeUnsupportedException, RuleSessionCreateException,\n RuleExecutionSetNotFoundException, InvalidRuleSessionException,\n ClassNotFoundException, RuleExecutionSetRegisterException {\n\n String ruleEngineServiceUri = UriConstants.RULE_ENGINE_SERVICE_URI;\n\n Class.forName(UriConstants.RULE_SERVICE_PROVIDER_CLASS_NAME);\n\n RuleServiceProvider serviceProvider = RuleServiceProviderManager\n .getRuleServiceProvider(ruleEngineServiceUri);\n\n RuleAdministrator ruleAdministrator = serviceProvider\n .getRuleAdministrator();\n\n RuleEngineLog.debug(ruleAdministrator.toString());\n\n Map params = null;\n // InputStream stream = null;\n\n String bindUri = null;\n\n LogisticsRule logisticsRule = buildLogisticsRule();\n\n FlavorRule flavorRule = buildFlavorRule();\n\n RuleSet ruleSet = new RuleSet(\"multi-logisitic--ruleset\");\n\n ruleSet.addRule(logisticsRule);\n ruleSet.addRule(flavorRule);\n // ruleSet.add(logisticsRule1);\n\n RuleExecutionSet ruleExecutionSet = ruleAdministrator\n .getLocalRuleExecutionSetProvider(params).createRuleExecutionSet(\n ruleSet, null);\n\n bindUri = ruleExecutionSet.getName();\n\n ruleAdministrator.registerRuleExecutionSet(bindUri, ruleExecutionSet, null);\n\n RuleEngineLog.debug(ruleExecutionSet);\n //\n RuleRuntime ruleRunTime = serviceProvider.getRuleRuntime();\n\n StatelessRuleSession srs = (StatelessRuleSession) ruleRunTime\n .createRuleSession(bindUri, params, RuleRuntime.STATELESS_SESSION_TYPE);\n\n List inputList = new LinkedList();\n\n String productReview1 = \"一直在你们家购买,感觉奶粉是保真的。就是发货速度稍微再快一些就好了。先谢谢了\";\n\n String productReview2 = \"说什么原装进口的 但是和我原本进口的奶粉还是有区别 奶很甜 宝宝吃了这个奶粉后胃口很差 都不爱吃其他东西 本来每天定时有吃两顿饭的 现在吃了这个奶粉后 饭也不要吃了 现在一个没有开 另一罐开了放着没有喝\";\n\n ProductReview pr1 = new ProductReview(\"uid1\", productReview1);\n\n ProductReview pr2 = new ProductReview(\"uid2\", productReview2);\n\n inputList.add(pr1);\n inputList.add(pr2);\n\n // inputList.add(new String(\"Bar\"));\n // inputList.add(new Integer(5));\n // inputList.add(new Float(6));\n List resultList = srs.executeRules(inputList);\n\n // release the session\n srs.release();\n\n // System.out.println(\"executeRules: \" + resultList);\n for (Object o : resultList) {\n System.out.println(o);\n }\n\n }", "public final void rulePredicateProcess() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1844:2: ( ( ( rule__PredicateProcess__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1845:1: ( ( rule__PredicateProcess__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1845:1: ( ( rule__PredicateProcess__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1846:1: ( rule__PredicateProcess__Group__0 )\n {\n before(grammarAccess.getPredicateProcessAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1847:1: ( rule__PredicateProcess__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1847:2: rule__PredicateProcess__Group__0\n {\n pushFollow(FOLLOW_rule__PredicateProcess__Group__0_in_rulePredicateProcess3478);\n rule__PredicateProcess__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPredicateProcessAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public interface Rule {\r\n\r\n\tString getTargetedPropertyName();\r\n\tboolean hasFinished();\r\n\tObject nextValue();\r\n\tObject[] getValues();\r\n\tpublic void setValues(Object[] values);\r\n\t\r\n}", "public void routeCommandGroups(CommandGroup group) {\n if (this.getSwitchSide() == DIRECTION.LEFT) {\n\n } else if (this.getSwitchSide() == DIRECTION.RIGHT) {\n\n }\n }", "public interface Rule {\n\n /**\n * Process this security event and detects whether this represents a security breach from the perspective of this rule\n * \n * @param event\n * event to process\n * @return security breach - either a breach or not (could be delayed)\n */\n SecurityBreach isSecurityBreach(SecurityEvent event);\n\n /**\n * Detects whether this rule is applicable in the in-passed security mode. Each rule guarantees to return the very same value of this method at\n * runtime. E.g. if this method returns true for an instance, it is guaranteed it will always return true within the lifecycle of this object\n * \n * @param securityMode\n * security mode to test applicability of this rule against\n * @return true if so, false otherwise\n */\n boolean isApplicable(SecurityMode securityMode);\n\n /**\n * Detects whether this rule is enabled or not\n * \n * @return true if so, false otherwise\n */\n boolean isEnabled();\n\n /**\n * Get human readable description of this rule. It should be a unique string compared to all other rules\n * \n * @return unique description of this rule\n */\n String getDescription();\n\n /**\n * Gets Unique ID of this Rule\n * \n * @return integer identification of this rule\n */\n int getId();\n\n /**\n * Update this rule based on the in-passed rule detail (e.g. whether it is enabled, etc)\n * \n * @param ruleDetail\n * rule detail to use to update this rule\n */\n void updateFrom(RuleDetail ruleDetail);\n}", "public interface GroupPredicateBuilder {\r\n\r\n Predicate build(CriteriaBuilder criteriaBuilder, List<Predicate> criteriaList);\r\n \r\n}", "int getAndConditionGroupsCount();", "protected void processTemporalRule(){\n RuleThread currntThrd;\n Thread currntThrdParent; // the parent of the current thread;\n int currntOperatingMode;\n int currntThrdPriority ;\n\n if( temporalRuleQueue.getHead()!= null){\n\n //If the rule thread is the top level, trigger the rule.\n currntThrd=temporalRuleQueue.getHead();\n while(currntThrd!= null){\n currntThrdPriority = currntThrd.getPriority ();\n currntThrdParent = currntThrd.getParent();\n\n if (currntThrd.getOperatingMode() == RuleOperatingMode.READY\n && !(currntThrd.getParent() == applThrd ||\n currntThrd.getParent().getClass().getName().equals(\"EventDispatchThread\")||\n currntThrd.getParent().getName ().equals (Constant.LEDReceiverThreadName)\n )){\n if(ruleSchedulerDebug)\n\t\t \t\t System.out.println(\"Changing mode of \"+currntThrd.getName()+\"from READY to EXE\");\n\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\t\t\t\t currntThrd.setScheduler(this);\n currntThrd.start();\n int rulePriority = 0;\n currntThrdParent = currntThrd;\n if(currntThrdParent instanceof RuleThread){\n rulePriority = currntThrd.getRulePriority();\n }\n currntThrd = currntThrd.next;\n while(currntThrd != null && currntThrd instanceof RuleThread &&\n currntThrd.getRulePriority() == rulePriority\n \t\t\t\t\t\t\t && currntThrd.getParent() == currntThrdParent ){\n if(ruleSchedulerDebug)\n \t\t\t System.out.print(\" start child thread =>\");\n\n currntThrd.print();\n currntThrd.setScheduler(this);\n if(\tcurrntThrd.getOperatingMode()== RuleOperatingMode.READY ){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n currntThrd.start();\n }\n \t\t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n // case 1.2:\n else if (currntThrd != null &&\tcurrntThrd.getOperatingMode() == RuleOperatingMode.EXE){\n \t\t\t\tcurrntThrd = currntThrd.next;\n\n }\n // case 1.3:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.WAIT){\n\t\t\t\t if(currntThrd.next == null){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\n// ;\n // All its childs has been completed.\n // This currntThread's operating mode will be changed to FINISHED.\n }\n\t\t\t\t\telse{\n // check whether its neighbor is its child\n\t\t\t\t\t\tif(currntThrd.next.getParent() == currntThrdParent){\n if(ruleSchedulerDebug){\n\t \t\t\t\t\t System.out.println(\"\\n\"+currntThrd.getName()+\" call childRecurse \"+currntThrd.next.getName());\n\t\t \t\t\t\t\tcurrntThrd.print();\n }\n\n childRecurse(currntThrd, temporalRuleQueue);\n }\n }\n currntThrd = currntThrd.next;\n }\n // case 1.4:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.FINISHED){\n if(ruleSchedulerDebug){\n\t\t\t\t\t System.out.println(\"delete \"+currntThrd.getName() +\" rule thread from rule queue.\");\n\t\t\t\t\t\tcurrntThrd.print();\n }\n processRuleList.deleteRuleThread(currntThrd,temporalRuleQueue);\n \tcurrntThrd = currntThrd.next;\n }\n else{\n \t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n }\n }", "@Test(priority=45)\t\n\tpublic void campaign_user_with_filter_for_nonexisting_group_id() throws URISyntaxException, ClientProtocolException, IOException, ParseException{\n\t\ttest = extent.startTest(\"campaign_user_with_filter_for_nonexisting_group_id\", \"To validate whether user is able to get campaign and its users through campaign/user api with filter for non existing group_id\");\n\t\ttest.assignCategory(\"CFA GET /campaign/user API\");\n\t\ttest_data = HelperClass.readTestData(class_name, \"campaign_user_with_filter_for_nonexisting_group_id\");\n\t\tString camp_group_id = test_data.get(4);\n\t\tList<NameValuePair> list = new ArrayList<NameValuePair>();\n\t\tlist.add(new BasicNameValuePair(\"filter\", \"group_id%3d\"+camp_group_id));\n\t\tCloseableHttpResponse response = HelperClass.make_get_request(\"/v2/campaign/user\", access_token, list);\n\t\tAssert.assertTrue(!(response.getStatusLine().getStatusCode() == 500 || response.getStatusLine().getStatusCode() == 401), \"Invalid status code is displayed. \"+ \"Returned Status: \"+response.getStatusLine().getStatusCode()+\" \"+response.getStatusLine().getReasonPhrase());\n\t\ttest.log(LogStatus.INFO, \"Execute campaign/user api method with valid filter for group_id\");\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\t\tString line = \"\";\n\t\twhile ((line = rd.readLine()) != null) {\n\t\t // Convert response to JSON object\t\n\t\t JSONParser parser = new JSONParser();\n\t\t JSONObject json = (JSONObject) parser.parse(line);\n\t\t String result_data = json.get(\"result\").toString();\n\t\t Assert.assertEquals(result_data, \"error\", \"API is returning success when non existing group_id is entered for filter\");\n\t\t test.log(LogStatus.PASS, \"API is returning error when non existing group_id is entered for filter\");\n\t\t Assert.assertEquals(json.get(\"err\").toString(), \"no records found\", \"Proper validation is not displayed when non existing group_id is passed.\");\n\t\t test.log(LogStatus.PASS, \"Proper validation is displayed when non existing group_id is passed.\");\n\t\t}\n\t}", "ControlBlockRule createControlBlockRule();", "private void groupQuery() {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(ParseConstants.CLASS_GROUPS);\n query.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n setProgressBarIndeterminateVisibility(false);\n if(e == null) {\n mGroup = group;\n mMemberRelation = mGroup.getRelation(ParseConstants.KEY_MEMBER_RELATION);\n mMemberOfGroupRelation = mCurrentUser.getRelation(ParseConstants.KEY_MEMBER_OF_GROUP_RELATION);\n\n //only the admin can delete the group\n mGroupAdmin = mGroup.get(ParseConstants.KEY_GROUP_ADMIN).toString();\n mGroupAdmin = Utilities.removeCharacters(mGroupAdmin);\n if ((mCurrentUser.getUsername()).equals(mGroupAdmin)) {\n mDeleteMenuItem.setVisible(true);\n }\n\n mGroupName = group.get(ParseConstants.KEY_GROUP_NAME).toString();\n mGroupName = Utilities.removeCharacters(mGroupName);\n setTitle(mGroupName);\n\n mCurrentDrinker = mGroup.get(ParseConstants.KEY_CURRENT_DRINKER).toString();\n mCurrentDrinker = Utilities.removeCharacters(mCurrentDrinker);\n mCurrentDrinkerView.setText(mCurrentDrinker);\n\n mPreviousDrinker = mGroup.get(ParseConstants.KEY_PREVIOUS_DRINKER).toString();\n mPreviousDrinker = Utilities.removeCharacters(mPreviousDrinker);\n mPreviousDrinkerView.setText(mPreviousDrinker);\n\n listViewQuery(mMemberRelation);\n }\n else {\n Utilities.getNoGroupAlertDialog(null);\n }\n }\n });\n }", "@Test\n public void parse_validArgs_returnsGroupCommand() {\n GroupCommand expectedGroupCommand =\n new GroupCommand(new GroupPredicate(new Group(\"CS2101\")));\n assertParseSuccess(parser, \"CS2101\", expectedGroupCommand);\n\n // multiple whitespaces between keywords\n assertParseSuccess(parser, \" \\n CS2101 \\n \\t \", expectedGroupCommand);\n }", "public boolean action(GroupMessage a, int hops) {\n\t\tboolean publish = false;\n\t\tswitch (m_state) {\n\t\tcase EXPECT_BCAST:\n\t\t\tswitch (a) {\n\t\t\tcase BCAST:\t\tpublish = true;\t\tbreak;\t// missed() move state machine and pub!\n\t\t\tcase CLEAN:\t\tpublish = true;\t\tbreak;\t// missed(BCAST)\n\t\t\tcase SUCCESS:\tpublish = false;\tbreak;}\t// missed(BCAST,CLEAN) or dup SUCCESS\n\t\t\tbreak;\n\t\tcase EXPECT_CLEAN:\n\t\t\tswitch (a) {\n\t\t\tcase BCAST:\t\tpublish = false;\tbreak; // missed(CLEAN, SUCCESS) or dup BCAST\n\t\t\tcase CLEAN:\t\tpublish = false;\tbreak;\t// missed() move state machine, no pub\n\t\t\tcase SUCCESS:\tpublish = false;\tbreak; } // missed(CLEAN)\n\t\t\tbreak;\n\t\tcase EXPECT_SUCCESS:\n\t\t\tswitch (a) {\n\t\t\tcase BCAST:\t\tpublish = true;\t\tbreak;\t// missed(SUCCESS) \n\t\t\tcase CLEAN:\t\tpublish = false;\tbreak; // missed(SUCCESS,BCAST) or dup CLEAN\n\t\t\tcase SUCCESS:\tpublish = false;\tbreak; } // missed(), move state machine, no pub\n\t\t\tbreak;\n\t\t}\n\t\tState oldState = m_state;\n\t\tswitch (a) {\n\t\tcase BCAST: \tm_state = State.EXPECT_CLEAN;\tbreak;\n\t\tcase CLEAN:\t\tm_state = State.EXPECT_SUCCESS;\tbreak;\n\t\tcase SUCCESS:\tm_state = State.EXPECT_BCAST;\tbreak;\n\t\t}\n\t\tlogger.trace(\"group state: {} --{}--> {}, publish: {}\", oldState, a, m_state, publish);\n\t\treturn (publish);\n\t}", "@Test\n public void test1() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:bag{(u,v)}, b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + COUNT.class.getName() +\"($0) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }", "@Test\n\tvoid attributeGroupDisjunction2() {\n\t\tassertEquals(\n\t\t\t\"Match procedure with left OR right foot (grouped)\",\n\t\t\tSets.newHashSet(AMPUTATION_FOOT_LEFT, AMPUTATION_FOOT_RIGHT, AMPUTATION_FOOT_BILATERAL),\n\t\t\tstrings(selectConceptIds(\"< 71388002 |Procedure|: { 363704007 |Procedure site| = 22335008 |Left Foot| } OR { 363704007 |Procedure site| = 7769000 |Right Foot| }\")));\n\n\t}", "boolean hasAdGroupCriterion();", "@Test\n public void groupByStoreSucceed()\n {\n // arrange\n final String groupByClause = \"validGroupBy\";\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).groupBy(groupByClause);\n\n // assert\n assertEquals(groupByClause, Deencapsulation.getField(querySpecificationBuilder, \"groupBy\"));\n }", "protected abstract void onFormSubmit(DataAccessRule rule);", "CmdRule createCmdRule();", "int doComputeGroups( long start_id )\n {\n long cid = mApp.mCID;\n // Log.v(\"DistoX\", \"Compute CID \" + cid + \" from gid \" + start_id );\n if ( cid < 0 ) return -2;\n float thr = TDMath.cosd( TDSetting.mGroupDistance );\n List<CalibCBlock> list = mApp_mDData.selectAllGMs( cid, 0 );\n if ( list.size() < 4 ) {\n return -1;\n }\n long group = 0;\n int cnt = 0;\n float b = 0.0f;\n float c = 0.0f;\n if ( start_id >= 0 ) {\n for ( CalibCBlock item : list ) {\n if ( item.mId == start_id ) {\n group = item.mGroup;\n cnt = 1;\n b = item.mBearing;\n c = item.mClino;\n break;\n }\n }\n } else {\n if ( TDSetting.mGroupBy != TDSetting.GROUP_BY_DISTANCE ) {\n group = 1;\n }\n }\n switch ( TDSetting.mGroupBy ) {\n case TDSetting.GROUP_BY_DISTANCE:\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n if ( group == 0 || item.isFarFrom( b, c, thr ) ) {\n ++ group;\n b = item.mBearing;\n c = item.mClino;\n }\n item.setGroup( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n // N.B. item.calibId == cid\n }\n break;\n case TDSetting.GROUP_BY_FOUR:\n // TDLog.Log( TDLog.LOG_CALIB, \"group by four\");\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n item.setGroupIfNonZero( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n ++ cnt;\n if ( (cnt%4) == 0 ) {\n ++group;\n // TDLog.Log( TDLog.LOG_CALIB, \"cnt \" + cnt + \" new group \" + group );\n }\n }\n break;\n case TDSetting.GROUP_BY_ONLY_16:\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n item.setGroupIfNonZero( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n ++ cnt;\n if ( (cnt%4) == 0 || cnt >= 16 ) ++group;\n }\n break;\n }\n return (int)group-1;\n }", "@Test\n public void TestCase1() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"PTO Request\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(2)\n .contains(\"John M\")\n .contains(\"Kerry\");\n }", "@Test\n public void TestCase2() {\n VariableMap variables = Variables\n .putValue(\"Role\", \"Executive\")\n .putValue(\"BusinessProcess\", \"Merit Increase\")\n .putValue(\"DelegationDateRange\", \"2019-04-31T00:00:00\");\n\n DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);\n\n // Need to establish rule ordering\n assertThat(result.collectEntries(\"result\"))\n .hasSize(1)\n .contains(\"John M\");\n }", "boolean nextStep();", "GroupQuery createQuery();", "@Override\n\t\t\t\tpublic void action() {\n\t\t\t\t\t\tRandom r = new Random();\n\t\t\t\t\t\tint Low = 1;\n\t\t\t\t\t\tint High = 999;\n\t\t\t\t\t\tint Result = r.nextInt(High-Low) + Low;\n\t\t\t\t\t\tACLMessage msg = new ACLMessage(ACLMessage.REQUEST);\n\t\t\t\t\t\tmsg.setOntology(\"AirConditioner\");\n\t\t\t\t\t\tmsg.addReceiver(new AID(\"da\", AID.ISLOCALNAME));\n//\t\t\t\t\t\tif (Result % 2 == 0){\n//\t\t\t\t\t\t\t//humid mode\n//\t\t\t\t\t\t\tmsg.setContent(\"humid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: humid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 3 == 0)) {\n//\t\t\t\t\t\t\t//mid\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: mid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 5 == 0)) {\n//\t\t\t\t\t\t\t//high\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: high\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//low\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: low\" );\n//\t\t\t\t\t\t}\n\t\t\t\t\t\tmsg.setContent(Airconditioner_Agent.mode);\n\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: \"+Airconditioner_Agent.mode );\n\t\t\t\t\t\tmyAgent.send(msg);\n\t\t\t\t\t}", "protected IPlanningGoal selectGoal(){ \n List<IPlanningGoal> relevantGoals = representation.getRelevantGoals(body);\n \n //If we have failed to find plans for high priority goals and environment has not changed, lets try some \n //lower priority ones\n if(numFailuresSinceLastImportantEnvChange < relevantGoals.size()){\n return relevantGoals.get(numFailuresSinceLastImportantEnvChange);\n } else {\n //tried all relevant goals but all failed, lets try it once more\n representation.setMarker(body);\n numFailuresSinceLastImportantEnvChange = 0;\n return relevantGoals.get(0);\n }\n }", "public void behavior(Integer k) throws Exception {\n Map<String, Predicate> objPool =rulePraser.getObjPool();\n String n = String.valueOf(k);\n for (String s: objPool.keySet()) {\n if((Boolean)engine.eval(s.replace(\"i\",n))){\n //get the result\n String a = objPool.get(s).behavior(k);\n //deal with the resulit\n System.out.println(a);\n break;\n }\n }\n }", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "public final void ruleActionProcess() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1880:2: ( ( ( rule__ActionProcess__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1881:1: ( ( rule__ActionProcess__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1881:1: ( ( rule__ActionProcess__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1882:1: ( rule__ActionProcess__Group__0 )\n {\n before(grammarAccess.getActionProcessAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1883:1: ( rule__ActionProcess__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1883:2: rule__ActionProcess__Group__0\n {\n pushFollow(FOLLOW_rule__ActionProcess__Group__0_in_ruleActionProcess3547);\n rule__ActionProcess__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionProcessAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "int evaluate(ISeqActivity iThisActivity) {\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> BEGIN - evaluate\");\n\t\t\tSystem.out.println(\" :: --> RETRY == \" + mRetry);\n\t\t}\n\n\t\tint result = EVALUATE_UNKNOWN;\n\n\t\t// Make sure we have a valid target activity \n\t\tif (iThisActivity != null) {\n\n\t\t\tif (_Debug) {\n\t\t\t\tSystem.out.println(\" ::--> Set - \" + mCombination);\n\n\t\t\t\tif (mConditions != null) {\n\t\t\t\t\tSystem.out.println(\" ::--> [\" + mConditions.size() + \"]\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\" ::--> NULL\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mConditions != null) {\n\t\t\t\t// Evaluate this rule's conditions\n\t\t\t\tif (mCombination.equals(COMBINATION_ALL)) {\n\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval != EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = thisEval;\n\n\t\t\t\t\t\t\t// done with this evaluation\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} else if (mCombination.equals(COMBINATION_ANY)) {\n\t\t\t\t\t// Assume we have enought information to evaluate\n\t\t\t\t\tresult = EVALUATE_FALSE;\n\n\t\t\t\t\tfor (int i = 0; i < mConditions.size(); i++) {\n\t\t\t\t\t\tint thisEval = evaluateCondition(i, (SeqActivity) iThisActivity);\n\n\t\t\t\t\t\tif (thisEval == EVALUATE_TRUE) {\n\t\t\t\t\t\t\tresult = EVALUATE_TRUE;\n\n\t\t\t\t\t\t\t// done with this evaluation\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (thisEval == EVALUATE_UNKNOWN) {\n\t\t\t\t\t\t\t// Something is missing...\n\t\t\t\t\t\t\tresult = EVALUATE_UNKNOWN;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reset the 'retry' flag\n\t\tmRetry = false;\n\n\t\tif (_Debug) {\n\t\t\tSystem.out.println(\" ::--> \" + result);\n\t\t\tSystem.out.println(\" :: SeqConditionSet --> END - evaluate\");\n\t\t}\n\n\t\treturn result;\n\n\t}", "private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }", "public BPState execute(X86CondJmpInstruction ins, BPPath path, List<BPPath> pathList, X86TransitionRule rule) {\n\t\treturn null;\n\t}", "private void getSensorConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (int i = 0; i < rules.size(); ++i) {\n RuleInstance ri1 = rules.get(i);\n for (int j = i+1; j < rules.size(); ++j) {\n\t RuleInstance ri2 = rules.get(j);\n\t if (ri1.getStateId() == ri2.getStateId()) continue;\n\t addSensorConditions(ri1,ri2,conds);\n }\n }\n}", "public final void rule__Predicate__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3277:1: ( rule__Predicate__Group__0__Impl rule__Predicate__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3278:2: rule__Predicate__Group__0__Impl rule__Predicate__Group__1\n {\n pushFollow(FOLLOW_rule__Predicate__Group__0__Impl_in_rule__Predicate__Group__06448);\n rule__Predicate__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Predicate__Group__1_in_rule__Predicate__Group__06451);\n rule__Predicate__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void defaultMMarathonLoopRewardGroupShouldBeFound(String filter) throws Exception {\n restMMarathonLoopRewardGroupMockMvc.perform(get(\"/api/m-marathon-loop-reward-groups?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(mMarathonLoopRewardGroup.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].eventId\").value(hasItem(DEFAULT_EVENT_ID)))\n .andExpect(jsonPath(\"$.[*].contentType\").value(hasItem(DEFAULT_CONTENT_TYPE)))\n .andExpect(jsonPath(\"$.[*].contentId\").value(hasItem(DEFAULT_CONTENT_ID)))\n .andExpect(jsonPath(\"$.[*].contentAmount\").value(hasItem(DEFAULT_CONTENT_AMOUNT)))\n .andExpect(jsonPath(\"$.[*].weight\").value(hasItem(DEFAULT_WEIGHT)));\n\n // Check, that the count call also returns 1\n restMMarathonLoopRewardGroupMockMvc.perform(get(\"/api/m-marathon-loop-reward-groups/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }" ]
[ "0.635682", "0.60655856", "0.5623399", "0.5543905", "0.54812086", "0.5428142", "0.5397508", "0.5375558", "0.5348539", "0.5311582", "0.5281297", "0.52477705", "0.5193039", "0.5192272", "0.51360846", "0.5118435", "0.51120406", "0.50902814", "0.5073531", "0.5062864", "0.505839", "0.5031775", "0.50308925", "0.5023871", "0.5019207", "0.500489", "0.49777597", "0.49760973", "0.4968882", "0.49615577", "0.49559796", "0.49543232", "0.49495366", "0.4946529", "0.4946529", "0.4946125", "0.49395603", "0.49382508", "0.4937526", "0.49234876", "0.49170935", "0.489284", "0.48915112", "0.48701328", "0.48685497", "0.4867034", "0.48488194", "0.48407426", "0.4839337", "0.4839337", "0.48248553", "0.48187762", "0.4817364", "0.48172995", "0.48165873", "0.48119953", "0.48119685", "0.4811794", "0.48112157", "0.48063233", "0.48027036", "0.478349", "0.47804683", "0.4770684", "0.47701973", "0.47692528", "0.47599366", "0.4758913", "0.47564688", "0.47536904", "0.4751401", "0.47511393", "0.47443208", "0.47439095", "0.47423965", "0.47384396", "0.4735021", "0.47318548", "0.47295547", "0.47257838", "0.4717776", "0.46994978", "0.46929473", "0.4692434", "0.46914193", "0.46871674", "0.46811378", "0.46801984", "0.46748388", "0.4674118", "0.46685812", "0.466624", "0.4665151", "0.46632227", "0.46611935", "0.46575063", "0.46566406", "0.46557572", "0.46556276", "0.4654193" ]
0.6079583
1
add group flow control rule
public StringBuilder adminSetGroupFlowCtrlRule(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result) { return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private StringBuilder innAddOrUpdGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result,\n boolean isAddOp) {\n // check and get operation info\n if (!WebParameterUtils.getAUDBaseInfo(req, isAddOp, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n BaseEntity opEntity = (BaseEntity) result.getRetData();\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n final Set<String> groupNameSet = (Set<String>) result.getRetData();\n // get and valid qryPriorityId info\n if (!WebParameterUtils.getQryPriorityIdParameter(req,\n false, TBaseConstants.META_VALUE_UNDEFINED,\n TServerConstants.QRY_PRIORITY_MIN_VALUE, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n int qryPriorityId = (int) result.getRetData();\n // get flowCtrlEnable's statusId info\n if (!WebParameterUtils.getFlowCtrlStatusParamValue(req,\n false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n EnableStatus flowCtrlEnable = (EnableStatus) result.getRetData();\n // get and flow control rule info\n int flowRuleCnt = WebParameterUtils.getAndCheckFlowRules(req,\n (isAddOp ? TServerConstants.BLANK_FLOWCTRL_RULES : null), sBuffer, result);\n if (!result.isSuccess()) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n String flowCtrlInfo = (String) result.getRetData();\n // add or modify records\n GroupResCtrlEntity ctrlEntity;\n List<GroupProcessResult> retInfoList = new ArrayList<>();\n for (String groupName : groupNameSet) {\n ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName);\n if (ctrlEntity == null) {\n if (isAddOp) {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result));\n } else {\n result.setFailResult(DataOpErrCode.DERR_NOT_EXIST.getCode(),\n DataOpErrCode.DERR_NOT_EXIST.getDescription());\n retInfoList.add(new GroupProcessResult(groupName, \"\", result));\n }\n } else {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result));\n }\n }\n return buildRetInfo(retInfoList, sBuffer);\n }", "IRuleset add(IRuleset rule);", "public void add_rule(Rule rule) throws Exception;", "@Test\n public void testGroup() throws Exception {\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addGroupBegin();\n programBuilder.addRuleInstance( CalcMergeRule.INSTANCE );\n programBuilder.addRuleInstance( ProjectToCalcRule.INSTANCE );\n programBuilder.addRuleInstance( FilterToCalcRule.INSTANCE );\n programBuilder.addGroupEnd();\n\n checkPlanning( programBuilder.build(), \"select upper(name) from dept where deptno=20\" );\n }", "ControlBlockRule createControlBlockRule();", "public final void ruleAction() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:296:2: ( ( ( rule__Action__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:297:1: ( ( rule__Action__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:297:1: ( ( rule__Action__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:298:1: ( rule__Action__Group__0 )\n {\n before(grammarAccess.getActionAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:299:1: ( rule__Action__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:299:2: rule__Action__Group__0\n {\n pushFollow(FOLLOW_rule__Action__Group__0_in_ruleAction517);\n rule__Action__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public StringBuilder adminDelGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n // check and get operation info\n if (!WebParameterUtils.getAUDBaseInfo(req, false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n BaseEntity opEntity = (BaseEntity) result.getRetData();\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n Set<String> groupNameSet = (Set<String>) result.getRetData();\n // add or modify records\n GroupResCtrlEntity ctrlEntity;\n List<GroupProcessResult> retInfoList = new ArrayList<>();\n for (String groupName : groupNameSet) {\n ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName);\n if (ctrlEntity != null\n && ctrlEntity.getFlowCtrlStatus() != EnableStatus.STATUS_DISABLE) {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n TServerConstants.QRY_PRIORITY_DEF_VALUE, EnableStatus.STATUS_DISABLE,\n 0, TServerConstants.BLANK_FLOWCTRL_RULES, sBuffer, result));\n } else {\n result.setFullInfo(true, DataOpErrCode.DERR_SUCCESS.getCode(), \"Ok\");\n retInfoList.add(new GroupProcessResult(groupName, \"\", result));\n }\n }\n return buildRetInfo(retInfoList, sBuffer);\n }", "private void addGroup(StreamTokenizer st) throws IOException {\n\t\tcurrentGroups.clear();\n\t\tst.nextToken();\n\t\tString gName = \"default\";\n\t\tif (st.ttype == StreamTokenizer.TT_EOL) {\n\t\t\tLoggingSystem.getLogger(this).fine(\"Warning: empty group name\");\n\t\t\tst.pushBack();\n\t\t} else\n\t\t\tgName = st.sval;\n\t\t// System.out.println(\"adding \"+gName+\" to current groups. [\"+st.nval+\",\"+st.sval+\",\"+st.ttype+\"]\");\n\t\tcurrentGroups.add(gName);\n\t\tif (groups.get(gName) == null) {\n\t\t\tGroup g = new Group(gName);\n\t\t\tgroups.put(gName, g);\n\t\t}\n\t\twhile (st.nextToken() != StreamTokenizer.TT_EOL) {\n\t\t}\n\t}", "void startVisit(Group group);", "CaseBlockRule createCaseBlockRule();", "public void visitGroup(Group group) {\n\t}", "public void testAllowDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public final void rulePredicateAddition() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:584:2: ( ( ( rule__PredicateAddition__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:585:1: ( ( rule__PredicateAddition__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:585:1: ( ( rule__PredicateAddition__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:586:1: ( rule__PredicateAddition__Group__0 )\n {\n before(grammarAccess.getPredicateAdditionAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:587:1: ( rule__PredicateAddition__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:587:2: rule__PredicateAddition__Group__0\n {\n pushFollow(FOLLOW_rule__PredicateAddition__Group__0_in_rulePredicateAddition1068);\n rule__PredicateAddition__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPredicateAdditionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "void add(R group);", "FlowRule build();", "public FlowRule(Flow flow, int seq) {\r\n super(flow, seq);\r\n }", "IRuleset add(IRuleset...rules);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FinancialStatement addNewFinancialStatementsGroup();", "public final void rule__PredicateAddition__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4187:1: ( rule__PredicateAddition__Group__0__Impl rule__PredicateAddition__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4188:2: rule__PredicateAddition__Group__0__Impl rule__PredicateAddition__Group__1\n {\n pushFollow(FOLLOW_rule__PredicateAddition__Group__0__Impl_in_rule__PredicateAddition__Group__08229);\n rule__PredicateAddition__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__PredicateAddition__Group__1_in_rule__PredicateAddition__Group__08232);\n rule__PredicateAddition__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void createGroupCommand(Command root){\n\t\tif(codeReader.hasNext(END_GROUP))\n\t\t\tthrow new SLogoException(\"No arguments specified in grouping.\");\n\t\twhile(!codeReader.hasNext(END_GROUP)) {\n\t\t\ttry {\n\t\t\t\thandleSpecialCases(root);\n\t\t\t\tString s = codeReader.next();\n\t\t\t\troot.addChild(parseCommand(s));\n\t\t\t}\n\t\t\tcatch(NoSuchElementException n) {\n\t\t\t\tthrow new SLogoException(\"Unclosed Parenthesis.\");\n\t\t\t}\n\t\t}\n\t\tcodeReader.next();\n\t}", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "public final void ruleUpdateAddition() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1412:2: ( ( ( rule__UpdateAddition__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1413:1: ( ( rule__UpdateAddition__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1413:1: ( ( rule__UpdateAddition__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1414:1: ( rule__UpdateAddition__Group__0 )\n {\n before(grammarAccess.getUpdateAdditionAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1415:1: ( rule__UpdateAddition__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1415:2: rule__UpdateAddition__Group__0\n {\n pushFollow(FOLLOW_rule__UpdateAddition__Group__0_in_ruleUpdateAddition2651);\n rule__UpdateAddition__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getUpdateAdditionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "@Override\n public void visit(final OpGroup opGroup) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpGroup\");\n }\n addOp(OpGroup.create(rewriteOp1(opGroup), opGroup.getGroupVars(), opGroup.getAggregators()));\n }", "interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup<WithCreate> {\n }", "void setRule(Rule rule);", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "private void addBeforeRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t\t\r\n\t processer.addBeforeRule(new BDPKLockSuperVORule());\r\n\t processer.addBeforeRule(new BizLockRule());\r\n\t processer.addBeforeRule(new VersionValidateRule());\r\n\t processer.addBeforeRule(new BDReferenceCheckerRule());\r\n\t processer.addBeforeRule(new FireEventRule(\"1005\"));\r\n\t processer.addBeforeRule(new NotifyVersionChangeWhenDataDeletedRule());\r\n }", "public final void rule__ContinueStmt__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7765:1: ( ( ( ruleLabel )? ) )\r\n // InternalGo.g:7766:1: ( ( ruleLabel )? )\r\n {\r\n // InternalGo.g:7766:1: ( ( ruleLabel )? )\r\n // InternalGo.g:7767:2: ( ruleLabel )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getContinueStmtAccess().getLabelParserRuleCall_1()); \r\n }\r\n // InternalGo.g:7768:2: ( ruleLabel )?\r\n int alt75=2;\r\n int LA75_0 = input.LA(1);\r\n\r\n if ( (LA75_0==RULE_ID) ) {\r\n int LA75_1 = input.LA(2);\r\n\r\n if ( (synpred119_InternalGo()) ) {\r\n alt75=1;\r\n }\r\n }\r\n else if ( (LA75_0==46) ) {\r\n int LA75_2 = input.LA(2);\r\n\r\n if ( (LA75_2==RULE_ID) ) {\r\n int LA75_5 = input.LA(3);\r\n\r\n if ( (synpred119_InternalGo()) ) {\r\n alt75=1;\r\n }\r\n }\r\n }\r\n switch (alt75) {\r\n case 1 :\r\n // InternalGo.g:7768:3: ruleLabel\r\n {\r\n pushFollow(FOLLOW_2);\r\n ruleLabel();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getContinueStmtAccess().getLabelParserRuleCall_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__PredicateAddition__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4216:1: ( rule__PredicateAddition__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4217:2: rule__PredicateAddition__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__PredicateAddition__Group__1__Impl_in_rule__PredicateAddition__Group__18288);\n rule__PredicateAddition__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__CrossValidation__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1843:1: ( rule__CrossValidation__Group__0__Impl rule__CrossValidation__Group__1 )\n // InternalMLRegression.g:1844:2: rule__CrossValidation__Group__0__Impl rule__CrossValidation__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__CrossValidation__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__CrossValidation__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup<WithCluster> {\n }", "public final void ruleInput() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:141:2: ( ( ( rule__Input__Group__0 ) ) )\n // InternalWh.g:142:2: ( ( rule__Input__Group__0 ) )\n {\n // InternalWh.g:142:2: ( ( rule__Input__Group__0 ) )\n // InternalWh.g:143:3: ( rule__Input__Group__0 )\n {\n before(grammarAccess.getInputAccess().getGroup()); \n // InternalWh.g:144:3: ( rule__Input__Group__0 )\n // InternalWh.g:144:4: rule__Input__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Input__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getInputAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "CaseStmtRule createCaseStmtRule();", "@Override\n\tprotected boolean rulesGeneration() {\n\t\tGlobal.logger.finer(\"--------------------- S101 rulesGeneration() ----------------- \");\n\t\t//Global.logger.finer(this.toString());\t\t\n\t\tif(activationGuards()){\n\t\t\ttry {\n\t\t\t\tthis.categories.beforeFirst();\n\t\t\t\t\n\t\t\t\twhile (!this.categories.isClosed() && this.categories.next()) {\n\t\t\t\t\tgroupName = this.categories.getString(\"name\");\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S102 [\" + groupName + \", \" + 1 +\"] \");\n\t\t\t\t\tcreateRule(new S102(course_ID, groupName, 1));\n\t\t\t\t\t\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S103 [\" + groupName + \", study ]\");\n\t\t\t\t\tcreateRule(new S103(course_ID, groupName, \"study\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t\treturn true;\n\t}", "public final void ruleLanguage() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:185:2: ( ( ( rule__Language__Group__0 ) ) )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:186:1: ( ( rule__Language__Group__0 ) )\n {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:186:1: ( ( rule__Language__Group__0 ) )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:187:1: ( rule__Language__Group__0 )\n {\n before(grammarAccess.getLanguageAccess().getGroup()); \n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:188:1: ( rule__Language__Group__0 )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:188:2: rule__Language__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__0_in_ruleLanguage334);\n rule__Language__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getLanguageAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Loop__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2167:1: ( rule__Loop__Group__0__Impl rule__Loop__Group__1 )\n // InternalMLRegression.g:2168:2: rule__Loop__Group__0__Impl rule__Loop__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__Loop__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Loop__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PredicateAddition__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4248:1: ( rule__PredicateAddition__Group_1__0__Impl rule__PredicateAddition__Group_1__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4249:2: rule__PredicateAddition__Group_1__0__Impl rule__PredicateAddition__Group_1__1\n {\n pushFollow(FOLLOW_rule__PredicateAddition__Group_1__0__Impl_in_rule__PredicateAddition__Group_1__08350);\n rule__PredicateAddition__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__PredicateAddition__Group_1__1_in_rule__PredicateAddition__Group_1__08353);\n rule__PredicateAddition__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PredicateAddition__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4260:1: ( ( () ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4261:1: ( () )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4261:1: ( () )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4262:1: ()\n {\n before(grammarAccess.getPredicateAdditionAccess().getPredicatePluLeftAction_1_0()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4263:1: ()\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4265:1: \n {\n }\n\n after(grammarAccess.getPredicateAdditionAccess().getPredicatePluLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public StringBuilder adminUpdGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, false);\n }", "public final void ruleInput() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:416:2: ( ( ( rule__Input__Group__0 ) ) )\n // InternalBrowser.g:417:2: ( ( rule__Input__Group__0 ) )\n {\n // InternalBrowser.g:417:2: ( ( rule__Input__Group__0 ) )\n // InternalBrowser.g:418:3: ( rule__Input__Group__0 )\n {\n before(grammarAccess.getInputAccess().getGroup()); \n // InternalBrowser.g:419:3: ( rule__Input__Group__0 )\n // InternalBrowser.g:419:4: rule__Input__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Input__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getInputAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void newGroup() {\n addGroup(null, true);\n }", "public final void ruleActivity() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:130:2: ( ( ( rule__Activity__Group__0 ) ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:131:1: ( ( rule__Activity__Group__0 ) )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:131:1: ( ( rule__Activity__Group__0 ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:132:1: ( rule__Activity__Group__0 )\n {\n before(grammarAccess.getActivityAccess().getGroup()); \n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:133:1: ( rule__Activity__Group__0 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:133:2: rule__Activity__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__0_in_ruleActivity214);\n rule__Activity__Group__0();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getActivityAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Test\n public void createRule() {\n // BEGIN: com.azure.messaging.servicebus.servicebusrulemanagerclient.createRule\n RuleFilter trueRuleFilter = new TrueRuleFilter();\n CreateRuleOptions options = new CreateRuleOptions(trueRuleFilter);\n ruleManager.createRule(\"new-rule\", options);\n // END: com.azure.messaging.servicebus.servicebusrulemanagerclient.createRule\n\n ruleManager.close();\n }", "public final void rule__Algo__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1951:1: ( rule__Algo__Group__0__Impl rule__Algo__Group__1 )\n // InternalMLRegression.g:1952:2: rule__Algo__Group__0__Impl rule__Algo__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__Algo__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Algo__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleContinueStmt() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:1317:2: ( ( ( rule__ContinueStmt__Group__0 ) ) )\r\n // InternalGo.g:1318:2: ( ( rule__ContinueStmt__Group__0 ) )\r\n {\r\n // InternalGo.g:1318:2: ( ( rule__ContinueStmt__Group__0 ) )\r\n // InternalGo.g:1319:3: ( rule__ContinueStmt__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getContinueStmtAccess().getGroup()); \r\n }\r\n // InternalGo.g:1320:3: ( rule__ContinueStmt__Group__0 )\r\n // InternalGo.g:1320:4: rule__ContinueStmt__Group__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__ContinueStmt__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getContinueStmtAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private PrismRule addRule(PrismRule lastRule, PrismRule newRule) {\n\n if (lastRule == null) {\n m_rules = newRule;\n } else {\n lastRule.m_next = newRule;\n }\n return newRule;\n }", "public final void rule__Loop__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2248:1: ( rule__Loop__Group__3__Impl )\n // InternalMLRegression.g:2249:2: rule__Loop__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Loop__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public int addWorkGroup(WorkGroup wg, Condition cond) { \t\r\n \treturn addWorkGroup(0, wg, cond, 0L);\r\n }", "protected void addRule(BinaryRule rule) {\n\t\tif (rule.getPurity() >= mMinimumPurity)\n\t\t\tthis.mBinaryRules.add(rule);\n\t}", "Group getNextExecutableGroup();", "public int addWorkGroup(WorkGroup wg) { \t\r\n \treturn addWorkGroup(0, wg, new TrueCondition(), 0L);\r\n }", "public final void rule__PredicateAddition__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4279:1: ( rule__PredicateAddition__Group_1__1__Impl rule__PredicateAddition__Group_1__2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4280:2: rule__PredicateAddition__Group_1__1__Impl rule__PredicateAddition__Group_1__2\n {\n pushFollow(FOLLOW_rule__PredicateAddition__Group_1__1__Impl_in_rule__PredicateAddition__Group_1__18411);\n rule__PredicateAddition__Group_1__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__PredicateAddition__Group_1__2_in_rule__PredicateAddition__Group_1__18414);\n rule__PredicateAddition__Group_1__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PredicateAddition__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4310:1: ( rule__PredicateAddition__Group_1__2__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4311:2: rule__PredicateAddition__Group_1__2__Impl\n {\n pushFollow(FOLLOW_rule__PredicateAddition__Group_1__2__Impl_in_rule__PredicateAddition__Group_1__28473);\n rule__PredicateAddition__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "WhileLoopRule createWhileLoopRule();", "@SuppressWarnings(\"null\")\n \tstatic boolean allowAdd(Group group, DefinitionGroup groupDef,\n \t\t\tQName propertyName) {\n \t\tif (group == null && groupDef == null) {\n \t\t\tthrow new IllegalArgumentException();\n \t\t}\n \t\t\n \t\tfinal DefinitionGroup def;\n \t\tif (groupDef == null) {\n \t\t\tdef = group.getDefinition();\n \t\t}\n \t\telse {\n \t\t\tdef = groupDef;\n \t\t}\n \t\t\n \t\tif (group == null) {\n \t\t\t// create an empty dummy group if none is specified\n \t\t\tgroup = new Group() {\n \t\t\t\t@Override\n \t\t\t\tpublic Object[] getProperty(QName propertyName) {\n \t\t\t\t\treturn null;\n \t\t\t\t}\n \t\n \t\t\t\t@Override\n \t\t\t\tpublic Iterable<QName> getPropertyNames() {\n \t\t\t\t\treturn Collections.emptyList();\n \t\t\t\t}\n \t\n \t\t\t\t@Override\n \t\t\t\tpublic DefinitionGroup getDefinition() {\n \t\t\t\t\treturn def;\n \t\t\t\t}\n \t\t\t};\n \t\t}\n \t\t\n \t\tif (def instanceof GroupPropertyDefinition) {\n \t\t\t// group property\n \t\t\tGroupPropertyDefinition gpdef = (GroupPropertyDefinition) def;\n \t\t\t\n \t\t\tif (gpdef.getConstraint(ChoiceFlag.class).isEnabled()) {\n \t\t\t\t// choice\n \t\t\t\t// a choice may only contain one of its properties\n \t\t\t\tfor (QName pName : group.getPropertyNames()) {\n \t\t\t\t\tif (!pName.equals(propertyName)) {\n \t\t\t\t\t\t// other property is present -> may not add property value\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check cardinality\n \t\t\t\treturn allowAddCheckCardinality(group, propertyName);\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// sequence, group(, attributeGroup)\n \t\t\t\t\n \t\t\t\t// check order\n\t\t\t\tif (!allowAddCheckOrder(group, propertyName, def)) {\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// check cardinality\n \t\t\t\treturn allowAddCheckCardinality(group, propertyName);\n \t\t\t}\n \t\t}\n \t\telse if (def instanceof TypeDefinition) {\n \t\t\t// type\n \t\t\tTypeDefinition typeDef = (TypeDefinition) def;\n \t\t\t\n \t\t\t// check order\n \t\t\tif (!allowAddCheckOrder(group, propertyName, typeDef)) {\n \t\t\t\treturn false;\n \t\t\t}\n \t\t\t\n \t\t\t// check cardinality\n \t\t\treturn allowAddCheckCardinality(group, propertyName);\n \t\t}\n \t\t\n \t\treturn false;\n \t}", "public final void rule__PredicateAddition__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4227:1: ( ( ( rule__PredicateAddition__Group_1__0 )* ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4228:1: ( ( rule__PredicateAddition__Group_1__0 )* )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4228:1: ( ( rule__PredicateAddition__Group_1__0 )* )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4229:1: ( rule__PredicateAddition__Group_1__0 )*\n {\n before(grammarAccess.getPredicateAdditionAccess().getGroup_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4230:1: ( rule__PredicateAddition__Group_1__0 )*\n loop26:\n do {\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( (LA26_0==30) ) {\n alt26=1;\n }\n\n\n switch (alt26) {\n \tcase 1 :\n \t // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4230:2: rule__PredicateAddition__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__PredicateAddition__Group_1__0_in_rule__PredicateAddition__Group__1__Impl8315);\n \t rule__PredicateAddition__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop26;\n }\n } while (true);\n\n after(grammarAccess.getPredicateAdditionAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__CrossValidation__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1924:1: ( rule__CrossValidation__Group__3__Impl )\n // InternalMLRegression.g:1925:2: rule__CrossValidation__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__CrossValidation__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Loop__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2194:1: ( rule__Loop__Group__1__Impl rule__Loop__Group__2 )\n // InternalMLRegression.g:2195:2: rule__Loop__Group__1__Impl rule__Loop__Group__2\n {\n pushFollow(FOLLOW_16);\n rule__Loop__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Loop__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleGo() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:591:2: ( ( ( rule__Go__Group__0 ) ) )\n // InternalBrowser.g:592:2: ( ( rule__Go__Group__0 ) )\n {\n // InternalBrowser.g:592:2: ( ( rule__Go__Group__0 ) )\n // InternalBrowser.g:593:3: ( rule__Go__Group__0 )\n {\n before(grammarAccess.getGoAccess().getGroup()); \n // InternalBrowser.g:594:3: ( rule__Go__Group__0 )\n // InternalBrowser.g:594:4: rule__Go__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Go__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getGoAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__CrossValidation__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1870:1: ( rule__CrossValidation__Group__1__Impl rule__CrossValidation__Group__2 )\n // InternalMLRegression.g:1871:2: rule__CrossValidation__Group__1__Impl rule__CrossValidation__Group__2\n {\n pushFollow(FOLLOW_16);\n rule__CrossValidation__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__CrossValidation__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleFunction() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:116:2: ( ( ( rule__Function__Group__0 ) ) )\n // InternalWh.g:117:2: ( ( rule__Function__Group__0 ) )\n {\n // InternalWh.g:117:2: ( ( rule__Function__Group__0 ) )\n // InternalWh.g:118:3: ( rule__Function__Group__0 )\n {\n before(grammarAccess.getFunctionAccess().getGroup()); \n // InternalWh.g:119:3: ( rule__Function__Group__0 )\n // InternalWh.g:119:4: rule__Function__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Function__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getFunctionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleAlgo() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:366:2: ( ( ( rule__Algo__Group__0 ) ) )\n // InternalMLRegression.g:367:2: ( ( rule__Algo__Group__0 ) )\n {\n // InternalMLRegression.g:367:2: ( ( rule__Algo__Group__0 ) )\n // InternalMLRegression.g:368:3: ( rule__Algo__Group__0 )\n {\n before(grammarAccess.getAlgoAccess().getGroup()); \n // InternalMLRegression.g:369:3: ( rule__Algo__Group__0 )\n // InternalMLRegression.g:369:4: rule__Algo__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Algo__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAlgoAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleLoop() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:616:2: ( ( ( rule__Loop__Group__0 ) ) )\n // InternalMLRegression.g:617:2: ( ( rule__Loop__Group__0 ) )\n {\n // InternalMLRegression.g:617:2: ( ( rule__Loop__Group__0 ) )\n // InternalMLRegression.g:618:3: ( rule__Loop__Group__0 )\n {\n before(grammarAccess.getLoopAccess().getGroup()); \n // InternalMLRegression.g:619:3: ( rule__Loop__Group__0 )\n // InternalMLRegression.g:619:4: rule__Loop__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Loop__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getLoopAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ContinueStmt__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7727:1: ( rule__ContinueStmt__Group__0__Impl rule__ContinueStmt__Group__1 )\r\n // InternalGo.g:7728:2: rule__ContinueStmt__Group__0__Impl rule__ContinueStmt__Group__1\r\n {\r\n pushFollow(FOLLOW_10);\r\n rule__ContinueStmt__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__ContinueStmt__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private void installRulesOnFlow()\n\t{\t\t\t\n\t\tVertex sourceVertex = m_graph.getSourceVertex();\n\t\tshort vlanNum = 1;\n\t\tfor(Edge sourceOutEdge :sourceVertex.getOutgoingEdges())\n\t\t{\n\t\t\tif(sourceOutEdge.getFlow()>0)\n\t\t\t{\n\t\t\t\tattachIpAddressToVlan(vlanNum);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_IPV4);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ARP_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_ARP);\n\t\t\t\tinstallRuleToHostSrc(sourceVertex.getName(),vlanNum, sourceOutEdge.getSourcePort());\n\t\t\t\tsourceOutEdge.setIsRuleInstalled();\n\t\t\t\tinstallRulesOnFlowDFS(sourceOutEdge.getTo(),vlanNum);\n\t\t\t\tvlanNum++;\n\t\t\t}\n\t\t}\t\n\t}", "@Test\n\tvoid addUserToGroup() {\n\t\t// Pre condition\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\n\t\tresource.addUserToGroup(\"wuser\", \"biz agency manager\");\n\n\t\t// Post condition -> no change\n\t\tAssertions.assertTrue(resource.findById(\"wuser\").getGroups().contains(\"Biz Agency Manager\"));\n\t}", "private void addAfterRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t \r\n\t\t\r\n\t processer.addAfterRule(new FireEventRule(\"1006\"));\r\n\t\t\r\n\t processer.addAfterRule(new WriteBusiLogRule(\"delete\"));\r\n }", "public final void rule__Loop__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2221:1: ( rule__Loop__Group__2__Impl rule__Loop__Group__3 )\n // InternalMLRegression.g:2222:2: rule__Loop__Group__2__Impl rule__Loop__Group__3\n {\n pushFollow(FOLLOW_6);\n rule__Loop__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Loop__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public FlowRule() {\r\n }", "public final void ruleAddExp() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1361:2: ( ( ( rule__AddExp__Group__0 ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1362:1: ( ( rule__AddExp__Group__0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1362:1: ( ( rule__AddExp__Group__0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1363:1: ( rule__AddExp__Group__0 )\n {\n before(grammarAccess.getAddExpAccess().getGroup()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1364:1: ( rule__AddExp__Group__0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1364:2: rule__AddExp__Group__0\n {\n pushFollow(FOLLOW_rule__AddExp__Group__0_in_ruleAddExp2854);\n rule__AddExp__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAddExpAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void addGroup(Group group) {\r\n System.out.println(\"conectado con model ---> metodo addGroup\");\r\n //TODO\r\n }", "public final void ruleActionProcess() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1880:2: ( ( ( rule__ActionProcess__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1881:1: ( ( rule__ActionProcess__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1881:1: ( ( rule__ActionProcess__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1882:1: ( rule__ActionProcess__Group__0 )\n {\n before(grammarAccess.getActionProcessAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1883:1: ( rule__ActionProcess__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1883:2: rule__ActionProcess__Group__0\n {\n pushFollow(FOLLOW_rule__ActionProcess__Group__0_in_ruleActionProcess3547);\n rule__ActionProcess__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionProcessAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "public final void ruleProcess() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1628:2: ( ( ( rule__Process__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1629:1: ( ( rule__Process__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1629:1: ( ( rule__Process__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1630:1: ( rule__Process__Group__0 )\n {\n before(grammarAccess.getProcessAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1631:1: ( rule__Process__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1631:2: rule__Process__Group__0\n {\n pushFollow(FOLLOW_rule__Process__Group__0_in_ruleProcess3065);\n rule__Process__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getProcessAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public final void rule__Language__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1370:1: ( rule__Language__Group__0__Impl rule__Language__Group__1 )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1371:2: rule__Language__Group__0__Impl rule__Language__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__0__Impl_in_rule__Language__Group__02668);\n rule__Language__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__1_in_rule__Language__Group__02671);\n rule__Language__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private static boolean allowAddCheckOrder(Group group,\n \t\t\tQName propertyName, final DefinitionGroup groupDef) {\n \t\tboolean before = true;\n \t\t\n \t\tCollection<? extends ChildDefinition<?>> children = DefinitionUtil.getAllChildren(groupDef);\n \t\t\n \t\tfor (ChildDefinition<?> childDef : children) {\n \t\t\tif (childDef.getName().equals(propertyName)) {\n \t\t\t\tbefore = false;\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// ignore XML attributes\n \t\t\t\tif (childDef.asProperty() != null && childDef.asProperty().getConstraint(XmlAttributeFlag.class).isEnabled()) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// ignore groups that contain no elements\n \t\t\t\tif (childDef.asGroup() != null && !StreamGmlHelper.hasElements(childDef.asGroup())) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (before) {\n \t\t\t\t\t// child before the property\n \t\t\t\t\t// the property may only be added if all children before are valid in their cardinality\n \t\t\t\t\tif (!isValidCardinality(group, childDef)) {\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t// child after the property\n \t\t\t\t\t// the property may only be added if there are no values for children after the property\n \t\t\t\t\tObject[] values = group.getProperty(childDef.getName());\n \t\t\t\t\tif (values != null && values.length > 0) {\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t// no fail -> allow add\n \t\treturn true;\n \t}", "public final void rule__CrossValidation__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1897:1: ( rule__CrossValidation__Group__2__Impl rule__CrossValidation__Group__3 )\n // InternalMLRegression.g:1898:2: rule__CrossValidation__Group__2__Impl rule__CrossValidation__Group__3\n {\n pushFollow(FOLLOW_6);\n rule__CrossValidation__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__CrossValidation__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Activity__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:464:1: ( rule__Activity__Group__0__Impl rule__Activity__Group__1 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:465:2: rule__Activity__Group__0__Impl rule__Activity__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__0__Impl_in_rule__Activity__Group__0914);\n rule__Activity__Group__0__Impl();\n _fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__1_in_rule__Activity__Group__0917);\n rule__Activity__Group__1();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "DefaultCaseBlockRule createDefaultCaseBlockRule();", "protected void processFlowRule(boolean install, FlowRule rule, String description) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n ops = install ? ops.add(rule) : ops.remove(rule);\n\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.info(description + \" success: \" + ops.toString() + \", \" + rule.toString());\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.info(description + \" error: \" + ops.toString() + \", \" + rule.toString());\n }\n }));\n }", "public final void rule__ContinueStmt__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7754:1: ( rule__ContinueStmt__Group__1__Impl )\r\n // InternalGo.g:7755:2: rule__ContinueStmt__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__ContinueStmt__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Algo__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2032:1: ( rule__Algo__Group__3__Impl )\n // InternalMLRegression.g:2033:2: rule__Algo__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Algo__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Language__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1401:1: ( rule__Language__Group__1__Impl rule__Language__Group__2 )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1402:2: rule__Language__Group__1__Impl rule__Language__Group__2\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__1__Impl_in_rule__Language__Group__12729);\n rule__Language__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group__2_in_rule__Language__Group__12732);\n rule__Language__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void enterEveryRule(final ParserRuleContext ctx) {\n }", "private void AddScenarioNewRule(HttpServletRequest request, HttpServletResponse response) throws NumberFormatException {\n String Rule = request.getParameter(\"rule\");\n int ScenarioIndex = Integer.parseInt(request.getParameter(\"index\"));\n XMLTree.getInstance().AddNewRuleToScenario(ScenarioIndex, Rule);\n }", "public final void rule__Algo__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1978:1: ( rule__Algo__Group__1__Impl rule__Algo__Group__2 )\n // InternalMLRegression.g:1979:2: rule__Algo__Group__1__Impl rule__Algo__Group__2\n {\n pushFollow(FOLLOW_17);\n rule__Algo__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Algo__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleInput() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:73:2: ( ( ( rule__Input__Group__0 ) ) )\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:74:1: ( ( rule__Input__Group__0 ) )\r\n {\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:74:1: ( ( rule__Input__Group__0 ) )\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:75:1: ( rule__Input__Group__0 )\r\n {\r\n before(grammarAccess.getInputAccess().getGroup()); \r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:76:1: ( rule__Input__Group__0 )\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:76:2: rule__Input__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__Input__Group__0_in_ruleInput94);\r\n rule__Input__Group__0();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n after(grammarAccess.getInputAccess().getGroup()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n public void testOneRequiredGroup() {\n }", "@Override\n public void testOneRequiredGroup() {\n }", "public final void ruleLanguage() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:92:2: ( ( ( rule__Language__Group__0 ) ) )\n // InternalCsv.g:93:2: ( ( rule__Language__Group__0 ) )\n {\n // InternalCsv.g:93:2: ( ( rule__Language__Group__0 ) )\n // InternalCsv.g:94:3: ( rule__Language__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getLanguageAccess().getGroup()); \n }\n // InternalCsv.g:95:3: ( rule__Language__Group__0 )\n // InternalCsv.g:95:4: rule__Language__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Language__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getLanguageAccess().getGroup()); \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 }", "@Test\r\n public void testAddRule() throws Exception{\r\n System.out.println(\"addRule\");\r\n RuleSetImpl instance = new RuleSetImpl(\"Test\", true);\r\n instance.addRule(new RegExRule(\".*\", \"string\"));\r\n instance.addRule(new RegExRule(\"a.*\", \"aString\"));\r\n List<Rule> rules = instance.getRules();\r\n assertTrue(rules.size()==2);\r\n }", "public final void rule__Calculate__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2086:1: ( rule__Calculate__Group__1__Impl rule__Calculate__Group__2 )\n // InternalMLRegression.g:2087:2: rule__Calculate__Group__1__Impl rule__Calculate__Group__2\n {\n pushFollow(FOLLOW_18);\n rule__Calculate__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Calculate__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static RuleGroup createInstance(Element e){\n\t\tString groupName = e.getAttributeValue(\"name\");\r\n\t\t\r\n\t\tRuleGroup currGroup = new RuleGroup(groupName);\r\n\t\t\r\n\t\t//add child groups\r\n\t\tList<Element> groupElements = e.getChildren(\"group\");\r\n\t\t\r\n\t\tfor(Element groupElement: groupElements)\r\n\t\t\tcurrGroup.addSubGroup(createInstance(groupElement));\r\n\t\t\r\n\t\t//add rules\r\n\t\tList<Element> ruleElements = e.getChildren(\"rule\");\r\n\t\tfor(Element ruleElement: ruleElements){\r\n\t\t\tRules ruleObject = Rules.createInstance(ruleElement);\r\n\t\t\tif(ruleObject != null)\r\n\t\t\t\tcurrGroup.addRuleNode(new RuleNode(ruleObject));\r\n\t\t}\r\n\t\t\r\n\t\treturn currGroup;\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@BeforeGroup\n public void beforeGroup() {\n }" ]
[ "0.6538334", "0.6166792", "0.60908633", "0.59642607", "0.5911365", "0.5547393", "0.55456746", "0.55391", "0.5529446", "0.55161536", "0.55093235", "0.54997593", "0.54841655", "0.54261947", "0.54181606", "0.540661", "0.5393932", "0.53762543", "0.5358298", "0.5350123", "0.5306013", "0.5294048", "0.5283336", "0.5264218", "0.5255334", "0.52409357", "0.5237798", "0.52175254", "0.5199391", "0.51893055", "0.51891434", "0.5182187", "0.5158782", "0.5155154", "0.51504153", "0.5132198", "0.5131942", "0.513039", "0.51139504", "0.51139504", "0.51139504", "0.5113847", "0.51135325", "0.5112396", "0.51104486", "0.5100581", "0.5100214", "0.50928915", "0.5081322", "0.5075633", "0.50694036", "0.5061568", "0.5060904", "0.50601214", "0.5056089", "0.50502586", "0.50466675", "0.50442004", "0.50322866", "0.5029219", "0.50284106", "0.5023232", "0.5021674", "0.5021569", "0.5021358", "0.5016095", "0.50086325", "0.50041723", "0.49953377", "0.49944055", "0.499197", "0.49912834", "0.49881753", "0.4987825", "0.4986118", "0.49855486", "0.4984719", "0.49839437", "0.49825057", "0.49776623", "0.49722332", "0.49653393", "0.49432027", "0.49414408", "0.49409863", "0.49383342", "0.49372333", "0.49311256", "0.49296257", "0.49180898", "0.4902587", "0.4902587", "0.4897437", "0.4897237", "0.48919713", "0.48915717", "0.4891479", "0.48860893", "0.48860893", "0.48821735" ]
0.5650901
5
modify group flow control rule
public StringBuilder adminUpdGroupFlowCtrlRule(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result) { return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private StringBuilder innAddOrUpdGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result,\n boolean isAddOp) {\n // check and get operation info\n if (!WebParameterUtils.getAUDBaseInfo(req, isAddOp, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n BaseEntity opEntity = (BaseEntity) result.getRetData();\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n final Set<String> groupNameSet = (Set<String>) result.getRetData();\n // get and valid qryPriorityId info\n if (!WebParameterUtils.getQryPriorityIdParameter(req,\n false, TBaseConstants.META_VALUE_UNDEFINED,\n TServerConstants.QRY_PRIORITY_MIN_VALUE, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n int qryPriorityId = (int) result.getRetData();\n // get flowCtrlEnable's statusId info\n if (!WebParameterUtils.getFlowCtrlStatusParamValue(req,\n false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n EnableStatus flowCtrlEnable = (EnableStatus) result.getRetData();\n // get and flow control rule info\n int flowRuleCnt = WebParameterUtils.getAndCheckFlowRules(req,\n (isAddOp ? TServerConstants.BLANK_FLOWCTRL_RULES : null), sBuffer, result);\n if (!result.isSuccess()) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n String flowCtrlInfo = (String) result.getRetData();\n // add or modify records\n GroupResCtrlEntity ctrlEntity;\n List<GroupProcessResult> retInfoList = new ArrayList<>();\n for (String groupName : groupNameSet) {\n ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName);\n if (ctrlEntity == null) {\n if (isAddOp) {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result));\n } else {\n result.setFailResult(DataOpErrCode.DERR_NOT_EXIST.getCode(),\n DataOpErrCode.DERR_NOT_EXIST.getDescription());\n retInfoList.add(new GroupProcessResult(groupName, \"\", result));\n }\n } else {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result));\n }\n }\n return buildRetInfo(retInfoList, sBuffer);\n }", "public StringBuilder adminSetGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, true);\n }", "public void visitGroup(Group group) {\n\t}", "void setRule(Rule rule);", "public StringBuilder adminDelGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n // check and get operation info\n if (!WebParameterUtils.getAUDBaseInfo(req, false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n BaseEntity opEntity = (BaseEntity) result.getRetData();\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n Set<String> groupNameSet = (Set<String>) result.getRetData();\n // add or modify records\n GroupResCtrlEntity ctrlEntity;\n List<GroupProcessResult> retInfoList = new ArrayList<>();\n for (String groupName : groupNameSet) {\n ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName);\n if (ctrlEntity != null\n && ctrlEntity.getFlowCtrlStatus() != EnableStatus.STATUS_DISABLE) {\n retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName,\n TServerConstants.QRY_PRIORITY_DEF_VALUE, EnableStatus.STATUS_DISABLE,\n 0, TServerConstants.BLANK_FLOWCTRL_RULES, sBuffer, result));\n } else {\n result.setFullInfo(true, DataOpErrCode.DERR_SUCCESS.getCode(), \"Ok\");\n retInfoList.add(new GroupProcessResult(groupName, \"\", result));\n }\n }\n return buildRetInfo(retInfoList, sBuffer);\n }", "ControlBlockRule createControlBlockRule();", "public void testAllowDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "@Test\n public void testGroup() throws Exception {\n HepProgramBuilder programBuilder = HepProgram.builder();\n programBuilder.addGroupBegin();\n programBuilder.addRuleInstance( CalcMergeRule.INSTANCE );\n programBuilder.addRuleInstance( ProjectToCalcRule.INSTANCE );\n programBuilder.addRuleInstance( FilterToCalcRule.INSTANCE );\n programBuilder.addGroupEnd();\n\n checkPlanning( programBuilder.build(), \"select upper(name) from dept where deptno=20\" );\n }", "public final void ruleAction() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:296:2: ( ( ( rule__Action__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:297:1: ( ( rule__Action__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:297:1: ( ( rule__Action__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:298:1: ( rule__Action__Group__0 )\n {\n before(grammarAccess.getActionAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:299:1: ( rule__Action__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:299:2: rule__Action__Group__0\n {\n pushFollow(FOLLOW_rule__Action__Group__0_in_ruleAction517);\n rule__Action__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "private void setCurrentRule(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][1].equals(\"-\")){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t}\n\t}\n}", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "CaseBlockRule createCaseBlockRule();", "public void setRule(int r)\n { \n rule = r;\n repaint();\n }", "public void add_rule(Rule rule) throws Exception;", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "void startVisit(Group group);", "public void routeCommandGroups(CommandGroup group) {\n if (this.getSwitchSide() == DIRECTION.LEFT) {\n\n } else if (this.getSwitchSide() == DIRECTION.RIGHT) {\n\n }\n }", "FlowRule build();", "public final void rule__Affect__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1075:1: ( rule__Affect__Group__3__Impl rule__Affect__Group__4 )\n // InternalWh.g:1076:2: rule__Affect__Group__3__Impl rule__Affect__Group__4\n {\n pushFollow(FOLLOW_11);\n rule__Affect__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affect__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public interface FlowRule extends PiTranslatable {\n\n IndexTableId DEFAULT_TABLE = IndexTableId.of(0);\n int MAX_TIMEOUT = 60;\n int MIN_PRIORITY = 0;\n int MAX_PRIORITY = 65535;\n\n /**\n * Reason for flow parameter received from switches.\n * Used to check reason parameter in flows.\n */\n enum FlowRemoveReason {\n IDLE_TIMEOUT,\n HARD_TIMEOUT,\n DELETE,\n GROUP_DELETE,\n METER_DELETE,\n EVICTION,\n NO_REASON;\n\n /**\n * Covert short to enum.\n * @return reason in enum\n * @param reason remove reason in integer\n */\n public static FlowRemoveReason parseShort(short reason) {\n switch (reason) {\n case -1 :\n return NO_REASON;\n case 0:\n return IDLE_TIMEOUT;\n case 1:\n return HARD_TIMEOUT;\n case 2 :\n return DELETE;\n case 3:\n return GROUP_DELETE;\n case 4:\n return METER_DELETE;\n case 5:\n return EVICTION;\n default :\n return NO_REASON;\n }\n }\n }\n\n /**\n * Returns the ID of this flow.\n *\n * @return the flow ID\n */\n FlowId id();\n\n /**\n * Returns the application id of this flow.\n *\n * @return an applicationId\n */\n short appId();\n\n /**\n * Returns the group id of this flow.\n *\n * @return an groupId\n */\n GroupId groupId();\n\n /**\n * Returns the flow rule priority given in natural order; higher numbers\n * mean higher priorities.\n *\n * @return flow rule priority\n */\n int priority();\n\n /**\n * Returns the identity of the device where this rule applies.\n *\n * @return device identifier\n */\n DeviceId deviceId();\n\n /**\n * Returns the traffic selector that identifies what traffic this rule\n * should apply to.\n *\n * @return traffic selector\n */\n TrafficSelector selector();\n\n /**\n * Returns the traffic treatment that applies to selected traffic.\n *\n * @return traffic treatment\n */\n TrafficTreatment treatment();\n\n /**\n * Returns the timeout for this flow requested by an application.\n *\n * @return integer value of the timeout\n */\n int timeout();\n\n /**\n * Returns the hard timeout for this flow requested by an application.\n * This parameter configure switch's flow hard timeout.\n * In case of controller-switch connection lost, this variable can be useful.\n * @return integer value of the hard Timeout\n */\n int hardTimeout();\n\n /**\n * Returns the reason for the flow received from switches.\n *\n * @return FlowRemoveReason value of reason\n */\n FlowRemoveReason reason();\n\n /**\n * Returns whether the flow is permanent i.e. does not time out.\n *\n * @return true if the flow is permanent, otherwise false\n */\n boolean isPermanent();\n\n /**\n * Returns the table id for this rule.\n *\n * @return an integer.\n * @deprecated in Loon release (version 1.11.0). Use {@link #table()} instead.\n */\n @Deprecated\n int tableId();\n\n /**\n * Returns the table identifier for this rule.\n *\n * @return a table identifier.\n */\n TableId table();\n\n /**\n * {@inheritDoc}\n *\n * Equality for flow rules only considers 'match equality'. This means that\n * two flow rules with the same match conditions will be equal, regardless\n * of the treatment or other characteristics of the flow.\n *\n * @param obj the reference object with which to compare.\n * @return {@code true} if this object is the same as the obj\n * argument; {@code false} otherwise.\n */\n boolean equals(Object obj);\n\n /**\n * Returns whether this flow rule is an exact match to the flow rule given\n * in the argument.\n * <p>\n * Exact match means that deviceId, priority, selector,\n * tableId, flowId and treatment are equal. Note that this differs from\n * the notion of object equality for flow rules, which does not consider the\n * flowId or treatment when testing equality.\n * </p>\n *\n * @param rule other rule to match against\n * @return true if the rules are an exact match, otherwise false\n */\n boolean exactMatch(FlowRule rule);\n\n /**\n * A flowrule builder.\n */\n interface Builder {\n\n /**\n * Assigns a cookie value to this flowrule. Mutually exclusive with the\n * fromApp method. This method is intended to take a cookie value from\n * the dataplane and not from the application.\n *\n * @param cookie a long value\n * @return this\n */\n Builder withCookie(long cookie);\n\n /**\n * Assigns the application that built this flow rule to this object.\n * The short value of the appId will be used as a basis for the\n * cookie value computation. It is expected that application use this\n * call to set their application id.\n *\n * @param appId an application id\n * @return this\n */\n Builder fromApp(ApplicationId appId);\n\n /**\n * Sets the priority for this flow rule.\n *\n * @param priority an integer\n * @return this\n */\n Builder withPriority(int priority);\n\n /**\n * Sets the deviceId for this flow rule.\n *\n * @param deviceId a device id\n * @return this\n */\n Builder forDevice(DeviceId deviceId);\n\n /**\n * Sets the table id for this flow rule, when the identifier is of type {@link TableId.Type#INDEX}. Default\n * value is 0.\n * <p>\n * <em>Important:</em> This method is left here for backward compatibility with applications that specifies\n * table identifiers using integers, e.g. as in OpenFlow. Currently there is no plan to deprecate this method,\n * however, new applications should favor using {@link #forTable(TableId)}.\n *\n * @param tableId an integer\n * @return this\n */\n Builder forTable(int tableId);\n\n /**\n * Sets the table identifier for this flow rule.\n * Default identifier is of type {@link TableId.Type#INDEX} and value 0.\n *\n * @param tableId table identifier\n * @return this\n */\n Builder forTable(TableId tableId);\n\n /**\n * Sets the selector (or match field) for this flow rule.\n *\n * @param selector a traffic selector\n * @return this\n */\n Builder withSelector(TrafficSelector selector);\n\n /**\n * Sets the traffic treatment for this flow rule.\n *\n * @param treatment a traffic treatment\n * @return this\n */\n Builder withTreatment(TrafficTreatment treatment);\n\n /**\n * Makes this rule permanent on the dataplane.\n *\n * @return this\n */\n Builder makePermanent();\n\n /**\n * Makes this rule temporary and timeout after the specified amount\n * of time.\n *\n * @param timeout an integer\n * @return this\n */\n Builder makeTemporary(int timeout);\n\n /**\n * Sets the idle timeout parameter in flow table.\n *\n * Will automatically make it permanent or temporary if the timeout is 0 or not, respectively.\n * @param timeout an integer\n * @return this\n */\n default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }\n\n /**\n * Sets hard timeout parameter in flow table.\n * @param timeout an integer\n * @return this\n */\n Builder withHardTimeout(int timeout);\n\n /**\n * Sets reason parameter received from switches .\n * @param reason a short\n * @return this\n */\n Builder withReason(FlowRemoveReason reason);\n\n /**\n * Builds a flow rule object.\n *\n * @return a flow rule.\n */\n FlowRule build();\n\n }\n}", "@Override\n public void enterEveryRule(final ParserRuleContext ctx) {\n }", "@Override\n public void visit(final OpGroup opGroup) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpGroup\");\n }\n addOp(OpGroup.create(rewriteOp1(opGroup), opGroup.getGroupVars(), opGroup.getAggregators()));\n }", "private void addBeforeRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t\t\r\n\t processer.addBeforeRule(new BDPKLockSuperVORule());\r\n\t processer.addBeforeRule(new BizLockRule());\r\n\t processer.addBeforeRule(new VersionValidateRule());\r\n\t processer.addBeforeRule(new BDReferenceCheckerRule());\r\n\t processer.addBeforeRule(new FireEventRule(\"1005\"));\r\n\t processer.addBeforeRule(new NotifyVersionChangeWhenDataDeletedRule());\r\n }", "private void parseRule(Node node) {\r\n if (switchTest) return;\r\n parse(node.right());\r\n }", "public final void rule__Affect__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1048:1: ( rule__Affect__Group__2__Impl rule__Affect__Group__3 )\n // InternalWh.g:1049:2: rule__Affect__Group__2__Impl rule__Affect__Group__3\n {\n pushFollow(FOLLOW_16);\n rule__Affect__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affect__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "protected IGrid applyRules(IRuleset ruleset, IGrid nextGeneration) {\n\t\tfor(int col = 0; col < this.gridConfiguration.getCols(); col++) {\n\t\t\tfor(int row = 0; row < this.gridConfiguration.getRows(); row++) {\n\t\t\t\tnextGeneration.setState(col, row, ruleset.getNextGenerationState(\n\t\t\t\t\t\tthis.getState(col, row),\n\t\t\t\t\t\tthis.getGridConfiguration().getNeighborhood().countNeighborsAlive(col, row, this),\n\t\t\t\t\t\tthis.getGridConfiguration().getNeighborhood().getNeighbors().size()));\n\t\t\t}\n\t\t}\n\n\t\treturn nextGeneration;\n\t}", "public FlowRule(Flow flow, int seq) {\r\n super(flow, seq);\r\n }", "public final void rule__Affect__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:994:1: ( rule__Affect__Group__0__Impl rule__Affect__Group__1 )\n // InternalWh.g:995:2: rule__Affect__Group__0__Impl rule__Affect__Group__1\n {\n pushFollow(FOLLOW_15);\n rule__Affect__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affect__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "void reschedule(Group groupInfo, boolean miss);", "@Override\n public void visit(LoopControlNode loopControlNode) {\n }", "public void testDenyDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n \n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "public void overrideGroup(String group) {\n this.group = group;\n }", "public final void ruleAffectation() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:191:2: ( ( ( rule__Affectation__Group__0 ) ) )\n // InternalBrowser.g:192:2: ( ( rule__Affectation__Group__0 ) )\n {\n // InternalBrowser.g:192:2: ( ( rule__Affectation__Group__0 ) )\n // InternalBrowser.g:193:3: ( rule__Affectation__Group__0 )\n {\n before(grammarAccess.getAffectationAccess().getGroup()); \n // InternalBrowser.g:194:3: ( rule__Affectation__Group__0 )\n // InternalBrowser.g:194:4: rule__Affectation__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Affectation__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAffectationAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Affectation__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1352:1: ( rule__Affectation__Group__0__Impl rule__Affectation__Group__1 )\n // InternalBrowser.g:1353:2: rule__Affectation__Group__0__Impl rule__Affectation__Group__1\n {\n pushFollow(FOLLOW_7);\n rule__Affectation__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affectation__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ContinueStmt__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7765:1: ( ( ( ruleLabel )? ) )\r\n // InternalGo.g:7766:1: ( ( ruleLabel )? )\r\n {\r\n // InternalGo.g:7766:1: ( ( ruleLabel )? )\r\n // InternalGo.g:7767:2: ( ruleLabel )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getContinueStmtAccess().getLabelParserRuleCall_1()); \r\n }\r\n // InternalGo.g:7768:2: ( ruleLabel )?\r\n int alt75=2;\r\n int LA75_0 = input.LA(1);\r\n\r\n if ( (LA75_0==RULE_ID) ) {\r\n int LA75_1 = input.LA(2);\r\n\r\n if ( (synpred119_InternalGo()) ) {\r\n alt75=1;\r\n }\r\n }\r\n else if ( (LA75_0==46) ) {\r\n int LA75_2 = input.LA(2);\r\n\r\n if ( (LA75_2==RULE_ID) ) {\r\n int LA75_5 = input.LA(3);\r\n\r\n if ( (synpred119_InternalGo()) ) {\r\n alt75=1;\r\n }\r\n }\r\n }\r\n switch (alt75) {\r\n case 1 :\r\n // InternalGo.g:7768:3: ruleLabel\r\n {\r\n pushFollow(FOLLOW_2);\r\n ruleLabel();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getContinueStmtAccess().getLabelParserRuleCall_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleAffect() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:266:2: ( ( ( rule__Affect__Group__0 ) ) )\n // InternalWh.g:267:2: ( ( rule__Affect__Group__0 ) )\n {\n // InternalWh.g:267:2: ( ( rule__Affect__Group__0 ) )\n // InternalWh.g:268:3: ( rule__Affect__Group__0 )\n {\n before(grammarAccess.getAffectAccess().getGroup()); \n // InternalWh.g:269:3: ( rule__Affect__Group__0 )\n // InternalWh.g:269:4: rule__Affect__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Affect__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAffectAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleUpdates() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1016:2: ( ( ( rule__Updates__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1017:1: ( ( rule__Updates__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1017:1: ( ( rule__Updates__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1018:1: ( rule__Updates__Group__0 )\n {\n before(grammarAccess.getUpdatesAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1019:1: ( rule__Updates__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1019:2: rule__Updates__Group__0\n {\n pushFollow(FOLLOW_rule__Updates__Group__0_in_ruleUpdates1893);\n rule__Updates__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getUpdatesAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "IRuleset add(IRuleset rule);", "public void setRule(RuleDefinition.Builder rule) {\r\n\t\t\tthis.rule = rule;\r\n\t\t}", "public final void rule__Affect__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1021:1: ( rule__Affect__Group__1__Impl rule__Affect__Group__2 )\n // InternalWh.g:1022:2: rule__Affect__Group__1__Impl rule__Affect__Group__2\n {\n pushFollow(FOLLOW_15);\n rule__Affect__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affect__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "public void setGroupcode(java.lang.Integer newGroup) {\n\tgroupcode = newGroup;\n}", "public final void ruleActionProcess() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1880:2: ( ( ( rule__ActionProcess__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1881:1: ( ( rule__ActionProcess__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1881:1: ( ( rule__ActionProcess__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1882:1: ( rule__ActionProcess__Group__0 )\n {\n before(grammarAccess.getActionProcessAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1883:1: ( rule__ActionProcess__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1883:2: rule__ActionProcess__Group__0\n {\n pushFollow(FOLLOW_rule__ActionProcess__Group__0_in_ruleActionProcess3547);\n rule__ActionProcess__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionProcessAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public final void rule__Affectation__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1433:1: ( rule__Affectation__Group__3__Impl )\n // InternalBrowser.g:1434:2: rule__Affectation__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Affectation__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "protected void processFlowRule(boolean install, FlowRule rule, String description) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n ops = install ? ops.add(rule) : ops.remove(rule);\n\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.info(description + \" success: \" + ops.toString() + \", \" + rule.toString());\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.info(description + \" error: \" + ops.toString() + \", \" + rule.toString());\n }\n }));\n }", "public final void rule__Loop__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2248:1: ( rule__Loop__Group__3__Impl )\n // InternalMLRegression.g:2249:2: rule__Loop__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Loop__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "protected void processTemporalRule(){\n RuleThread currntThrd;\n Thread currntThrdParent; // the parent of the current thread;\n int currntOperatingMode;\n int currntThrdPriority ;\n\n if( temporalRuleQueue.getHead()!= null){\n\n //If the rule thread is the top level, trigger the rule.\n currntThrd=temporalRuleQueue.getHead();\n while(currntThrd!= null){\n currntThrdPriority = currntThrd.getPriority ();\n currntThrdParent = currntThrd.getParent();\n\n if (currntThrd.getOperatingMode() == RuleOperatingMode.READY\n && !(currntThrd.getParent() == applThrd ||\n currntThrd.getParent().getClass().getName().equals(\"EventDispatchThread\")||\n currntThrd.getParent().getName ().equals (Constant.LEDReceiverThreadName)\n )){\n if(ruleSchedulerDebug)\n\t\t \t\t System.out.println(\"Changing mode of \"+currntThrd.getName()+\"from READY to EXE\");\n\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\t\t\t\t currntThrd.setScheduler(this);\n currntThrd.start();\n int rulePriority = 0;\n currntThrdParent = currntThrd;\n if(currntThrdParent instanceof RuleThread){\n rulePriority = currntThrd.getRulePriority();\n }\n currntThrd = currntThrd.next;\n while(currntThrd != null && currntThrd instanceof RuleThread &&\n currntThrd.getRulePriority() == rulePriority\n \t\t\t\t\t\t\t && currntThrd.getParent() == currntThrdParent ){\n if(ruleSchedulerDebug)\n \t\t\t System.out.print(\" start child thread =>\");\n\n currntThrd.print();\n currntThrd.setScheduler(this);\n if(\tcurrntThrd.getOperatingMode()== RuleOperatingMode.READY ){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n currntThrd.start();\n }\n \t\t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n // case 1.2:\n else if (currntThrd != null &&\tcurrntThrd.getOperatingMode() == RuleOperatingMode.EXE){\n \t\t\t\tcurrntThrd = currntThrd.next;\n\n }\n // case 1.3:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.WAIT){\n\t\t\t\t if(currntThrd.next == null){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\n// ;\n // All its childs has been completed.\n // This currntThread's operating mode will be changed to FINISHED.\n }\n\t\t\t\t\telse{\n // check whether its neighbor is its child\n\t\t\t\t\t\tif(currntThrd.next.getParent() == currntThrdParent){\n if(ruleSchedulerDebug){\n\t \t\t\t\t\t System.out.println(\"\\n\"+currntThrd.getName()+\" call childRecurse \"+currntThrd.next.getName());\n\t\t \t\t\t\t\tcurrntThrd.print();\n }\n\n childRecurse(currntThrd, temporalRuleQueue);\n }\n }\n currntThrd = currntThrd.next;\n }\n // case 1.4:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.FINISHED){\n if(ruleSchedulerDebug){\n\t\t\t\t\t System.out.println(\"delete \"+currntThrd.getName() +\" rule thread from rule queue.\");\n\t\t\t\t\t\tcurrntThrd.print();\n }\n processRuleList.deleteRuleThread(currntThrd,temporalRuleQueue);\n \tcurrntThrd = currntThrd.next;\n }\n else{\n \t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n }\n }", "public final void rule__Affectation__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1406:1: ( rule__Affectation__Group__2__Impl rule__Affectation__Group__3 )\n // InternalBrowser.g:1407:2: rule__Affectation__Group__2__Impl rule__Affectation__Group__3\n {\n pushFollow(FOLLOW_6);\n rule__Affectation__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affectation__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "DefaultCaseBlockRule createDefaultCaseBlockRule();", "interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup<WithCluster> {\n }", "public void setInValidGroup(boolean inValidGroup){this.inValidGroup = inValidGroup;}", "CaseStmtRule createCaseStmtRule();", "public final void rule__Affect__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1129:1: ( rule__Affect__Group_1__0__Impl rule__Affect__Group_1__1 )\n // InternalWh.g:1130:2: rule__Affect__Group_1__0__Impl rule__Affect__Group_1__1\n {\n pushFollow(FOLLOW_7);\n rule__Affect__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affect__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public StringBuilder adminQueryGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n // build query entity\n GroupResCtrlEntity qryEntity = new GroupResCtrlEntity();\n // get queried operation info, for createUser, modifyUser, dataVersionId\n if (!WebParameterUtils.getQueriedOperateInfo(req, qryEntity, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n // get group list\n if (!WebParameterUtils.getStringParamValue(req,\n WebFieldDef.COMPSGROUPNAME, false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n final Set<String> groupNameSet = (Set<String>) result.getRetData();\n // get and valid qryPriorityId info\n if (!WebParameterUtils.getQryPriorityIdParameter(req,\n false, TBaseConstants.META_VALUE_UNDEFINED,\n TServerConstants.QRY_PRIORITY_MIN_VALUE, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n int inQryPriorityId = (int) result.getRetData();\n // get flowCtrlEnable's statusId info\n if (!WebParameterUtils.getFlowCtrlStatusParamValue(req, false, null, sBuffer, result)) {\n WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());\n return sBuffer;\n }\n EnableStatus flowCtrlEnable = (EnableStatus) result.getRetData();\n qryEntity.updModifyInfo(qryEntity.getDataVerId(), null,\n TBaseConstants.META_VALUE_UNDEFINED, inQryPriorityId,\n flowCtrlEnable, TBaseConstants.META_VALUE_UNDEFINED, null);\n Map<String, GroupResCtrlEntity> groupResCtrlEntityMap =\n defMetaDataService.getGroupCtrlConf(groupNameSet, qryEntity);\n // build return result\n int totalCnt = 0;\n WebParameterUtils.buildSuccessWithDataRetBegin(sBuffer);\n for (GroupResCtrlEntity resCtrlEntity : groupResCtrlEntityMap.values()) {\n if (resCtrlEntity == null) {\n continue;\n }\n if (totalCnt++ > 0) {\n sBuffer.append(\",\");\n }\n sBuffer = resCtrlEntity.toOldVerFlowCtrlWebJsonStr(sBuffer, true);\n }\n WebParameterUtils.buildSuccessWithDataRetEnd(sBuffer, totalCnt);\n return sBuffer;\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void exitEveryRule(final ParserRuleContext ctx) {\n }", "public void setStateFromRules (int state) {\n \tswitch(state) {\n\t\tcase 31:\n\t\t\tthis.visitState = VisitState.NOT_MATCHED;\n\t\n\t\t//TODO: add more cases here\n\t}\n \t\n }", "public final void rule__Affectation__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1379:1: ( rule__Affectation__Group__1__Impl rule__Affectation__Group__2 )\n // InternalBrowser.g:1380:2: rule__Affectation__Group__1__Impl rule__Affectation__Group__2\n {\n pushFollow(FOLLOW_8);\n rule__Affectation__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affectation__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Loop__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2221:1: ( rule__Loop__Group__2__Impl rule__Loop__Group__3 )\n // InternalMLRegression.g:2222:2: rule__Loop__Group__2__Impl rule__Loop__Group__3\n {\n pushFollow(FOLLOW_6);\n rule__Loop__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Loop__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@BeforeGroup\n public void beforeGroup() {\n }", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final void rule__Affect__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1102:1: ( rule__Affect__Group__4__Impl )\n // InternalWh.g:1103:2: rule__Affect__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Affect__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic void effetCase() {\n\t\t\n\t}", "public final void ruleActivity() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:130:2: ( ( ( rule__Activity__Group__0 ) ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:131:1: ( ( rule__Activity__Group__0 ) )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:131:1: ( ( rule__Activity__Group__0 ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:132:1: ( rule__Activity__Group__0 )\n {\n before(grammarAccess.getActivityAccess().getGroup()); \n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:133:1: ( rule__Activity__Group__0 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:133:2: rule__Activity__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__0_in_ruleActivity214);\n rule__Activity__Group__0();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getActivityAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void createGroupCommand(Command root){\n\t\tif(codeReader.hasNext(END_GROUP))\n\t\t\tthrow new SLogoException(\"No arguments specified in grouping.\");\n\t\twhile(!codeReader.hasNext(END_GROUP)) {\n\t\t\ttry {\n\t\t\t\thandleSpecialCases(root);\n\t\t\t\tString s = codeReader.next();\n\t\t\t\troot.addChild(parseCommand(s));\n\t\t\t}\n\t\t\tcatch(NoSuchElementException n) {\n\t\t\t\tthrow new SLogoException(\"Unclosed Parenthesis.\");\n\t\t\t}\n\t\t}\n\t\tcodeReader.next();\n\t}", "public void substitute(Rule r){\n \n\tr.addIndex(this.originalPosition);\n\t \n\tthis.cleanUp();\n this.n.cleanUp();\n \n NonTerminal nt = new NonTerminal(r);\n nt.originalPosition = this.originalPosition;\n this.p.insertAfter(nt);\n if (!p.check())\n p.n.check();\n }", "public final void rule__CrossValidation__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1924:1: ( rule__CrossValidation__Group__3__Impl )\n // InternalMLRegression.g:1925:2: rule__CrossValidation__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__CrossValidation__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void testOneRequiredGroup() {\n }", "@Override\n public void testOneRequiredGroup() {\n }", "public final void ruleInput() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:141:2: ( ( ( rule__Input__Group__0 ) ) )\n // InternalWh.g:142:2: ( ( rule__Input__Group__0 ) )\n {\n // InternalWh.g:142:2: ( ( rule__Input__Group__0 ) )\n // InternalWh.g:143:3: ( rule__Input__Group__0 )\n {\n before(grammarAccess.getInputAccess().getGroup()); \n // InternalWh.g:144:3: ( rule__Input__Group__0 )\n // InternalWh.g:144:4: rule__Input__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Input__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getInputAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "protected abstract Builder processSpecificRoutingRule(Builder rb);", "void endVisit(Group group);", "@SuppressWarnings(\"unchecked\")\n\tprivate void setRules() {\n\t\tthis.result = Result.START;\n\t\t// Create all initial rule executors, and shuffle them if needed.\n\t\tthis.rules = new LinkedList<>();\n\t\tModule module = getModule();\n\t\tfor (Rule rule : module.getRules()) {\n\t\t\tRuleStackExecutor executor = (RuleStackExecutor) getExecutor(rule, getSubstitution());\n\t\t\texecutor.setContext(module);\n\t\t\tthis.rules.add(executor);\n\t\t}\n\t\tif (getRuleOrder() == RuleEvaluationOrder.RANDOM || getRuleOrder() == RuleEvaluationOrder.RANDOMALL) {\n\t\t\tCollections.shuffle((List<RuleStackExecutor>) this.rules);\n\t\t}\n\t}", "public final void rule__BreakStmt__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7711:1: ( ( ( ruleLabel )? ) )\r\n // InternalGo.g:7712:1: ( ( ruleLabel )? )\r\n {\r\n // InternalGo.g:7712:1: ( ( ruleLabel )? )\r\n // InternalGo.g:7713:2: ( ruleLabel )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getBreakStmtAccess().getLabelParserRuleCall_1()); \r\n }\r\n // InternalGo.g:7714:2: ( ruleLabel )?\r\n int alt74=2;\r\n int LA74_0 = input.LA(1);\r\n\r\n if ( (LA74_0==RULE_ID) ) {\r\n int LA74_1 = input.LA(2);\r\n\r\n if ( (synpred118_InternalGo()) ) {\r\n alt74=1;\r\n }\r\n }\r\n else if ( (LA74_0==46) ) {\r\n int LA74_2 = input.LA(2);\r\n\r\n if ( (LA74_2==RULE_ID) ) {\r\n int LA74_5 = input.LA(3);\r\n\r\n if ( (synpred118_InternalGo()) ) {\r\n alt74=1;\r\n }\r\n }\r\n }\r\n switch (alt74) {\r\n case 1 :\r\n // InternalGo.g:7714:3: ruleLabel\r\n {\r\n pushFollow(FOLLOW_2);\r\n ruleLabel();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getBreakStmtAccess().getLabelParserRuleCall_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private void addAfterRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t \r\n\t\t\r\n\t processer.addAfterRule(new FireEventRule(\"1006\"));\r\n\t\t\r\n\t processer.addAfterRule(new WriteBusiLogRule(\"delete\"));\r\n }", "@Override\n\tpublic void visit(CaseLabeledStatement n) { // This is neither a leaf nor a non-leaf in CFG.\n\t\tn.getF3().accept(this);\n\t}", "public void setFlow(int flow) {\r\n\r\n this.flow = flow;\r\n }", "protected CorsaTrafficTreatment processNextTreatment(TrafficTreatment treatment) {\n return new CorsaTrafficTreatment(CorsaTrafficTreatmentType.GROUP, treatment);\n }", "public final void rule__Loop__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2167:1: ( rule__Loop__Group__0__Impl rule__Loop__Group__1 )\n // InternalMLRegression.g:2168:2: rule__Loop__Group__0__Impl rule__Loop__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__Loop__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Loop__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic void visit(CaseExpression arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void removeNodeRule(int step) {\n\t}", "public final void ruleLoop() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:616:2: ( ( ( rule__Loop__Group__0 ) ) )\n // InternalMLRegression.g:617:2: ( ( rule__Loop__Group__0 ) )\n {\n // InternalMLRegression.g:617:2: ( ( rule__Loop__Group__0 ) )\n // InternalMLRegression.g:618:3: ( rule__Loop__Group__0 )\n {\n before(grammarAccess.getLoopAccess().getGroup()); \n // InternalMLRegression.g:619:3: ( rule__Loop__Group__0 )\n // InternalMLRegression.g:619:4: rule__Loop__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Loop__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getLoopAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void caseAAssignmentExpr(AAssignmentExpr node) {\n String identifier = node.getIdentifier().toString().toLowerCase().replaceAll(\" \",\"\");\n currentBlock = new Block(identifier, blockID++);\n node.getExpr().apply(this); // evaluate the expression\n setNextSuccessor();\n }", "public final void rule__Calculate__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2113:1: ( rule__Calculate__Group__2__Impl rule__Calculate__Group__3 )\n // InternalMLRegression.g:2114:2: rule__Calculate__Group__2__Impl rule__Calculate__Group__3\n {\n pushFollow(FOLLOW_6);\n rule__Calculate__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Calculate__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic void deleteRuleAfterFirstMvt() {\n\t\t\n\t}", "public final void rule__Activity__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:524:1: ( rule__Activity__Group__2__Impl rule__Activity__Group__3 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:525:2: rule__Activity__Group__2__Impl rule__Activity__Group__3\n {\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__2__Impl_in_rule__Activity__Group__21036);\n rule__Activity__Group__2__Impl();\n _fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__3_in_rule__Activity__Group__21039);\n rule__Activity__Group__3();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__CrossValidation__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1897:1: ( rule__CrossValidation__Group__2__Impl rule__CrossValidation__Group__3 )\n // InternalMLRegression.g:1898:2: rule__CrossValidation__Group__2__Impl rule__CrossValidation__Group__3\n {\n pushFollow(FOLLOW_6);\n rule__CrossValidation__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__CrossValidation__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n public boolean invokeRuleMethod(BusinessRule rule) {\r\n boolean result = super.invokeRuleMethod(rule);\r\n cleanErrorMessages();\r\n return result;\r\n }", "public void finalPass() throws Exception {\n if (_Label != null)\n _Label.finalPass();\n \n if (_GroupExpressions != null)\n _GroupExpressions.finalPass();\n \n if (_Custom != null)\n _Custom.finalPass();\n \n if (_Filters != null)\n _Filters.finalPass();\n \n if (_ParentGroup != null)\n _ParentGroup.finalPass();\n \n // Determine if group is defined inside of a Matrix; these get\n // different runtime expression handling in FunctionAggr\n _InMatrix = false;\n for (ReportLink rl = this.Parent;rl != null;rl = rl.Parent)\n {\n if (rl instanceof Matrix)\n {\n _InMatrix = true;\n break;\n }\n \n if (rl instanceof Table || rl instanceof List || rl instanceof Chart)\n break;\n \n }\n return ;\n }", "@AfterGroups({\"regression\", \"sanity\"})\n\tpublic void ag() {\n\t\tSystem.out.println(\"after group regresion\");\n\t}", "@Override\n\tprotected boolean rulesGeneration() {\n\t\tGlobal.logger.finer(\"--------------------- S101 rulesGeneration() ----------------- \");\n\t\t//Global.logger.finer(this.toString());\t\t\n\t\tif(activationGuards()){\n\t\t\ttry {\n\t\t\t\tthis.categories.beforeFirst();\n\t\t\t\t\n\t\t\t\twhile (!this.categories.isClosed() && this.categories.next()) {\n\t\t\t\t\tgroupName = this.categories.getString(\"name\");\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S102 [\" + groupName + \", \" + 1 +\"] \");\n\t\t\t\t\tcreateRule(new S102(course_ID, groupName, 1));\n\t\t\t\t\t\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S103 [\" + groupName + \", study ]\");\n\t\t\t\t\tcreateRule(new S103(course_ID, groupName, \"study\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t\treturn true;\n\t}", "private void updateGroup(String newGroupName, int level) {\r\n Equals levelFilter = new Equals(fieldName[level], previousNodeValue);\r\n CoeusVector cvFilteredData = (CoeusVector)cvHierarchyData.filter(levelFilter);\r\n if(cvFilteredData != null && cvFilteredData.size()>0) {\r\n for (int index=0; index < cvFilteredData.size(); index++) {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvFilteredData.get(index);\r\n sponsorHierarchyBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n switch(level) {\r\n case 1:\r\n sponsorHierarchyBean.setLevelOne(newGroupName);\r\n break;\r\n case 2:\r\n sponsorHierarchyBean.setLevelTwo(newGroupName);\r\n break;\r\n case 3:\r\n sponsorHierarchyBean.setLevelThree(newGroupName);\r\n break;\r\n case 4:\r\n sponsorHierarchyBean.setLevelFour(newGroupName);\r\n break;\r\n case 5:\r\n sponsorHierarchyBean.setLevelFive(newGroupName);\r\n break;\r\n case 6:\r\n sponsorHierarchyBean.setLevelSix(newGroupName);\r\n break;\r\n case 7:\r\n sponsorHierarchyBean.setLevelSeven(newGroupName);\r\n break;\r\n case 8:\r\n sponsorHierarchyBean.setLevelEight(newGroupName);\r\n break;\r\n case 9:\r\n sponsorHierarchyBean.setLevelNine(newGroupName);\r\n break;\r\n case 10:\r\n sponsorHierarchyBean.setLevelTen(newGroupName);\r\n break;\r\n }\r\n }\r\n }\r\n }", "public final void rule__Affect__Group_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1183:1: ( rule__Affect__Group_4__0__Impl rule__Affect__Group_4__1 )\n // InternalWh.g:1184:2: rule__Affect__Group_4__0__Impl rule__Affect__Group_4__1\n {\n pushFollow(FOLLOW_16);\n rule__Affect__Group_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Affect__Group_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Affect__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:1156:1: ( rule__Affect__Group_1__1__Impl )\n // InternalWh.g:1157:2: rule__Affect__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Affect__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
[ "0.61825943", "0.5874147", "0.5797916", "0.5652809", "0.56200695", "0.55222017", "0.5464077", "0.546091", "0.543518", "0.53896916", "0.5376197", "0.5348393", "0.53434646", "0.5294865", "0.52712905", "0.5260483", "0.5246179", "0.5232246", "0.51983654", "0.51818913", "0.5169765", "0.5165329", "0.51510936", "0.51383096", "0.51301897", "0.5130134", "0.5120016", "0.51128834", "0.51057726", "0.5096082", "0.509571", "0.50883406", "0.5085235", "0.50617236", "0.505639", "0.5049794", "0.5047313", "0.50460804", "0.5045858", "0.50347126", "0.5018004", "0.5015626", "0.5009074", "0.5006304", "0.4993401", "0.49863344", "0.4984669", "0.49764648", "0.49746707", "0.49721208", "0.4961788", "0.49558243", "0.49465233", "0.49392712", "0.49312603", "0.49226016", "0.49194005", "0.49169806", "0.49153918", "0.49153918", "0.4910154", "0.49096435", "0.489663", "0.48911294", "0.48865786", "0.48729005", "0.48676547", "0.48601675", "0.48581764", "0.48576924", "0.48506886", "0.4845171", "0.48296157", "0.48296157", "0.48273176", "0.4826179", "0.4823481", "0.48168194", "0.48123795", "0.4811005", "0.48053136", "0.4802044", "0.4800329", "0.4798586", "0.47961164", "0.47922966", "0.47894412", "0.47865596", "0.47743812", "0.47741395", "0.47727627", "0.477051", "0.4767522", "0.47601622", "0.4755966", "0.47554144", "0.4754036", "0.47505355", "0.4750442", "0.47475067" ]
0.52544194
16
delete group flow control rule
public StringBuilder adminDelGroupFlowCtrlRule(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result) { // check and get operation info if (!WebParameterUtils.getAUDBaseInfo(req, false, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } BaseEntity opEntity = (BaseEntity) result.getRetData(); // get group list if (!WebParameterUtils.getStringParamValue(req, WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } Set<String> groupNameSet = (Set<String>) result.getRetData(); // add or modify records GroupResCtrlEntity ctrlEntity; List<GroupProcessResult> retInfoList = new ArrayList<>(); for (String groupName : groupNameSet) { ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName); if (ctrlEntity != null && ctrlEntity.getFlowCtrlStatus() != EnableStatus.STATUS_DISABLE) { retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName, TServerConstants.QRY_PRIORITY_DEF_VALUE, EnableStatus.STATUS_DISABLE, 0, TServerConstants.BLANK_FLOWCTRL_RULES, sBuffer, result)); } else { result.setFullInfo(true, DataOpErrCode.DERR_SUCCESS.getCode(), "Ok"); retInfoList.add(new GroupProcessResult(groupName, "", result)); } } return buildRetInfo(retInfoList, sBuffer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteRuleAfterFirstMvt() {\n\t\t\n\t}", "void deleteTAlgmntBussRule(Integer ruleId);", "@Override\n public void deleteRuleAR() {\n }", "@Override\n public void deleteVisRuleAR() {\n }", "void deleteRule(long ruleID, boolean dropPendingCmdlets) throws IOException;", "public void deleteGroup(Group group);", "@Override\r\n\tpublic void removeNodeRule(int step) {\n\t}", "Result deleteGroup(String group);", "@DELETE(\"pushrules/global/{kind}/{ruleId}\")\n Call<Void> deleteRule(@Path(\"kind\") String kind, @Path(\"ruleId\") String ruleId);", "int deleteByExample(SeGroupExample example);", "@Test\n public void deleteRule() throws Exception {\n RuleEntity rule = new RuleEntity();\n rule.setPackageName(\"junitPackage\");\n rule.setStatus(Status.INACTIVE);\n rule.setRuleName(\"junitRuleName\");\n rule.setRule(Base64.getEncoder().encodeToString(\"jUnit Rule Contents\".getBytes()));\n\n ResponseEntity<RuleEntity> createResponse = template.postForEntity(\n base.toString() + \"/\",\n rule,\n RuleEntity.class);\n RuleEntity createdRule = createResponse.getBody();\n /*\n * delete it\n */\n template.delete(base.toString() + \"/{1}\", createdRule.getId());\n /*\n * find it\n */\n ResponseEntity<RuleEntity> queryresponse = template.getForEntity(\n base.toString() + \"/{1}\",\n RuleEntity.class,\n createdRule.getId());\n\n Assert.assertEquals(\"checking for 404 notfound\", NOT_FOUND, queryresponse.getStatusCode());\n }", "public void doDelete() throws Exception\r\n\t\t{\r\n\t\tmyRouteGroup.delete();\r\n\t\t}", "int deleteByExample(GrpTagExample example);", "public void removeAllRuleRef();", "void remove(String group);", "void endVisit(Group group);", "@POST\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Path(\"/{id}/deactivate\")\n @CheckPermission(roles = { Role.TENANT_ADMIN }, acls = { ACL.OWN, ACL.ALL })\n public TaskResourceRep deleteConsistencyGroup(@PathParam(\"id\") final URI id,\n @DefaultValue(\"FULL\") @QueryParam(\"type\") String type) throws InternalException {\n // Query for the given consistency group and verify it is valid.\n final BlockConsistencyGroup consistencyGroup = (BlockConsistencyGroup) queryResource(id);\n ArgValidator.checkReference(BlockConsistencyGroup.class, id, checkForDelete(consistencyGroup));\n\n // Create a unique task identifier.\n String task = UUID.randomUUID().toString();\n\n // If the consistency group is inactive, has yet to be created on\n // a storage system, or this is a ViPR Only delete, then the deletion\n // is not controller specific. We essentially just mark the CG for\n // deletion. Note that the CG may be uncreated, but in the process of\n // being created, which means that volumes would reference the CG.\n // So, we do need to verify that no volumes reference the CG.\n if (deletingUncreatedConsistencyGroup(consistencyGroup) ||\n VolumeDeleteTypeEnum.VIPR_ONLY.name().equals(type)) {\n markCGForDeletion(consistencyGroup);\n return finishDeactivateTask(consistencyGroup, task);\n }\n\n // Otherwise, we need to clean up the array consistency groups.\n TaskResourceRep taskRep = null;\n try {\n List<StorageSystem> vplexSystems = BlockConsistencyGroupUtils.getVPlexStorageSystems(consistencyGroup, _dbClient);\n if (!vplexSystems.isEmpty()) {\n // If there is a VPLEX system, then we simply call the VPLEX controller which\n // will delete all VPLEX CGS on all VPLEX systems, and also all local CGs on\n // all local systems.\n BlockServiceApi blockServiceApi = getBlockServiceImpl(DiscoveredDataObject.Type.vplex.name());\n taskRep = blockServiceApi.deleteConsistencyGroup(vplexSystems.get(0), consistencyGroup, task);\n } else {\n // Otherwise, we call the block controller to delete the local CGs on all local systems.\n List<URI> localSystemURIs = BlockConsistencyGroupUtils.getLocalSystems(consistencyGroup, _dbClient);\n if (!localSystemURIs.isEmpty()) {\n boolean foundSystem = false;\n for (URI localSystemURI : localSystemURIs) {\n StorageSystem localSystem = _dbClient.queryObject(StorageSystem.class, localSystemURI);\n if (localSystem != null) {\n foundSystem = true;\n BlockServiceApi blockServiceApi = getBlockServiceImpl(BLOCKSERVICEAPIIMPL_GROUP);\n taskRep = blockServiceApi.deleteConsistencyGroup(localSystem, consistencyGroup, task);\n if (Task.Status.error.name().equals(taskRep.getState())) {\n break;\n }\n } else {\n _log.warn(\"Local system {} for consistency group {} does not exist\",\n localSystemURI, consistencyGroup.getLabel());\n }\n }\n\n // Check to make sure we found at least one of these local systems.\n if (!foundSystem) {\n // For some reason we have a CG with local systems, but none of them\n // are in the database. In this case, we will log a warning and mark\n // it for deletion.\n _log.warn(\"Deleting created consistency group {} where none of the local systems for the group exist\",\n consistencyGroup.getLabel());\n markCGForDeletion(consistencyGroup);\n return finishDeactivateTask(consistencyGroup, task);\n }\n } else {\n // For some reason the CG has no VPLEX or local systems but is\n // marked as being active and created. In this case, we will log\n // a warning and mark it for deletion.\n _log.info(\"Deleting created consistency group {} with no local or VPLEX systems\", consistencyGroup.getLabel());\n markCGForDeletion(consistencyGroup);\n return finishDeactivateTask(consistencyGroup, task);\n }\n }\n } catch (APIException | InternalException e) {\n String errorMsg = String.format(\"Exception attempting to delete consistency group %s: %s\", consistencyGroup.getLabel(),\n e.getMessage());\n _log.error(errorMsg);\n taskRep.setState(Operation.Status.error.name());\n taskRep.setMessage(errorMsg);\n _dbClient.error(BlockConsistencyGroup.class, taskRep.getResource().getId(), task, e);\n } catch (Exception e) {\n String errorMsg = String.format(\"Exception attempting to delete consistency group %s: %s\", consistencyGroup.getLabel(),\n e.getMessage());\n _log.error(errorMsg);\n APIException apie = APIException.internalServerErrors.genericApisvcError(errorMsg, e);\n taskRep.setState(Operation.Status.error.name());\n taskRep.setMessage(apie.getMessage());\n _dbClient.error(BlockConsistencyGroup.class, taskRep.getResource().getId(), task, apie);\n }\n\n // Make sure that the CG is marked for deletion if\n // the request was successful.\n if (Task.Status.ready.name().equals(taskRep.getState())) {\n markCGForDeletion(consistencyGroup);\n }\n\n return taskRep;\n }", "@Test\n\tpublic void deleteA_useAwithB_danglingEdgeTest() {\n\t\tHenshinResourceSet resourceSet = new HenshinResourceSet(PATH);\n\n\t\t// Load the module:\n\t\tModule module = resourceSet.getModule(\"simpleTgRules.henshin\", false);\n\n\t\tUnit deleteAUnit = module.getUnit(\"deleteA\");\n\t\tRule deleteARule = (Rule) deleteAUnit;\n\n\t\tUnit useAwithBUnit = module.getUnit(\"useAwithB\");\n\t\tRule useAwithBRule = (Rule) useAwithBUnit;\n\n\t\tConflictAnalysis atomicCoreCPA = new ConflictAnalysis(deleteARule, useAwithBRule);\n\t\tList<ConflictAtom> computedConflictAtoms = atomicCoreCPA.computeConflictAtoms();\n\t\t// should be 0 due to dangling edge condition. First rule deletes a node\n\t\t// and second rule requires to have an edge on that node!\n\t\tAssert.assertEquals(0, computedConflictAtoms.size());\n\t\t// System.out.println(\"number of conflict atoms:\n\t\t// \"+computedConflictAtoms.size());\n\t\t// for(ConflictAtom conflictAtom : computedConflictAtoms){\n\t\t// System.out.println(conflictAtom);\n\t\t// }\n\n\t\tAtomCandidateComputation candComp = new AtomCandidateComputation(deleteARule, useAwithBRule);\n\t\tList<Span> conflictAtomCandidates = candComp.computeAtomCandidates();\n\n\t\tSet<MinimalConflictReason> reasons = new HashSet<>();//\n\t\tfor (Span candidate : conflictAtomCandidates) {\n\t\t\tnew MinimalReasonComputation(deleteARule, useAwithBRule).computeMinimalConflictReasons(candidate, reasons);\n\t\t}\n\t\t// should be 0 due to dangling edge condition. First rule deletes a node\n\t\t// and second rule requires to have an edge on that node!\n\t\tAssert.assertEquals(0, reasons.size());\n\n\t\t// Set<Span> minimalConflictReasons = reasons;\n\t\t// System.out.println(\"number of minimal conflict reasons:\n\t\t// \"+minimalConflictReasons.size());\n\t\t// for(Span minimalConflictReason : minimalConflictReasons){\n\t\t// System.out.println(minimalConflictReason);\n\t\t// }\n\t}", "public void delete(Long id) {\n\t\tlog.debug(\"Request to delete Rule : {}\", id);\n\t\tRule rule = this.findOne(id);\n\t\tthis.schedulingTask.unregisterJobFromRule(rule);\n\t\truleRepository.delete(id);\n\t}", "void removeFinancialStatementsGroup(int i);", "public void redo() {\n for (NoteGroupable noteGroupable : group.getNoteGroupables()) {\n compositionManager.deleteGroupable(noteGroupable);\n }\n compositionManager.addGroupable(group);\n }", "public void undo() {\n compositionManager.ungroup(group);\n }", "@DeleteMapping(\"/skillgroups/{id}\")\n @Timed\n public ResponseEntity<Void> deleteSkillgroup(@PathVariable Long id) {\n log.debug(\"REST request to delete Skillgroup : {}\", id);\n skillgroupService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public DeleteGroupResponse execute(final Long inRequest)\n {\n DomainGroup group = groupMapper.execute(new FindByIdRequest(\"DomainGroup\", inRequest));\n Long groupId = group.getId();\n Organization parentOrg = group.getParentOrganization();\n Long parentOrgId = group.getParentOrgId();\n\n // get set of parentOrgs\n Set<Long> parentOrgIds = new HashSet<Long>(parentOrgIdMapper.execute(parentOrgId));\n parentOrgIds.add(parentOrgId);\n\n // get set of compositeStreams ids that include this group.\n @SuppressWarnings(\"unused\")\n List<Long> containingCompositeStreamIds = getEntityManager().createQuery(\n \"SELECT sv.id FROM StreamView sv, StreamScope ss WHERE ss.id = :ssId AND \"\n + \" sv MEMBER OF ss.containingCompositeStreams\").setParameter(\"ssId\",\n group.getStreamScope().getId()).getResultList();\n\n // get everyone composite stream id and add to list of containingCompositeStreamIds.\n Long everyoneCompositeStreamId = (Long) getEntityManager().createQuery(\n \"SELECT id from StreamView where type = :type\").setParameter(\"type\", StreamView.Type.EVERYONE)\n .getSingleResult();\n containingCompositeStreamIds.add(everyoneCompositeStreamId);\n\n DeleteGroupResponse response = new DeleteGroupResponse(groupId, group.getShortName(), new Long(group\n .getEntityStreamView().getId()), new Long(group.getStreamScope().getId()), parentOrgIds,\n containingCompositeStreamIds);\n\n // delete the group hibernate should take care of following since we are deleting via entity manager.\n // Hibernate: delete from Group_Capability where domainGroupId=?\n // Hibernate: delete from Group_Task where groupId=?\n // Hibernate: delete from Group_Coordinators where DomainGroup_id=?\n // Hibernate: delete from StreamView_StreamScope where StreamView_id=?\n // Hibernate: delete from GroupFollower where followingId=? (this should be gone already).\n // Hibernate: delete from DomainGroup where id=? and version=?\n // Hibernate: delete from StreamView where id=? and version=?\n getEntityManager().remove(group);\n\n OrganizationHierarchyTraverser orgTraverser = orgTraverserBuilder.getOrganizationHierarchyTraverser();\n orgTraverser.traverseHierarchy(parentOrg);\n organizationMapper.updateOrganizationStatistics(orgTraverser);\n\n return response;\n\n }", "@Test\n\tpublic void deleteA_useA() {\n\t\tHenshinResourceSet resourceSet = new HenshinResourceSet(PATH);\n\n\t\t// Load the module:\n\t\tModule module = resourceSet.getModule(\"simpleTgRules.henshin\", false);\n\n\t\tUnit deleteAUnit = module.getUnit(\"deleteA\");\n\t\tRule deleteARule = (Rule) deleteAUnit;\n\n\t\tUnit useAwithBUnit = module.getUnit(\"useA\");\n\t\tRule useAwithBRule = (Rule) useAwithBUnit;\n\n\t\tConflictAnalysis atomicCoreCPA = new ConflictAnalysis(deleteARule, useAwithBRule);\n\t\tList<ConflictAtom> computedConflictAtoms = atomicCoreCPA.computeConflictAtoms();\n\t\tAssert.assertEquals(1, computedConflictAtoms.size());\n\t\tSystem.out.println(\"number of conflict atoms: \" + computedConflictAtoms.size());\n\t\tfor (ConflictAtom conflictAtom : computedConflictAtoms) {\n\t\t\tSystem.out.println(conflictAtom);\n\t\t}\n\n\t\tAtomCandidateComputation candComp = new AtomCandidateComputation(deleteARule, useAwithBRule);\n\t\tList<Span> conflictAtomCandidates = candComp.computeAtomCandidates();\n\t\tSet<MinimalConflictReason> reasons = new HashSet<>();//\n\t\tfor (Span candidate : conflictAtomCandidates) {\n\t\t\tnew MinimalReasonComputation(deleteARule, useAwithBRule).computeMinimalConflictReasons(candidate, reasons);\n\t\t}\n\t\tAssert.assertEquals(1, reasons.size());\n\n\t\tSet<MinimalConflictReason> minimalConflictReasons = reasons;\n\t\tSystem.out.println(\"number of minimal conflict reasons: \" + minimalConflictReasons.size());\n\t\tfor (Span minimalConflictReason : minimalConflictReasons) {\n\t\t\tSystem.out.println(minimalConflictReason);\n\t\t}\n\t}", "int deleteByExample(IymDefAssignmentExample example);", "public final void rule__VoidOperation__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2058:1: ( rule__VoidOperation__Group__3__Impl rule__VoidOperation__Group__4 )\n // InternalBSQL2Java.g:2059:2: rule__VoidOperation__Group__3__Impl rule__VoidOperation__Group__4\n {\n pushFollow(FOLLOW_20);\n rule__VoidOperation__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__VoidOperation__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "void deleteExam(Module module, Exam target);", "int deleteByExample(CmGroupRelIndustryExample example);", "void deleteLesson(Module module, Lesson target);", "public void removeGroup(String id) {\r\n System.out.println(\"conectado con model ---> metodo removeGroup\");\r\n //TODO\r\n }", "public void deleteGoal(Goal goal_1);", "int deleteByExample(ProjGroupExample example);", "@Test (description = \"Delete a contact group use shortcut Del and verify toast message\",\n\t\t\tgroups = { \"functional-skip\" })\n\n\tpublic void DeleteContactGroup_04() throws HarnessException {\n\t\tContactGroupItem group = ContactGroupItem.createContactGroupItem(app.zGetActiveAccount());\n\n\t\t// Refresh\n\t\tapp.zPageContacts.zToolbarPressButton(Button.B_REFRESH);\n\n\t\t// Select the contact group\n\t\tapp.zPageContacts.zListItem(Action.A_LEFTCLICK, group.getName());\n\n\t\t// Delete contact group by click shortcut Del\n\t\tapp.zPageContacts.zKeyboardKeyEvent(Keys.DELETE);\n\n\t\t// Verifying the toaster message\n\t\tToaster toast = app.zPageMain.zGetToaster();\n\t\tString toastMessage = toast.zGetToastMessage();\n\t\tZAssert.assertStringContains(toastMessage, \"1 contact group moved to Trash\", \"Verify toast message: Contact group Moved to Trash\");\n\t}", "@Test\n public void deleteSubjectGroupTest() throws Exception {\n createSubjectGroupTest();\n \n IPSubject ip = new IPSubject();\n Map<Long, SubjectGroup> result = ip.getSubjectGroupInfoByName(\"network\");\n Long groupId = result.keySet().toArray(new Long[1])[0];\n assertNotNull(groupId);\n \n ip.deleteSubjectGroup(groupId);\n\n EntityManagerContext.open(factory);\n try {\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup savedSubjectGroup =\n EntityManagerContext.get().find(\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup.class, \n groupId);\n assertNull(savedSubjectGroup);\n } finally {\n EntityManagerContext.close();\n }\n }", "private void delete() {\n\n\t}", "@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}", "private void clearDelete() {\n if (patternCase_ == 5) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }", "public abstract void del(Field.RadioData radioData);", "public void removeGroup(int groupId);", "abstract public void deleteAfterBetaReduction();", "@Override\n \t\t\t\tpublic void deleteGraph() throws TransformedGraphException {\n \n \t\t\t\t}", "@Override\n\tpublic void delete(WorkSummary workSummary) {\n\n\t}", "public String deleteProductionBlock(ProductionBlock pb);", "@Override\n\tpublic void stopGroup(Integer id) {\n\t\tString hql = \"update HhGroup h set h.groupStatus = 2 where h.id = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.executeUpdate();\n\t}", "@Override\n public void purgeFlows() {\n setOfFlowsToAdd.clear();\n setOfFlowsToDelete.clear();\n }", "public void deleteGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Groups WHERE groupName=? AND id=?;\");\n s.setString(1, group.getId());\n s.setInt(2, group.getIdNum());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public void pruneRules_cbaLike() {\n LOGGER.info(\"STARTED Postpruning\");\n //HashMap<ExtendRule,Integer> ruleErrors = new HashMap();\n //HashMap<ExtendRule,AttributeValue> ruleDefClass = new HashMap();\n ArrayList<ExtendRule> rulesToRemove = new ArrayList(); \n int totalErrorsWithoutDefault = 0; \n AttributeValue defClassForLowestTotalErrorsRule = getDefaultRuleClass();\n int lowestTotalErrors = getDefaultRuleError(defClassForLowestTotalErrorsRule);;\n ExtendRule lowestTotalErrorsRule = null;\n // DETERMINE TOTAL ERROR AND DEFAULT CLASS ASSOCIATED WITH EACH RULE \n // REMOVE RULES MATCHING ZERO TRANSACTIONS AND OF ZERO LENGTH\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n rule.setQualityInRuleList(rule.getRuleQuality());\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"Processing rule {0}\", rule.toString());\n }\n\n if (rule.getAntecedentLength() == 0) {\n LOGGER.fine(\"Rule of length 0, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n LOGGER.fine(\"Rule classifying 0 instances correctly, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed \n }\n else\n {\n rule.removeTransactionsCoveredByAntecedent(true); \n totalErrorsWithoutDefault = totalErrorsWithoutDefault + rule.getRuleQuality().getB();\n // since transactions matching the current rule have been removed, the default class and error can change\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n int totalErrorWithDefault = newDefError + totalErrorsWithoutDefault;\n if (totalErrorWithDefault < lowestTotalErrors)\n {\n lowestTotalErrors = totalErrorWithDefault;\n lowestTotalErrorsRule = rule;\n defClassForLowestTotalErrorsRule= newDefClass;\n } \n //ruleErrors.put(rule,totalErrorWithDefault );\n //ruleDefClass.put(rule, newDefClass); \n }\n \n }\n boolean removeTail;\n // now we know the errors associated with each rule not marked for removal, we can perform pruning\n if (lowestTotalErrorsRule == null)\n {\n // no rule improves error over a classifier composed of only default rule\n // remove all rules\n removeTail = true;\n }\n else \n {\n removeTail = false;\n }\n \n data.getDataTable().unhideAllTransactions();\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n ExtendRule rule = it.next();\n if (rulesToRemove.contains(rule) || removeTail)\n {\n it.remove();\n continue;\n }\n if (rule.equals(lowestTotalErrorsRule))\n {\n removeTail = true;\n }\n rule.updateQuality(); \n }\n \n \n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.fine(\"Creating new default rule within narrow rule procedure\");\n }\n \n \n extendedRules.add(createNewDefaultRule(defClassForLowestTotalErrorsRule));\n \n \n LOGGER.info(\"FINISHED Postpruning\");\n }", "private void deleteGroupImage(Group group) {\n trDeleteGroupImage.setUser(user);\n trDeleteGroupImage.setGroup(group);\n try {\n trDeleteGroupImage.execute();\n } catch (NotGroupOwnerException | GroupNotFoundException e) {\n e.printStackTrace();\n }\n }", "void unsetSearchRecurrenceRule();", "void removebranchGroupInU(int i,boolean dead)\n {\n if(dead==true)\n {\n \n if(controlArray[i]==true)\n {\n //branchGroupArray[i].detach();\n \n branchGroupArray[i]=null ;\n controlArray[i]=false ;\n }\n \n \n }\n \n else \n {\n if(controlArray[i]==true)\n {\n branchGroupArray[i].detach();\n //branchGroupArray[i]=null;\n controlArray[i]=false ;\n }\n }\n }", "@DeleteMapping(\"/class-groups/{id}\")\n @Timed\n public ResponseEntity<Void> deleteClassGroup(@PathVariable Long id) {\n log.debug(\"REST request to delete ClassGroup : {}\", id);\n classGroupService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public int getReferentialActionDeleteRule();", "public void removeRuleRef(org.semanticwb.model.RuleRef value);", "public void deleteGroup(int id) {\n\t\tgroupRepo.deleteById(id);\n\t\t\n\t}", "public Rules deleteRule(String id) {\n Iterator<Rules> iterator = rules.iterator();\n while (iterator.hasNext()) {\n Rules rule = iterator.next();\n if (rule.getId().equals(id)) {\n iterator.remove();\n return rule;\n }\n }\n return null;\n }", "void deleteChallenge();", "void deleteExpression(Expression expression);", "@DeleteMapping(\"/payment-groups/{id}\")\n @Timed\n public ResponseEntity<Void> deletePaymentGroup(@PathVariable Long id) {\n log.debug(\"REST request to delete PaymentGroup : {}\", id);\n paymentGroupService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Test\r\n\tpublic void checkDeleteTest() {\n\t\tassertFalse(boardService.getGameRules().checkDelete(board.field[13][13])); \r\n\t}", "public void delete() throws PortalException, SystemException, IOException {\n for (ModelInputGroupDisplayItem gchild:getChildGroups()) {\n gchild.setParent(null);\n }\n for (ModelInputDisplayItem item:getDisplayItems()) {\n ((ModelInputIndividualDisplayItem)item).setGroupId(null);\n }\n populateChildren();\n ModelInputGroupLocalServiceUtil.deleteModelInputGroup(group.getModelInputGroupPK());\n }", "@Override\n\tpublic void deleteUserGroup(Integer id) {\n\t\tString hql = \"update HhGroup h set h.isDel = 1 where h.id = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.executeUpdate();\n\t}", "public void removeFromGroup () throws PPException{\n\t\tif (PPNative.Unit_SetGroup (id, -1) == -1)\n\t\t\tthrow new PPException (\"removeFromGroup -> \"+PPNative.GetError());\n\t}", "@Override\n\tpublic void calculateDeletedGroup(String groupId, String groupName)\n\t\t\tthrows Exception {\n\t\t\n\t}", "@Override\n\tpublic void deleteRoutine(int id) {\n\n\t}", "@Test\n\tpublic void deleteA_withContainer_deleteA() {\n\t\tHenshinResourceSet resourceSet = new HenshinResourceSet(PATH);\n\n\t\t// Load the module:\n\t\tModule module = resourceSet.getModule(\"simpleTgRules.henshin\", false);\n\n\t\tUnit deleteAUnit = module.getUnit(\"deleteA_withContainer\");\n\t\tRule deleteARule = (Rule) deleteAUnit;\n\n\t\tUnit useAwithBUnit = module.getUnit(\"deleteA\");\n\t\tRule useAwithBRule = (Rule) useAwithBUnit;\n\n\t\tConflictAnalysis atomicCoreCPA = new ConflictAnalysis(deleteARule, useAwithBRule);\n\t\tList<ConflictAtom> computedConflictAtoms = atomicCoreCPA.computeConflictAtoms();\n\t\tAssert.assertEquals(1, computedConflictAtoms.size());\n\t\tSystem.out.println(\"number of conflict atoms: \" + computedConflictAtoms.size());\n\t\tfor (ConflictAtom conflictAtom : computedConflictAtoms) {\n\t\t\tSystem.out.println(conflictAtom);\n\t\t}\n\n\t\tAtomCandidateComputation candComp = new AtomCandidateComputation(deleteARule, useAwithBRule);\n\n\t\tList<Span> conflictAtomCandidates = candComp.computeAtomCandidates();\n\t\tSet<MinimalConflictReason> reasons = new HashSet<>();//\n\t\tfor (Span candidate : conflictAtomCandidates) {\n\t\t\tnew MinimalReasonComputation(deleteARule, useAwithBRule).computeMinimalConflictReasons(candidate, reasons);\n\t\t}\n\t\tAssert.assertEquals(1, reasons.size());\n\n\t\tSet<MinimalConflictReason> minimalConflictReasons = reasons;\n\t\tSystem.out.println(\"number of minimal conflict reasons: \" + minimalConflictReasons.size());\n\t\tfor (Span minimalConflictReason : minimalConflictReasons) {\n\t\t\tSystem.out.println(minimalConflictReason);\n\t\t}\n\n\t}", "@Override\n\tpublic void deleteGroupList(Long id) {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"******************** je suis dans DeleteGroup from group's list **********************************************\");\n\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\t\t\tContactGroup g = (ContactGroup) session.get(ContactGroup.class, id);\n\t\t\tsession.delete(g);\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean deletePalvelupisteet();", "int deleteByPrimaryKey(Long id_message_group);", "@VisibleForTesting\n void checkGroupDeletions() {\n final String METHOD = \"checkGroupDeletions\";\n LOGGER.entering(CLASS_NAME, METHOD);\n\n NotesView groupView = null;\n ArrayList<Long> groupsToDelete = new ArrayList<Long>();\n Statement stmt = null;\n try {\n groupView = directoryDatabase.getView(NCCONST.DIRVIEW_VIMGROUPS);\n groupView.refresh();\n stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_READ_ONLY);\n ResultSet rs = stmt.executeQuery(\n \"select groupid,groupname,pseudogroup from \" + groupTableName);\n while (rs.next()) {\n long groupId;\n String groupName;\n boolean pseudoGroup = false;\n try {\n groupId = rs.getLong(1);\n groupName = rs.getString(2);\n pseudoGroup = rs.getBoolean(3);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Failure reading group table data\", e);\n continue;\n }\n\n if (pseudoGroup) {\n LOGGER.log(Level.FINEST,\n \"Skipping deletion check for pseudo-group: {0}\", groupName);\n continue;\n }\n try {\n if (Util.isCanonical(groupName)) {\n NotesName notesGroupName = notesSession.createName(groupName);\n groupName = notesGroupName.getAbbreviated();\n }\n NotesDocument notesGroupDoc = groupView.getDocumentByKey(groupName);\n if (notesGroupDoc == null) {\n // This group no longer exists.\n LOGGER.log(Level.INFO, \"Group no longer exists in source directory\"\n + \" and will be deleted: {0}\", groupName);\n groupsToDelete.add(groupId);\n }\n Util.recycle(notesGroupDoc);\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Error checking deletions for group: \" + groupName, e);\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, \"Error checking deletions\", e);\n } finally {\n Util.recycle(groupView);\n Util.close(stmt);\n }\n\n for (Long groupId : groupsToDelete) {\n try {\n removeGroup(groupId);\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING, \"Error removing group: \" + groupId, e);\n }\n }\n LOGGER.exiting(CLASS_NAME, METHOD);\n }", "public void exit(GroupElement node) {\n exit((AnnotatedBase)node);\n }", "boolean removeDispatchedGroup(Group group);", "public void delIncomingRelations();", "void remove(String group, String name);", "int deleteByPrimaryKey(SeGroupKey key);", "@Test\n public void testAuthorizedRemoveGroup() throws IOException {\n testUserId2 = createTestUser();\n grantUserManagementRights(testUserId2);\n\n String groupId = createTestGroup();\n\n Credentials creds = new UsernamePasswordCredentials(testUserId2, \"testPwd\");\n\n String getUrl = String.format(\"%s/system/userManager/group/%s.json\", baseServerUri, groupId);\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_OK, null); //make sure the profile request returns some data\n\n String postUrl = String.format(\"%s/system/userManager/group/%s.delete.html\", baseServerUri, groupId);\n List<NameValuePair> postParams = new ArrayList<>();\n assertAuthenticatedPostStatus(creds, postUrl, HttpServletResponse.SC_OK, postParams, null);\n\n assertAuthenticatedHttpStatus(creds, getUrl, HttpServletResponse.SC_NOT_FOUND, null); //make sure the profile request returns some data\n }", "@Override\n public void delete() {\n this.parent.handleRemoveSignal(this.deadline.getCourseName(),\n this.deadline.getName(),\n this.deadline.getYear(),\n this.deadline.getMonth(),\n this.deadline.getDay());\n }", "@Override\n\tpublic void delete(Facture y) {\n\t\t\n\t}", "int deleteByExample(ChronicCheckExample example);", "public final void rule__VoidOperation__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2031:1: ( rule__VoidOperation__Group__2__Impl rule__VoidOperation__Group__3 )\n // InternalBSQL2Java.g:2032:2: rule__VoidOperation__Group__2__Impl rule__VoidOperation__Group__3\n {\n pushFollow(FOLLOW_19);\n rule__VoidOperation__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__VoidOperation__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private String deleteStatement() {\n\t\tString time = EsperUtil.timeUnitToEsperTime(departureWaitTime, timeUnit);\n\t\treturn \"on pattern [every tag1=\"+ windowName+ \" ->\"\n\t\t\t\t+ \"(timer:interval(\"+ time+ \")and not \"+ windowName\n\t\t\t\t+ \"(tag.ID=tag1.tag.ID, readerID=tag1.readerID, antennaID=tag1.antennaID))]\"\n\t\t\t\t+ \"delete from \"+ windowName + \" where \"\n\t\t\t\t+ \"tag.ID = tag1.tag.ID AND readerID=tag1.readerID AND antennaID=tag1.antennaID\";\n\t}", "public int removeRule(String key, XQueue in) {\n int id = ruleList.getID(key);\n if (id == 0) // can not remove the default rule\n return -1;\n else if (id > 0) { // for a normal rule\n if (getStatus() == NODE_RUNNING)\n throw(new IllegalStateException(name + \" is in running state\"));\n long[] ruleInfo = ruleList.getMetaData(id);\n if (ruleInfo != null && ruleInfo[RULE_SIZE] > 0) // check integrity\n throw(new IllegalStateException(name+\": \"+key+\" is busy with \"+\n ruleInfo[RULE_SIZE] + \" outstangding msgs\"));\n Map h = (Map) ruleList.remove(id);\n if (h != null) {\n MessageFilter filter = (MessageFilter) h.remove(\"Filter\");\n if (filter != null)\n filter.clear();\n AssetList list = (AssetList) h.remove(\"TaskList\");\n if (list != null)\n cleanupTasks(list);\n h.clear();\n }\n return id;\n }\n else if (cfgList != null && cfgList.containsKey(key)) {\n return super.removeRule(key, in);\n }\n return -1;\n }", "@Test\n public void testDeleteUserWhenOnlyUserInGroup1() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - claim it by user B\n * - delete user B\n * - verify the delete is refused\n * - remove user B from step 1\n * - verify that the removal is refused due to B being the last member in the workflow group and the group\n * having a claimed item\n * - approve it by user B and let it move to step 2\n * - remove user B from step 3\n * - approve it by user C\n * - verify that the item is archived without any actions apart from removing user B\n * - delete user B\n * - verify the delete succeeds\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, REVIEW_ROLE, false);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n\n\n assertDeletionOfEperson(workflowUserB, false);\n\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, FINAL_EDIT_ROLE, true);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, REVIEW_ROLE, true);\n\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }", "public static void deleteExample() throws IOException {\n\n Neo4jUtil neo4jUtil = new Neo4jUtil(\"bolt://localhost:7687\", \"neo4j\", \"neo4jj\" );\n\n Langual.getAllLangualList().forEach(langual -> {\n String cmd = \"MATCH (n:Langual)-[r:lang_desc]-(b:Langdesc) where n.factorCode='\"\n + langual.getFactorCode().trim()\n + \"' delete r\";\n neo4jUtil.myNeo4j(cmd);\n System.out.println(cmd);\n });\n }", "@Override\n\tpublic void delete(FxzfLane entity) {\n\t\t\n\t}", "int deleteByExample(TLinkmanExample example);", "public void destory(){\n \n }", "public final void rule__VoidOperation__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2085:1: ( rule__VoidOperation__Group__4__Impl rule__VoidOperation__Group__5 )\n // InternalBSQL2Java.g:2086:2: rule__VoidOperation__Group__4__Impl rule__VoidOperation__Group__5\n {\n pushFollow(FOLLOW_21);\n rule__VoidOperation__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__VoidOperation__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "int deleteByPrimaryKey(String licFlow);", "@Override\n\tpublic void eliminarControl(Integer id_control) throws Exception {\n\t\tcontrolMapper.eliminarControl(id_control);\n\t}", "public final void rule__VoidOperation__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2139:1: ( rule__VoidOperation__Group__6__Impl rule__VoidOperation__Group__7 )\n // InternalBSQL2Java.g:2140:2: rule__VoidOperation__Group__6__Impl rule__VoidOperation__Group__7\n {\n pushFollow(FOLLOW_22);\n rule__VoidOperation__Group__6__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__VoidOperation__Group__7();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void DropEverything() throws isisicatclient.IcatException_Exception {\n List<Object> allGroupsResults = port.search(sessionId, \"Grouping\");\r\n List tempGroups = allGroupsResults;\r\n List<EntityBaseBean> allGroups = (List<EntityBaseBean>) tempGroups;\r\n port.deleteMany(sessionId, allGroups);\r\n\r\n //Drop all rules\r\n List<Object> allRulesResults = port.search(sessionId, \"Rule\");\r\n List tempRules = allRulesResults;\r\n List<EntityBaseBean> allRules = (List<EntityBaseBean>) tempRules;\r\n port.deleteMany(sessionId, allRules);\r\n\r\n //Drop all public steps\r\n List<Object> allPublicStepResults = port.search(sessionId, \"PublicStep\");\r\n List tempPublicSteps = allPublicStepResults;\r\n List<EntityBaseBean> allPublicSteps = (List<EntityBaseBean>) tempPublicSteps;\r\n port.deleteMany(sessionId, allPublicSteps);\r\n }", "@DeleteMapping(\"/{groupId}\")\n public BaseResponse deleteGroupData(@PathVariable(\"groupId\") Integer groupId) {\n Instant startTime = Instant.now();\n BaseResponse baseResponse = new BaseResponse(ConstantCode.SUCCESS);\n log.warn(\"start deleteGroupData startTime:{}\", startTime.toEpochMilli());\n groupService.removeAllDataByGroupId(groupId);\n log.warn(\"end deleteGroupData useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(baseResponse));\n return baseResponse;\n }", "@Test\n public void testDeleteUserWhenOnlyUserInGroup2() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - delete user B\n * - verify the delete is refused\n * - remove user B from step 1\n * - verify that the removal is refused due to B being the last member in the workflow group and the group\n * having a pool task\n * - approve it by user B and let it move to step 2\n * - remove user B from step 3\n * - delete user B\n * - verify the delete succeeds\n * - Approve it by user C\n * - verify that the item is archived without any actions apart from the approving in step 2\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n assertDeletionOfEperson(workflowUserB, false);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, REVIEW_ROLE, false);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, REVIEW_ROLE, true);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, \"finaleditor\", true);\n\n assertDeletionOfEperson(workflowUserB, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }", "int deleteByExample(RepStuLearningExample example);", "public ITemplateStep removeStep(ITemplateStep stepToRemove);", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "int deleteByExample(ProcurementSourceExample example);", "@Override\n\tpublic synchronized void removeGroup(Group group) throws DataBackendException, UnknownEntityException\n {\n try\n {\n ((TorqueAbstractSecurityEntity)group).delete();\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Removing Group '\" + group.getName() + \"' failed\", e);\n }\n }" ]
[ "0.6881371", "0.67776954", "0.6744463", "0.6744246", "0.65558887", "0.6513221", "0.64975625", "0.619319", "0.5980651", "0.58838165", "0.58386505", "0.5718615", "0.56925505", "0.56813693", "0.5675605", "0.56631875", "0.5659618", "0.5616919", "0.5581415", "0.5566422", "0.5546403", "0.5537829", "0.5534159", "0.5518553", "0.5509574", "0.5506785", "0.55063915", "0.5496627", "0.54939425", "0.5490782", "0.54581136", "0.5452291", "0.5440939", "0.5440265", "0.542489", "0.5423804", "0.542296", "0.54209024", "0.5405626", "0.5401753", "0.5401348", "0.5400793", "0.5385253", "0.5370848", "0.53659296", "0.53627837", "0.53584963", "0.53487664", "0.5342323", "0.5339804", "0.53356063", "0.532194", "0.5320151", "0.5311641", "0.5305281", "0.53009194", "0.52999914", "0.5296236", "0.5282586", "0.5282179", "0.5272", "0.5268535", "0.5268422", "0.5258777", "0.5256032", "0.5255047", "0.5247222", "0.52437335", "0.52406824", "0.5239214", "0.5238624", "0.52382934", "0.5237665", "0.52364075", "0.52296126", "0.5228483", "0.522525", "0.51976156", "0.51930994", "0.51870847", "0.51776445", "0.5172657", "0.51672", "0.5164421", "0.5157633", "0.5153525", "0.5153092", "0.5147262", "0.51439315", "0.5143792", "0.5143439", "0.51408434", "0.51402146", "0.5138451", "0.5137037", "0.5135866", "0.5133989", "0.51311", "0.51300156", "0.5126995" ]
0.6160118
8
add or modify flow control rule
private StringBuilder innAddOrUpdGroupFlowCtrlRule(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result, boolean isAddOp) { // check and get operation info if (!WebParameterUtils.getAUDBaseInfo(req, isAddOp, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } BaseEntity opEntity = (BaseEntity) result.getRetData(); // get group list if (!WebParameterUtils.getStringParamValue(req, WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } final Set<String> groupNameSet = (Set<String>) result.getRetData(); // get and valid qryPriorityId info if (!WebParameterUtils.getQryPriorityIdParameter(req, false, TBaseConstants.META_VALUE_UNDEFINED, TServerConstants.QRY_PRIORITY_MIN_VALUE, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } int qryPriorityId = (int) result.getRetData(); // get flowCtrlEnable's statusId info if (!WebParameterUtils.getFlowCtrlStatusParamValue(req, false, null, sBuffer, result)) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } EnableStatus flowCtrlEnable = (EnableStatus) result.getRetData(); // get and flow control rule info int flowRuleCnt = WebParameterUtils.getAndCheckFlowRules(req, (isAddOp ? TServerConstants.BLANK_FLOWCTRL_RULES : null), sBuffer, result); if (!result.isSuccess()) { WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg()); return sBuffer; } String flowCtrlInfo = (String) result.getRetData(); // add or modify records GroupResCtrlEntity ctrlEntity; List<GroupProcessResult> retInfoList = new ArrayList<>(); for (String groupName : groupNameSet) { ctrlEntity = defMetaDataService.getGroupCtrlConf(groupName); if (ctrlEntity == null) { if (isAddOp) { retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName, qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result)); } else { result.setFailResult(DataOpErrCode.DERR_NOT_EXIST.getCode(), DataOpErrCode.DERR_NOT_EXIST.getDescription()); retInfoList.add(new GroupProcessResult(groupName, "", result)); } } else { retInfoList.add(defMetaDataService.insertGroupCtrlConf(opEntity, groupName, qryPriorityId, flowCtrlEnable, flowRuleCnt, flowCtrlInfo, sBuffer, result)); } } return buildRetInfo(retInfoList, sBuffer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add_rule(Rule rule) throws Exception;", "void setRule(Rule rule);", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "IRuleset add(IRuleset rule);", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "protected void addRule(BinaryRule rule) {\n\t\tif (rule.getPurity() >= mMinimumPurity)\n\t\t\tthis.mBinaryRules.add(rule);\n\t}", "protected void processFlowRule(boolean install, FlowRule rule, String description) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n ops = install ? ops.add(rule) : ops.remove(rule);\n\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.info(description + \" success: \" + ops.toString() + \", \" + rule.toString());\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.info(description + \" error: \" + ops.toString() + \", \" + rule.toString());\n }\n }));\n }", "void checkRule(String rule) throws IOException;", "ControlBlockRule createControlBlockRule();", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "public void setRule(RuleDefinition.Builder rule) {\r\n\t\t\tthis.rule = rule;\r\n\t\t}", "private void installRulesOnFlow()\n\t{\t\t\t\n\t\tVertex sourceVertex = m_graph.getSourceVertex();\n\t\tshort vlanNum = 1;\n\t\tfor(Edge sourceOutEdge :sourceVertex.getOutgoingEdges())\n\t\t{\n\t\t\tif(sourceOutEdge.getFlow()>0)\n\t\t\t{\n\t\t\t\tattachIpAddressToVlan(vlanNum);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_IPV4);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ARP_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_ARP);\n\t\t\t\tinstallRuleToHostSrc(sourceVertex.getName(),vlanNum, sourceOutEdge.getSourcePort());\n\t\t\t\tsourceOutEdge.setIsRuleInstalled();\n\t\t\t\tinstallRulesOnFlowDFS(sourceOutEdge.getTo(),vlanNum);\n\t\t\t\tvlanNum++;\n\t\t\t}\n\t\t}\t\n\t}", "private void parseRule(Node node) {\r\n if (switchTest) return;\r\n parse(node.right());\r\n }", "public void setRule(java.lang.String rule) {\n this.rule = rule;\n }", "FlowRule build();", "public void setRule(int r)\n { \n rule = r;\n repaint();\n }", "public void setRule(final String rule) {\r\n this.rule = rule;\r\n }", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public FlowRule(Flow flow, int seq) {\r\n super(flow, seq);\r\n }", "CaseBlockRule createCaseBlockRule();", "private PrismRule addRule(PrismRule lastRule, PrismRule newRule) {\n\n if (lastRule == null) {\n m_rules = newRule;\n } else {\n lastRule.m_next = newRule;\n }\n return newRule;\n }", "CaseStmtRule createCaseStmtRule();", "private void setCurrentRule(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][1].equals(\"-\")){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t}\n\t}\n}", "public void addRule(final Rule rule)\n {\n if (rule == null)\n {\n throw new NullPointerException(\"rule MUST NOT be null\");\n }\n\n this.rules.add(rule);\n }", "StatementRule createStatementRule();", "AssignmentRule createAssignmentRule();", "private void AddScenarioNewRule(HttpServletRequest request, HttpServletResponse response) throws NumberFormatException {\n String Rule = request.getParameter(\"rule\");\n int ScenarioIndex = Integer.parseInt(request.getParameter(\"index\"));\n XMLTree.getInstance().AddNewRuleToScenario(ScenarioIndex, Rule);\n }", "IRuleset add(IRuleset...rules);", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "private Test addTest(PrismRule rule, Test lastTest, Test newTest) {\n\n if (rule.m_test == null) {\n rule.m_test = newTest;\n } else {\n lastTest.m_next = newTest;\n }\n return newTest;\n }", "public MethodBuilder rule(String rule) {\n\t\tthis.rule = rule;\n\t\treturn this;\n\t}", "public void addRule(Rule r) {\r\n\t\tIterator<Rule> it = rules.iterator();\r\n\t\t\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tRule rule = it.next();\r\n\t\t\tif(rule.getRuleName().equals(r.getRuleName()))\r\n\t\t\t\tit.remove();\r\n\t\t}\r\n\t\trules.add(r);\r\n\t\tnew BuildRules(r, this).calculate();;\r\n\t}", "public void start(int rule) {\n\n if (rule > 255 || rule < 0) {\n throw new IllegalArgumentException(\"Ruleset must be between 0 and 255!\");\n }\n\n reset();\n ruleset = intToBinaryReverse(rule);\n draw();\n }", "public void increaseFlow(int inc) {\n\t\tthis.flow += inc;\n\t\tif(this.flow < 0 || this.flow > this.capacity)\n\t\t\tthrow new RuntimeException(\"Edge capacity exceeded: \"+this.flow);\n\t}", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "public interface FlowRule extends PiTranslatable {\n\n IndexTableId DEFAULT_TABLE = IndexTableId.of(0);\n int MAX_TIMEOUT = 60;\n int MIN_PRIORITY = 0;\n int MAX_PRIORITY = 65535;\n\n /**\n * Reason for flow parameter received from switches.\n * Used to check reason parameter in flows.\n */\n enum FlowRemoveReason {\n IDLE_TIMEOUT,\n HARD_TIMEOUT,\n DELETE,\n GROUP_DELETE,\n METER_DELETE,\n EVICTION,\n NO_REASON;\n\n /**\n * Covert short to enum.\n * @return reason in enum\n * @param reason remove reason in integer\n */\n public static FlowRemoveReason parseShort(short reason) {\n switch (reason) {\n case -1 :\n return NO_REASON;\n case 0:\n return IDLE_TIMEOUT;\n case 1:\n return HARD_TIMEOUT;\n case 2 :\n return DELETE;\n case 3:\n return GROUP_DELETE;\n case 4:\n return METER_DELETE;\n case 5:\n return EVICTION;\n default :\n return NO_REASON;\n }\n }\n }\n\n /**\n * Returns the ID of this flow.\n *\n * @return the flow ID\n */\n FlowId id();\n\n /**\n * Returns the application id of this flow.\n *\n * @return an applicationId\n */\n short appId();\n\n /**\n * Returns the group id of this flow.\n *\n * @return an groupId\n */\n GroupId groupId();\n\n /**\n * Returns the flow rule priority given in natural order; higher numbers\n * mean higher priorities.\n *\n * @return flow rule priority\n */\n int priority();\n\n /**\n * Returns the identity of the device where this rule applies.\n *\n * @return device identifier\n */\n DeviceId deviceId();\n\n /**\n * Returns the traffic selector that identifies what traffic this rule\n * should apply to.\n *\n * @return traffic selector\n */\n TrafficSelector selector();\n\n /**\n * Returns the traffic treatment that applies to selected traffic.\n *\n * @return traffic treatment\n */\n TrafficTreatment treatment();\n\n /**\n * Returns the timeout for this flow requested by an application.\n *\n * @return integer value of the timeout\n */\n int timeout();\n\n /**\n * Returns the hard timeout for this flow requested by an application.\n * This parameter configure switch's flow hard timeout.\n * In case of controller-switch connection lost, this variable can be useful.\n * @return integer value of the hard Timeout\n */\n int hardTimeout();\n\n /**\n * Returns the reason for the flow received from switches.\n *\n * @return FlowRemoveReason value of reason\n */\n FlowRemoveReason reason();\n\n /**\n * Returns whether the flow is permanent i.e. does not time out.\n *\n * @return true if the flow is permanent, otherwise false\n */\n boolean isPermanent();\n\n /**\n * Returns the table id for this rule.\n *\n * @return an integer.\n * @deprecated in Loon release (version 1.11.0). Use {@link #table()} instead.\n */\n @Deprecated\n int tableId();\n\n /**\n * Returns the table identifier for this rule.\n *\n * @return a table identifier.\n */\n TableId table();\n\n /**\n * {@inheritDoc}\n *\n * Equality for flow rules only considers 'match equality'. This means that\n * two flow rules with the same match conditions will be equal, regardless\n * of the treatment or other characteristics of the flow.\n *\n * @param obj the reference object with which to compare.\n * @return {@code true} if this object is the same as the obj\n * argument; {@code false} otherwise.\n */\n boolean equals(Object obj);\n\n /**\n * Returns whether this flow rule is an exact match to the flow rule given\n * in the argument.\n * <p>\n * Exact match means that deviceId, priority, selector,\n * tableId, flowId and treatment are equal. Note that this differs from\n * the notion of object equality for flow rules, which does not consider the\n * flowId or treatment when testing equality.\n * </p>\n *\n * @param rule other rule to match against\n * @return true if the rules are an exact match, otherwise false\n */\n boolean exactMatch(FlowRule rule);\n\n /**\n * A flowrule builder.\n */\n interface Builder {\n\n /**\n * Assigns a cookie value to this flowrule. Mutually exclusive with the\n * fromApp method. This method is intended to take a cookie value from\n * the dataplane and not from the application.\n *\n * @param cookie a long value\n * @return this\n */\n Builder withCookie(long cookie);\n\n /**\n * Assigns the application that built this flow rule to this object.\n * The short value of the appId will be used as a basis for the\n * cookie value computation. It is expected that application use this\n * call to set their application id.\n *\n * @param appId an application id\n * @return this\n */\n Builder fromApp(ApplicationId appId);\n\n /**\n * Sets the priority for this flow rule.\n *\n * @param priority an integer\n * @return this\n */\n Builder withPriority(int priority);\n\n /**\n * Sets the deviceId for this flow rule.\n *\n * @param deviceId a device id\n * @return this\n */\n Builder forDevice(DeviceId deviceId);\n\n /**\n * Sets the table id for this flow rule, when the identifier is of type {@link TableId.Type#INDEX}. Default\n * value is 0.\n * <p>\n * <em>Important:</em> This method is left here for backward compatibility with applications that specifies\n * table identifiers using integers, e.g. as in OpenFlow. Currently there is no plan to deprecate this method,\n * however, new applications should favor using {@link #forTable(TableId)}.\n *\n * @param tableId an integer\n * @return this\n */\n Builder forTable(int tableId);\n\n /**\n * Sets the table identifier for this flow rule.\n * Default identifier is of type {@link TableId.Type#INDEX} and value 0.\n *\n * @param tableId table identifier\n * @return this\n */\n Builder forTable(TableId tableId);\n\n /**\n * Sets the selector (or match field) for this flow rule.\n *\n * @param selector a traffic selector\n * @return this\n */\n Builder withSelector(TrafficSelector selector);\n\n /**\n * Sets the traffic treatment for this flow rule.\n *\n * @param treatment a traffic treatment\n * @return this\n */\n Builder withTreatment(TrafficTreatment treatment);\n\n /**\n * Makes this rule permanent on the dataplane.\n *\n * @return this\n */\n Builder makePermanent();\n\n /**\n * Makes this rule temporary and timeout after the specified amount\n * of time.\n *\n * @param timeout an integer\n * @return this\n */\n Builder makeTemporary(int timeout);\n\n /**\n * Sets the idle timeout parameter in flow table.\n *\n * Will automatically make it permanent or temporary if the timeout is 0 or not, respectively.\n * @param timeout an integer\n * @return this\n */\n default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }\n\n /**\n * Sets hard timeout parameter in flow table.\n * @param timeout an integer\n * @return this\n */\n Builder withHardTimeout(int timeout);\n\n /**\n * Sets reason parameter received from switches .\n * @param reason a short\n * @return this\n */\n Builder withReason(FlowRemoveReason reason);\n\n /**\n * Builds a flow rule object.\n *\n * @return a flow rule.\n */\n FlowRule build();\n\n }\n}", "public interface EntityOrAssetRule extends Rule {\n /**\n * Return the component id of the Entity or Asset that this rule should\n * belong to.\n * @return The component id.\n */\n public String getComponentId();\n \n /**\n * Given a mission objective and a system, find the corresponding component\n * to this rule, and add this rule to that component.\n * @param objective The mission objective.\n * @param system The system containing the component for this rule.\n */\n public void addToComponent(String objective, OpSystem system);\n}", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "private void setFlow(Flow flow) throws IllegalArgumentException {\r\n\t\tAssert.hasText(getId(), \"The id of the state should be set before adding the state to a flow\");\r\n\t\tAssert.notNull(flow, \"The owning flow is required\");\r\n\t\tthis.flow = flow;\r\n\t\tflow.add(this);\r\n\t}", "private void addBeforeRule(AroundProcesser<AggMaschineVO> processer)\r\n {\n\t\t\r\n\t processer.addBeforeRule(new BDPKLockSuperVORule());\r\n\t processer.addBeforeRule(new BizLockRule());\r\n\t processer.addBeforeRule(new VersionValidateRule());\r\n\t processer.addBeforeRule(new BDReferenceCheckerRule());\r\n\t processer.addBeforeRule(new FireEventRule(\"1005\"));\r\n\t processer.addBeforeRule(new NotifyVersionChangeWhenDataDeletedRule());\r\n }", "@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }", "public boolean addRule( Rule r ) {\n\t\tif( !validRule(r) ) {\n\t\t\treturn false;\n\t\t}\n\t\trules.add(r);\n\t\treturn true;\n\t}", "public StringBuilder adminSetGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, true);\n }", "@PUT(\"pushrules/global/{kind}/{ruleId}\")\n Call<Void> addRule(@Path(\"kind\") String kind, @Path(\"ruleId\") String ruleId, @Body JsonElement rule);", "public FlowRule() {\r\n }", "public interface Rule {\n\n /**\n * Process this security event and detects whether this represents a security breach from the perspective of this rule\n * \n * @param event\n * event to process\n * @return security breach - either a breach or not (could be delayed)\n */\n SecurityBreach isSecurityBreach(SecurityEvent event);\n\n /**\n * Detects whether this rule is applicable in the in-passed security mode. Each rule guarantees to return the very same value of this method at\n * runtime. E.g. if this method returns true for an instance, it is guaranteed it will always return true within the lifecycle of this object\n * \n * @param securityMode\n * security mode to test applicability of this rule against\n * @return true if so, false otherwise\n */\n boolean isApplicable(SecurityMode securityMode);\n\n /**\n * Detects whether this rule is enabled or not\n * \n * @return true if so, false otherwise\n */\n boolean isEnabled();\n\n /**\n * Get human readable description of this rule. It should be a unique string compared to all other rules\n * \n * @return unique description of this rule\n */\n String getDescription();\n\n /**\n * Gets Unique ID of this Rule\n * \n * @return integer identification of this rule\n */\n int getId();\n\n /**\n * Update this rule based on the in-passed rule detail (e.g. whether it is enabled, etc)\n * \n * @param ruleDetail\n * rule detail to use to update this rule\n */\n void updateFrom(RuleDetail ruleDetail);\n}", "public void addRules(int index, ContextRule value) {\n value.getClass();\n ensureRulesIsMutable();\n this.rules_.add(index, value);\n }", "public void create(Rule event);", "private void enterRules()\n {\n String ruleString = ruleTextField.getText();\n transition.buildRulesFromString(ruleString);\n ruleString = transition.buildStringFromRules();\n ruleTextField.setText(ruleString);\n optionsPanel.getWorkspacePanel().requestFocusInWindow();\n optionsPanel.getWorkspacePanel().repaint();\n // Daniel didn't like this automatic switching any more.\n // optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n }", "boolean exactMatch(FlowRule rule);", "public void setFlow(int flow) {\r\n\r\n this.flow = flow;\r\n }", "IfStmtRule createIfStmtRule();", "CmdRule createCmdRule();", "public void addRules(ContextRule value) {\n value.getClass();\n ensureRulesIsMutable();\n this.rules_.add(value);\n }", "public void addRuleData(RuleData rule) throws ResultException {\n \tRuleData existing = ruleData.get(rule.getObjectName());\n \t\n \tif (existing == null){\n \t\truleData.put(rule.getObjectName(), rule);\n \t}\n \telse{\n \t\tResultException ex = new ResultException();\n \t\tex.addError(\"The following rules have a name clash:\\n\\n\" + existing.toOIF() + \"\\n\" + rule.toOIF());\n \t\tthrow(ex);\n \t}\n }", "@Test\n public void createRule() {\n // BEGIN: com.azure.messaging.servicebus.servicebusrulemanagerclient.createRule\n RuleFilter trueRuleFilter = new TrueRuleFilter();\n CreateRuleOptions options = new CreateRuleOptions(trueRuleFilter);\n ruleManager.createRule(\"new-rule\", options);\n // END: com.azure.messaging.servicebus.servicebusrulemanagerclient.createRule\n\n ruleManager.close();\n }", "private void addAndEnterEpsilonRule()\n {\n ruleTextField.setText(ruleTextField.getText() + \"\\u025B\");\n enterRules();\n }", "public int replaceRule(String key, Map ph, XQueue in) {\n int id = ruleList.getID(key);\n if (id == 0) // can not replace the default rule\n return -1;\n else if (id > 0) { // for a normal rule\n if (ph == null || ph.size() <= 0)\n throw(new IllegalArgumentException(\"Empty property for rule\"));\n if (!key.equals((String) ph.get(\"Name\"))) {\n new Event(Event.ERR, name + \": name not match for rule \" + key +\n \": \" + (String) ph.get(\"Name\")).send();\n return -1;\n }\n if (getStatus() == NODE_RUNNING)\n throw(new IllegalStateException(name + \" is in running state\"));\n long tm = System.currentTimeMillis();\n long[] meta = new long[RULE_TIME+1];\n long[] ruleInfo = ruleList.getMetaData(id);\n Map rule = initRuleset(tm, ph, meta);\n if (rule != null && rule.containsKey(\"Name\")) {\n StringBuffer strBuf = ((debug & DEBUG_DIFF) <= 0) ? null :\n new StringBuffer();\n Map h = (Map) ruleList.set(id, rule);\n if (h != null) {\n MessageFilter filter = (MessageFilter) h.remove(\"Filter\");\n if (filter != null)\n filter.clear();\n AssetList list = (AssetList) h.remove(\"TaskList\");\n if (list != null)\n cleanupTasks(list);\n h.clear();\n }\n tm = ruleInfo[RULE_PID];\n for (int i=0; i<RULE_TIME; i++) { // update metadata\n switch (i) {\n case RULE_SIZE:\n break;\n case RULE_COUNT:\n if (tm == meta[RULE_PID]) // same rule type\n break;\n default:\n ruleInfo[i] = meta[i];\n }\n if ((debug & DEBUG_DIFF) > 0)\n strBuf.append(\" \" + ruleInfo[i]);\n }\n if ((debug & DEBUG_DIFF) > 0)\n new Event(Event.DEBUG, name + \"/\" + key + \" ruleInfo:\" +\n strBuf).send();\n return id;\n }\n else\n new Event(Event.ERR, name + \" failed to init rule \"+key).send();\n }\n else if (cfgList != null && cfgList.containsKey(key)) {\n return super.replaceRule(key, ph, in);\n }\n return -1;\n }", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void action(Runnable action) {\n if (this.condition == null) {\n throw new APSValidationException( \"Cannot execute action, no condition has been provided!\" );\n }\n if (this.condition.met()) {\n runAction( action );\n }\n else {\n this.todo.add(action);\n }\n }", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "public void addRule(Character identifier, String definition){\n if(isNonterminal(identifier)){\n String s = identifier+\"\";\n identifier = s.charAt(0);\n rules.put(identifier, definition.toLowerCase());\n }\n else{\n throw new RuntimeException();\n }\n }", "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "WhileLoopRule createWhileLoopRule();", "private void generateRules(TreeNode tn)\n{\n if (!tn.isLeaf()) {\n generateRules(tn.getPassTree());\n generateRules(tn.getFailTree());\n return;\n }\n RuleInstance ri = tn.getRules().get(0);\n if (ri.getBaseRule() != null) return;\t// rule already in set\n\n Condition c = tn.getCondition();\n List<UpodCondition> cset = new ArrayList<UpodCondition>();\n if (c != null) {\n UpodCondition cond = c.getConditionTest(for_program);\n if (cond != null) cset.add(cond);\n }\n for (TreeNode pn = tn.getParent(); pn != null; pn = pn.getParent()) {\n Condition pc = pn.getCondition();\n if (pc == null) continue;\n UpodCondition pcond = pc.getConditionTest(for_program);\n if (pcond != null) cset.add(pcond);\n }\n\n UpodCondition rcond = null;\n if (cset.isEmpty()) return;\n if (cset.size() == 1) rcond = cset.get(0);\n else {\n UpodCondition [] conds = new UpodCondition[cset.size()];\n conds = cset.toArray(conds);\n rcond = new BasisConditionLogical.And(conds);\n }\n List<UpodAction> racts = ri.getActions();\n if (rcond == null || racts == null) return;\n\n BasisRule rule = new BasisRule(rcond,racts,null,100);\n for_program.addRule(rule);\n}", "@PathParam(\"rule\")\n public void setRule(@NotNull(message = \"rule name can't be NULL\")\n final String rle) {\n this.rule = rle;\n }", "@BusSignalHandler(iface = ConstantsTest.INTERFACE_NAME, signal = \"updateRule\")\n public void updateRule(String newRule) {\n Message msg = busHandler.obtainMessage(BusHandler.UPDATE_RULE);\n msg.obj = newRule;\n busHandler.sendMessage(msg);\n }", "public LogicalRule(ExecutionPolicy...rules)\n\t\t{\n\t\t\tthis.rules = rules;\n\t\t}", "public interface AlternateRule {\n\n /**\n * Returns true if the given activity and user preferences indicates that this rule\n * is matched, and therefore that the modifications dictated by this rule should be applied\n * @param userInterface\n * @param prefs\n * @return\n */\n boolean condition(UserInterface userInterface, UserPreferences prefs);\n\n /**\n * Returns a new user interface that should be used if <code>condition</code> evaluated\n * to true.\n * @param userInterface\n * @param prefs\n * @return\n */\n UserInterface modify(UserInterface userInterface, UserPreferences prefs);\n\n}", "public interface Rule {\n \n /**\n * Determine if a rule meets all of its conditions.\n * @param OpSystem The overall system for this rule.\n * @return true if the rule meets its condition.\n */\n public boolean meetsCondition(OpSystem system);\n}", "DefaultCaseBlockRule createDefaultCaseBlockRule();", "public void setRules(int index, ContextRule value) {\n value.getClass();\n ensureRulesIsMutable();\n this.rules_.set(index, value);\n }", "Rule getRule();", "void updateFrom(RuleDetail ruleDetail);", "@Override\n public void enterEveryRule(final ParserRuleContext ctx) {\n }", "@Override\n @ResponseStatus(HttpStatus.CREATED)\n public ResponseEntity<Void> createRule(@Valid Rule rule) {\n\n apiKeyId = (String) servletRequest.getAttribute(\"Application\");\n\n ApiKeyEntity apiKey = apiKeyRepository.findById(apiKeyId)\n .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));\n\n //check if rule with this type already exists\n try {\n Optional<RuleEntity> ruleInRep = ruleRepository.findBy_if_TypeAndApiKeyEntityValue(rule.getIf().getType(), apiKeyId);\n if(ruleInRep.isPresent()){\n throw new ResponseStatusException(HttpStatus.CONFLICT, \"Rule with given type already exists\");\n }\n } catch (NullPointerException e) {\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST);\n }\n\n try {\n RuleEntity newRuleEntity = toRuleEntity(rule);\n newRuleEntity.setApiKeyEntity(apiKey);\n ruleRepository.save(newRuleEntity);\n\n URI location = ServletUriComponentsBuilder\n .fromCurrentRequest().path(\"/{id}\")\n .buildAndExpand(newRuleEntity.getId()).toUri();\n\n return ResponseEntity.created(location).build();\n } catch (ApiException e) {\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.toString());\n }\n }", "public void substitute(Rule r){\n \n\tr.addIndex(this.originalPosition);\n\t \n\tthis.cleanUp();\n this.n.cleanUp();\n \n NonTerminal nt = new NonTerminal(r);\n nt.originalPosition = this.originalPosition;\n this.p.insertAfter(nt);\n if (!p.check())\n p.n.check();\n }", "public BPState execute(X86CondJmpInstruction ins, BPPath path, List<BPPath> pathList, X86TransitionRule rule) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public static void main(String[] args) throws ConfigurationException,\n RuleExecutionSetCreateException, IOException,\n RuleSessionTypeUnsupportedException, RuleSessionCreateException,\n RuleExecutionSetNotFoundException, InvalidRuleSessionException,\n ClassNotFoundException, RuleExecutionSetRegisterException {\n\n String ruleEngineServiceUri = UriConstants.RULE_ENGINE_SERVICE_URI;\n\n Class.forName(UriConstants.RULE_SERVICE_PROVIDER_CLASS_NAME);\n\n RuleServiceProvider serviceProvider = RuleServiceProviderManager\n .getRuleServiceProvider(ruleEngineServiceUri);\n\n RuleAdministrator ruleAdministrator = serviceProvider\n .getRuleAdministrator();\n\n RuleEngineLog.debug(ruleAdministrator.toString());\n\n Map params = null;\n // InputStream stream = null;\n\n String bindUri = null;\n\n LogisticsRule logisticsRule = buildLogisticsRule();\n\n FlavorRule flavorRule = buildFlavorRule();\n\n RuleSet ruleSet = new RuleSet(\"multi-logisitic--ruleset\");\n\n ruleSet.addRule(logisticsRule);\n ruleSet.addRule(flavorRule);\n // ruleSet.add(logisticsRule1);\n\n RuleExecutionSet ruleExecutionSet = ruleAdministrator\n .getLocalRuleExecutionSetProvider(params).createRuleExecutionSet(\n ruleSet, null);\n\n bindUri = ruleExecutionSet.getName();\n\n ruleAdministrator.registerRuleExecutionSet(bindUri, ruleExecutionSet, null);\n\n RuleEngineLog.debug(ruleExecutionSet);\n //\n RuleRuntime ruleRunTime = serviceProvider.getRuleRuntime();\n\n StatelessRuleSession srs = (StatelessRuleSession) ruleRunTime\n .createRuleSession(bindUri, params, RuleRuntime.STATELESS_SESSION_TYPE);\n\n List inputList = new LinkedList();\n\n String productReview1 = \"一直在你们家购买,感觉奶粉是保真的。就是发货速度稍微再快一些就好了。先谢谢了\";\n\n String productReview2 = \"说什么原装进口的 但是和我原本进口的奶粉还是有区别 奶很甜 宝宝吃了这个奶粉后胃口很差 都不爱吃其他东西 本来每天定时有吃两顿饭的 现在吃了这个奶粉后 饭也不要吃了 现在一个没有开 另一罐开了放着没有喝\";\n\n ProductReview pr1 = new ProductReview(\"uid1\", productReview1);\n\n ProductReview pr2 = new ProductReview(\"uid2\", productReview2);\n\n inputList.add(pr1);\n inputList.add(pr2);\n\n // inputList.add(new String(\"Bar\"));\n // inputList.add(new Integer(5));\n // inputList.add(new Float(6));\n List resultList = srs.executeRules(inputList);\n\n // release the session\n srs.release();\n\n // System.out.println(\"executeRules: \" + resultList);\n for (Object o : resultList) {\n System.out.println(o);\n }\n\n }", "public interface PlanEndRule {\r\n\tpublic abstract boolean continuePlan(Vector<Interupt> interupt, PlanHelperInterface planHelperInterface);\r\n\r\n\tpublic abstract String getHumanReadableDescription();\r\n}", "@Override\n\tpublic void reportRuleInvocation(Rule rule, Triple triple, DataObject dataObject) {\n\t\t\n\t}", "public StringBuilder adminUpdGroupFlowCtrlRule(HttpServletRequest req,\n StringBuilder sBuffer,\n ProcessResult result) {\n return innAddOrUpdGroupFlowCtrlRule(req, sBuffer, result, false);\n }", "@Test\n public void updateUnknownRule() throws Exception {\n RuleEntity rule = new RuleEntity();\n rule.setPackageName(\"junitPackage\");\n rule.setStatus(Status.INACTIVE);\n rule.setRuleName(\"junitRuleName\");\n rule.setRule(Base64.getEncoder().encodeToString(\"jUnit Rule Contents\".getBytes()));\n /*\n * update it\n */\n rule.setRule(Base64.getEncoder().encodeToString(\"jUnit UPDATED Rule Contents\".getBytes()));\n HttpEntity<RuleEntity> entity = new HttpEntity<RuleEntity>(rule);\n ResponseEntity<TranslatedExceptionMessage> updateResponse = template.exchange(\n base.toString() + \"/1234\",\n HttpMethod.PUT,\n entity,\n TranslatedExceptionMessage.class, rule);\n\n Assert.assertEquals(\"checking for 404\", NOT_FOUND, updateResponse.getStatusCode());\n Assert.assertEquals(\"checking for not found message\",\n \"rule 1234 not found in database on update\",\n updateResponse.getBody().getMessage());\n }", "public void inputTask(Task task) {\n \tif (task != null) {\n if (task.aboveThreshold()) { // set a threshold?\n report(task.getSentence(), true); // report input\n newTasks.add(task); // wait to be processed in the next cycle\n }\n }\n }", "@Override\r\npublic void initRules(){\r\n\t\r\n}", "void addRuleContext(RuleContextContainer rccContext, ITrigger tTrigger)\r\n throws StorageProviderException;", "public void logic(){\r\n\r\n\t}", "protected void processTemporalRule(){\n RuleThread currntThrd;\n Thread currntThrdParent; // the parent of the current thread;\n int currntOperatingMode;\n int currntThrdPriority ;\n\n if( temporalRuleQueue.getHead()!= null){\n\n //If the rule thread is the top level, trigger the rule.\n currntThrd=temporalRuleQueue.getHead();\n while(currntThrd!= null){\n currntThrdPriority = currntThrd.getPriority ();\n currntThrdParent = currntThrd.getParent();\n\n if (currntThrd.getOperatingMode() == RuleOperatingMode.READY\n && !(currntThrd.getParent() == applThrd ||\n currntThrd.getParent().getClass().getName().equals(\"EventDispatchThread\")||\n currntThrd.getParent().getName ().equals (Constant.LEDReceiverThreadName)\n )){\n if(ruleSchedulerDebug)\n\t\t \t\t System.out.println(\"Changing mode of \"+currntThrd.getName()+\"from READY to EXE\");\n\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\t\t\t\t currntThrd.setScheduler(this);\n currntThrd.start();\n int rulePriority = 0;\n currntThrdParent = currntThrd;\n if(currntThrdParent instanceof RuleThread){\n rulePriority = currntThrd.getRulePriority();\n }\n currntThrd = currntThrd.next;\n while(currntThrd != null && currntThrd instanceof RuleThread &&\n currntThrd.getRulePriority() == rulePriority\n \t\t\t\t\t\t\t && currntThrd.getParent() == currntThrdParent ){\n if(ruleSchedulerDebug)\n \t\t\t System.out.print(\" start child thread =>\");\n\n currntThrd.print();\n currntThrd.setScheduler(this);\n if(\tcurrntThrd.getOperatingMode()== RuleOperatingMode.READY ){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n currntThrd.start();\n }\n \t\t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n // case 1.2:\n else if (currntThrd != null &&\tcurrntThrd.getOperatingMode() == RuleOperatingMode.EXE){\n \t\t\t\tcurrntThrd = currntThrd.next;\n\n }\n // case 1.3:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.WAIT){\n\t\t\t\t if(currntThrd.next == null){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\n// ;\n // All its childs has been completed.\n // This currntThread's operating mode will be changed to FINISHED.\n }\n\t\t\t\t\telse{\n // check whether its neighbor is its child\n\t\t\t\t\t\tif(currntThrd.next.getParent() == currntThrdParent){\n if(ruleSchedulerDebug){\n\t \t\t\t\t\t System.out.println(\"\\n\"+currntThrd.getName()+\" call childRecurse \"+currntThrd.next.getName());\n\t\t \t\t\t\t\tcurrntThrd.print();\n }\n\n childRecurse(currntThrd, temporalRuleQueue);\n }\n }\n currntThrd = currntThrd.next;\n }\n // case 1.4:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.FINISHED){\n if(ruleSchedulerDebug){\n\t\t\t\t\t System.out.println(\"delete \"+currntThrd.getName() +\" rule thread from rule queue.\");\n\t\t\t\t\t\tcurrntThrd.print();\n }\n processRuleList.deleteRuleThread(currntThrd,temporalRuleQueue);\n \tcurrntThrd = currntThrd.next;\n }\n else{\n \t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n }\n }", "public void testAllowDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "protected void update_flow(Long eID, String direction, int restCap) {\n\t\tint currentFlow = f(eID);\n\t\tif (direction == \"+\") {\n\t\t\tf_set(eID, currentFlow + restCap);\n\t\t} else if (direction == \"-\") {\n\t\t\tf_set(eID, currentFlow - restCap);\n\t\t} else {\n\t\t\tSystem.err.println(\"ALERT! NULL_DIRECTION in AugPath\");\n\t\t}\n\t}", "public void rulesOnEnter() {\n try {\n String ruleString = ruleInputField.getText().toUpperCase();\n gOL.setRuleString(ruleString);\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n ruleInputField.setText(\"\");\n\n //Checks if the input matches any predefined rules. Clears the selection if not.\n if(!chooseRulesList.contains(gOL.getRuleName())){\n chooseRulesBox.getSelectionModel().clearSelection();\n }else{\n chooseRulesBox.getSelectionModel().select(gOL.getRuleName());\n }\n\n //Produces a warning if a RulesFormatException is thrown\n } catch (RulesFormatException rfe) {\n PopUpAlerts.ruleAlert2();\n }\n }", "public interface Rule {\r\n\r\n\tString getTargetedPropertyName();\r\n\tboolean hasFinished();\r\n\tObject nextValue();\r\n\tObject[] getValues();\r\n\tpublic void setValues(Object[] values);\r\n\t\r\n}", "public void addRule(String rulename, Rule rule, SpriteGroup[] obedients)\r\n\t{\r\n\t\tmyRuleBook.put(rulename, rule);\r\n\t\tmyRuleMap.put(rule, obedients);\r\n\t}", "public RETEReasoner addRules(List rules) {\n List combined = new List( this.rules );\n combined.addAll( rules );\n setRules( combined );\n return this;\n }", "private void applyOrSaveRules() {\n final boolean enabled = Api.isEnabled(this);\n final Context ctx = getApplicationContext();\n\n Api.generateRules(ctx, Api.getApps(ctx, null), true);\n\n if (!enabled) {\n Api.setEnabled(ctx, false, true);\n setDirty(false);\n return;\n }\n Api.updateNotification(Api.isEnabled(getApplicationContext()), getApplicationContext());\n new RunApply().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "public final void entryRuleOpAdd() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:830:1: ( ruleOpAdd EOF )\r\n // InternalDroneScript.g:831:1: ruleOpAdd EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAddRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleOpAdd();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAddRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }" ]
[ "0.698925", "0.6631194", "0.63761157", "0.6324022", "0.6163767", "0.5989485", "0.5898685", "0.58918726", "0.5841771", "0.58412117", "0.5782621", "0.57420486", "0.5720321", "0.570344", "0.5674527", "0.5669205", "0.5665805", "0.5656831", "0.5656831", "0.5656831", "0.56481725", "0.56313497", "0.5629207", "0.56269133", "0.5520589", "0.55112964", "0.5494335", "0.54876715", "0.54575247", "0.5424694", "0.5423622", "0.5390991", "0.5351437", "0.53463256", "0.5336271", "0.5332661", "0.5311501", "0.5298164", "0.5295578", "0.5285284", "0.5276833", "0.5269818", "0.5263551", "0.5262512", "0.52589035", "0.5241995", "0.52245295", "0.52142715", "0.51819825", "0.5179301", "0.5164271", "0.51560104", "0.5144885", "0.51333016", "0.51294965", "0.51259106", "0.51160026", "0.51156723", "0.5112867", "0.51090044", "0.51012766", "0.5101013", "0.50859284", "0.5069605", "0.50529313", "0.50499725", "0.50406796", "0.5017232", "0.5017098", "0.49909297", "0.49896187", "0.49836922", "0.49765867", "0.4973764", "0.49709463", "0.4969338", "0.4965653", "0.49578926", "0.49549374", "0.49517915", "0.49107176", "0.48993582", "0.4896866", "0.48838133", "0.48774186", "0.4874321", "0.48686364", "0.48641703", "0.48617917", "0.48414397", "0.48305747", "0.4827635", "0.48193198", "0.48180735", "0.48160157", "0.48155728", "0.48130035", "0.48122567", "0.48119035", "0.48000905" ]
0.57842064
10
Initialize all the fields via constructor performing deep copy.
public Person(String fn, String ln, Set<String> pns) { this.firstName = fn; this.lastName = ln; Collection<E> oldSet = pns; TreeSet<E> tempPhone = new TreeSet<E>(pns); this.phoneNumbers = tempPhone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyConstructor(){\n\t}", "private ImmutablePerson(ImmutablePerson other) {\n firstName = other.firstName;\n middleName = other.middleName;\n lastName = other.lastName;\n nickNames = new ArrayList<>(other.nickNames);\n }", "private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public void _shallowCopyInternal(SL_Obj fromObjArg) {\n SATableReadCapabilityAttributesExtension fromObj = (SATableReadCapabilityAttributesExtension)fromObjArg;\n super._shallowCopyInternal((SL_Obj)fromObj);\n\n setPreSQL(fromObj.getPreSQL());\n\n setPostSQL(fromObj.getPostSQL());\n\n setRowOffSet(fromObj.getRowOffSet());\n\n setRowLimit(fromObj.getRowLimit());\n }", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "private TigerData() {\n initFields();\n }", "private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.transferId)) {\n this.transferId = data().deepCopy(fields()[0].schema(), other.transferId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.accountID)) {\n this.accountID = data().deepCopy(fields()[2].schema(), other.accountID);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.accountAuthId)) {\n this.accountAuthId = data().deepCopy(fields()[3].schema(), other.accountAuthId);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.accountPassword)) {\n this.accountPassword = data().deepCopy(fields()[4].schema(), other.accountPassword);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.fundPassword)) {\n this.fundPassword = data().deepCopy(fields()[5].schema(), other.fundPassword);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.tradeCode)) {\n this.tradeCode = data().deepCopy(fields()[6].schema(), other.tradeCode);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.bankID)) {\n this.bankID = data().deepCopy(fields()[7].schema(), other.bankID);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.bankBranchID)) {\n this.bankBranchID = data().deepCopy(fields()[8].schema(), other.bankBranchID);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.bankPassword)) {\n this.bankPassword = data().deepCopy(fields()[9].schema(), other.bankPassword);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.currencyID)) {\n this.currencyID = data().deepCopy(fields()[10].schema(), other.currencyID);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.secuPwdFlag)) {\n this.secuPwdFlag = data().deepCopy(fields()[11].schema(), other.secuPwdFlag);\n fieldSetFlags()[11] = true;\n }\n }", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "default C cloneFlat() {\n\t\treturn clone(FieldGraph.of(getFields()));\n\t}", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "Component deepClone();", "protected void init() {\n super.init();\n uriExpr = null;\n uri = null;\n nameExpr = null;\n name = null;\n qname = null;\n attrExpr = null;\n attr = null;\n emptyExpr = null;\n empty = false;\n }", "private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.accountID)) {\n this.accountID = data().deepCopy(fields()[0].schema(), other.accountID);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.createDate)) {\n this.createDate = data().deepCopy(fields()[2].schema(), other.createDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.TransferSerials)) {\n this.TransferSerials = data().deepCopy(fields()[3].schema(), other.TransferSerials);\n fieldSetFlags()[3] = true;\n }\n }", "public void initialize(ConfabulatorObject original) {\n\t\tinitialize(original.getMaxLinkDistance(),original.getMaxLinkCount(),original.getLinks());\n\t}", "protected void initialize() {\n\t\tthis.position = Point3D.ZERO;\n\t\t// reset subclasses properties if any\n\t\treset();\n\t}", "@EnsuresNonNull({\"field2\", \"field3\"})\n private void init_other_fields(@UnderInitialization(MyClass.class) MyClass this) {\n field2 = new Object();\n field3 = new Object();\n }", "public WorldState (WorldState other)\n\t{\n\t\tproperties = new HashMap<String, WorldStateProperty>();\t\t\n\t\tcopy(other);\n\t}", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "public DTO(DTO other) {\n if (other.isSetDatas()) {\n Map<String,String> __this__datas = new HashMap<String,String>(other.datas);\n this.datas = __this__datas;\n }\n }", "@Override\n\tpublic void copyReferences() {\n\t\tlateCopies = new LinkedHashMap<>();\n\n\t\tsuper.copyReferences();\n\n\t\tputAll(lateCopies);\n\t\tlateCopies = null;\n\t}", "private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate StackFrameDTO()\n\t{\n\t\tthis.lineNumber = -1;\n\t\tthis.file = null;\n\t\tthis.level = -1;\n\t}", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public ProcessedDynamicData deepCopy( ) {\r\n\r\n ProcessedDynamicData copy = new ProcessedDynamicData( this.channelId );\r\n\r\n copy.channelId = this.channelId;\r\n copy.dateTimeStamp = new java.util.Date( this.dateTimeStamp.getTime() );\r\n copy.samplingRate = this.samplingRate;\r\n copy.eu = this.eu;\r\n\r\n copy.min = this.min;\r\n copy.max = this.max;\r\n\r\n copy.measurementType = this.measurementType;\r\n copy.measurementUnit = this.measurementUnit;\r\n\r\n // data and labels\r\n List<Double> dataCopy = new Vector<Double>();\r\n for( int i = 0; i < this.data.size(); i++ ) {\r\n dataCopy.add( new Double( this.data.get( i ) ) );\r\n }\r\n copy.setData( dataCopy );\r\n\r\n List<Double> dataLabels = new Vector<Double>();\r\n for( int i = 0; i < this.dataLabels.size(); i++ ) {\r\n dataLabels.add( new Double( this.dataLabels.get( i ) ) );\r\n }\r\n copy.setDataLabels( dataLabels );\r\n\r\n // create a deep copy of overalls\r\n if( overalls != null ) {\r\n copy.overalls = new OverallLevels( this.overalls.getChannelId() );\r\n copy.overalls.setDateTimeStampMillis( this.getDateTimeStampMillis() );\r\n Vector<String> overallKeys = this.overalls.getKeys();\r\n for( int i = 0; i < overallKeys.size(); i++ ) {\r\n copy.overalls.addOverall( new String( overallKeys.elementAt( i ) ),\r\n new Double( this.overalls.getOverall( overallKeys.elementAt( i ) ) ) );\r\n }\r\n }\r\n\r\n copy.xEUnit = this.xEUnit;\r\n copy.yEUnit = this.yEUnit;\r\n\r\n copy.xSymbol = this.xSymbol;\r\n copy.ySymbol = this.ySymbol;\r\n copy.xPhysDomain = this.xPhysDomain;\r\n copy.yPhysDomain = this.yPhysDomain;\r\n \r\n copy.noOfAppendedZeros = this.noOfAppendedZeros;\r\n\r\n return copy;\r\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }", "public void testCopyConstructor() throws EdmException {\n entity = new EdmEntity(\"example.edl\");\n EdmAttribute a1 = setupAttribute(val1);\n EdmAttribute a2 = setupAttribute(val2);\n entity.addAttribute(id1, a1);\n entity.addAttribute(id2, a2);\n // add subEntity\n EdmEntity subE = new EdmEntity(\"SUBexample.edl\");\n EdmAttribute a3 = setupAttribute(val3);\n subE.addAttribute(id3, a3);\n entity.addSubEntity(subE);\n\n assertEquals(\"example.edl\", entity.getType());\n assertEquals(2, entity.getAttributeCount());\n assertEquals(a1, entity.getAttribute(id1));\n assertEquals(a2, entity.getAttribute(id2));\n\n assertEquals(1, entity.getSubEntityCount());\n assertEquals(\"SUBexample.edl\", entity.getSubEntity(0).getType());\n assertEquals(1, entity.getSubEntity(0).getAttributeCount());\n assertEquals(0, entity.getSubEntity(0).getSubEntityCount());\n assertEquals(a3, entity.getSubEntity(0).getAttribute(id3));\n\n\n EdmEntity copy = new EdmEntity(entity);\n\n assertEquals(entity.getType(), copy.getType());\n assertEquals(entity.getAttributeCount(), copy.getAttributeCount());\n for (String key : copy.getAttributeIdSet())\n assertEquals(entity.getAttribute(key), copy.getAttribute(key));\n\n assertEquals(entity.getSubEntityCount(), copy.getSubEntityCount());\n for (int i = 0; i < copy.getSubEntityCount(); i++) {\n assertEquals(entity.getSubEntity(i).getType(), copy.getSubEntity(i).getType());\n assertEquals(entity.getSubEntity(i).getAttributeCount(),\n copy.getSubEntity(i).getAttributeCount());\n for (String key : copy.getSubEntity(i).getAttributeIdSet())\n assertEquals(entity.getSubEntity(i).getAttribute(key),\n copy.getSubEntity(i).getAttribute(key));\n }\n }", "public Clone() {}", "protected void deepCloneReferences(uka.transport.DeepClone _helper)\n throws CloneNotSupportedException\n {\n //Cloning the byte array\n\t this.value = _helper.doDeepClone(this.value);\n //byte[] value_clone = new byte[this.value.length]; \n //System.arraycopy(this.value, 0, value_clone, 0, this.value.length);\n //this.value = value_clone;\n }", "public CommonLogFragment(final FieldsMap copy) {\n\t\tsuper(copy);\n\t}", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "private void fillConstructorFields() {\n constructorId.setText(\"\"+ constructorMutator.getConstructor().getConstructorId());\n constructorUrl.setText(\"\"+ constructorMutator.getConstructor().getConstructorUrl());\n constructorName.setText(\"\"+ constructorMutator.getConstructor().getConstructorName());\n constructorNationality.setText(\"\"+ constructorMutator.getConstructor().getNationality());\n teamLogo.setImage(constructorMutator.getConstructor().getTeamLogo().getImage());\n // Display Drivers that were from the JSON File\n constructorMutator.getConstructor().setBuffer(new StringBuffer());\n // Java 8 Streaming\n constructorMutator.getConstructorsList().stream().forEach(constructorList -> constructorMutator.getConstructor().toString(constructorList));\n }", "private static void initCopyContext (SessionState state)\n\t{\n\t\tstate.setAttribute (STATE_COPIED_IDS, new Vector ());\n\n\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\n\t}", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic void copyStructure(CircularGrid grid) {\r\n\t\tinit(grid.mColumnCount, grid.mRowCount);\r\n\t}", "public void reInitialize() {\n\n\t\tthis.myT = buildFromScratch();\n\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private Builder(com.example.DNSLog.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.uid)) {\n this.uid = data().deepCopy(fields()[0].schema(), other.uid);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.originh)) {\n this.originh = data().deepCopy(fields()[1].schema(), other.originh);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.originp)) {\n this.originp = data().deepCopy(fields()[2].schema(), other.originp);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.resph)) {\n this.resph = data().deepCopy(fields()[3].schema(), other.resph);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.respp)) {\n this.respp = data().deepCopy(fields()[4].schema(), other.respp);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.proto)) {\n this.proto = data().deepCopy(fields()[5].schema(), other.proto);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.port)) {\n this.port = data().deepCopy(fields()[6].schema(), other.port);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.ts)) {\n this.ts = data().deepCopy(fields()[7].schema(), other.ts);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n if (isValidValue(fields()[8], other.query)) {\n this.query = data().deepCopy(fields()[8].schema(), other.query);\n fieldSetFlags()[8] = other.fieldSetFlags()[8];\n }\n if (isValidValue(fields()[9], other.qclass)) {\n this.qclass = data().deepCopy(fields()[9].schema(), other.qclass);\n fieldSetFlags()[9] = other.fieldSetFlags()[9];\n }\n if (isValidValue(fields()[10], other.qclassname)) {\n this.qclassname = data().deepCopy(fields()[10].schema(), other.qclassname);\n fieldSetFlags()[10] = other.fieldSetFlags()[10];\n }\n if (isValidValue(fields()[11], other.qtype)) {\n this.qtype = data().deepCopy(fields()[11].schema(), other.qtype);\n fieldSetFlags()[11] = other.fieldSetFlags()[11];\n }\n if (isValidValue(fields()[12], other.qtypename)) {\n this.qtypename = data().deepCopy(fields()[12].schema(), other.qtypename);\n fieldSetFlags()[12] = other.fieldSetFlags()[12];\n }\n if (isValidValue(fields()[13], other.rcode)) {\n this.rcode = data().deepCopy(fields()[13].schema(), other.rcode);\n fieldSetFlags()[13] = other.fieldSetFlags()[13];\n }\n if (isValidValue(fields()[14], other.rcodename)) {\n this.rcodename = data().deepCopy(fields()[14].schema(), other.rcodename);\n fieldSetFlags()[14] = other.fieldSetFlags()[14];\n }\n if (isValidValue(fields()[15], other.Z)) {\n this.Z = data().deepCopy(fields()[15].schema(), other.Z);\n fieldSetFlags()[15] = other.fieldSetFlags()[15];\n }\n if (isValidValue(fields()[16], other.OR)) {\n this.OR = data().deepCopy(fields()[16].schema(), other.OR);\n fieldSetFlags()[16] = other.fieldSetFlags()[16];\n }\n if (isValidValue(fields()[17], other.AA)) {\n this.AA = data().deepCopy(fields()[17].schema(), other.AA);\n fieldSetFlags()[17] = other.fieldSetFlags()[17];\n }\n if (isValidValue(fields()[18], other.TC)) {\n this.TC = data().deepCopy(fields()[18].schema(), other.TC);\n fieldSetFlags()[18] = other.fieldSetFlags()[18];\n }\n if (isValidValue(fields()[19], other.rejected)) {\n this.rejected = data().deepCopy(fields()[19].schema(), other.rejected);\n fieldSetFlags()[19] = other.fieldSetFlags()[19];\n }\n if (isValidValue(fields()[20], other.Answers)) {\n this.Answers = data().deepCopy(fields()[20].schema(), other.Answers);\n fieldSetFlags()[20] = other.fieldSetFlags()[20];\n }\n if (isValidValue(fields()[21], other.TLLs)) {\n this.TLLs = data().deepCopy(fields()[21].schema(), other.TLLs);\n fieldSetFlags()[21] = other.fieldSetFlags()[21];\n }\n }", "private FundInfo() {\n initFields();\n }", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "protected AbstractPathElement(AbstractPathElement<V, E> original)\r\n/* */ {\r\n/* 117 */ this.nHops = original.nHops;\r\n/* 118 */ this.prevEdge = original.prevEdge;\r\n/* 119 */ this.prevPathElement = original.prevPathElement;\r\n/* 120 */ this.vertex = original.vertex;\r\n/* */ }", "public InitialData(){}", "public ResourceDowntimeRecord(ResourceDowntimeRecord copy) {\r\n\t\tid = copy.id;\r\n\t\ttimestamp = copy.timestamp;\r\n created = copy.created;\r\n\t\tstart_time = copy.start_time;\r\n\t\tend_time = copy.end_time;\r\n\t\tdowntime_summary = copy.downtime_summary;\r\n\t\tdowntime_class_id = copy.downtime_class_id;\r\n\t\tdowntime_severity_id = copy.downtime_severity_id;\r\n\t\tresource_id = copy.resource_id;\r\n\t\tdn_id = copy.dn_id;\r\n\t\tsso_id = copy.sso_id;\r\n\t\tdisable = copy.disable;\r\n\t}", "@JsonCreator(mode = JsonCreator.Mode.DEFAULT)\n private UpdateTransaction() {\n this.sourceId = Optional.empty();\n this.type = Optional.empty();\n this.description = Optional.empty();\n this.balance = Optional.empty();\n this.inputDate = Optional.empty();\n }", "GameState(GameState b) {\n //System.out.println( \"Just Copied GameState\\n\" + b.toString() +\"\\n\");\n board = new int[SIZE][];\n for (int i = 0; i < SIZE; i++) {\n this.board[i] = b.board[i].clone();\n }\n this.blankRow = b.blankRow;\n this.blankCol = b.blankCol;\n\n this.prevMoves = b.prevMoves;\n this.rank = setRank();\n }", "public Mapping clone(IRSession session){\n \tMapping mapping = new Mapping(session);\n \tmapping.entities = entities;\n \tmapping.multiple = multiple;\n \tmapping.requests = requests;\n \tmapping.entityinfo = entityinfo;\n \tmapping.entitystack = entitystack;\n \tmapping.setattributes = setattributes;\n \tmapping.attribute2listPairs = attribute2listPairs;\n \tmapping.dataObjects = dataObjects;\n \tmapping.initialize();\n \treturn mapping;\n }", "protected IBDS()\r\n {\r\n \tthis.modifyBuffer = new StringBuffer(300); // all update operations belong to this only\r\n this.nodeList = new ArrayList<int []>(50);\r\n this.lastUpdated = System.nanoTime();\r\n //this.objectArray = new ArrayList();\r\n }", "public T cloneDeep();", "Model copy();", "private RoleData() {\n initFields();\n }", "private void init() {\n cloudAmount = null;\n cloudGenus = null;\n cloudAltitude = null;\n cloudDescription = null;\n }", "public void init() {\n initLayers();\n for (int i = 0; i < indivCount; i++) {\n ArrayList<Layer> iLayers = new ArrayList<>();\n for (Layer l : layers)\n iLayers.add(l.cloneSettings());\n individuals[i] = new Individual(iLayers);\n }\n }", "private FundList() {\n initFields();\n }", "public void method_6436() {\r\n super();\r\n this.field_6225 = new ArrayList();\r\n this.field_6226 = new HashMap();\r\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public void init() {\n C21671bd.m72528a(this);\n C18895c.m61670a((C19222b) new C22204a());\n C18895c.m61669a(C21764o.f58278a);\n }", "@Override\n public int deepCopy(AbstractRecord other)\n {\n return 0;\n }", "private Builder(com.dj.model.avro.LargeObjectAvro.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.contextId)) {\n this.contextId = data().deepCopy(fields()[0].schema(), other.contextId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.recordNum)) {\n this.recordNum = data().deepCopy(fields()[1].schema(), other.recordNum);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.var1)) {\n this.var1 = data().deepCopy(fields()[2].schema(), other.var1);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.var2)) {\n this.var2 = data().deepCopy(fields()[3].schema(), other.var2);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.var3)) {\n this.var3 = data().deepCopy(fields()[4].schema(), other.var3);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.var4)) {\n this.var4 = data().deepCopy(fields()[5].schema(), other.var4);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.var5)) {\n this.var5 = data().deepCopy(fields()[6].schema(), other.var5);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.var6)) {\n this.var6 = data().deepCopy(fields()[7].schema(), other.var6);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.var7)) {\n this.var7 = data().deepCopy(fields()[8].schema(), other.var7);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.var8)) {\n this.var8 = data().deepCopy(fields()[9].schema(), other.var8);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.var9)) {\n this.var9 = data().deepCopy(fields()[10].schema(), other.var9);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.var10)) {\n this.var10 = data().deepCopy(fields()[11].schema(), other.var10);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.var11)) {\n this.var11 = data().deepCopy(fields()[12].schema(), other.var11);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.var12)) {\n this.var12 = data().deepCopy(fields()[13].schema(), other.var12);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.var13)) {\n this.var13 = data().deepCopy(fields()[14].schema(), other.var13);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.var14)) {\n this.var14 = data().deepCopy(fields()[15].schema(), other.var14);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.var15)) {\n this.var15 = data().deepCopy(fields()[16].schema(), other.var15);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.var16)) {\n this.var16 = data().deepCopy(fields()[17].schema(), other.var16);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.var17)) {\n this.var17 = data().deepCopy(fields()[18].schema(), other.var17);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.var18)) {\n this.var18 = data().deepCopy(fields()[19].schema(), other.var18);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.var19)) {\n this.var19 = data().deepCopy(fields()[20].schema(), other.var19);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.var20)) {\n this.var20 = data().deepCopy(fields()[21].schema(), other.var20);\n fieldSetFlags()[21] = true;\n }\n if (isValidValue(fields()[22], other.var21)) {\n this.var21 = data().deepCopy(fields()[22].schema(), other.var21);\n fieldSetFlags()[22] = true;\n }\n if (isValidValue(fields()[23], other.var22)) {\n this.var22 = data().deepCopy(fields()[23].schema(), other.var22);\n fieldSetFlags()[23] = true;\n }\n if (isValidValue(fields()[24], other.var23)) {\n this.var23 = data().deepCopy(fields()[24].schema(), other.var23);\n fieldSetFlags()[24] = true;\n }\n if (isValidValue(fields()[25], other.var24)) {\n this.var24 = data().deepCopy(fields()[25].schema(), other.var24);\n fieldSetFlags()[25] = true;\n }\n if (isValidValue(fields()[26], other.var25)) {\n this.var25 = data().deepCopy(fields()[26].schema(), other.var25);\n fieldSetFlags()[26] = true;\n }\n if (isValidValue(fields()[27], other.var26)) {\n this.var26 = data().deepCopy(fields()[27].schema(), other.var26);\n fieldSetFlags()[27] = true;\n }\n if (isValidValue(fields()[28], other.var27)) {\n this.var27 = data().deepCopy(fields()[28].schema(), other.var27);\n fieldSetFlags()[28] = true;\n }\n if (isValidValue(fields()[29], other.var28)) {\n this.var28 = data().deepCopy(fields()[29].schema(), other.var28);\n fieldSetFlags()[29] = true;\n }\n if (isValidValue(fields()[30], other.var29)) {\n this.var29 = data().deepCopy(fields()[30].schema(), other.var29);\n fieldSetFlags()[30] = true;\n }\n if (isValidValue(fields()[31], other.var30)) {\n this.var30 = data().deepCopy(fields()[31].schema(), other.var30);\n fieldSetFlags()[31] = true;\n }\n if (isValidValue(fields()[32], other.var31)) {\n this.var31 = data().deepCopy(fields()[32].schema(), other.var31);\n fieldSetFlags()[32] = true;\n }\n if (isValidValue(fields()[33], other.var32)) {\n this.var32 = data().deepCopy(fields()[33].schema(), other.var32);\n fieldSetFlags()[33] = true;\n }\n if (isValidValue(fields()[34], other.var33)) {\n this.var33 = data().deepCopy(fields()[34].schema(), other.var33);\n fieldSetFlags()[34] = true;\n }\n if (isValidValue(fields()[35], other.var34)) {\n this.var34 = data().deepCopy(fields()[35].schema(), other.var34);\n fieldSetFlags()[35] = true;\n }\n if (isValidValue(fields()[36], other.var35)) {\n this.var35 = data().deepCopy(fields()[36].schema(), other.var35);\n fieldSetFlags()[36] = true;\n }\n if (isValidValue(fields()[37], other.var36)) {\n this.var36 = data().deepCopy(fields()[37].schema(), other.var36);\n fieldSetFlags()[37] = true;\n }\n if (isValidValue(fields()[38], other.var37)) {\n this.var37 = data().deepCopy(fields()[38].schema(), other.var37);\n fieldSetFlags()[38] = true;\n }\n if (isValidValue(fields()[39], other.var38)) {\n this.var38 = data().deepCopy(fields()[39].schema(), other.var38);\n fieldSetFlags()[39] = true;\n }\n if (isValidValue(fields()[40], other.var39)) {\n this.var39 = data().deepCopy(fields()[40].schema(), other.var39);\n fieldSetFlags()[40] = true;\n }\n if (isValidValue(fields()[41], other.var40)) {\n this.var40 = data().deepCopy(fields()[41].schema(), other.var40);\n fieldSetFlags()[41] = true;\n }\n if (isValidValue(fields()[42], other.var41)) {\n this.var41 = data().deepCopy(fields()[42].schema(), other.var41);\n fieldSetFlags()[42] = true;\n }\n if (isValidValue(fields()[43], other.var42)) {\n this.var42 = data().deepCopy(fields()[43].schema(), other.var42);\n fieldSetFlags()[43] = true;\n }\n if (isValidValue(fields()[44], other.var43)) {\n this.var43 = data().deepCopy(fields()[44].schema(), other.var43);\n fieldSetFlags()[44] = true;\n }\n if (isValidValue(fields()[45], other.var44)) {\n this.var44 = data().deepCopy(fields()[45].schema(), other.var44);\n fieldSetFlags()[45] = true;\n }\n if (isValidValue(fields()[46], other.var45)) {\n this.var45 = data().deepCopy(fields()[46].schema(), other.var45);\n fieldSetFlags()[46] = true;\n }\n if (isValidValue(fields()[47], other.var46)) {\n this.var46 = data().deepCopy(fields()[47].schema(), other.var46);\n fieldSetFlags()[47] = true;\n }\n if (isValidValue(fields()[48], other.var47)) {\n this.var47 = data().deepCopy(fields()[48].schema(), other.var47);\n fieldSetFlags()[48] = true;\n }\n if (isValidValue(fields()[49], other.var48)) {\n this.var48 = data().deepCopy(fields()[49].schema(), other.var48);\n fieldSetFlags()[49] = true;\n }\n if (isValidValue(fields()[50], other.var49)) {\n this.var49 = data().deepCopy(fields()[50].schema(), other.var49);\n fieldSetFlags()[50] = true;\n }\n if (isValidValue(fields()[51], other.var50)) {\n this.var50 = data().deepCopy(fields()[51].schema(), other.var50);\n fieldSetFlags()[51] = true;\n }\n if (isValidValue(fields()[52], other.var51)) {\n this.var51 = data().deepCopy(fields()[52].schema(), other.var51);\n fieldSetFlags()[52] = true;\n }\n if (isValidValue(fields()[53], other.var52)) {\n this.var52 = data().deepCopy(fields()[53].schema(), other.var52);\n fieldSetFlags()[53] = true;\n }\n if (isValidValue(fields()[54], other.var53)) {\n this.var53 = data().deepCopy(fields()[54].schema(), other.var53);\n fieldSetFlags()[54] = true;\n }\n if (isValidValue(fields()[55], other.var54)) {\n this.var54 = data().deepCopy(fields()[55].schema(), other.var54);\n fieldSetFlags()[55] = true;\n }\n if (isValidValue(fields()[56], other.var55)) {\n this.var55 = data().deepCopy(fields()[56].schema(), other.var55);\n fieldSetFlags()[56] = true;\n }\n if (isValidValue(fields()[57], other.var56)) {\n this.var56 = data().deepCopy(fields()[57].schema(), other.var56);\n fieldSetFlags()[57] = true;\n }\n if (isValidValue(fields()[58], other.var57)) {\n this.var57 = data().deepCopy(fields()[58].schema(), other.var57);\n fieldSetFlags()[58] = true;\n }\n if (isValidValue(fields()[59], other.var58)) {\n this.var58 = data().deepCopy(fields()[59].schema(), other.var58);\n fieldSetFlags()[59] = true;\n }\n if (isValidValue(fields()[60], other.var59)) {\n this.var59 = data().deepCopy(fields()[60].schema(), other.var59);\n fieldSetFlags()[60] = true;\n }\n if (isValidValue(fields()[61], other.var60)) {\n this.var60 = data().deepCopy(fields()[61].schema(), other.var60);\n fieldSetFlags()[61] = true;\n }\n if (isValidValue(fields()[62], other.var61)) {\n this.var61 = data().deepCopy(fields()[62].schema(), other.var61);\n fieldSetFlags()[62] = true;\n }\n if (isValidValue(fields()[63], other.var62)) {\n this.var62 = data().deepCopy(fields()[63].schema(), other.var62);\n fieldSetFlags()[63] = true;\n }\n if (isValidValue(fields()[64], other.var63)) {\n this.var63 = data().deepCopy(fields()[64].schema(), other.var63);\n fieldSetFlags()[64] = true;\n }\n if (isValidValue(fields()[65], other.var64)) {\n this.var64 = data().deepCopy(fields()[65].schema(), other.var64);\n fieldSetFlags()[65] = true;\n }\n if (isValidValue(fields()[66], other.var65)) {\n this.var65 = data().deepCopy(fields()[66].schema(), other.var65);\n fieldSetFlags()[66] = true;\n }\n if (isValidValue(fields()[67], other.var66)) {\n this.var66 = data().deepCopy(fields()[67].schema(), other.var66);\n fieldSetFlags()[67] = true;\n }\n if (isValidValue(fields()[68], other.var67)) {\n this.var67 = data().deepCopy(fields()[68].schema(), other.var67);\n fieldSetFlags()[68] = true;\n }\n if (isValidValue(fields()[69], other.var68)) {\n this.var68 = data().deepCopy(fields()[69].schema(), other.var68);\n fieldSetFlags()[69] = true;\n }\n if (isValidValue(fields()[70], other.var69)) {\n this.var69 = data().deepCopy(fields()[70].schema(), other.var69);\n fieldSetFlags()[70] = true;\n }\n if (isValidValue(fields()[71], other.var70)) {\n this.var70 = data().deepCopy(fields()[71].schema(), other.var70);\n fieldSetFlags()[71] = true;\n }\n if (isValidValue(fields()[72], other.var71)) {\n this.var71 = data().deepCopy(fields()[72].schema(), other.var71);\n fieldSetFlags()[72] = true;\n }\n if (isValidValue(fields()[73], other.var72)) {\n this.var72 = data().deepCopy(fields()[73].schema(), other.var72);\n fieldSetFlags()[73] = true;\n }\n if (isValidValue(fields()[74], other.var73)) {\n this.var73 = data().deepCopy(fields()[74].schema(), other.var73);\n fieldSetFlags()[74] = true;\n }\n if (isValidValue(fields()[75], other.var74)) {\n this.var74 = data().deepCopy(fields()[75].schema(), other.var74);\n fieldSetFlags()[75] = true;\n }\n if (isValidValue(fields()[76], other.var75)) {\n this.var75 = data().deepCopy(fields()[76].schema(), other.var75);\n fieldSetFlags()[76] = true;\n }\n if (isValidValue(fields()[77], other.var76)) {\n this.var76 = data().deepCopy(fields()[77].schema(), other.var76);\n fieldSetFlags()[77] = true;\n }\n if (isValidValue(fields()[78], other.var77)) {\n this.var77 = data().deepCopy(fields()[78].schema(), other.var77);\n fieldSetFlags()[78] = true;\n }\n if (isValidValue(fields()[79], other.var78)) {\n this.var78 = data().deepCopy(fields()[79].schema(), other.var78);\n fieldSetFlags()[79] = true;\n }\n if (isValidValue(fields()[80], other.var79)) {\n this.var79 = data().deepCopy(fields()[80].schema(), other.var79);\n fieldSetFlags()[80] = true;\n }\n if (isValidValue(fields()[81], other.var80)) {\n this.var80 = data().deepCopy(fields()[81].schema(), other.var80);\n fieldSetFlags()[81] = true;\n }\n if (isValidValue(fields()[82], other.var81)) {\n this.var81 = data().deepCopy(fields()[82].schema(), other.var81);\n fieldSetFlags()[82] = true;\n }\n if (isValidValue(fields()[83], other.var82)) {\n this.var82 = data().deepCopy(fields()[83].schema(), other.var82);\n fieldSetFlags()[83] = true;\n }\n if (isValidValue(fields()[84], other.var83)) {\n this.var83 = data().deepCopy(fields()[84].schema(), other.var83);\n fieldSetFlags()[84] = true;\n }\n if (isValidValue(fields()[85], other.var84)) {\n this.var84 = data().deepCopy(fields()[85].schema(), other.var84);\n fieldSetFlags()[85] = true;\n }\n if (isValidValue(fields()[86], other.var85)) {\n this.var85 = data().deepCopy(fields()[86].schema(), other.var85);\n fieldSetFlags()[86] = true;\n }\n if (isValidValue(fields()[87], other.var86)) {\n this.var86 = data().deepCopy(fields()[87].schema(), other.var86);\n fieldSetFlags()[87] = true;\n }\n if (isValidValue(fields()[88], other.var87)) {\n this.var87 = data().deepCopy(fields()[88].schema(), other.var87);\n fieldSetFlags()[88] = true;\n }\n if (isValidValue(fields()[89], other.var88)) {\n this.var88 = data().deepCopy(fields()[89].schema(), other.var88);\n fieldSetFlags()[89] = true;\n }\n if (isValidValue(fields()[90], other.var89)) {\n this.var89 = data().deepCopy(fields()[90].schema(), other.var89);\n fieldSetFlags()[90] = true;\n }\n if (isValidValue(fields()[91], other.var90)) {\n this.var90 = data().deepCopy(fields()[91].schema(), other.var90);\n fieldSetFlags()[91] = true;\n }\n if (isValidValue(fields()[92], other.var91)) {\n this.var91 = data().deepCopy(fields()[92].schema(), other.var91);\n fieldSetFlags()[92] = true;\n }\n if (isValidValue(fields()[93], other.var92)) {\n this.var92 = data().deepCopy(fields()[93].schema(), other.var92);\n fieldSetFlags()[93] = true;\n }\n if (isValidValue(fields()[94], other.var93)) {\n this.var93 = data().deepCopy(fields()[94].schema(), other.var93);\n fieldSetFlags()[94] = true;\n }\n if (isValidValue(fields()[95], other.var94)) {\n this.var94 = data().deepCopy(fields()[95].schema(), other.var94);\n fieldSetFlags()[95] = true;\n }\n if (isValidValue(fields()[96], other.var95)) {\n this.var95 = data().deepCopy(fields()[96].schema(), other.var95);\n fieldSetFlags()[96] = true;\n }\n if (isValidValue(fields()[97], other.var96)) {\n this.var96 = data().deepCopy(fields()[97].schema(), other.var96);\n fieldSetFlags()[97] = true;\n }\n if (isValidValue(fields()[98], other.var97)) {\n this.var97 = data().deepCopy(fields()[98].schema(), other.var97);\n fieldSetFlags()[98] = true;\n }\n if (isValidValue(fields()[99], other.var98)) {\n this.var98 = data().deepCopy(fields()[99].schema(), other.var98);\n fieldSetFlags()[99] = true;\n }\n if (isValidValue(fields()[100], other.var99)) {\n this.var99 = data().deepCopy(fields()[100].schema(), other.var99);\n fieldSetFlags()[100] = true;\n }\n if (isValidValue(fields()[101], other.var100)) {\n this.var100 = data().deepCopy(fields()[101].schema(), other.var100);\n fieldSetFlags()[101] = true;\n }\n if (isValidValue(fields()[102], other.var101)) {\n this.var101 = data().deepCopy(fields()[102].schema(), other.var101);\n fieldSetFlags()[102] = true;\n }\n if (isValidValue(fields()[103], other.var102)) {\n this.var102 = data().deepCopy(fields()[103].schema(), other.var102);\n fieldSetFlags()[103] = true;\n }\n if (isValidValue(fields()[104], other.var103)) {\n this.var103 = data().deepCopy(fields()[104].schema(), other.var103);\n fieldSetFlags()[104] = true;\n }\n if (isValidValue(fields()[105], other.var104)) {\n this.var104 = data().deepCopy(fields()[105].schema(), other.var104);\n fieldSetFlags()[105] = true;\n }\n if (isValidValue(fields()[106], other.var105)) {\n this.var105 = data().deepCopy(fields()[106].schema(), other.var105);\n fieldSetFlags()[106] = true;\n }\n if (isValidValue(fields()[107], other.var106)) {\n this.var106 = data().deepCopy(fields()[107].schema(), other.var106);\n fieldSetFlags()[107] = true;\n }\n if (isValidValue(fields()[108], other.var107)) {\n this.var107 = data().deepCopy(fields()[108].schema(), other.var107);\n fieldSetFlags()[108] = true;\n }\n if (isValidValue(fields()[109], other.var108)) {\n this.var108 = data().deepCopy(fields()[109].schema(), other.var108);\n fieldSetFlags()[109] = true;\n }\n if (isValidValue(fields()[110], other.var109)) {\n this.var109 = data().deepCopy(fields()[110].schema(), other.var109);\n fieldSetFlags()[110] = true;\n }\n if (isValidValue(fields()[111], other.var110)) {\n this.var110 = data().deepCopy(fields()[111].schema(), other.var110);\n fieldSetFlags()[111] = true;\n }\n if (isValidValue(fields()[112], other.var111)) {\n this.var111 = data().deepCopy(fields()[112].schema(), other.var111);\n fieldSetFlags()[112] = true;\n }\n if (isValidValue(fields()[113], other.var112)) {\n this.var112 = data().deepCopy(fields()[113].schema(), other.var112);\n fieldSetFlags()[113] = true;\n }\n if (isValidValue(fields()[114], other.var113)) {\n this.var113 = data().deepCopy(fields()[114].schema(), other.var113);\n fieldSetFlags()[114] = true;\n }\n if (isValidValue(fields()[115], other.var114)) {\n this.var114 = data().deepCopy(fields()[115].schema(), other.var114);\n fieldSetFlags()[115] = true;\n }\n if (isValidValue(fields()[116], other.var115)) {\n this.var115 = data().deepCopy(fields()[116].schema(), other.var115);\n fieldSetFlags()[116] = true;\n }\n if (isValidValue(fields()[117], other.var116)) {\n this.var116 = data().deepCopy(fields()[117].schema(), other.var116);\n fieldSetFlags()[117] = true;\n }\n if (isValidValue(fields()[118], other.var117)) {\n this.var117 = data().deepCopy(fields()[118].schema(), other.var117);\n fieldSetFlags()[118] = true;\n }\n if (isValidValue(fields()[119], other.var118)) {\n this.var118 = data().deepCopy(fields()[119].schema(), other.var118);\n fieldSetFlags()[119] = true;\n }\n if (isValidValue(fields()[120], other.var119)) {\n this.var119 = data().deepCopy(fields()[120].schema(), other.var119);\n fieldSetFlags()[120] = true;\n }\n if (isValidValue(fields()[121], other.var120)) {\n this.var120 = data().deepCopy(fields()[121].schema(), other.var120);\n fieldSetFlags()[121] = true;\n }\n if (isValidValue(fields()[122], other.var121)) {\n this.var121 = data().deepCopy(fields()[122].schema(), other.var121);\n fieldSetFlags()[122] = true;\n }\n if (isValidValue(fields()[123], other.var122)) {\n this.var122 = data().deepCopy(fields()[123].schema(), other.var122);\n fieldSetFlags()[123] = true;\n }\n if (isValidValue(fields()[124], other.var123)) {\n this.var123 = data().deepCopy(fields()[124].schema(), other.var123);\n fieldSetFlags()[124] = true;\n }\n if (isValidValue(fields()[125], other.var124)) {\n this.var124 = data().deepCopy(fields()[125].schema(), other.var124);\n fieldSetFlags()[125] = true;\n }\n if (isValidValue(fields()[126], other.var125)) {\n this.var125 = data().deepCopy(fields()[126].schema(), other.var125);\n fieldSetFlags()[126] = true;\n }\n if (isValidValue(fields()[127], other.var126)) {\n this.var126 = data().deepCopy(fields()[127].schema(), other.var126);\n fieldSetFlags()[127] = true;\n }\n if (isValidValue(fields()[128], other.var127)) {\n this.var127 = data().deepCopy(fields()[128].schema(), other.var127);\n fieldSetFlags()[128] = true;\n }\n if (isValidValue(fields()[129], other.var128)) {\n this.var128 = data().deepCopy(fields()[129].schema(), other.var128);\n fieldSetFlags()[129] = true;\n }\n if (isValidValue(fields()[130], other.var129)) {\n this.var129 = data().deepCopy(fields()[130].schema(), other.var129);\n fieldSetFlags()[130] = true;\n }\n if (isValidValue(fields()[131], other.var130)) {\n this.var130 = data().deepCopy(fields()[131].schema(), other.var130);\n fieldSetFlags()[131] = true;\n }\n if (isValidValue(fields()[132], other.var131)) {\n this.var131 = data().deepCopy(fields()[132].schema(), other.var131);\n fieldSetFlags()[132] = true;\n }\n if (isValidValue(fields()[133], other.var132)) {\n this.var132 = data().deepCopy(fields()[133].schema(), other.var132);\n fieldSetFlags()[133] = true;\n }\n if (isValidValue(fields()[134], other.var133)) {\n this.var133 = data().deepCopy(fields()[134].schema(), other.var133);\n fieldSetFlags()[134] = true;\n }\n if (isValidValue(fields()[135], other.var134)) {\n this.var134 = data().deepCopy(fields()[135].schema(), other.var134);\n fieldSetFlags()[135] = true;\n }\n if (isValidValue(fields()[136], other.var135)) {\n this.var135 = data().deepCopy(fields()[136].schema(), other.var135);\n fieldSetFlags()[136] = true;\n }\n if (isValidValue(fields()[137], other.var136)) {\n this.var136 = data().deepCopy(fields()[137].schema(), other.var136);\n fieldSetFlags()[137] = true;\n }\n if (isValidValue(fields()[138], other.var137)) {\n this.var137 = data().deepCopy(fields()[138].schema(), other.var137);\n fieldSetFlags()[138] = true;\n }\n if (isValidValue(fields()[139], other.var138)) {\n this.var138 = data().deepCopy(fields()[139].schema(), other.var138);\n fieldSetFlags()[139] = true;\n }\n if (isValidValue(fields()[140], other.var139)) {\n this.var139 = data().deepCopy(fields()[140].schema(), other.var139);\n fieldSetFlags()[140] = true;\n }\n if (isValidValue(fields()[141], other.var140)) {\n this.var140 = data().deepCopy(fields()[141].schema(), other.var140);\n fieldSetFlags()[141] = true;\n }\n if (isValidValue(fields()[142], other.var141)) {\n this.var141 = data().deepCopy(fields()[142].schema(), other.var141);\n fieldSetFlags()[142] = true;\n }\n if (isValidValue(fields()[143], other.var142)) {\n this.var142 = data().deepCopy(fields()[143].schema(), other.var142);\n fieldSetFlags()[143] = true;\n }\n if (isValidValue(fields()[144], other.var143)) {\n this.var143 = data().deepCopy(fields()[144].schema(), other.var143);\n fieldSetFlags()[144] = true;\n }\n if (isValidValue(fields()[145], other.var144)) {\n this.var144 = data().deepCopy(fields()[145].schema(), other.var144);\n fieldSetFlags()[145] = true;\n }\n if (isValidValue(fields()[146], other.var145)) {\n this.var145 = data().deepCopy(fields()[146].schema(), other.var145);\n fieldSetFlags()[146] = true;\n }\n if (isValidValue(fields()[147], other.var146)) {\n this.var146 = data().deepCopy(fields()[147].schema(), other.var146);\n fieldSetFlags()[147] = true;\n }\n if (isValidValue(fields()[148], other.var147)) {\n this.var147 = data().deepCopy(fields()[148].schema(), other.var147);\n fieldSetFlags()[148] = true;\n }\n if (isValidValue(fields()[149], other.var148)) {\n this.var148 = data().deepCopy(fields()[149].schema(), other.var148);\n fieldSetFlags()[149] = true;\n }\n if (isValidValue(fields()[150], other.var149)) {\n this.var149 = data().deepCopy(fields()[150].schema(), other.var149);\n fieldSetFlags()[150] = true;\n }\n if (isValidValue(fields()[151], other.var150)) {\n this.var150 = data().deepCopy(fields()[151].schema(), other.var150);\n fieldSetFlags()[151] = true;\n }\n if (isValidValue(fields()[152], other.var151)) {\n this.var151 = data().deepCopy(fields()[152].schema(), other.var151);\n fieldSetFlags()[152] = true;\n }\n if (isValidValue(fields()[153], other.var152)) {\n this.var152 = data().deepCopy(fields()[153].schema(), other.var152);\n fieldSetFlags()[153] = true;\n }\n if (isValidValue(fields()[154], other.var153)) {\n this.var153 = data().deepCopy(fields()[154].schema(), other.var153);\n fieldSetFlags()[154] = true;\n }\n if (isValidValue(fields()[155], other.var154)) {\n this.var154 = data().deepCopy(fields()[155].schema(), other.var154);\n fieldSetFlags()[155] = true;\n }\n if (isValidValue(fields()[156], other.var155)) {\n this.var155 = data().deepCopy(fields()[156].schema(), other.var155);\n fieldSetFlags()[156] = true;\n }\n if (isValidValue(fields()[157], other.var156)) {\n this.var156 = data().deepCopy(fields()[157].schema(), other.var156);\n fieldSetFlags()[157] = true;\n }\n if (isValidValue(fields()[158], other.var157)) {\n this.var157 = data().deepCopy(fields()[158].schema(), other.var157);\n fieldSetFlags()[158] = true;\n }\n if (isValidValue(fields()[159], other.var158)) {\n this.var158 = data().deepCopy(fields()[159].schema(), other.var158);\n fieldSetFlags()[159] = true;\n }\n if (isValidValue(fields()[160], other.var159)) {\n this.var159 = data().deepCopy(fields()[160].schema(), other.var159);\n fieldSetFlags()[160] = true;\n }\n if (isValidValue(fields()[161], other.var160)) {\n this.var160 = data().deepCopy(fields()[161].schema(), other.var160);\n fieldSetFlags()[161] = true;\n }\n if (isValidValue(fields()[162], other.var161)) {\n this.var161 = data().deepCopy(fields()[162].schema(), other.var161);\n fieldSetFlags()[162] = true;\n }\n if (isValidValue(fields()[163], other.var162)) {\n this.var162 = data().deepCopy(fields()[163].schema(), other.var162);\n fieldSetFlags()[163] = true;\n }\n if (isValidValue(fields()[164], other.var163)) {\n this.var163 = data().deepCopy(fields()[164].schema(), other.var163);\n fieldSetFlags()[164] = true;\n }\n if (isValidValue(fields()[165], other.var164)) {\n this.var164 = data().deepCopy(fields()[165].schema(), other.var164);\n fieldSetFlags()[165] = true;\n }\n if (isValidValue(fields()[166], other.var165)) {\n this.var165 = data().deepCopy(fields()[166].schema(), other.var165);\n fieldSetFlags()[166] = true;\n }\n if (isValidValue(fields()[167], other.var166)) {\n this.var166 = data().deepCopy(fields()[167].schema(), other.var166);\n fieldSetFlags()[167] = true;\n }\n if (isValidValue(fields()[168], other.var167)) {\n this.var167 = data().deepCopy(fields()[168].schema(), other.var167);\n fieldSetFlags()[168] = true;\n }\n if (isValidValue(fields()[169], other.var168)) {\n this.var168 = data().deepCopy(fields()[169].schema(), other.var168);\n fieldSetFlags()[169] = true;\n }\n if (isValidValue(fields()[170], other.var169)) {\n this.var169 = data().deepCopy(fields()[170].schema(), other.var169);\n fieldSetFlags()[170] = true;\n }\n if (isValidValue(fields()[171], other.var170)) {\n this.var170 = data().deepCopy(fields()[171].schema(), other.var170);\n fieldSetFlags()[171] = true;\n }\n if (isValidValue(fields()[172], other.var171)) {\n this.var171 = data().deepCopy(fields()[172].schema(), other.var171);\n fieldSetFlags()[172] = true;\n }\n if (isValidValue(fields()[173], other.var172)) {\n this.var172 = data().deepCopy(fields()[173].schema(), other.var172);\n fieldSetFlags()[173] = true;\n }\n if (isValidValue(fields()[174], other.var173)) {\n this.var173 = data().deepCopy(fields()[174].schema(), other.var173);\n fieldSetFlags()[174] = true;\n }\n if (isValidValue(fields()[175], other.var174)) {\n this.var174 = data().deepCopy(fields()[175].schema(), other.var174);\n fieldSetFlags()[175] = true;\n }\n if (isValidValue(fields()[176], other.var175)) {\n this.var175 = data().deepCopy(fields()[176].schema(), other.var175);\n fieldSetFlags()[176] = true;\n }\n if (isValidValue(fields()[177], other.var176)) {\n this.var176 = data().deepCopy(fields()[177].schema(), other.var176);\n fieldSetFlags()[177] = true;\n }\n if (isValidValue(fields()[178], other.var177)) {\n this.var177 = data().deepCopy(fields()[178].schema(), other.var177);\n fieldSetFlags()[178] = true;\n }\n if (isValidValue(fields()[179], other.var178)) {\n this.var178 = data().deepCopy(fields()[179].schema(), other.var178);\n fieldSetFlags()[179] = true;\n }\n if (isValidValue(fields()[180], other.var179)) {\n this.var179 = data().deepCopy(fields()[180].schema(), other.var179);\n fieldSetFlags()[180] = true;\n }\n if (isValidValue(fields()[181], other.var180)) {\n this.var180 = data().deepCopy(fields()[181].schema(), other.var180);\n fieldSetFlags()[181] = true;\n }\n if (isValidValue(fields()[182], other.var181)) {\n this.var181 = data().deepCopy(fields()[182].schema(), other.var181);\n fieldSetFlags()[182] = true;\n }\n if (isValidValue(fields()[183], other.var182)) {\n this.var182 = data().deepCopy(fields()[183].schema(), other.var182);\n fieldSetFlags()[183] = true;\n }\n if (isValidValue(fields()[184], other.var183)) {\n this.var183 = data().deepCopy(fields()[184].schema(), other.var183);\n fieldSetFlags()[184] = true;\n }\n if (isValidValue(fields()[185], other.var184)) {\n this.var184 = data().deepCopy(fields()[185].schema(), other.var184);\n fieldSetFlags()[185] = true;\n }\n if (isValidValue(fields()[186], other.var185)) {\n this.var185 = data().deepCopy(fields()[186].schema(), other.var185);\n fieldSetFlags()[186] = true;\n }\n if (isValidValue(fields()[187], other.var186)) {\n this.var186 = data().deepCopy(fields()[187].schema(), other.var186);\n fieldSetFlags()[187] = true;\n }\n if (isValidValue(fields()[188], other.var187)) {\n this.var187 = data().deepCopy(fields()[188].schema(), other.var187);\n fieldSetFlags()[188] = true;\n }\n if (isValidValue(fields()[189], other.var188)) {\n this.var188 = data().deepCopy(fields()[189].schema(), other.var188);\n fieldSetFlags()[189] = true;\n }\n if (isValidValue(fields()[190], other.var189)) {\n this.var189 = data().deepCopy(fields()[190].schema(), other.var189);\n fieldSetFlags()[190] = true;\n }\n if (isValidValue(fields()[191], other.var190)) {\n this.var190 = data().deepCopy(fields()[191].schema(), other.var190);\n fieldSetFlags()[191] = true;\n }\n if (isValidValue(fields()[192], other.var191)) {\n this.var191 = data().deepCopy(fields()[192].schema(), other.var191);\n fieldSetFlags()[192] = true;\n }\n if (isValidValue(fields()[193], other.var192)) {\n this.var192 = data().deepCopy(fields()[193].schema(), other.var192);\n fieldSetFlags()[193] = true;\n }\n if (isValidValue(fields()[194], other.var193)) {\n this.var193 = data().deepCopy(fields()[194].schema(), other.var193);\n fieldSetFlags()[194] = true;\n }\n if (isValidValue(fields()[195], other.var194)) {\n this.var194 = data().deepCopy(fields()[195].schema(), other.var194);\n fieldSetFlags()[195] = true;\n }\n if (isValidValue(fields()[196], other.var195)) {\n this.var195 = data().deepCopy(fields()[196].schema(), other.var195);\n fieldSetFlags()[196] = true;\n }\n if (isValidValue(fields()[197], other.var196)) {\n this.var196 = data().deepCopy(fields()[197].schema(), other.var196);\n fieldSetFlags()[197] = true;\n }\n if (isValidValue(fields()[198], other.var197)) {\n this.var197 = data().deepCopy(fields()[198].schema(), other.var197);\n fieldSetFlags()[198] = true;\n }\n if (isValidValue(fields()[199], other.var198)) {\n this.var198 = data().deepCopy(fields()[199].schema(), other.var198);\n fieldSetFlags()[199] = true;\n }\n if (isValidValue(fields()[200], other.var199)) {\n this.var199 = data().deepCopy(fields()[200].schema(), other.var199);\n fieldSetFlags()[200] = true;\n }\n if (isValidValue(fields()[201], other.var200)) {\n this.var200 = data().deepCopy(fields()[201].schema(), other.var200);\n fieldSetFlags()[201] = true;\n }\n if (isValidValue(fields()[202], other.var201)) {\n this.var201 = data().deepCopy(fields()[202].schema(), other.var201);\n fieldSetFlags()[202] = true;\n }\n if (isValidValue(fields()[203], other.var202)) {\n this.var202 = data().deepCopy(fields()[203].schema(), other.var202);\n fieldSetFlags()[203] = true;\n }\n if (isValidValue(fields()[204], other.var203)) {\n this.var203 = data().deepCopy(fields()[204].schema(), other.var203);\n fieldSetFlags()[204] = true;\n }\n if (isValidValue(fields()[205], other.var204)) {\n this.var204 = data().deepCopy(fields()[205].schema(), other.var204);\n fieldSetFlags()[205] = true;\n }\n if (isValidValue(fields()[206], other.var205)) {\n this.var205 = data().deepCopy(fields()[206].schema(), other.var205);\n fieldSetFlags()[206] = true;\n }\n if (isValidValue(fields()[207], other.var206)) {\n this.var206 = data().deepCopy(fields()[207].schema(), other.var206);\n fieldSetFlags()[207] = true;\n }\n if (isValidValue(fields()[208], other.var207)) {\n this.var207 = data().deepCopy(fields()[208].schema(), other.var207);\n fieldSetFlags()[208] = true;\n }\n if (isValidValue(fields()[209], other.var208)) {\n this.var208 = data().deepCopy(fields()[209].schema(), other.var208);\n fieldSetFlags()[209] = true;\n }\n if (isValidValue(fields()[210], other.var209)) {\n this.var209 = data().deepCopy(fields()[210].schema(), other.var209);\n fieldSetFlags()[210] = true;\n }\n if (isValidValue(fields()[211], other.var210)) {\n this.var210 = data().deepCopy(fields()[211].schema(), other.var210);\n fieldSetFlags()[211] = true;\n }\n if (isValidValue(fields()[212], other.var211)) {\n this.var211 = data().deepCopy(fields()[212].schema(), other.var211);\n fieldSetFlags()[212] = true;\n }\n if (isValidValue(fields()[213], other.var212)) {\n this.var212 = data().deepCopy(fields()[213].schema(), other.var212);\n fieldSetFlags()[213] = true;\n }\n if (isValidValue(fields()[214], other.var213)) {\n this.var213 = data().deepCopy(fields()[214].schema(), other.var213);\n fieldSetFlags()[214] = true;\n }\n if (isValidValue(fields()[215], other.var214)) {\n this.var214 = data().deepCopy(fields()[215].schema(), other.var214);\n fieldSetFlags()[215] = true;\n }\n if (isValidValue(fields()[216], other.var215)) {\n this.var215 = data().deepCopy(fields()[216].schema(), other.var215);\n fieldSetFlags()[216] = true;\n }\n if (isValidValue(fields()[217], other.var216)) {\n this.var216 = data().deepCopy(fields()[217].schema(), other.var216);\n fieldSetFlags()[217] = true;\n }\n if (isValidValue(fields()[218], other.var217)) {\n this.var217 = data().deepCopy(fields()[218].schema(), other.var217);\n fieldSetFlags()[218] = true;\n }\n if (isValidValue(fields()[219], other.var218)) {\n this.var218 = data().deepCopy(fields()[219].schema(), other.var218);\n fieldSetFlags()[219] = true;\n }\n if (isValidValue(fields()[220], other.var219)) {\n this.var219 = data().deepCopy(fields()[220].schema(), other.var219);\n fieldSetFlags()[220] = true;\n }\n if (isValidValue(fields()[221], other.var220)) {\n this.var220 = data().deepCopy(fields()[221].schema(), other.var220);\n fieldSetFlags()[221] = true;\n }\n if (isValidValue(fields()[222], other.var221)) {\n this.var221 = data().deepCopy(fields()[222].schema(), other.var221);\n fieldSetFlags()[222] = true;\n }\n if (isValidValue(fields()[223], other.var222)) {\n this.var222 = data().deepCopy(fields()[223].schema(), other.var222);\n fieldSetFlags()[223] = true;\n }\n if (isValidValue(fields()[224], other.var223)) {\n this.var223 = data().deepCopy(fields()[224].schema(), other.var223);\n fieldSetFlags()[224] = true;\n }\n if (isValidValue(fields()[225], other.var224)) {\n this.var224 = data().deepCopy(fields()[225].schema(), other.var224);\n fieldSetFlags()[225] = true;\n }\n if (isValidValue(fields()[226], other.var225)) {\n this.var225 = data().deepCopy(fields()[226].schema(), other.var225);\n fieldSetFlags()[226] = true;\n }\n if (isValidValue(fields()[227], other.var226)) {\n this.var226 = data().deepCopy(fields()[227].schema(), other.var226);\n fieldSetFlags()[227] = true;\n }\n if (isValidValue(fields()[228], other.var227)) {\n this.var227 = data().deepCopy(fields()[228].schema(), other.var227);\n fieldSetFlags()[228] = true;\n }\n if (isValidValue(fields()[229], other.var228)) {\n this.var228 = data().deepCopy(fields()[229].schema(), other.var228);\n fieldSetFlags()[229] = true;\n }\n if (isValidValue(fields()[230], other.var229)) {\n this.var229 = data().deepCopy(fields()[230].schema(), other.var229);\n fieldSetFlags()[230] = true;\n }\n if (isValidValue(fields()[231], other.var230)) {\n this.var230 = data().deepCopy(fields()[231].schema(), other.var230);\n fieldSetFlags()[231] = true;\n }\n if (isValidValue(fields()[232], other.var231)) {\n this.var231 = data().deepCopy(fields()[232].schema(), other.var231);\n fieldSetFlags()[232] = true;\n }\n if (isValidValue(fields()[233], other.var232)) {\n this.var232 = data().deepCopy(fields()[233].schema(), other.var232);\n fieldSetFlags()[233] = true;\n }\n if (isValidValue(fields()[234], other.var233)) {\n this.var233 = data().deepCopy(fields()[234].schema(), other.var233);\n fieldSetFlags()[234] = true;\n }\n if (isValidValue(fields()[235], other.var234)) {\n this.var234 = data().deepCopy(fields()[235].schema(), other.var234);\n fieldSetFlags()[235] = true;\n }\n if (isValidValue(fields()[236], other.var235)) {\n this.var235 = data().deepCopy(fields()[236].schema(), other.var235);\n fieldSetFlags()[236] = true;\n }\n if (isValidValue(fields()[237], other.var236)) {\n this.var236 = data().deepCopy(fields()[237].schema(), other.var236);\n fieldSetFlags()[237] = true;\n }\n if (isValidValue(fields()[238], other.var237)) {\n this.var237 = data().deepCopy(fields()[238].schema(), other.var237);\n fieldSetFlags()[238] = true;\n }\n if (isValidValue(fields()[239], other.var238)) {\n this.var238 = data().deepCopy(fields()[239].schema(), other.var238);\n fieldSetFlags()[239] = true;\n }\n if (isValidValue(fields()[240], other.var239)) {\n this.var239 = data().deepCopy(fields()[240].schema(), other.var239);\n fieldSetFlags()[240] = true;\n }\n if (isValidValue(fields()[241], other.var240)) {\n this.var240 = data().deepCopy(fields()[241].schema(), other.var240);\n fieldSetFlags()[241] = true;\n }\n if (isValidValue(fields()[242], other.var241)) {\n this.var241 = data().deepCopy(fields()[242].schema(), other.var241);\n fieldSetFlags()[242] = true;\n }\n if (isValidValue(fields()[243], other.var242)) {\n this.var242 = data().deepCopy(fields()[243].schema(), other.var242);\n fieldSetFlags()[243] = true;\n }\n if (isValidValue(fields()[244], other.var243)) {\n this.var243 = data().deepCopy(fields()[244].schema(), other.var243);\n fieldSetFlags()[244] = true;\n }\n if (isValidValue(fields()[245], other.var244)) {\n this.var244 = data().deepCopy(fields()[245].schema(), other.var244);\n fieldSetFlags()[245] = true;\n }\n if (isValidValue(fields()[246], other.var245)) {\n this.var245 = data().deepCopy(fields()[246].schema(), other.var245);\n fieldSetFlags()[246] = true;\n }\n if (isValidValue(fields()[247], other.var246)) {\n this.var246 = data().deepCopy(fields()[247].schema(), other.var246);\n fieldSetFlags()[247] = true;\n }\n if (isValidValue(fields()[248], other.var247)) {\n this.var247 = data().deepCopy(fields()[248].schema(), other.var247);\n fieldSetFlags()[248] = true;\n }\n if (isValidValue(fields()[249], other.var248)) {\n this.var248 = data().deepCopy(fields()[249].schema(), other.var248);\n fieldSetFlags()[249] = true;\n }\n if (isValidValue(fields()[250], other.var249)) {\n this.var249 = data().deepCopy(fields()[250].schema(), other.var249);\n fieldSetFlags()[250] = true;\n }\n if (isValidValue(fields()[251], other.var250)) {\n this.var250 = data().deepCopy(fields()[251].schema(), other.var250);\n fieldSetFlags()[251] = true;\n }\n if (isValidValue(fields()[252], other.var251)) {\n this.var251 = data().deepCopy(fields()[252].schema(), other.var251);\n fieldSetFlags()[252] = true;\n }\n if (isValidValue(fields()[253], other.var252)) {\n this.var252 = data().deepCopy(fields()[253].schema(), other.var252);\n fieldSetFlags()[253] = true;\n }\n if (isValidValue(fields()[254], other.var253)) {\n this.var253 = data().deepCopy(fields()[254].schema(), other.var253);\n fieldSetFlags()[254] = true;\n }\n if (isValidValue(fields()[255], other.var254)) {\n this.var254 = data().deepCopy(fields()[255].schema(), other.var254);\n fieldSetFlags()[255] = true;\n }\n if (isValidValue(fields()[256], other.var255)) {\n this.var255 = data().deepCopy(fields()[256].schema(), other.var255);\n fieldSetFlags()[256] = true;\n }\n if (isValidValue(fields()[257], other.var256)) {\n this.var256 = data().deepCopy(fields()[257].schema(), other.var256);\n fieldSetFlags()[257] = true;\n }\n if (isValidValue(fields()[258], other.var257)) {\n this.var257 = data().deepCopy(fields()[258].schema(), other.var257);\n fieldSetFlags()[258] = true;\n }\n if (isValidValue(fields()[259], other.var258)) {\n this.var258 = data().deepCopy(fields()[259].schema(), other.var258);\n fieldSetFlags()[259] = true;\n }\n if (isValidValue(fields()[260], other.var259)) {\n this.var259 = data().deepCopy(fields()[260].schema(), other.var259);\n fieldSetFlags()[260] = true;\n }\n if (isValidValue(fields()[261], other.var260)) {\n this.var260 = data().deepCopy(fields()[261].schema(), other.var260);\n fieldSetFlags()[261] = true;\n }\n if (isValidValue(fields()[262], other.var261)) {\n this.var261 = data().deepCopy(fields()[262].schema(), other.var261);\n fieldSetFlags()[262] = true;\n }\n if (isValidValue(fields()[263], other.var262)) {\n this.var262 = data().deepCopy(fields()[263].schema(), other.var262);\n fieldSetFlags()[263] = true;\n }\n if (isValidValue(fields()[264], other.var263)) {\n this.var263 = data().deepCopy(fields()[264].schema(), other.var263);\n fieldSetFlags()[264] = true;\n }\n if (isValidValue(fields()[265], other.var264)) {\n this.var264 = data().deepCopy(fields()[265].schema(), other.var264);\n fieldSetFlags()[265] = true;\n }\n if (isValidValue(fields()[266], other.var265)) {\n this.var265 = data().deepCopy(fields()[266].schema(), other.var265);\n fieldSetFlags()[266] = true;\n }\n if (isValidValue(fields()[267], other.var266)) {\n this.var266 = data().deepCopy(fields()[267].schema(), other.var266);\n fieldSetFlags()[267] = true;\n }\n if (isValidValue(fields()[268], other.var267)) {\n this.var267 = data().deepCopy(fields()[268].schema(), other.var267);\n fieldSetFlags()[268] = true;\n }\n if (isValidValue(fields()[269], other.var268)) {\n this.var268 = data().deepCopy(fields()[269].schema(), other.var268);\n fieldSetFlags()[269] = true;\n }\n if (isValidValue(fields()[270], other.var269)) {\n this.var269 = data().deepCopy(fields()[270].schema(), other.var269);\n fieldSetFlags()[270] = true;\n }\n if (isValidValue(fields()[271], other.var270)) {\n this.var270 = data().deepCopy(fields()[271].schema(), other.var270);\n fieldSetFlags()[271] = true;\n }\n if (isValidValue(fields()[272], other.var271)) {\n this.var271 = data().deepCopy(fields()[272].schema(), other.var271);\n fieldSetFlags()[272] = true;\n }\n if (isValidValue(fields()[273], other.var272)) {\n this.var272 = data().deepCopy(fields()[273].schema(), other.var272);\n fieldSetFlags()[273] = true;\n }\n if (isValidValue(fields()[274], other.var273)) {\n this.var273 = data().deepCopy(fields()[274].schema(), other.var273);\n fieldSetFlags()[274] = true;\n }\n if (isValidValue(fields()[275], other.var274)) {\n this.var274 = data().deepCopy(fields()[275].schema(), other.var274);\n fieldSetFlags()[275] = true;\n }\n if (isValidValue(fields()[276], other.var275)) {\n this.var275 = data().deepCopy(fields()[276].schema(), other.var275);\n fieldSetFlags()[276] = true;\n }\n if (isValidValue(fields()[277], other.var276)) {\n this.var276 = data().deepCopy(fields()[277].schema(), other.var276);\n fieldSetFlags()[277] = true;\n }\n if (isValidValue(fields()[278], other.var277)) {\n this.var277 = data().deepCopy(fields()[278].schema(), other.var277);\n fieldSetFlags()[278] = true;\n }\n if (isValidValue(fields()[279], other.var278)) {\n this.var278 = data().deepCopy(fields()[279].schema(), other.var278);\n fieldSetFlags()[279] = true;\n }\n if (isValidValue(fields()[280], other.var279)) {\n this.var279 = data().deepCopy(fields()[280].schema(), other.var279);\n fieldSetFlags()[280] = true;\n }\n if (isValidValue(fields()[281], other.var280)) {\n this.var280 = data().deepCopy(fields()[281].schema(), other.var280);\n fieldSetFlags()[281] = true;\n }\n if (isValidValue(fields()[282], other.var281)) {\n this.var281 = data().deepCopy(fields()[282].schema(), other.var281);\n fieldSetFlags()[282] = true;\n }\n if (isValidValue(fields()[283], other.var282)) {\n this.var282 = data().deepCopy(fields()[283].schema(), other.var282);\n fieldSetFlags()[283] = true;\n }\n if (isValidValue(fields()[284], other.var283)) {\n this.var283 = data().deepCopy(fields()[284].schema(), other.var283);\n fieldSetFlags()[284] = true;\n }\n if (isValidValue(fields()[285], other.var284)) {\n this.var284 = data().deepCopy(fields()[285].schema(), other.var284);\n fieldSetFlags()[285] = true;\n }\n if (isValidValue(fields()[286], other.var285)) {\n this.var285 = data().deepCopy(fields()[286].schema(), other.var285);\n fieldSetFlags()[286] = true;\n }\n if (isValidValue(fields()[287], other.var286)) {\n this.var286 = data().deepCopy(fields()[287].schema(), other.var286);\n fieldSetFlags()[287] = true;\n }\n if (isValidValue(fields()[288], other.var287)) {\n this.var287 = data().deepCopy(fields()[288].schema(), other.var287);\n fieldSetFlags()[288] = true;\n }\n if (isValidValue(fields()[289], other.var288)) {\n this.var288 = data().deepCopy(fields()[289].schema(), other.var288);\n fieldSetFlags()[289] = true;\n }\n if (isValidValue(fields()[290], other.var289)) {\n this.var289 = data().deepCopy(fields()[290].schema(), other.var289);\n fieldSetFlags()[290] = true;\n }\n if (isValidValue(fields()[291], other.var290)) {\n this.var290 = data().deepCopy(fields()[291].schema(), other.var290);\n fieldSetFlags()[291] = true;\n }\n if (isValidValue(fields()[292], other.var291)) {\n this.var291 = data().deepCopy(fields()[292].schema(), other.var291);\n fieldSetFlags()[292] = true;\n }\n if (isValidValue(fields()[293], other.var292)) {\n this.var292 = data().deepCopy(fields()[293].schema(), other.var292);\n fieldSetFlags()[293] = true;\n }\n if (isValidValue(fields()[294], other.var293)) {\n this.var293 = data().deepCopy(fields()[294].schema(), other.var293);\n fieldSetFlags()[294] = true;\n }\n if (isValidValue(fields()[295], other.var294)) {\n this.var294 = data().deepCopy(fields()[295].schema(), other.var294);\n fieldSetFlags()[295] = true;\n }\n if (isValidValue(fields()[296], other.var295)) {\n this.var295 = data().deepCopy(fields()[296].schema(), other.var295);\n fieldSetFlags()[296] = true;\n }\n if (isValidValue(fields()[297], other.var296)) {\n this.var296 = data().deepCopy(fields()[297].schema(), other.var296);\n fieldSetFlags()[297] = true;\n }\n if (isValidValue(fields()[298], other.var297)) {\n this.var297 = data().deepCopy(fields()[298].schema(), other.var297);\n fieldSetFlags()[298] = true;\n }\n if (isValidValue(fields()[299], other.var298)) {\n this.var298 = data().deepCopy(fields()[299].schema(), other.var298);\n fieldSetFlags()[299] = true;\n }\n if (isValidValue(fields()[300], other.var299)) {\n this.var299 = data().deepCopy(fields()[300].schema(), other.var299);\n fieldSetFlags()[300] = true;\n }\n if (isValidValue(fields()[301], other.var300)) {\n this.var300 = data().deepCopy(fields()[301].schema(), other.var300);\n fieldSetFlags()[301] = true;\n }\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\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}", "@Override\n public AbstractlyUnmodifiedClassDeclarationNode<T> deepCopy(BsjNodeFactory factory);", "private Builder(com.politrons.avro.AvroPerson.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.username)) {\n this.username = data().deepCopy(fields()[1].schema(), other.username);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.email_address)) {\n this.email_address = data().deepCopy(fields()[2].schema(), other.email_address);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.phone_number)) {\n this.phone_number = data().deepCopy(fields()[3].schema(), other.phone_number);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.first_name)) {\n this.first_name = data().deepCopy(fields()[4].schema(), other.first_name);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.last_name)) {\n this.last_name = data().deepCopy(fields()[5].schema(), other.last_name);\n fieldSetFlags()[5] = true;\n }\n }", "public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = FListInteger.add(l2, new Integer(7));\n l4 = new EmptyList();\n l5 = FListInteger.add(l2, new Integer(7));\n }", "private RandomData() {\n initFields();\n }", "public Person(Person o){\n destinationFloor=o.getDestinationFloor();\n }", "private Builder(com.politrons.avro.AvroPerson other) {\n super(com.politrons.avro.AvroPerson.SCHEMA$);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.username)) {\n this.username = data().deepCopy(fields()[1].schema(), other.username);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.email_address)) {\n this.email_address = data().deepCopy(fields()[2].schema(), other.email_address);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.phone_number)) {\n this.phone_number = data().deepCopy(fields()[3].schema(), other.phone_number);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.first_name)) {\n this.first_name = data().deepCopy(fields()[4].schema(), other.first_name);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.last_name)) {\n this.last_name = data().deepCopy(fields()[5].schema(), other.last_name);\n fieldSetFlags()[5] = true;\n }\n }", "public static void initialize() {\r\n\t\tgraph = null;\r\n\t\tmseeObjectNames = new HashMap<String, String>();\r\n\t\tmseeEventTypes = new HashMap<String, String>();\r\n\t\tmodifiedIdentifiers = new HashMap<String, String>();\r\n\t}", "private void shallowPopulate()\n\t{\n\t\tfor(int y = 0; y < mySizeY; y++)\t\t \n\t\t\tfor(int x = 0; x < mySizeX; x++)\t\t\t\n\t\t\t\tadd(new FirstCell(this, x, y));\n\t}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "protected IRFunctional() {\n _name = null;\n _params = null;\n _args = null;\n _fds = null;\n _vds = null;\n _body = null;\n }", "private Builder(TransferSerialMessage other) {\n super(TransferSerialMessage.SCHEMA$);\n if (isValidValue(fields()[0], other.accountID)) {\n this.accountID = data().deepCopy(fields()[0].schema(), other.accountID);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.createDate)) {\n this.createDate = data().deepCopy(fields()[2].schema(), other.createDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.TransferSerials)) {\n this.TransferSerials = data().deepCopy(fields()[3].schema(), other.TransferSerials);\n fieldSetFlags()[3] = true;\n }\n }", "public Route(Route r){\n\t\tvisits.addAll(r.visits);\n\t\tarrivalTimes.addAll(r.arrivalTimes);\n\t\tdepartureTimes.addAll(r.departureTimes);\n\t\tlocked.addAll(r.locked);\n\t\tspeed = r.speed;\n\t}", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "private void __sep__Constructors__() {}", "public FinalClassExample(int id, String name, HashMap<String, String> testMap) {\n\t\tsuper();\n\t\tSystem.out.println(\"Performing Deep Copy for Object initialization\");\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tHashMap<String, String> tempMap = new HashMap<>();\n\t\tIterator<String> keySet = testMap.keySet().iterator();\n\t\twhile(keySet.hasNext()) {\n\t\t\tString key = keySet.next();\n\t\t\ttempMap.put(key, testMap.get(key));\n\t\t}\n\t\tthis.testMap = tempMap;\n\t\t\n\t}", "private DataObject(Builder builder) {\n super(builder);\n }", "public Request(Request other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetUrl()) {\n this.url = other.url;\n }\n if (other.isSetMethod()) {\n this.method = other.method;\n }\n if (other.isSetMeta()) {\n Map<String,String> __this__meta = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.meta.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__meta_copy_key = other_element_key;\n\n String __this__meta_copy_value = other_element_value;\n\n __this__meta.put(__this__meta_copy_key, __this__meta_copy_value);\n }\n this.meta = __this__meta;\n }\n if (other.isSetBody()) {\n this.body = other.body;\n }\n if (other.isSetHeaders()) {\n Map<String,String> __this__headers = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.headers.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__headers_copy_key = other_element_key;\n\n String __this__headers_copy_value = other_element_value;\n\n __this__headers.put(__this__headers_copy_key, __this__headers_copy_value);\n }\n this.headers = __this__headers;\n }\n if (other.isSetCookies()) {\n Map<String,String> __this__cookies = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.cookies.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__cookies_copy_key = other_element_key;\n\n String __this__cookies_copy_value = other_element_value;\n\n __this__cookies.put(__this__cookies_copy_key, __this__cookies_copy_value);\n }\n this.cookies = __this__cookies;\n }\n if (other.isSetEncoding()) {\n this.encoding = other.encoding;\n }\n this.priority = other.priority;\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "private Instances deepCopy(Instances data) {\n Instances newInst = new Instances(data);\n\n newInst.clear();\n\n for (int i = 0; i < data.size(); i++) {\n Instance ni = new DenseInstance(data.numAttributes());\n for (int j = 0; j < data.numAttributes(); j++) {\n ni.setValue(newInst.attribute(j), data.instance(i).value(data.attribute(j)));\n }\n newInst.add(ni);\n }\n\n return newInst;\n }", "protected Value(Value v) {\n flags = v.flags;\n num = v.num;\n str = v.str;\n object_labels = v.object_labels;\n getters = v.getters;\n setters = v.setters;\n excluded_strings = v.excluded_strings;\n included_strings = v.included_strings;\n functionPartitions = v.functionPartitions;\n functionTypeSignatures = v.functionTypeSignatures;\n var = v.var;\n hashcode = v.hashcode;\n }", "private void constructorPostProcessing()\n {\n prepareNextRequest();\n fetchNextBatch();\n advanceObjectSummary();\n }", "private FieldInfo() {\r\n\t}", "public void deepCopy(SL_Obj fromObj,SL_ContainerObj trgContainer) {\n rootObj.set_patchRefsMap(new HashMap<SL_Obj, SL_Obj>());\n _deepCopyInternal(fromObj, trgContainer);\n _patchReferencesInternal(fromObj);\n rootObj.set_patchRefsMap(null);\n\n }", "Object clone();", "Object clone();", "public FrameBodyASPI(final FrameBodyASPI copyObject) {\r\n super(copyObject);\r\n fraction = (short[]) copyObject.fraction.clone();\r\n bitsPerPoint = copyObject.bitsPerPoint;\r\n dataLength = copyObject.dataLength;\r\n dataStart = copyObject.dataStart;\r\n indexPoints = copyObject.indexPoints;\r\n }", "public EmployeeSet(Object obj)\n\t{\n\t\tif((obj != null) && (obj instanceof EmployeeSet))\n\t\t{\n\t\t\t//proceed to create a new instance of EmployeeSet\n\t\t\tEmployeeSet copiedEmployeeSet = (EmployeeSet) obj;\n\t\t\tthis.employeeData = copiedEmployeeSet.employeeData;\n\t\t\tthis.numOfEmployees = copiedEmployeeSet.numOfEmployees;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//throw new IllegalArgumentException(\"Unable to activate copy constructor. Object to be copied from is either a null object or is not an EmployeeSet object\");\n\t\t\tSystem.out.println(\"ERROR: Unable to activate copy constructor. Object to be copied from is either a null object or is not an EmployeeSet object\");\n\t\t}\n\t}", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "public ReviewDTO(ReviewEntity entity) {\n\n this.id = entity.getId();\n this.name = entity.getName();\n this.source = entity.getSource();\n this.description = entity.getDescription();\n }", "private void initialize()\r\n {\r\n this.workspace = null;\r\n this.currentUser = null;\r\n this.created = new Date();\r\n this.securityInfo = null;\r\n }", "private Builder(com.example.DNSLog other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.uid)) {\n this.uid = data().deepCopy(fields()[0].schema(), other.uid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.originh)) {\n this.originh = data().deepCopy(fields()[1].schema(), other.originh);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.originp)) {\n this.originp = data().deepCopy(fields()[2].schema(), other.originp);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.resph)) {\n this.resph = data().deepCopy(fields()[3].schema(), other.resph);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.respp)) {\n this.respp = data().deepCopy(fields()[4].schema(), other.respp);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.proto)) {\n this.proto = data().deepCopy(fields()[5].schema(), other.proto);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.port)) {\n this.port = data().deepCopy(fields()[6].schema(), other.port);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.ts)) {\n this.ts = data().deepCopy(fields()[7].schema(), other.ts);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.query)) {\n this.query = data().deepCopy(fields()[8].schema(), other.query);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.qclass)) {\n this.qclass = data().deepCopy(fields()[9].schema(), other.qclass);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.qclassname)) {\n this.qclassname = data().deepCopy(fields()[10].schema(), other.qclassname);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.qtype)) {\n this.qtype = data().deepCopy(fields()[11].schema(), other.qtype);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.qtypename)) {\n this.qtypename = data().deepCopy(fields()[12].schema(), other.qtypename);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.rcode)) {\n this.rcode = data().deepCopy(fields()[13].schema(), other.rcode);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.rcodename)) {\n this.rcodename = data().deepCopy(fields()[14].schema(), other.rcodename);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.Z)) {\n this.Z = data().deepCopy(fields()[15].schema(), other.Z);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.OR)) {\n this.OR = data().deepCopy(fields()[16].schema(), other.OR);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.AA)) {\n this.AA = data().deepCopy(fields()[17].schema(), other.AA);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.TC)) {\n this.TC = data().deepCopy(fields()[18].schema(), other.TC);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.rejected)) {\n this.rejected = data().deepCopy(fields()[19].schema(), other.rejected);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.Answers)) {\n this.Answers = data().deepCopy(fields()[20].schema(), other.Answers);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.TLLs)) {\n this.TLLs = data().deepCopy(fields()[21].schema(), other.TLLs);\n fieldSetFlags()[21] = true;\n }\n }", "public Record(Record other) {\n if (other.isSetAttrs()) {\n List<AttrVal> __this__attrs = new ArrayList<AttrVal>(other.attrs.size());\n for (AttrVal other_element : other.attrs) {\n __this__attrs.add(new AttrVal(other_element));\n }\n this.attrs = __this__attrs;\n }\n }", "private void initObjects() {\n inputValidation = new InputValidation(activity);\n databaseHelper = new DatabaseHelper(activity);\n user = new User();\n }", "public Database(final Database toCopy) {\n this.source = toCopy.source;\n this.catalog = toCopy.catalog;\n this.schema = toCopy.schema;\n this.timezone = toCopy.timezone;\n this.hints = toCopy.hints;\n this.properties = toCopy.properties;\n }", "private void init() {\n this.listaObjetos = new ArrayList();\n this.root = null;\n this.objeto = new Tblobjeto();\n this.pagina = new Tblpagina();\n this.selectedObj = null;\n this.menus = null;\n this.subMenus = null;\n this.acciones = null;\n this.nodes = new ArrayList<TreeNode>();\n this.selectedObjeto = null;\n this.selectedTipo = null;\n this.renderPaginaForm = null;\n this.renderGrupoForm = null;\n this.selectedGrupo = null;\n this.populateTreeTable();\n }", "protected void init() {\n init(null);\n }" ]
[ "0.6631527", "0.61600024", "0.61242044", "0.6050419", "0.599207", "0.5939931", "0.5915114", "0.58601314", "0.58004194", "0.5793185", "0.57684714", "0.5760259", "0.5693737", "0.56656003", "0.56471723", "0.56306785", "0.5610825", "0.55910957", "0.5586706", "0.5576121", "0.5548685", "0.5516582", "0.549501", "0.54900324", "0.54800326", "0.54714274", "0.54691917", "0.5457604", "0.54487145", "0.5410333", "0.54031986", "0.53974164", "0.53935564", "0.5387844", "0.53811014", "0.5375482", "0.5362766", "0.535985", "0.5357653", "0.5357653", "0.53519446", "0.5351539", "0.53482336", "0.5337493", "0.533387", "0.5331515", "0.5329002", "0.532783", "0.5319998", "0.531549", "0.5314968", "0.53136927", "0.5308695", "0.5301165", "0.5296402", "0.5288104", "0.52871525", "0.52869636", "0.5286346", "0.5277811", "0.5274586", "0.5270507", "0.5266296", "0.5264112", "0.52533466", "0.5248437", "0.52332383", "0.5232755", "0.5231622", "0.5230765", "0.5230283", "0.52274865", "0.5224122", "0.52238923", "0.52156293", "0.5214446", "0.52123696", "0.52095073", "0.5208927", "0.52065754", "0.5205879", "0.5203692", "0.5203323", "0.5202982", "0.52010614", "0.5200987", "0.5200152", "0.51987517", "0.5197622", "0.5197622", "0.5196631", "0.519558", "0.5194625", "0.5193814", "0.5188618", "0.5187018", "0.5183882", "0.51827615", "0.51825505", "0.51824397", "0.5178165" ]
0.0
-1
/ Access modifiers changed, original: final|synthetic
public final /* synthetic */ void lambda$logout$1$SettingViewModel(Boolean bool) { if (bool.booleanValue()) { this.navigator.logout(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n boolean isFinal() {\n return false;\n }", "public final void mo91715d() {\n }", "public abstract void mo70713b();", "public void method_4270() {}", "public void m23075a() {\n }", "public abstract Object mo26777y();", "public abstract void mo27386d();", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public void mo38117a() {\n }", "private final void i() {\n }", "public void mo21779D() {\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "public abstract void mo56925d();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void m15813a();", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract void mo30696a();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void m1864a() {\r\n }", "private abstract void privateabstract();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void mo42329d();", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "@Override\n public boolean isFinal() {\n return true;\n }", "public abstract Object mo1771a();", "public abstract void mo27464a();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "public void mo21825b() {\n }", "public abstract void mo42331g();", "protected boolean func_70814_o() { return true; }", "public abstract void mo35054b();", "public void mo23813b() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public abstract String mo13682d();", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public void mo21793R() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void getExras() {\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}", "public void mo1531a() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "public void mo4359a() {\n }", "public void mo21785J() {\n }", "public void mo115190b() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo21878t() {\n }", "public void gored() {\n\t\t\n\t}", "public abstract void mo102899a();", "public Methods() {\n // what is this doing? -PMC\n }", "protected void h() {}", "private Infer() {\n\n }", "public void mo21782G() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract String mo118046b();", "@Override\n\tpublic void leti() \n\t{\n\t}", "public void mo12930a() {\n }", "public void mo21787L() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void get() {}", "public void mo3749d() {\n }", "public void mo56167c() {\n }", "public abstract String mo41079d();", "public abstract void mo6549b();", "private TMCourse() {\n\t}", "private void ss(){\n }", "@Override\n protected void getExras() {\n }", "public void mo115188a() {\n }" ]
[ "0.68617284", "0.6812668", "0.65955913", "0.6578562", "0.64915705", "0.64714926", "0.64693224", "0.6417546", "0.6378301", "0.6370781", "0.63683546", "0.6352732", "0.6339567", "0.6336902", "0.6329724", "0.6309058", "0.629981", "0.62498575", "0.6243633", "0.62333345", "0.6218986", "0.62008375", "0.6200302", "0.61949056", "0.6194738", "0.61921066", "0.61900157", "0.6169592", "0.615769", "0.6126763", "0.6112483", "0.6104", "0.60988677", "0.60981274", "0.60825545", "0.6080897", "0.6075796", "0.6074976", "0.607433", "0.6070256", "0.60652035", "0.60638136", "0.6058283", "0.60581166", "0.60574293", "0.60574293", "0.603777", "0.6036071", "0.6030002", "0.6025948", "0.6025948", "0.60218096", "0.60069", "0.59976554", "0.59912026", "0.59882116", "0.5977116", "0.59760535", "0.5974698", "0.59601426", "0.59557086", "0.5954647", "0.59475696", "0.5945045", "0.5945039", "0.5938707", "0.59379804", "0.59365207", "0.59365207", "0.5934352", "0.59328693", "0.5927019", "0.5917879", "0.59110314", "0.5910916", "0.5908368", "0.59054345", "0.59011966", "0.5899056", "0.58989716", "0.5898278", "0.5895711", "0.58957076", "0.58952355", "0.588686", "0.5877854", "0.5873988", "0.5872739", "0.5872443", "0.5871506", "0.5871328", "0.58711445", "0.5868449", "0.5865592", "0.5863246", "0.58625627", "0.5860225", "0.58583796", "0.58567035", "0.5855862", "0.58549815" ]
0.0
-1
/ Access modifiers changed, original: final|synthetic
public final /* synthetic */ void lambda$withdrawal$3$SettingViewModel(Boolean bool) { if (bool.booleanValue()) { this.navigator.withdrawal(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n boolean isFinal() {\n return false;\n }", "public final void mo91715d() {\n }", "public abstract void mo70713b();", "public void method_4270() {}", "public void m23075a() {\n }", "public abstract Object mo26777y();", "public abstract void mo27386d();", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public void mo38117a() {\n }", "private final void i() {\n }", "public void mo21779D() {\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "public abstract void mo56925d();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void m15813a();", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract void mo30696a();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void m1864a() {\r\n }", "private abstract void privateabstract();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void mo42329d();", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "@Override\n public boolean isFinal() {\n return true;\n }", "public abstract Object mo1771a();", "public abstract void mo27464a();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "public void mo21825b() {\n }", "public abstract void mo42331g();", "protected boolean func_70814_o() { return true; }", "public abstract void mo35054b();", "public void mo23813b() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public abstract String mo13682d();", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public void mo21793R() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void getExras() {\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}", "public void mo1531a() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "public void mo4359a() {\n }", "public void mo21785J() {\n }", "public void mo115190b() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo21878t() {\n }", "public void gored() {\n\t\t\n\t}", "public abstract void mo102899a();", "public Methods() {\n // what is this doing? -PMC\n }", "protected void h() {}", "private Infer() {\n\n }", "public void mo21782G() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract String mo118046b();", "@Override\n\tpublic void leti() \n\t{\n\t}", "public void mo12930a() {\n }", "public void mo21787L() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void get() {}", "public void mo3749d() {\n }", "public void mo56167c() {\n }", "public abstract String mo41079d();", "public abstract void mo6549b();", "private TMCourse() {\n\t}", "private void ss(){\n }", "@Override\n protected void getExras() {\n }", "public void mo115188a() {\n }" ]
[ "0.68617284", "0.6812668", "0.65955913", "0.6578562", "0.64915705", "0.64714926", "0.64693224", "0.6417546", "0.6378301", "0.6370781", "0.63683546", "0.6352732", "0.6339567", "0.6336902", "0.6329724", "0.6309058", "0.629981", "0.62498575", "0.6243633", "0.62333345", "0.6218986", "0.62008375", "0.6200302", "0.61949056", "0.6194738", "0.61921066", "0.61900157", "0.6169592", "0.615769", "0.6126763", "0.6112483", "0.6104", "0.60988677", "0.60981274", "0.60825545", "0.6080897", "0.6075796", "0.6074976", "0.607433", "0.6070256", "0.60652035", "0.60638136", "0.6058283", "0.60581166", "0.60574293", "0.60574293", "0.603777", "0.6036071", "0.6030002", "0.6025948", "0.6025948", "0.60218096", "0.60069", "0.59976554", "0.59912026", "0.59882116", "0.5977116", "0.59760535", "0.5974698", "0.59601426", "0.59557086", "0.5954647", "0.59475696", "0.5945045", "0.5945039", "0.5938707", "0.59379804", "0.59365207", "0.59365207", "0.5934352", "0.59328693", "0.5927019", "0.5917879", "0.59110314", "0.5910916", "0.5908368", "0.59054345", "0.59011966", "0.5899056", "0.58989716", "0.5898278", "0.5895711", "0.58957076", "0.58952355", "0.588686", "0.5877854", "0.5873988", "0.5872739", "0.5872443", "0.5871506", "0.5871328", "0.58711445", "0.5868449", "0.5865592", "0.5863246", "0.58625627", "0.5860225", "0.58583796", "0.58567035", "0.5855862", "0.58549815" ]
0.0
-1
/ Access modifiers changed, original: final|synthetic
public final /* synthetic */ void lambda$showTheme$4$SettingViewModel(Integer num) { this.navigator.showTheme(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n boolean isFinal() {\n return false;\n }", "public final void mo91715d() {\n }", "public abstract void mo70713b();", "public void method_4270() {}", "public void m23075a() {\n }", "public abstract Object mo26777y();", "public abstract void mo27386d();", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public void mo38117a() {\n }", "private final void i() {\n }", "public void mo21779D() {\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "public abstract void mo56925d();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void m15813a();", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract void mo30696a();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void m1864a() {\r\n }", "private abstract void privateabstract();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void mo42329d();", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "@Override\n public boolean isFinal() {\n return true;\n }", "public abstract Object mo1771a();", "public abstract void mo27464a();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "public void mo21825b() {\n }", "public abstract void mo42331g();", "protected boolean func_70814_o() { return true; }", "public abstract void mo35054b();", "public void mo23813b() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public abstract String mo13682d();", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public void mo21793R() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void getExras() {\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}", "public void mo1531a() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "public void mo4359a() {\n }", "public void mo21785J() {\n }", "public void mo115190b() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo21878t() {\n }", "public void gored() {\n\t\t\n\t}", "public abstract void mo102899a();", "public Methods() {\n // what is this doing? -PMC\n }", "protected void h() {}", "private Infer() {\n\n }", "public void mo21782G() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract String mo118046b();", "@Override\n\tpublic void leti() \n\t{\n\t}", "public void mo12930a() {\n }", "public void mo21787L() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void get() {}", "public void mo3749d() {\n }", "public void mo56167c() {\n }", "public abstract String mo41079d();", "public abstract void mo6549b();", "private TMCourse() {\n\t}", "private void ss(){\n }", "@Override\n protected void getExras() {\n }", "public void mo115188a() {\n }" ]
[ "0.68617284", "0.6812668", "0.65955913", "0.6578562", "0.64915705", "0.64714926", "0.64693224", "0.6417546", "0.6378301", "0.6370781", "0.63683546", "0.6352732", "0.6339567", "0.6336902", "0.6329724", "0.6309058", "0.629981", "0.62498575", "0.6243633", "0.62333345", "0.6218986", "0.62008375", "0.6200302", "0.61949056", "0.6194738", "0.61921066", "0.61900157", "0.6169592", "0.615769", "0.6126763", "0.6112483", "0.6104", "0.60988677", "0.60981274", "0.60825545", "0.6080897", "0.6075796", "0.6074976", "0.607433", "0.6070256", "0.60652035", "0.60638136", "0.6058283", "0.60581166", "0.60574293", "0.60574293", "0.603777", "0.6036071", "0.6030002", "0.6025948", "0.6025948", "0.60218096", "0.60069", "0.59976554", "0.59912026", "0.59882116", "0.5977116", "0.59760535", "0.5974698", "0.59601426", "0.59557086", "0.5954647", "0.59475696", "0.5945045", "0.5945039", "0.5938707", "0.59379804", "0.59365207", "0.59365207", "0.5934352", "0.59328693", "0.5927019", "0.5917879", "0.59110314", "0.5910916", "0.5908368", "0.59054345", "0.59011966", "0.5899056", "0.58989716", "0.5898278", "0.5895711", "0.58957076", "0.58952355", "0.588686", "0.5877854", "0.5873988", "0.5872739", "0.5872443", "0.5871506", "0.5871328", "0.58711445", "0.5868449", "0.5865592", "0.5863246", "0.58625627", "0.5860225", "0.58583796", "0.58567035", "0.5855862", "0.58549815" ]
0.0
-1
/ Access modifiers changed, original: final|synthetic
public final /* synthetic */ void lambda$information$5$SettingViewModel(Integer num) { this.navigator.information(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n boolean isFinal() {\n return false;\n }", "public final void mo91715d() {\n }", "public abstract void mo70713b();", "public void method_4270() {}", "public void m23075a() {\n }", "public abstract Object mo26777y();", "public abstract void mo27386d();", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public void mo38117a() {\n }", "private final void i() {\n }", "public void mo21779D() {\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "public abstract void mo56925d();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract void m15813a();", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract void mo30696a();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void m1864a() {\r\n }", "private abstract void privateabstract();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void mo42329d();", "final void getData() {\n\t\t//The final method can't be overriden\n\t}", "@Override\n public boolean isFinal() {\n return true;\n }", "public abstract Object mo1771a();", "public abstract void mo27464a();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "public void mo21825b() {\n }", "public abstract void mo42331g();", "protected boolean func_70814_o() { return true; }", "public abstract void mo35054b();", "public void mo23813b() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public abstract String mo13682d();", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public void mo21793R() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void getExras() {\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}", "public void mo1531a() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "public void mo4359a() {\n }", "public void mo21785J() {\n }", "public void mo115190b() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo21878t() {\n }", "public void gored() {\n\t\t\n\t}", "public abstract void mo102899a();", "public Methods() {\n // what is this doing? -PMC\n }", "protected void h() {}", "private Infer() {\n\n }", "public void mo21782G() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract String mo118046b();", "@Override\n\tpublic void leti() \n\t{\n\t}", "public void mo12930a() {\n }", "public void mo21787L() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void get() {}", "public void mo3749d() {\n }", "public void mo56167c() {\n }", "public abstract String mo41079d();", "public abstract void mo6549b();", "private TMCourse() {\n\t}", "private void ss(){\n }", "@Override\n protected void getExras() {\n }", "public void mo115188a() {\n }" ]
[ "0.68617284", "0.6812668", "0.65955913", "0.6578562", "0.64915705", "0.64714926", "0.64693224", "0.6417546", "0.6378301", "0.6370781", "0.63683546", "0.6352732", "0.6339567", "0.6336902", "0.6329724", "0.6309058", "0.629981", "0.62498575", "0.6243633", "0.62333345", "0.6218986", "0.62008375", "0.6200302", "0.61949056", "0.6194738", "0.61921066", "0.61900157", "0.6169592", "0.615769", "0.6126763", "0.6112483", "0.6104", "0.60988677", "0.60981274", "0.60825545", "0.6080897", "0.6075796", "0.6074976", "0.607433", "0.6070256", "0.60652035", "0.60638136", "0.6058283", "0.60581166", "0.60574293", "0.60574293", "0.603777", "0.6036071", "0.6030002", "0.6025948", "0.6025948", "0.60218096", "0.60069", "0.59976554", "0.59912026", "0.59882116", "0.5977116", "0.59760535", "0.5974698", "0.59601426", "0.59557086", "0.5954647", "0.59475696", "0.5945045", "0.5945039", "0.5938707", "0.59379804", "0.59365207", "0.59365207", "0.5934352", "0.59328693", "0.5927019", "0.5917879", "0.59110314", "0.5910916", "0.5908368", "0.59054345", "0.59011966", "0.5899056", "0.58989716", "0.5898278", "0.5895711", "0.58957076", "0.58952355", "0.588686", "0.5877854", "0.5873988", "0.5872739", "0.5872443", "0.5871506", "0.5871328", "0.58711445", "0.5868449", "0.5865592", "0.5863246", "0.58625627", "0.5860225", "0.58583796", "0.58567035", "0.5855862", "0.58549815" ]
0.0
-1
101tom 118no0086.01 202tomas 217no0075.02 215no00523.12
@Override protected void reduce(CompKey key, Iterable<Text> values, Reducer<CompKey, Text, Text, NullWritable>.Context context) throws IOException, InterruptedException { Iterator<Text> it = values.iterator(); String cinfo = it.next().toString(); while(it.hasNext()){ String oinfo = it.next().toString(); String[] arr = oinfo.split("\t"); String ono = arr[1]; String price = arr[2]; String info = cinfo + "\t" + ono + "\t" + price; System.out.println(info); context.write(new Text(info), NullWritable.get()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String Interpretar(String num) {\r\n\t\tif(num.length() > 3)\r\n\t\t\treturn \"\";\r\n\t\tString salida=\"\";\r\n\t\t\r\n\t\tif(Dataposi(num,2) != 0)\r\n\t\t\tsalida = Centenas[Dataposi(num,2)-1];\r\n\t\t\r\n\t\tint k = Integer.parseInt(String.valueOf(Dataposi(num,1))+String.valueOf(Dataposi(num,0)));\r\n\r\n\t\tif(k <= 20)\r\n\t\t\tsalida += Numero[k];\r\n\t\telse {\r\n\t\t\tif(k > 30 && Dataposi(num,0) != 0)\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + \"Y \" + Numero[Dataposi(num,0)];\r\n\t\t\telse\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + Numero[Dataposi(num,0)];\r\n\t\t}\r\n\t\t//Caso especial con el 100\r\n\t\tif(Dataposi(num,2) == 1 && k == 0)\r\n\t\t\tsalida=\"CIEN\";\r\n\t\t\r\n\t\treturn salida;\r\n\t}", "java.lang.String getField1997();", "public static void main(String[] args) throws IOException, FileNotFoundException {\n\t\t\n\t\t\n\t\tString regex = \"[0-9]+\";\n\t\tString data = \"1313\";\n\t\tSystem.out.println(data.matches(regex));\n\t\tString regex1 = \"[0-9]+\";\n\t\tString data1 = \" 112121 sdf \";\n\t\tSystem.out.println(data1.matches(regex1));\n\t\tString []arr = data1.split(\"\\\\s\"); \n\t\tSystem.out.println(arr.length);\n\t\tSystem.out.println(data1.replaceAll(\"\\\\s+\", \" \").trim());\n\t\t\n\t\t\n\t\t/*\n\t\tFile f=new File(\"D:\\\\april.pdf\");\n\t FileInputStream fileIn;\n\t PdfReader reader;\n\t try {\n\t fileIn=new FileInputStream(f);\n\t reader=new PdfReader(fileIn);\n\t HashMap<String, String> merged=reader.getInfo();\n\t // ByteArrayInputStream bIn=new ByteArrayInputStream(merged);\n\t //BufferedReader bR=new BufferedReader(new InputStreamReader(bIn));\n\t //String line;\n\t //while ((line=bR.readLine()) != null) {\n\t //System.out.println(line);\n\t //}\n\t reader.close();\n\t fileIn.close();\n\t }\n\t catch ( IOException e) {\n\t System.err.println(\"Couldn't read file '\" );\n\t System.err.println(e);\n\t }*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\tfloat width = 612;\n\t\tfloat height = 792;\n\t\tfloat hX = 320, tX = 340, cX = 100;\n\t\tfloat hY = 0, tY = 580, cY = 200;\n\t\tfloat hW = width - hX, tW = width - tX, cW = 100;\n\t\tfloat hH = 80, tH = height - tY, cH = 60;\n\t\tRectangle header = new Rectangle( 150, 150);\n\t\t//\t\tRectangle totals = new Rectangle(cH, cH, cH, cH);\n\t\t//totals.setBounds(tX, tY, tW, tH);\n\t\t//Rectangle customer = new Rectangle();\n\t\t//customer.setBounds(cX, cY, cW, cH);\n\t\tPDFTextStripperByArea stripper = new PDFTextStripperByArea();\n\t\t//stripper.\n\t\t//stripper.addRegion(\"totals\", totals);\n\t\t//stripper.addRegion(\"customer\", customer);\n\t\tstripper.setSortByPosition(true);\n\t\tint j = 0;\n\t\tList pages = pd.getDocumentCatalog().getAllPages();\n\t\tfor (PDPage page : pages) {\n\t\t\tstripper.extractRegions(page);\n\t\t\tList regions = stripper.getRegions();\n\t\t\tfor (String region : regions) {\n\t\t\t\tString text = stripper.getTextForRegion(region);\n\t\t\t\tSystem.out.println(\"Region: \" + region + \" on Page \" + j);\n\t\t\t\tSystem.out.println(\"\\tText: \\n\" + text);\n\t\t\t}\n\t\t\tj++;\n\t\t}*/\n\t}", "java.lang.String getField1996();", "private static String m31929a(String str) {\n String[] split = str.split(\"\\\\.\");\n String str2 = split.length > 0 ? split[split.length - 1] : \"\";\n return str2.length() > 100 ? str2.substring(0, 100) : str2;\n }", "public static void main(String[] args) throws Exception {\n String s;\n// s = \"0000000000000\";\n s = \"000000-123456\";\n// s = \"000000123456\";\n if (s.matches(\"^0+$\")) {\n s = \"0\";\n }else{\n s = s.replaceFirst(\"^0+\",\"\");\n }\n System.out.println(s);\n\n\n// System.out.println(StringUtils.addRight(s,'A',mod));\n// String s = \"ECPay thong bao: Tien dien T11/2015 cua Ma KH PD13000122876, la 389.523VND. Truy cap www.ecpay.vn hoac lien he 1900561230 de biet them chi tiet.\";\n// Pattern pattern = Pattern.compile(\"^(.+)[ ](\\\\d+([.]\\\\d+)*)+VND[.](.+)$\");\n// Matcher matcher = pattern.matcher(s);\n// if(matcher.find()){\n// System.out.println(matcher.group(2));\n// }\n }", "private String parseDescrName(String line) {\n\t\t// d1f74a_ 201-209;3-11 DGAIGSTFN LKGIFSALL #7\n\t\t// d1nvra_ 226-253;184-204 IDSAPLALL GIVLTAMLA 0_0:-5_-8 0.477587\n\t\t// GroupName is created as name of domain (remove proceeding 'd') + pdb\n\t\t// number of the first residue\n\t\t// in the second segment (3-11 in the example) increased by 10000 + '_'\n\t\t// + number of cluster (7 in the case)\n\t\t// the residue with fasta number 3 is translated into address A4_ - so\n\t\t// the pdb number is 4\n\t\t// finally the group name will be 1f74a_#10004_7\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString dom = tokens[0].substring(1);\n\t\tString noClust = \"\";\n\t\t@SuppressWarnings(\"unused\")\n\t\tint shift1 = 0; // segment1 shift\n\t\tint shift2 = 0; // segment2 shift\n\t\ttry {\n\t\t\tif (tokens[4].startsWith(\"#\")) {\n\t\t\t\tnoClust = \"_\" + tokens[4].substring(1);\n\t\t\t} else {\n\t\t\t\tnoClust = \"\";\n\t\t\t}\n\t\t\tif (tokens[4].startsWith(\"0_0\")) {\n\t\t\t\ttokens[4] = tokens[4].replaceFirst(\"0_0:\", \"\");\n\t\t\t\tString[] shifts = tokens[4].split(\"_\");\n\t\t\t\tshift1 = Integer.valueOf(shifts[0]);\n\t\t\t\tshift2 = Integer.valueOf(shifts[1]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// do nothing keep default values\n\t\t}\n\t\t// get the first number of second segment : e.g. 3 from 201-209;3-11\n\t\tString[] tokensA = tokens[1].split(\";\");\n\t\tString[] tokensB = tokensA[1].split(\"-\");\n\t\tInteger fastaNo = (Integer.valueOf(tokensB[0]) - shift2 >= 0 ? Integer\n\t\t\t\t.valueOf(tokensB[0]) - shift2 : Integer.valueOf(tokensB[0]));\n\n\t\t// get pdb address\n\t\tString pdbResAddr = hashResMapInt2Str.get(dom).get(fastaNo);\n\t\tpdbResAddr = pdbResAddr.substring(1, pdbResAddr.length() - 1);\n\t\tint pdbResNo = Integer.valueOf(pdbResAddr);\n\n\t\treturn (dom + \"#\" + (10000 + pdbResNo) + noClust);\n\t}", "java.lang.String getField1993();", "public void testNmCode() throws Exception {\n String nmCode = \"E1-541-392740-1-img.E1-543-392740-1-a.E1-4-DengLu-1-a.E1-38-red&ChaDian-1-a.UT-601-392740-2*2-a\";\r\n //Pattern p = Pattern.compile(\"\\\\w+-(?:543|601)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-\\\\w+\\\\.?\");\r\n Pattern p = Pattern.compile(\"(\\\\w+)-(\\\\w+)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-\\\\w+\\\\.?\");\r\n //Pattern p = Pattern.compile(\".+-(?:639|640)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-.*\");\r\n Matcher m = p.matcher(nmCode);\r\n while (m.find()) {\r\n p(m.group(1) + \",\" + m.group(2) + \",\" + m.group(3));\r\n }\r\n }", "public static void main(String[] args) {\n\t\tDecimalFormat k_10df = new DecimalFormat(\"###,###,###,###,###\");\n //숫자 5 이름 32 가격 15 수량 2 총가격 15\n\t\tString[] k_10itemname = { // item이름을 위한 배열이다\n\t\t\t\t\"01 테스트라면555 3,000 1 3,000\", \n\t\t\t\t\"02* 맛asdadad포카칩 1,000 2 2,000\",\n\t\t\t\t\"03 ddd초코센드위치ss위치 1,000 2 2,000\", \n\t\t\t\t\"04 피시방햄버거는맛없어 1,000 12 13,000\",//틀린거 \n\t\t\t\t\"05* 치즈없는피자 111,000 2 223,000\", \n\t\t\t\t\"06 맛있는포카칩 1,000 2 2,000\", \n\t\t\t\t\"07 뉴질랜드산항이 11,000 2 2,000\", \n\t\t\t\t\"08* 오늘의커피아이스 7,000 2 12,000\", //틀린거 \n\t\t\t\t\"09 시티위아아 1,000 2 2,000\", \n\t\t\t\t\"10 가나가맛있어 1,000 2 2,000\", \n\t\t\t\t\"11 스물두번째과자 800 2 1,600\", \n\t\t\t\t\"12 (싸이버버세트라지 4,000 2 8,000\", \n\t\t\t\t\"13 aaa프링클스오리지널 1,000 2 2,000\",\n\t\t\t\t\"14 55포카칩어니언맛 1,000 2 2,000\", \n\t\t\t\t\"15 떡없는떡볶이 1,000 6 6,000\", \n\t\t\t\t\"16* 호식이두마리치킨 1,000 2 2,000\", \n\t\t\t\t\"17* 땅땅치킨매운맛 3,000 2 6,000\", \n\t\t\t\t\"18 라면은역시매고랭 1,000 2 2,000\", \n\t\t\t\t\"19 된장찌개맛사탕 1,000 2 2,000\", \n\t\t\t\t\"20 삼겹살맛치토스 1,000 2 2,000\", \n\t\t\t\t\"21* 나홀로집에세트 1,000 2 2,000\", \n\t\t\t\t\"22 자바칩세트는맛없다 1,000 2 2,000\",\n\t\t\t\t\"23* 오레오레오레오 1,000 2 2,000\", \n\t\t\t\t\"24 자바에이드 1,000 2 2,000\", \n\t\t\t\t\"25 자이언트자바 1,000 2 2,000\", \n\t\t\t\t\"26 이건오떡오떡 2,000 10 20,100\", // 틀린거 \n\t\t\t\t\"27 마지막과자세트 1,000 11 11,000\", \n\t\t\t\t\"28* 차가운삼각김밥 1,000 2 2,000\", \n\t\t\t\t\"29 신라면짜장맛 1,000 2 2,000\", \n\t\t\t\t\"30 맛탕과김치 1,000 2 2,000\" }; \n\t\t\n\t\tfor (int k_10_i = 0; k_10_i < k_10itemname.length; k_10_i++) {\n\t\t\tString k_10_ToString = k_10itemname[k_10_i].toString();\n\t\t\tbyte [] k_10_bb = k_10_ToString.getBytes();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tString k_10_number = new String (k_10_bb,0,5);\t\t\t\t\t\t\t\t\t\t// 1번째부터 5바이트만큼 크기로 정의\n\t\t\tString k_10_name = new String (k_10_bb,5,33);\t\t\t\t\t\t\t\t\t\t// 6번째부터 33바이트만큼 크기로 정의\n\t\t\tString k_10_price1 = new String (k_10_bb,35,15);\t\t\t\t\t\t\t\t\t// 36번째부터 15바이트만큼 크기로 정의\n\t\t\tString k_10_units1 = new String (k_10_bb,55,10);\t\t\t\t\t\t\t\t\t// 56번째부터 10바이트만큼 크기로 정의\n\t\t\tString k_10_totalprice1 = new String (k_10_bb,60,14);\t\t\t\t\t\t\t\t// 61번째부터 14바이트만큼 크기로 정의\n\t\t\t\n\t\t\tint k_10_price = Integer.parseInt(k_10_price1.replace(\",\", \"\").trim());\t\t\t\t// int로 바꾸고 , 제거 후 공백도 제거\n\t\t\tint k_10_units = Integer.parseInt(k_10_units1.replace(\",\", \"\").trim());\t\t\t\t// int로 바꾸고 , 제거 후 공백도 제거\n\t\t\t\n\t\t\t//String price1 = k_10itemname[i].substring(33, 48);\n\t\t\t\n\t\t\t//String units1 = k_10itemname[i].substring(45, 58);\n\n\t\t\tint k_10_totalprice = Integer.parseInt(k_10_totalprice1.replace(\",\", \"\").trim()); // int로 바꾸고 , 제거 후 공백도 제거\n\t\t\t\n\t\t\tif(k_10_price * k_10_units != k_10_totalprice) {\n\t\t\t\tSystem.out.println(\"******************************\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ( ) 출력\n\t\t\t\tSystem.out.printf(\"오류[%s%s%10s%10s%10s]\\n\", k_10_number, k_10_name, k_10_price1, k_10_units1, k_10df.format(k_10_totalprice));\t\t\t// ( ) 출력\n\t\t\t\tSystem.out.printf(\"수정[%s%s%10s%10s%10s]\\n\", k_10_number, k_10_name, k_10_price1, k_10_units1, k_10df.format(k_10_price * k_10_units));\t// ( ) 출력\n\t\t\t\tSystem.out.println(\"******************************\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ( ) 출력\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"null\")\n public static void main(String[] args) {\n String num[]= {\n \"회계연도\",\"회계명\",\"(수입)수입계획액(원)\",\"(수입)수납금액(원)\",\"(수입)순액(원)\",\"(수입)증감액(원)\",\"(수입)증감순액(원)\",\"(지출)지출계획현액(원)\",\"(지출)지출금액(원)\",\"(지출)순계(원)\",\"(지출)순액(원)\",\"(지출)증감순액(원)\",\"(지출)다음년도이월액(원)\",\"(지출)불용액(원)\",\n \"2017\",\"고용보험기금\",\"13744326000000\",\"20369391827660\",\"13315997827660\",\"6625065827660\",\"-428328172340\",\"13745562552200\",\"20369391827660\",\"13315997827660\",\"-6623829275460\",\"429564724540\",\"678671000\",\"631486395590\",\n \"2017\",\"공공자금관리기금\",\"189776876000000\",\"404256842999040\",\"183224542999040\",\"214479966999040\",\"-6552333000960\",\"189776876000000\",\"404256842999040\",\"183224542999040\",\"-214479966999040\",\"6552333000960\",\"0\",\"7271019279430\",\n \"2017\",\"공무원연금기금\",\"22538866000000\",\"37382431946845\",\"20630823797150\",\"14843565946845\",\"-1908042202850\",\"22545032000000\",\"37382431946845\",\"20630823797150\",\"-14837399946845\",\"1914208202850\",\"1066488200\",\"610806901939\",\n \"2017\",\"공적자금상환기금\",\"16123501000000\",\"15984076342880\",\"15894376342880\",\"-139424657120\",\"-229124657120\",\"16123501000000\",\"15984076342880\",\"15894376342880\",\"139424657120\",\"229124657120\",\"0\",\"147355105660\",\n \"2017\",\"과학기술진흥기금\",\"180979000000\",\"254739557740\",\"146619600420\",\"73760557740\",\"-34359399580\",\"180979000000\",\"254739557740\",\"146619600420\",\"-73760557740\",\"34359399580\",\"0\",\"40809967520\",\n \"2017\",\"관광진흥개발기금\",\"1493556000000\",\"2260249691260\",\"1588453308630\",\"766693691260\",\"94897308630\",\"1494802809970\",\"2260249691260\",\"1588453308630\",\"-765446881290\",\"-93650498660\",\"2179367690\",\"13371325600\",\n \"2017\",\"국민건강증진기금\",\"3974064000000\",\"6342643502890\",\"3686736329250\",\"2368579502890\",\"-287327670750\",\"4030252122930\",\"6342643502890\",\"3686736329250\",\"-2312391379960\",\"343515793680\",\"16423765880\",\"144716500820\",\n \"2017\",\"국민연금기금\",\"108422755000000\",\"440820974127419\",\"122128978859737\",\"332398219127419\",\"13706223859737\",\"108429730671960\",\"440820974127419\",\"122128978859737\",\"-332391243455459\",\"-13699248187777\",\"1575399980\",\"439377913501\",\n \"2017\",\"국민체육진흥기금\",\"1597810000000\",\"2003568719282\",\"2003568719282\",\"405758719282\",\"405758719282\",\"1602164720150\",\"2003568719282\",\"2003568719282\",\"-401403999132\",\"-401403999132\",\"2128957600\",\"48955211990\",\n \"2017\",\"국유재산관리기금\",\"1227962000000\",\"3110165835830\",\"1268887204949\",\"1882203835830\",\"40925204949\",\"1476165337260\",\"3110165835830\",\"1268887204949\",\"-1634000498570\",\"207278132311\",\"250737379020\",\"126552056950\",\n \"2017\",\"국제교류기금\",\"108471000000\",\"132308781414\",\"132308781414\",\"23837781414\",\"23837781414\",\"108471000000\",\"132308781414\",\"132308781414\",\"-23837781414\",\"-23837781414\",\"1518000000\",\"9244859988\",\n \"2017\",\"국제질병퇴치기금\",\"83129000000\",\"92763940261\",\"92763940261\",\"9634940261\",\"9634940261\",\"83129000000\",\"92763940261\",\"92763940261\",\"-9634940261\",\"-9634940261\",\"276275400\",\"561141097\",\n \"2017\",\"군인복지기금\",\"1318187000000\",\"829479208950\",\"829479208950\",\"-488707791050\",\"-488707791050\",\"1319382699730\",\"829479208950\",\"829479208950\",\"489903490780\",\"489903490780\",\"4562556510\",\"39398198850\",\n \"2017\",\"군인연금기금\",\"3145114000000\",\"5921214590440\",\"3166114590440\",\"2776100590440\",\"21000590440\",\"3145166700000\",\"5921214590440\",\"3166114590440\",\"-2776047890440\",\"-20947890440\",\"0\",\"5963055840\",\n \"2017\",\"근로복지진흥기금\",\"326573000000\",\"1839757038827\",\"287310709194\",\"1513184038827\",\"-39262290806\",\"326573000000\",\"1839757038827\",\"287310709194\",\"-1513184038827\",\"39262290806\",\"0\",\"5396143584\",\n \"2017\",\"금강수계관리기금\",\"115888000000\",\"229111068640\",\"123174068640\",\"113223068640\",\"7286068640\",\"116928194400\",\"229111068640\",\"123174068640\",\"-112182874240\",\"-6245874240\",\"773288078\",\"521939301\",\n \"2017\",\"기술보증기금\",\"2459797000000\",\"2935409356436\",\"2935409356436\",\"475612356436\",\"475612356436\",\"2459797000000\",\"2935409356436\",\"2935409356436\",\"-475612356436\",\"-475612356436\",\"0\",\"22761421796\",\n \"2017\",\"낙동강수계관리기금\",\"242129000000\",\"478207061365\",\"256804061365\",\"236078061365\",\"14675061365\",\"243359738351\",\"478207061365\",\"256804061365\",\"-234847323014\",\"-13444323014\",\"639744122\",\"896338278\",\n \"2017\",\"남북협력기금\",\"1970786000000\",\"1558859976590\",\"1196698745110\",\"-411926023410\",\"-774087254890\",\"1973229136680\",\"1558859976590\",\"1196698745110\",\"414369160090\",\"776530391570\",\"41411647650\",\"872170807440\",\n \"2017\",\"농림수산업자신용보증기금\",\"1007434000000\",\"1339296763232\",\"1339296763232\",\"331862763232\",\"331862763232\",\"1007434000000\",\"1339296763232\",\"1339296763232\",\"-331862763232\",\"-331862763232\",\"0\",\"8785357432\",\n \"2017\",\"농산물가격안정기금\",\"2885008000000\",\"3647638241960\",\"2311260285832\",\"762630241960\",\"-573747714168\",\"2885456767970\",\"3647638241960\",\"2311260285832\",\"-762181473990\",\"574196482138\",\"0\",\"228284718350\",\n \"2017\",\"농어가목돈마련저축장려기금\",\"86563000000\",\"95169395440\",\"83099395440\",\"8606395440\",\"-3463604560\",\"86563000000\",\"95169395440\",\"83099395440\",\"-8606395440\",\"3463604560\",\"0\",\"1761808720\",\n \"2017\",\"농어업재해재보험기금\",\"227055000000\",\"260651485140\",\"196572554347\",\"33596485140\",\"-30482445653\",\"227055000000\",\"260651485140\",\"196572554347\",\"-33596485140\",\"30482445653\",\"0\",\"435067370\",\n \"2017\",\"농업소득보전직접지불기금\",\"1554480000000\",\"2939848719930\",\"1498849373800\",\"1385368719930\",\"-55630626200\",\"1554480000000\",\"2939848719930\",\"1498849373800\",\"-1385368719930\",\"55630626200\",\"0\",\"566470810\",\n \"2017\",\"농지관리기금\",\"2070263000000\",\"3725341147100\",\"3349472868632\",\"1655078147100\",\"1279209868632\",\"2070263000000\",\"3725341147100\",\"3349472868632\",\"-1655078147100\",\"-1279209868632\",\"0\",\"64964907410\",\n \"2017\",\"대외경제협력기금\",\"1019436000000\",\"1796484227980\",\"858358115800\",\"777048227980\",\"-161077884200\",\"1023061207690\",\"1796484227980\",\"858358115800\",\"-773423020290\",\"164703091890\",\"9234011270\",\"207147217650\",\n \"2017\",\"무역보험기금\",\"3372170000000\",\"2924692605628\",\"1684930605628\",\"-447477394372\",\"-1687239394372\",\"3372170000000\",\"2924692605628\",\"1684930605628\",\"447477394372\",\"1687239394372\",\"0\",\"110680394372\",\n \"2017\",\"문화예술진흥기금\",\"540207000000\",\"532127077750\",\"532127077750\",\"-8079922250\",\"-8079922250\",\"540747864270\",\"532127077750\",\"532127077750\",\"8620786520\",\"8620786520\",\"744040000\",\"7876746520\",\n \"2017\",\"문화재보호기금\",\"133463000000\",\"154593134260\",\"152257709000\",\"21130134260\",\"18794709000\",\"138779974790\",\"154593134260\",\"152257709000\",\"-15813159470\",\"-13477734210\",\"3385319100\",\"2940521430\",\n \"2017\",\"방사성폐기물관리기금\",\"4859199000000\",\"4221710900020\",\"3538120620750\",\"-637488099980\",\"-1321078379250\",\"4859199000000\",\"4221710900020\",\"3538120620750\",\"637488099980\",\"1321078379250\",\"0\",\"0\",\n \"2017\",\"방송통신발전기금\",\"983419000000\",\"1666772954670\",\"950674697068\",\"683353954670\",\"-32744302932\",\"984607470000\",\"1666772954670\",\"950674697068\",\"-682165484670\",\"33932772932\",\"0\",\"5368600500\",\n \"2017\",\"범죄피해자보호기금\",\"101869000000\",\"101206599540\",\"101206599540\",\"-662400460\",\"-662400460\",\"101869000000\",\"101206599540\",\"101206599540\",\"662400460\",\"662400460\",\"0\",\"968027770\",\n \"2017\",\"보훈기금\",\"584222000000\",\"356957438690\",\"260757438690\",\"-227264561310\",\"-323464561310\",\"584222000000\",\"356957438690\",\"260757438690\",\"227264561310\",\"323464561310\",\"96600000\",\"12116378770\",\n \"2017\",\"복권기금\",\"5064884000000\",\"5071439013780\",\"5071439013780\",\"6555013780\",\"6555013780\",\"5064884000000\",\"5071439013780\",\"5071439013780\",\"-6555013780\",\"-6555013780\",\"0\",\"18961931090\",\n \"2017\",\"사립학교교직원연금기금\",\"10915394000000\",\"11273959679737\",\"11273959679737\",\"358565679737\",\"358565679737\",\"10915394000000\",\"11273959679737\",\"11273959679737\",\"-358565679737\",\"-358565679737\",\"2432108768\",\"129021189497\",\n \"2017\",\"사법서비스진흥기금\",\"50500000000\",\"54478924050\",\"54478924050\",\"3978924050\",\"3978924050\",\"50618000000\",\"54478924050\",\"54478924050\",\"-3860924050\",\"-3860924050\",\"0\",\"327245090\",\n \"2017\",\"사학진흥기금\",\"443055000000\",\"412317713823\",\"412317713823\",\"-30737286177\",\"-30737286177\",\"443134908629\",\"412317713823\",\"412317713823\",\"30817194806\",\"30817194806\",\"0\",\"35121091324\",\n \"2017\",\"산업기반신용보증기금\",\"376629000000\",\"604834786685\",\"604834786685\",\"228205786685\",\"228205786685\",\"376629000000\",\"604834786685\",\"604834786685\",\"-228205786685\",\"-228205786685\",\"0\",\"18335513615\",\n \"2017\",\"산업기술진흥및사업화촉진기금\",\"208456000000\",\"125940377440\",\"125940377440\",\"-82515622560\",\"-82515622560\",\"208456000000\",\"125940377440\",\"125940377440\",\"82515622560\",\"82515622560\",\"0\",\"50443000000\",\n \"2017\",\"산업재해보상보험및예방기금\",\"12278202000000\",\"16785667051820\",\"11093375051820\",\"4507465051820\",\"-1184826948180\",\"12278202000000\",\"16785667051820\",\"11093375051820\",\"-4507465051820\",\"1184826948180\",\"0\",\"9985509230\",\n \"2017\",\"석면피해구제기금\",\"49867000000\",\"66863753060\",\"66863753060\",\"16996753060\",\"16996753060\",\"49867000000\",\"66863753060\",\"66863753060\",\"-16996753060\",\"-16996753060\",\"151914000\",\"125502400\",\n \"2017\",\"소상공인시장진흥기금\",\"2917318000000\",\"5367206054670\",\"2913316105420\",\"2449888054670\",\"-4001894580\",\"2917318000000\",\"5367206054670\",\"2913316105420\",\"-2449888054670\",\"4001894580\",\"0\",\"4001894580\",\n \"2017\",\"수산발전기금\",\"767731000000\",\"864032957540\",\"707449615812\",\"96301957540\",\"-60281384188\",\"776019900000\",\"864032957540\",\"707449615812\",\"-88013057540\",\"68570284188\",\"431670000\",\"72378302260\",\n \"2017\",\"순국선열애국지사사업기금\",\"65637000000\",\"51873529670\",\"51873529670\",\"-13763470330\",\"-13763470330\",\"80817509190\",\"51873529670\",\"51873529670\",\"28943979520\",\"28943979520\",\"887259540\",\"332279480\",\n \"2017\",\"신용보증기금\",\"5488847000000\",\"8312761498977\",\"8312761498977\",\"2823914498977\",\"2823914498977\",\"5488847000000\",\"8312761498977\",\"8312761498977\",\"-2823914498977\",\"-2823914498977\",\"0\",\"601479196233\",\n \"2017\",\"양곡증권정리기금\",\"1780842000000\",\"1922597393120\",\"1759188932870\",\"141755393120\",\"-21653067130\",\"1780842000000\",\"1922597393120\",\"1759188932870\",\"-141755393120\",\"21653067130\",\"0\",\"18565997900\",\n \"2017\",\"양성평등기금\",\"222381000000\",\"425866527870\",\"227811487804\",\"203485527870\",\"5430487804\",\"222381000000\",\"425866527870\",\"227811487804\",\"-203485527870\",\"-5430487804\",\"0\",\"1119376310\",\n \"2017\",\"언론진흥기금\",\"35736000000\",\"57982723950\",\"26470864930\",\"22246723950\",\"-9265135070\",\"35736000000\",\"57982723950\",\"26470864930\",\"-22246723950\",\"9265135070\",\"0\",\"1008937810\",\n \"2017\",\"영산강·섬진강수계관리기금\",\"89438000000\",\"128405783797\",\"91179783797\",\"38967783797\",\"1741783797\",\"89803321400\",\"128405783797\",\"91179783797\",\"-38602462397\",\"-1376462397\",\"539349140\",\"381719126\",\n \"2017\",\"영화발전기금\",\"327374000000\",\"311602087226\",\"311602087226\",\"-15771912774\",\"-15771912774\",\"328018441430\",\"311602087226\",\"311602087226\",\"16416354204\",\"16416354204\",\"1019214000\",\"3561420751\",\n \"2017\",\"예금보험기금채권상환기금\",\"8991280000000\",\"6980887556371\",\"6980887556371\",\"-2010392443629\",\"-2010392443629\",\"8991280000000\",\"6980887556371\",\"6980887556371\",\"2010392443629\",\"2010392443629\",\"0\",\"34464237709\",\n \"2017\",\"외국환평형기금\",\"90046415000000\",\"338392258255650\",\"97541618666970\",\"248345843255650\",\"7495203666970\",\"90046415000000\",\"338392258255650\",\"97541618666970\",\"-248345843255650\",\"-7495203666970\",\"0\",\"1753953898063\",\n \"2017\",\"원자력기금\",\"353027000000\",\"579170246010\",\"333497587550\",\"226143246010\",\"-19529412450\",\"353336169360\",\"579170246010\",\"333497587550\",\"-225834076650\",\"19838581810\",\"291802000\",\"67808000\",\n \"2017\",\"응급의료기금\",\"291421000000\",\"580732029160\",\"321732029160\",\"289311029160\",\"30311029160\",\"293938948710\",\"580732029160\",\"321732029160\",\"-286793080450\",\"-27793080450\",\"3345239800\",\"19804925600\",\n \"2017\",\"임금채권보장기금\",\"1353970000000\",\"1218862711350\",\"896130711350\",\"-135107288650\",\"-457839288650\",\"1353970000000\",\"1218862711350\",\"896130711350\",\"135107288650\",\"457839288650\",\"0\",\"29944873420\",\n \"2017\",\"자동차사고피해지원기금\",\"243833000000\",\"263883352068\",\"263883352068\",\"20050352068\",\"20050352068\",\"243833000000\",\"263883352068\",\"263883352068\",\"-20050352068\",\"-20050352068\",\"0\",\"15034685000\",\n \"2017\",\"자유무역협정이행지원기금\",\"697382000000\",\"1091012649440\",\"562013979328\",\"393630649440\",\"-135368020672\",\"697382000000\",\"1091012649440\",\"562013979328\",\"-393630649440\",\"135368020672\",\"0\",\"216764815000\",\n \"2017\",\"장애인고용촉진및직업재활기금\",\"1201710000000\",\"1464600902950\",\"833900902950\",\"262890902950\",\"-367809097050\",\"1201710000000\",\"1464600902950\",\"833900902950\",\"-262890902950\",\"367809097050\",\"0\",\"442990560\",\n \"2017\",\"전력산업기반기금\",\"4143938000000\",\"4974493501060\",\"3587918501060\",\"830555501060\",\"-556019498940\",\"4144118000000\",\"4974493501060\",\"3587918501060\",\"-830375501060\",\"556199498940\",\"154000000\",\"4591492090\",\n \"2017\",\"정보통신진흥기금\",\"958104000000\",\"1537780073020\",\"789904301639\",\"579676073020\",\"-168199698361\",\"958104000000\",\"1537780073020\",\"789904301639\",\"-579676073020\",\"168199698361\",\"0\",\"242786650\",\n \"2017\",\"주택금융신용보증기금\",\"3190784000000\",\"4871893331502\",\"4871893331502\",\"1681109331502\",\"1681109331502\",\"3190886520000\",\"4871893331502\",\"4871893331502\",\"-1681006811502\",\"-1681006811502\",\"95600000\",\"201612653812\",\n \"2017\",\"주택도시기금\",\"68893276000000\",\"66529367791652\",\"57729367791652\",\"-2363908208348\",\"-11163908208348\",\"68893376000000\",\"66529367791652\",\"57729367791652\",\"2364008208348\",\"11164008208348\",\"338427270\",\"2018593724366\",\n \"2017\",\"중소기업창업및진흥기금\",\"9920963000000\",\"9897816250203\",\"9897816250203\",\"-23146749797\",\"-23146749797\",\"9920963000000\",\"9897816250203\",\"9897816250203\",\"23146749797\",\"23146749797\",\"0\",\"29449684554\",\n \"2017\",\"지역신문발전기금\",\"9696000000\",\"34956850760\",\"10102959910\",\"25260850760\",\"406959910\",\"9696000000\",\"34956850760\",\"10102959910\",\"-25260850760\",\"-406959910\",\"0\",\"415196920\",\n \"2017\",\"청소년육성기금\",\"129843000000\",\"183750640860\",\"125878041015\",\"53907640860\",\"-3964958985\",\"129910034970\",\"183750640860\",\"125878041015\",\"-53840605890\",\"4031993955\",\"0\",\"588126200\",\n \"2017\",\"축산발전기금\",\"1166039000000\",\"1561452399210\",\"1084283662935\",\"395413399210\",\"-81755337065\",\"1174219800000\",\"1561452399210\",\"1084283662935\",\"-387232599210\",\"89936137065\",\"1551800000\",\"38607531910\",\n \"2017\",\"한강수계관리기금\",\"513433000000\",\"1001920911829\",\"589666806821\",\"488487911829\",\"76233806821\",\"524128039081\",\"1001920911829\",\"589666806821\",\"-477792872748\",\"-65538767740\",\"8155884156\",\"7007904347\"\n };\n \n// System.out.println(num[14]);\n String field_name[] = new String [14];\n for (int i=0;i<14;i++) {\n field_name[i] = num[i];\n }\n \n// for(int i = 0; i<num.length-13;i++) {\n// \n// }\n String field[] = new String[14];\n for (int i = 1 ; i <num.length/14; i++) {\n for(int j=0; j<14;j++) {\n \n field[j]=num[i*14 + j];\n System.out.println(field[j]);\n }\n for(int k=0; k<14;k++) {\n System.out.printf(\"%s : %s\\n\", field_name[k],field[k]);\n \n }\n }\n }", "String getDataNascimento();", "java.lang.String getField1991();", "java.lang.String getField1321();", "java.lang.String getField1322();", "java.lang.String getField1515();", "public static void main(String[] args) {\n\t\tFile f= new File(\"E://workplace/BigFileRead/src/data/itcont.txt\");\r\n\t\ttry {\r\n\t\t\tBufferedReader b=new BufferedReader(new FileReader(f));\r\n\t\t\tString readLine=\"\";\r\n\t\t\t\r\n\t\t\t//得到总行数\r\n\t\t\tInstant lineCountStart=Instant.now();//当前时间\r\n\t\t\tint lines=0;\r\n\t\t\tInstant nameStart=Instant.now();\r\n\t\t\tArrayList<String> names=new ArrayList<String>();\r\n\t\t\t//得到第432个和第43243个名字\r\n\t\t\tArrayList<Integer> indexs=new ArrayList<>();\r\n\t\t\t\r\n\t\t\tindexs.add(1);\r\n\t\t\tindexs.add(433);\r\n\t\t\tindexs.add(43244);\r\n\t\t\t//计算每个月的捐赠量\r\n\t\t\tInstant donationsStart=Instant.now();\r\n\t\t\tArrayList<String> dates=new ArrayList<String>();\r\n\t\t\t//计算每一个名字的出现次数\r\n\t\t\tInstant commonNamesStart=Instant.now();\r\n\t\t\tArrayList<String> firstNames=new ArrayList<String>();\r\n\t\t\tSystem.out.println(\"start read file using input stream!\");\r\n\t\t\ttry {\r\n\t\t\t\twhile((readLine=b.readLine())!=null){\r\n\t\t\t\tlines++;\r\n\t\t\t\t//得到所有的名字\r\n\t\t\t\tString array1[]=readLine.split(\"\\\\s*\\\\|s*\");\r\n\t\t\t\tString name=array1[7];\r\n\t\t\t\tnames.add(name);\r\n\t\t\t\tif(indexs.contains(lines)){\r\n\t\t\t\t\tSystem.out.println(\"names:\"+names.get(lines-1)+\"at index: \"+(lines-1));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif (name.contains(\", \")){\r\n\t\t\t\t\tString array2[]=(name.split(\",\"));\r\n\t\t\t\t\tString firstHalfOfName=array2[1].trim();\r\n\t\t\t\t\tif(firstHalfOfName!=\"undefined\"||!firstHalfOfName.isEmpty()){\r\n\t\t\t\t\t\tif(firstHalfOfName.contains(\" \")){\r\n\t\t\t\t\t\t\tString array3[]=(name.split(\" \"));\r\n\t\t\t\t\t\t\tString firstName=array3[0].trim();\r\n\t\t\t\t\t\t\tfirstNames.add(firstName);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tfirstNames.add(firstHalfOfName);\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}\r\n\t\t\t\tString rawDate=array1[4];\r\n\t\t\t\tString year=rawDate.substring(0,4);\r\n\t\t\t\tString month=rawDate.substring(4,6);\r\n\t\t\t\tString formatDate=month+\"-\"+year;\r\n\t\t\t\tdates.add(formatDate);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tInstant namesEnd=Instant.now();\r\n\t\t\tlong timeElapseNames=Duration.between(nameStart, namesEnd).toMillis();\r\n\t\t\tSystem.out.println(\"names time :\"+timeElapseNames+\"ms\");\r\n\t\t\tSystem.out.println(\"total lines :\"+lines);\r\n\t\t\t\r\n\t\t\tInstant lineCountsEnd=Instant.now();\r\n\t\t\tlong timeElapselineCounts=Duration.between(lineCountStart, lineCountsEnd).toMillis();\r\n\t\t\tSystem.out.println(\"lines time :\"+timeElapseNames+\"ms\");\r\n\t\t\t\r\n\t\t\tHashMap<String, Integer> dateMap=new HashMap<String, Integer>();\r\n\t\t\tfor(String date:dates){\r\n\t\t\t\tInteger count =dateMap.get(date);\r\n\t\t\t\tif(count==null){\r\n\t\t\t\t\tdateMap.put(date, 1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdateMap.put(date, count+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (Map.Entry<String, Integer> entry :dateMap.entrySet()){\r\n\t\t\t\tString key=entry.getKey();\r\n\t\t\t\tInteger value=entry.getValue();\r\n\t\t\t\tSystem.out.println(\"Donations per month and year: \"+key+\" and donation count: \"+value);\r\n\t\t\t}\r\n\t\t\tInstant donationEnd=Instant.now();\r\n\t\t\tlong timeElapsedDonations=Duration.between(donationsStart, donationEnd).toMillis();\r\n\t\t\tSystem.out.println(\"Donation time: \"+timeElapsedDonations+\" ms\");\r\n\t\t\t\t\r\n\t\t\tHashMap<String, Integer> map=new HashMap<String, Integer>();\r\n\t\t\tfor(String name : firstNames){\r\n\t\t\t\tInteger count =dateMap.get(name);\r\n\t\t\t\tif(count==null){\r\n\t\t\t\t\tmap.put(name, 1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmap.put(name, count+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tLinkedList<Entry<String, Integer>> list =new LinkedList<>(map.entrySet());\r\n\t\t\t\r\n\t\t\tCollections.sort(list,new Comparator<Map.Entry<String, Integer>>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\treturn (o2.getValue()).compareTo(o1.getValue());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The most Common first name is: \"+list.get(0).getKey()+\" and it occurs: \"+list.get(0).getValue()+\" time.\");\r\n\t\t\tInstant commonNameEnd=Instant.now();\r\n\t\t\tlong timeElapseCommonName =Duration.between(commonNamesStart, commonNameEnd).toMillis();\r\n\t\t\tSystem.out.println(\"most common name time: \"+timeElapseCommonName+\" ms\");\r\n\t\t} catch (FileNotFoundException e) { \r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public String getDv43(String numero) {\r\n \r\n int total = 0;\r\n int fator = 2;\r\n \r\n int numeros, temp;\r\n \r\n for (int i = numero.length(); i > 0; i--) {\r\n \r\n numeros = Integer.parseInt( numero.substring(i-1,i) );\r\n \r\n temp = numeros * fator;\r\n if (temp > 9) temp=temp-9; // Regra do banco NossaCaixa\r\n \r\n total += temp;\r\n \r\n // valores assumidos: 212121...\r\n fator = (fator % 2) + 1;\r\n }\r\n \r\n int resto = total % 10;\r\n \r\n if (resto > 0)\r\n resto = 10 - resto;\r\n \r\n return String.valueOf( resto );\r\n \r\n }", "String mo10312id();", "java.lang.String getField1970();", "private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }", "java.lang.String getField1999();", "java.lang.String getField1904();", "java.lang.String getField1248();", "java.lang.String getField1987();", "java.lang.String getField1297();", "java.lang.String getField1394();", "private int getYearFromHeader(String labelname) \r\n\t{\n\t\tString substringgetfirstthree = labelname;\r\n String getactualmonth = substringgetfirstthree.replaceAll(\"[^0-9]\", \"\").trim();\r\n String getnum = getactualmonth;\r\n return Integer.parseInt(getactualmonth);\r\n\t\t\r\n\t}", "java.lang.String getField1309();", "java.lang.String getField1323();", "public static void main(String[] args) {\n\n String text= \"merhaba arkadaslar \";\n System.out.println( \"1. bolum =\" + text .substring(1,5));// 1 nolu indexten 5 e kadar. 5 dahil degil\n System.out.println(\"2. bolum =\"+ text.substring(0,3));\n System.out.println(\"3. bolum =\"+ text.substring(4));// verilen indexten sonun akadar al\n\n String strAlinan= text.substring(0,3);\n\n\n\n\n\n }", "java.lang.String getField1984();", "java.lang.String getField1994();", "public static void main(String[] args) {\n\t\t\n\t\tString var1=\"Syntax is best2525.batch nine is great.\";\n\t\t\n\t\tSystem.out.println(var1.replaceAll(\"[0-9]\", \"\"));\n\t\t// since we dont know what exat number is in my string then we say \n\t\t// an general state that all number from 0 t0 9 repkace with ...\n\t\t\n\t\tString var2=\"98739985849jgjdvjfSSAAklvjvjf\";\n\t\tSystem.out.println(var2.replaceAll(\"[a-zA-Z]\", \"\"));\n\t\t\n\t\t\n\t\t\n\t\tString var3=\"854838FHJGFF75838847dssugufshkhiu#@$%&*(\";\n\t\t\n\t\tSystem.out.println(var3.replaceAll(\"[^a-zA-Z]\", \"\"));\n\t\tSystem.out.println(var3.replaceAll(\"[^a-zA-Z0-9]\", \"\"));\n\t\t\n\t\t\n\t}", "java.lang.String getField1123();", "java.lang.String getField1360();", "java.lang.String getField1397();", "java.lang.String getField1390();", "java.lang.String getField1348();", "java.lang.String getField1382();", "java.lang.String getField1980();", "java.lang.String getField1396();", "java.lang.String getField1995();", "public static void main(String[] args) {\n\t\tString record =\"px123,kingstone,340,1|3|4|1\";\n\t\tString record1 =\"px125,electronics,storege,pendrive,kingstone,340,1|3|4|1\";\n\t\tString record2 =\"px125,electronics,storege,pendrive,kingstone,340\";\n\t\tString what = \"\\\\d+,(\\\\d\\\\|*)+$\";\n\t\tPattern p=Pattern.compile(what);\n\t\tMatcher m=p.matcher(record);\n\t\tif(m.find())\n\t\t{\n\t\t\tSystem.out.println(\"correct\");\n\t\t\tString str[]=m.group().split(\",\");\n\t\t\tSystem.out.println(str[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"wrong\");\n\t\t}\n\t\t\n\t}", "java.lang.String getField1398();", "java.lang.String getField1260();", "java.lang.String getField1989();", "java.lang.String getField1500();", "java.lang.String getField1307();", "java.lang.String getField1303();", "java.lang.String getField1263();", "java.lang.String getField1301();", "java.lang.String getField1395();", "public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }", "java.lang.String getField1983();", "java.lang.String getField1275();", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tString firstline = scanner.nextLine();\r\n\t\tString[] strings = firstline.split(\" \");\r\n\t\tMap<String, Integer> pNs = new HashMap<String, Integer>();\r\n\t\tMap<String, Integer> mNs = new HashMap<String, Integer>();\r\n\t\tMap<String, Integer> nNs = new HashMap<String, Integer>();\r\n\t\t\r\n\t\tfor(int i=0;i<3;i++)\r\n\t\t{\r\n\t\t\tfor(int index=0;index<Integer.parseInt(strings[i]);index++)\r\n\t\t\t{\r\n\t\t\t\tString[] scan = scanner.nextLine().split(\" \");\r\n\t\t\t\tif (i==0) {\r\n\t\t\t\t\tif(Integer.parseInt(scan[1]) >= 200)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpNs.put(scan[0], Integer.parseInt(scan[1]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(i==1) {\r\n\t\t\t\t\tif (pNs.containsKey(scan[0])) {\r\n\t\t\t\t\t\tmNs.put(scan[0], Integer.parseInt(scan[1]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(i==2) {\r\n\t\t\t\t\tif (pNs.containsKey(scan[0])) {\r\n\t\t\t\t\t\tnNs.put(scan[0], Integer.parseInt(scan[1]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tMap<String, Integer> endNs = new HashMap<>();\r\n\t\tfor(String name:pNs.keySet())\r\n\t\t{\r\n\t\t\tint ms,ns,ends;\r\n\t\t\tif (mNs.containsKey(name)) {\r\n\t\t\t\tms=mNs.get(name);\r\n\t\t\t}else {\r\n\t\t\t\tms = -1;\r\n\t\t\t\tmNs.put(name, ms);\r\n\t\t\t}\r\n\t\t\tif (nNs.containsKey(name)) {\r\n\t\t\t\tns=nNs.get(name);\r\n\t\t\t}else {\r\n\t\t\t\tns = -1;\r\n\t\t\t\tnNs.put(name, ns);\r\n\t\t\t}\r\n\t\t\tif (ms > ns) {\r\n\t\t\t\tends = (int) Math.round(ms*0.4+ns*0.6);\r\n\t\t\t}else {\r\n\t\t\t\tends = ns;\r\n\t\t\t}\r\n\t\t\tif (ends > 59) {\r\n\t\t\t\tendNs.put(name, ends);\r\n\t\t\t}\r\n\t\t}\r\n\t\tList<Map.Entry<String,Integer>> list = new ArrayList<Map.Entry<String,Integer>>(endNs.entrySet());\r\n\t\tCollections.sort(list,new Comparator<Map.Entry<String,Integer>>() {\r\n\t\t public int compare(Entry<String,Integer> o1,Entry<String,Integer> o2) {\r\n\t\t if(o1.getValue().equals(o2.getValue())){\r\n\t\t return o1.getKey().compareTo(o2.getKey());\r\n\t\t }else{\r\n\t\t return -(o1.getValue().compareTo(o2.getValue()));\r\n\t\t }\r\n\t\t }\r\n\t\t });\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i).getKey()+\" \"+pNs.get(list.get(i).getKey())+\" \"+mNs.get(list.get(i).getKey())+\" \"+nNs.get(list.get(i).getKey())+\" \"+list.get(i).getValue());\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "java.lang.String getField1125();", "java.lang.String getField1237();", "java.lang.String getField1365();", "java.lang.String getField1383();", "java.lang.String getField1296();", "java.lang.String getField1282();", "private String getMillones(String numero) {\n String miles = numero.substring(numero.length() - 6);\r\n //se obtiene los millones\r\n String millon = numero.substring(0, numero.length() - 6);\r\n String n = \"\";\r\n if (millon.length() > 1) {\r\n n = getCentenas(millon) + \"millones \";\r\n } else {\r\n n = getUnidades(millon) + \"millon \";\r\n }\r\n return n + getMiles(miles);\r\n }", "java.lang.String getField1399();", "java.lang.String getField1320();", "String getCADENA_TRAMA();", "java.lang.String getField1350();", "java.lang.String getField1393();", "java.lang.String getField1200();", "@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }", "public static void main(String args[]) throws IOException {\n File file = new File(\"Savoy House_2019_Price List_precios.pdf\");\n PDDocument document = PDDocument.load(file);\n\n //Instantiate PDFTextStripper class\n PDFTextStripper striper = new PDFTextStripper();\n\n //Retrieving text from PDF document\n striper.setStartPage(1);\n\n String documentText = striper.getText(document);\n //System.out.println(documentText);\n\n String[] tablica = documentText.split(\"\\n\");\n String header = \"Referencia,colección,Catalogo,Distributor Price EXW-Valencia,Distributor Price EXW-Valencia,\" +\n \"uds por caja,Peso bruto,imap price\\n\" +\n \"sku #,Family,Catalogue,CE 2019 [€] (Ready pickup 50~65 days),CE 2019 [€] (Ready pickup 20~30 days),\" +\n \"Pkg size,Packed weight [kg],online (Valid until June 30th 2019)\\n\";\n\n StringBuilder sb = new StringBuilder(header);\n\n for (int i = 0; i < tablica.length; i++) {\n if (tablica[i].trim().endsWith(\"€\")) {\n int lineLength = tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \").length;\n\n // check if 'Pkg size' is 1 (is not empty)\n if (tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[lineLength - 3].equals(\"1\")) {\n\n // join collection name into one record in the row\n if (lineLength == 8) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").replaceAll(\" \", \",\") + \"\\n\");\n } else if (lineLength > 8) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[0] + \",\");\n for (int j = 1; j < lineLength - 6; j++) {\n if (j < lineLength - 7) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j] + \" \");\n } else {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j]);\n }\n }\n sb.append(\",\");\n\n // append other records into the row\n for (int j = lineLength - 6; j < lineLength; j++) {\n if (j < lineLength - 1) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j] + \",\");\n } else {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j]);\n }\n }\n sb.append(\"\\n\");\n }\n } else {\n sb.append(\"Data missing\\n\");\n }\n }\n }\n System.out.println(sb);\n\n // write sb string as csv file\n try {\n FileWriter writer = new FileWriter(\"savoy2019.csv\", true);\n writer.write(sb.toString());\n writer.close();\n System.out.println(\"'savoy2019.csv' file created successfully\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Closing the document\n document.close();\n }", "String mo21078i();", "java.lang.String getField1990();", "java.lang.String getField1096();", "java.lang.String getField1992();", "java.lang.String getField1363();", "java.lang.String getField1304();", "public static String convertOrarioToFascia(String data) {\n String[] data_splitted = data.split(\" \");\n String orario = data_splitted[1];\n String[] ora_string = orario.split(\":\");\n Integer ora = Integer.parseInt(ora_string[0]);\n if(ora<12){\n return \"prima\";\n }else{\n return \"seconda\";\n }\n }", "java.lang.String getField1998();", "java.lang.String getField1284();", "java.lang.String getField1358();", "private double[] obtainSubstring(String s, int mag) {\n double[] result = new double[2];\n\n //Look for magnitude\n int lastPos = 0;\n for(int i = 0; i<(mag + 2); i++) {\n lastPos = s.indexOf(\" \", lastPos+1);\n }\n\n int nextSpace = s.indexOf(\" \", lastPos+1);\n result[1] = Double.parseDouble(s.substring(lastPos+1, nextSpace + 1));\n\n //Look for age\n int firstSpace = s.indexOf(\" \");\n int secondSpace = s.indexOf(\" \", firstSpace+1);\n\n result[0] = Double.parseDouble(s.substring(firstSpace+1, secondSpace + 1));\n\n return result;\n }", "java.lang.String getField1600();", "java.lang.String getField1329();", "java.lang.String getField1313();", "java.lang.String getField1380();", "@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }", "java.lang.String getField1308();", "java.lang.String getField1298();", "java.lang.String getField1293();", "java.lang.String getField1258();", "java.lang.String getField1290();", "java.lang.String getField1384();", "java.lang.String getField1231();", "java.lang.String getField1259();", "java.lang.String getField1295();", "private static String StringifyBody(String[] line , double... args){\n\n String output = String.format(\"%-20s %-20s\" , line[0] , line[1]);\n\n for(int i = 0; i < line.length - 2 ;i++){\n output += String.format(\"%-10s\",line[2 + i]); // Skip the first two element City & Country\n\n }\n for (double element: args) { //args is again for the total\n output += String.format(\"%-10.1f\" ,element );\n }\n\n return output;\n }", "java.lang.String getField1536();" ]
[ "0.53827643", "0.532901", "0.528323", "0.5281253", "0.52775556", "0.52627677", "0.52500784", "0.524243", "0.5224361", "0.5220588", "0.5192319", "0.51649034", "0.5140426", "0.5113028", "0.51059616", "0.5105291", "0.51038444", "0.5097169", "0.5096319", "0.50893384", "0.5058536", "0.50335944", "0.5022928", "0.5015129", "0.50051165", "0.4988089", "0.4979815", "0.49566153", "0.49526012", "0.49513912", "0.49420124", "0.49355277", "0.49345577", "0.49311545", "0.49283835", "0.49280265", "0.49207646", "0.49198303", "0.491828", "0.49148855", "0.49145138", "0.49121955", "0.49080443", "0.49011594", "0.48991072", "0.4898878", "0.4893923", "0.4889523", "0.48891625", "0.48887163", "0.48857787", "0.48814982", "0.48811036", "0.4878955", "0.48776782", "0.48771325", "0.487504", "0.48745292", "0.48700008", "0.48698702", "0.48663867", "0.48650596", "0.4863127", "0.48609263", "0.4858939", "0.4856234", "0.48547244", "0.4851426", "0.4849441", "0.48466262", "0.4841176", "0.48365796", "0.48354006", "0.48337668", "0.48328784", "0.48313504", "0.48304704", "0.48296207", "0.48234433", "0.4823078", "0.48197854", "0.4813889", "0.48131162", "0.48122686", "0.4812112", "0.48118877", "0.48116946", "0.48105422", "0.48096853", "0.4807302", "0.48065564", "0.48065177", "0.48034117", "0.48024976", "0.47995543", "0.47928935", "0.47924665", "0.4792416", "0.47921738", "0.47921616", "0.47917733" ]
0.0
-1
String link = url(null, Double.toString(mLatitude), Double.toString(mLongitude)); Intent sendIntent = new Intent(getBaseContext(), PhoneToWatchService.class); sendIntent.putExtra("NAMES", names); sendIntent.putExtra("WEBSITES", websites); sendIntent.putExtra("EMAILS", emails); startService(sendIntent);
@Override public void onClick(View v) { Intent activityIntent = new Intent(MainActivity.this, LocalList.class); // activityIntent.putExtra("reps", getInfo(MainActivity.this, link)); activityIntent.putExtra("zipcode", zipcode.getText().toString()); startActivity(activityIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onStart() {\n super.onStart();\n Intent intent = new Intent(this, DownloadResponseService.class);\n intent.putExtra(LONGITUDE, longitude);\n intent.putExtra(LATITUDE, latitude);\n startService(intent);//start service with input as longitude/latitude\n }", "public void sendDelivery(View view) {\n Intent intent = new Intent(android.content.Intent.ACTION_VIEW,\n Uri.parse(\"http://maps.google.com/maps?saddr=enter your location&daadr=enter your destination\"));\n startActivity(intent);\n }", "public void passAddress( ){\n\n Intent intent = new Intent(MapsActivity.this,ShoppingActivity.class);\n String address2=address;\n double latitude = mLastKnownLocation.getLatitude();\n double longitude = mLastKnownLocation.getLongitude();\n\n intent.putExtra(\"Address\", address2);\n intent.putExtra(\"Latitude\", latitude);\n intent.putExtra(\"Longitude\", longitude);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(MainActivity.this, WC_Activity.class);\n myIntent.putExtra(\"Latitude\", latitude);\n myIntent.putExtra(\"Longitude\", longitude);\n startActivity(myIntent);\n }", "private void startWatch() {\n StringBuilder namesb = new StringBuilder();\n StringBuilder partysb = new StringBuilder();\n for (int i=0; i<PeopleData.people.size(); i++) {\n namesb.append(PeopleData.people.get(i).getName() + \"-\");\n partysb.append(PeopleData.people.get(i).getParty() + \"-\");\n }\n mNames = namesb.toString();\n mParties = partysb.toString();\n\n //construct string of 2012vote\n String m2012vote = get2012Vote(county, state);\n\n //create intent\n Intent watchIntent = new Intent(getBaseContext(), PhoneToWatchService.class);\n watchIntent.putExtra(\"names\", mNames);\n watchIntent.putExtra(\"parties\", mParties);\n watchIntent.putExtra(\"2012votes\", m2012vote);\n Log.d(\"T\", \"==data to send to watch======\");\n Log.d(\"T\", mNames);\n Log.d(\"T\", mParties);\n Log.d(\"T\", m2012vote);\n startService(watchIntent);\n }", "private void sendRequestAPI(Double lat,Double lng, String places) {\n\n String origin = String.valueOf(lat) + \",\" + String.valueOf(lng);\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n String destination = \"0,0\";\n String wayPoints = \"0,0\";\n\n switch (places) {\n case \"Family Walk\" :\n destination = formatCoordinates(6);\n wayPoints = formatCoordinates(4) + \"|\" + formatCoordinates(5);\n break;\n\n case \"Retro Tour\" :\n destination = formatCoordinates(9);\n wayPoints =formatCoordinates(7) + \"|\" + formatCoordinates(8);\n break;\n\n case \"Sports Tour\" :\n destination = formatCoordinates(11);\n wayPoints = formatCoordinates(9) + \"|\" + formatCoordinates(8);\n break;\n case \"custom\":\n destination = getActivity().getIntent().getStringExtra(\"destination\");\n wayPoints = getActivity().getIntent().getStringExtra(\"waypoints\");\n break;\n\n }\n //String destination = \"-27.494721,153.014262\";\n //String wayPoints = \"-27.498172, 153.013585\";\n try {\n\n new Directions(this, origin, destination, wayPoints).execute();\n Double latDes= Double.parseDouble(destination.split(\",\")[0]);\n Double lngDes= Double.parseDouble(destination.split(\",\")[1]);\n String [] points = wayPoints.split(Pattern.quote(\"|\")) ;\n\n if(wayPoints.equals(\"\")){\n\n }\n else{\n for(String point : points) {\n Double latPoint = Double.parseDouble((point.split(\",\")[0]));\n Double lngPoint = Double.parseDouble((point.split(\",\")[1]));\n List<Address> addressesPoint = geocoder.getFromLocation(latPoint, lngPoint, 1);\n wayPointsMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesPoint.get(0).getAddressLine(0))\n .position(new LatLng(latPoint, lngPoint))));\n }\n }\n\n\n List<Address> addressesStart = geocoder.getFromLocation(lat, lng, 1);\n List<Address> addressesEnd = geocoder.getFromLocation(latDes,\n lngDes, 1);\n //originMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesStart.get(0).getAddressLine(0))\n //.position(new LatLng(lat, lng))));\n destinationMarkers.add(mMap.addMarker((new MarkerOptions().title(addressesEnd.get(0).getAddressLine(0))\n .position(new LatLng(latDes, lngDes)))));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latDes,\n lngDes), 16));\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void startIntentService() {\n Intent intent = new Intent(this.getActivity(), FetchAddressIntentService.class);\n intent.putExtra(Constants.RECEIVER, mResultReceiver);\n intent.putExtra(Constants.LOCATION_DATA_EXTRA, mLastLocation);\n this.getActivity().startService(intent);\n }", "public void sendToService(){\n stopService(new Intent(this, MediaPlayerService.class));\n Intent intent = new Intent(this, MediaPlayerService.class);\n\n intent.putExtra(MediaPlayerService.MEDIA_FILE_PATH_EXTRA, GotoRingtoneActivity.musicPath);\n\n startService(intent);\n }", "@Override\n public void onClick(View arg0) {\n Intent intent = new Intent(Main2Activity.this, com.sha.location.NotifyService.class);\n Main2Activity.this.startService(intent);\n }", "public void createMapIntent(View view){\n Uri uri = Uri.parse(\"geo:0,0?q=\" + Uri.encode(\"12 Community Rd, Allen, Ikeja, Lagos\"));\n\n //Step 2: Create a mapIntent with action \"Intent.ACTION_VIEW\". Pass the data too\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, uri);\n\n //Step 3: Set the package name of the Map App (i.e the unique name of the app)\n //E.g mapIntent.setPackage(\"com.google.android.apps.maps\");\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n\n //Step 4: Check if the Map app is available to ACCEPT this intent, if Map app is available, start the Map Activity\n if(mapIntent.resolveActivity(getPackageManager()) != null){\n startActivity(mapIntent);\n }\n else{\n Toast.makeText(this, \"No available client\", Toast.LENGTH_LONG).show();\n }\n\n }", "public static void sendGetWebservice(Activity activity, String url, Response.Listener responseListener, Response.ErrorListener errorListener) {\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url, responseListener, errorListener);\n// Add the request to the RequestQueue.\n handler.addToRequestQueue(stringRequest);\n }", "@Override\n public void onClick(View v) {\n startService(new Intent(MainActivity.this, MyService.class));\n }", "public void sendDataToESP(String data){\n\n\n URL remoteurl = null;\n String baseurl = \"http://\"+IpAddress+\"/\";\n String urlString = baseurl + data;\n System.out.println(urlString);\n try {\n remoteurl = new URL(urlString);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n new AutoActivity.pingit().execute(remoteurl);\n }", "public void run()\n {\n if (location != null) {\n Constants.GEO_LATITUDE = String.valueOf(location.getLatitude());\n Constants.GEO_LONGITUDE = String.valueOf(location.getLongitude());\n setupServiceReceiver();\n mServiceIntent = new Intent(getActivity(), GettingRetailerListService.class);\n mServiceIntent.putExtra(\"gettingStatus\", true);\n mServiceIntent.putExtra(\"receiver\", mReceiverForRetailer);\n getActivity().startService(mServiceIntent);\n } else {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n\n// }\n// });\n\n }\n }", "@Override\n public void onClick(View v) {\n String date = editDate.getText().toString();\n String time = editTime.getText().toString();\n\n if(checkLocationService()) {\n\n doRequest(RequestActivity.this, selectedServices, date, time, firebaseAuth);\n startActivity(new Intent(RequestActivity.this, DisabledHomeActivity.class));\n }else {\n buildAlertMessageNoGps();\n }\n }", "@Override\n public void onClick(View v) {\n String label = response.body().getEventList().get(0).getEventName();\n String strUri = \"http://maps.google.com/maps?q=loc:\" + response.body().getEventList().get(0).getEventLatitude() + \",\" + response.body().getEventList().get(0).getEventLongitude() + \" (\" + label + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(strUri));\n\n intent.setClassName(\"com.google.android.apps.maps\", \"com.google.android.maps.MapsActivity\");\n\n startActivity(intent);\n\n\n }", "private void setupGeoAndRetailerService() {\n final GeoLocationUtil geoLocationUtil = new GeoLocationUtil();\n final GeoLocationUtil.LocationResult geoLocationResult = new GeoLocationUtil.LocationResult() {\n @Override\n public void gotLocation(final Location location) {\n new Thread()\n {\n public void run()\n {\n mCenterActivity.runOnUiThread(new Runnable()\n {\n public void run()\n {\n //Do your UI operations like dialog opening or Toast here\n if (location != null) {\n Constants.GEO_LATITUDE = String.valueOf(location.getLatitude());\n Constants.GEO_LONGITUDE = String.valueOf(location.getLongitude());\n setupServiceReceiver();\n mServiceIntent = new Intent(getActivity(), GettingRetailerListService.class);\n mServiceIntent.putExtra(\"gettingStatus\", true);\n mServiceIntent.putExtra(\"receiver\", mReceiverForRetailer);\n getActivity().startService(mServiceIntent);\n } else {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n\n// }\n// });\n\n }\n }\n });\n }\n }.start();\n }\n };\n\n if (!geoLocationUtil.getLocation(getActivity(), geoLocationResult)) {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n }\n\n\n }", "@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n\n if( messageEvent.getPath().equalsIgnoreCase(\"/0\")) {\n String value = new String(messageEvent.getData(), StandardCharsets.UTF_8);\n Intent intent = new Intent(this, MainActivity.class );\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n //you need to add this flag since you're starting a new activity from a service\n String string = value;\n String[] parts = string.split(\",\");\n String part1 = parts[0];\n String part2 = parts[1];\n String part3 = parts[2];\n\n\n intent.putExtra(\"0\", part1);\n intent.putExtra(\"1\", part2);\n intent.putExtra(\"2\", part3);\n startActivity(intent);\n } else {\n super.onMessageReceived( messageEvent );\n }\n\n }", "private String getURL(int rad) {\n \t\tLocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n \n \t\t// Define a listener that responds to location updates\n \t\tLocationListener locationListener = new LocationListener() {\n \t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t\t// Called when a new location is found by the network location provider.\n \t\t\t\tcurrentLocation = String.valueOf(location.getLatitude()) + \"+\" + String.valueOf(location.getLongitude());\n \t\t\t}\n \n \t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {}\n \n \t\t\tpublic void onProviderEnabled(String provider) {}\n \n \t\t\tpublic void onProviderDisabled(String provider) {}\n \t\t};\n \n \t\t// Register the listener with the Location Manager to receive location updates\n \t\tlocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n \n \t\tfinal String android_id = Secure.getString(getBaseContext().getContentResolver(),\n \t\t\t\tSecure.ANDROID_ID);\n \t\t//final String user = \"aaa\"; //idk how to deal with making users unique right now\n \t\tString url = \"http://18.238.2.68/cuisinestream/phonedata.cgi?user=\"+android_id+\"&location=\"+currentLocation+\"&radius=\"+rad;\n \t\treturn url;\n \t}", "@Override\n protected String doInBackground(String... args) {\n // rss link url\n String query_url = args[0];\n\n // weather object of rss.\n woeid = parser.getRSSFeedWeather2(query_url);\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n /**\n * Updating parsed data into text view.\n * */\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }\n });\n return null;\n }", "public void getDirections (View view){\n Intent directionsIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://maps.google.com/maps?saddr=\" + intent.getDoubleExtra(\"engineerLatitude\", 0) + \",\" + intent.getDoubleExtra(\"engineerLongitude\", 0) + \"&daddr=\" + intent.getDoubleExtra(\"reportLatitude\", 0) + \",\" + intent.getDoubleExtra(\"reportLongitude\", 0)));\n\n startActivity(directionsIntent);\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this,WeatherActivity.class);\n intent.putExtra(\"lat\", latitude);\n intent.putExtra(\"long\",longitude);\n startActivity(intent);\n\n }", "public void onClick(View v) {\n double latitude = 51.52;\n double longitude = -13.03;\n Intent intentBundle = new Intent(MainActivity.this, NetMap.class);\n Bundle bundle = new Bundle();\n bundle.putDouble(\"lat\", latitude);\n bundle.putDouble(\"long\", longitude);\n intentBundle.putExtras(bundle);\n startActivity(intentBundle);\n }", "@Override\n public void onClick(View view) {\n //Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri newsUri = Uri.parse(url);\n\n // Create a new intent to view the earthquake URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }", "public void onClick(View v){\n EditText et = findViewById(R.id.et_1);\n String n;\n n = et.getText().toString();\n Bundle bundle = new Bundle();\n bundle.putString(\"url\",n);\n Intent intent = new Intent(getBaseContext(),t1.class);\n intent.putExtras(bundle);\n startActivity(intent);\n }", "public void onClick(View v) {\n double latitude = Double.parseDouble(editLat.getText().toString());\n double longitude = Double.parseDouble(editLong.getText().toString());\n Intent intentBundle = new Intent(MainActivity.this, NetMap.class);\n Bundle bundle = new Bundle();\n bundle.putDouble(\"lat\", latitude);\n bundle.putDouble(\"long\", longitude);\n intentBundle.putExtras(bundle);\n startActivity(intentBundle);\n }", "private void TransferDataToMainActivity(){\n Intent intent = new Intent(ChooseService.this, MainActivity.class);\n intent.putExtra(\"Professional\", professionalName);\n intent.putExtra(\"Service\", serviceName);\n intent.putExtra(\"Price\", servicePrice);\n startActivity(intent);\n }", "private void GotoGraficos(String data){\n Intent intent = new Intent(this, Graficos_Sesion.class);\n intent.putExtra(\"url\", data);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n String label = \"Route for \" + namemark;\n String uriBegin = \"geo:\" + latl + \",\" + long1;\n String query = latl + \",\" + long1 + \"(\" + label + \")\";\n String encodedQuery = Uri.encode(query);\n String uriString = uriBegin + \"?q=\" + encodedQuery + \"&z=16\";\n Uri uri = Uri.parse(uriString);\n try {\n Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);\n startActivity(intent);\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Update Your Google Map\", Toast.LENGTH_LONG).show();\n }\n }", "public static void sendPostWebservice(Activity activity, String url, Response.Listener responseListener, Response.ErrorListener errorListener, final Map<String, String> params) {\n StringRequest stringRequest = new StringRequest(Request.Method.POST, url, responseListener, errorListener) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n return params;\n }\n\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> paramh = new HashMap<String, String>();\n paramh.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n return paramh;\n }\n };\n// Add the request to the RequestQueue.\n handler.addToRequestQueue(stringRequest);\n }", "public void onClick(View v) {\n try {\n URL newurl = new URL(\"http://www.google.com\");\n //apppel à CallWebAPI\n CallWebAPI c = new CallWebAPI(texte);\n c.execute(newurl.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "public static void start(Context context, String address, Uri uri) {\n DownloadFile.uri = uri;\n Intent intent = new Intent(context, DownloadFile.class);\n intent.putExtra(\"URL\", address);\n context.startService(intent);\n\n }", "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(MainActivity.this, ATM_Activity.class);\n myIntent.putExtra(\"Latitude\", latitude);\n myIntent.putExtra(\"Longitude\", longitude);\n startActivity(myIntent);\n }", "@Override\n public void onClick(View view) {\n String geoUri = \"http://maps.google.com/maps?q=loc:\" + 18.5155346 + \",\" + 73.7836165 + \" (\" + \"Manyavar\" + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(geoUri));\n mcontext.startActivity(intent);\n\n }", "public static void mapRestaurant(Context context,String locationName){\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + Uri.encode(locationName));\n //Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\"+\"40.782747,-73.984022(Eric)\");\n // Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=-33.8666,151.1957(Google+Sydney)\");\n\n// Create an Intent from gmmIntentUri. Set the action to ACTION_VIEW\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n// Make the Intent explicit by setting the Google Maps package\n// Intent intent = mapIntent.setPackage(\"com.google.android.apps.maps\");\n//\n// if (intent==null){\n// if (AppConstant.DEBUG) Log.d(this.getClass().getSimpleName()+\">\",);\n// }\n// Attempt to start an activity that can handle the Intent\n // if (mapIntent.resolveActivity(getPackageManager()) != null) {\n\n PackageManager packageManager = context.getPackageManager();\n List activities = packageManager.queryIntentActivities(mapIntent,\n PackageManager.MATCH_DEFAULT_ONLY);\n boolean isIntentSafe = activities.size() > 0;\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.get(0).toString());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.size());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Can we handle this intent:\"+isIntentSafe);\n\n\n context.startActivity(mapIntent);\n // }\n }", "@Override\n public void onClick(View view) {\n String sms = \"FINDME location is \";\n if (LOCATION != null) {\n sms = sms + \"coordinates\" + \"*\" + LOCATION.latitude + \"*\" + LOCATION.longitude;\n }\n sendSms(\"0473848248\", sms);\n }", "private void sendIntenttoServiece() {\n\t\tIntent intent = new Intent(context, RedGreenService.class);\n\t\tintent.putExtra(\"sendclean\", \"sendclean\");\n\t\tcontext.startService(intent);\n\n\t}", "private void sendRequest() {\n String origin = latitudewisata+\",\"+longitudewisata;\n Log.e(\"orininya\",origin);\n String destination = latitudewisata+\",\"+longitudewisata;\n Log.e(\"Dest\",destination);\n if (origin.isEmpty()) {\n Toast.makeText(this, \"Please enter origin address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (destination.isEmpty()) {\n Toast.makeText(this, \"Please enter destination address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onClick(View v) {\n if (!mTrackingLocation) {\n iniciarLocal();\n //Intent it = new Intent(Intent.ACTION_WEB_SEARCH);\n //it.putExtra(SearchManager.QUERY, \"Lojas Geek próximas \"+ lastAdress);\n //startActivity(it);\n } else {\n pararLocal();\n }\n }", "public void bSitio1(View view){\n Intent i = new Intent(getApplicationContext(), MapsActivity.class);\n i.putExtra(\"Latitud\", 6.21999);\n i.putExtra(\"Longitud\", -75.190537);\n i.putExtra(\"destino\", \"Isla Guaca\");\n startActivity(i);\n }", "public void run() {\n //Request the HTML\n try {\n HttpClient Client = new DefaultHttpClient();\n //String URL = \"http://10.0.2.2:8888/url\";\n String URL = \"http://\" + ipAddress + \":8888/intent?sentence=\" + URLEncoder.encode(query, \"utf-8\").replace(\"+\", \"%20\");\n String responseJsonString = \"\";\n\n // Create Request to server and get response\n HttpGet httpget = new HttpGet(URL);\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n responseJsonString = Client.execute(httpget, responseHandler);\n\n JSONObject responseJSON = new JSONObject(responseJsonString);\n // Show response on activity\n speakOut(responseJSON.getString(\"speechText\"));\n\n // Show response on activity\n String response_url = responseJSON.getString(\"url\");\n if(!response_url.equals(new_url))\n {\n new_url = response_url;\n myWebView.post(new Runnable() {\n public void run() {\n myWebView.loadUrl(new_url);\n }\n });\n //myWebView.loadUrl(new_url);\n }\n //System.out.println(responseString);\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "public interface IWebServiceLauncher {\n public void launchWebService(Intent intent);\n}", "public void submitOrder(View view) {\n\n displayQuantity(myQuantity);\n int total = calculatePrice(myPrice,myQuantity);\n String orderMessage = displayOrder(total);\n Context context = getApplicationContext();\n Toast myToast = Toast.makeText(context,\"Thanks:\" + myName,Toast.LENGTH_SHORT);\n myToast.show();\n // intent to maps\n //Intent myIntent = new Intent(Intent.ACTION_VIEW);\n //myIntent.setData(Uri.parse(\"geo:47.6, -122.3\"));\n Intent myIntent = new Intent(Intent.ACTION_SENDTO);\n myIntent.setData(Uri.parse(\"mailto:\"));\n myIntent.putExtra(Intent.EXTRA_EMAIL, \"korolvlondone@gmail.com\");\n myIntent.putExtra(Intent.EXTRA_SUBJECT,\"Java Order\");\n myIntent.putExtra(Intent.EXTRA_TEXT,orderMessage);\n if(myIntent.resolveActivity(getPackageManager())!= null) {startActivity(myIntent);}\n\n }", "private String getUrl(LatLng origin, LatLng dest) {\n\n // Origin of route\n String str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n\n // Destination of route\n String str_dest = \"destination=\" + dest.latitude + \",\" + dest.longitude;\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = str_origin + \"&\" + str_dest + \"&\" + sensor;\n\n // Output format\n String output = \"json\";\n\n// Log.e(\"URL\", \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters);\n\n // Building the url to the web service\n return \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters;\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(),AudioService.class);\n intent.putExtra(\"code\",1);\n startService(intent);\n }", "@Override\n \t public void onClick(View v) {\n \t\tRegno=(EditText) findViewById(R.id.regno);\n \t\tRouteno=(EditText) findViewById(R.id.routeno);\n \t\tDriver =(EditText) findViewById(R.id.name);\n \t\tPhone = (EditText) findViewById(R.id.phone);\n \t\t\n \t\tmrg = Regno.getText().toString();\n \t\tmrn = Routeno.getText().toString();\n \t\tmd = Driver.getText().toString();\n \t\tmp = Phone.getText().toString();\n \t\t\n \t\tIntent intentVibrate =new Intent(getApplicationContext(),VibrateService.class);\n \t\tstartService(intentVibrate);\n \t\t \t\t\n \t\t sendData();\n \t\t }", "public void onLocButton(View view) {\n gps = new GPS(MainActivity.this);\n //Checks if the location services are enabled and permitted\n if(gps.canGetLocation()){\n double lat = gps.getLatitude();\n double lon = gps.getLongitude();\n String URL = apiURL + latURL + lat + lonURL + lon + keyURL;\n Log.d(\"**\", URL);\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, URL, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n Log.d(\"**\", \"Response gained\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject coord = response.getJSONObject(\"coord\");\n JSONObject wind = response.getJSONObject(\"wind\");\n JSONObject sys = response.getJSONObject(\"sys\");\n JSONObject clouds = response.getJSONObject(\"clouds\");\n\n weatherData.setCity(response.getString(\"name\"));\n weatherData.setTemp(main.getString(\"temp\"));\n weatherData.setFeelsLike(main.getString(\"feels_like\"));\n weatherData.setHumidity(main.getString(\"humidity\"));\n weatherData.setWind(wind.getString(\"speed\"));\n weatherData.setClouds(clouds.getString(\"all\"));\n weatherData.setPressure(main.getString(\"pressure\"));\n weatherData.setSunrise(sys.getString(\"sunrise\"));\n weatherData.setSunset(sys.getString(\"sunset\"));\n weatherData.setLat(coord.getString(\"lat\"));\n weatherData.setLon(coord.getString(\"lon\"));\n weatherData.setCurrentTime(response.getString(\"dt\"));\n\n Intent goIntent = new Intent(context, TTSActivity.class);\n startActivity(goIntent);\n }\n catch (JSONException e) {\n Log.d(\"**\", \"JSON did not work\");\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"**\", String.valueOf(error));\n }\n });\n queue.add(jsonObjectRequest);\n\n } else {\n gps.showSettingsAlert();\n }\n\n }", "private void launchActivity(String title, String url){\n // package intent\n // start activity\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, \"default\");\n\n String content = \"The instruction for \" + title + \" can be found here!\";\n\n //set icons\n builder.setSmallIcon(android.R.drawable.btn_star);\n builder.setStyle(new NotificationCompat.BigTextStyle(builder).bigText(content));\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n\n // create a pending intent for the notification with the intent I created\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext,0, intent, 0);\n builder.setContentIntent(pendingIntent);\n\n //set the title and content of the notification\n builder.setContentTitle(\"Cooking Instruction\");\n builder.setContentText(content);\n\n // get the system service to display this notification\n NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(NOTIFICATION_SERVICE);\n\n //notify\n notificationManager.notify(1, builder.build());\n\n\n }", "public void startTrackingGeoPushes()\n\t{\n\t\tmContext.startService(new Intent(mContext, GeoLocationService.class));\n\t}", "private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }", "public void onClick(View v) {\n\n Intent visitSite_intent = new Intent(MainActivity.this, DetailActivity.class);\n visitSite_intent.putExtra(\"url\",\"http://aanm-vvrsrpolytechnic.ac.in/\");\n startActivity(visitSite_intent);\n }", "@Override\r\n public void onClick(View v) {\n String robodata=\"robot data\";\r\n String stringdata = \"throwing\";\r\n Intent mysqlintent = new Intent(collect_Data.this,mysql.class); //defining the intent.\r\n mysqlintent.putExtra(robodata, stringdata); //putting the data into the intent\r\n startActivity(mysqlintent); //launching the mysql activity\r\n }", "public void onClickStart(View v) {\n\t\tstartService(new Intent(this, MyService.class).putExtra(\"time\", 7));\n\t\tstartService(new Intent(this, MyService.class).putExtra(\"time\", 2));\n\t\t//startService(new Intent(this, MyService.class).putExtra(\"time\", 4));\n\t\tIntent intent = new Intent(this, MyService.class);\n\t\tintent.putExtra(\"time\", 4);\n\t\tstartService(intent);\n\t}", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n Toast.makeText(this, currentLatitude + \" - \" + currentLongitude + \"\", Toast.LENGTH_LONG).show();\n String latitude = currentLatitude + \",\";\n String latitudeAndLongitude = latitude + currentLongitude;\n REQUEST_URL_1 += latitudeAndLongitude;\n REQUEST_URL_1 += REQUEST_URL_2;\n ForecastAsyncTask task = new ForecastAsyncTask();\n task.execute(REQUEST_URL_1);\n\n }", "private void startService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, minTimeMillis,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\t\tlocationListener.onLocationChanged(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER));\r\n\t}", "public String buildUrl(String text_of_audio) {\n String wit = \"https://api.wit.ai/message\";\n String google = \"https://www.google.com/\";\n Uri sendRequest_wit = Uri.parse(wit).buildUpon()\n .appendQueryParameter(\"q\", text_of_audio).build();\n\n\n try {\n url = new URL(sendRequest_wit.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n Log.d(\"url\",url.toString());\n\n try {\n audioStr = new WitQueryTask().execute(url).get();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return audioStr;\n\n }", "private void onSendMap() {\n\t\tif(localBytes != null){\n\t\t\t// Prepare data intent \n\t\t\tIntent data = new Intent();\n\t\t\t// Pass relevant data back as a result\n\t\t\tif(tempLocation != null){\n\t\t\t\tdata.putExtra(\"lat\", tempLocation.getLatitude());\n\t\t\t\tdata.putExtra(\"lon\", tempLocation.getLongitude());\n\t\t\t}\n\t\t\tdata.putExtra(\"locationSnapshot\", localBytes);\n\t\t\t// Activity finished ok, return the data\n\t\t\tsetResult(RESULT_OK, data); // set result code and bundle data for response\n\n\t\t}\n\t\telse{\n\t\t\t// send reverse geo coded address\n\n\t\t}\n\t\tfinish(); // closes the activity, pass data to parent\n\t}", "public void refresh(View view) {\n Intent intent = new Intent(this, RSSService.class);\n intent.putExtra(\"RSS_URL\", url);\n startService(intent);\n\n }", "@Override\n public void onClick(View v) {\n Uri gmmIntentUri = Uri.parse(\"geo:37.7749,-122.4194\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }", "private void getDataFromMainActivity(){\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n site = bundle.getString(\"site\");\n }", "public void startLocationService(Context context){\n createLocationRequest();\n mGoogleApiClient = new GoogleApiClient.Builder(context)\n .addApi(LocationServices.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n mGoogleApiClient.connect();\n }", "@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\n public void onReceive(Context context, Intent intent) {\n double latitude = intent.getDoubleExtra(\"Lat\",0);\n double longitude = intent.getDoubleExtra(\"Lon\",0);\n mService.onGPSReceived(latitude,longitude);\n\n }", "private void startAddressLookupService() {\n Intent intent = new Intent(mContext, AddressLookupService.class);\n intent.putExtra(AddressLookupService.CURRENT_LOCATION, mLastLocation);\n mContext.startService(intent);\n }", "@Override\n protected Void doInBackground(Void... voids) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n WeatherService service = retrofit.create(WeatherService.class);\n Call<CurrentWeatherCallResult> call = service.getCurrentWeatherDataLatLng(String.valueOf(latLng.latitude), String.valueOf(latLng.longitude), AppId);\n call.enqueue(new Callback<CurrentWeatherCallResult>() {\n @Override\n public void onResponse(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Response<CurrentWeatherCallResult> response) {\n if (response.code() == 200 && response.body() != null) {//TODO DEFINE 200\n\n CurrentWeatherCallResult currentWeatherCallResult = response.body();\n CurrentWeather currentWeather =\n new CurrentWeather(\n position,\n currentWeatherCallResult.weather.get(0).description,\n currentWeatherCallResult.weather.get(0).icon,\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_max - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_min - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp - 273)),\n currentWeatherCallResult.name);\n Intent i;\n switch (position) {\n case -2:\n i = new Intent(\"CURRENT_WEATHER_SEARCH_A\");\n break;\n case -1:\n i = new Intent(\"CURRENT_WEATHER\");\n break;\n default:\n i = new Intent(\"CURRENT_WEATHER_F\");\n break;\n\n\n }\n i.putExtra(\"CURRENT_WEATHER_OBJECT\", currentWeather);\n mContext.sendBroadcast(i);\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Throwable t) {\n t.getMessage();\n }\n });\n return null;\n }", "public void sendToActivity(String message){\n //In questo metodo \"avviso\" l'app che è arrivato un nuovo dato dal raspberry.\n\n Intent intent = new Intent(\"NOTIFY_ACTIVITY\");\n\n if(message != null){\n intent.putExtra(\"CURRENT_ACTIVITY\",message);\n }\n\n //invio messaggio tramite broadcaster\n broadcast.sendBroadcast(intent);\n\n }", "public void bSitio2(View view){\n Intent i = new Intent(getApplicationContext(), MapsActivity.class);\n i.putExtra(\"Latitud\", 6.269434 );\n i.putExtra(\"Longitud\", -75.18322);\n i.putExtra(\"destino\", \"Represa Guatapé\");\n startActivity(i);\n }", "private void DisplayTrack(String sSouce, String dDestiny)\n {\n\n try {\n //when google map installed\n // intialize url\n Uri uri = Uri.parse(\"https://www.google.co.in/maps/dir/\" +sSouce + \"/\" +dDestiny);\n\n //Intialize intent with action view\n\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n // set pkg\n intent.setPackage(\"com.google.android.apps.maps\");\n\n // set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }catch (ActivityNotFoundException e)\n {\n // when google map is not install\n // set uri\n Uri uri = Uri.parse(\"https://play.google.com/store/apps/details?id=com.google.android.apps.maps\");\n // intialize intent with action view\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n // set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // start acivity\n startActivity(intent);\n\n }\n\n\n }", "@Override\n public void onClick(View v) {\n number = \"112\";\n String s = \"tel:\" + number;\n Intent intent = new Intent(Intent.ACTION_CALL);\n intent.setData(Uri.parse(s));\n if (ActivityCompat.checkSelfPermission(MainActivity.this, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n startActivity(intent);\n\n //for Location:\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (getApplicationContext().checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n\n fusedLocationProviderClient.getLastLocation()\n .addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n\n sendsms();\n\n }\n }\n });\n\n\n } else\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 0);\n }\n }", "@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n\r\n gps = new GPSTracker(CaptureService.this);\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n\r\n while (true) {\r\n //startJob();\r\n try {\r\n //Thread.sleep(3600000);\r\n // Thread.sleep(1800000);\r\n Thread.sleep(3600000);\r\n if (gps.canGetLocation()) {\r\n if (gps.canGetLocation()) {\r\n new SendToServer(gps.getLongitude(), gps.getLatitude()).execute();\r\n }\r\n\r\n gps.getLongitude();\r\n gps.getLatitude();\r\n gps.getTime();\r\n sending_latt = String.valueOf(gps.getLatitude());\r\n sending_longg = String.valueOf(gps.getLongitude());\r\n final SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n Date d = new Date(gps.getTime());\r\n str_timestamp = sdf.format(d);\r\n Log.e( \"CaptureService \", \"GPSTIME : \" + str_timestamp);\r\n\r\n }\r\n\r\n } catch (InterruptedException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n }\r\n });\r\n t.start();\r\n return START_STICKY;\r\n }", "@Override\n public void onClick(View v) {\n\n String order = sendOrder(parcelCart);\n\n String orderPost = \"http://project-order-food.appspot.com/send_order\";\n final PostTask sendOrderTask = new PostTask(); // need to make a new httptask for each request\n try {\n // try the getTask with actual location from gps\n sendOrderTask.execute(orderPost, order).get(30, TimeUnit.SECONDS);\n Log.d(\"httppost\", order);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n Log.d(\"Button\", \"clicked\");\n Log.d(\"sendorder\", sendOrder(parcelCart));\n Toast toast = Toast.makeText(getApplication().getBaseContext(), \"Order Placed!\", Toast.LENGTH_LONG);\n toast.show();\n }", "private void StartUnipointNotificationService(Intent intent) {\n\n\t\tIntent b = new Intent(Unipoint_ServiceActivity.SERVICEACTION);\n\n\t\tif (Unipoint_ServiceActivity.bDEBUG)\n\t\t\tLog.v(TAG, \"Call Service function \");\n\t\tcontext.startService(b);\n\n\t}", "@Override\n public void onClick(View v) {\n String Url= currentNews.getWebUrl();\n //sent intent to the website\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n intent.setData(Uri.parse(Url));\n getContext().startActivity(intent);\n }", "private void sendMessage() {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"custom-event-name\");\n // You can also include some extra data.\n double[] destinationArray = {getDestination().latitude,getDestination().longitude};\n intent.putExtra(\"destination\", destinationArray);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "public void sharePage(){\n Intent shareIntent = new Intent(Intent.ACTION_VIEW);\n shareIntent.setData(Uri.parse(\"http://192.168.43.105:5000\"));//edit url\n startActivity(shareIntent);\n }", "public void startNavigation(){\n\n Uri gmmIntentUri = Uri.parse(\"google.navigation:q=\"+lat+\",\"+lng);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n\n if (mapIntent.resolveActivity(getPackageManager()) != null) {\n\n startActivity(mapIntent);\n\n }\n\n\n\n }", "protected void startFetchAddressIS() {\n Intent intent = new Intent(this, FetchAddressIntentService.class);\n addressResultReceiver = new AddressResultReceiver(new Handler());\n intent.putExtra(Constants.RECEIVER, addressResultReceiver);\n intent.putExtra(Constants.LOCATION_DATA_EXTRA, mCurrentLocation);\n startService(intent);\n }", "private void sendMyBroadCast(String s)\n {\n try\n {\n Intent broadCastIntent = new Intent();\n broadCastIntent.setAction(MainActivity.BROADCAST_ACTION);\n\n // uncomment this line if you want to send data\n broadCastIntent.putExtra(\"data\", s);\n\n sendBroadcast(broadCastIntent);\n\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "public void run() {\n String naverHtml = httpConnection(\"https://api.openweathermap.org/data/2.5/onecall?lat=\"+lat+\"&lon=\"+lon+\"&exclude=alerts&appid=e9e3ed325461bd506285bdb140285195&lang=kr&units=metric\");\n\n Bundle bun = new Bundle();\n bun.putString(\"HTML_DATA\", naverHtml);\n\n Message msg = handler.obtainMessage();\n msg.setData(bun);\n handler.sendMessage(msg);\n }", "private void startaccessactivity() {\n\t\tIntent intent=new Intent(this,InspectWechatFriendService.class);\n\t\tstartService(intent);\n\t\tToast.makeText(getApplicationContext(), \"start sucess\", 0).show();\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n String latitude = mTrip.getLatLngString2().split(\"_\")[0]; //the lat of destination\n String longitude = mTrip.getLatLngString2().split(\"_\")[1]; //long of destination\n\n Log.i(TAG, \"StartTripActivity >> onClick: lat >> \" + latitude + \" -- log >> \" + longitude);\n Uri intentUri = Uri.parse(\"google.navigation:q=\" + latitude + \",\" + longitude);\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, intentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n Intent intentToService = new Intent(getApplicationContext(),\n FloatingService.class);\n\n intentToService.putExtra(KEY_PASS_TRIP, mTrip);\n\n Log.i(TAG, \"StartTripActivity >> onClick: \" + mTrip.getName());\n\n try {\n if (mapIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(mapIntent);\n }\n\n } catch (NullPointerException e) {\n Log.e(\"MAP\", \"map error !! \");\n// Toast.makeText(getApplicationContext(),\n// \"Couldn't open map!! \", Toast.LENGTH_LONG).show();\n }\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n startService(intentToService);\n finish();\n } else if (Settings.canDrawOverlays(StartTripActivity.this)) {\n startService(intentToService);\n finish();\n } else {\n askPermission();\n// Toast.makeText(getApplicationContext(),\n// \"we Need permission to display your notes in floating view\", Toast.LENGTH_SHORT).show();\n }\n }", "static Intent starter(Context context,String firebaseID,String name,String imageID,String adress,String service,String specialist,String phone,String time) {\n return null;\n }", "public static Intent makeIntent(Context context) {\n return new Intent(context,\n WeatherServiceSync.class);\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n url = intent.getStringExtra(AbstractTrackerActivity.EXTRA_URL);\n download = intent.getStringExtra(AbstractTrackerActivity.EXTRA_PASSWORD);\n deviceID = intent.getStringExtra(AbstractTrackerActivity.EXTRA_DEVICE_ID);\n frequency = intent.getLongExtra(AbstractTrackerActivity.EXTRA_FREQUENCY, 10)*1000;\n reset = intent.getBooleanExtra(AbstractTrackerActivity.EXTRA_RESET, false);\n\n //Start listening for location changes\n locationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,this); //Provider, min time (millis), min distance, listener\n\n //Build the notification\n notificationBuilder = new Notification.Builder(this)\n .setSmallIcon(R.drawable.notification)\n .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher))\n .setContentTitle(getString(R.string.notification_title))\n .setContentText(getString(R.string.notification_initial_text))\n .setOngoing(true);\n\n //Build the intent that is launched when the notification is clicked\n Intent resultIntent = new Intent(this, TrackerViewer.class);\n PendingIntent resultPendingIntent =\n PendingIntent.getActivity(\n this,\n 0,\n resultIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n //Associate the intent with the notification\n notificationBuilder.setContentIntent(resultPendingIntent);\n\n //Start the notification\n notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.notify(AbstractTrackerActivity.NOTIFICATION_ID, notificationBuilder.build());\n\n //Get the connectivity manager to monitor the changes in connectivity\n connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n //Get the settings - to find the privacy location\n SharedPreferences settings = getSharedPreferences(AbstractTrackerActivity.SETTINGS_NAME, Context.MODE_PRIVATE);\n //Get the radius for the privacy circle\n privacyRadius = settings.getInt(AbstractTrackerActivity.SETTINGS_PRIVACY_RADIUS, AbstractTrackerActivity.SETTINGS_DEFAULT_PRIVACY_RADIUS);\n\n //Get the users preference on toast messages.\n toast = settings.getBoolean(AbstractTrackerActivity.SETTINGS_TOAST_MODE, AbstractTrackerActivity.SETTINGS_DEFAULT_TOAST);\n\n //If the user has set a privacy location then use it.\n if(settings.contains(AbstractTrackerActivity.SETTINGS_PRIVACY_LATITUDE) && settings.contains(AbstractTrackerActivity.SETTINGS_PRIVACY_LONGDITUDE)) {\n double privacyLat = Double.parseDouble(settings.getString(AbstractTrackerActivity.SETTINGS_PRIVACY_LATITUDE, \"0\"));\n double privacyLong = Double.parseDouble(settings.getString(AbstractTrackerActivity.SETTINGS_PRIVACY_LONGDITUDE, \"0\"));\n privacyLocation = new Location(AbstractTrackerActivity.SETTINGS_PRIVACY_LOCATION);\n privacyLocation.setLatitude(privacyLat);\n privacyLocation.setLongitude(privacyLong);\n }\n\n\n return START_REDELIVER_INTENT;\n }", "public void accessWebService() {\n\r\n JsonReadTask task = new JsonReadTask();\r\n // passes values for the urls string array\r\n task.execute(new String[] { url });\r\n }", "@Override\n public void onClick(View v) {\n\n checkAccessibility();\n Intent intent = new Intent(MainActivity.this, FloatBallService.class);\n Bundle data = new Bundle();\n data.putInt(\"type\", FloatBallService.TYPE_ADD);\n intent.putExtras(data);\n startService(intent);\n }", "protected String doInBackground(Double... args) {\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n /*params.add(new BasicNameValuePair(\"latitude\", Double.toString(latitude)));\n params.add(new BasicNameValuePair(\"longitude\", Double.toString(longitude)));*/\n params.add(new BasicNameValuePair(\"latitude\", Double.toString(args[0])));\n params.add(new BasicNameValuePair(\"longitude\", Double.toString(args[1])));\n JSONObject json = jParser.makeHttpRequest(MapsContract.MapsEntry.url_all_products, \"GET\", params);\n Log.d(\"All Locations: \", json.toString());\n try {\n locations = json.getJSONArray(MapsContract.MapsEntry.TAG_LOCATION);\n for (int i = 0; i < locations.length(); i++) {\n JSONObject c = locations.getJSONObject(i);\n String uid = c.getString(MapsContract.MapsEntry.TAG_UID);\n String distance = c.getString(MapsContract.MapsEntry.TAG_DISTANCE);\n String latitude = c.getString(MapsContract.MapsEntry.TAG_LATITUDE);\n String longitude = c.getString(MapsContract.MapsEntry.TAG_LONGITUDE);\n HashMap<String, String> map = new HashMap<String, String>();\n map.put(MapsContract.MapsEntry.TAG_UID, uid);\n map.put(MapsContract.MapsEntry.TAG_DISTANCE, distance);\n map.put(MapsContract.MapsEntry.TAG_LATITUDE, latitude);\n map.put(MapsContract.MapsEntry.TAG_LONGITUDE, longitude);\n locationList.add(map);\n }\n error += json.toString() + \"From DoInBackground\";\n Thread.sleep(5000);\n } catch (JSONException e) {\n error += e.getLocalizedMessage() + \"JSONExecption\";\n\n } catch (InterruptedException e) {\n error += e.getMessage() + \"InterruptedExeption\";\n }\n //Toast.makeText(getApplicationContext(), json.toString(), Toast.LENGTH_LONG).show();\n return error;\n }", "@Override\n public void onMapClick(LatLng point) {\n double lati = point.latitude;\n\n\n // Getting longitude of the current location\n double longi = point.longitude;\n\n\n i = new Intent(MapsActivity.this, addtasks.class);\n\n\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", lati);\n b.putDouble(\"longitude\", longi);\n i.putExtras(b);\n\n startActivity(i);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public interface SendNotificationService {\n @FormUrlEncoded\n @POST(\"sendNotification3.php\")\n Call<SendNotificationApiResponse> sendNotification(@Field(\"to\") String to, @Field(\"message\") String message,\n @Field(\"title\") String title, @Field(\"time\") String time,\n @Field(\"sender\") String sender);\n}", "@Override\n public void run() {\n Intent intent=new Intent(getApplicationContext(),OTPPage.class);\n\n //passing the data\n intent.putExtra(\"auth\",s);\n\n //start the intent\n startActivity(intent);\n\n }", "private void direction_call(LatLng orign, LatLng des) {\n\n String url = \"https://maps.googleapis.com/maps/api/directions/json?origin=\" + orign.latitude + \",\" + orign.longitude + \"&destination=\" + des.latitude + \",\" + des.longitude + \"&sensor=false\";\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n StringRequest objectRequest = new StringRequest(url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Toast.makeText(getActivity(), response.toString(), 3).show();\n ParserTask parserTask = new ParserTask();\n parserTask.execute(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n requestQueue.add(objectRequest);\n }", "public void startService(View view) {\n startService(new Intent(getBaseContext(), Myservice.class));\n }", "@Override\n protected Void doInBackground(Void... voids) {\n HttpHandler handler = new HttpHandler();\n\n // Realizar llamada a url y obtener respuesta\n String[] mIdsArray;\n Log.i(\"URL\", url_by_gps + \"lat=\" + mLocation.getLatitude() + \"&lon=\" + mLocation.getLongitude() + \"&units=\" + mode + \"&appid=\" + API_KEY);\n String jsonStr = handler.makeServiceCall(url_by_gps + \"lat=\" + mLocation.getLatitude() + \"&lon=\" + mLocation.getLongitude() + \"&units=\" + mode + \"&appid=\" + API_KEY + \"&lang=es\");\n Log.i(TAG, \"Respuesta de api: \" + jsonStr);\n if (jsonStr != null) {\n try {\n\n //JSONArray jsonArray = new JSONArray(jsonStr);\n JSONObject jsonObj = new JSONObject(jsonStr);\n weatherData = new WeatherData(jsonObj);\n\n URL url = new URL(url_img + weatherData.getWeather().getIcon() + IMG_EXTENSION);\n Bitmap image = BitmapFactory.decodeStream(url.openConnection().getInputStream());\n weatherData.getWeather().setIconBitmap(image);\n//url.openConnection().\n Log.i(\"AG\", \"Finaliza seteo\");\n url.openConnection().getInputStream().close();\n } catch (final JSONException e) {\n Log.e(TAG, \"Json parsing error: \" + e.getMessage());\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(),\n \"Json parsing error: \" + e.getMessage(),\n Toast.LENGTH_LONG).show();\n }\n });\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } else {\n Log.e(TAG, \"No es posible obtener json del server.\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(),\n \"No es posible obtener json del server. Revisar LogCat por posibles errores!\",\n Toast.LENGTH_LONG).show();\n }\n });\n }\n\n\n return null;\n }", "@Override\n public void onClick(View view) {\n Uri gmmIntentUri = Uri.parse(\"geo:0, 0?q=Animal+Shelter+near+me\");\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), StartActivityReceiver.class);\n intent.putExtra(\"zjf\", \"123\");\n sendBroadcast(intent);\n }", "@Override\n public void onClick(View v) {\n if(fieldChecker() && checkForDigits() && checkForSpecialCharacters()) // check for empty fields first\n {\n\n\n String streetAddress = editTextStreetAddress.getText().toString();\n String city = editTextCity.getText().toString();\n String state = editTextState.getText().toString();\n String firstName = editTextFirstName.getText().toString();\n String lastName = editTextLastName.getText().toString(); // get the required info\n String phoneNumber = editTextPhoneNumber.getText().toString();\n String ZIPCode = editTextZIPCode.getText().toString(); // get the required info after checking empty fields\n\n if(checkPhoneNumber()) { // check for valid number\n\n Intent intent = new Intent(getContext(), GeocodingService.class);\n intent.putExtra(\"Receiver\", mResultReceiver);\n intent.putExtra(\"Address\", streetAddress+city+state);\n Log.e(TAG, \"Starting Service\");\n progressBarLocation.setVisibility(View.VISIBLE);\n textViewApproxLoc.setVisibility(View.VISIBLE);\n scrollView.setVisibility(View.INVISIBLE);\n getActivity().startService(intent);\n if(saveAddressSwitch.isChecked())\n {\n userSession.setFirstName(firstName);\n userSession.setLastName(lastName); // set the values in the user session\n userSession.setCityName(city);\n userSession.setState(state);\n userSession.setStreetAddress(streetAddress);\n userSession.setZipCode(ZIPCode);\n userSession.setPhoneNumber(phoneNumber);\n userSession.setIsSwitchIsOn(true); // set switch to on\n }\n else\n {\n userSession.setFirstName(null);\n userSession.setLastName(null);\n userSession.setCityName(null); // set session values to null\n userSession.setState(null);\n userSession.setStreetAddress(null);\n userSession.setZipCode(null);\n userSession.setPhoneNumber(null);\n userSession.setIsSwitchIsOn(false);\n }\n }\n }\n\n\n }", "private static String prepareURL(String message, String mobileNumber) {\n\n\t\ttry {\n\t\t\tmessage = URLEncoder.encode(message, \"UTF-8\").replace(\"+\", \"%20\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tlog(\"UnsupportedEncodingException.. plz change the encoding algo..\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*HariKrishna*/\n\t\treturn \"http://smshorizon.co.in/api/sendsms.php?user=HariKrishna&apikey=RaI23VZXtffNRHSIieYO&type=txt&senderid=PC-TXTMSG&mobile=\" + mobileNumber + \"&message=\" + message;\n\t}", "public void createPhoneIntent(View view){\n Intent intent = new Intent(Intent.ACTION_DIAL);\n\n //Step 2: Add the telephonne number as a data (URI) to the intent using \"tel:phone_num\";\n Uri uri = Uri.parse(\"tel:09095966472\");\n intent.setData(uri);\n\n //Step 3: Start the activity\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}" ]
[ "0.6493563", "0.62526035", "0.6190652", "0.61808705", "0.61371493", "0.6134779", "0.5942841", "0.5915345", "0.58944196", "0.5854501", "0.58513314", "0.58506966", "0.5847591", "0.5844714", "0.58443743", "0.58368605", "0.58199626", "0.58131635", "0.581255", "0.58111733", "0.580516", "0.5803091", "0.579866", "0.57683307", "0.57455975", "0.5740576", "0.57334936", "0.57009125", "0.57001233", "0.56976676", "0.5694085", "0.5691227", "0.5686875", "0.568451", "0.56565696", "0.56445014", "0.56419903", "0.564109", "0.5637664", "0.5603805", "0.5584121", "0.5574649", "0.55690783", "0.55684257", "0.5566424", "0.55614626", "0.5557176", "0.5555136", "0.55488825", "0.55094045", "0.549121", "0.5490913", "0.5481689", "0.5478526", "0.5465111", "0.5461701", "0.54601496", "0.5456226", "0.5453644", "0.54444915", "0.542117", "0.5411692", "0.539536", "0.5392498", "0.5388995", "0.5383244", "0.5382994", "0.53829587", "0.5382055", "0.5379812", "0.5368966", "0.53659284", "0.536265", "0.53572214", "0.53407055", "0.5339464", "0.5336745", "0.53346187", "0.5333762", "0.5326751", "0.53212637", "0.5314896", "0.5308386", "0.53064233", "0.5301019", "0.5296804", "0.52945864", "0.5289961", "0.52869046", "0.5285891", "0.5276358", "0.52756137", "0.5268382", "0.52667063", "0.52654344", "0.5263436", "0.5263422", "0.5260995", "0.5254635", "0.5254461" ]
0.5637829
38
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
useful for verbose logging output don't commit this with this property enabled, or any 'mvn test' will be really verbose System.setProperty("org.slf4j.simpleLogger.log.nifi.processors.standard", "debug"); create a Jetty server on a random port
@BeforeClass public static void beforeClass() throws Exception { server = createServer(); server.startServer(); // this is the base url with the random port url = server.getUrl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void traceSettingInfo() {\n log(\"Setting proxy to \"\n + (proxyHost != null ? proxyHost : \"''\")\n + \":\" + proxyPort,\n Project.MSG_VERBOSE);\n }", "@Parameter(optional=true, description=\"Port number for the embedded Jetty HTTP server, default: \\\\\\\"\" + ServletEngine.DEFAULT_PORT + \"\\\\\\\". \"\n\t\t\t+ \"If the port is set to 0, the jetty server uses a free tcp port, and the metric `serverPort` delivers the actual value.\")\n\tpublic void setPort(int port) {}", "void setDebugPort(Integer debugPort);", "public static void set(ServerLoggingConfiguration config) {\r\n LogImplServer.config = config;\r\n }", "static void debug() {\n ProcessRunnerImpl.setGlobalDebug(true);\n }", "public WebServer()\n {\n if (!Variables.exists(\"w_DebugLog\"))\n Variables.setVariable(\"w_DebugLog\", true);\n\n if (!Variables.exists(\"w_Port\"))\n Variables.setVariable(\"w_Port\", 80);\n\n if (!Variables.exists(\"w_NetworkBufferSize\"))\n Variables.setVariable(\"w_NetworkBufferSize\", 2048);\n\n PORT = Variables.getInt(\"w_Port\");\n DEBUG = Variables.getBoolean(\"w_DebugLog\");\n BUFFER_SIZE = Variables.getInt(\"w_NetworkBufferSize\");\n }", "private void logErrorAndFallBackToDefaultPort(final String serverPortProperty) {\n getLog(this).error(\"Illegal value for server port - should be non-negative integer, was \" + serverPortProperty);\n getLog(this).error(\"Falling back to default port \" + DEFAULT_SERVER_SFTP_PORT);\n this.serverPort = DEFAULT_SERVER_SFTP_PORT;\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void setupLoggingEndpoint() {\n HttpHandler handler = (httpExchange) -> {\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(serverLogsArray.toJSONString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));\n this.setHandler(this.getLoggingApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);\n }", "protected void serverStarted()\n {\n System.out.println(\"Server listening for connections on port \" + getPort());\n }", "protected void serverStarted()\n {\n // System.out.println\n // (\"Server listening for connections on port \" + getPort());\n }", "public static void main(String[] args) throws IOException {\n int port = 8006;\n ServerSocketChannel localServer = ServerSocketChannel.open();\n localServer.bind(new InetSocketAddress(port));\n Reactor reactor = new Reactor();\n // REACTOR线程\n GlobalThreadPool.REACTOR_EXECUTOR.submit(reactor::run);\n\n // WORKER单线程调试\n while (localServer.isOpen()) {\n // 此处阻塞等待连接\n SocketChannel remoteClient = localServer.accept();\n\n // 工作线程\n GlobalThreadPool.WORK_EXECUTOR.submit(new Runnable() {\n @SneakyThrows\n @Override\n public void run() {\n // 代理到远程\n SocketChannel remoteServer = new ProxyHandler().proxy(remoteClient);\n\n // 透明传输\n reactor.pipe(remoteClient, remoteServer)\n .pipe(remoteServer, remoteClient);\n }\n });\n }\n }", "public Debug() {\n target = getProject().getObjects()\n .property(JavaForkOptions.class);\n port = getProject().getObjects()\n .property(Integer.class).convention(5005);\n server = getProject().getObjects()\n .property(Boolean.class).convention(true);\n suspend = getProject().getObjects()\n .property(Boolean.class).convention(true);\n finalizedBy(target);\n }", "public static void main(String[] args){ \r\n\t\t /* PropertyConfigurator.configure(\"application.properties\");\r\n\t\t log.debug(\"Hello this is a debug message\"); \r\n\t log.info(\"Hello this is an info message\"); \r\n\t System.out.println(\"Hi..Cool\");\r\n\t URLTest u=new URLTest();\r\n\t u.sendGET();*/\r\n\t\t\r\n\t\t System.out.println(\"Hi..IMI\");\r\n\t }", "@BeforeClass\n public static void setUpClass() {\n final Properties p = new Properties();\n p.put(\"log4j.appender.Remote\", \"org.apache.log4j.net.SocketAppender\");\n p.put(\"log4j.appender.Remote.remoteHost\", \"localhost\");\n p.put(\"log4j.appender.Remote.port\", \"4445\");\n p.put(\"log4j.appender.Remote.locationInfo\", \"true\");\n p.put(\"log4j.rootLogger\", \"ALL,Remote\");\n PropertyConfigurator.configure(p);\n }", "public void setHttpPort(Integer port) {\n\t\tif (myNode != null) {\n\t\t\tthrow new IllegalStateException(\"change of port only before startup!\");\n\t\t}\n\t\tif (port == null || port < 1) {\n\t\t\thttpPort = 0;\n\t\t} else {\n\t\t\thttpPort = port;\n\t\t}\n\t}", "@Override\n\tpublic int getServerPort() {\n\t\treturn 0;\n\t}", "private void setDefaultLocalPort() {\n setLocalPort(session.getConfiguration().getServerPort() - 1);// Default\n // L-1\n }", "protected void serverStarted()\r\n {\r\n System.out.println\r\n (\"Server listening for connections on port \" + getPort());\r\n }", "@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\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(\"LocalProxy run on \" + port);\r\n\t}", "@Override\n\t\tpublic int getServerPort() {\n\t\t\treturn 0;\n\t\t}", "@Test\n public void serverConfiguration() throws IOException {\n initJadlerUsing(new JettyStubHttpServer());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "public void port (int port) {\n this.port = port;\n }", "public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}", "@BeforeClass\n\tpublic static void start() throws IOException\n\t{\n\t\tng.configure(\"log4j.properties\");\n\t\tFileInputStream st= new FileInputStream(\"config.properties\");\n\t\tmp.load(st);\n\t\tlg.info(\"============= visiting url ==============\");\n\t\tdr.get(mp.getProperty(\"url\"));\n\t\t\n\t\t\n\t}", "private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}", "@Before\n public void setUp() throws Exception {\n this.setServer(new JaxWsServer());\n this.getServer().setServerInfo(\n new ServerInfo(MovieService.class, new MovieServiceImpl(),\n \"http://localhost:9002/Movie\", false, true));\n super.setUp();\n }", "@PostConstruct\n public void init() throws SQLException, IOException {\n Server.createWebServer(\"-webPort\", \"1777\").start();\n\n\n }", "void startServer(int port) throws Exception;", "public static void main(String[] argv) throws Exception {\n int port = 7777;\n if (argv.length > 0) {\n port = Integer.parseInt(argv[0]);\n }\n HttpsServer server = HttpsServerFactory.createServer(\"localhost\", port);\n server.createContext(\"/\", new LogHandler());\n server.start();\n while (true) {\n }\n }", "public static void setPort(int port){\n catalogue.port = port;\n }", "public static void main(String[] args) throws Exception {\n \n// // Log actions into a text file\n// String currentDirectory = System.getProperty(\"user.dir\");\n// String configurationFilename = \"logging.properties\";\n// String configFilePath = currentDirectory + \"/\" + configurationFilename;\n// try {\n// FileInputStream config = new FileInputStream(configFilePath);\n// LogManager.getLogManager().readConfiguration(config);\n// String logFilename = System.getProperty(\"user.home\") + \"/.ihale/log.txt\";\n// // Allow appending to the logging file.\n// Handler fh = new FileHandler(logFilename, true);\n// Logger.getLogger(\"\").setLevel(Level.OFF);\n// Logger.getLogger(\"\").addHandler(fh);\n// }\n// catch (IOException ioe) {\n// // CheckStyle was complaining about use of tabs when there wasn't so this long string is\n// // placed into a String variable to comply with the warning.\n// System.out.println(\"Error, logging properties file not found at \" + configFilePath);\n// System.out.println(\"Log messages will be appended to the console\");\n// }\n \n Server server = new Server(port);\n Context context = new Context(server, \"/\" + contextPath, Context.SESSIONS);\n\n ServletHolder servletHolder = new ServletHolder(new WicketServlet());\n servletHolder.setInitParameter(\"applicationClassName\", applicationClass);\n servletHolder.setInitOrder(1);\n context.addServlet(servletHolder, \"/*\");\n try {\n server.start();\n System.out.printf(\"%nApplication at http://localhost:%s/%s. Press return to exit.%n\", port,\n contextPath);\n while (System.in.available() == 0) {\n Thread.sleep(5000);\n }\n server.stop();\n server.join();\n }\n catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "private void setUpServerThread() {\n\t\ttry {\n\t\t\tthis.incomingMsgNodes = new TCPServerThread(0, this);\n\t\t\tThread thread = new Thread(incomingMsgNodes);\n\t\t\tthread.start();\n\t\t\tthis.myServerThreadPortNum = incomingMsgNodes.getPort();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble creating Server Socket\");\n\t\t}\n\t}", "public Server() {\n\t\tsession = new WelcomeSession();\n\t\tmPort = DEFAULT_PORT;\n\t\texecutor = Executors.newCachedThreadPool();\n\t}", "public void setDefaultPort() {\r\n\t\tsetPort(DEFAULT_PORT);\r\n\t}", "public void setPort(int port) {\r\n this.port = port;\r\n }", "public void setSiteHttpServerPort(int pSiteHttpServerPort) {\n mSiteHttpServerPort = pSiteHttpServerPort;\n }", "public HttpServerConfiguration() {\n this.sessionsEnabled = true;\n this.connectors = new ArrayList<HttpConnectorConfiguration>();\n this.sslConnectors = new ArrayList<HttpSslConnectorConfiguration>();\n this.minThreads = 5;\n this.maxThreads = 50;\n }", "public void setLoggerLevel(TraceLevel level) {\n\t\t//Topology.STREAMS_LOGGER.setLevel(level);\t\t\n\t\t//Topology.TOPOLOGY_LOGGER.setLevel(level); \n\t\tgetConfig().put(ContextProperties.TRACING_LEVEL, java.util.logging.Level.FINE);\t\t\n\t\tSystem.out.println(\"Streams topology logger level: \" + Topology.TOPOLOGY_LOGGER.getLevel());\n\t\t\n\t}", "public Slf4jLogService() {\n this(System.getProperties());\n }", "@Test\n public void configure()\n {\n String message = \"This message should be logged\";\n \n LoggingBean loggingBean = new LoggingBean();\n loggingBean.log(message);\n assertTrue(SYSTEM_OUT_REDIRECT.toString().contains(message));\n }", "public static void main(String[] args) throws IOException {\n ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);\n context.setContextPath(\"/\");\n\n // Establish DB connection first\n\n // now start the server\n System.out.println(\"=== Initializing server on port \" + PORT);\n\n Server jettyServer = new Server(PORT);\n jettyServer.setHandler(context);\n\n if (LOG_REQUESTS) {\n RequestLog requestLog = new RipLogger();\n jettyServer.setRequestLog(requestLog);\n }\n\n ServletHolder jerseyServlet = context.addServlet(ServletContainer.class, \"/sudoku/*\");\n jerseyServlet.setInitOrder(0);\n jerseyServlet.setInitParameter(\"jersey.config.server.provider.packages\", \"com.shadedreality.rest\");\n\n try {\n jettyServer.start();\n jettyServer.dumpStdErr();\n jettyServer.join();\n } catch (Exception e) {\n System.err.println(\"Uncaught Exception in server: \"+e);\n }\n finally {\n jettyServer.destroy();\n }\n }", "public void setServer(int port) {\n this.server = port;\n }", "public void setPort (int port) {\n this.port = port;\n }", "public void SetPropertiesGenerateServer(java.lang.String s) {\r\n java.lang.String thred = ThredProperties();\r\n Properties prop = new Properties();\r\n\r\n try (FileOutputStream out = new FileOutputStream(\"./config.properties\")) {\r\n\r\n switch (s) {\r\n case \"SimpleMazeGenerator\": {\r\n System.out.println(\"ggg\");\r\n prop.setProperty(\"algorithm\", solve);\r\n prop.setProperty(\"generate\", \"SimpleMazeGenerator\");\r\n generate=\"SimpleMazeGenerator\";\r\n prop.setProperty(\"threadNum\", thred);\r\n prop.store(out, null);\r\n break;\r\n }\r\n case \"MyMazeGenerator\": {\r\n prop.setProperty(\"algorithm\", solve);\r\n prop.setProperty(\"generate\", \"MyMazeGenerator\");\r\n generate=\"MyMazeGenerator\";\r\n prop.setProperty(\"threadNum\", thred);\r\n prop.store(out, null);\r\n break;\r\n }\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setPort(int port);", "public void setPort(int port);", "public static void main(String [] args) {\n context = new AnnotationConfigApplicationContext(Config.class);\n // For the destroy method to work.\n context.registerShutdownHook();\n\n\n //TestService service = (TestService) context.getBean(\"test_service\");\n //PollingConsumer consumer = (PollingConsumer) context.getBean(\"test_consumer\");\n\n // Start tcp and flash servers\n Map<String, Initializer> initializers = context.getBeansOfType(Initializer.class);\n if (initializers != null) {\n for(Initializer initializer : initializers.values()) {\n initializer.initialize();\n }\n }\n\n NettyManager manager = context.getBean(NettyManager.class);\n try\n {\n manager.startServer();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void customize(ConfigurableEmbeddedServletContainer container) {\n\t\tcontainer.setPort(8888); \n\t}", "@Test\n public void portConfiguration() throws IOException {\n initJadlerListeningOn(SocketUtils.findAvailableTcpPort());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "public DefaultTCPServer(int port) throws Exception {\r\n\t\tserverSocket = new ServerSocket(port);\t}", "public void setHttpsPort(Integer port) {\n\t\tif (myNode != null) {\n\t\t\tthrow new IllegalStateException(\"change of port only before startup!\");\n\t\t}\n\t\tif (port == null || port < 1) {\n\t\t\thttpsPort = 0;\n\t\t} else {\n\t\t\thttpsPort = port;\n\t\t}\n\t}", "@BeforeClass\n\tpublic static void setup() {\n\t\tLogger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);\n\t\troot.setLevel(Level.INFO);\n\t}", "@Override\n\tpublic void setLoggingLevelVerbosity(InetSocketAddress arg0, int arg1)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\n\t}", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "default int getPort() {\n return getServer().getPort();\n }", "@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }", "public traceProperties() { \n //setProperty(\"WorkingDirectory\",\"null\");\n //setProperty(\"situated\",\"false\"); \n \n }", "@BeforeClass\n\tpublic void setup() {\n\t\tlogger = Logger.getLogger(\"AveroRestAPI\");\n\t\tPropertyConfigurator.configure(\"Log4j.properties\");\n\t\tlogger.setLevel(Level.DEBUG);\n\n\t}", "public void setPort(String port) {\r\n this.port = port;\r\n }", "public static void main(String args[]) throws Exception {\n SLF4JBridgeHandler.install();\n\n try {\n JettyServer server = new JettyServer(8080);\n server.start();\n log.info(\"Server started\");\n server.join();\n } catch (Exception e) {\n log.error(\"Failed to start server.\", e);\n }\n }", "public int getStandardPort()\n\t{\n\t\treturn DEFAULT_PORT;\n\t}", "public void setup (SProperties config) throws IOException {\n\tString sysLogging =\n\t System.getProperty (\"java.util.logging.config.file\");\n\tif (sysLogging != null) {\n\t System.out.println (\"Logging configure by system property\");\n\t} else {\n\t Logger eh = getLogger (config, \"error\", null, \"rabbit\",\n\t\t\t\t \"org.khelekore.rnio\");\n\t eh.info (\"Log level set to: \" + eh.getLevel ());\n\t}\n\taccessLog = getLogger (config, \"access\", new AccessFormatter (),\n\t\t\t \"rabbit_access\");\n }", "@SuppressWarnings(\"resource\")\r\n\tprivate void tryToSetupServer() {\r\n\t\ttry {\r\n\t\t\tsetupStream.write(\"Trying to start on \" + Inet4Address.getLocalHost().toString() + \":\" + port);\r\n\t\t\tcientConn = new ServerSocket(port).accept();\r\n\t\t\tsetupStream.write(\"Client connectd, ready for data\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tif(e.getMessage().contains(\"Bind failed\")) {\r\n\t\t\t\tsetupStream.write(\"You can't use that port\");\r\n\t\t\t} else if(e.getMessage().contains(\"Address already in use\")) {\r\n\t\t\t\tsetupStream.write(\"That port is already in use\");\r\n\t\t\t}\r\n\t\t\tport = -1;\r\n\t\t}\r\n\t}", "public void testSetPort() {\n }", "public void setDebugServer(final boolean debugServer)\n {\n this.debugServer = debugServer;\n }", "public void setConsoleLog(boolean isSet) {\r\n consoleLog = isSet;\r\n }", "public int getServerPort(){\n\t\treturn serverPort; \n\t}", "public void setServerPort(int serverPort) {\n this.serverPort = serverPort;\n }", "public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}", "public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}", "private void startServer(String ip, int port, String contentFolder) throws IOException{\n HttpServer server = HttpServer.create(new InetSocketAddress(ip, port), 0);\n \n //Making / the root directory of the webserver\n server.createContext(\"/\", new Handler(contentFolder));\n //Making /log a dynamic page that uses LogHandler\n server.createContext(\"/log\", new LogHandler());\n //Making /online a dynamic page that uses OnlineUsersHandler\n server.createContext(\"/online\", new OnlineUsersHandler());\n server.setExecutor(null);\n server.start();\n \n //Needing loggin info here!\n }", "public static void initCommunicationServerThread(ProjectType project){\r\n try{\r\n serverSocket = new ServerSocket(Attributes.PROFILING_PORT, 2, InetAddress.getLocalHost());\r\n System.out.println(\"Server - ServerSocket created on port: \" + serverSocket.getLocalPort());\r\n }catch (UnknownHostException uhe){\r\n uhe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }\r\n new CommunicationServerThread(project);\r\n }", "@Test\n public void testGetCustomClassicConsolePort()\n {\n SmartProperties smart = new SmartProperties(\"testProperties/smart-classicConsolePort9999.properties\");\n assertEquals(1, smart.properties.size());\n assertEquals(9999, smart.getIntProperty(CLASSIC_CONSOLE_PORT));\n }", "final public void setPort(int port) {\n this.port = port;\n }", "private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }", "public WebServer ()\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t{\r\n\t\tthis.shost = DEF_HOST; \t\t\t\t\t\t\t\t\r\n\t\tthis.sPort = DEF_PORT; \t\t\t\t\t\t\t\t\r\n\t}", "private static int getHerokuAssignedPort() {\n return 4567;\n }", "private static void openServerSocket(int port) {\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Server Error\");\n\t\t}\n\t}", "@Override\n public void contextInitialized(ServletContextEvent sce) {\n EntityConnector.createEntityManagerFactory();\n if (!logStarted){\n logStarted=true;\n try {\n Log.startLogFile();\n } catch (IOException ex) {\n System.out.println(\"Could Not Start the Log File!\" + ex.getMessage());\n }\n Log.writeToLog(\"Server has Started!\");\n \n }\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public static void setTestConnectionPort(String port) {\n TEST_CONNECTION_PORT = port;\n }", "@Test\n\tpublic void testBasicDevStartup() throws InterruptedException, ClassNotFoundException, ExecutionException, TimeoutException {\n\t\ttestArgSetup(\"test\");\n\t\t\n\t\t//really just making sure we don't throw an exception...which catches quite a few mistakes\n\t\tDevelopmentServer server = new DevelopmentServer(true);\n\t\t//In this case, we bind a port\n\t\tserver.start();\n\t\t//we should depend on http client and send a request in to ensure operation here...\n\t\t\n\t\tserver.stop();\n\t}", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public static void init()\n {\n debugger = new Debugger(\"log\");\n info = true;\n }", "public void setPort(int value) {\n this.port = value;\n }", "private void setupLogging() {\n\t\t// Ensure all JDK log messages are deferred until a target is registered\n\t\tLogger rootLogger = Logger.getLogger(\"\");\n\t\tHandlerUtils.wrapWithDeferredLogHandler(rootLogger, Level.SEVERE);\n\n\t\t// Set a suitable priority level on Spring Framework log messages\n\t\tLogger sfwLogger = Logger.getLogger(\"org.springframework\");\n\t\tsfwLogger.setLevel(Level.WARNING);\n\n\t\t// Set a suitable priority level on Roo log messages\n\t\t// (see ROO-539 and HandlerUtils.getLogger(Class))\n\t\tLogger rooLogger = Logger.getLogger(\"org.springframework.shell\");\n\t\trooLogger.setLevel(Level.FINE);\n\t}", "public WebServer (int port)\t\t\t\t\t\t\t\t\t\t\t\r\n\t{\r\n\t\tthis.shost = DEF_HOST; \t\t\t\t\t\t\t\t\r\n\t\tthis.sPort = port; \t\t\t\t\t\t\t\t\t\t\r\n\t}", "public static void enableDebugging(){\n DEBUG = true;\n }", "public int getServerPortNumber(){\n return this.serverPortNumber;\n }", "private static void setupServerContext(){\n\n serverContext.set(new ServerContext());\n serverContext.get().bgThreadIds = new int[GlobalContext.getNumTotalBgThreads()];\n serverContext.get().numShutdownBgs = 0;\n serverContext.get().serverObj = new Server();\n\n }", "public void setDebug(boolean debug, PrintStream out)\n {\n session.setDebug(debug);\n if (debug)\n session.setDebugOut(out);\n }" ]
[ "0.5857505", "0.5805846", "0.5549582", "0.55355537", "0.53982246", "0.5382786", "0.53487235", "0.5316536", "0.5313089", "0.5276604", "0.5274847", "0.5264332", "0.52597183", "0.5241863", "0.52142847", "0.5207851", "0.51909375", "0.51639205", "0.51546025", "0.51472694", "0.51436484", "0.51358145", "0.5118608", "0.5109415", "0.51028496", "0.510091", "0.5089695", "0.5078182", "0.50544626", "0.50515366", "0.50445396", "0.5042192", "0.5041217", "0.5029671", "0.50184613", "0.501739", "0.50152856", "0.50098455", "0.50005394", "0.49939007", "0.49918437", "0.49896234", "0.497623", "0.49744675", "0.49706548", "0.4969633", "0.4969633", "0.49642465", "0.49608067", "0.4958812", "0.49519795", "0.4951128", "0.4950344", "0.4946567", "0.4944592", "0.4944592", "0.4944592", "0.4944592", "0.4944592", "0.4944592", "0.4936938", "0.4930784", "0.4922515", "0.4920962", "0.49164543", "0.49146172", "0.49133816", "0.49059108", "0.49049103", "0.4896688", "0.48961923", "0.4889425", "0.48893568", "0.48837912", "0.48820767", "0.48818082", "0.48818082", "0.48797566", "0.48753393", "0.48710075", "0.486974", "0.48684922", "0.48643237", "0.4861108", "0.48604956", "0.48578826", "0.48564157", "0.48525834", "0.48524317", "0.48521513", "0.48521513", "0.48521513", "0.48521513", "0.48488978", "0.48441508", "0.48419753", "0.48350844", "0.483465", "0.4834548", "0.4828933", "0.48216698" ]
0.0
-1
Currently InvokeHttp does not support Proxy via Https
@Test public void testProxy() throws Exception { addHandler(new MyProxyHandler()); URL proxyURL = new URL(url); runner.setProperty(InvokeHTTP.PROP_URL, "http://nifi.apache.org/"); // just a dummy URL no connection goes out runner.setProperty(InvokeHTTP.PROP_PROXY_HOST, proxyURL.getHost()); try{ runner.run(); Assert.fail(); } catch (AssertionError e){ // Expect assertion error when proxy port isn't set but host is. } runner.setProperty(InvokeHTTP.PROP_PROXY_PORT, String.valueOf(proxyURL.getPort())); runner.setProperty(InvokeHTTP.PROP_PROXY_USER, "username"); try{ runner.run(); Assert.fail(); } catch (AssertionError e){ // Expect assertion error when proxy password isn't set but host is. } runner.setProperty(InvokeHTTP.PROP_PROXY_PASSWORD, "password"); createFlowFiles(runner); runner.run(); runner.assertTransferCount(InvokeHTTP.REL_SUCCESS_REQ, 1); runner.assertTransferCount(InvokeHTTP.REL_RESPONSE, 1); runner.assertTransferCount(InvokeHTTP.REL_RETRY, 0); runner.assertTransferCount(InvokeHTTP.REL_NO_RETRY, 0); runner.assertTransferCount(InvokeHTTP.REL_FAILURE, 0); runner.assertPenalizeCount(0); //expected in request status.code and status.message //original flow file (+attributes) final MockFlowFile bundle = runner.getFlowFilesForRelationship(InvokeHTTP.REL_SUCCESS_REQ).get(0); bundle.assertContentEquals("Hello".getBytes("UTF-8")); bundle.assertAttributeEquals(InvokeHTTP.STATUS_CODE, "200"); bundle.assertAttributeEquals(InvokeHTTP.STATUS_MESSAGE, "OK"); bundle.assertAttributeEquals("Foo", "Bar"); //expected in response //status code, status message, all headers from server response --> ff attributes //server response message body into payload of ff final MockFlowFile bundle1 = runner.getFlowFilesForRelationship(InvokeHTTP.REL_RESPONSE).get(0); bundle1.assertContentEquals("http://nifi.apache.org/".getBytes("UTF-8")); bundle1.assertAttributeEquals(InvokeHTTP.STATUS_CODE, "200"); bundle1.assertAttributeEquals(InvokeHTTP.STATUS_MESSAGE, "OK"); bundle1.assertAttributeEquals("Foo", "Bar"); bundle1.assertAttributeEquals("Content-Type", "text/plain;charset=iso-8859-1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Proxy getProxy();", "public void setHttpProxyHost(String host);", "public String getHttpProxyHost();", "String getHttpProxyHost();", "public interface ProxyConnector {\n\n /**\n * Comprueba que se cumplan los requisitos para la conexi&oacute;n con el servicio proxy.\n * @throws IOException Cuando ocurre alg&uacute;n error en la comprobaci&oacute;n.\n */\n void init() throws IOException;\n\n /**\n * Comprueba si el servicio configurado pertenece a un proxy compatible.\n * @return {@code true} si el proxy configurado es compatible, {@code false} en caso contrario.\n * @throws IOException Cuando se produce un error al conectarse al proxy.\n */\n boolean isCompatibleService() throws IOException;\n\n /**\n * Indica si el servicio de Portafirmas correspondiente a este conector requiere un proceso\n * de login previo.\n * @return {@code true} si el servicio requiere login, {@code false} en caso contrario.\n */\n boolean needLogin();\n\n /**\n * Solicita el acceso para el usuario.\n * @return Respuesta a la petici&oacute;n con el token de acceso.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n RequestResult loginRequest() throws Exception;\n\n /**\n * Envia el token de acceso firmado al servidor para validar el acceso del usuario.\n * @param pkcs1 Firma PKCS#1 del token de acceso.\n * @param cert Certificado usado para firmar.\n * @return @code true} si el acceso se completo correctamente, {@code false} en caso contrario.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n boolean tokenValidation(byte[] pkcs1, String cert) throws Exception;\n\n /**\n * Env&aacute;a una solicitud de cierre de sesi&oacute;n.\n * @throws Exception Cuando se produce un error en la comunicaci&oacute;n.\n */\n void logoutRequest() throws Exception;\n\n /**\n * Obtiene la peticiones de firma. Las peticiones devueltas deben cumplir\n * las siguientes condiciones:\n * <ul>\n * <li>Estar en el estado se&ntilde;alado (unresolved, signed o rejected).</li>\n * <li>Que todos los documentos que contiene se tengan que firmar con los\n * formatos de firma indicados (s&oacute;lo si se indica alguno)</li>\n * <li>Que las solicitudes cumplan con los filtros establecidos. Estos\n * filtros tendran la forma: key=value</li>\n * </ul>\n * @param signRequestState Estado de las peticiones que se desean obtener.\n * @param filters\n * Listado de filtros que deben cumplir las peticiones\n * recuperadas. Los filtros soportados son:\n * <ul>\n * <li><b>orderAscDesc:</b> con valor \"asc\" para que sea orden\n * ascendente en la consulta, en cualquier otro caso ser&aacute;\n * descendente</li>\n * <li><b>initDateFilter:</b> fecha de inicio de las peticiones</li>\n * <li><b>endDateFilter:</b> fecha de fin de las peticiones</li>\n * <li><b>orderAttribute:</b> par&aacute;metro para ordenar por\n * una columna de la petici&oacute;n</li>\n * <li><b>searchFilter:</b> busca la cadena introducida en\n * cualquier texto de la petici&oacute;n (asunto, referencia,\n * etc)</li>\n * <li><b>labelFilter:</b> texto con el nombre de una etiqueta.\n * Filtra las peticiones en base a esa etiqueta, ej: \"IMPORTANTE\"\n * </li>\n * <li><b>applicationFilter:</b> texto con el identificador de\n * una aplicaci&oacute;n. Filtra las peticiones en base a la\n * aplicaci&oacute;n, ej: \"SANCIONES\"</li>\n * </ul>\n * @param numPage N&uacute;mero de p&aacute;gina del listado.\n * @param pageSize N&uacute;mero de peticiones por p&aacute;gina.\n * @return Lista de peticiones de firma\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n PartialSignRequestsList getSignRequests(\n String signRequestState, String[] filters, int numPage, int pageSize)\n throws SAXException, IOException;\n\n /** Inicia la pre-firma remota de las peticiones.\n * @param request Petici&oacute;n de firma.\n * @return Prefirmas de las peticiones enviadas.\n * @throws IOException Si ocurre algun error durante el tratamiento de datos.\n * @throws CertificateEncodingException Si no se puede obtener la codificaci&oacute;n del certificado.\n * @throws SAXException Si ocurren errores analizando el XML de respuesta. */\n TriphaseRequest[] preSignRequests(SignRequest request) throws IOException,\n CertificateException,\n SAXException;\n\n /**\n * Inicia la post-firma remota de las peticiones.\n *\n * @param requests\n * Peticiones a post-firmar\n * @return Listado con el resultado de la operaci&oacute;n de firma de cada\n * petici&oacute;n.\n * @throws IOException\n * Si ocurre algun error durante el proceso\n * @throws CertificateEncodingException\n * Cuando el certificado est&aacute; mal codificado.\n * @throws SAXException\n * Si ocurren errores analizando el XML de respuesta\n */\n RequestResult postSignRequests(TriphaseRequest[] requests) throws IOException,\n CertificateEncodingException, SAXException;\n\n /**\n * Obtiene los datos de un documento.\n *\n * @param requestId\n * Identificador de la petici&oacute;n.\n * @return Datos del documento.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;\n\n /**\n * Obtiene el listado de aplicaciones para las que hay peticiones de firma.\n * @return Configuracion de aplicaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n AppConfiguration getApplicationList()\n throws SAXException, IOException;\n\n /**\n * Rechaza las peticiones de firma indicadas.\n *\n * @param requestIds\n * Identificadores de las peticiones de firma que se quieren\n * rechazar.\n * @return Resultado de la operacion para cada una de las peticiones de\n * firma.\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n RequestResult[] rejectRequests(String[] requestIds,\n String reason) throws SAXException, IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un documento.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewDocument(String documentId,\n String filename,\n String mimetype) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de una firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un informe de firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;\n\n /**\n * Aprueba peticiones de firma (les da el visto bueno).\n *\n * @param requestIds\n * Identificador de las peticiones.\n * @return Resultado de la operaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestResult[] approveRequests(String[] requestIds) throws SAXException, IOException;\n\n /**\n * Indica si el conector soporta las funciones de notificaci&oacute;n.\n * @return {@code true} si se soportan las notificaciones, {@code false} en caso contrario.\n */\n boolean isNotificationsSupported();\n\n /**\n * Da de alta en el sistema de notificaciones.\n * @param token\n * \t\t\tToken de registro en GCM.\n * @param device\n * \t\t\tIdentificador de dispositivo.\n * @param certB64\n * \t\t\tCertificado en base 64 del usuario.\n * @return Resultado del proceso de alta en el sistema de notificaciones.\n * \t\t\tIndica\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n NotificationState signOnNotificationService(\n String token, String device, String certB64)\n throws SAXException, IOException;\n\n\n}", "private List<String> openUrlViaProxy(Proxy proxy, String apiurl)\n throws Exception {\n\n List<String> response = new ArrayList<>();\n URL url = new URL(apiurl);\n HttpURLConnection uc = (HttpURLConnection) url.openConnection(proxy);\n uc.connect();\n\n BufferedReader in = new BufferedReader(new InputStreamReader(\n uc.getInputStream()));\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.add(inputLine);\n }\n in.close();\n return response;\n }", "@Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }", "public void initProxy() {\n\n System.setProperty(\"http.proxyHost\", \"199.101.97.159\"); // set proxy server\n System.setProperty(\"http.proxyPort\", \"60099\"); // set proxy port\n //System.setProperty(\"http.proxyUser\", authUser);\n //System.setProperty(\"http.proxyPassword\", authPassword);\n Authenticator.setDefault(\n new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\n authUser, authPassword.toCharArray());\n }\n }\n );\n }", "private void setHttpclientProxy(DefaultHttpClient httpClient) {\r\n Proxy proxy = ProxyProvider.getProxy();\r\n String proxyUser = ProxyProvider.getProxyUserName();\r\n String proxyPwd = ProxyProvider.getProxyUserPassword();\r\n // set by other components like tSetProxy\r\n if (proxy != null) {\r\n\r\n final HttpHost httpHost = new HttpHost(((InetSocketAddress) proxy.address()).getHostName(),\r\n ((InetSocketAddress) proxy.address()).getPort());\r\n // Sets usage of HTTP proxy\r\n httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, httpHost);\r\n\r\n // Sets proxy authentication, if credentials were provided\r\n // TODO Because the proxy of get accesToken can't support authentication. remove this ?\r\n if (proxyUser != null && proxyPwd != null) {\r\n httpClient.getCredentialsProvider().setCredentials(new AuthScope(httpHost),\r\n new UsernamePasswordCredentials(proxyUser, proxyPwd));\r\n }\r\n\r\n }\r\n\r\n }", "public void setHttpProxyPort(int port);", "HttpProxy(final Integer port,\n final Integer securePort,\n final Integer socksPort,\n final Integer directLocalPort,\n final Integer directLocalSecurePort,\n final String directRemoteHost,\n final Integer directRemotePort) {\n\n this.port = port;\n this.securePort = securePort;\n this.socksPort = socksPort;\n this.directLocalPort = directLocalPort;\n this.directLocalSecurePort = directLocalSecurePort;\n this.directRemoteHost = directRemoteHost;\n this.directRemotePort = directRemotePort;\n\n hasStarted = SettableFuture.create();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n ChannelFuture httpChannel = createHTTPChannel(port, securePort);\n ChannelFuture httpsChannel = createHTTPSChannel(securePort);\n ChannelFuture socksChannel = createSOCKSChannel(socksPort, port);\n ChannelFuture directChannel = createDirectChannel(directLocalPort, directRemoteHost, directRemotePort);\n ChannelFuture directSecureChannel = createDirectSecureChannel(directLocalSecurePort, directRemoteHost, directRemotePort);\n\n if (httpChannel != null) {\n // create system wide proxy settings for HTTP CONNECT\n proxyStarted(port, false);\n }\n if (socksChannel != null) {\n // create system wide proxy settings for SOCKS\n proxyStarted(socksPort, true);\n }\n hasStarted.set(\"STARTED\");\n\n waitForClose(httpChannel);\n waitForClose(httpsChannel);\n waitForClose(socksChannel);\n waitForClose(directChannel);\n waitForClose(directSecureChannel);\n } catch (Exception ie) {\n logger.error(\"Exception while running proxy channels\", ie);\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n }\n }).start();\n\n try {\n // wait for proxy to start all channels\n hasStarted.get();\n } catch (Exception e) {\n logger.debug(\"Exception while waiting for proxy to complete starting up\", e);\n }\n }", "@Override\r\n\tpublic void exec() {\n\t\tHttpRequestHead hrh = null;\r\n\t\tint headSize = 0;\r\n\t\tboolean isSentHead = false;\r\n\t\ttry {\r\n\t\t\tArrays.fill(buffer, (byte) 0);\r\n\t\t\tint getLen = 0;\r\n\t\t\tboolean getHead = false;\r\n\t\t\tint mode = 0;\r\n\t\t\tlong contentLength = 0;\r\n\t\t\twhile (!proxy.isClosed.get()) {\r\n\t\t\t\tint nextread = inputStream.read(buffer, getLen, buffer.length - getLen);\r\n\t\t\t\tif (nextread == -1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tgetLen += nextread;\r\n\t\t\t\tif (!getHead) {\r\n\t\t\t\t\tif ((headSize = Proxy.protocol.validate(buffer, getLen)) > 0) {\r\n\t\t\t\t\t\thrh = (HttpRequestHead) Proxy.protocol.decode(buffer);\r\n\t\t\t\t\t\tlog.debug(proxy.uuid + debug + \"传入如下请求头:\" + new String(Proxy.protocol.encode(hrh)));\r\n\t\t\t\t\t\t\r\n//\t\t\t\t\t\tif(\"keep-alive\".equals(hrh.getHead(\"Connection\")))\r\n//\t\t\t\t\t\t\tkeepAlive = true;\r\n\t\t\t\t\t\tif (\"chunked\".equals(hrh.getHead(\"Transfer-Encoding\")))\r\n\t\t\t\t\t\t\tmode = 2;\r\n\t\t\t\t\t\tif (!StringUtils.isBlank(hrh.getHead(\"Content-Length\"))) {\r\n\t\t\t\t\t\t\tmode = 1;\r\n\t\t\t\t\t\t\tcontentLength = Long.valueOf(hrh.getHead(\"Content-Length\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString forward = hrh.getHead(\"X-Forwarded-For\");\r\n\t\t\t\t\t\tif (!StringUtils.isBlank(forward))\r\n\t\t\t\t\t\t\tforward += \",\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tforward = \"\";\r\n\t\t\t\t\t\tforward += proxy.source.getInetAddress().getHostAddress();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-For\", forward);\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-Proto\", \"http\");\r\n\t\t\t\t\t\thrh.addHead(\"X-Forwarded-Host\", CoreDef.config.getString(\"serverIp\"));\r\n\r\n\t\t\t\t\t\tgetHead = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// http访问代理服务器模式\r\n//\t\t\t\t\t\tInetAddress addr = InetAddress.getByName(hrh.getHead(\"host\"));\r\n//\t\t\t\t\t\tproxy.destination = new Socket(addr, 80);\r\n//\t\t\t\t\t\toutputStream = proxy.destination.getOutputStream();\r\n//\t\t\t\t\t\tproxy.sender = new ServerChannel(proxy);\r\n//\t\t\t\t\t\tproxy.sender.begin(\"peer - \" + this.getTaskId());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theadSize = 0;\r\n\t\t\t\t\t\tif (getLen > buffer.length - 128)\r\n\t\t\t\t\t\t\tbuffer = Arrays.copyOf(buffer, buffer.length * 10);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!isSentHead) {\r\n\t\t\t\t\tisSentHead = true;\r\n\t\t\t\t\tlog.debug(proxy.uuid + \"为\" + debug + \"转发了如下请求头:\" + new String(Proxy.protocol.encode(hrh)));\r\n\t\t\t\t\toutputStream.write(Proxy.protocol.encode(hrh));\r\n//\t\t\t\t\tswitch (mode) {\r\n//\t\t\t\t\tcase 1:\r\n//\t\t\t\t\t\toutputStream.write(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\tcontentLength -= getLen - headSize;\r\n//\t\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 2:\r\n//\t\t\t\t\t\tcontentLength += getChunkedContentSize(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\toutputStream.write(buffer, headSize, getLen - headSize);\r\n//\t\t\t\t\t\tcontentLength -= getLen - headSize;\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\tswitch (mode) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\toutputStream.write(buffer, headSize, getLen-headSize);\r\n\t\t\t\t\tcontentLength -= getLen - headSize;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tcontentLength += getChunkedContentSize(buffer, headSize, getLen-headSize);\r\n\t\t\t\t\toutputStream.write(buffer, 0, getLen);\r\n\t\t\t\t\tcontentLength -= getLen - headSize;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\theadSize = 0;\r\n\t\t\t\tif(contentLength == 0) {\r\n\t\t\t\t\tgetHead = false;\r\n\t\t\t\t\tisSentHead = false;\r\n\t\t\t\t}\r\n\t\t\t\tgetLen = 0;\r\n\t\t\t\tArrays.fill(buffer, (byte) 0);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.info(proxy.uuid + \"与客户端通信发生异常\" + Utils.getStringFromException(e));\r\n\t\t\tlog.info(proxy.uuid + \"最后的数据如下\" + new String(buffer).trim());\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tlog.info(proxy.uuid + \"与客户端通信,试图关闭端口\");\r\n\t\t\tproxy.close();\r\n\t\t}\r\n\t}", "public HttpClientWrapper(String url, String user, String pwd, String proxyDns, int proxyPort) {\n this.url = url;\n if ( user == null && pwd == null ) {\n this.creds = null;\n } else if ( user != null && pwd != null ) {\n this.creds = new UsernamePasswordCredentials(user, pwd);\n } else {\n throw new DBCException(\"user / pwd either both null or both not null: \" + user + \" - \" + pwd);\n }\n if ( (proxyDns == null && proxyPort == 0) || (proxyDns != null && proxyPort > 0) ) {\n // ok\n } else {\n throw new DBCException(\"proxyDns / proxyPort either both null/0 or both not null/>0: \" + proxyDns + \" - \" + proxyPort);\n }\n\n this.requestConfig = RequestConfig.custom().setConnectionRequestTimeout(5000).build();\n\n SSLContext sslContext = buildSSLContext();\n SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n LOG.info(\"accepting SSLConnection for host: {}, port: {}\", session.getPeerHost(), session.getPeerPort());\n return true;\n }\n });\n\n ConnectionConfig connectionConfig = ConnectionConfig.custom().setCharset(Charset.forName(UTF_8)).build();\n PlainConnectionSocketFactory plainSF = PlainConnectionSocketFactory.getSocketFactory();\n\n RegistryBuilder<ConnectionSocketFactory> regBuilder = RegistryBuilder.<ConnectionSocketFactory> create();\n Registry<ConnectionSocketFactory> registry = regBuilder.register(\"http\", plainSF).register(\"https\", sslsf).build();\n\n PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);\n connectionManager.setMaxTotal(200);\n connectionManager.setDefaultMaxPerRoute(100);\n connectionManager.setValidateAfterInactivity(10000); // good value for the check interval?\n connectionManager.setDefaultConnectionConfig(connectionConfig);\n\n HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();\n httpClientBuilder.setConnectionManager(connectionManager);\n\n if ( proxyDns != null ) {\n // add one step proxy support\n HttpHost proxy = new HttpHost(proxyDns, proxyPort);\n DefaultProxyRoutePlanner routePlanner = new DefaultProxyRoutePlanner(proxy);\n httpClientBuilder.setRoutePlanner(routePlanner);\n }\n\n this.client = httpClientBuilder.build();\n this.idleConnectionMonitorThread = new IdleConnectionMonitorThread(connectionManager);\n new Thread(null, this.idleConnectionMonitorThread, \"IdleConn\").start();\n }", "public Proxy(){\n\t\tthis.useProxy = false;\n\t\tthis.host = null;\n\t\tthis.port = -1;\n\t}", "private void internalHttpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n _proxy = InternalSocket.getSocket(_proxyHost, _proxyPort);\n httpProxyConnect(_proxy, host, port);\n }", "private void httpProxyConnect(Socket proxy, String host, int port) throws IOException {\n _proxyIn = _proxy.getInputStream();\n _proxyOut = _proxy.getOutputStream();\n StringBuilder buf = new StringBuilder(64);\n buf.append(\"CONNECT \").append(host).append(':').append(port).append(\" HTTP/1.1\\r\\n\");\n // TODO if we need extra headers to the proxy, add a new method and list.\n // Standard extra headers go the server, not the proxy\n //if (_extraPHeaders != null) {\n // for (String hdr : _extraPHeaders) {\n // buf.append(hdr).append(\"\\r\\n\");\n //}\n if (_authState != null && _authState.authMode != AUTH_MODE.NONE) {\n // TODO untested, is this right?\n buf.append(\"Proxy-Authorization: \");\n buf.append(_authState.getAuthHeader(\"CONNECT\", host));\n buf.append(\"\\r\\n\");\n }\n buf.append(\"\\r\\n\");\n _proxyOut.write(DataHelper.getUTF8(buf.toString()));\n _proxyOut.flush();\n\n // read the proxy response\n _aborted = false;\n readHeaders();\n if (_aborted)\n throw new IOException(\"Timed out reading the proxy headers\");\n if (_responseCode == 407) {\n // TODO\n throw new IOException(\"Authorization unsupported on HTTP Proxy\");\n } else if (_responseCode != 200) {\n // readHeaders() will throw on most errors, but here we ensure it is 200\n throw new IOException(\"Invalid proxy response: \" + _responseCode + ' ' + _responseText);\n }\n if (_redirectLocation != null)\n throw new IOException(\"Proxy redirect not allowed\");\n }", "private void httpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n // _proxyPort validated in superconstrutor, no need to set default here\n if (_fetchHeaderTimeout > 0) {\n _proxy = new Socket();\n _proxy.setSoTimeout(_fetchHeaderTimeout);\n _proxy.connect(new InetSocketAddress(_proxyHost, _proxyPort), _fetchHeaderTimeout);\n } else {\n _proxy = new Socket(_proxyHost, _proxyPort);\n }\n httpProxyConnect(_proxy, host, port);\n }", "private void setInternalProxy(SimpleClientHttpRequestFactory requestFactory) {\n\t\tif (PAYASIA_MIND_PROXY_ENABLED_FOR_DEV) {\n\t\t\tProxy proxy = new Proxy(Type.HTTP, new InetSocketAddress(\n\t\t\t\t\tPAYASIA_MIND_PROXY_HOSTNAME, PAYASIA_MIND_PROXY_PORT));\n\t\t\trequestFactory.setProxy(proxy);\n\t\t}\n\t}", "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "public int getHttpProxyPort();", "protected final ActionProxy getProxy(String action,String [] params){\n \tsetUpRequestTestParams(params);\n\t\tActionProxy actionProxy = getActionProxy(action);\n\t\tassertNotNull(\"Action proxy shouldn't be null\", actionProxy);\n\t\tactionProxy.setExecuteResult(false);\n\t\treturn actionProxy;\t \t\n }", "public ResponseFromHTTP makeRequest() throws CustomRuntimeException\n\t{\n\t\tResponseFromHTTP result=null;\n\t\tCloseableHttpClient httpclient=null;\n\t\tCloseableHttpResponse response=null;\n\t\tboolean needAuth=false;\n\t\tboolean viaProxy=httpTransportInfo.isUseProxy() && StringUtils.isNotBlank(httpTransportInfo.getProxyHost());\n\n\t\tHttpHost target = new HttpHost(httpTransportInfo.getHost(), httpTransportInfo.getPort(),httpTransportInfo.getProtocol());\n\t\t//basic auth for request\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tif(StringUtils.isNotBlank(httpTransportInfo.getLogin()) && \n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getPassword()))\n\t\t{\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(target.getHostName(), target.getPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getLogin(), httpTransportInfo.getPassword()));\n\t\t\tneedAuth=true;\n\t\t}\n\n\t\t//proxy auth?\n\t\tif(viaProxy && StringUtils.isNotBlank(httpTransportInfo.getProxyLogin()) &&\n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getProxyPassword()))\n\t\t{\n\t\t\t//proxy auth setting\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(httpTransportInfo.getProxyHost(), httpTransportInfo.getProxyPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getProxyLogin(), httpTransportInfo.getProxyPassword()));\n\t\t}\n\n\t\ttry\n\t\t{\n\n\t\t\tHttpClientBuilder httpclientBuilder = HttpClients.custom()\n\t\t\t\t\t.setDefaultCredentialsProvider(credsProvider);\n\t\t\t//https\n\t\t\tif(\"https\".equalsIgnoreCase(httpTransportInfo.getProtocol()))\n\t\t\t{\n\t\t\t\t//A.K. - Set stub for check certificate - deprecated from 4.4.1\n\t\t\t\tSSLContextBuilder sslContextBuilder=SSLContexts.custom();\n\t\t\t\tTrustStrategyLZ trustStrategyLZ=new TrustStrategyLZ();\n\t\t\t\tsslContextBuilder.loadTrustMaterial(null,trustStrategyLZ);\n\t\t\t\tSSLContext sslContext = sslContextBuilder.build();\n\t\t\t\tSSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n\t\t\t\thttpclientBuilder.setSSLSocketFactory(sslsf);\n\t\t\t}\n\n\t\t\thttpclient=httpclientBuilder.build();\n\n\t\t\t//timeouts\n\t\t\tBuilder builder = RequestConfig.custom()\n\t\t\t\t\t.setSocketTimeout(httpTransportInfo.getSocketTimeoutSec()*1000)\n\t\t\t\t\t.setConnectTimeout(httpTransportInfo.getConnectTimeoutSec()*1000);\n\n\t\t\t//via proxy?\n\t\t\tif(viaProxy)\n\t\t\t{\n\t\t\t\t//proxy setting\n\t\t\t\tHttpHost proxy = new HttpHost(httpTransportInfo.getProxyHost(),httpTransportInfo.getProxyPort(),httpTransportInfo.getProxyProtocol());\n\t\t\t\tbuilder.setProxy(proxy);\n\t\t\t}\n\n\t\t\tRequestConfig requestConfig=builder.build();\n\n\t\t\t// Create AuthCache instance\n\t\t\tAuthCache authCache = new BasicAuthCache();\n\t\t\t// Generate BASIC scheme object and add it to the local\n\t\t\t// auth cache\n\t\t\tBasicScheme basicAuth = new BasicScheme();\n\t\t\tauthCache.put(target, basicAuth);\n\n\t\t\t// Add AuthCache to the execution context\n\t\t\tHttpClientContext localContext = HttpClientContext.create();\n\t\t\tlocalContext.setAuthCache(authCache);\n\n\t\t\tPathParser parsedPath=new PathParser(getUri());\n\t\t\tif(restMethodDef.isUseOriginalURI())\n\t\t\t{\n\t\t\t\t//in this case params from URI will not add to all params\n\t\t\t\tparsedPath.getParams().clear();\n\t\t\t}\n\t\t\tparsedPath.getParams().addAll(getRequestDefinition().getParams());\n\t\t\t//prepare URI\n\t\t\tURIBuilder uriBuilder = new URIBuilder().setPath(parsedPath.getUri());\n\t\t\tif(!getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\t//form's parameters - GET/DELETE/OPTIONS/PUT\n\t\t\t\tfor(NameValuePair nameValuePair : parsedPath.getParams())\n\t\t\t\t{\n\t\t\t\t\turiBuilder.setParameter(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tURI resultUri =(restMethodDef.isUseOriginalURI())?new URI(getUri()):uriBuilder.build();\n\n\t\t\t//\t\t\tHttpRequestBase httpPostOrGet=(getRequestDefinition().isHttpMethodPost())?\n\t\t\t//\t\t\t\t\tnew HttpPost(resultUri):\n\t\t\t//\t\t\t\t\tnew HttpGet(resultUri);\n\n\t\t\tHttpRequestBase httpPostOrGetEtc=null;\n\t\t\t//\n\t\t\tswitch(getRequestDefinition().getHttpMethod())\n\t\t\t{\n\t\t\t\tcase POST: httpPostOrGetEtc=new HttpPost(resultUri);break;\n\t\t\t\tcase DELETE: httpPostOrGetEtc=new HttpDelete(resultUri);break;\n\t\t\t\tcase OPTIONS: httpPostOrGetEtc=new HttpOptions(resultUri);break;\n\t\t\t\tcase PUT: httpPostOrGetEtc=new HttpPut(resultUri);break;\n\n\t\t\t\tdefault: httpPostOrGetEtc=new HttpGet(resultUri);break;\n\t\t\t}\n\n\t\t\t//Specifie protocol version\n\t\t\tif(httpTransportInfo.isVersionHttp10())\n\t\t\t\thttpPostOrGetEtc.setProtocolVersion(HttpVersion.HTTP_1_0);\n\n\t\t\t//user agent\n\t\t\thttpPostOrGetEtc.setHeader(HttpHeaders.USER_AGENT,httpTransportInfo.getUserAgent());\n\t\t\t//заголовки из запроса\n\t\t\tif(getRequestDefinition().getHeaders().size()>0)\n\t\t\t{\n\t\t\t\tfor(NameValuePair nameValuePair : getRequestDefinition().getHeaders())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getName()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Additional HTTP headers from httpTransportInfo\n\t\t\tif(httpTransportInfo.getAddHeaders()!=null)\n\t\t\t{\n\t\t\t\tfor(Map.Entry<String, String> entry:httpTransportInfo.getAddHeaders().entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(entry.getKey()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(entry.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(entry.getKey(),entry.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\thttpPostOrGetEtc.setConfig(requestConfig);\n\t\t\t//Form's parameters, request POST\n\t\t\tif(getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t\telse if(parsedPath.getParams().size()>0)\n\t\t\t\t{\n\t\t\t\t\tUrlEncodedFormEntity entityForm = new UrlEncodedFormEntity(parsedPath.getParams(), httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(entityForm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Body for PUT\n\t\t\tif(getRequestDefinition().getHttpMethod()==HttpMethod.PUT)\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPut) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresponse = httpclient.execute(target, httpPostOrGetEtc, (needAuth)?localContext:null);\n\t\t\t//response.\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tif(entity!=null)\n\t\t\t{\n\t\t\t\t//charset\n\t\t\t\tContentType contentType = ContentType.get(entity);\n\t\t\t\tString currentCharSet=httpTransportInfo.getCharset();\n\t\t\t\tif(contentType!=null)\n\t\t\t\t{\n\t\t\t\t\t//String mimeType = contentType.getMimeType();\n\t\t\t\t\tif(contentType.getCharset()!=null)\n\t\t\t\t\t\tcurrentCharSet=contentType.getCharset().name();\n\t\t\t\t}\n\t\t\t\tInputStream inputStream=entity.getContent();\n\t\t\t\tif(getRequestDefinition().isBinaryResponseBody())\n\t\t\t\t{\n\t\t\t\t\t//binary content\n\t\t\t\t\tbyte[] bodyBin = IOUtils.toByteArray(inputStream);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),bodyBin,response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//copy content to string\n\t\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\t\tIOUtils.copy(inputStream, writer, currentCharSet);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),writer.toString(),response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\tinputStream.close();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new CustomRuntimeException(\"fetchData over http uri: \"+getUri(),e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(response!=null)\n\t\t\t\t\tresponse.close();\n\t\t\t\tif(httpclient!=null)\n\t\t\t\t\thttpclient.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t} \t\n\t\t}\t\t\n\t\treturn result;\n\n\t}", "int getHttpProxyPort();", "protected Proxy(InvocationHandler h) { }", "protected void abcdefg(String host, byte[] buf) throws Exception {\n String clientId = hostmap.get(host);\n if (clientId == null) {\n NgrokAgent.httpResp(_out, 404, \"Tunnel \" + host + \" not found\");\n return;\n }\n NgrokServerClient client = clients.get(clientId);\n if (client == null) {\n NgrokAgent.httpResp(_out, 404, \"Tunnel \" + host + \" is Closed\");\n return;\n }\n ProxySocket proxySocket;\n try {\n proxySocket = client.getProxy(host);\n }\n catch (Exception e) {\n log.debug(\"Get ProxySocket FAIL host=\" + host, e);\n NgrokAgent.httpResp(_out,\n 500,\n \"Tunnel \" + host + \" did't has any proxy conntion yet!!\");\n return;\n }\n //sw.tag(\"After Get ProxySocket\");\n PipedStreamThread srv2loc = null;\n PipedStreamThread loc2srv = null;\n //NgrokAgent.writeMsg(proxySocket.socket.getOutputStream(), NgrokMsg.startProxy(\"http://\" + host, \"\"));\n //sw.tag(\"After Send Start Proxy\");\n proxySocket.socket.getOutputStream().write(buf);\n // 服务器-->本地\n srv2loc = new PipedStreamThread(\"http2proxy\",\n _ins,\n NgrokAgent.gzip_out(client.gzip_proxy,\n proxySocket.socket.getOutputStream()),\n bufSize);\n // 本地-->服务器\n loc2srv = new PipedStreamThread(\"proxy2http\",\n NgrokAgent.gzip_in(client.gzip_proxy,\n proxySocket.socket.getInputStream()),\n _out,\n bufSize);\n //sw.tag(\"After PipedStream Make\");\n //sw.stop();\n //log.debug(\"ProxyConn Timeline = \" + sw.toString());\n // 等待其中任意一个管道的关闭\n String exitFirst = executorService.invokeAny(Arrays.asList(srv2loc, loc2srv));\n if (log.isDebugEnabled())\n log.debug(\"proxy conn exit first at \" + exitFirst);\n }", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Proxy> readProxy(\n @Path(\"name\") String name);", "void shouldUseSocksProxy() {\n }", "protected boolean legacyResetProxySettingsCall(boolean setProxy) {\n System.getProperties().put(\"http.proxySet\", new Boolean(setProxy).toString());\n try {\n Class c = Class.forName(\"sun.net.www.http.HttpClient\");\n Method reset = c.getMethod(\"resetProperties\", null);\n reset.invoke(null, null);\n return true;\n }\n catch (ClassNotFoundException cnfe) {\n return false;\n }\n catch (NoSuchMethodException e) {\n return false;\n }\n catch (IllegalAccessException e) {\n return false;\n }\n catch (InvocationTargetException e) {\n return false;\n }\n }", "public void applyWebProxySettings() {\n boolean settingsChanged = false;\n boolean enablingProxy = false;\n Properties sysprops = System.getProperties();\n if (proxyHost != null) {\n settingsChanged = true;\n if (proxyHost.length() != 0) {\n traceSettingInfo();\n enablingProxy = true;\n sysprops.put(\"http.proxyHost\", proxyHost);\n String portString = Integer.toString(proxyPort);\n sysprops.put(\"http.proxyPort\", portString);\n sysprops.put(\"https.proxyHost\", proxyHost);\n sysprops.put(\"https.proxyPort\", portString);\n sysprops.put(\"ftp.proxyHost\", proxyHost);\n sysprops.put(\"ftp.proxyPort\", portString);\n if (nonProxyHosts != null) {\n sysprops.put(\"http.nonProxyHosts\", nonProxyHosts);\n sysprops.put(\"https.nonProxyHosts\", nonProxyHosts);\n sysprops.put(\"ftp.nonProxyHosts\", nonProxyHosts);\n }\n if(proxyUser!=null) {\n sysprops.put(\"http.proxyUser\", proxyUser);\n sysprops.put(\"http.proxyPassword\", proxyPassword);\n }\n } else {\n log(\"resetting http proxy\", Project.MSG_VERBOSE);\n sysprops.remove(\"http.proxyHost\");\n sysprops.remove(\"http.proxyPort\");\n sysprops.remove(\"http.proxyUser\");\n sysprops.remove(\"http.proxyPassword\");\n sysprops.remove(\"https.proxyHost\");\n sysprops.remove(\"https.proxyPort\");\n sysprops.remove(\"ftp.proxyHost\");\n sysprops.remove(\"ftp.proxyPort\");\n }\n }\n\n //socks\n if (socksProxyHost != null) {\n settingsChanged = true;\n if (socksProxyHost.length() != 0) {\n enablingProxy = true;\n sysprops.put(\"socksProxyHost\", socksProxyHost);\n sysprops.put(\"socksProxyPort\", Integer.toString(socksProxyPort));\n if (proxyUser != null) {\n //this may be a java1.4 thingy only\n sysprops.put(\"java.net.socks.username\", proxyUser);\n sysprops.put(\"java.net.socks.password\", proxyPassword);\n }\n\n } else {\n log(\"resetting socks proxy\", Project.MSG_VERBOSE);\n sysprops.remove(\"socksProxyHost\");\n sysprops.remove(\"socksProxyPort\");\n sysprops.remove(\"java.net.socks.username\");\n sysprops.remove(\"java.net.socks.password\");\n }\n }\n\n\n //for Java1.1 we need to tell the system that the settings are new\n if (settingsChanged &&\n JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {\n legacyResetProxySettingsCall(enablingProxy);\n }\n }", "public static final DefaultHttpClient createHttpClient(String proxyUri,\n\t\t\tint port) {\n\t\t// Shamelessly cribbed from AndroidHttpClient\n\t\tHttpParams params = new BasicHttpParams();\n\t\tHttpHost host = new HttpHost(proxyUri, port);\n\t\tparams.setParameter(ConnRouteParams.DEFAULT_PROXY, host);\n\n\t\tHttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);\n\t\tHttpProtocolParams.setContentCharset(params, HTTP.UTF_8);\n\t\t// HttpProtocolParams.setUseExpectContinue(params, true);\n\t\t// Turn off stale checking. Our connections break all the time anyway,\n\t\t// and it's not worth it to pay the penalty of checking every time.\n\t\tHttpConnectionParams.setStaleCheckingEnabled(params, false);\n\n\t\t// Default connection and socket timeout of 30 seconds. Tweak to taste.\n\t\tHttpConnectionParams.setConnectionTimeout(params, 10 * 1000);\n\t\tHttpConnectionParams.setSoTimeout(params, 20 * 1000);\n\t\tHttpConnectionParams.setSocketBufferSize(params, 8192);\n\n\t\tHttpClientParams.setRedirecting(params, true);\n\n\t\tConnManagerParams.setTimeout(params, 5 * 1000);\n\t\tConnManagerParams.setMaxConnectionsPerRoute(params,\n\t\t\t\tnew ConnPerRouteBean(50));\n\t\tConnManagerParams.setMaxTotalConnections(params, 200);\n\n\t\t// Sets up the http part of the service.\n\t\tfinal SchemeRegistry supportedSchemes = new SchemeRegistry();\n\n\t\t// Register the \"http\" protocol scheme, it is required\n\t\t// by the default operator to look up socket factories.\n\t\tfinal SocketFactory sf = PlainSocketFactory.getSocketFactory();\n\t\tsupportedSchemes.register(new Scheme(\"http\", sf, 80));\n\t\tsupportedSchemes.register(new Scheme(\"https\", SSLSocketFactory\n\t\t\t\t.getSocketFactory(), 443));\n\t\tfinal ThreadSafeClientConnManager ccm = new ThreadSafeClientConnManager(\n\t\t\t\tparams, supportedSchemes);\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient(ccm, params);\n\t\thttpClient\n\t\t\t\t.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(\n\t\t\t\t\t\t3, true));\n\t\t// Add gzip header to requests using an interceptor\n\t\thttpClient.addRequestInterceptor(new GzipHttpRequestInterceptor());\n\t\t// Add gzip compression to responses using an interceptor\n\t\thttpClient.addResponseInterceptor(new GzipHttpResponseInterceptor());\n\n\t\treturn httpClient;\n\t}", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }", "@Override\n\tpublic Credential authenticateProxy(Proxy proxy, URL url,\n\t\t\tList<Challenge> challenges) throws IOException {\n\t\treturn null;\n\t}", "public static interface Proxy {\r\n\t\t/** \r\n\t\t * Returns self of current context.\r\n\t\t * @return self of current context.\r\n\t\t */\r\n\t\tpublic Component getSelf(ExecutionCtrl exec);\r\n\t\t/** Sets an execution attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Execution exec, String name, Object value);\r\n\t\t/** Removes an execution attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Execution exec, String name);\r\n\t\t\r\n\t\t/** Sets an session attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Session ses, String name, Object value);\r\n\t\t\r\n\t\t/** Removes an session attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Session session, String name);\r\n\t\t\r\n\t\t/** Called when ZK Update Engine has sent a response to the client.\r\n\t\t *\r\n\t\t * <p>Note: the implementation has to maintain one last-sent\r\n\t\t * response information for each channel, since a different channel\r\n\t\t * has different set of request IDs and might resend in a different\r\n\t\t * condition.\r\n\t\t *\r\n\t\t * @param channel the request channel.\r\n\t\t * For example, \"au\" for AU requests and \"cm\" for Comet requests.\r\n\t\t * @param reqId the request ID that the response is generated for.\r\n\t\t * Ingore if null.\r\n\t\t * @param resInfo the response infomation. Ignored if reqId is null.\r\n\t\t * The real value depends on the caller.\r\n\t\t */ \r\n\t\tpublic void responseSent(DesktopCtrl desktopCtrl, String channel, String reqId, Object resInfo);\r\n\t}", "public org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.conn.routing.HttpRoute r19, org.apache.http.client.methods.HttpRequestWrapper r20, org.apache.http.client.protocol.HttpClientContext r21, org.apache.http.client.methods.HttpExecutionAware r22) throws java.io.IOException, org.apache.http.HttpException {\n /*\n r18 = this;\n java.lang.String r2 = \"HTTP route\"\n r0 = r19\n org.apache.http.util.Args.notNull(r0, r2)\n java.lang.String r2 = \"HTTP request\"\n r0 = r20\n org.apache.http.util.Args.notNull(r0, r2)\n java.lang.String r2 = \"HTTP context\"\n r0 = r21\n org.apache.http.util.Args.notNull(r0, r2)\n org.apache.http.auth.AuthState r2 = r21.getTargetAuthState()\n if (r2 != 0) goto L_0x0369\n org.apache.http.auth.AuthState r2 = new org.apache.http.auth.AuthState\n r2.<init>()\n java.lang.String r3 = \"http.auth.target-scope\"\n r0 = r21\n r0.setAttribute(r3, r2)\n r11 = r2\n L_0x0028:\n org.apache.http.auth.AuthState r3 = r21.getProxyAuthState()\n if (r3 != 0) goto L_0x003a\n org.apache.http.auth.AuthState r3 = new org.apache.http.auth.AuthState\n r3.<init>()\n java.lang.String r2 = \"http.auth.proxy-scope\"\n r0 = r21\n r0.setAttribute(r2, r3)\n L_0x003a:\n r0 = r20\n boolean r2 = r0 instanceof org.apache.http.HttpEntityEnclosingRequest\n if (r2 == 0) goto L_0x0047\n r2 = r20\n org.apache.http.HttpEntityEnclosingRequest r2 = (org.apache.http.HttpEntityEnclosingRequest) r2\n org.apache.http.impl.execchain.Proxies.enhanceEntity(r2)\n L_0x0047:\n java.lang.Object r13 = r21.getUserToken()\n r0 = r18\n org.apache.http.conn.HttpClientConnectionManager r2 = r0.connManager\n r0 = r19\n org.apache.http.conn.ConnectionRequest r2 = r2.requestConnection(r0, r13)\n if (r22 == 0) goto L_0x006d\n boolean r4 = r22.isAborted()\n if (r4 == 0) goto L_0x0068\n r2.cancel()\n org.apache.http.impl.execchain.RequestAbortedException r2 = new org.apache.http.impl.execchain.RequestAbortedException\n java.lang.String r3 = \"Request aborted\"\n r2.<init>(r3)\n throw r2\n L_0x0068:\n r0 = r22\n r0.setCancellable(r2)\n L_0x006d:\n org.apache.http.client.config.RequestConfig r14 = r21.getRequestConfig()\n int r4 = r14.getConnectionRequestTimeout() // Catch:{ InterruptedException -> 0x00e2, ExecutionException -> 0x00f2 }\n if (r4 <= 0) goto L_0x00df\n long r4 = (long) r4 // Catch:{ InterruptedException -> 0x00e2, ExecutionException -> 0x00f2 }\n L_0x0078:\n java.util.concurrent.TimeUnit r6 = java.util.concurrent.TimeUnit.MILLISECONDS // Catch:{ InterruptedException -> 0x00e2, ExecutionException -> 0x00f2 }\n org.apache.http.HttpClientConnection r4 = r2.get(r4, r6) // Catch:{ InterruptedException -> 0x00e2, ExecutionException -> 0x00f2 }\n java.lang.String r2 = \"http.connection\"\n r0 = r21\n r0.setAttribute(r2, r4)\n boolean r2 = r14.isStaleConnectionCheckEnabled()\n if (r2 == 0) goto L_0x00ac\n boolean r2 = r4.isOpen()\n if (r2 == 0) goto L_0x00ac\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log\n java.lang.String r5 = \"Stale connection check\"\n r2.debug(r5)\n boolean r2 = r4.isStale()\n if (r2 == 0) goto L_0x00ac\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log\n java.lang.String r5 = \"Stale connection detected\"\n r2.debug(r5)\n r4.close()\n L_0x00ac:\n org.apache.http.impl.execchain.ConnectionHolder r15 = new org.apache.http.impl.execchain.ConnectionHolder\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log\n r0 = r18\n org.apache.http.conn.HttpClientConnectionManager r5 = r0.connManager\n r15.<init>(r2, r5, r4)\n if (r22 == 0) goto L_0x00c0\n r0 = r22\n r0.setCancellable(r15) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x00c0:\n r2 = 1\n r12 = r2\n L_0x00c2:\n r2 = 1\n if (r12 <= r2) goto L_0x0101\n boolean r2 = org.apache.http.impl.execchain.Proxies.isRepeatable(r20) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x0101\n org.apache.http.client.NonRepeatableRequestException r2 = new org.apache.http.client.NonRepeatableRequestException // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r3 = \"Cannot retry request with a non-repeatable request entity.\"\n r2.<init>(r3) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n throw r2 // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x00d3:\n r2 = move-exception\n java.io.InterruptedIOException r3 = new java.io.InterruptedIOException\n java.lang.String r4 = \"Connection has been shut down\"\n r3.<init>(r4)\n r3.initCause(r2)\n throw r3\n L_0x00df:\n r4 = 0\n goto L_0x0078\n L_0x00e2:\n r2 = move-exception\n java.lang.Thread r3 = java.lang.Thread.currentThread()\n r3.interrupt()\n org.apache.http.impl.execchain.RequestAbortedException r3 = new org.apache.http.impl.execchain.RequestAbortedException\n java.lang.String r4 = \"Request aborted\"\n r3.<init>(r4, r2)\n throw r3\n L_0x00f2:\n r2 = move-exception\n java.lang.Throwable r3 = r2.getCause()\n if (r3 != 0) goto L_0x0366\n L_0x00f9:\n org.apache.http.impl.execchain.RequestAbortedException r3 = new org.apache.http.impl.execchain.RequestAbortedException\n java.lang.String r4 = \"Request execution failed\"\n r3.<init>(r4, r2)\n throw r3\n L_0x0101:\n if (r22 == 0) goto L_0x0116\n boolean r2 = r22.isAborted() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x0116\n org.apache.http.impl.execchain.RequestAbortedException r2 = new org.apache.http.impl.execchain.RequestAbortedException // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r3 = \"Request aborted\"\n r2.<init>(r3) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n throw r2 // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0111:\n r2 = move-exception\n r15.abortConnection()\n throw r2\n L_0x0116:\n boolean r2 = r4.isOpen() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x0143\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r5.<init>() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r6 = \"Opening connection \"\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r19\n java.lang.StringBuilder r5 = r5.append(r0) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = r5.toString() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2.debug(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2 = r18\n r5 = r19\n r6 = r20\n r7 = r21\n r2.establishRoute(r3, r4, r5, r6, r7) // Catch:{ TunnelRefusedException -> 0x0161 }\n L_0x0143:\n int r2 = r14.getSocketTimeout() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 < 0) goto L_0x014c\n r4.setSocketTimeout(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x014c:\n if (r22 == 0) goto L_0x01a8\n boolean r2 = r22.isAborted() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x01a8\n org.apache.http.impl.execchain.RequestAbortedException r2 = new org.apache.http.impl.execchain.RequestAbortedException // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r3 = \"Request aborted\"\n r2.<init>(r3) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n throw r2 // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x015c:\n r2 = move-exception\n r15.abortConnection()\n throw r2\n L_0x0161:\n r2 = move-exception\n r0 = r18\n org.apache.commons.logging.Log r3 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r3 = r3.isDebugEnabled() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r3 == 0) goto L_0x0177\n r0 = r18\n org.apache.commons.logging.Log r3 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r4 = r2.getMessage() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r3.debug(r4) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0177:\n org.apache.http.HttpResponse r9 = r2.getResponse() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x017b:\n if (r13 != 0) goto L_0x0363\n r0 = r18\n org.apache.http.client.UserTokenHandler r2 = r0.userTokenHandler // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r21\n java.lang.Object r2 = r2.getUserToken(r0) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r3 = \"http.user-token\"\n r0 = r21\n r0.setAttribute(r3, r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x018e:\n if (r2 == 0) goto L_0x0193\n r15.setState(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0193:\n org.apache.http.HttpEntity r2 = r9.getEntity() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x019f\n boolean r2 = r2.isStreaming() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x035d\n L_0x019f:\n r15.releaseConnection() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2 = 0\n org.apache.http.client.methods.CloseableHttpResponse r2 = org.apache.http.impl.execchain.Proxies.enhanceResponse(r9, r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x01a7:\n return r2\n L_0x01a8:\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r2 = r2.isDebugEnabled() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x01d0\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r5.<init>() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r6 = \"Executing request \"\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n org.apache.http.RequestLine r6 = r20.getRequestLine() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = r5.toString() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2.debug(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x01d0:\n java.lang.String r2 = \"Authorization\"\n r0 = r20\n boolean r2 = r0.containsHeader(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x020d\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r2 = r2.isDebugEnabled() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x0202\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r5.<init>() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r6 = \"Target auth state: \"\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n org.apache.http.auth.AuthProtocolState r6 = r11.getState() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = r5.toString() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2.debug(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0202:\n r0 = r18\n org.apache.http.impl.auth.HttpAuthenticator r2 = r0.authenticator // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r20\n r1 = r21\n r2.generateAuthResponse(r0, r11, r1) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x020d:\n java.lang.String r2 = \"Proxy-Authorization\"\n r0 = r20\n boolean r2 = r0.containsHeader(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x0250\n boolean r2 = r19.isTunnelled() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x0250\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r2 = r2.isDebugEnabled() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x0245\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r5.<init>() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r6 = \"Proxy auth state: \"\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n org.apache.http.auth.AuthProtocolState r6 = r3.getState() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = r5.toString() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2.debug(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0245:\n r0 = r18\n org.apache.http.impl.auth.HttpAuthenticator r2 = r0.authenticator // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r20\n r1 = r21\n r2.generateAuthResponse(r0, r3, r1) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0250:\n r0 = r18\n org.apache.http.protocol.HttpRequestExecutor r2 = r0.requestExecutor // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r20\n r1 = r21\n org.apache.http.HttpResponse r9 = r2.execute(r0, r4, r1) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r18\n org.apache.http.ConnectionReuseStrategy r2 = r0.reuseStrategy // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r21\n boolean r2 = r2.keepAlive(r9, r0) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x0308\n r0 = r18\n org.apache.http.conn.ConnectionKeepAliveStrategy r2 = r0.keepAliveStrategy // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r21\n long r6 = r2.getKeepAliveDuration(r9, r0) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r2 = r2.isDebugEnabled() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x02bb\n r16 = 0\n int r2 = (r6 > r16 ? 1 : (r6 == r16 ? 0 : -1))\n if (r2 <= 0) goto L_0x0305\n java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r2.<init>() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = \"for \"\n java.lang.StringBuilder r2 = r2.append(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r2 = r2.append(r6) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = \" \"\n java.lang.StringBuilder r2 = r2.append(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.util.concurrent.TimeUnit r5 = java.util.concurrent.TimeUnit.MILLISECONDS // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r2 = r2.append(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r2 = r2.toString() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x02a1:\n r0 = r18\n org.apache.commons.logging.Log r5 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r8 = new java.lang.StringBuilder // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r8.<init>() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r10 = \"Connection can be kept alive \"\n java.lang.StringBuilder r8 = r8.append(r10) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.StringBuilder r2 = r8.append(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r2 = r2.toString() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r5.debug(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x02bb:\n java.util.concurrent.TimeUnit r2 = java.util.concurrent.TimeUnit.MILLISECONDS // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r15.setValidFor(r6, r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r15.markReusable() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x02c3:\n r5 = r18\n r6 = r11\n r7 = r3\n r8 = r19\n r10 = r21\n boolean r2 = r5.needAuthentication(r6, r7, r8, r9, r10) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x017b\n org.apache.http.HttpEntity r2 = r9.getEntity() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r5 = r15.isReusable() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r5 == 0) goto L_0x0311\n org.apache.http.util.EntityUtils.consume(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x02de:\n org.apache.http.HttpRequest r2 = r20.getOriginal() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = \"Authorization\"\n boolean r5 = r2.containsHeader(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r5 != 0) goto L_0x02f1\n java.lang.String r5 = \"Authorization\"\n r0 = r20\n r0.removeHeaders(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x02f1:\n java.lang.String r5 = \"Proxy-Authorization\"\n boolean r2 = r2.containsHeader(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != 0) goto L_0x0300\n java.lang.String r2 = \"Proxy-Authorization\"\n r0 = r20\n r0.removeHeaders(r2) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0300:\n int r2 = r12 + 1\n r12 = r2\n goto L_0x00c2\n L_0x0305:\n java.lang.String r2 = \"indefinitely\"\n goto L_0x02a1\n L_0x0308:\n r15.markNonReusable() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n goto L_0x02c3\n L_0x030c:\n r2 = move-exception\n r15.abortConnection()\n throw r2\n L_0x0311:\n r4.close() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n org.apache.http.auth.AuthProtocolState r2 = r3.getState() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n org.apache.http.auth.AuthProtocolState r5 = org.apache.http.auth.AuthProtocolState.SUCCESS // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != r5) goto L_0x0338\n org.apache.http.auth.AuthScheme r2 = r3.getAuthScheme() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x0338\n org.apache.http.auth.AuthScheme r2 = r3.getAuthScheme() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r2 = r2.isConnectionBased() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x0338\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = \"Resetting proxy auth state\"\n r2.debug(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r3.reset() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n L_0x0338:\n org.apache.http.auth.AuthProtocolState r2 = r11.getState() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n org.apache.http.auth.AuthProtocolState r5 = org.apache.http.auth.AuthProtocolState.SUCCESS // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 != r5) goto L_0x02de\n org.apache.http.auth.AuthScheme r2 = r11.getAuthScheme() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x02de\n org.apache.http.auth.AuthScheme r2 = r11.getAuthScheme() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n boolean r2 = r2.isConnectionBased() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n if (r2 == 0) goto L_0x02de\n r0 = r18\n org.apache.commons.logging.Log r2 = r0.log // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n java.lang.String r5 = \"Resetting target auth state\"\n r2.debug(r5) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n r11.reset() // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n goto L_0x02de\n L_0x035d:\n org.apache.http.client.methods.CloseableHttpResponse r2 = org.apache.http.impl.execchain.Proxies.enhanceResponse(r9, r15) // Catch:{ ConnectionShutdownException -> 0x00d3, HttpException -> 0x0111, IOException -> 0x015c, RuntimeException -> 0x030c }\n goto L_0x01a7\n L_0x0363:\n r2 = r13\n goto L_0x018e\n L_0x0366:\n r2 = r3\n goto L_0x00f9\n L_0x0369:\n r11 = r2\n goto L_0x0028\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.apache.http.impl.execchain.MainClientExec.execute(org.apache.http.conn.routing.HttpRoute, org.apache.http.client.methods.HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.methods.HttpExecutionAware):org.apache.http.client.methods.CloseableHttpResponse\");\n }", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> replaceProxy(\n @Path(\"name\") String name, \n @Body Proxy body);", "public static void main(String[] args) throws Exception {\n HttpProxyServerConfig config = new HttpProxyServerConfig();\n config.setHandleSsl(true);\n // 设置只有访问百度才会走中间人攻击,其它域名正常转发\n config.setMitmMatcher(new DomainHttpProxyMitmMatcher(Arrays.asList(\"www.baidu.com\")));\n new HttpProxyServer()\n .serverConfig(config)\n .proxyInterceptInitializer(new HttpProxyInterceptInitializer() {\n @Override\n public void init(HttpProxyInterceptPipeline pipeline) {\n pipeline.addLast(new HttpProxyIntercept() {\n\n // 只有请求百度域名这里才会被调用\n @Override\n public void beforeRequest(Channel clientChannel, HttpRequest httpRequest, HttpProxyInterceptPipeline pipeline) throws Exception {\n System.out.println(httpRequest.toString());\n\n pipeline.beforeRequest(clientChannel, httpRequest);\n }\n });\n }\n })\n .start(9999);\n }", "public static void main(String args[]) {\n int saveCerts = 0;\n boolean noVerify = false;\n String proxyHost = \"127.0.0.1\";\n int proxyPort = 0;\n ProxyType ptype = ProxyType.NONE;\n boolean error = false;\n Getopt g = new Getopt(\"ssleepget\", args, \"p:y:sz\");\n try {\n int c;\n while ((c = g.getopt()) != -1) {\n switch (c) {\n case 'p':\n String s = g.getOptarg();\n int colon = s.indexOf(':');\n if (colon >= 0) {\n // Todo IPv6 [a:b:c]:4444\n proxyHost = s.substring(0, colon);\n String port = s.substring(colon + 1);\n proxyPort = Integer.parseInt(port);\n } else {\n proxyHost = s;\n // proxyPort remains default\n }\n break;\n\n case 'y':\n String y = g.getOptarg().toUpperCase(Locale.US);\n if (y.equals(\"HTTP\") || y.equals(\"HTTPS\")) {\n ptype = ProxyType.HTTP;\n } else if (y.equals(\"SOCKS4\")) {\n ptype = ProxyType.SOCKS4;\n } else if (y.equals(\"SOCKS5\")) {\n ptype = ProxyType.SOCKS5;\n } else if (y.equals(\"I2P\")) {\n ptype = ProxyType.INTERNAL;\n proxyHost = \"localhost\";\n proxyPort = 4444;\n } else {\n error = true;\n }\n break;\n\n case 's':\n saveCerts++;\n break;\n\n case 'z':\n noVerify = true;\n break;\n\n case '?':\n case ':':\n default:\n error = true;\n break;\n } // switch\n } // while\n } catch (RuntimeException e) {\n e.printStackTrace();\n error = true;\n }\n\n if (error || args.length - g.getOptind() != 1) {\n usage();\n System.exit(1);\n }\n String url = args[g.getOptind()];\n\n String saveAs = suggestName(url);\n\n SSLEepGet get;\n if (proxyHost != null) {\n if (proxyPort == 0) {\n if (ptype == ProxyType.HTTP)\n proxyPort = 8080;\n else\n proxyPort = 1080;\n }\n get = new SSLEepGet(I2PAppContext.getGlobalContext(), ptype, proxyHost, proxyPort, saveAs, url);\n } else {\n get = new SSLEepGet(I2PAppContext.getGlobalContext(), saveAs, url);\n }\n if (saveCerts > 0)\n get._saveCerts = saveCerts;\n if (noVerify)\n get._bypassVerification = true;\n get._commandLine = true;\n get.addStatusListener(get.new CLIStatusListener(1024, 40));\n if(!get.fetch(45*1000, -1, 60*1000))\n System.exit(1);\n }", "public void testURL()\r\n {\r\n\r\n BufferedReader in = null;\r\n PrintStream holdErr = System.err;\r\n String errMsg = \"\";\r\n try\r\n {\r\n\r\n this.setSuccess(false);\r\n\r\n PrintStream fileout = new PrintStream(new FileOutputStream(\"testURLFile.html\"));\r\n System.setErr(fileout);\r\n System.err.println(\"testURL() - entry\");\r\n\r\n System.getProperties().put(\"https.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"https.proxyPort\", \"\" + this.getProxyPort());\r\n System.getProperties().put(\"http.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"http.proxyPort\", \"\" + this.getProxyPort());\r\n // System.getProperties().put(\"java.protocol.handler.pkgs\", \"com.sun.net.ssl.internal.www.protocol\");\r\n\r\n URL url = new URL(\"http://www.msn.com\");\r\n\r\n CookieModule.setCookiePolicyHandler(null); // Accept all cookies\r\n // Set the Authorization Handler\r\n // This will let us know waht we are missing\r\n DefaultAuthHandler.setAuthorizationPrompter(this);\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n HTTPResponse headRsp = con.Head(url.getFile());\r\n HTTPResponse rsp = con.Get(url.getFile());\r\n\r\n int sts = headRsp.getStatusCode();\r\n if (sts < 300)\r\n {\r\n System.err.println(\"No authorization required to access \" + url);\r\n this.setSuccess(true);\r\n }\r\n else if (sts >= 400 && sts != 401 && sts != 407)\r\n {\r\n System.err.println(\"Error trying to access \" + url + \":\\n\" + headRsp);\r\n }\r\n else if (sts == 407)\r\n {\r\n System.err.println(\r\n \"Error trying to access \"\r\n + url\r\n + \":\\n\"\r\n + headRsp\r\n + \"\\n\"\r\n + \"<HTML><HEAD><TITLE>Proxy authorization required</TITLE></HEAD>\");\r\n this.setMessage(\"Error trying to access \" + url + \":\\n\" + headRsp + \"\\n\" + \"Proxy authorization required\");\r\n }\r\n // Start reading input\r\n in = new BufferedReader(new InputStreamReader(rsp.getInputStream()));\r\n String inputLine;\r\n\r\n while ((inputLine = in.readLine()) != null)\r\n {\r\n System.err.println(inputLine);\r\n }\r\n // All Done - We were success\r\n\r\n in.close();\r\n\r\n }\r\n catch (ModuleException exc)\r\n {\r\n errMsg = \"ModuleException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (ProtocolNotSuppException exc)\r\n {\r\n errMsg = \"ProtocolNotSuppException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (MalformedURLException exc)\r\n {\r\n errMsg = \"MalformedURLException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (FileNotFoundException exc)\r\n {\r\n errMsg = \"FileNotFoundException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (IOException exc)\r\n {\r\n errMsg = \"IOException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n finally\r\n {\r\n System.err.println(\"testURL() - exit\");\r\n System.setErr(holdErr);\r\n if (in != null)\r\n {\r\n try\r\n {\r\n in.close(); // ENSURE we are CLOSED\r\n }\r\n catch (Exception exc)\r\n {\r\n // Do Nothing, It will be throwing an exception \r\n // if it cannot close the buffer\r\n }\r\n }\r\n this.setMessage(errMsg);\r\n System.gc();\r\n }\r\n\r\n }", "public LoginInfoClientProxy(URL proxyURL) {\n this.proxyURL = proxyURL;\n }", "public static void main(String[] args) {\n\t\tOfficeInternetAccess access = new ProxyInternetAccess(\"Sohan Chougule\"); \n access.grantInternetAccess(); \n\t}", "void setProxyConnectionState(ProxyConnectionState proxyConnectionState) {\n this.proxyConnectionState = proxyConnectionState;\n }", "public HttpHandler createProxyHandler(HttpHandler next) {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setNext(next)\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> patchProxy(\n @Path(\"name\") String name, \n @Body Proxy body);", "public HttpEntity openHttpEntity(URL url) throws IOException {\r\n Logger.getLogger(TargetAuthenticationStrategy.class).setLevel(Level.ERROR);\r\n Logger.getLogger(RequestTargetAuthentication.class).setLevel(Level.ERROR);\r\n DefaultHttpClient httpclient = new DefaultHttpClient();\r\n\r\n for (Cookie cookie : cookies) {\r\n httpclient.getCookieStore().addCookie(cookie);\r\n }\r\n\r\n httpclient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);\r\n\r\n if (socketTimeout > -1) {\r\n httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, socketTimeout);\r\n }\r\n if (connectionTimeout > -1) {\r\n httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout);\r\n }\r\n\r\n String domain = this.domain;\r\n String username = this.username;\r\n String password = this.password;\r\n if (serviceAccountPropertiesFileName != null) {\r\n Properties serviceAccountProperties = new Properties();\r\n if (new File(serviceAccountPropertiesFileName).exists()) {\r\n serviceAccountProperties.load(new FileReader(serviceAccountPropertiesFileName));\r\n } else {\r\n try {\r\n serviceAccountProperties.load(this.getClass().getResourceAsStream(serviceAccountPropertiesFileName));\r\n } catch (Exception e) {\r\n }\r\n }\r\n domain = serviceAccountProperties.getProperty(\"http.serviceaccount.domain\", domain);\r\n username = serviceAccountProperties.getProperty(\"http.serviceaccount.username\", username);\r\n password = serviceAccountProperties.getProperty(\"http.serviceaccount.password\", password);\r\n }\r\n\r\n if (username != null && password != null) {\r\n String decryptedPassword = password;\r\n try {\r\n decryptedPassword = new StringEncrypter().decrypt(password);\r\n } catch (Exception e) {\r\n }\r\n NTCredentials creds = new NTCredentials(username, decryptedPassword, getCanonicalHostName()[0], domain);\r\n httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.KERBEROS);\r\n }\r\n HttpHost target = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());\r\n HttpContext localContext = new BasicHttpContext();\r\n HttpGet httpGet = new HttpGet(url.getFile());\r\n HttpResponse httpResponse = httpclient.execute(target, httpGet, localContext);\r\n this.lastStatusLine = httpResponse.getStatusLine();\r\n lastCookies = httpclient.getCookieStore().getCookies();\r\n\r\n return httpResponse.getEntity();\r\n }", "private <T> T proxy(Class<T> serviceClass, String serviceUrl, Client client) {\n\n final WebTarget target = client.target(serviceUrl);\n return ((ResteasyWebTarget) target).proxy(serviceClass);\n }", "public void setProxyHost(String hostname) {\n proxyHost = hostname;\n }", "protected void addProxyAuthorizationRequestHeader(HttpState state,\n HttpConnection conn)\n throws IOException, HttpException {\n LOG.trace(\"enter HttpMethodBase.addProxyAuthorizationRequestHeader(\"\n + \"HttpState, HttpConnection)\");\n\n // add proxy authorization header, if needed\n if (getRequestHeader(HttpAuthenticator.PROXY_AUTH_RESP) == null) {\n Header[] challenges = getResponseHeaderGroup().getHeaders(\n HttpAuthenticator.PROXY_AUTH);\n if (challenges.length > 0) {\n try {\n AuthScheme authscheme = HttpAuthenticator.selectAuthScheme(challenges);\n HttpAuthenticator.authenticateProxy(authscheme, this, conn, state);\n } catch (HttpException e) {\n // log and move on\n if (LOG.isErrorEnabled()) {\n LOG.error(e.getMessage(), e);\n }\n }\n }\n }\n }", "public final GetHTTP setProxyHost(final String proxyHost) {\n properties.put(PROXY_HOST_PROPERTY, proxyHost);\n return this;\n }", "String getHttpProxyUsername();", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> replaceProxy(\n @Path(\"name\") String name, \n @Body Proxy body, \n @QueryMap ReplaceProxy queryParameters);", "private void checkForProxy() {\r\n System.setProperty(\"java.net.useSystemProxies\", \"true\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n TransportLogger.getSysAuditLogger().debug(\"Detecting system proxies\"); //$NON-NLS-1$\r\n List<Proxy> l = null;\r\n try {\r\n l = ProxySelector.getDefault().select(\r\n new URI(\"https://mws.amazonservices.com\")); //$NON-NLS-1$\r\n }\r\n catch (URISyntaxException e) {\r\n e.printStackTrace();\r\n }\r\n if (l != null) {\r\n for (Proxy proxy : l) {\r\n InetSocketAddress addr = (InetSocketAddress) proxy.address();\r\n\r\n if (addr == null) {\r\n TransportLogger.getSysAuditLogger().debug(\r\n \"No system proxies found\"); //$NON-NLS-1$\r\n }\r\n else {\r\n TransportLogger.getSysAuditLogger().info(\r\n \"Proxy hostname: \" + addr.getHostName()); //$NON-NLS-1$\r\n if(System.getProperty(\"https.proxyHost\") == null) \r\n System.setProperty(\"https.proxyHost\", addr.getHostName()); //$NON-NLS-1$\r\n TransportLogger.getSysAuditLogger().info(\r\n \"Proxy Port: \" + addr.getPort()); //$NON-NLS-1$\r\n if(System.getProperty(\"https.proxyPort\") == null)\r\n System.setProperty(\"https.proxyPort\", //$NON-NLS-1$\r\n Integer.toString(addr.getPort()));\r\n break;\r\n }\r\n }\r\n }\r\n }", "public void setProxyHost(java.lang.String newProxyHost)\r\n {\r\n System.out.println(\"Host: \" + newProxyHost);\r\n proxyHost = newProxyHost;\r\n }", "IHttpService getHttpService();", "public interface IProxySettings\n{\n /**\n * @return The proxy type to be used. May not be <code>null</code>.\n */\n @Nonnull\n Proxy.Type getProxyType ();\n\n /**\n * @return The proxy host name of IP address. May be <code>null</code> if\n * proxy type is DIRECT.\n */\n @Nullable\n String getProxyHost ();\n\n /**\n * @return The proxy port for this HTTP proxy type. Should be &gt; 0. May be\n * &le; 0 if the proxy type is DIRECT.\n */\n int getProxyPort ();\n\n /**\n * @return The proxy user name. May be <code>null</code>.\n */\n @Nullable\n String getProxyUserName ();\n\n default boolean hasProxyUserName ()\n {\n return StringHelper.hasText (getProxyUserName ());\n }\n\n /**\n * @return The proxy password for the provided user. May be <code>null</code>.\n * Note: an empty password may be valid. Only <code>null</code>\n * indicates \"no password\".\n */\n @Nullable\n String getProxyPassword ();\n\n default boolean hasProxyPassword ()\n {\n return getProxyPassword () != null;\n }\n\n /**\n * Check if hostname and port match the ones from the provided\n * {@link InetSocketAddress}.\n *\n * @param aAddr\n * The address to compare with. May be <code>null</code>.\n * @return <code>true</code> if the unresolved hostname and the port match.\n */\n default boolean hasInetSocketAddress (@Nullable final InetSocketAddress aAddr)\n {\n return aAddr != null && EqualsHelper.equals (aAddr.getHostString (), getProxyHost ()) && getProxyPort () == aAddr.getPort ();\n }\n\n /**\n * Check if these settings have the provided socket address.\n *\n * @param aAddr\n * The socket address to compare to. May be <code>null</code>.\n * @return <code>true</code> if the proxy type is DIRECT and the address is\n * <code>null</code>, or if the object is of type\n * {@link InetSocketAddress} and the values match.\n * @see #hasInetSocketAddress(InetSocketAddress)\n */\n boolean hasSocketAddress (@Nullable SocketAddress aAddr);\n\n /**\n * @return A non-<code>null</code> {@link Proxy} instance. Only uses proxy\n * host and port.\n * @see #getProxyHost()\n * @see #getProxyPort()\n */\n @Nonnull\n default Proxy getAsProxy ()\n {\n return getAsProxy (true);\n }\n\n /**\n * @param bResolveHostname\n * <code>true</code> to resolve host names (needed in production) or\n * <code>false</code> to not resolve them (mainly for testing\n * purposes). This flag has no impact if the proxy type is DIRECT.\n * @return A non-<code>null</code> {@link Proxy} instance. Only uses proxy\n * host and port.\n * @see #getProxyHost()\n * @see #getProxyPort()\n */\n @Nonnull\n Proxy getAsProxy (boolean bResolveHostname);\n\n /**\n * @return The {@link PasswordAuthentication} instances matching the\n * credentials contained in this object or <code>null</code> if no\n * username is present.\n */\n @Nullable\n default PasswordAuthentication getAsPasswordAuthentication ()\n {\n // If no user name is set, no Authenticator needs to be created\n if (!hasProxyUserName ())\n return null;\n\n final String sProxyPassword = getProxyPassword ();\n // Constructor does not take null password!\n return new PasswordAuthentication (getProxyUserName (),\n sProxyPassword == null ? ArrayHelper.EMPTY_CHAR_ARRAY : sProxyPassword.toCharArray ());\n }\n}", "public ProxyConfig createProxyConfig();", "public void setProxyHost(String proxyHost) {\n this.proxyHost = proxyHost;\n }", "public Proxy getProxy(){\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> patchProxy(\n @Path(\"name\") String name, \n @Body Proxy body, \n @QueryMap PatchProxy queryParameters);", "public void addProxyConfig(ProxyConfig config);", "public java.lang.String getProxyHost()\r\n {\r\n return proxyHost;\r\n }", "private HttpURLConnection createConnection() {\n try {\n HttpURLConnection httpURLConnection = this.httpProxyHost != null ? CONNECTION_FACTORY.create(this.url, this.createProxy()) : CONNECTION_FACTORY.create(this.url);\n httpURLConnection.setRequestMethod(this.requestMethod);\n return httpURLConnection;\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }", "private HttpProxyCacheServer getProxy() {\n\n return proxy == null ? (proxy = newProxy()) : proxy;\n }", "private HttpProxy createHttpServerConnection() {\n\n final HttpProxy httpProxy = httpConnectionFactory.create();\n\n // TODO: add configurable number of attempts, instead of looping forever\n boolean connected = false;\n while (!connected) {\n LOGGER.debug(\"Attempting connection to HTTP server...\");\n connected = httpProxy.connect();\n }\n\n LOGGER.debug(\"Connected to HTTP server\");\n\n return httpProxy;\n }", "public static void main(String[] args) {\n Executor executor = new Executor();\n InvocationHandler handler = new DynamicProxy(executor);\n IProxy proxy = (IProxy) Proxy.newProxyInstance(handler.getClass().getClassLoader(), executor.getClass().getInterfaces(), handler);\n proxy.action();\n }", "public HttpProxy(int port)\n {\n thisPort = port;\n }", "public void setProxyUser(String proxyUser) {\n this.proxyUser = proxyUser;\n }", "public HttpHandler createProxyHandler() {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Proxy> readProxy(\n @Path(\"name\") String name, \n @QueryMap ReadProxy queryParameters);", "public interface ProxyInterface {\n public String execute();\n\n public String execute0();\n}", "@Override\n\tpublic boolean usingProxy() {\n\t\treturn false;\n\t}", "@Deprecated\n public HttpHandler getProxyHandler() {\n return createProxyHandler();\n }", "protected static void setProxyLocation(URI proxyLocation) {\n Program.proxyLocation = proxyLocation;\n Program.proxyLocationSet = true;\n }", "public void setDefaultProxyConfig(ProxyConfig config);", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tProxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(\n\t\t\t\t\t\t\"proxy.iiit.ac.in\", 8080));\n\t\t\t\tURL url = new URL(url1);\n\t\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t\t.openConnection(proxy);\n\t\t\t\tconnection.setRequestMethod(\"POST\");\n\t\t\t\t// connection.setRequestProperty(\"Content-Type\",\n\t\t\t\t// \"application/x-www-form-urlencoded\");\n\n\t\t\t\tconnection.setRequestProperty(\"Content-Length\",\n\t\t\t\t\t\t\"\" + Integer.toString(parameters.getBytes().length));\n\t\t\t\tconnection.setRequestProperty(\"Content-Language\", \"en-US\");\n\n\t\t\t\tconnection.setUseCaches(false);\n\t\t\t\tconnection.setDoInput(true);\n\t\t\t\tconnection.setDoOutput(true);\n\n\t\t\t\t// Send request\n\t\t\t\tDataOutputStream wr = new DataOutputStream(\n\t\t\t\t\t\tconnection.getOutputStream());\n\t\t\t\twr.writeBytes(parameters);\n\t\t\t\twr.flush();\n\t\t\t\twr.close();\n\n\t\t\t\t// Get Response\n\t\t\t\tInputStream is = connection.getInputStream();\n\t\t\t\tBufferedReader rd = new BufferedReader(\n\t\t\t\t\t\tnew InputStreamReader(is));\n\t\t\t\tString line;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\t\tresponse.append(line);\n\t\t\t\t\tresponse.append('\\r');\n\t\t\t\t}\n\t\t\t\trd.close();\n\t\t\t\t// return response.toString();\n\t\t\t\tlong tID = Thread.currentThread().getId();\n\t\t\t\tlong time = ManagementFactory.getThreadMXBean()\n\t\t\t\t\t\t.getThreadCpuTime(tID);\n\t\t\t\tSystem.out.println(\"My thread \" + tID + \" execution time: \"\n\t\t\t\t\t\t+ time + \" ns.\");\n\t\t\t\tsumTimes=sumTimes+time;\n\t\t\t\tconnection.disconnect();\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\t// return null;\n\n\t\t\t} finally {\n\n\t\t\t}\n\t\t}", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Set the HTTP proxy server.\")\n @JsonProperty(JSON_PROPERTY_HTTP_PROXY)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getHttpProxy() {\n return httpProxy;\n }", "public StatusLine testHttpEntity(URL url) throws IOException {\r\n Logger.getLogger(TargetAuthenticationStrategy.class).setLevel(Level.ERROR);\r\n Logger.getLogger(RequestTargetAuthentication.class).setLevel(Level.ERROR);\r\n DefaultHttpClient httpclient = new DefaultHttpClient();\r\n\r\n httpclient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);\r\n\r\n String domain = this.domain;\r\n String username = this.username;\r\n String password = this.password;\r\n if (serviceAccountPropertiesFileName != null) {\r\n Properties serviceAccountProperties = new Properties();\r\n if (new File(serviceAccountPropertiesFileName).exists()) {\r\n serviceAccountProperties.load(new FileReader(serviceAccountPropertiesFileName));\r\n } else {\r\n try {\r\n serviceAccountProperties.load(this.getClass().getResourceAsStream(serviceAccountPropertiesFileName));\r\n } catch (Exception e) {\r\n }\r\n }\r\n domain = serviceAccountProperties.getProperty(\"http.serviceaccount.domain\", domain);\r\n username = serviceAccountProperties.getProperty(\"http.serviceaccount.username\", username);\r\n password = serviceAccountProperties.getProperty(\"http.serviceaccount.password\", password);\r\n }\r\n\r\n if (username != null && password != null) {\r\n String decryptedPassword = password;\r\n try {\r\n decryptedPassword = new StringEncrypter().decrypt(password);\r\n } catch (Exception e) {\r\n }\r\n NTCredentials creds = new NTCredentials(username, decryptedPassword, getCanonicalHostName()[0], domain);\r\n httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, creds);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);\r\n httpclient.getAuthSchemes().unregister(AuthPolicy.KERBEROS);\r\n }\r\n HttpHost target = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());\r\n HttpContext localContext = new BasicHttpContext();\r\n HttpGet httpGet = new HttpGet(url.getFile());\r\n HttpResponse httpResponse = httpclient.execute(target, httpGet, localContext);\r\n StatusLine lastStatusLine = httpResponse.getStatusLine();\r\n httpGet.releaseConnection();\r\n\r\n return (this.lastStatusLine = lastStatusLine);\r\n }", "protected ServiceProxy getServiceProxy(List<ServiceState> serviceStates, OperationDescripter operation, TransportType transport) throws Exception {\n\t\t//TODO apply load balancing scheme here\n\t\tServiceState serviceState = selectService(serviceStates);\n\t\tServiceProxy serviceProxy = getServiceProxy(serviceState, operation, transport);\n\t\treturn serviceProxy;\n\t}", "protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n\r\n if (proxyRequired)\r\n {\r\n con.addBasicAuthorization(proxyRealm, proxyName, proxyPswd);\r\n }\r\n\r\n return (con);\r\n }", "public void setProxyAddress(String proxyAddress) {\n this.proxyAddress = proxyAddress;\n }", "@Override\n protected CloseableHttpResponse doExecute(\n HttpHost httpHost, HttpRequest httpRequest, HttpContext httpContext) throws IOException, ClientProtocolException {\n return wrappedClient.execute(httpHost, httpRequest, httpContext);\n }", "public Proxy getProxy() {\n return proxy;\n }", "public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}", "private void registerCustomProtocolHandler() {\n try {\n URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {\n @Override\n public URLStreamHandler createURLStreamHandler(String protocol) {\n if (\"https\".equals(protocol)) {\n return new sun.net.www.protocol.https.Handler() {\n @Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n // Leaving sysout comments here for debugging and clarity if the tool does break again because of an Okta Update\n //System.out.format(\"openConnection %s (%s, %s)\\n\", url, url.getHost(), url.getPath());\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }\n\n };\n }\n return null;\n }\n });\n } catch (Throwable t) {\n System.out.println(\"Unable to register custom protocol handler\");\n }\n }", "@Test\n public void testProxy() {\n Dell dell = new Dell();\n Proxy proxy = new Proxy(dell);\n proxy.salePc();\n }", "public String getProxyHost() {\n return proxyHost;\n }", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Proxy> replaceProxyStatus(\n @Path(\"name\") String name, \n @Body Proxy body);", "@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }", "private void setProxySpecificHeaders(HttpMethod method, HttpServletRequest request) throws HttpException {\n String serverHostName = \"jEasyExtensibleProxy\";\n try {\n serverHostName = InetAddress.getLocalHost().getHostName(); \n } catch (UnknownHostException e) {\n log.error(\"Couldn't get the hostname needed for headers x-forwarded-server and Via\", e);\n }\n \n String originalVia = request.getHeader(\"via\");\n StringBuffer via = new StringBuffer(\"\");\n if (originalVia != null) {\n if (originalVia.indexOf(serverHostName) != -1) {\n log.error(\"This proxy has already handled the request, will abort.\");\n throw new HttpException(\"Request has a cyclic dependency on this proxy.\");\n }\n via.append(originalVia).append(\", \");\n }\n via.append(request.getProtocol()).append(\" \").append(serverHostName);\n \n method.setRequestHeader(\"via\", via.toString());\n method.setRequestHeader(\"x-forwarded-for\", request.getRemoteAddr()); \n method.setRequestHeader(\"x-forwarded-host\", request.getServerName());\n method.setRequestHeader(\"x-forwarded-server\", serverHostName);\n \n method.setRequestHeader(\"accept-encoding\", \"\");\n }", "public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}", "@Test\n public void httpEasyRequest() throws HttpResponseException, IOException {\n Logger logger = (Logger) LoggerFactory.getILoggerFactory().getLogger(Logger.ROOT_LOGGER_NAME);\n logger.setLevel(Level.ALL);\n \n HttpEasy.withDefaults().proxyConfiguration(ProxyConfiguration.AUTOMATIC);\n\n JsonReader json = HttpEasy.request()\n .baseUrl(\"http://httpbin.org\")\n .header(\"hello\", \"world\")\n .path(\"get\")\n .queryParam(\"name\", \"fred\")\n .logRequestDetails()\n .get()\n .getJsonReader();\n\n assertThat(json.getAsString(\"url\"), is(\"http://httpbin.org/get?name=fred\"));\n\n }", "boolean isOmniProxyServer();", "private Object proxyGet (Request request, Response response) {\n\n final long startTimeMsec = System.currentTimeMillis();\n\n final String bundleId = request.params(\"bundleId\");\n final String workerVersion = request.params(\"workerVersion\");\n\n WorkerCategory workerCategory = new WorkerCategory(bundleId, workerVersion);\n String address = broker.getWorkerAddress(workerCategory);\n if (address == null) {\n Bundle bundle = null;\n // There are no workers that can handle this request. Request one and ask the UI to retry later.\n final String accessGroup = request.attribute(\"accessGroup\");\n final String userEmail = request.attribute(\"email\");\n WorkerTags workerTags = new WorkerTags(accessGroup, userEmail, \"anyProjectId\", bundle.regionId);\n broker.createOnDemandWorkerInCategory(workerCategory, workerTags);\n response.status(HttpStatus.ACCEPTED_202);\n response.header(\"Retry-After\", \"30\");\n response.body(\"Starting worker.\");\n return response;\n } else {\n // Workers exist in this category, clear out any record that we're waiting for one to start up.\n // FIXME the tracking of which workers are starting up should really be encapsulated using a \"start up if needed\" method.\n broker.recentlyRequestedWorkers.remove(workerCategory);\n }\n\n String workerUrl = \"http://\" + address + \":7080/single\"; // TODO remove hard-coded port number.\n LOG.info(\"Re-issuing HTTP request from UI to worker at {}\", workerUrl);\n\n\n HttpClient httpClient = HttpClient.newBuilder().build();\n HttpRequest httpRequest = HttpRequest.newBuilder()\n .GET()\n .uri(URI.create(workerUrl))\n .header(\"Accept-Encoding\", \"gzip\") // TODO Explore: is this unzipping and re-zipping the result from the worker?\n .build();\n try {\n response.status(0);\n // content-type response.header();\n return httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofInputStream());\n } catch (Exception exception) {\n response.status(HttpStatus.BAD_GATEWAY_502);\n response.body(ExceptionUtils.stackTraceString(exception));\n return response;\n } finally {\n\n }\n }", "public static Object httpClient() {\n return new Object();\n// return HttpClient.newBuilder()\n// .version(HttpClient.Version.HTTP_1_1)\n// .followRedirects(HttpClient.Redirect.NORMAL)\n// .connectTimeout(Duration.ofSeconds(300))\n// .build();\n }", "private NodeMgrService.Proxy getProxy(int node) { \n Object obj = ServiceManager.proxyFor(node);\n if (! (obj instanceof NodeMgrService.Proxy)) {\n if (node == ServiceManager.LOCAL_NODE) {\n throw new InternalException(\"cannot fetch NodeManager Proxy\" +\n \" for local node\");\n } else {\n logger.warning(\"cannot retrieve proxy for node \" + node);\n }\n }\n return (NodeMgrService.Proxy) obj;\n }", "private Connection() {\n\n//==================================================//\n\n\n //==============================//\n\n // client = new AsyncHttpClient(true, 0, 443);\n client = new AsyncHttpClient();\n client.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory());\n contentType = \"application/json\";\n client.setUserAgent(System.getProperty(\"http.agent\"));\n //Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\"\n // client.setUserAgent(\"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\");\n client.setTimeout(20 * 1000);\n client.setResponseTimeout(20 * 1000);\n client.setConnectTimeout(20 * 1000);\n // client.setEnableRedirects(true);\n\n // Log.e(\"agentss\",System.getProperty(\"https.agent\"));\n gson = new GsonBuilder().serializeNulls().create();\n //client.getHttpClient().getConnectionManager().shutdown();\n/*\n try {\n KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());\n trustStore.load(null, null);\n MySSLSocketFactory sf = new MySSLSocketFactory(trustStore);\n sf.setHostnameVerifier(MySSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n client.setSSLSocketFactory(sf);\n }\n catch (Exception e) {\n }\n */\n\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/proxies/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Proxy> readProxyStatus(\n @Path(\"name\") String name);", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/proxies\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ProxyList, Proxy> listProxy();", "public Response execute(final NetworkHelper networkHelper)\n\t\t\tthrows IOException {\n\t\tnetworkHelper.connListener.onRequest(this);\n\t\tHttpURLConnection urlConnection;\n\t\tif (proxy != null) urlConnection = networkHelper.openConnection(url,\n\t\t\t\tproxy);\n\t\telse\n\t\t\turlConnection = networkHelper.openConnection(url);\n\t\turlConnection.setRequestMethod(method.name());\n\t\turlConnection.setConnectTimeout(connectTimeout > -1 ? connectTimeout\n\t\t\t\t: networkHelper.defaultConnectTimeout);\n\t\turlConnection.setReadTimeout(readTimeout > -1 ? readTimeout\n\t\t\t\t: networkHelper.defaultReadTimout);\n\n\t\tif (!cookies.isEmpty()) CookieManager\n\t\t\t\t.setCookies(urlConnection, cookies);\n\t\tif (useCookies) networkHelper.cookieManager.setupCookies(urlConnection);\n\n\t\turlConnection.setInstanceFollowRedirects(followRedirects);\n\n\t\tMap<String, String> headers = new HashMap<String, String>(\n\t\t\t\tnetworkHelper.defaultHeaderMap);\n\t\theaders.putAll(headerMap);\n\t\tsetupHeaders(urlConnection, headers);\n\n\t\tswitch (method) {\n\t\tcase POST:\n\t\tcase PUT:\n\t\t\tif (urlConnection.getRequestProperty(\"Content-Type\") == null) {\n\t\t\t\turlConnection.setRequestProperty(\"Content-Type\",\n\t\t\t\t\t\t\"application/x-www-form-urlencoded\");\n\t\t\t}\n\t\t\tif (payload == null) break;\n\t\t\turlConnection.setDoOutput(true);\n\t\t\turlConnection.setFixedLengthStreamingMode(payload.length);\n\t\t\tfinal OutputStream output = urlConnection.getOutputStream();\n\t\t\toutput.write(payload);\n\t\t\toutput.close();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\tInputStream inputStream = null;\n\t\ttry {\n\t\t\tfinal URL url = urlConnection.getURL();\n\t\t\tnetworkHelper.log.info(\"Request {}:{}://{}{}\", method,\n\t\t\t\t\turl.getProtocol(), url.getAuthority(), url.getPath());\n\t\t\turlConnection.connect();\n\t\t\tinputStream = NetworkHelper.getInputStream(urlConnection);\n\t\t\tnetworkHelper.log.info(\"Response {}\",\n\t\t\t\t\turlConnection.getResponseMessage());\n\t\t} catch (final IOException e) {\n\t\t\tfinal int statusCode = urlConnection.getResponseCode();\n\t\t\tif (!ignoreErrorChecks && statusCode >= 400) {\n\t\t\t\tnetworkHelper.log.info(\"Response {}\",\n\t\t\t\t\t\turlConnection.getResponseMessage());\n\t\t\t\tinputStream = NetworkHelper.getErrorStream(urlConnection);\n\t\t\t} else\n\t\t\t\tthrow e;\n\t\t} finally {\n\t\t\tif (useCookies) networkHelper.cookieManager\n\t\t\t\t\t.putCookieList(CookieManager.getCookies(urlConnection));\n\t\t\tnetworkHelper.connListener.onFinish(url, urlConnection);\n\t\t}\n\n\t\treturn getResponse(urlConnection, inputStream);\n\n\t}", "public void setSocksProxyHost(String host) {\n this.socksProxyHost = host;\n }" ]
[ "0.66530013", "0.6598556", "0.6581025", "0.65266526", "0.62619", "0.62054306", "0.61900926", "0.6142183", "0.6054889", "0.6033931", "0.60088086", "0.59523547", "0.5883925", "0.5872875", "0.58498627", "0.5832227", "0.5825054", "0.5798359", "0.5774111", "0.5773588", "0.5750774", "0.57236713", "0.5680383", "0.5654769", "0.56042975", "0.55952847", "0.55507946", "0.5542454", "0.553576", "0.5526279", "0.54852134", "0.54680187", "0.5467205", "0.5465513", "0.5448731", "0.5436397", "0.5420458", "0.54082733", "0.53859365", "0.5378816", "0.5378402", "0.53768224", "0.53752404", "0.5353643", "0.5330125", "0.5328118", "0.53260326", "0.5325698", "0.5319309", "0.5317728", "0.5308737", "0.5305102", "0.5296031", "0.52590126", "0.5252067", "0.5249989", "0.5249757", "0.5246095", "0.52205336", "0.5220214", "0.52075046", "0.5203999", "0.5199205", "0.5195971", "0.51843476", "0.51803696", "0.517436", "0.51624", "0.515099", "0.51503503", "0.51306397", "0.5122753", "0.51112926", "0.51068765", "0.5100001", "0.5094205", "0.5091166", "0.5090624", "0.50852114", "0.50754315", "0.50604796", "0.50476795", "0.5043248", "0.5034754", "0.5030562", "0.5029826", "0.5019886", "0.5010751", "0.5009662", "0.50069404", "0.50035256", "0.49956265", "0.49935287", "0.49849972", "0.49690452", "0.49579585", "0.4956711", "0.49527374", "0.49502292", "0.49502155" ]
0.5851118
14
/ Get a Transaction by Id from database
@Override public Optional<Seq> getbyid(int id) { Connection conn = null; PreparedStatement pstmt=null; ResultSet rs; Seq seq=null; ProcessesDAO pdao = new ProcessesDAO(); try { String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; conn = DriverManager.getConnection(url); pstmt = conn.prepareStatement( "select * from seq where id =?"); pstmt.setInt(1,id); rs = pstmt.executeQuery(); while (rs.next()) { seq = new Seq(rs.getInt("id"), pdao.getbyidentifier(rs.getString("identifier")), rs.getInt("seq_number")); } rs.close(); pstmt.close(); } catch (SQLException e) { System.out.println(e.getMessage()); } finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } return Optional.of(seq); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Transaction get(String id) throws Exception;", "public Transaction getById(String id) throws Exception;", "Transaction findTransactionById(Long id);", "Transaction getTransctionByTxId(String txId);", "public Transaction getTransactionById(Integer id) throws MiddlewareQueryException;", "Transaction selectByPrimaryKey(Long id);", "public Transaction getTransactionById(int id) throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail WHERE id = ?\";\n Transaction transaction = new Transaction();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, id);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n transaction.setId(id);\n transaction.setUser(userDbManager.getUser(rs.getInt(\"uId\")));\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n }\n }\n }\n\n return transaction;\n }", "public Optional<Transaction> findTransactionById(int id);", "BusinessTransaction get(String tenantId, String id);", "public Transaction getTransaction(int id){\n return accSystem.get(id);\n }", "@GetMapping(\"/{id}\")\n\tpublic Transaction getTransactionById(@PathVariable Long id) {\n\t\tTransaction transaction = null;\n\t\t\n\t\ttry {\n\t\t\ttransaction = transactionService.getTransactionById(id);\n\t\t}\n\t\tcatch (TransactionNotFoundException e) {\n\t\t\tthrow new TransactionNotFoundException(id);\n\t\t}\n\t\tcatch (UserDoesNotOwnResourceException e) {\n\t\t\tthrow new UserDoesNotOwnResourceException();\n\t\t}\n\t\t\n\t\treturn transaction;\n\t}", "@Override\n\tpublic Transaction findTransactionById(int id) {\n\t\treturn null;\n\t}", "public TransactionObj getTransaction(String sID){\n\t\treturn hmTransaction.get(sID);\n\t}", "public Transaction findTransaction(long transactionId) {\n log.trace(\"findTransaction {}\", transactionId);\n TransactionEntity entity = transactionRepository.findOne(transactionId);\n if (entity == null) {\n throw new NotFoundException(\"not found\");\n }\n\n Transaction transaction = new Transaction();\n transaction.setAmount(entity.getAmount());\n transaction.setType(entity.getType());\n if (entity.getParent() != null) {\n transaction.setParentId(entity.getParent().getId());\n }\n return transaction;\n }", "@RequestMapping(value = \"/transactionservice/transaction/{transaction_id}\", method=RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic Transaction getTransaction(@PathVariable long transaction_id) {\n\t\tif(transactions.size() > transaction_id) {\n\t\t\treturn transactions.get((int) transaction_id);\n\t\t} else {\n\t\t\tthrow new TransactionNotFoundException(transaction_id);\n\t\t}\n\t}", "public Transaction getTransaction(String transactionId) throws LedgerException {\n Iterator<Map.Entry<Integer, Block>> blocks = listBlocks();\n\n // Check committed Blocks\n while( blocks.hasNext() ) {\n Block block = blocks.next().getValue();\n Transaction transaction = block.getTransaction(transactionId);\n\n // Transaction was found\n if (transaction != null) {\n return transaction;\n }\n }\n\n throw new LedgerException(\"get transaction\", \"Transaction \" + transactionId + \" does not exist.\");\n }", "@Override\n\t\tpublic AccountTransaction findById(int id) {\n\t\t\treturn null;\n\t\t}", "Purchase retrieve(Long id) throws SQLException, DAOException;", "PaymentTrade selectByPrimaryKey(String id);", "public TransactionItem get(Long id) {\n return (TransactionItem)get(TransactionItem.class, id);\n }", "@Override\r\n\tpublic Transaction getTran(int tranNo) throws Exception {\n\t\treturn tranDao.selectTran(tranNo);\r\n\t}", "public CustomerPurchase getById(Integer id) throws SQLException;", "@GetMapping(\"/rest/{id}\")\n\t\tpublic @ResponseBody Optional<Transaction> findTranscationRest(@PathVariable(\"id\") Long transactionId) {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(username);\n\t\t\tList<Transaction> transactions = traRepo.findByUser(currentUser);\n\t\t\tfor(int i = 0; i < transactions.size(); i++) {\n\t\t\t\tif(transactions.get(i).getId() == transactionId) {\n\t\t\t\t\ttransactionId = transactions.get(i).getId();\n\t\t\t\t\treturn traRepo.findById(transactionId);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\treturn Optional.empty();\n\t\t}", "String getTransactionID();", "Payment selectByPrimaryKey(Long id);", "public TransactionItem find(Long id) {\n return (TransactionItem)find(TransactionItem.class, id);\n }", "@Override\n\tpublic BankTransaction retrieveTransaction(int account_id) throws BusinessException {\n\t\tBankTransaction transaction = null;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactions where account_id=?\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\tpreparedStatement.setInt(1, account_id);\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\tif (resultSet.next()) {\n\t\t\t\ttransaction = new BankTransaction();\n\t\t\t\ttransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\ttransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\ttransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\ttransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\ttransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tthrow new BusinessException(\"Some Internal Error Occurred!\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new BusinessException(\"Some exception has occurred while fetching transactions\");\n\t\t}\n\t\treturn transaction;\n\t}", "DangerMerchant selectByPrimaryKey(Integer id);", "java.lang.String getTxId();", "@Transactional(readOnly = true)\n public Optional<OrderTransactionDTO> findOne(Long id) {\n log.debug(\"Request to get OrderTransaction : {}\", id);\n return orderTransactionRepository.findById(id)\n .map(orderTransactionMapper::toDto);\n }", "public long getTransactionId();", "R_dept_trade selectByPrimaryKey(Integer id);", "@Transactional(readOnly = true)\n DataRistorante getByID(String id);", "PurchasePayment selectByPrimaryKey(Long id);", "@Override\n\tpublic Transaction read(int id) {\n\t\treturn null;\n\t}", "Account selectByPrimaryKey(String id);", "CmstTransfdevice selectByPrimaryKey(String objId);", "T get(PK id);", "public Trasllat getById(Long id) throws InfrastructureException {\r\n\t\tTrasllat trasllat;\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"getById ini\");\r\n\t\t\ttrasllat = (Trasllat)getHibernateTemplate().load(Trasllat.class, id);\t\t\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getById failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"getById fin\");\r\n\t\treturn trasllat;\r\n\t}", "public List<Transaction> readByTransactionId(int transactionId) throws TransactionNotFoundException {\n\t\treturn transactionDAO.selectByTransactionId(transactionId);\n\t}", "Transaction getCurrentTransaction();", "long getTxid();", "T getById(PK id);", "UUID getTransactionId();", "T queryForId(ID id) throws SQLException, DaoException;", "T getById(Long id);", "NjOrderWork2 selectByPrimaryKey(String id);", "Transmission getTransmission(Long transmissionId);", "public Object getTransactionId() throws StandardException;", "BusinessRepayment selectByPrimaryKey(String id);", "public <T> PersistableDataObject<T> queryById(final Serializable id) {\n PersistableDataObject<T> retVal = txTemplate\n .execute(new TransactionCallback<PersistableDataObject<T>>() {\n @Override\n @SuppressWarnings(\"unchecked\")\n public PersistableDataObject<T> doInTransaction(\n TransactionStatus status) {\n return (PersistableDataObject<T>) getHibernateTemplate()\n .get(daoClass, id);\n }\n });\n return retVal;\n }", "public Vector<TransactionItem> getTransactionItem(int transactionId)\n\t{\n\t\tVector<TransactionItem> y= new Vector<TransactionItem>(); \n\t\tVector<TransactionItem> item= new Vector<TransactionItem>(); \n\t\tConnect con=Connect.getConnection();\n\t\tcon.executeQuery(\"USE sudutmeong\");\n\t\tResultSet rs = con.executeQuery(\"SELECT * FROM TransactionItem\");\n\n\t\ttry {\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tTransactionItem x=new TransactionItem();\n\t\t\t\tx.setTransactionId(rs.getInt(\"TransactionId\"));\n\t\t\t\tx.setProductId(rs.getInt(\"productId\"));\n\t\t\t\tx.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\ty.add(x);\n\n\t\t\t}\n\t\t\n\t\t\tfor(int i=0;i<y.size();i++)\n\t\t\t{\n\t\t\t\tint id=y.get(i).getTransactionId();\n\t\t\t\tif(id==transactionId)\n\t\t\t\t{\n\t\t\t\t\tTransactionItem x=new TransactionItem();\n\t\t\t\t\tx.setTransactionId(y.get(i).getTransactionId());\n\t\t\t\t\tx.setProductId(y.get(i).getProductId());\n\t\t\t\t\tx.setQuantity(y.get(i).getQuantity());\n\t\t\t\t\titem.add(x);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn item;\n\t}", "String getTransactionId();", "String getTransactionId();", "FinanceAccount selectByPrimaryKey(Integer id);", "CGcontractCredit selectByPrimaryKey(Integer id);", "Contract findById(int id);", "CusBankAccount selectByPrimaryKey(Integer id);", "@Transactional(readOnly = true) \n public Tbc_fazenda findOne(Long id) {\n log.debug(\"Request to get Tbc_fazenda : {}\", id);\n Tbc_fazenda tbc_fazenda = tbc_fazendaRepository.findOne(id);\n return tbc_fazenda;\n }", "@Override\r\n\tpublic XftPayment get(Integer id) {\n\t\treturn xftPaymentMapper.selectByPrimaryKey(id);\r\n\t}", "EtpBase selectByPrimaryKey(String id);", "public int getTransactionId() {\n return transactionId;\n }", "SysId selectByPrimaryKey(String id);", "public Item getByID(Integer id) {\r\n Item item = null;\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n item = (Item) session.get(Item.class, id);\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return item;\r\n }", "public BookingInfoEntity getBookingById(int id, Transaction transaction) {\n BookingInfoEntity bookingInfoEntity = null;\n\n if (transaction.getPaymentMode().equalsIgnoreCase(\"UPI\") ||\n transaction.getPaymentMode().equalsIgnoreCase(\"CARD\") ) {\n Optional<BookingInfoEntity> optionalBookingInfoEntity = bookingRepository.findById(id);\n if (!optionalBookingInfoEntity.isPresent()) {\n throw new BookingIDNotFoundException(\"Invalid Booking Id\");\n } else {\n bookingInfoEntity = optionalBookingInfoEntity.get();\n transaction.setBookingId(bookingInfoEntity.getBookingId());\n\n //Call PaymentService Api\n transaction = callPaymentServiceApi(transaction);\n bookingInfoEntity.setTransactionId(transaction.getTransactionId());\n bookingInfoEntity = bookingRepository.save(bookingInfoEntity);\n try {\n \t\t\trunProducer(1, bookingInfoEntity.toString());\n \t\t} catch (InterruptedException e) {\n \t\t\te.printStackTrace(); //Internally throw 500 error\n \t\t}\n }\n } else {\n throw new InvalidPaymentModeException(\"Invalid mode of payment\");\n }\n return bookingInfoEntity;\n }", "public CleaningTransaction findByItemId(Long id);", "TCpySpouse selectByPrimaryKey(Integer id);", "public Set<Transaction> getTransactionsByLotId(Integer id) throws MiddlewareQueryException;", "public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }", "Tourst selectByPrimaryKey(String id);", "T getById(int id);", "Transaction getTransaction() { \r\n return tx;\r\n }", "PayLogInfoPo selectByPrimaryKey(Long id);", "@Override\n public T findById(ID id) throws SQLException {\n\n return this.dao.queryForId(id);\n\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected <ID extends Serializable> T get(ID id) {\n\t\tT retValue = null;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tretValue = (T) session.get(mClazz, id);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute get by id\");\n\t\t}\n\n\t\treturn retValue;\n\t}", "@Override\n //@Transactional(readOnly = true)\n public ProjectTransactionRecordDTO findOne(Long id) {\n log.debug(\"Request to get ProjectTransactionRecord : {}\", id);\n ProjectTransactionRecord projectTransactionRecord = projectTransactionRecordRepository.findOne(id);\n return projectTransactionRecordMapper.toDto(projectTransactionRecord);\n }", "DataSync selectByPrimaryKey(Integer id);", "public int getId() {\n return txId;\n }", "O obtener(PK id) throws DAOException;", "AlipayInfo selectByPrimaryKey(String id);", "public TransactionDetailResp transaction_show(String txId) throws Exception {\n String s = main(\"transaction_show\", \"[{\\\"txid\\\":\\\"\" + txId +\"\\\"}]\");\n return JsonHelper.jsonStr2Obj(s, TransactionDetailResp.class);\n }", "@GET\n @Path(\"{id}\")\n @Produces(\"application/hal+json\")\n public Response get(@PathParam(\"regNo\") String regNo, @PathParam(\"accountNo\") String accountNo, @PathParam(\"id\") String id) {\n Optional<Transaction> transaction = admin.findTransaction(regNo, accountNo, id);\n if (transaction.isPresent()) {\n CacheControl cc = new CacheControl();\n cc.setMaxAge(24 * 60 * 60);\n return Response.ok(entityBuilder.buildTransactionJson(transaction.get(), uriInfo)).cacheControl(cc).build();\n } else {\n return Response.status(Response.Status.NOT_FOUND).build();\n }\n }", "public Long getTransactionId() {\n return this.transactionId;\n }", "@Transactional\r\n\tpublic Menu getMenu(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\t\t// Now retrive read from database using primary key\r\n\t\tMenu theMenu = currentSession.get(Menu.class, theId);\r\n\t\treturn theMenu;\r\n\t}", "Journal selectByPrimaryKey(Long id);", "@Test\n public void retrieveTransactionTest() throws ApiException {\n Long loanId = null;\n Long transactionId = null;\n GetSelfLoansLoanIdTransactionsTransactionIdResponse response = api.retrieveTransaction(loanId, transactionId);\n\n // TODO: test validations\n }", "Long getAmount(Integer id) throws Exception;", "MVoucherDTO selectByPrimaryKey(String id);", "CartDO selectByPrimaryKey(Integer id);", "@Override\n\tpublic Contract get(String id) {\n\t\treturn contractDao.findOne(id);\n\t}", "Abum selectByPrimaryKey(String id);", "TradeItem getTradeItem(long id);", "T getById(ID id);", "@Override\n\tpublic WxOrderTrans selectOrderTrans(Integer id) {\n\t\treturn orderMapper.selectOrderTrans(id);\n\t}", "TempletLink selectByPrimaryKey(String id);", "DebtsRecordEntity selectByPrimaryKey(String debtsId);", "@SuppressWarnings(\"unchecked\")\n\tpublic T get(Long id) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\treturn (T) session.get(target, id);\n\t}", "public long getTransactionid() {\n return transactionid;\n }", "public int getTransactionID() {\r\n return transactionID;\r\n }", "Order getByID(String id);", "SysCode selectByPrimaryKey(String id);" ]
[ "0.8722722", "0.8712065", "0.85512227", "0.8347415", "0.8333308", "0.8092789", "0.796512", "0.77627385", "0.7712489", "0.7641145", "0.75331163", "0.7335328", "0.7235204", "0.72196454", "0.7041455", "0.70354074", "0.69765055", "0.6961301", "0.69452745", "0.694039", "0.6823534", "0.67835903", "0.6733174", "0.6716942", "0.6712856", "0.66927874", "0.66576105", "0.66097903", "0.6540938", "0.65267444", "0.65247524", "0.6505748", "0.64999926", "0.6490669", "0.64875585", "0.6483406", "0.647085", "0.6454906", "0.6451012", "0.6449326", "0.644308", "0.6440325", "0.6439131", "0.6435981", "0.64359397", "0.64070654", "0.6391183", "0.6388509", "0.63850904", "0.6368177", "0.6352872", "0.6342836", "0.63420707", "0.63420707", "0.63242984", "0.63218856", "0.6313737", "0.6308715", "0.63056207", "0.6303333", "0.6295359", "0.628304", "0.627146", "0.62468874", "0.6246321", "0.6233315", "0.6216475", "0.6212734", "0.6210045", "0.6199371", "0.6196634", "0.6189558", "0.61885196", "0.61761713", "0.6174053", "0.6172589", "0.6168354", "0.6165792", "0.61601025", "0.6160029", "0.61560434", "0.6149101", "0.6145214", "0.6144927", "0.61359763", "0.6133486", "0.61259556", "0.61232185", "0.6101662", "0.60939", "0.6083641", "0.60818136", "0.6061042", "0.6055673", "0.60554224", "0.6054475", "0.60469013", "0.6041492", "0.6038753", "0.603759", "0.6020941" ]
0.0
-1
/ Get All Transactions from database
@Override public List<Seq> getAll() { Connection conn = null; Statement stmt = null; List<Seq> listSeqs = new ArrayList<>(); try { String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; conn = DriverManager.getConnection(url); stmt = conn.createStatement(); ProcessesDAO pdao = new ProcessesDAO(); String sql = "select * from seq;"; ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { Seq seq = new Seq(rs.getInt("id"), pdao.getbyidentifier(rs.getString("identifier")), rs.getInt("seq_number")); listSeqs.add(seq); } rs.close(); } catch (SQLException e) { System.out.println(e.getMessage()); } finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } return listSeqs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Transaction> getAllTransactions();", "public List<Transaction> getAllTransactions(){\n Cursor cursor = fetchAllRecords();\n List<Transaction> transactions = new ArrayList<Transaction>();\n if (cursor != null){\n while(cursor.moveToNext()){\n transactions.add(buildTransactionInstance(cursor));\n }\n cursor.close();\n }\n return transactions;\n }", "public List<Transaction> getAllTransaction() throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(userDbManager.getUser(rs.getInt(\"uId\")));\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\n }", "@Override\n\tpublic List<Transaction> getAllTransactions() { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Transaction\");\n\t\tList<Transaction> expenses = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn expenses; \n\t}", "public ArrayList<Transaction> getTransactions() throws SQLException {\n return transactions.getAll();\n }", "public List<TransactionInfo> getAll() {\n return transactions;\n }", "public List<Transaction> readAllTransaction() throws TransactionNotFoundException {\n\t\treturn transactionDAO.listAccountTransactionTable();\n\t}", "@Transactional\n\tpublic Set<TransactionTable> findAllTransactions() {\n\t\t List<TransactionTable> list = new ArrayList<TransactionTable>();\n\t TypedQuery<TransactionTable> query = entityManager.createNamedQuery(\"TransactionTable.findAll\", TransactionTable.class);\n\t list = query.getResultList();\n\t Set<TransactionTable> TransactionSet = new HashSet<TransactionTable>(list);\n\t return TransactionSet;\n\t\n\t}", "@Override\n\tpublic List<BankTransaction> getAllTransactions() throws BusinessException {\n\t\tBankTransaction bankTransaction = null;\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tConnection connection;\n\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactionss\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tbankTransaction = new BankTransaction();\n\t\t\t\tbankTransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\tbankTransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\tbankTransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\tbankTransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\tbankTransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\tbankTransactionList.add(bankTransaction);\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"There is not data to retrieve\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some Error ocurred retrieving data for transactions\");\n\t\t}\n\t\t\n\t\treturn bankTransactionList;\n\t}", "public List<Transaction> getTransactions() throws SQLException {\n\t\tList<Transaction> result = new ArrayList<>();\n\t\tStatement statement = conn.createStatement();\n\t\ttry (ResultSet resultSet = statement.executeQuery(\"select Date, Amount, Category, Type from transaction\")) {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tresult.add(new Transaction(resultSet.getDate(1), resultSet.getDouble(2), resultSet.getString(3), resultSet.getString(4)));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Transactions getTransactions() {\n return Transactions;\n }", "public Transaction[] getTransactionsList() throws Exception;", "public ArrayList<Transaction> getActiveTransactions() throws SQLException {\n return transactions.getCurrent();\n }", "Map retrievePreparedTransactions();", "public Collection<CleaningTransaction> findAll();", "@Transactional(readOnly = true)\n public List<OrderTransactionDTO> findAll() {\n log.debug(\"Request to get all OrderTransactions\");\n return orderTransactionRepository.findAll().stream()\n .map(orderTransactionMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public List<TransactionInfo> list() {\n LOG.debug(\"loading all transaction info\");\n try {\n return getEditor().list();\n } catch (IOException e) {\n throw new CommandExecutionException(\"error occurred while loading transactions\", e);\n }\n }", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "public Iterator getTransactions() {\n return (transactions.listIterator());\n }", "java.util.List<com.google.protobuf.ByteString> getTransactionsList();", "public static Transaction[] transactionList(){\n int countFullPosition = 0;\n for (Transaction tr:transactions) {\n if(tr != null){\n countFullPosition++;\n }\n }\n if(countFullPosition == 0)\n return new Transaction[] {};\n // throw new InternalServerException(\"TransactionList is empty\");\n Transaction[] trList = new Transaction[countFullPosition];\n int index = 0;\n for (Transaction tr:transactions) {\n if(tr != null){\n trList[index] = tr;\n index++;\n }\n }\n return trList;\n }", "@Override\r\n\tpublic List<Transaction> getTransactions() {\n\t\treturn null;\r\n\t}", "public List findAll() {\n return findAll(TransactionItem.class);\n }", "public List<Transaction> getTransactionByUser(User user) throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail WHERE uId = ?\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, user.getId());\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(user);\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\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}", "@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return instance.getTransactions(index);\n }", "@Override\n\tpublic List<Transaction> getTransactions() {\n\t\treturn null;\n\t}", "private Collection<StorableTransaction> getTransactionList(Object body) {\r\n Collection<StorableTransaction> txs = new ArrayList<>();\r\n JsonObject data = (JsonObject) body;\r\n data.getJsonArray(ID_COLLECTION).forEach(json -> {\r\n StorableTransaction tx = Serializer.unpack((JsonObject) json, StorableTransaction.class);\r\n tx.setTimestamp(timestampFrom(data.getLong(ID_TIME)));\r\n txs.add(tx);\r\n });\r\n return txs;\r\n }", "@Override\n\t\tpublic List<AccountTransaction> findAll() {\n\t\t\treturn null;\n\t\t}", "Object[] getPendingTransactions(int count);", "List<String> getTransactionInfos() {\n\t\tList<String> result = new ArrayList<String>();\n\t\tfor (Transaction transaction : transactionLog.getTransactions()) {\n\t\t\tresult.add(transaction.toString());\n\t\t}\n\t\treturn result;\n\t}", "public List<List<Integer>> getTransactions() {\n return transactions;\n }", "@Override\n public List list() throws TransactionException {\n return hibernateQuery.list();\n }", "@java.lang.Override\n public java.util.List<com.google.protobuf.ByteString>\n getTransactionsList() {\n return transactions_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return transactions_.get(index);\n }", "protected ArrayList<Transaction> refreshTransactions() {\r\n\t\ttry {\r\n\t\t\tHttpResponse response = serverAccess.getAllTransactionsResponse();\r\n\t\t\tif (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\r\n\t\t\t\tString transactionsJson = EntityUtils.toString(response.getEntity());\r\n\t\t\t\tGson gson = new GsonBuilder().create();\r\n\t\t\t\tTransaction[] transactionArray = gson.fromJson(transactionsJson, Transaction[].class);\r\n\t\t\t\tArrayList<Transaction> transactionList = new ArrayList<Transaction>(Arrays.asList(transactionArray));\r\n\t\t\t\ttxtError.setText(\"\");\r\n\t\t\t\treturn transactionList;\r\n\t\t\t} else {\r\n\t\t\t\ttxtError.setText(EntityUtils.toString(response.getEntity()) + \" (Fehler: \"\r\n\t\t\t\t\t\t+ response.getStatusLine().getStatusCode() + \")\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttxtError.setText(\"Server nicht verfügbar\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Transaction> getTransactionsByAccountId(int accountId) throws SQLException {\n\t\tList<Transaction> tList = new ArrayList<>();\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from transaction_history where account_id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\twhile (rs.next()) {\n\t\t\tTransaction t = new Transaction(rs.getInt(2), rs.getString(3), rs.getDouble(4),rs.getTimestamp(5));\n\t\t\ttList.add(t);\n\t\t}\n\t\treturn tList;\n\t}", "public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "public List<CustomerPurchase> getAll() throws SQLException;", "@GetMapping(\"/rest\")\n\t\tpublic @ResponseBody List<Transaction> transactionsListRest() {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(username);\n\t\t\treturn (List<Transaction>) traRepo.findByUser(currentUser);\n\t\t}", "com.google.protobuf.ByteString getTransactions(int index);", "@Override\r\n\t@Transactional\r\n\tpublic ArrayList<Transactions> getClosedTransactions() {\r\n\r\n\t\tArrayList<Transactions> transactions = orderDao.getDeliveredTransactions();\r\n\t\tArrayList<Transactions> closedTransactions = new ArrayList<Transactions>();\r\n\t\t\r\n\t\tif(transactions!=null)\r\n\t\t{\r\n\t\t\tfor(Transactions transaction : transactions)\r\n\t\t\t{\r\n\t\t\t\tlog.debug(\"Transaction delivery time is of id = \" + transaction.getTransaction_id() + \"and time is \" + transaction.getDelivery_time());\r\n\t\t\t\tif(isCustomerSatisfied(transaction.getDelivery_time()))\r\n\t\t\t\t{\r\n\t\t\t\t\ttransaction.setStatus(\"CLOSED\");\r\n\t\t\t\t\tclosedTransactions.add(transaction);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn closedTransactions;\r\n\t}", "private void printAllTransactions(){\n Set<Transaction> transactions = ctrl.getAllTransactions();\n transactions.stream().forEach(System.out::println);\n }", "public lnrpc.Rpc.TransactionDetails getTransactions(lnrpc.Rpc.GetTransactionsRequest request) {\n return blockingUnaryCall(\n getChannel(), getGetTransactionsMethod(), getCallOptions(), request);\n }", "@Override\r\n\tpublic List<Trainee> getAll() {\n\t\treturn dao.getAll();\r\n\t}", "@Override\n\tpublic List<BankTransaction> getAllTransactionsById(int account_id) throws BusinessException {\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tBankTransaction transaction = null;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactions where account_id=?\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\tpreparedStatement.setInt(1, account_id);\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\ttransaction = new BankTransaction();\n\t\t\t\ttransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\ttransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\ttransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\ttransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\ttransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\t\n\t\t\t\tbankTransactionList.add(transaction);\n\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"No data for accounts\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new BusinessException(\"Some exception retrieving tha data has occurred in transactions\");\n\t\t}\n\t\treturn bankTransactionList;\n\t}", "@java.lang.Override\n public java.util.List<com.google.protobuf.ByteString>\n getTransactionsList() {\n return java.util.Collections.unmodifiableList(\n instance.getTransactionsList());\n }", "@GET(\"points-transaction-history?expand=translations&sort=-created_at\")\n Call<HistoryExchangeResponse> getTransactionHistoryAll();", "private static List<Transaction> toTransactions(AppBlock appBlock) {\n List<AppBlock.TransactionObject> transactionResults = appBlock.getBlock().getBody().getTransactions();\n List<Transaction> transactions = new ArrayList<Transaction>(transactionResults.size());\n for (AppBlock.TransactionObject transactionResult: transactionResults) {\n transactions.add((Transaction) transactionResult.get());\n }\n return transactions;\n }", "public TransactionResp transaction_list() throws Exception {\n String s = main(\"transaction_list\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, TransactionResp.class);\n }", "public List<Transaction> readByTransactionId(int transactionId) throws TransactionNotFoundException {\n\t\treturn transactionDAO.selectByTransactionId(transactionId);\n\t}", "public Cursor fetchAllTransactionsForAccount(long accountID){\n\t\treturn fetchAllTransactionsForAccount(getAccountUID(accountID));\n\t}", "public HashMap<Integer, ArrayList<PerformanceTransaction>> getTransactions() {\n\t\t//return this.transactions;\n\t\treturn this.transactions;\n\t}", "public ArrayList<Integer> getAllTransactionsID(){\n return allTransactionsID;\n }", "public ArrayList<Transaction> GetUserTransactions(int UserID);", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.TransactionDetails> getTransactions(\n lnrpc.Rpc.GetTransactionsRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request);\n }", "public List<Item> getAll() {\r\n List<Item> list = new ArrayList<Item>();\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n list = session.createQuery(\"from Item\").list();\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n //session.flush();\r\n session.close();\r\n }\r\n return list;\r\n }", "public List<Buy> getAll() throws PersistException;", "List<Bill> all() throws SQLException;", "List<Trade> getAllTrades();", "public List<Transaction> checkTransactions(List<Transaction> transactions) {\r\n List<Transaction> transactionList = new ArrayList<Transaction>();\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n for(Transaction trans : transactions) {\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE trans.transdate = :transdate AND trans.amount = :amount AND trans.vendor = :vendor AND trans.account.uid = :accountuid\");\r\n q.setParameter(\"transdate\", trans.getTransdate());\r\n q.setParameter(\"amount\", trans.getAmount());\r\n q.setParameter(\"vendor\", trans.getVendor());\r\n Account acct = trans.getAccount();\r\n q.setParameter(\"accountuid\", acct.getUid());\r\n List<Transaction> foundTransactions = (List<Transaction>) q.list();\r\n if (foundTransactions.isEmpty()) {\r\n transactionList.add(trans);\r\n }\r\n }\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n return transactionList;\r\n }", "public List obtenerTrabajadores() throws DAOException\n {\n TransactionContext tx = null;\n List lista = null;\n try{\n tx = new TransactionContext();\n TrabajadorDAO trabajadorDAO = new TrabajadorDAO(tx);\n lista = trabajadorDAO.obtenerTrabajadores();\n tx.close();\n tx = null;\n }catch(Exception e){\n if(tx != null) {\n try {\n tx.close();\n tx = null;\n }catch(Exception ignore){}\n }\n throw new DAOException(e);\n }\n return lista;\n }", "public Set<Transaction> getTransactionsByLotId(Integer id) throws MiddlewareQueryException;", "@Override\r\n\t@Transactional\r\n\tpublic Transactions getTransaction() {\r\n\r\n\t\tArrayList<Transactions> closedTransactions=null;\r\n\t\tif(closedTransactions == null)\r\n\t\t{\r\n\t\tclosedTransactions = new ArrayList<Transactions>();\r\n\t\tclosedTransactions = this.getClosedTransactions();\r\n\t\t}\r\n\r\n\r\n\t\tif (index < closedTransactions.size()) {\r\n\t\t\tTransactions transaction = closedTransactions.get(index++);\r\n\t\t\treturn transaction;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static List<Transaction> openTransactionDatabase(TransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}", "public Map<LocalDate, Transactions> getTransactionsList(){\n return listOfTransactions;\n }", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}/transactionses\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<Transactions> getReservationTransactionses(@PathVariable Integer reservation_reservationId) {\n\t\treturn new java.util.ArrayList<Transactions>(reservationDAO.findReservationByPrimaryKey(reservation_reservationId).getTransactionses());\n\t}", "public List<Transaction> getAvailableTransactions(String workerId){\r\n return dao.getAvailableTransactions(workerId);\r\n }", "List<TransactionType> listClientTransactionTypes();", "@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }", "public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "public void deleteAllTransactions();", "public List<TransactionM> getTransactionsInfo(int fId) {\n\t\tList<TransactionM> d= new ArrayList<>();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tthis.pst = this.con.prepareStatement(\"select * from transaction where fromaccno=? ORDER BY balance LIMIT 0,5\"); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.pst.setInt(1,fId);\r\n\t\t\tthis.rs = this.pst.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\td.add(new TransactionM(rs.getInt(1),rs.getInt(2),rs.getInt(3),rs.getInt(4))) ;\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\r\n\t\treturn d;\r\n\t}", "@JsonProperty(\"transaction\")\n public List<Transaction> getTransactionList() {\n return this.transactionList;\n }", "public List<Transaction> readByAccountId(int accountId) throws TransactionNotFoundException {\n\t\treturn transactionDAO.selectByAccountId(accountId);\n\t}", "Transaction getCurrentTransaction();", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\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 }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Customer> getCustomerFindAll() {\n return em.createNamedQuery(\"Customer.findAll\", Customer.class).getResultList();\n }", "List<TbCrmTask> selectAll();", "@Transactional(readOnly = true)\n Collection<DataRistorante> getAll();", "public List<Transactiontype> getAllTxnTypes()\r\n throws Exception {\r\n\r\n List<Transactiontype> txnTypeList = null;\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Transactiontype as s order by Upper(s.description) asc\";\r\n Query query = session.createQuery(sql);\r\n txnTypeList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return txnTypeList;\r\n }", "@Override\r\n\tpublic ArrayList<Activitat> getAll() {\r\n\t\tint i = 0;\r\n\t\tqueryString = \"SELECT * FROM \" + ACTIVITATTABLENAME;\r\n\t\tArrayList<Activitat> llistaActivitats = null;\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\tResultSet rs = s.executeQuery();\r\n\t\t\tllistaActivitats = new ArrayList<Activitat>();\r\n\t\t\tActivitatFactory af = af = new ActivitatFactory();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tCalendar cal = new GregorianCalendar();\r\n\t\t\t\tcal.setTime(rs.getDate(4));\r\n\t\t\t\t\r\n\t\t\t\tllistaActivitats.add(af.creaActivitat(rs.getString(2), rs.getString(3), cal, rs.getTimestamp(5),rs.getString(6),rs.getBoolean(7)));\r\n\t\t\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\treturn llistaActivitats;\r\n\t}", "private Deque<JooqTransaction> transactions() {\n Deque<JooqTransaction> result = transactionDeques.get();\n\n if (result == null) {\n result = new ArrayDeque<>();\n transactionDeques.set(result);\n }\n\n return result;\n }", "@Override\n @Transactional\n public List<Contacts> findAll() {\n Session currentSession = entiyManager.unwrap(Session.class);\n\n //create the query\n\n Query<Contacts> theQuery = currentSession.createQuery(\"from Contacts\", Contacts.class);\n\n //execute query and get result list\n\n List<Contacts> contacts = theQuery.getResultList();\n\n //return the results\n\n return contacts;\n }", "public static void getTransactionsAndDeleteAfterCancel() {\n // get DB helper\n mDbHelper = PointOfSaleDb.getInstance(context);\n\n // Each row in the list stores amount and date of transaction -- retrieves history from DB\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // get the following columns:\n String[] tableColumns = { PointOfSaleDb.TRANSACTIONS_COLUMN_CREATED_AT,\n \"_ROWID_\"};// getting also _ROWID_ to delete the selected tx\n\n String sortOrder = PointOfSaleDb.TRANSACTIONS_COLUMN_CREATED_AT + \" DESC\";\n Cursor c = db.query(PointOfSaleDb.TRANSACTIONS_TABLE_NAME, tableColumns, null, null, null, null, sortOrder);\n //moving to first position to get last created transaction\n if(c.moveToFirst()) {\n int rowId = Integer.parseInt(c.getString(1));\n\n String selection = \"_ROWID_\" + \" = ? \";\n String[] selectionArgs = {String.valueOf(rowId)};\n int count = db.delete(PointOfSaleDb.TRANSACTIONS_TABLE_NAME, selection, selectionArgs);\n\n //send broadcast to update view\n sendBroadcast();\n }\n\n }", "@GET\n @Path(\"public/transactions/{CurrencyPair}\")\n GatecoinTransactionResult getTransactions(\n @PathParam(\"CurrencyPair\") String CurrencyPair,\n @QueryParam(\"Count\") int Count,\n @QueryParam(\"TransactionId\") long TransactionId\n ) throws IOException, GatecoinException;", "public long countAllWithdrawalTransactions() throws MiddlewareQueryException;", "@Override\n\t@Transactional\n\tpublic List<Customer> getAll() {\n\t\tList<Customer> loadAll = hibernateTemplate.loadAll(Customer.class);\n\t\treturn loadAll;\n\t}", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "@Transactional\r\n\tpublic List<Tweet> getAllTweets() {\n\t\tList<Tweet> tweets = tweetRepository.findAll(Sort.by(Sort.Direction.DESC, \"postDTTM\"));\r\n\t\treturn tweets;\r\n\t}", "List<T> getAll() throws PersistException;", "public List<Calificar> comentarios(){\n List<Calificar> comentarios = null;\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n \n try{\n \n tx = session.beginTransaction();\n String hql = \"from Calificar\";\n Query query = session.createQuery(hql);\n comentarios = (List<Calificar>)query.list();\n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return comentarios;\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<CustomerOrder> getCustomerOrderFindAll() {\n return em.createNamedQuery(\"CustomerOrder.findAll\", CustomerOrder.class).getResultList();\n }", "List<TmpUserPayAccount> selectAll();", "public Iterator getTransactions(Calendar date) {\n List result = new LinkedList();\n for (Iterator iterator = transactions.iterator(); iterator.hasNext();) {\n Transaction transaction = (Transaction) iterator.next();\n if (transaction.onDate(date)) {\n result.add(transaction);\n }\n }\n return (result.iterator());\n }", "public ArrayList<Purchase> getTransactionList()\r\n\t{\r\n\t\t\r\n\t\treturn transactionList;\r\n\t\t\r\n\t}", "List<TransportEntity> getAllEntityOfQuery();", "public List<TreateWait> queryAll() {\n\t\tQuery query = Query.query(Criteria.where(\"id\").exists(true));\n\t\treturn treateWaitDao.queryList(query);\n\t\t\n\t}", "@Override\n\tpublic List findAll()\n\t{\n\t\treturn teataskMapper.findAll();\n\t}", "@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}" ]
[ "0.8463736", "0.81969374", "0.8117521", "0.80256116", "0.7887686", "0.78512406", "0.7786291", "0.765574", "0.76404136", "0.7638676", "0.75803673", "0.74309605", "0.7301221", "0.7144813", "0.7116727", "0.71103674", "0.7069469", "0.70500594", "0.7048989", "0.7016193", "0.69304186", "0.6800004", "0.67863125", "0.67768526", "0.6713361", "0.66843987", "0.6684239", "0.6679516", "0.6669045", "0.6634573", "0.6608474", "0.6593671", "0.65917754", "0.65601313", "0.65207833", "0.65188545", "0.6503202", "0.6499305", "0.6492144", "0.6472201", "0.6471749", "0.6444685", "0.6423357", "0.64069885", "0.6372877", "0.637067", "0.63693804", "0.6365448", "0.6365132", "0.635472", "0.63506067", "0.6345972", "0.63455755", "0.6345365", "0.6322779", "0.63050884", "0.6299815", "0.62355655", "0.6200553", "0.6182088", "0.61584127", "0.61553586", "0.6149559", "0.6143454", "0.61354387", "0.612203", "0.61204404", "0.6108128", "0.6099678", "0.6088054", "0.6080849", "0.6076708", "0.60722196", "0.6071318", "0.6070321", "0.60544896", "0.6048906", "0.6046463", "0.60387766", "0.6038133", "0.6012332", "0.6005229", "0.5991869", "0.59913766", "0.59892476", "0.5983518", "0.59826034", "0.5974072", "0.59685117", "0.59663135", "0.5949334", "0.5948323", "0.5938334", "0.59338444", "0.5928181", "0.5925647", "0.59226906", "0.5918717", "0.5904932", "0.5892894", "0.588201" ]
0.0
-1
/ Save a Transaction into a database
@Override public void save(Seq s) { // TODO Auto-generated method stub //Establish cnx Connection conn = null; String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; try { conn = DriverManager.getConnection(url); PreparedStatement myStmt; String query = "insert into seq(identifier, seq_number) values(?,?)"; myStmt = conn.prepareStatement(query); // Set Parameters myStmt.setString(1, s.getProcess().getIdentifier()); myStmt.setInt(2, s.getSeq_number()); // Execute SQL query int res = myStmt.executeUpdate(); // Display the record inserted System.out.println(res + " Seq inserted\n"); // Close the connection conn.close(); }catch (SQLException e) { System.out.println(e.getMessage());} finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Transaction save(Transaction transaction);", "void commit(Transaction transaction);", "void commitTransaction();", "@Override\n\tpublic void createTransaction(Transaction t) { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction(); \n\n\t\t/* save */ \n\t\tsession.save(t);\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\t}", "public void saveOrUpdate(Transaction transaction) throws Exception;", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "public void createTransaction(Transaction trans);", "int insert(Transaction record);", "public void commitTransaction() {\n\r\n\t}", "public void saveTransaction(Transaction transaction) {\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n // don't save \"duplicate\" transactions\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE trans.transdate = :transdate AND trans.amount = :amount AND trans.vendor = :vendor AND trans.account.uid = :accountuid\");\r\n q.setParameter(\"transdate\", transaction.getTransdate());\r\n q.setParameter(\"amount\", transaction.getAmount());\r\n q.setParameter(\"vendor\", transaction.getVendor());\r\n Account acct = transaction.getAccount();\r\n q.setParameter(\"accountuid\", acct.getUid());\r\n List<Transaction> transactionList = (List<Transaction>) q.list();\r\n if (transactionList.isEmpty()) {\r\n session.save(transaction);\r\n }\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }", "@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}", "Transaction createTransaction();", "public void updateTransaction(Transaction trans);", "public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }", "public void commit();", "protected abstract boolean commitTxn(Txn txn) throws PersistException;", "@Override\n public void commitTx() {\n \n }", "void commit();", "void commit();", "Transaction beginTx();", "void addTransaction(Transaction transaction) throws SQLException, BusinessException;", "void beginTransaction();", "public static void establecerTransaccion() throws SQLException {\n con.commit();\n }", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "public void commitTransaction() throws TransactionException {\n\t\t\r\n\t}", "public TransactionalElement<E> commit();", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "public static boolean saveTransaction(Transaction transaction, TransactionType transactionType) {\r\n\t\tdbConnect();\r\n\t\tPreparedStatement stmt = null;\r\n\t\tboolean isTransactionOk = true;\r\n\r\n\t\t// Format Transaction Date for mysql\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t// Could also use java.sql.Date\r\n\t\t// java.sql.Date dat = new java.sql.Date(date.getTime());\r\n\r\n\t\t// Get purchase ClientId if existing and insert if client is new\r\n\t\tint purchaseClientId = getClientId(transaction.getNameOfClient(), transactionType);\r\n\t\tif (purchaseClientId == 0) {\r\n\t\t\tClient newClient = createNewClient(new Client(0, \"'\" + transaction.getNameOfClient() + \"'\", null, null),\r\n\t\t\t\t\ttransactionType);\r\n\t\t\tpurchaseClientId = newClient.getClientId();\r\n\t\t}\r\n\r\n\t\tfinal String INSERT_NEW_TRANSACTION;\r\n\t\t// Insert to purchase table\r\n\t\tif (transactionType == TransactionType.PURCHASE) {\r\n\t\t\tINSERT_NEW_TRANSACTION = \"INSERT INTO purchase (purchase_id, purchase_date, purchase_client_id, purchase_payment)\"\r\n\t\t\t\t\t+ \" VALUES (\" + transaction.getTransactionNumber() + \",'\" + sdf.format(date) + \"',\"\r\n\t\t\t\t\t+ purchaseClientId + \",\" + transaction.getTotalAmount() + \")\";\r\n\t\t} else {\r\n\t\t\tINSERT_NEW_TRANSACTION = \"INSERT INTO sales (sales_id, sales_date, sales_client_id, sales_payment)\"\r\n\t\t\t\t\t+ \" VALUES (\" + transaction.getTransactionNumber() + \",'\" + sdf.format(date) + \"',\"\r\n\t\t\t\t\t+ purchaseClientId + \",\" + transaction.getTotalAmount() + \")\";\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tstmt = conn.prepareStatement(INSERT_NEW_TRANSACTION);\r\n\t\t\tstmt.execute();\r\n\t\t\tstmt.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tisTransactionOk = false;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// Insert to product_transaction table\r\n\t\tboolean isProductTransactionOk = saveProductTransactions(\r\n\t\t\t\t(transactionType == TransactionType.PURCHASE ? transaction.getTransactionNumber() : 0),\r\n\t\t\t\ttransaction.getProductList(),\r\n\t\t\t\t(transactionType == TransactionType.RETAIL ? transaction.getTransactionNumber() : 0));\r\n\r\n\t\t// Update Product Stock Quantity in product table\r\n\t\tboolean isInventoryStockOk = updateInventoryStock(transaction.getProductList(), transactionType);\r\n\r\n\t\treturn isTransactionOk && isProductTransactionOk && isInventoryStockOk;\r\n\t}", "Transaction createTransaction(Settings settings);", "@Override\r\n\tpublic void save(Connection connection, Salary salary) throws SQLException {\n\r\n\t}", "void commit( boolean onSave );", "void startTransaction();", "private void storeTransactionToDatabase(final String clientId, final String earnedOrSpent, final String amountGiven, String sourceGiven, String descriptionGiven) {\n Transaction transaction = new Transaction(clientId, earnedOrSpent, amountGiven, sourceGiven, descriptionGiven, String.valueOf(date.getTime()));\n try {\n String transactionId = UUID.randomUUID().toString();\n DatabaseReference database = FirebaseDatabase.getInstance().getReference(\"Transactions/\" + transactionId);\n database.setValue(transaction).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n updateCurrentBalance(earnedOrSpent, clientId, amountGiven);\n Log.d(\"NewTransactionActivity\", \"Successfully added Transaction to Database\");\n } else {\n Log.d(\"NewTransactionActivity\", \"Failed to add Transaction to Database\");\n }\n }\n });\n }catch(Exception e){\n Log.d(\"NewTransactionActivity\", e.toString());\n }\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "IDbTransaction beginTransaction();", "public void beginTransaction() throws Exception;", "public abstract void commit();", "void rollbackTransaction();", "@Override\n\tpublic int createTransaction(BankTransaction transaction) throws BusinessException {\n\t\tint tran = 0;\n\t\t\n\t\ttry {\n\t\t\tConnection connection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"insert into dutybank.transactions (account_id, transaction_type, amount, transaction_date) values(?,?,?,?)\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\t\n\t\t\tpreparedStatement.setInt(1, transaction.getAccountid());\n\t\t\tpreparedStatement.setString(2, transaction.getTransactiontype());\n\t\t\tpreparedStatement.setDouble(3, transaction.getTransactionamount());\n\t\t\tpreparedStatement.setDate(4, new java.sql.Date(transaction.getTransactiondate().getTime()));\n\n\t\t\t\n\t\t\ttran = preparedStatement.executeUpdate();\n\t\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some internal error has occurred while inserting data\");\n\t\t}\n\t\t\n\n\t\treturn tran;\n\t}", "@Override\n public void commitTransaction() {\n try {\n connection.commit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't commit transaction \", e);\n } finally {\n closeConnection();\n }\n }", "void insert(PaymentTrade record);", "void commitTransaction(ConnectionContext context) throws IOException;", "@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}", "@Override\n public void commit() throws SQLException {\n if (isTransActionAlive() && !getTransaction().getStatus().isOneOf(TransactionStatus.MARKED_ROLLBACK,\n TransactionStatus.ROLLING_BACK)) {\n // Flush synchronizes the database with in-memory objects in Session (and frees up that memory)\n getSession().flush();\n // Commit those results to the database & ends the Transaction\n getTransaction().commit();\n }\n }", "public void commitTransaction() throws SQLException {\n dbConnection.commit();\n }", "public void insert(UsersTransaction transaction) throws DBException {\n\t\tConnection con = null;\n\t\tPreparedStatement pst = null;\n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"insert into transaction_details (id,donor_id,fund_id,amount_funded) values ( ?,?,?,?)\";\n\t\t\tpst = con.prepareStatement(sql);\n\t\t\tpst.setInt(3, transaction.getFundRequestId());\n\t\t\tpst.setInt(2, transaction.getDonorId());\n\t\t\tpst.setInt(1, transaction.getTransactionId());\n\t\t\tpst.setDouble(4, transaction.getTargetAmount());\n\t\t\tint rows = pst.executeUpdate();\n\t\t\tLogger.info(\"No of rows inserted :\" + rows);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DBException(\"unable to insert rows\");\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t}", "public Receipt recordTransaction(Transaction t) throws RemoteException;", "public void forceCommitTx()\n{\n}", "protected abstract Transaction createAndAdd();", "void commit(Session session);", "@Transactional\n\t@Override\n\tpublic Paradero save(Paradero t) throws Exception {\n\t\treturn paraderoRespository.save(t);\n\t}", "@Override\n public void saveTransactionDetails(TransactionInfo transactionInfo) {\n repositoryService.saveTransactionDetails(transactionInfo);\n update(\"transactions\", String.class, TransactionInfo.class, LocalDateTime.now().toString(), transactionInfo);\n }", "@Override\r\n\tpublic void salvar(Plano t) {\n\t\tEntityManager em = new Conexao().getInstance();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(t);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}", "@Override\n public void rollbackTx() {\n \n }", "public int startTransaction();", "Transaction getCurrentTransaction();", "public static Transaction commit(String database) throws SQLException {\n HashMap<String, Transaction> transactions = instance.getTransactions();\n Transaction transaction = transactions.get(database);\n if (transaction != null) {\n transaction.commit();\n } else {\n ensureConfigured(database);\n }\n return transaction;\n }", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "public void commit() {\n doCommit();\n }", "public void commit() {\n }", "public void rollbackTx()\n\n{\n\n}", "public void saveTransactions(List<Transaction> transactions) {\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n for(Transaction trans : transactions) {\r\n // don't save \"duplicate\" transactions\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE trans.transdate = :transdate AND trans.amount = :amount AND trans.vendor = :vendor AND trans.account.uid = :accountuid\");\r\n q.setParameter(\"transdate\", trans.getTransdate());\r\n q.setParameter(\"amount\", trans.getAmount());\r\n q.setParameter(\"vendor\", trans.getVendor());\r\n Account acct = trans.getAccount();\r\n q.setParameter(\"accountuid\", acct.getUid());\r\n List<Transaction> transactionList = (List<Transaction>) q.list();\r\n if (transactionList.isEmpty()) {\r\n session.save(trans);\r\n }\r\n }\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }", "public void commit(){\n \n }", "void commit(String tpcid);", "@Override\r\n\tpublic void save(XftPayment xtp) {\n\t\ttry {\r\n\t\t\tlogger.info(\"save..........servicr.....:\"+JSONUtils.beanToJson(xtp));\t\r\n\t\t\txftPaymentMapper.insert(xtp);\r\n\t\t}catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void commitTransaction(long id) throws RelationException;", "public void commitEntity();", "public void doSave(T objectToSave) throws SQLException;", "private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}", "@Transactional\n DataRistorante insert(DataRistorante risto);", "void endTransaction();", "public void beginTransaction() {\n\r\n\t}", "void rollback(Transaction transaction);", "int insertBet(Account account, Bet bet) throws DAOException;", "private void commitTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().commit();\n }\n }", "int insert(PurchasePayment record);", "public void commitTransaction() {\n final EntityTransaction entityTransaction = em.getTransaction();\n if (!entityTransaction.isActive()) {\n entityTransaction.begin();\n }\n entityTransaction.commit();\n }", "private static boolean commitTransaction(int trans_id) {\n Transaction txn = null;\n if (transactions.containsKey(trans_id))\n txn = transactions.get(trans_id);\n else\n return false;\n\n if (txn != null)\n txn.commit();\n\n return true;\n }", "protected void save(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.save(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute save\");\n\t\t}\n\t}", "@Override\n\tpublic int newTransaction(String username, long amount, String type, String message) {\n\t\ttry {\n\t\t\tdb.getTransaction().begin();\n\t\t\tTransaction trans = new Transaction(username, amount, type, message);\n\t\t\tdb.persist(trans);\n\t\t\tdb.getTransaction().commit();\n\t\t\treturn trans.getId();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Upps, Something happened in the database\");\n\t\t\treturn -1;\n\t\t}\n\t}", "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 }", "void save(Account account);", "void commit() throws CommitException;", "public void addTransaction(Transaction trans)\n {\n SolrInputDocument solr_doc = new SolrInputDocument();\n solr_doc.setField(\"type\",\"Transaction\");\n solr_doc.setField(\"hashBlock\",trans.getHashBlock());\n solr_doc.setField(\"trans_id_split\",trans.getTrans_id_split());\n solr_doc.setField(\"transaction_id\",trans.getTransaction_id());\n solr_doc.setField(\"transaction_fee\",trans.getTransaction_fee());\n solr_doc.setField(\"transaction_size_kb\",trans.getTransaction_size_kb());\n solr_doc.setField(\"from_amout\",trans.getFrom_amout());\n solr_doc.setField(\"to_amount\",trans.getTo_amount());\n\n try {\n client.add(solr_doc);\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n\n commit();\n\n }", "public void DoTransaction(TransactionCallback callback) {\r\n Transaction tx = _db.beginTx();\r\n try {\r\n callback.doTransaction();\r\n tx.success();\r\n } catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Failed to do callback transaction.\");\r\n\t\t\tex.printStackTrace();\r\n\t\t\ttx.failure();\r\n\t\t} finally {\r\n\t\t\ttx.finish();\r\n tx.close();\r\n\t\t}\r\n }", "void setTransactionSuccessful();", "public void persist(final Object obj) throws TransactionException {\n txTemplate.execute(new TransactionCallbackWithoutResult() {\n @Override\n public void doInTransactionWithoutResult(TransactionStatus status) {\n getHibernateTemplate().saveOrUpdate(obj);\n }\n });\n }", "long save(T item) throws DaoException;", "int insert(Payment record);", "void save(Bill bill);", "public void commit(Transaction t) {\n\t\ttry {\n\t\t\tArrayList<Record> records = new ArrayList<Record>();\n\t\t\tfor (int i = 0; i < t.noOfBundles; i++) {\n\t\t\t\tString record = \"\";\n\t\t\t\tBundle b = t.bundles[i];\n\t\t\t\tbyte[] recd = b.data;\n\t\t\t\trecord = new String(recd);\n\t\t\t\tString rec[] = record.split(\"\\n\");\n\t\t\t\tRecord r = new Record();\n\t\t\t\tr.rowid = Long.parseLong(rec[0]);\n\t\t\t\tr.groupid = rec[1];\n\t\t\t\tr.key = rec[2];\n\t\t\t\tr.value = rec[3];\n\t\t\t\tr.user = rec[4];\n\t\t\t\tr.datatype = rec[5];\n\t\t\t\tr.timestamp = Long.parseLong(rec[6]);\n\t\t\t\tr.synced = \"Y\";\n\t\t\t\tif (r.datatype.equals(\"file\")) {\n\t\t\t\t\tint l = Integer.parseInt(r.value.substring(0,\n\t\t\t\t\t\t\tr.value.indexOf(' ')));\n\t\t\t\t\tString fileName = r.value\n\t\t\t\t\t\t\t.substring(r.value.indexOf(' ') + 1);\n\t\t\t\t\tfileName = deviceId + \"_\" + t.transactionId + \"_\" + i + \"_\"\n\t\t\t\t\t\t\t+ fileName;\n\t\t\t\t\tString path = storagePath + \"/\" + fileName;\n\t\t\t\t\tFile f = new File(path);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(f);\n\t\t\t\t\tfor (int j = 1; j <= l; j++) {\n\t\t\t\t\t\tb = t.bundles[i + j];\n\t\t\t\t\t\tfos.write(b.data);\n\t\t\t\t\t}\n\t\t\t\t\tfos.close();\n\t\t\t\t\ti += l;\n\t\t\t\t\tr.value = path;\n\t\t\t\t}\n\t\t\t\trecords.add(r);\n\t\t\t}\n\t\t\tdh.putToRepository(records);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int Trans1(Long userid,Long amount,Double price,Double comp_id)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+amount+\",'sale','self',\"+comp_id+\",\"+price+\")\");\r\n\treturn i;\r\n}", "UserOrder save(UserOrder order);", "public void commitTransaction(Connection con){\n try {\n con.commit();\n con.setAutoCommit(true);\n con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);\n } catch (SQLException e) {\n try {\n con.rollback();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n }\n }", "@Override\n public void commit() {\n }", "public void save(E entity){\n transaction.begin();\n entityManager.persist(entity);\n transaction.commit();\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}", "@Override\r\n\tpublic int addTran(Transaction transaction) throws Exception {\n\t\t\t\t\r\n\t\treturn tranDao.insertTran(transaction);\r\n\t}", "public void save(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//session.save(obj);\n\t\tsession.persist(obj);\n\t}", "public Transaction createTransaction(Credentials user, TransactionType tt) throws RelationException;", "public void persistToDatabase(Stock stock, int id) throws ParseException {\n\n\n // Creating the config instance & passing the hibernate config file.\n Configuration config = new Configuration();\n config.configure(\"hibernate.cfg.xml\");\n\n // Session object to start the db transaction.\n Session s = config.buildSessionFactory().openSession();\n\n // Transaction object to begin the db transaction.\n Transaction t = s.beginTransaction();\n\n Stock_infoDAO stock_infoDAO = new Stock_infoDAO();\n stock_infoDAO.setId(id);\n stock_infoDAO.setSymbol(stock.getSymbol());\n BigDecimal price = new BigDecimal(stock.getPrice());\n stock_infoDAO.setPrice(price);\n\n String inDate= stock.getTime();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Timestamp ts = new Timestamp(((java.util.Date)dateFormat.parse(inDate)).getTime());\n stock_infoDAO.setTime(ts);\n\n\n // Saving the stockinfo object to the db.\n s.persist(stock_infoDAO);\n\n // Committing the transaction in the db.\n t.commit();\n\n System.out.println(\"\\n===================\\n\");\n\n\n // Closing the session object.\n s.close();\n }" ]
[ "0.8357147", "0.7535662", "0.7514782", "0.74051464", "0.72096187", "0.69924146", "0.696304", "0.69442666", "0.6910661", "0.68904287", "0.67936236", "0.67878956", "0.67872524", "0.6769175", "0.66904896", "0.6689252", "0.6660041", "0.66265416", "0.66265416", "0.6597348", "0.6590702", "0.65684813", "0.65502983", "0.6542538", "0.6529768", "0.65276057", "0.6490016", "0.6489142", "0.6459755", "0.6448172", "0.64456445", "0.63815314", "0.6374055", "0.63614434", "0.63555294", "0.63497084", "0.63450253", "0.6343222", "0.6335379", "0.6316702", "0.6305422", "0.62702143", "0.62635195", "0.62363404", "0.6227783", "0.6216227", "0.6215022", "0.6201371", "0.6200871", "0.6164381", "0.6140879", "0.6135154", "0.6132718", "0.6122089", "0.612098", "0.61131185", "0.6112956", "0.61116946", "0.61036724", "0.61006916", "0.60990834", "0.60943997", "0.6090418", "0.6090219", "0.6087204", "0.6086168", "0.60806197", "0.6078047", "0.60700417", "0.6063618", "0.6045874", "0.6044448", "0.60412204", "0.6034954", "0.6029924", "0.6024696", "0.6020381", "0.60196215", "0.6007181", "0.6006605", "0.5993548", "0.5985864", "0.5972735", "0.5951572", "0.5948954", "0.59489053", "0.59326434", "0.59236485", "0.5913382", "0.59102815", "0.5897063", "0.5893789", "0.5891617", "0.58856994", "0.58845633", "0.58810663", "0.5870936", "0.58706665", "0.5851657", "0.58496344", "0.58489376" ]
0.0
-1
TODO Autogenerated method stub Establish cnx
public void create_seq(String identifier) { Connection conn = null; String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; try { conn = DriverManager.getConnection(url); PreparedStatement myStmt; String query = "insert into seq(identifier, seq_number) values(?,?)"; myStmt = conn.prepareStatement(query); // Set Parameters myStmt.setString(1, identifier); myStmt.setInt(2, 0); // Execute SQL query int res = myStmt.executeUpdate(); // Display the record inserted System.out.println(res + " Seq Created Successfully \n"); // Close the connection conn.close(); }catch (SQLException e) { System.out.println(e.getMessage());} finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Object> getXNetComponent() {\n if (!init()) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetComponent():Initialization failed.\");\n return null;\n }\n Map<String, Object> xnetComp = new HashMap<>();\n xnetComp.put(\"XNETStarted\", false);\n ActiveMQComponent amqComp = null;\n //SEHR XNET root is a top level domain that ties SEHR communities together\n InitialContext ic;\n try {\n ic = new InitialContext();\n this.camelContext = (CamelContext) ic.lookup(\"XNetContext\");\n if (this.camelContext != null && this.camelContext.getStatus().isStarted()) {\n if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetrooturl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xroot\");\n xnetComp.put(\"XNETLevel\", \"xroot\");\n if (amqComp != null) {\n //We can send messages to a LC queue;\n //Reading from a LC queue depends on the app the card holder uses;\n //The holder has to login and be verified to get his messages;\n //The 'xroot' configuration allows this CAS module to send \n //messages out to the SEHR world using this camel context;\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetcountryurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xctry\");\n xnetComp.put(\"XNETLevel\", \"xctry\");\n if (amqComp != null) {\n //It seems to be that we can send messages to a national LC queue\n //But this depends on the configuration of the country broker\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' also\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetdomainurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xdom\");\n xnetComp.put(\"XNETLevel\", \"xdom\");\n if (amqComp != null) {\n //It seems to be that we can send messages to a LC queue for the \n //whole managed domain\n //To send dmessages to a LC queue depends on the broker settings\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' or 'xctry'\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetzoneurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xzone\");\n xnetComp.put(\"XNETLevel\", \"xzone\"); //the bottom level\n if (amqComp != null) {\n //There is a local broker (of the zone, the community level, WAN)\n //To send dmessages to other LC queues depends on the broker \n //settings\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' otherwise there\n //will be no interchange with patients outside of the zone\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n }\n xnetComp.put(\"ActiveMQComponent\", amqComp);\n } else {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetComponent():No routing (Camel) context.\");\n xnetComp.put(\"ActiveMQStatus\", \"No routing context.\");\n }\n\n } catch (NamingException ex) {\n Log.warning(LifeCARDAdmin.class.getName() + \":getXNetComponent():\" + ex.getMessage());\n }\n// //Finally check if this zone (this SEHR-CAS is running for) has centers \n// //that have registered the LifeCARD service (module) to use the XNET for \n// //exchanging data (of/to/with the patient).\n// List<NetCenter> list = getServiceCenter(Integer.parseInt(p.getProperty(\"zoneID\", \"0\")));\n// xnetComp.put(\"ListLCServiceCenter\", list);\n\n return xnetComp;\n }", "protected IXConnection getConnection() {\n return eloCmisConnectionManager.getConnection(this.getCallContext());\n }", "public Connection xcon(){\n Connection cn =null;\n try{\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cn = DriverManager.getConnection(\"jdbc:sqlserver://10.60.41.30:1433;databaseName=Northwind;\",\"idat\",\"123456\");\n if(cn!=null){\n JOptionPane.showMessageDialog(null, \"Estás conectado\");\n }\n }catch(Exception error){\n JOptionPane.showMessageDialog(null, error);\n }\n \n return cn;\n }", "public String getCAdxWebServiceXmlCCAddress() {\n\t\treturn null;\n\t}", "public String getCX() {\n\t\treturn cx;\r\n\t}", "private DataStaxConnection(String cassandraAddress, String keySpaceName) {\r\n\t\ttry {\r\n\t\t if (instance != null)\r\n\t\t return;\r\n\t\t \r\n\t\t this.address = cassandraAddress;\r\n\t\t this.keyspace = keySpaceName;\r\n\t\t \r\n\t\t Cluster.Builder builder = Cluster.builder();\r\n\t\t \r\n\t\t String[] clusterAddress = cassandraAddress.split(\",\");\r\n\t\t for (String nodeAddress: clusterAddress) {\r\n\t\t builder = builder.addContactPoint(nodeAddress);\r\n\t\t }\r\n\t\t \r\n\t\t\tthis.cluster = builder.build();\t\t\t\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Cluster build is successful\");\r\n\t\t\tthis.session = cluster.connect(keySpaceName);\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Session established successfully\");\r\n\t\t\tinstance = this;\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Encoutnered exception:\",e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public int getCCN(){\n\t\treturn ccn;\n\t}", "public interface XconnectService {\n\n /**\n * VLAN cross-connect ACL priority.\n */\n int XCONNECT_ACL_PRIORITY = 60000;\n\n /**\n * VLAN cross-connect Bridging priority.\n */\n int XCONNECT_PRIORITY = 1000;\n\n /**\n * Creates or updates Xconnect.\n *\n * @param deviceId device ID\n * @param vlanId VLAN ID\n * @param endpoints set of endpoints\n */\n void addOrUpdateXconnect(DeviceId deviceId, VlanId vlanId, Set<XconnectEndpoint> endpoints);\n\n /**\n * Deletes Xconnect.\n *\n * @param deviceId device ID\n * @param vlanId VLAN ID\n */\n void removeXonnect(DeviceId deviceId, VlanId vlanId);\n\n /**\n * Gets Xconnects.\n *\n * @return set of Xconnect descriptions\n */\n Set<XconnectDesc> getXconnects();\n\n /**\n * Check if there is Xconnect configured on given connect point.\n *\n * @param cp connect point\n * @return true if there is Xconnect configured on the connect point\n */\n boolean hasXconnect(ConnectPoint cp);\n\n /**\n * Gives xconnect VLAN of given port of a device.\n *\n * @param deviceId Device ID\n * @param port Port number\n * @return true if given VLAN vlanId is XConnect VLAN on device deviceId.\n */\n List<VlanId> getXconnectVlans(DeviceId deviceId, PortNumber port);\n\n /**\n * Checks given VLAN is XConnect VLAN in given device.\n *\n * @param deviceId Device ID\n * @param vlanId VLAN ID\n * @return true if given VLAN vlanId is XConnect VLAN on device deviceId.\n */\n boolean isXconnectVlan(DeviceId deviceId, VlanId vlanId);\n\n /**\n * Returns the Xconnect next objective store.\n *\n * @return current contents of the xconnectNextObjStore\n */\n ImmutableMap<XconnectKey, Integer> getNext();\n\n /**\n * Removes given next ID from Xconnect next objective store.\n *\n * @param nextId next ID\n */\n void removeNextId(int nextId);\n\n /**\n * Returns Xconnect next objective ID associated with group device + vlan.\n *\n * @param deviceId - Device ID\n * @param vlanId - VLAN ID\n * @return Current associated group ID\n */\n int getNextId(DeviceId deviceId, VlanId vlanId);\n}", "public Connection ObtenirConnexion(){return cn;}", "public void connexion() {\r\n\t\ttry {\r\n\r\n\t\t\tsoapConnFactory = SOAPConnectionFactory.newInstance();\r\n\t\t\tconnection = soapConnFactory.createConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public Connexion getConnexion() {\n\t\treturn cx;\n\t}", "private void init() {\r\n\t\tif (cn == null) {\r\n\t\t\ttry {\r\n\t\t\t\tcn = new XGConnection(url,login,passwd); // Etape 2 : r�cup�ration de la connexion\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.MINUTES.sleep(1);\r\n\t\t\t\t} catch (InterruptedException e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcn.close();// lib�rer ressources de la m�moire.\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public apilfixer() {\n\n try {\n System.out.print(\"Connection to Informix Driver \\n\");\n Class.forName(\"com.informix.jdbc.IfxDriver\");\n // Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n ConnectionURL = DriverManager.getConnection(INFORMX_URL, INFORMX_USERID,INFORMX_USERPASS);\n } catch (Exception e) {\n System.err.println( \"Unable to locate class \\n\" );\n e.printStackTrace();\n System.exit(1);\n }\n\n\n}", "public UpdateableDataContext connect(String uname,String pward,String secTocken)\r\n\t{\n\t\tUpdateableDataContext dataContext = new SalesforceDataContext(uname,pward,secTocken);\r\n\t\t\r\n\t\t/*Table accountTable = dataContext.getDefaultSchema().getTableByName(\"Account\");\r\n\t\t \r\n\t\tDataSet dataSet = dataContext.query().from(accountTable).select(\"Id\", \"Name\").where(\"BillingCity\").eq(\"New York\").execute();\r\n\t\t \r\n\t\twhile (dataSet.next()) {\r\n\t\t Row row = dataSet.getRow();\r\n\t\t Object id = row.getValue(0);\r\n\t\t Object name = row.getValue(1);\r\n\t\t System.out.println(\"Account '\" + name + \"' from New York has id: \" + row.getValue(0));\r\n\t\t}\r\n\t\tdataSet.close();*/\r\n\t\treturn dataContext;\r\n\t}", "public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }", "public boolean isXATransaction()\n {\n if (_connectionConfig.isReadOnly())\n return false;\n else if (_driverList.size() > 0) {\n DriverConfig driver = _driverList.get(0);\n \n return driver.isXATransaction();\n }\n else\n return false;\n }", "Xid createXid();", "protected Connection getConnection() {\n String url = \"jdbc:oracle:thin:@localhost:32118:xe\";\n String username = \"JANWILLEM2\";\n String password = \"JANWILLEM2\";\n\n if (myConnection == null) {\n try {\n myConnection = DriverManager.getConnection(url, username, password);\n } catch (Exception exc) {\n exc.printStackTrace();\n }\n }\n\n return myConnection;\n }", "public static ConnectionSource cs() {\n String dbName = \"pegadaian\";\n String dbUrl = \"jdbc:mysql://localhost:3306/\" + dbName;\n String user = \"root\";\n String pass = \"catur123\";\n\n //inisiasi sumber koneksi\n ConnectionSource csInit = null;\n try {\n csInit = new JdbcConnectionSource(dbUrl, user, pass);\n } catch (SQLException ex) {\n Logger.getLogger(Koneksi.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //kembalikan hasil koneksi\n return csInit;\n\n }", "public Integer getNsxqId() {\n return nsxqId;\n }", "io.netifi.proteus.admin.om.Connection getConnection(int index);", "public void connectionEstablished(SctpChannel cnx){\n\thistory (\"connectionEstablished\");\n\t_connecting = false;\n\t_createdTime = System.currentTimeMillis ();\n\tmakeId ();\n\t_channel = _sctpChannel = cnx;\n\t_channel.setSoTimeout (_soTimeout);\n\t_sendOutBufferMonitor = _engine.getSendSctpBufferMonitor ();\n\t_sendMeter = _engine.getIOHMeters ().getSendSctpMeter ();\n\t_readMeter = _engine.getIOHMeters ().getReadSctpMeter ();\n\t_sendDroppedMeter = _engine.getIOHMeters ().getSendDroppedSctpMeter ();\n\tcnx.setWriteBlockedPolicy (AsyncChannel.WriteBlockedPolicy.IGNORE);\n\t_toString = new StringBuilder ()\n\t .append (\"SctpClientChannel[id=\").append (_id).append (\", remote=\").append (_remote).append (\", secure=\").append (_secure).append (']')\n\t .toString ();\n\tif (_logger.isEnabledFor (_engine.sctpConnectedLogLevel ()))\n\t _logger.log (_engine.sctpConnectedLogLevel (), _engine+\" : connected : \"+this);\n\tif (_shared){\n\t _engine.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getSctpChannels ().put (_id, this);\n\t if (_engine.uniqueSctpConnect ()){\n\t\t// we check that all pending agents are still there\n\t\tList<MuxClient> removed = new ArrayList<> (_connectingAgents.size ());\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t if (_engine.getMuxClientList ().contains (agent) == false)\n\t\t\tremoved.add (agent);\n\t\t}\n\t\tfor (MuxClient agent : removed){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+agent);\n\t\t agent.getMuxHandler ().sctpSocketConnected (agent, _id, _connectingAgents.get (agent), null, 0, null, 0, 0, 0, false, _secure, MuxUtils.ERROR_UNDEFINED);\n\t\t agent.getIOHMeters ().getFailedSctpChannelsConnectMeter ().inc (1);\n\t\t _connectingAgents.remove (agent);\n\t\t}\n\t\tif (_connectingAgents.size () == 0){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = new MuxClientList ();\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t MuxClientState state = new MuxClientState ()\n\t\t\t.stopped (_engine.getMuxClientList ().isDeactivated (agent))\n\t\t\t.connectionId (_connectingAgents.get (agent));\n\t\t agentJoined (agent, state); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t\t}\n\t\t_connectingAgents = null; // clean\n\t } else {\n\t\tif (_engine.getMuxClientList ().size () == 0){ // checking for _agent to see if it is open is too costly\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+_agent);\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = _engine.copyMuxClientList ();\n\t\titerateAgentConnected (_agentsList); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t }\n\t _agent = null; // clean\n\t} else {\n\t _agent.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _agent.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t if (_agent.isOpened () == false){\n\t\tclose (false, true); // the socket input exec will remain the agent thread --> monothreaded\n\t\treturn;\n\t }\n\t _agent.getSctpChannels ().put (_id, this);\n\t notifyOpenToAgent (_agent);\n\t}\n\tsetChannelInputExecutor ();\n\t_flowController = new FlowController (_channel, 1000, 10000, _exec); // _exec is set in setChannelInputExecutor\n\n\tif (_reconnect != null)\n\t for (Runnable r: _reconnect) r.run ();\n }", "public Zclass selectByCid(String xandc) {\n\t\tZclassExample example=new ZclassExample();\r\n\t\tcom.pdsu.stuManage.bean.ZclassExample.Criteria criteria=example.createCriteria();\r\n\t\tcriteria.andZcidEqualTo(xandc);\r\n\t\tList<Zclass>list=zclassMapper.selectByExample(example);\r\n\t\tif(list.size()!=0)\r\n\t\treturn list.get(0);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "Object getXtrc();", "Object getXtrc();", "private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\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\t\r\nreturn con;\r\n}", "public VoXtdzqx() {\n }", "public CamelContext getXNetContext() {\n CamelContext cctx;\n Map<String, Object> xnetComp = getXNetComponent();\n if (xnetComp == null || xnetComp.isEmpty()) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetContext()():No valid XNET routing handle found\");\n return null;\n }\n //+++ do not just return the context...\n //return this.camelContext;\n ActiveMQComponent amqComp = (ActiveMQComponent) xnetComp.get(\"ActiveMQComponent\");\n if (amqComp == null) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetContext()():No valid XNET handle found (No AMQ component)\");\n return null;\n }\n //... get and check the context of the highest identified processing\n cctx = amqComp.getCamelContext();\n //TODO check connection... otherwise throw error \"XNetConnectionError\"\n if (cctx == null || cctx.isSuspended()) {\n Log.log(Level.WARNING, LifeCARDAdmin.class.getName() + \":getXNetContext():\" + (cctx == null ? \"XNET context not present (null)\" : \"XNET context suspended \" + cctx.isSuspended()));\n return null;\n }\n return cctx;\n }", "protected boolean isXARequester()\n {\n return (getManagerLevel(CodePoint.XAMGR) >= 7);\n \n }", "private void openConnection(){}", "protected static Connection MySqlCustomersConnection() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = MySqlConn().getConnection();\n\t\t\treturn conn;\n\t\t}\n\t\tcatch (SQLException sqe){\n\t\t\tsqe.printStackTrace();\n\t\t}\n\t\treturn conn;\n\t}", "public void setCX(String cx) {\n\t\tthis.cx = cx;\r\n\t\tfirePropertyChange(ConstantResourceFactory.P_CX,null,cx);\r\n\t}", "@Override\n public Connection call() throws Exception {\n return createConnection();\n }", "public void connect(){\r\n\t\tSystem.out.println(\"Connecting to Sybase Database...\");\r\n\t}", "public XRemote xnext() throws Exception {\n\t\treturn xnextNode();\r\n\t}", "static void checkXAConnection(AssertableApplicationContext ctx) throws JMSException {\n\t\tXAConnection con = ctx.getBean(XAConnectionFactory.class).createXAConnection();\n\t\ttry {\n\t\t\tcon.setExceptionListener(exception -> {\n\t\t\t});\n\t\t\tassertThat(con.getExceptionListener().getClass().getName())\n\t\t\t\t\t.startsWith(\"brave.jms.TracingExceptionListener\");\n\t\t}\n\t\tfinally {\n\t\t\tcon.close();\n\t\t}\n\t}", "public void connect() throws IOException, XMPPException, SmackException {\n InetAddress addr = InetAddress.getByName(\"192.168.1.44\");\n HostnameVerifier verifier = new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return false;\n }\n };\n XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()\n .setXmppDomain(mApplicationContext.getString(R.string.txt_domain_name)) // name of the domain\n .setHost(mApplicationContext.getString(R.string.txt_server_address)) // address of the server\n .setResource(mApplicationContext.getString(R.string.txt_resource)) // resource from where your request is sent\n .setPort(5222) // static port number to connect\n .setKeystoreType(null) //To avoid authentication problem. Not recommended for production build\n .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)\n .setHostnameVerifier(verifier)\n .setHostAddress(addr)\n .setDebuggerEnabled(true)\n .setCompressionEnabled(true).build();\n\n //Set up the ui thread broadcast message receiver.\n setupUiThreadBroadCastMessageReceiver();\n\n mConnection = new XMPPTCPConnection(conf);\n mConnection.addConnectionListener(mOnConnectionListener);\n try {\n Log.d(TAG, \"Calling connect() \");\n mConnection.connect();\n Presence presence = new Presence(Presence.Type.available);\n mConnection.sendPacket(presence);\n\n Log.d(TAG, \" login() Called \");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n /**\n * Listener to receive the incoming message\n */\n\n ChatManager.getInstanceFor(mConnection).addIncomingListener(new IncomingChatMessageListener() {\n @Override\n public void newIncomingMessage(EntityBareJid messageFrom, Message message, Chat chat) {\n String from = message.getFrom().toString();\n\n String contactJid = \"\";\n if (from.contains(\"/\")) {\n contactJid = from.split(\"/\")[0];\n Log.d(TAG, \"The real jid is :\" + contactJid);\n Log.d(TAG, \"The message is from :\" + from);\n } else {\n contactJid = from;\n }\n\n //Bundle up the intent and send the broadcast.\n Intent intent = new Intent(XmppConnectionService.NEW_MESSAGE);\n intent.setPackage(mApplicationContext.getPackageName());\n intent.putExtra(XmppConnectionService.BUNDLE_FROM_JID, contactJid);\n intent.putExtra(XmppConnectionService.BUNDLE_MESSAGE_BODY, message.getBody());\n mApplicationContext.sendBroadcast(intent);\n Log.d(TAG, \"Received message from :\" + contactJid + \" broadcast sent.\");\n }\n });\n\n\n ReconnectionManager reconnectionManager = ReconnectionManager.getInstanceFor(mConnection);\n reconnectionManager.setEnabledPerDefault(true);\n reconnectionManager.enableAutomaticReconnection();\n\n }", "public cusRegister() throws ClassNotFoundException {\n initComponents();\n \n con = DBConnect.connection();\n }", "static void perform_dcx(String passed){\n\t\tint type = type_of_inx(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tdcx_rp(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public boolean isSetCnName() {\n return this.cnName != null;\n }", "boolean needSeparateConnectionForDdl();", "@GET\n @Path(\"/rest/{name}/{value}\")\n @Produces(MediaType.TEXT_XML)\n public String getXCRIXml(@PathParam(\"name\") String name, @PathParam(\"value\") String value) {\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer transformer;\n StringWriter buffer = new StringWriter();\n try {\n transformer = transFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n transformer.transform(new DOMSource(xcriSession.searchCatalog(name, value)), new StreamResult(buffer));\n } catch (TransformerConfigurationException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n } catch (TransformerException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n }\n return buffer.toString();\n\n\n }", "boolean hasXconnect(ConnectPoint cp);", "public void init() {\n\t\tXMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()\r\n//\t\t .setUsernameAndPassword(\"pwf\", \"123456\")\r\n//\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setHost(\"bdht-2016051604\")\r\n\t\t\t\t .setSecurityMode(SecurityMode.disabled)\r\n//\t\t\t\t .setCustomSSLContext(context)\r\n\t\t\t\t \r\n//\t\t .setHost(\"bdht-2016051604\")\r\n//\t\t .setPort(5222)\r\n\t\t .build();\r\n\r\n\t\tAbstractXMPPConnection connection = new XMPPTCPConnection(config);\r\n\t\t\r\n\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"BDHT-2016051604\");\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"192.168.1.121\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\t\r\n\t\t\tconnection.login(\"pwf1\", \"123456\");\r\n\t\t\t\r\n\t\t} catch (SmackException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (XMPPException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(connection.getUser());\r\n\t\t\r\n\t\tChatManager chatmanager = ChatManager.getInstanceFor(connection);\r\n\t\tChat newChat = chatmanager.createChat(\"admin\");\r\n\t\t\r\n//\t\tChat newChat = chatmanager.createChat(\"jsmith@jivesoftware.com\", new MessageListener() {\r\n//\t\t\tpublic void processMessage(Chat chat, Message message) {\r\n//\t\t\t\tSystem.out.println(\"Received message: \" + message);\r\n//\t\t\t}\r\n//\t\t});\r\n\t\t\r\n\t\ttry {\r\n\t\t\tnewChat.sendMessage(\"hello!!\");\r\n\t\t} catch (NotConnectedException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n//\t\tconnection.get\r\n//\t\tconnection.getChatManager().createChat(\"shimiso@csdn.shimiso.com\",null).sendMessage(\"Hello word!\");\r\n\t\t\r\n\t\tconnection.disconnect();\r\n\t\t\r\n\t\tSystem.out.println(\"end\");\r\n\t}", "public void setNsxqId(Integer nsxqId) {\n this.nsxqId = nsxqId;\n }", "@Override\n public int prepare(final Xid _xid)\n {\n if (VFSStoreResource.LOG.isDebugEnabled()) {\n VFSStoreResource.LOG.debug(\"prepare (xid=\" + _xid + \")\");\n }\n return 0;\n }", "public void setCxcode(java.lang.String cxcode) {\r\r\r\r\r\r\r\n this.cxcode = cxcode;\r\r\r\r\r\r\r\n }", "public void setXq(String xq) {\n\t\tthis.xq = xq;\n\t}", "@Override\r\n protected void onConnected() {\n \r\n }", "@Test\n public void testGetSdsConnection() {\n System.out.println(\"getSdsConnection\");\n SDSconnection expResult = null;\n SDSconnection result = instance.getSdsConnection();\n assertEquals(expResult, result);\n }", "@Override\n\tpublic IConnection execute(String mode) {\n\t\t\n \t\tIConnectionFactory factory = null;\n\t\tfactory = new FastBillConnectionFactory();\n \t\tIConnection connection = factory.createConnection();\n \t\treturn connection;\n \t\t\n\t}", "private void setConnection (TwGateway newCxn) {\n boolean connected = (newCxn != null);\n closeXn.setEnabled (connected);\n openXn.setEnabled (!connected);\n getWksp.setEnabled (connected);\n KbWorkspace[] showingWorkspaces = multiWkspView.getWorkspaces ();\n System.out.println (\"Removing \" + showingWorkspaces.length + \" workspaces!\");\n for (int i=0; i<showingWorkspaces.length; i++)\n multiWkspView.removeWorkspace (showingWorkspaces[i]);\n Rectangle frameRect = getCurrentFrame().getBounds ();\n getCurrentFrame().setBounds(frameRect.x, frameRect.y,\n\t\t\t\tframeRect.width + 1, frameRect.height + 1);\n connection = newCxn;\n }", "public Connection getConn() {\n\ttry {\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tcn=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521/pocdb\",\"PL\",\"PL\");\n\t\t\n\t}\n\tcatch(ClassNotFoundException ce)\n\t{\n\t\tce.printStackTrace();\n\t\t\n\t}\n\tcatch(SQLException se)\n\t{\n\t\tse.printStackTrace();\n\t\t\n\t}\n\t\n\t\n\treturn cn;\n\t\n\n}", "private void createChannelAccess(Nx100Type config) throws FactoryException {\n \t\ttry {\n \t\t\tjobChannel = channelManager.createChannel(config.getJOB().getPv(), false);\n \t\t\tstartChannel = channelManager.createChannel(config.getSTART().getPv(), false);\n \t\t\tholdChannel = channelManager.createChannel(config.getHOLD().getPv(), false);\n \t\t\tsvonChannel = channelManager.createChannel(config.getSVON().getPv(), false);\n \t\t\terrChannel = channelManager.createChannel(config.getERR().getPv(), errls, false);\n \n \t\t\t// acknowledge that creation phase is completed\n \t\t\tchannelManager.creationPhaseCompleted();\n \t\t} catch (Throwable th) {\n \t\t\tthrow new FactoryException(\"failed to create all channels\", th);\n \t\t}\n \t}", "public JNDIConnector(Context context, String name) throws ValidationException {\n this(name);\n this.context = context;\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "private void createProxyConnection() throws ClusterDataAdminException {\n ClusterMBeanDataAccess clusterMBeanDataAccess = ClusterAdminComponentManager.getInstance().getClusterMBeanDataAccess();\n try{\n failureDetectorMBean= clusterMBeanDataAccess.locateFailureDetectorMBean();\n }\n catch(Exception e){\n throw new ClusterDataAdminException(\"Unable to locate failure detector MBean connection\",e,log);\n }\n }", "@Bean\n public ConnectionFactory connectionFactory(){\n ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();\n activeMQConnectionFactory.setBrokerURL(brokerUrl);\n activeMQConnectionFactory.setUserName(brokerUsername);\n activeMQConnectionFactory.setPassword(brokerPassword);\n return activeMQConnectionFactory;\n }", "protected PKCS11Connector() { /* left empty intentionally */\n }", "private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }", "protected void connectionEstablished() {}", "public Component(Reference xmlConfigReference) {\r\n this();\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n dbf.setNamespaceAware(false);\r\n dbf.setValidating(false);\r\n \r\n try {\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document document = db.parse(new FileInputStream(\r\n new LocalReference(xmlConfigReference).getFile()));\r\n \r\n // Look for clients\r\n NodeList clientNodes = document.getElementsByTagName(\"client\");\r\n \r\n for (int i = 0; i < clientNodes.getLength(); i++) {\r\n Node clientNode = clientNodes.item(i);\r\n Node item = clientNode.getAttributes().getNamedItem(\"protocol\");\r\n Client client = null;\r\n \r\n if (item == null) {\r\n item = clientNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (item != null) {\r\n String[] protocols = item.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n client = new Client(getContext(), protocolsList);\r\n }\r\n } else {\r\n client = new Client(getContext(), getProtocol(item\r\n .getNodeValue()));\r\n }\r\n \r\n if (client != null) {\r\n this.getClients().add(client);\r\n }\r\n }\r\n \r\n // Look for servers\r\n NodeList serverNodes = document.getElementsByTagName(\"server\");\r\n \r\n for (int i = 0; i < serverNodes.getLength(); i++) {\r\n Node serverNode = serverNodes.item(i);\r\n Node node = serverNode.getAttributes().getNamedItem(\"protocol\");\r\n Node portNode = serverNode.getAttributes().getNamedItem(\"port\");\r\n Server server = null;\r\n \r\n if (node == null) {\r\n node = serverNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (node != null) {\r\n String[] protocols = node.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n int port = getInt(portNode, Protocol.UNKNOWN_PORT);\r\n \r\n if (port == Protocol.UNKNOWN_PORT) {\r\n getLogger()\r\n .warning(\r\n \"Please specify a port when defining a list of protocols.\");\r\n } else {\r\n server = new Server(getContext(), protocolsList,\r\n getInt(portNode, Protocol.UNKNOWN_PORT),\r\n this.getServers().getTarget());\r\n }\r\n }\r\n } else {\r\n Protocol protocol = getProtocol(node.getNodeValue());\r\n server = new Server(getContext(), protocol, getInt(\r\n portNode, protocol.getDefaultPort()), this\r\n .getServers().getTarget());\r\n }\r\n \r\n if (server != null) {\r\n this.getServers().add(server);\r\n }\r\n \r\n // Look for default host\r\n NodeList defaultHostNodes = document\r\n .getElementsByTagName(\"defaultHost\");\r\n \r\n if (defaultHostNodes.getLength() > 0) {\r\n parseHost(this.getDefaultHost(), defaultHostNodes.item(0));\r\n }\r\n \r\n // Look for other virtual hosts\r\n NodeList hostNodes = document.getElementsByTagName(\"host\");\r\n \r\n for (int j = 0; j < hostNodes.getLength(); j++) {\r\n VirtualHost host = new VirtualHost();\r\n parseHost(host, hostNodes.item(j));\r\n this.getHosts().add(host);\r\n }\r\n }\r\n \r\n // Look for internal router\r\n NodeList internalRouterNodes = document\r\n .getElementsByTagName(\"internalRouter\");\r\n \r\n if (internalRouterNodes.getLength() > 0) {\r\n Node node = internalRouterNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\r\n \"defaultMatchingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setDefaultMatchingMode(\r\n getInt(item, getInternalRouter()\r\n .getDefaultMatchingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"maxAttempts\");\r\n if (item != null) {\r\n this.getInternalRouter().setMaxAttempts(\r\n getInt(item, this.getInternalRouter()\r\n .getMaxAttempts()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"routingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setRoutingMode(\r\n getInt(item, this.getInternalRouter()\r\n .getRoutingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"requiredScore\");\r\n if (item != null) {\r\n this.getInternalRouter().setRequiredScore(\r\n getFloat(item, this.getInternalRouter()\r\n .getRequiredScore()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"retryDelay\");\r\n if (item != null) {\r\n this.getInternalRouter().setRetryDelay(\r\n getLong(item, this.getInternalRouter()\r\n .getRetryDelay()));\r\n }\r\n \r\n // Loops the list of \"attach\" instructions\r\n setAttach(getInternalRouter(), node);\r\n }\r\n \r\n // Look for logService\r\n NodeList logServiceNodes = document\r\n .getElementsByTagName(\"logService\");\r\n \r\n if (logServiceNodes.getLength() > 0) {\r\n Node node = logServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"logFormat\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLogFormat(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"loggerName\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLoggerName(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getLogService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"identityCheck\");\r\n \r\n if (item != null) {\r\n this.getLogService().setIdentityCheck(\r\n getBoolean(item, true));\r\n }\r\n }\r\n \r\n // Look for statusService\r\n NodeList statusServiceNodes = document\r\n .getElementsByTagName(\"statusService\");\r\n \r\n if (statusServiceNodes.getLength() > 0) {\r\n Node node = statusServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"contactEmail\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setContactEmail(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"homeRef\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setHomeRef(\r\n new Reference(item.getNodeValue()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"overwrite\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setOverwrite(getBoolean(item, true));\r\n }\r\n }\r\n } catch (Exception e) {\r\n getLogger().log(Level.WARNING,\r\n \"Unable to parse the Component XML configuration.\", e);\r\n }\r\n }", "public CAdxWebServiceXmlCC getCAdxWebServiceXmlCC() throws ServiceException {\n\t\treturn null;\n\t}", "public boolean jmxBind() {\n\t\ttry {\n\t\t\tString sUrl = \"service:jmx:rmi:///jndi/rmi://\" + hostname + \":\" + port + \"/jmxrmi\";\n\t\t\tLOGGER.info(\"Connecting to remote engine on : \" + sUrl);\n\t\t\turl = new JMXServiceURL(sUrl);\n\t\t\tjmxC = new RMIConnector(url, null);\n\t\t\tjmxC.connect();\n\t\t\tjmxc = jmxC.getMBeanServerConnection();\n\t\t\tObjectName lscServerName = new ObjectName(\"org.lsc.jmx:type=LscServer\");\n\t\t\tlscServer = JMX.newMXBeanProxy(jmxc, lscServerName, LscServer.class, true);\n\t\t\treturn true;\n\t\t} catch (MalformedObjectNameException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (NullPointerException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t}\n\t\treturn false;\n\t}", "public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}", "@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}", "protected static JdbcChannel connectionReserve(CallContext cx, Bindings bindings)\n throws ProcedureException {\n \n String str;\n Object obj;\n \n obj = bindings.getValue(BINDING_DB);\n if (obj instanceof String) {\n obj = cx.connectionReserve((String) obj);\n }\n if (!JdbcChannel.class.isInstance(obj)) {\n str = \"connection not of JDBC type: \" + obj.getClass().getName();\n throw new ProcedureException(str);\n }\n return (JdbcChannel) obj;\n }", "public JNDIConnector() {\n super();\n }", "public void start() throws XCFException {\n\t\tpushScope();\n\t\taddConvention(\"validator\", \".request.parameter.VALIDATOR_\");\n\t\taddConvention(\"setter\", \".request.parameter.SETTER_\");\n\t\taddConvention(\"saxel\", \".builder.SAXEL_\");\n\t\taddConvention(\"instruction\", \".request.processor.instructions.INSTRUCTION_\");\n\t\t\n\t\taddPackage(\"com.eternal.xcf\");\n\t\taddPackage(\"com.eternal.xcf.common\");\n\t}", "public void setXknr(String xknr) {\n\t\tthis.xknr = xknr;\n\t}", "public boolean isSetCnsCidadao() {\n return this.cnsCidadao != null;\n }", "public void setLookupIdStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"select \" + ALL_COLS + \n\t\t \" from \" + TABLE_NAME + \n\t\t \" where \" + ID_COL + \" = ? \";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "@Override\r\n\tpublic List<Ccspxxb> selectCcspxx() {\n\t\t\r\n\t\treturn ccspxxbMapper.selectByExample(null);\r\n\t}", "@Override\n public int getConnectionPort() {\n return 10083;\n }", "@Override\n protected void startConnection() throws CoreException {\n }", "public static void proxy(String param) {\n String url = \"http://192.168.10.80:8183/pacsChannel?wsdl\";\n String portTypeName = \"pacsChannel\";//\"receiveCheckApply\";\n try {\n QName qname = new QName(\"http://serv.pacs.senyint.com/\", portTypeName);\n Service service = Service.create(new URL(url), qname);\n // service.addPort(qname, SOAPBinding.SOAP11HTTP_BINDING, url);\n // service.getPort()\n PacsChannel testService = service.getPort(/*new QName(tsn, port name), */PacsChannel.class);\n System.out.println(testService.invoke(\"receiveCheckApply\", param));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void checkConnectivity() throws NotConnected\n\t{\n\t\tif (!s_ctx.isConnected())\n\t\t{\n\t\t\tthrow new NotConnected(\"Cannot operate: not conected to context\");\n\t\t}\n\t}", "public static void openConnection() {\n try {\n connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"system\", \"kevin2000\");\n connection.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void onConnectToNetByIPSucces();", "public void setConn(Connection conn) {this.conn = conn;}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void initialiseCRISTDiscovery() {\n\t}", "public EPPSecDNSExtUpdate() {}", "protected IPhynixxConnectionProxy getObservableProxy() {\n\t\t\treturn null;\r\n\t\t}", "public void process(EdaContext xContext) throws IcofException {\n\n\t// Connect to the database\n\tconnectToDB(xContext);\n\n\t// Determine if branch/component are for a production or development TK.\n\tfindToolKit(xContext);\n\trollBackDBAndSetReturncode(xContext, APP_NAME, SUCCESS);\n\n }", "public void setCCN(int ccn0){\n\t\tccn = ccn0;\n\t}", "public boolean checkConnection() {\n\treturn getBoolean(ATTR_CONNECTION, false);\n }", "public void setXmlx(java.lang.String param) {\r\n localXmlxTracker = param != null;\r\n\r\n this.localXmlx = param;\r\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.enumerateXAConnectionFactory();\n int int0 = connectionFactories0.getConnectionFactoryCount();\n assertEquals(0, int0);\n }", "private void establishConnection() throws ClassNotFoundException, SQLException {\r\n\t \t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t String conUrl = \"jdbc:oracle:thin:@localhost:1521:XE\";\r\n\t String uname = \"system\";\r\n\t\t\tString pwd = \"sathar205\";\r\n\t con = DriverManager.getConnection(conUrl,uname,pwd);\r\n\t }", "public void initializeConnection() {\n\n cluster = Cluster.builder().addContactPoint(host).build();\n session = cluster.connect(keyspaceName);\n session.execute(\"USE \".concat(keyspaceName));\n }", "public RXC getRXC() { \r\n return getTyped(\"RXC\", RXC.class);\r\n }", "private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }", "public java.lang.String getCxcode() {\r\r\r\r\r\r\r\n return cxcode;\r\r\r\r\r\r\r\n }", "@Ignore\n @Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Util.commonServiceIPs = \"127.0.0.1\";\n PooledConnection expResult = null;\n try {\n long ret = JMSUtil.getQueuePendingMessageCount(\"127.0.0.1\",\"localhost\",CommonKeys.INDEX_REQUEST);\n fail(\"The test case is a prototype.\");\n }\n catch(Exception e)\n {\n \n } \n }", "public XMLDatabaseConnector()\n\t{\n\t\t\n\t\tProperties prop = new Properties();\n\t\t\n\t\t InputStream inputStream = this.getClass().getClassLoader()\n\t .getResourceAsStream(\"config.properties\");\n\t\t \n \ttry {\n //load a properties file\n \t\tprop.load(inputStream);\n \n //get the property value and print it out\n \t\tsetURI(prop.getProperty(\"existURI\"));\n \t\tusername = prop.getProperty(\"username\");\n \t\tpassword = prop.getProperty(\"password\");\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n\t}", "void getConnection() {\n }", "public contrustor(){\r\n\t}", "public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}", "DBConnect() {\n \n }" ]
[ "0.53064364", "0.5220932", "0.51949483", "0.5146956", "0.51329076", "0.50948656", "0.50758404", "0.50438434", "0.49969062", "0.499373", "0.4981579", "0.49767327", "0.4972163", "0.49536583", "0.4929786", "0.49046612", "0.48441488", "0.4831414", "0.4830681", "0.48295915", "0.48124036", "0.48068672", "0.4806557", "0.4792564", "0.4792564", "0.4783227", "0.47786406", "0.4775227", "0.4713116", "0.47128358", "0.47084382", "0.4697986", "0.46834236", "0.46753126", "0.46716475", "0.46669582", "0.46570486", "0.4656839", "0.46458334", "0.4638603", "0.4622663", "0.46175605", "0.46161962", "0.46154898", "0.46106455", "0.4584667", "0.45828784", "0.45820668", "0.4577838", "0.45743713", "0.4569163", "0.45665866", "0.45630774", "0.4560568", "0.45597905", "0.45521995", "0.45398325", "0.45389578", "0.45337263", "0.45317784", "0.4521721", "0.452055", "0.45149106", "0.45140877", "0.45083082", "0.45071304", "0.45066616", "0.4506083", "0.44993043", "0.44966912", "0.4493784", "0.44918618", "0.44883004", "0.44867343", "0.44860452", "0.44841218", "0.44832742", "0.44784608", "0.44779012", "0.4475435", "0.44751963", "0.44751963", "0.44736755", "0.44735968", "0.4472711", "0.4471323", "0.4469383", "0.44633746", "0.44622663", "0.4459921", "0.44598195", "0.44556513", "0.44548798", "0.44538134", "0.44513872", "0.4447234", "0.44465938", "0.4429108", "0.4427713", "0.44203046", "0.44125736" ]
0.0
-1
/ Update a Transaction into a database
@Override public void update(Seq s, String[] param) { // TODO Auto-generated method stub Connection conn = null; String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; try { conn = DriverManager.getConnection(url); PreparedStatement myStmt; String query = "update seq set identifier=?, seq_number=? where id = ?"; myStmt = conn.prepareStatement(query); // Set Parameters myStmt.setString(1, param[0]); myStmt.setInt(2, Integer.parseInt(param[1])); myStmt.setInt(3, s.getId()); // Execute SQL query int res = myStmt.executeUpdate(); // Display the record inserted System.out.println(res + " Seq updated"); // Close the connection conn.close(); }catch (SQLException e) { System.out.println(e.getMessage());} finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateTransaction(Transaction trans);", "public void UpdateTransaction() {\n\t\tgetUsername();\n\t\tcol_transactionID.setCellValueFactory(new PropertyValueFactory<Account, Integer>(\"transactionID\"));\n\t\tcol_date.setCellValueFactory(new PropertyValueFactory<Account, Date>(\"date\"));\n\t\tcol_description.setCellValueFactory(new PropertyValueFactory<Account, String>(\"description\"));\n\t\tcol_category.setCellValueFactory(new PropertyValueFactory<Account, String>(\"category\"));\n\t\tcol_amount.setCellValueFactory(new PropertyValueFactory<Account, Double>(\"amount\"));\n\t\tmySqlCon.setUsername(username);\n\t\tlists = mySqlCon.getAccountData();\n\t\ttableTransactions.setItems(lists);\n\t}", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\n\t}", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\t\t\n\t}", "int update(Purchase purchase) throws SQLException, DAOException;", "public CleaningTransaction update(CleaningTransaction cleaningTransaction);", "int updateByPrimaryKey(Transaction record);", "void commitTransaction();", "public void saveOrUpdate(Transaction transaction) throws Exception;", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "void commit(Transaction transaction);", "Transaction save(Transaction transaction);", "@Override\n\tpublic Transaction update(Integer transactionId, Transaction transaction) {\n\t\treturn null;\n\t}", "public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}", "public static void establecerTransaccion() throws SQLException {\n con.commit();\n }", "@Override\r\n\tpublic void updateTranCode(Transaction transaction) throws Exception {\n\t\ttranDao.updateTranCode(transaction);\r\n\t}", "public void commitTransaction() {\n\r\n\t}", "Transfer updateTransactionNumber(Long id, String transactionNumber);", "public void actualizar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //actualizar el Dia\n session.update(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n}", "public void dbUpdate(String query, Connection con) {\n try {\n tryDbUpdate(query, con);\n } catch (SQLException e) {\n try {\n con.rollback();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n }\n }", "void commit();", "void commit();", "public void commitTransaction() throws SQLException {\n dbConnection.commit();\n }", "int updateByPrimaryKey(PaymentTrade record);", "@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}", "@Override\n\tpublic Transaction update(Transaction transaction) {\n\t\treturn null;\n\t}", "void rollbackTransaction();", "@Override\n public void commitTx() {\n \n }", "public long update(Entity entity){\r\n\t\ttry {\r\n\t\t\tthis.prepareFields(entity, true);\r\n\t\t\tString tableName = this.getTableName();\r\n\t\t\tTransferObject to = new TransferObject(\r\n\t\t\t\t\t\ttableName,\r\n\t\t\t\t\t\tprimaryKeyTos,\r\n\t\t\t\t\t\tfieldTos, \r\n\t\t\t\t\t\tTransferObject.UPDATE_TYPE);\r\n\t\t\treturn transactStatements(to);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"GPALOG\" , e.getMessage(),e); \r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "int executeUpdate() throws SQLException;", "Transaction beginTx();", "public void update(Triplet t) throws DAOException;", "public void commit();", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\r\n\tpublic void update(Connection connection, Long id, Salary salary) throws SQLException {\n\r\n\t}", "public void transaction() throws DBException {\n\t\tUsersTransaction transaction = new UsersTransaction();\n\t\tScanner scan = new Scanner(System.in);\n\t\tLogger.info(\"================TRANSACTION DETAILS TO DONATE======================\");\n\t\tLogger.info(\"Enter the transaction ID\");\n\t\ttransactionId = scan.nextInt();\n\t\tLogger.info(\"Enter the donor ID\");\n\t\tdonorId = scan.nextInt();\n\t\tLogger.info(\"Enter the fund Id\");\n\t\tfundRequestId = scan.nextInt();\n\t\tLogger.info(\"Enter the amount to be funded\");\n\t\ttargetAmount = scan.nextInt();\n\t\ttransaction.setTransactionId(transactionId);\n\t\ttransaction.setDonorId(donorId);\n\t\ttransaction.setFundRequestId(fundRequestId);\n\t\ttransaction.setTargetAmount(targetAmount);\n\t\tinsert(transaction);\n\t\tdonorFundRequest(reqType);\n\t}", "@Override\n public void commit() throws SQLException {\n if (isTransActionAlive() && !getTransaction().getStatus().isOneOf(TransactionStatus.MARKED_ROLLBACK,\n TransactionStatus.ROLLING_BACK)) {\n // Flush synchronizes the database with in-memory objects in Session (and frees up that memory)\n getSession().flush();\n // Commit those results to the database & ends the Transaction\n getTransaction().commit();\n }\n }", "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "int updateByPrimaryKey(PurchasePayment record);", "@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }", "public void update(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createUpdate(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Update \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t}", "protected abstract boolean commitTxn(Txn txn) throws PersistException;", "void beginTransaction();", "int updateByPrimaryKey(R_dept_trade record);", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void commitTransaction() throws TransactionException {\n\t\t\r\n\t}", "int updateByPrimaryKeySelective(Transaction record);", "Integer update(final String sql);", "public void update(T object) throws SQLException;", "public void commitChanges() {\n try {\n connection.commit();\n } catch (SQLException sqle) {\n LOGGER.log(Level.SEVERE, \"Unable to commit changes to the DB due to error {0}\", sqle.getMessage());\n }\n }", "@Override\n public void rollbackTx() {\n \n }", "public void saveTransaction(Transaction transaction) {\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n // don't save \"duplicate\" transactions\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE trans.transdate = :transdate AND trans.amount = :amount AND trans.vendor = :vendor AND trans.account.uid = :accountuid\");\r\n q.setParameter(\"transdate\", transaction.getTransdate());\r\n q.setParameter(\"amount\", transaction.getAmount());\r\n q.setParameter(\"vendor\", transaction.getVendor());\r\n Account acct = transaction.getAccount();\r\n q.setParameter(\"accountuid\", acct.getUid());\r\n List<Transaction> transactionList = (List<Transaction>) q.list();\r\n if (transactionList.isEmpty()) {\r\n session.save(transaction);\r\n }\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }", "int updateByPrimaryKey(CmstTransfdevice record);", "public void rollbackTx()\n\n{\n\n}", "@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}", "public int TransSale(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString sdate=sd.format(d);\r\n\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='sale' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\tif(rs1.next()==true)\r\n\t{\r\n\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='sale' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'sale','self',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t}\r\n\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\tif(rss.next()==true)\r\n\t{\r\n\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share-\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t}\r\n\t\r\n\treturn 1;\r\n}", "@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}", "public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }", "public int req(Long req_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought fail' where reqid=\"+req_id+\"\");\t\r\n\treturn i;\r\n}", "private void updateAccountTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString updateAccountQuery = \"Update Account Set phoneNumber = ? \" + \"Where name = ?;\";\n\n\ttry {\n\n\t\t\tpst = conn.prepareStatement(updateAccountQuery);\n\t\t\tpst.setInt(1, 312483991);\n\t\t\tpst.setString(2, \"Harry\");\n\t\t\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords updated into Account Table Successfully\\n\");\n\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n-----Please Check Error Below for updating Account Table------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}", "public abstract void commit();", "IDbTransaction beginTransaction();", "public void update(Tiaoxiushenqing t) throws SQLException {\n\t\tTiaoxiushenqingDao dao = new TiaoxiushenqingDao();\n\t\tdao.update(t);\n\t}", "public void updateAccountTable(Transaction transaction, Account account) throws SQLException {\n\t\tSQLUpdate updateStatement = new SQLUpdate();\n\t\tupdateStatement.updateAccountTable(transaction, account, currentUser);\n\t}", "int updateByPrimaryKey(Salaries record);", "public void forceCommitTx()\n{\n}", "int updateByPrimaryKey(NjOrderWork2 record);", "public void modificarempleado(Empleado empleado)throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n EmpleadosDatos empleadodatos = new EmpleadosDatos();\n empleadodatos.update(empleado);\n conexion.commit();\n System.out.println(\"Empleado modificado con exito\");\n }catch(SQLException e){\n System.out.println(\"Error en modificacion de empleado\");\n e.printStackTrace();\n try{\n conexion.rollback();\n }catch(SQLException ex){\n ex.printStackTrace();\n System.out.println(\"Error en rollback, vamos a morir todos\");\n ex.printStackTrace();\n }\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }", "public void update(Transaction tx,Tuple old, Tuple nu) throws RelationException;", "int updateByPrimaryKey(DangerMerchant record);", "@Override\n public void commitTransaction() {\n try {\n connection.commit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't commit transaction \", e);\n } finally {\n closeConnection();\n }\n }", "@Override\r\n\tpublic void updateAd(EP par) {\n\t\tsession.update(par);//修改 \r\n\t\ttr.commit();//提交事务\r\n\t}", "int updateByPrimaryKey(TbaDeliveryinfo record);", "void rollback(Transaction transaction);", "public void doUpdate(T objectToUpdate) throws SQLException;", "public void commit() throws SQLException {\n\t\tconnection.commit();\n\t}", "void rollback() {\r\n tx.rollback();\r\n tx = new Transaction();\r\n }", "int updateByPrimaryKey(FinanceAccount record);", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "public void actualizaAntNoPato(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 = \" UPDATE `antnopato`\\n\" +\n \"SET\\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 \"WHERE `id_antNP` = ?;\";\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.setString (16, id_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos han sido modificados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void beginTransaction() throws SQLException {\r\n conn.setAutoCommit(false);\r\n beginTransactionStatement.executeUpdate();\r\n }", "public int TransBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString sdate=sd.format(d);\r\n\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\tif(rs1.next()==true)\r\n\t{\r\n\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','self',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t}\r\n\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\tif(rss.next()==true)\r\n\t{\r\n\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t}\r\n\treturn 1;\r\n}", "public void insert(UsersTransaction transaction) throws DBException {\n\t\tConnection con = null;\n\t\tPreparedStatement pst = null;\n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"insert into transaction_details (id,donor_id,fund_id,amount_funded) values ( ?,?,?,?)\";\n\t\t\tpst = con.prepareStatement(sql);\n\t\t\tpst.setInt(3, transaction.getFundRequestId());\n\t\t\tpst.setInt(2, transaction.getDonorId());\n\t\t\tpst.setInt(1, transaction.getTransactionId());\n\t\t\tpst.setDouble(4, transaction.getTargetAmount());\n\t\t\tint rows = pst.executeUpdate();\n\t\t\tLogger.info(\"No of rows inserted :\" + rows);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DBException(\"unable to insert rows\");\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t}", "@Transactional\n\t@Override\n\tpublic Paradero update(Paradero t) throws Exception {\n\t\treturn paraderoRespository.save(t);\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "void commitTransaction(ConnectionContext context) throws IOException;", "@Test\n public void testUpdate() throws MainException, SQLException {\n System.out.println(\"update\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"insert into infermieri (nome, cognome) values ('luca', 'massa')\");\n boolean expResult = true;\n boolean result = instance.update(stmt);\n assertEquals(expResult, result);\n }", "void setTransactionSuccessful();", "public void beginTransaction() throws Exception;", "@Update({\n \"update PURCHASE\",\n \"set SDATE = #{sdate,jdbcType=TIMESTAMP},\",\n \"STYPE = #{stype,jdbcType=VARCHAR},\",\n \"SMONEY = #{smoney,jdbcType=DECIMAL},\",\n \"TOUCHING = #{touching,jdbcType=VARCHAR},\",\n \"ACCOUNT = #{account,jdbcType=VARCHAR},\",\n \"CHECKSTATUS = #{checkstatus,jdbcType=DECIMAL},\",\n \"DEMO1 = #{demo1,jdbcType=DECIMAL},\",\n \"DEMO2 = #{demo2,jdbcType=VARCHAR},\",\n \"DEMO3 = #{demo3,jdbcType=DECIMAL}\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n int updateByPrimaryKey(Purchase record);", "void endTransaction();", "@Override\n public boolean update(Transaksi transaksi) {\n try {\n String query = \"UPDATE transaksi SET tgl_transaksi=? WHERE id=?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getTglTransaksi());\n ps.setString(2, transaksi.getId());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "int updateByPrimaryKey(CGcontractCredit record);", "int updateByPrimaryKey(Tourst record);", "public void commitTransaction(long id) throws RelationException;", "int updateByPrimaryKey(DebtsRecordEntity record);", "public void beginTransaction() throws SQLException\n\t{\n\t\tconn.setAutoCommit(false);\n\t\tbeginTransactionStatement.executeUpdate();\n\t}", "@Test\r\n public void testUpdate() throws Exception {\r\n System.out.println(\"update\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n obj.setSigle(\"Test2\");\r\n //etc\r\n obj.setTel(\"000000001\");\r\n //etc\r\n Bureau expResult=obj;\r\n Bureau result = instance.update(obj);\r\n assertEquals(expResult.getSigle(), result.getSigle());\r\n //etc\r\n assertEquals(expResult.getTel(), result.getTel());\r\n //etc\r\n instance.delete(obj);\r\n //TODO verifier que si met à jour vers un doublé sigle-tel déjà existant, on a une exception\r\n }", "void commit(String tpcid);" ]
[ "0.8205174", "0.7232187", "0.72252876", "0.72190833", "0.70870656", "0.69781154", "0.6940977", "0.68710315", "0.6856298", "0.6814272", "0.67905974", "0.67241716", "0.65370065", "0.6390577", "0.6341139", "0.62662256", "0.6259554", "0.6257114", "0.62443835", "0.62442213", "0.6239541", "0.6239541", "0.6237351", "0.62258196", "0.62110335", "0.61905384", "0.6186991", "0.61795294", "0.6167405", "0.61633605", "0.6153828", "0.6135996", "0.61346906", "0.612792", "0.6122313", "0.6108919", "0.6090868", "0.6080039", "0.60667986", "0.60577345", "0.605213", "0.6036113", "0.6031453", "0.6022091", "0.6022065", "0.6020382", "0.60004777", "0.59901637", "0.5987097", "0.59819186", "0.596808", "0.59634346", "0.59630704", "0.5950626", "0.5949919", "0.594886", "0.59445447", "0.59434474", "0.59360373", "0.59313697", "0.5926655", "0.59217143", "0.59154797", "0.59137344", "0.59125197", "0.59115666", "0.59074336", "0.5902732", "0.5901924", "0.58960694", "0.58806735", "0.5871208", "0.586131", "0.5859649", "0.5857093", "0.5854251", "0.5849651", "0.58474344", "0.5847006", "0.58385515", "0.58365774", "0.5834706", "0.58345807", "0.58302", "0.5828201", "0.5827149", "0.5825738", "0.58233565", "0.5821003", "0.5818646", "0.5818552", "0.5815224", "0.5814382", "0.5813668", "0.5812751", "0.58094746", "0.5805103", "0.5804795", "0.5799362", "0.57981735", "0.57881945" ]
0.0
-1
TODO Autogenerated method stub Establish cnx
public void updatebyseq_number(String identifier, int new_seq) { Connection conn = null; String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; try { conn = DriverManager.getConnection(url); PreparedStatement myStmt; String query = "update seq set seq_number=? where identifier = ?"; myStmt = conn.prepareStatement(query); // Set Parameters myStmt.setInt(1, new_seq); myStmt.setString(2, identifier); // Execute SQL query int res = myStmt.executeUpdate(); // Display the record inserted System.out.println(res + " " + identifier + "'s seq_number updated"); // Close the connection conn.close(); }catch (SQLException e) { System.out.println(e.getMessage());} finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Object> getXNetComponent() {\n if (!init()) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetComponent():Initialization failed.\");\n return null;\n }\n Map<String, Object> xnetComp = new HashMap<>();\n xnetComp.put(\"XNETStarted\", false);\n ActiveMQComponent amqComp = null;\n //SEHR XNET root is a top level domain that ties SEHR communities together\n InitialContext ic;\n try {\n ic = new InitialContext();\n this.camelContext = (CamelContext) ic.lookup(\"XNetContext\");\n if (this.camelContext != null && this.camelContext.getStatus().isStarted()) {\n if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetrooturl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xroot\");\n xnetComp.put(\"XNETLevel\", \"xroot\");\n if (amqComp != null) {\n //We can send messages to a LC queue;\n //Reading from a LC queue depends on the app the card holder uses;\n //The holder has to login and be verified to get his messages;\n //The 'xroot' configuration allows this CAS module to send \n //messages out to the SEHR world using this camel context;\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetcountryurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xctry\");\n xnetComp.put(\"XNETLevel\", \"xctry\");\n if (amqComp != null) {\n //It seems to be that we can send messages to a national LC queue\n //But this depends on the configuration of the country broker\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' also\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetdomainurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xdom\");\n xnetComp.put(\"XNETLevel\", \"xdom\");\n if (amqComp != null) {\n //It seems to be that we can send messages to a LC queue for the \n //whole managed domain\n //To send dmessages to a LC queue depends on the broker settings\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' or 'xctry'\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetzoneurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xzone\");\n xnetComp.put(\"XNETLevel\", \"xzone\"); //the bottom level\n if (amqComp != null) {\n //There is a local broker (of the zone, the community level, WAN)\n //To send dmessages to other LC queues depends on the broker \n //settings\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' otherwise there\n //will be no interchange with patients outside of the zone\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n }\n xnetComp.put(\"ActiveMQComponent\", amqComp);\n } else {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetComponent():No routing (Camel) context.\");\n xnetComp.put(\"ActiveMQStatus\", \"No routing context.\");\n }\n\n } catch (NamingException ex) {\n Log.warning(LifeCARDAdmin.class.getName() + \":getXNetComponent():\" + ex.getMessage());\n }\n// //Finally check if this zone (this SEHR-CAS is running for) has centers \n// //that have registered the LifeCARD service (module) to use the XNET for \n// //exchanging data (of/to/with the patient).\n// List<NetCenter> list = getServiceCenter(Integer.parseInt(p.getProperty(\"zoneID\", \"0\")));\n// xnetComp.put(\"ListLCServiceCenter\", list);\n\n return xnetComp;\n }", "protected IXConnection getConnection() {\n return eloCmisConnectionManager.getConnection(this.getCallContext());\n }", "public Connection xcon(){\n Connection cn =null;\n try{\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cn = DriverManager.getConnection(\"jdbc:sqlserver://10.60.41.30:1433;databaseName=Northwind;\",\"idat\",\"123456\");\n if(cn!=null){\n JOptionPane.showMessageDialog(null, \"Estás conectado\");\n }\n }catch(Exception error){\n JOptionPane.showMessageDialog(null, error);\n }\n \n return cn;\n }", "public String getCAdxWebServiceXmlCCAddress() {\n\t\treturn null;\n\t}", "public String getCX() {\n\t\treturn cx;\r\n\t}", "private DataStaxConnection(String cassandraAddress, String keySpaceName) {\r\n\t\ttry {\r\n\t\t if (instance != null)\r\n\t\t return;\r\n\t\t \r\n\t\t this.address = cassandraAddress;\r\n\t\t this.keyspace = keySpaceName;\r\n\t\t \r\n\t\t Cluster.Builder builder = Cluster.builder();\r\n\t\t \r\n\t\t String[] clusterAddress = cassandraAddress.split(\",\");\r\n\t\t for (String nodeAddress: clusterAddress) {\r\n\t\t builder = builder.addContactPoint(nodeAddress);\r\n\t\t }\r\n\t\t \r\n\t\t\tthis.cluster = builder.build();\t\t\t\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Cluster build is successful\");\r\n\t\t\tthis.session = cluster.connect(keySpaceName);\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Session established successfully\");\r\n\t\t\tinstance = this;\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Encoutnered exception:\",e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public int getCCN(){\n\t\treturn ccn;\n\t}", "public interface XconnectService {\n\n /**\n * VLAN cross-connect ACL priority.\n */\n int XCONNECT_ACL_PRIORITY = 60000;\n\n /**\n * VLAN cross-connect Bridging priority.\n */\n int XCONNECT_PRIORITY = 1000;\n\n /**\n * Creates or updates Xconnect.\n *\n * @param deviceId device ID\n * @param vlanId VLAN ID\n * @param endpoints set of endpoints\n */\n void addOrUpdateXconnect(DeviceId deviceId, VlanId vlanId, Set<XconnectEndpoint> endpoints);\n\n /**\n * Deletes Xconnect.\n *\n * @param deviceId device ID\n * @param vlanId VLAN ID\n */\n void removeXonnect(DeviceId deviceId, VlanId vlanId);\n\n /**\n * Gets Xconnects.\n *\n * @return set of Xconnect descriptions\n */\n Set<XconnectDesc> getXconnects();\n\n /**\n * Check if there is Xconnect configured on given connect point.\n *\n * @param cp connect point\n * @return true if there is Xconnect configured on the connect point\n */\n boolean hasXconnect(ConnectPoint cp);\n\n /**\n * Gives xconnect VLAN of given port of a device.\n *\n * @param deviceId Device ID\n * @param port Port number\n * @return true if given VLAN vlanId is XConnect VLAN on device deviceId.\n */\n List<VlanId> getXconnectVlans(DeviceId deviceId, PortNumber port);\n\n /**\n * Checks given VLAN is XConnect VLAN in given device.\n *\n * @param deviceId Device ID\n * @param vlanId VLAN ID\n * @return true if given VLAN vlanId is XConnect VLAN on device deviceId.\n */\n boolean isXconnectVlan(DeviceId deviceId, VlanId vlanId);\n\n /**\n * Returns the Xconnect next objective store.\n *\n * @return current contents of the xconnectNextObjStore\n */\n ImmutableMap<XconnectKey, Integer> getNext();\n\n /**\n * Removes given next ID from Xconnect next objective store.\n *\n * @param nextId next ID\n */\n void removeNextId(int nextId);\n\n /**\n * Returns Xconnect next objective ID associated with group device + vlan.\n *\n * @param deviceId - Device ID\n * @param vlanId - VLAN ID\n * @return Current associated group ID\n */\n int getNextId(DeviceId deviceId, VlanId vlanId);\n}", "public Connection ObtenirConnexion(){return cn;}", "public void connexion() {\r\n\t\ttry {\r\n\r\n\t\t\tsoapConnFactory = SOAPConnectionFactory.newInstance();\r\n\t\t\tconnection = soapConnFactory.createConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public Connexion getConnexion() {\n\t\treturn cx;\n\t}", "private void init() {\r\n\t\tif (cn == null) {\r\n\t\t\ttry {\r\n\t\t\t\tcn = new XGConnection(url,login,passwd); // Etape 2 : r�cup�ration de la connexion\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.MINUTES.sleep(1);\r\n\t\t\t\t} catch (InterruptedException e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcn.close();// lib�rer ressources de la m�moire.\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public apilfixer() {\n\n try {\n System.out.print(\"Connection to Informix Driver \\n\");\n Class.forName(\"com.informix.jdbc.IfxDriver\");\n // Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n ConnectionURL = DriverManager.getConnection(INFORMX_URL, INFORMX_USERID,INFORMX_USERPASS);\n } catch (Exception e) {\n System.err.println( \"Unable to locate class \\n\" );\n e.printStackTrace();\n System.exit(1);\n }\n\n\n}", "public UpdateableDataContext connect(String uname,String pward,String secTocken)\r\n\t{\n\t\tUpdateableDataContext dataContext = new SalesforceDataContext(uname,pward,secTocken);\r\n\t\t\r\n\t\t/*Table accountTable = dataContext.getDefaultSchema().getTableByName(\"Account\");\r\n\t\t \r\n\t\tDataSet dataSet = dataContext.query().from(accountTable).select(\"Id\", \"Name\").where(\"BillingCity\").eq(\"New York\").execute();\r\n\t\t \r\n\t\twhile (dataSet.next()) {\r\n\t\t Row row = dataSet.getRow();\r\n\t\t Object id = row.getValue(0);\r\n\t\t Object name = row.getValue(1);\r\n\t\t System.out.println(\"Account '\" + name + \"' from New York has id: \" + row.getValue(0));\r\n\t\t}\r\n\t\tdataSet.close();*/\r\n\t\treturn dataContext;\r\n\t}", "public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }", "public boolean isXATransaction()\n {\n if (_connectionConfig.isReadOnly())\n return false;\n else if (_driverList.size() > 0) {\n DriverConfig driver = _driverList.get(0);\n \n return driver.isXATransaction();\n }\n else\n return false;\n }", "Xid createXid();", "protected Connection getConnection() {\n String url = \"jdbc:oracle:thin:@localhost:32118:xe\";\n String username = \"JANWILLEM2\";\n String password = \"JANWILLEM2\";\n\n if (myConnection == null) {\n try {\n myConnection = DriverManager.getConnection(url, username, password);\n } catch (Exception exc) {\n exc.printStackTrace();\n }\n }\n\n return myConnection;\n }", "public static ConnectionSource cs() {\n String dbName = \"pegadaian\";\n String dbUrl = \"jdbc:mysql://localhost:3306/\" + dbName;\n String user = \"root\";\n String pass = \"catur123\";\n\n //inisiasi sumber koneksi\n ConnectionSource csInit = null;\n try {\n csInit = new JdbcConnectionSource(dbUrl, user, pass);\n } catch (SQLException ex) {\n Logger.getLogger(Koneksi.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //kembalikan hasil koneksi\n return csInit;\n\n }", "public Integer getNsxqId() {\n return nsxqId;\n }", "io.netifi.proteus.admin.om.Connection getConnection(int index);", "public void connectionEstablished(SctpChannel cnx){\n\thistory (\"connectionEstablished\");\n\t_connecting = false;\n\t_createdTime = System.currentTimeMillis ();\n\tmakeId ();\n\t_channel = _sctpChannel = cnx;\n\t_channel.setSoTimeout (_soTimeout);\n\t_sendOutBufferMonitor = _engine.getSendSctpBufferMonitor ();\n\t_sendMeter = _engine.getIOHMeters ().getSendSctpMeter ();\n\t_readMeter = _engine.getIOHMeters ().getReadSctpMeter ();\n\t_sendDroppedMeter = _engine.getIOHMeters ().getSendDroppedSctpMeter ();\n\tcnx.setWriteBlockedPolicy (AsyncChannel.WriteBlockedPolicy.IGNORE);\n\t_toString = new StringBuilder ()\n\t .append (\"SctpClientChannel[id=\").append (_id).append (\", remote=\").append (_remote).append (\", secure=\").append (_secure).append (']')\n\t .toString ();\n\tif (_logger.isEnabledFor (_engine.sctpConnectedLogLevel ()))\n\t _logger.log (_engine.sctpConnectedLogLevel (), _engine+\" : connected : \"+this);\n\tif (_shared){\n\t _engine.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getSctpChannels ().put (_id, this);\n\t if (_engine.uniqueSctpConnect ()){\n\t\t// we check that all pending agents are still there\n\t\tList<MuxClient> removed = new ArrayList<> (_connectingAgents.size ());\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t if (_engine.getMuxClientList ().contains (agent) == false)\n\t\t\tremoved.add (agent);\n\t\t}\n\t\tfor (MuxClient agent : removed){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+agent);\n\t\t agent.getMuxHandler ().sctpSocketConnected (agent, _id, _connectingAgents.get (agent), null, 0, null, 0, 0, 0, false, _secure, MuxUtils.ERROR_UNDEFINED);\n\t\t agent.getIOHMeters ().getFailedSctpChannelsConnectMeter ().inc (1);\n\t\t _connectingAgents.remove (agent);\n\t\t}\n\t\tif (_connectingAgents.size () == 0){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = new MuxClientList ();\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t MuxClientState state = new MuxClientState ()\n\t\t\t.stopped (_engine.getMuxClientList ().isDeactivated (agent))\n\t\t\t.connectionId (_connectingAgents.get (agent));\n\t\t agentJoined (agent, state); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t\t}\n\t\t_connectingAgents = null; // clean\n\t } else {\n\t\tif (_engine.getMuxClientList ().size () == 0){ // checking for _agent to see if it is open is too costly\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+_agent);\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = _engine.copyMuxClientList ();\n\t\titerateAgentConnected (_agentsList); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t }\n\t _agent = null; // clean\n\t} else {\n\t _agent.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _agent.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t if (_agent.isOpened () == false){\n\t\tclose (false, true); // the socket input exec will remain the agent thread --> monothreaded\n\t\treturn;\n\t }\n\t _agent.getSctpChannels ().put (_id, this);\n\t notifyOpenToAgent (_agent);\n\t}\n\tsetChannelInputExecutor ();\n\t_flowController = new FlowController (_channel, 1000, 10000, _exec); // _exec is set in setChannelInputExecutor\n\n\tif (_reconnect != null)\n\t for (Runnable r: _reconnect) r.run ();\n }", "public Zclass selectByCid(String xandc) {\n\t\tZclassExample example=new ZclassExample();\r\n\t\tcom.pdsu.stuManage.bean.ZclassExample.Criteria criteria=example.createCriteria();\r\n\t\tcriteria.andZcidEqualTo(xandc);\r\n\t\tList<Zclass>list=zclassMapper.selectByExample(example);\r\n\t\tif(list.size()!=0)\r\n\t\treturn list.get(0);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "Object getXtrc();", "Object getXtrc();", "private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\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\t\r\nreturn con;\r\n}", "public VoXtdzqx() {\n }", "public CamelContext getXNetContext() {\n CamelContext cctx;\n Map<String, Object> xnetComp = getXNetComponent();\n if (xnetComp == null || xnetComp.isEmpty()) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetContext()():No valid XNET routing handle found\");\n return null;\n }\n //+++ do not just return the context...\n //return this.camelContext;\n ActiveMQComponent amqComp = (ActiveMQComponent) xnetComp.get(\"ActiveMQComponent\");\n if (amqComp == null) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetContext()():No valid XNET handle found (No AMQ component)\");\n return null;\n }\n //... get and check the context of the highest identified processing\n cctx = amqComp.getCamelContext();\n //TODO check connection... otherwise throw error \"XNetConnectionError\"\n if (cctx == null || cctx.isSuspended()) {\n Log.log(Level.WARNING, LifeCARDAdmin.class.getName() + \":getXNetContext():\" + (cctx == null ? \"XNET context not present (null)\" : \"XNET context suspended \" + cctx.isSuspended()));\n return null;\n }\n return cctx;\n }", "protected boolean isXARequester()\n {\n return (getManagerLevel(CodePoint.XAMGR) >= 7);\n \n }", "private void openConnection(){}", "protected static Connection MySqlCustomersConnection() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = MySqlConn().getConnection();\n\t\t\treturn conn;\n\t\t}\n\t\tcatch (SQLException sqe){\n\t\t\tsqe.printStackTrace();\n\t\t}\n\t\treturn conn;\n\t}", "public void setCX(String cx) {\n\t\tthis.cx = cx;\r\n\t\tfirePropertyChange(ConstantResourceFactory.P_CX,null,cx);\r\n\t}", "@Override\n public Connection call() throws Exception {\n return createConnection();\n }", "public void connect(){\r\n\t\tSystem.out.println(\"Connecting to Sybase Database...\");\r\n\t}", "public XRemote xnext() throws Exception {\n\t\treturn xnextNode();\r\n\t}", "static void checkXAConnection(AssertableApplicationContext ctx) throws JMSException {\n\t\tXAConnection con = ctx.getBean(XAConnectionFactory.class).createXAConnection();\n\t\ttry {\n\t\t\tcon.setExceptionListener(exception -> {\n\t\t\t});\n\t\t\tassertThat(con.getExceptionListener().getClass().getName())\n\t\t\t\t\t.startsWith(\"brave.jms.TracingExceptionListener\");\n\t\t}\n\t\tfinally {\n\t\t\tcon.close();\n\t\t}\n\t}", "public void connect() throws IOException, XMPPException, SmackException {\n InetAddress addr = InetAddress.getByName(\"192.168.1.44\");\n HostnameVerifier verifier = new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return false;\n }\n };\n XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()\n .setXmppDomain(mApplicationContext.getString(R.string.txt_domain_name)) // name of the domain\n .setHost(mApplicationContext.getString(R.string.txt_server_address)) // address of the server\n .setResource(mApplicationContext.getString(R.string.txt_resource)) // resource from where your request is sent\n .setPort(5222) // static port number to connect\n .setKeystoreType(null) //To avoid authentication problem. Not recommended for production build\n .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)\n .setHostnameVerifier(verifier)\n .setHostAddress(addr)\n .setDebuggerEnabled(true)\n .setCompressionEnabled(true).build();\n\n //Set up the ui thread broadcast message receiver.\n setupUiThreadBroadCastMessageReceiver();\n\n mConnection = new XMPPTCPConnection(conf);\n mConnection.addConnectionListener(mOnConnectionListener);\n try {\n Log.d(TAG, \"Calling connect() \");\n mConnection.connect();\n Presence presence = new Presence(Presence.Type.available);\n mConnection.sendPacket(presence);\n\n Log.d(TAG, \" login() Called \");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n /**\n * Listener to receive the incoming message\n */\n\n ChatManager.getInstanceFor(mConnection).addIncomingListener(new IncomingChatMessageListener() {\n @Override\n public void newIncomingMessage(EntityBareJid messageFrom, Message message, Chat chat) {\n String from = message.getFrom().toString();\n\n String contactJid = \"\";\n if (from.contains(\"/\")) {\n contactJid = from.split(\"/\")[0];\n Log.d(TAG, \"The real jid is :\" + contactJid);\n Log.d(TAG, \"The message is from :\" + from);\n } else {\n contactJid = from;\n }\n\n //Bundle up the intent and send the broadcast.\n Intent intent = new Intent(XmppConnectionService.NEW_MESSAGE);\n intent.setPackage(mApplicationContext.getPackageName());\n intent.putExtra(XmppConnectionService.BUNDLE_FROM_JID, contactJid);\n intent.putExtra(XmppConnectionService.BUNDLE_MESSAGE_BODY, message.getBody());\n mApplicationContext.sendBroadcast(intent);\n Log.d(TAG, \"Received message from :\" + contactJid + \" broadcast sent.\");\n }\n });\n\n\n ReconnectionManager reconnectionManager = ReconnectionManager.getInstanceFor(mConnection);\n reconnectionManager.setEnabledPerDefault(true);\n reconnectionManager.enableAutomaticReconnection();\n\n }", "public cusRegister() throws ClassNotFoundException {\n initComponents();\n \n con = DBConnect.connection();\n }", "static void perform_dcx(String passed){\n\t\tint type = type_of_inx(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tdcx_rp(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public boolean isSetCnName() {\n return this.cnName != null;\n }", "boolean needSeparateConnectionForDdl();", "@GET\n @Path(\"/rest/{name}/{value}\")\n @Produces(MediaType.TEXT_XML)\n public String getXCRIXml(@PathParam(\"name\") String name, @PathParam(\"value\") String value) {\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer transformer;\n StringWriter buffer = new StringWriter();\n try {\n transformer = transFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n transformer.transform(new DOMSource(xcriSession.searchCatalog(name, value)), new StreamResult(buffer));\n } catch (TransformerConfigurationException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n } catch (TransformerException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n }\n return buffer.toString();\n\n\n }", "boolean hasXconnect(ConnectPoint cp);", "public void init() {\n\t\tXMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()\r\n//\t\t .setUsernameAndPassword(\"pwf\", \"123456\")\r\n//\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setHost(\"bdht-2016051604\")\r\n\t\t\t\t .setSecurityMode(SecurityMode.disabled)\r\n//\t\t\t\t .setCustomSSLContext(context)\r\n\t\t\t\t \r\n//\t\t .setHost(\"bdht-2016051604\")\r\n//\t\t .setPort(5222)\r\n\t\t .build();\r\n\r\n\t\tAbstractXMPPConnection connection = new XMPPTCPConnection(config);\r\n\t\t\r\n\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"BDHT-2016051604\");\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"192.168.1.121\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\t\r\n\t\t\tconnection.login(\"pwf1\", \"123456\");\r\n\t\t\t\r\n\t\t} catch (SmackException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (XMPPException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(connection.getUser());\r\n\t\t\r\n\t\tChatManager chatmanager = ChatManager.getInstanceFor(connection);\r\n\t\tChat newChat = chatmanager.createChat(\"admin\");\r\n\t\t\r\n//\t\tChat newChat = chatmanager.createChat(\"jsmith@jivesoftware.com\", new MessageListener() {\r\n//\t\t\tpublic void processMessage(Chat chat, Message message) {\r\n//\t\t\t\tSystem.out.println(\"Received message: \" + message);\r\n//\t\t\t}\r\n//\t\t});\r\n\t\t\r\n\t\ttry {\r\n\t\t\tnewChat.sendMessage(\"hello!!\");\r\n\t\t} catch (NotConnectedException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n//\t\tconnection.get\r\n//\t\tconnection.getChatManager().createChat(\"shimiso@csdn.shimiso.com\",null).sendMessage(\"Hello word!\");\r\n\t\t\r\n\t\tconnection.disconnect();\r\n\t\t\r\n\t\tSystem.out.println(\"end\");\r\n\t}", "public void setNsxqId(Integer nsxqId) {\n this.nsxqId = nsxqId;\n }", "@Override\n public int prepare(final Xid _xid)\n {\n if (VFSStoreResource.LOG.isDebugEnabled()) {\n VFSStoreResource.LOG.debug(\"prepare (xid=\" + _xid + \")\");\n }\n return 0;\n }", "public void setCxcode(java.lang.String cxcode) {\r\r\r\r\r\r\r\n this.cxcode = cxcode;\r\r\r\r\r\r\r\n }", "public void setXq(String xq) {\n\t\tthis.xq = xq;\n\t}", "@Override\r\n protected void onConnected() {\n \r\n }", "@Test\n public void testGetSdsConnection() {\n System.out.println(\"getSdsConnection\");\n SDSconnection expResult = null;\n SDSconnection result = instance.getSdsConnection();\n assertEquals(expResult, result);\n }", "@Override\n\tpublic IConnection execute(String mode) {\n\t\t\n \t\tIConnectionFactory factory = null;\n\t\tfactory = new FastBillConnectionFactory();\n \t\tIConnection connection = factory.createConnection();\n \t\treturn connection;\n \t\t\n\t}", "private void setConnection (TwGateway newCxn) {\n boolean connected = (newCxn != null);\n closeXn.setEnabled (connected);\n openXn.setEnabled (!connected);\n getWksp.setEnabled (connected);\n KbWorkspace[] showingWorkspaces = multiWkspView.getWorkspaces ();\n System.out.println (\"Removing \" + showingWorkspaces.length + \" workspaces!\");\n for (int i=0; i<showingWorkspaces.length; i++)\n multiWkspView.removeWorkspace (showingWorkspaces[i]);\n Rectangle frameRect = getCurrentFrame().getBounds ();\n getCurrentFrame().setBounds(frameRect.x, frameRect.y,\n\t\t\t\tframeRect.width + 1, frameRect.height + 1);\n connection = newCxn;\n }", "public Connection getConn() {\n\ttry {\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tcn=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521/pocdb\",\"PL\",\"PL\");\n\t\t\n\t}\n\tcatch(ClassNotFoundException ce)\n\t{\n\t\tce.printStackTrace();\n\t\t\n\t}\n\tcatch(SQLException se)\n\t{\n\t\tse.printStackTrace();\n\t\t\n\t}\n\t\n\t\n\treturn cn;\n\t\n\n}", "private void createChannelAccess(Nx100Type config) throws FactoryException {\n \t\ttry {\n \t\t\tjobChannel = channelManager.createChannel(config.getJOB().getPv(), false);\n \t\t\tstartChannel = channelManager.createChannel(config.getSTART().getPv(), false);\n \t\t\tholdChannel = channelManager.createChannel(config.getHOLD().getPv(), false);\n \t\t\tsvonChannel = channelManager.createChannel(config.getSVON().getPv(), false);\n \t\t\terrChannel = channelManager.createChannel(config.getERR().getPv(), errls, false);\n \n \t\t\t// acknowledge that creation phase is completed\n \t\t\tchannelManager.creationPhaseCompleted();\n \t\t} catch (Throwable th) {\n \t\t\tthrow new FactoryException(\"failed to create all channels\", th);\n \t\t}\n \t}", "public JNDIConnector(Context context, String name) throws ValidationException {\n this(name);\n this.context = context;\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "private void createProxyConnection() throws ClusterDataAdminException {\n ClusterMBeanDataAccess clusterMBeanDataAccess = ClusterAdminComponentManager.getInstance().getClusterMBeanDataAccess();\n try{\n failureDetectorMBean= clusterMBeanDataAccess.locateFailureDetectorMBean();\n }\n catch(Exception e){\n throw new ClusterDataAdminException(\"Unable to locate failure detector MBean connection\",e,log);\n }\n }", "@Bean\n public ConnectionFactory connectionFactory(){\n ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();\n activeMQConnectionFactory.setBrokerURL(brokerUrl);\n activeMQConnectionFactory.setUserName(brokerUsername);\n activeMQConnectionFactory.setPassword(brokerPassword);\n return activeMQConnectionFactory;\n }", "protected PKCS11Connector() { /* left empty intentionally */\n }", "private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }", "protected void connectionEstablished() {}", "public Component(Reference xmlConfigReference) {\r\n this();\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n dbf.setNamespaceAware(false);\r\n dbf.setValidating(false);\r\n \r\n try {\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document document = db.parse(new FileInputStream(\r\n new LocalReference(xmlConfigReference).getFile()));\r\n \r\n // Look for clients\r\n NodeList clientNodes = document.getElementsByTagName(\"client\");\r\n \r\n for (int i = 0; i < clientNodes.getLength(); i++) {\r\n Node clientNode = clientNodes.item(i);\r\n Node item = clientNode.getAttributes().getNamedItem(\"protocol\");\r\n Client client = null;\r\n \r\n if (item == null) {\r\n item = clientNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (item != null) {\r\n String[] protocols = item.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n client = new Client(getContext(), protocolsList);\r\n }\r\n } else {\r\n client = new Client(getContext(), getProtocol(item\r\n .getNodeValue()));\r\n }\r\n \r\n if (client != null) {\r\n this.getClients().add(client);\r\n }\r\n }\r\n \r\n // Look for servers\r\n NodeList serverNodes = document.getElementsByTagName(\"server\");\r\n \r\n for (int i = 0; i < serverNodes.getLength(); i++) {\r\n Node serverNode = serverNodes.item(i);\r\n Node node = serverNode.getAttributes().getNamedItem(\"protocol\");\r\n Node portNode = serverNode.getAttributes().getNamedItem(\"port\");\r\n Server server = null;\r\n \r\n if (node == null) {\r\n node = serverNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (node != null) {\r\n String[] protocols = node.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n int port = getInt(portNode, Protocol.UNKNOWN_PORT);\r\n \r\n if (port == Protocol.UNKNOWN_PORT) {\r\n getLogger()\r\n .warning(\r\n \"Please specify a port when defining a list of protocols.\");\r\n } else {\r\n server = new Server(getContext(), protocolsList,\r\n getInt(portNode, Protocol.UNKNOWN_PORT),\r\n this.getServers().getTarget());\r\n }\r\n }\r\n } else {\r\n Protocol protocol = getProtocol(node.getNodeValue());\r\n server = new Server(getContext(), protocol, getInt(\r\n portNode, protocol.getDefaultPort()), this\r\n .getServers().getTarget());\r\n }\r\n \r\n if (server != null) {\r\n this.getServers().add(server);\r\n }\r\n \r\n // Look for default host\r\n NodeList defaultHostNodes = document\r\n .getElementsByTagName(\"defaultHost\");\r\n \r\n if (defaultHostNodes.getLength() > 0) {\r\n parseHost(this.getDefaultHost(), defaultHostNodes.item(0));\r\n }\r\n \r\n // Look for other virtual hosts\r\n NodeList hostNodes = document.getElementsByTagName(\"host\");\r\n \r\n for (int j = 0; j < hostNodes.getLength(); j++) {\r\n VirtualHost host = new VirtualHost();\r\n parseHost(host, hostNodes.item(j));\r\n this.getHosts().add(host);\r\n }\r\n }\r\n \r\n // Look for internal router\r\n NodeList internalRouterNodes = document\r\n .getElementsByTagName(\"internalRouter\");\r\n \r\n if (internalRouterNodes.getLength() > 0) {\r\n Node node = internalRouterNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\r\n \"defaultMatchingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setDefaultMatchingMode(\r\n getInt(item, getInternalRouter()\r\n .getDefaultMatchingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"maxAttempts\");\r\n if (item != null) {\r\n this.getInternalRouter().setMaxAttempts(\r\n getInt(item, this.getInternalRouter()\r\n .getMaxAttempts()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"routingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setRoutingMode(\r\n getInt(item, this.getInternalRouter()\r\n .getRoutingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"requiredScore\");\r\n if (item != null) {\r\n this.getInternalRouter().setRequiredScore(\r\n getFloat(item, this.getInternalRouter()\r\n .getRequiredScore()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"retryDelay\");\r\n if (item != null) {\r\n this.getInternalRouter().setRetryDelay(\r\n getLong(item, this.getInternalRouter()\r\n .getRetryDelay()));\r\n }\r\n \r\n // Loops the list of \"attach\" instructions\r\n setAttach(getInternalRouter(), node);\r\n }\r\n \r\n // Look for logService\r\n NodeList logServiceNodes = document\r\n .getElementsByTagName(\"logService\");\r\n \r\n if (logServiceNodes.getLength() > 0) {\r\n Node node = logServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"logFormat\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLogFormat(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"loggerName\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLoggerName(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getLogService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"identityCheck\");\r\n \r\n if (item != null) {\r\n this.getLogService().setIdentityCheck(\r\n getBoolean(item, true));\r\n }\r\n }\r\n \r\n // Look for statusService\r\n NodeList statusServiceNodes = document\r\n .getElementsByTagName(\"statusService\");\r\n \r\n if (statusServiceNodes.getLength() > 0) {\r\n Node node = statusServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"contactEmail\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setContactEmail(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"homeRef\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setHomeRef(\r\n new Reference(item.getNodeValue()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"overwrite\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setOverwrite(getBoolean(item, true));\r\n }\r\n }\r\n } catch (Exception e) {\r\n getLogger().log(Level.WARNING,\r\n \"Unable to parse the Component XML configuration.\", e);\r\n }\r\n }", "public CAdxWebServiceXmlCC getCAdxWebServiceXmlCC() throws ServiceException {\n\t\treturn null;\n\t}", "public boolean jmxBind() {\n\t\ttry {\n\t\t\tString sUrl = \"service:jmx:rmi:///jndi/rmi://\" + hostname + \":\" + port + \"/jmxrmi\";\n\t\t\tLOGGER.info(\"Connecting to remote engine on : \" + sUrl);\n\t\t\turl = new JMXServiceURL(sUrl);\n\t\t\tjmxC = new RMIConnector(url, null);\n\t\t\tjmxC.connect();\n\t\t\tjmxc = jmxC.getMBeanServerConnection();\n\t\t\tObjectName lscServerName = new ObjectName(\"org.lsc.jmx:type=LscServer\");\n\t\t\tlscServer = JMX.newMXBeanProxy(jmxc, lscServerName, LscServer.class, true);\n\t\t\treturn true;\n\t\t} catch (MalformedObjectNameException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (NullPointerException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t}\n\t\treturn false;\n\t}", "public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}", "@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}", "protected static JdbcChannel connectionReserve(CallContext cx, Bindings bindings)\n throws ProcedureException {\n \n String str;\n Object obj;\n \n obj = bindings.getValue(BINDING_DB);\n if (obj instanceof String) {\n obj = cx.connectionReserve((String) obj);\n }\n if (!JdbcChannel.class.isInstance(obj)) {\n str = \"connection not of JDBC type: \" + obj.getClass().getName();\n throw new ProcedureException(str);\n }\n return (JdbcChannel) obj;\n }", "public JNDIConnector() {\n super();\n }", "public void start() throws XCFException {\n\t\tpushScope();\n\t\taddConvention(\"validator\", \".request.parameter.VALIDATOR_\");\n\t\taddConvention(\"setter\", \".request.parameter.SETTER_\");\n\t\taddConvention(\"saxel\", \".builder.SAXEL_\");\n\t\taddConvention(\"instruction\", \".request.processor.instructions.INSTRUCTION_\");\n\t\t\n\t\taddPackage(\"com.eternal.xcf\");\n\t\taddPackage(\"com.eternal.xcf.common\");\n\t}", "public void setXknr(String xknr) {\n\t\tthis.xknr = xknr;\n\t}", "public boolean isSetCnsCidadao() {\n return this.cnsCidadao != null;\n }", "public void setLookupIdStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"select \" + ALL_COLS + \n\t\t \" from \" + TABLE_NAME + \n\t\t \" where \" + ID_COL + \" = ? \";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "@Override\r\n\tpublic List<Ccspxxb> selectCcspxx() {\n\t\t\r\n\t\treturn ccspxxbMapper.selectByExample(null);\r\n\t}", "@Override\n public int getConnectionPort() {\n return 10083;\n }", "@Override\n protected void startConnection() throws CoreException {\n }", "public static void proxy(String param) {\n String url = \"http://192.168.10.80:8183/pacsChannel?wsdl\";\n String portTypeName = \"pacsChannel\";//\"receiveCheckApply\";\n try {\n QName qname = new QName(\"http://serv.pacs.senyint.com/\", portTypeName);\n Service service = Service.create(new URL(url), qname);\n // service.addPort(qname, SOAPBinding.SOAP11HTTP_BINDING, url);\n // service.getPort()\n PacsChannel testService = service.getPort(/*new QName(tsn, port name), */PacsChannel.class);\n System.out.println(testService.invoke(\"receiveCheckApply\", param));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void checkConnectivity() throws NotConnected\n\t{\n\t\tif (!s_ctx.isConnected())\n\t\t{\n\t\t\tthrow new NotConnected(\"Cannot operate: not conected to context\");\n\t\t}\n\t}", "public static void openConnection() {\n try {\n connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"system\", \"kevin2000\");\n connection.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void onConnectToNetByIPSucces();", "public void setConn(Connection conn) {this.conn = conn;}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void initialiseCRISTDiscovery() {\n\t}", "public EPPSecDNSExtUpdate() {}", "protected IPhynixxConnectionProxy getObservableProxy() {\n\t\t\treturn null;\r\n\t\t}", "public void process(EdaContext xContext) throws IcofException {\n\n\t// Connect to the database\n\tconnectToDB(xContext);\n\n\t// Determine if branch/component are for a production or development TK.\n\tfindToolKit(xContext);\n\trollBackDBAndSetReturncode(xContext, APP_NAME, SUCCESS);\n\n }", "public void setCCN(int ccn0){\n\t\tccn = ccn0;\n\t}", "public boolean checkConnection() {\n\treturn getBoolean(ATTR_CONNECTION, false);\n }", "public void setXmlx(java.lang.String param) {\r\n localXmlxTracker = param != null;\r\n\r\n this.localXmlx = param;\r\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.enumerateXAConnectionFactory();\n int int0 = connectionFactories0.getConnectionFactoryCount();\n assertEquals(0, int0);\n }", "private void establishConnection() throws ClassNotFoundException, SQLException {\r\n\t \t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t String conUrl = \"jdbc:oracle:thin:@localhost:1521:XE\";\r\n\t String uname = \"system\";\r\n\t\t\tString pwd = \"sathar205\";\r\n\t con = DriverManager.getConnection(conUrl,uname,pwd);\r\n\t }", "public void initializeConnection() {\n\n cluster = Cluster.builder().addContactPoint(host).build();\n session = cluster.connect(keyspaceName);\n session.execute(\"USE \".concat(keyspaceName));\n }", "public RXC getRXC() { \r\n return getTyped(\"RXC\", RXC.class);\r\n }", "private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }", "public java.lang.String getCxcode() {\r\r\r\r\r\r\r\n return cxcode;\r\r\r\r\r\r\r\n }", "@Ignore\n @Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Util.commonServiceIPs = \"127.0.0.1\";\n PooledConnection expResult = null;\n try {\n long ret = JMSUtil.getQueuePendingMessageCount(\"127.0.0.1\",\"localhost\",CommonKeys.INDEX_REQUEST);\n fail(\"The test case is a prototype.\");\n }\n catch(Exception e)\n {\n \n } \n }", "public XMLDatabaseConnector()\n\t{\n\t\t\n\t\tProperties prop = new Properties();\n\t\t\n\t\t InputStream inputStream = this.getClass().getClassLoader()\n\t .getResourceAsStream(\"config.properties\");\n\t\t \n \ttry {\n //load a properties file\n \t\tprop.load(inputStream);\n \n //get the property value and print it out\n \t\tsetURI(prop.getProperty(\"existURI\"));\n \t\tusername = prop.getProperty(\"username\");\n \t\tpassword = prop.getProperty(\"password\");\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n\t}", "void getConnection() {\n }", "public contrustor(){\r\n\t}", "public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}", "DBConnect() {\n \n }" ]
[ "0.53064364", "0.5220932", "0.51949483", "0.5146956", "0.51329076", "0.50948656", "0.50758404", "0.50438434", "0.49969062", "0.499373", "0.4981579", "0.49767327", "0.4972163", "0.49536583", "0.4929786", "0.49046612", "0.48441488", "0.4831414", "0.4830681", "0.48295915", "0.48124036", "0.48068672", "0.4806557", "0.4792564", "0.4792564", "0.4783227", "0.47786406", "0.4775227", "0.4713116", "0.47128358", "0.47084382", "0.4697986", "0.46834236", "0.46753126", "0.46716475", "0.46669582", "0.46570486", "0.4656839", "0.46458334", "0.4638603", "0.4622663", "0.46175605", "0.46161962", "0.46154898", "0.46106455", "0.4584667", "0.45828784", "0.45820668", "0.4577838", "0.45743713", "0.4569163", "0.45665866", "0.45630774", "0.4560568", "0.45597905", "0.45521995", "0.45398325", "0.45389578", "0.45337263", "0.45317784", "0.4521721", "0.452055", "0.45149106", "0.45140877", "0.45083082", "0.45071304", "0.45066616", "0.4506083", "0.44993043", "0.44966912", "0.4493784", "0.44918618", "0.44883004", "0.44867343", "0.44860452", "0.44841218", "0.44832742", "0.44784608", "0.44779012", "0.4475435", "0.44751963", "0.44751963", "0.44736755", "0.44735968", "0.4472711", "0.4471323", "0.4469383", "0.44633746", "0.44622663", "0.4459921", "0.44598195", "0.44556513", "0.44548798", "0.44538134", "0.44513872", "0.4447234", "0.44465938", "0.4429108", "0.4427713", "0.44203046", "0.44125736" ]
0.0
-1
/ Delete a Transaction from a database
@Override public void delete(Seq s) { // TODO Auto-generated method stub //Establish cnx Connection conn = null; String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; try { conn = DriverManager.getConnection(url); PreparedStatement myStmt; String query = "delete from seq where id = ?"; myStmt = conn.prepareStatement(query); // Set Parameters myStmt.setInt(1, s.getId()); // Execute SQL query int res = myStmt.executeUpdate(); // Display the record inserted System.out.println(res + " seq deleted"); // Close the connection conn.close(); }catch (SQLException e) { System.out.println(e.getMessage());} finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteTransaction() {\n\t\tconn = MySqlConnection.ConnectDb();\n\t\tString sqlDelete = \"delete from Account where transactionID = ?\";\n\t\ttry {\n\t\t\t\n\t\t\tps = conn.prepareStatement(sqlDelete);\n\t\t\tps.setString(1, txt_transactionID.getText());\n\t\t\tps.execute();\n\n\t\t\tUpdateTransaction();\n\t\t} catch (Exception e) {\n\t\t}\n\t}", "public boolean delete(Transaction transaction) throws Exception;", "public void deleteTransactionById(int id);", "@Override\n\tpublic void deleteTransaction(Transaction transaction) {\n\n\t}", "@Override\n\tpublic void delete(Integer transactionId) {\n\n\t}", "int deleteByExample(TransactionExample example);", "public void deleteTransaction(int id) throws SQLException {\n String sql = \"DELETE FROM LabStore.Transaction_Detail WHERE id = ?\";\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, id);\n preStmt.executeUpdate();\n }\n }", "public void deleteAllTransactions();", "@Test(groups = \"Transactions Tests\", description = \"Delete transaction\")\n\tpublic void deleteTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Edited Transaction test\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted\");\n\n\t\t//Testing if there no transaction in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted from the 'Double Entry' account\");\n\n\t}", "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "void rollbackTransaction();", "int delete(Long id) throws SQLException, DAOException;", "public void delete(IQuery query) throws SQLException;", "public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }", "public boolean deleteTransaction(String uid){\n return deleteRecord(getID(uid));\n\t}", "@Override\n public boolean delete(String idTransaksi) {\n try {\n String query = \"DELETE FROM transaksi WHERE id = ?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, idTransaksi);\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "public T delete(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createDelete(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Delete \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t\treturn null;\n\t}", "public static void deshacerTransaccion() {\n try {\n con.rollback();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void delete(Connection connection, Salary salary) throws SQLException {\n\r\n\t}", "int deleteByPrimaryKey(Long signinfoid) throws SQLException;", "@Override\n\t@Transactional\n\tpublic void deleteFundTransaction(Long fundTransactionId) throws InstanceNotFoundException {\n\t\tlogger.debug(\">>deleteFundTransaction\");\n\t\tfundTransactionDao.remove(fundTransactionId);\n\t\tlogger.debug(\"deleteFundTransaction>>\");\n\t}", "@Override\n public Nary<Void> applyWithTransactionOn(TransactionContext transactionContext) {\n String deleteHql = \"DELETE FROM \" + persistentType.getName() + \" WHERE id = :deletedId\";\n Session session = transactionContext.getSession();\n Query deleteQuery = session.createQuery(deleteHql);\n deleteQuery.setParameter(\"deletedId\", deletedId);\n int affectedRows = deleteQuery.executeUpdate();\n if(affectedRows != 1){\n LOG.debug(\"Deletion of {}[{}] did not affect just 1 row: {}\", persistentType, deletedId, affectedRows);\n }\n // No result expected from this operation\n return Nary.empty();\n }", "void delete ( int id ) throws DAOException;", "@Override\n\t\tpublic boolean delete(AccountTransaction t, int id) {\n\t\t\treturn false;\n\t\t}", "public void delete() throws Exception\n {\n dao.delete(this);\n }", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "public long delete(Entity entity){\r\n\t\ttry {\r\n\t\t\tthis.prepareFields(entity, true);\r\n\t\t\tString tableName = this.getTableName();\r\n\t\t\tTransferObject to = new TransferObject(\r\n\t\t\t\t\t\ttableName,\r\n\t\t\t\t\t\tprimaryKeyTos,\r\n\t\t\t\t\t\tfieldTos, \r\n\t\t\t\t\t\tTransferObject.DELETE_TYPE);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\treturn transactStatements(to);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"GPALOG\" , e.getMessage(),e); \r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "int delete(T data) throws SQLException, DaoException;", "void endTransaction();", "@Override\r\n\tpublic void deleteAd(int tid) {\n\t\tQuery query = (Query) session.createQuery(\"delete EP where pid=:id\");\r\n\t\tquery.setParameter(\"id\", tid);\r\n\t\tquery.executeUpdate();//删除\r\n\t\ttr.commit();//提交事务\r\n\t}", "int deleteById(ID id) throws SQLException, DaoException;", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "public abstract boolean delete(long arg, Connection conn) throws DeleteException;", "public void delete(int id) throws DAOException;", "@Test\n public void deleteTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.delete(1);\n Servizio servizio= manager.retriveById(1);\n assertNull(servizio,\"Should return true if delete Servizio\");\n }", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}", "@Override\r\n\tpublic void delete() {\n\t\tString delete=\"DELETE FROM members WHERE id =?\";\r\n\t\t try(Connection connection=db.getConnection();) {\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(delete);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t \tpreparedStatement.executeUpdate();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction successful\");\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t}\r\n\t}", "public void doDelete(T objectToDelete) throws SQLException;", "@DeleteMapping(\"/{id}\")\n\tpublic Transaction deleteTransactionById(@PathVariable Long id) {\n\t\tTransaction deletedTransaction = null;\n\t\t\n\t\ttry {\n\t\t\tdeletedTransaction = transactionService.deleteTransactionById(id);\n\t\t} \n\t\tcatch (TransactionNotFoundException e) {\n\t\t\tthrow new TransactionNotFoundException(id);\n\t\t}\n\t\tcatch (UserDoesNotOwnResourceException e) {\n\t\t\tthrow new UserDoesNotOwnResourceException();\n\t\t}\n\t\t\n\t\treturn deletedTransaction;\n\t}", "public void dropDB() throws SQLException {\n\t \t\tStatement stmt = cnx.createStatement();\n\t \t\tString[] tables = {\"account\", \"consumer\", \"transaction\"};\n\t \t\tfor (int i=0; i<3;i++) {\n\t \t\t\tString query = \"DELETE FROM \" + tables[i];\n\t \t\t\tstmt.executeUpdate(query);\n\t \t\t}\n\t \t}", "void rollback(Transaction transaction);", "@Override\n public boolean deletePurchase(Connection connection, Long purchaseID) throws SQLException {\n PreparedStatement ps = null;\n try{\n // Prepare the statement\n String deleteSQL = \"DELETE FROM Purchase WHERE purchaseID = ?;\";\n ps = connection.prepareStatement(deleteSQL);\n ps.setLong(1, purchaseID);\n ps.executeUpdate();\n \n return true;\n }\n catch(Exception ex){\n ex.printStackTrace();\n //System.out.println(\"Exception in ContainerDaoImpl.retrieveContainer()\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n \n return false;\n }\n }", "public void deleteFoodBill(Bill deleteFood) {\nString sql =\"DELETE FROM bills WHERE Id_food = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteFood.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}", "@Override\r\n\tpublic void delete(Activitat activitat) {\r\n\t\t/*queryString = \"DELETE FROM activitats WHERE ID_ACTIVITAT = ?\";\r\n\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\ts.setInt(1, activitat.geti);\r\n\r\n\t\t\ts.execute();\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*/\r\n\t\t\r\n\t}", "int deleteByPrimaryKey(String debtsId);", "public boolean deleteTransaction(User user, long transactionId) {\n Optional<Transaction> optional = transactionDAO.findById(user, transactionId);\n if(optional.isPresent()) {\n Transaction transaction = optional.get();\n Budget budget = transaction.getBudget();\n budget.setActual(budget.getActual() - transaction.getAmount());\n transactionDAO.delete(transaction);\n return true;\n }\n return false;\n }", "@Delete({\n \"delete from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);", "@Transactional\r\n public void deleteCommande(Integer theId) {\n \tcommandeDao.deleteById(theId);\r\n }", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "public void eliminar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //eliminamos el Dia\n session.delete(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n }", "protected abstract void abortTxn(Txn txn) throws PersistException;", "public void delete() throws EntityPersistenceException {\n\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ProjectTransactionRecord : {}\", id);\n projectTransactionRecordRepository.delete(id);\n }", "@Test\r\n public void testDelete() throws Exception {\r\n System.out.println(\"delete\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n instance.delete(obj);\r\n try {\r\n instance.read(obj.getIdbur());\r\n fail(\"exception de record introuvable non générée\");\r\n }\r\n catch(SQLException e){}\r\n //TODO vérifier qu'on a bien une exception en cas de record parent de clé étrangère\r\n }", "@Delete({\n \"delete from payment_t_weixin_callback_records\",\n \"where ID = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);", "@Transactional\n\tpublic void delete(Long id_interesado) {\n\t\tinteresadoDao.deleteById(id_interesado);\n\t\t\n\t}", "void rollback() {\r\n tx.rollback();\r\n tx = new Transaction();\r\n }", "public long delete(long id) throws Exception\n\t{\n\t\tthis.updateStatus(id, SETTConstant.TransactionStatus.DELETED);\n\t\treturn id;\n\t}", "public boolean deleteAccountTransactions(AccountTransaction t) {\n\t\t\ttry(Connection conn = ConnectionUtil.getConnection();){\n\t\t\t\tString sql = \"INSERT INTO archive_account_transactions \"\n\t\t\t\t\t\t+ \"(transaction_id,account_id_fk,trans_type,\"\n\t\t\t\t\t\t+ \"debit,credit,signed_amount,running_balance,\"\n\t\t\t\t\t\t+ \"status,memo,user_id_fk,transaction_dt,deleted_by) \"\n\t\t\t\t\t\t+ \"SELECT transaction_id,account_id_fk,trans_type, \"\n\t\t\t\t\t\t+ \"debit,credit,signed_amount,running_balance,\" \n\t\t\t\t\t\t+ \"status,memo,user_id_fk,transaction_dt, ? \"\n\t\t\t\t\t\t+ \"FROM account_transactions \"\n\t\t\t\t\t\t+ \"WHERE account_id_fk = ?;\";\t\t\t\t\t\t\n\t\t\t\tPreparedStatement statement = conn.prepareStatement(sql);\n\t\t\t\tstatement.setInt(1,t.getUserId());\n\t\t\t\tstatement.setInt(2,t.getAccountId());\n\t\t\t\t\n\t\t\t\tint iCount = statement.executeUpdate();\n\t\t\t\t\n\t\t\t\tsql = \t\"DELETE \"\n\t\t\t\t\t\t+ \"FROM account_transactions \"\n\t\t\t\t\t\t+ \"WHERE account_id_fk = ?;\";\t\t\t\t\t\t\n\t\t\t\tstatement = conn.prepareStatement(sql);\n\t\t\t\tstatement.setInt(1,t.getAccountId());\n\t\t\t\t\n\t\t\t\tint dCount = statement.executeUpdate();\n\t\t\t\t\n//\t\t\t\tSystem.out.println(iCount);\n//\t\t\t\tSystem.out.println(dCount);\n\t\t\t\t\n\t\t\t\t//Did you delete the same # of transactions as you moved to archive\n\t\t\t\treturn iCount == dCount;\n\t\t\t\t\t\t\t\t\n\t\t\t}catch(SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn false;\n\t\t\t\n\t\t}", "@Override\n\tpublic void delete(Integer id) throws SQLException {\n\t\t\n\t}", "int deleteByPrimaryKey(String taxregcode);", "public int delegateDeleteTx(LdPublisher entity) {\r\n assertEntityNotNullAndHasPrimaryKeyValue(entity);\r\n filterEntityOfDelete(entity);\r\n assertEntityOfDelete(entity);\r\n return getMyDao().delete(entity);\r\n }", "@Override\n\tpublic void delete(Connection c, Integer id) throws SQLException {\n\n\t}", "public void closeTransaction(){\n\t\ttr.rollback();\n\t\ttr = null;\n\t}", "@Delete({\n \"delete from tb_express_trace\",\n \"where order_id = #{orderId,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String orderId);", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "public void delete(Ausschreibung as) {\r\n\r\n\t\t// DB-Verbindung herstellen\r\n\t\tConnection con = DBConnection.connection();\r\n\r\n\t\ttry {\r\n\t\t\t// Leeres SQL-Statement (JDBC) anlegen\r\n\t\t\tStatement stmt = con.createStatement();\r\n\r\n\t\t\t// Jetzt erst erfolgt die tatsaechliche Einfuegeoperation.\r\n\t\t\tstmt.executeUpdate(\"DELETE FROM ausschreibung WHERE ID=\" + as.getId());\r\n\t\t} catch (SQLException e3) {\r\n\t\t\te3.printStackTrace();\r\n\t\t}\r\n\t}", "int deleteByExample(PaymentTradeExample example);", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "@Transactional\n\t@Override\n\tpublic String delete(Detail t) {\n\t\treturn null;\n\t}", "void deleteAccount(Account account) throws SQLException {\n String query = \"DELETE FROM CARD WHERE id = ?;\";\n PreparedStatement pstm = conn.prepareStatement(query);\n pstm.setInt(1, account.getId());\n\n int result = pstm.executeUpdate();\n }", "@Override\n\tpublic int delete(Subordination entity) throws DBOperationException {\n\t\tPreparedStatement statement = null;\n\t\tint result;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(SUBORDINATION_DELETE_ID);\n\t\t\tstatement.setInt(1, entity.getId());\n\t\t\tresult = statement.executeUpdate();\n\t\t\tstatement.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DBOperationException(\"Subordination not deleted. DB error.\", e);\n\t\t} \n\t\treturn result;\n\t}", "public void delete(Transaction tx,Tuple old) throws RelationException;", "@Test\n @DisplayName(\"Testataan tilausten poisto tietokannasta\")\n void deleteReservation() {\n TablesEntity table = new TablesEntity();\n table.setSeats(2);\n tablesDao.createTable(table);\n\n ReservationsEntity reservation = new ReservationsEntity(\"Antero\", \"10073819\", new Date(System.currentTimeMillis()), table.getId(), new Time(1000), new Time(2000));\n reservationsDao.createReservation(reservation);\n\n // Confirm that the reservation is in DB\n ReservationsEntity reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(reservation, reservationFromDb);\n\n // Delete reservation and confirm that it's not in the DB\n reservationsDao.deleteReservation(reservation);\n\n reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(null, reservationFromDb);\n\n }", "public void delete(Accomodation accomodation) {\n\t\ttry (Connection conn = newConnection(\"postgresql\", \"localhost\", \"5432\", \"Booking\", \"postgres\", \"portocaliu\");\n\t\t\t\tPreparedStatement stm = conn.prepareStatement(\"DELETE FROM accomodation\");) {\n\n\t\t\tstm.executeUpdate();\n\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t}", "public static String delete(Connection conn, Long patientId) throws Exception {\r\n String result = null;\r\n Statement stmt;\r\n conn.setAutoCommit(false);\r\n stmt = conn.createStatement();\r\n stmt.execute(\"START TRANSACTION;\");\r\n stmt.execute(\"SET FOREIGN_KEY_CHECKS = 0;\");\r\n String sql = \"DELETE pregnancy FROM pregnancy \" +\r\n \"WHERE pregnancy.patient_id=\" + patientId;\r\n stmt.execute(sql);\r\n stmt.execute(\"Commit\");\r\n result = \"Pregnancy records deleted.\";\r\n try {\r\n conn.commit();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return result;\r\n }", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "@Delete({ \"delete from public.tb_sistema\", \"where id_sistema = #{idSistema,jdbcType=INTEGER}\" })\n\tint deleteByPrimaryKey(Integer idSistema);", "CustomDeleteQuery deleteFrom(String table) throws JpoException;", "int deleteByPrimaryKey(Long catalogId);", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "int deleteByExample(CmstTransfdeviceExample example);", "int deleteByPrimaryKey(String idTipoComprobante) throws SQLException;", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "public void delete(int id) throws SQLException {\n\t\t\r\n\t}", "public int delete(GenericEntity entity) throws GenericEntityException {\n SQLProcessor sqlP = new AutoCommitSQLProcessor(helperName);\n\n try {\n return deleteImpl(entity, sqlP.getConnection());\n } catch (GenericDataSourceException e) {\n sqlP.rollback();\n throw new GenericDataSourceException(\"Exception while deleting the following entity: \" + entity.toString(), e);\n } finally {\n closeSafely(entity, sqlP);\n }\n }", "public void borrarempleado(Empleado empleado)throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n EmpleadosDatos empleadodatos = new EmpleadosDatos();\n empleadodatos.delete(empleado);\n conexion.commit();\n System.out.println(\"Empleado borrado\");\n }catch(SQLException e){\n System.out.println(\"Error en borrado, entramos a rollback\");\n try{\n conexion.rollback();\n }catch(SQLException ex){\n System.out.println(\"Error en rollback\");\n }\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }", "@Override\n public void run() {\n\n String filename = \"PurgeTable\";\n\n PreparedStatement stmt1 = null;\n try {\n stmt1 = conn.prepareStatement(\"delete from \" + filename);\n stmt1.executeUpdate();\n System.out.println(\"Deletion successful\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public int delete( Integer idConge ) ;", "public int delete( Conge conge ) ;", "@Override\r\n\tpublic void delete(SimpleJdbcTemplate template) throws Exception {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "void eliminar(PK id);", "int deleteByExample(CTipoComprobanteExample example) throws SQLException;", "public static int delete(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from periode where id=?\"); \n ps.setInt(1,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "public void deleteByRelation(int id) throws DAOException;", "@Override\n\tpublic void deleteById(int id) throws SQLException {\n\n\t}" ]
[ "0.7987224", "0.79402834", "0.7884129", "0.77736926", "0.73399645", "0.7277107", "0.7218799", "0.69951195", "0.685263", "0.6852366", "0.661323", "0.66066396", "0.6596783", "0.6592654", "0.6557053", "0.6526412", "0.6490731", "0.6487719", "0.64681685", "0.6459139", "0.64576375", "0.6443701", "0.64420843", "0.64394414", "0.64344084", "0.64045614", "0.6377989", "0.637338", "0.6373257", "0.6371361", "0.6366982", "0.6364809", "0.63566095", "0.6354791", "0.63478225", "0.6338651", "0.63337517", "0.6317311", "0.63110244", "0.63011956", "0.6294265", "0.62815505", "0.6274243", "0.62728995", "0.62724096", "0.6255134", "0.6254325", "0.62502176", "0.6243736", "0.6241308", "0.62356025", "0.6234418", "0.6234418", "0.6230214", "0.6223874", "0.6219684", "0.6200006", "0.61892396", "0.6173437", "0.6169245", "0.61630654", "0.61561894", "0.6155715", "0.61550725", "0.61416215", "0.61408174", "0.6139573", "0.6136706", "0.6130249", "0.6128522", "0.61033225", "0.6097674", "0.6092552", "0.6088909", "0.60774595", "0.6074934", "0.6069758", "0.60669726", "0.6059892", "0.60449094", "0.6040243", "0.6039996", "0.60394645", "0.60311186", "0.6030442", "0.60277915", "0.60234857", "0.60219884", "0.6018775", "0.60168344", "0.6015481", "0.6015409", "0.6009559", "0.59964925", "0.59943426", "0.5989144", "0.59832644", "0.5981722", "0.598044", "0.59792984", "0.597475" ]
0.0
-1
TODO Autogenerated method stub Establish cnx
public void deletebyidentifier(String identifier) { Connection conn = null; String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; try { conn = DriverManager.getConnection(url); PreparedStatement myStmt; String query = "delete from seq where identifier = ?"; myStmt = conn.prepareStatement(query); // Set Parameters myStmt.setString(1, identifier); // Execute SQL query int res = myStmt.executeUpdate(); // Display the record inserted System.out.println(res + " "+ identifier + "'s Seq is deleted"); // Close the connection conn.close(); }catch (SQLException e) { System.out.println(e.getMessage());} finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Object> getXNetComponent() {\n if (!init()) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetComponent():Initialization failed.\");\n return null;\n }\n Map<String, Object> xnetComp = new HashMap<>();\n xnetComp.put(\"XNETStarted\", false);\n ActiveMQComponent amqComp = null;\n //SEHR XNET root is a top level domain that ties SEHR communities together\n InitialContext ic;\n try {\n ic = new InitialContext();\n this.camelContext = (CamelContext) ic.lookup(\"XNetContext\");\n if (this.camelContext != null && this.camelContext.getStatus().isStarted()) {\n if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetrooturl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xroot\");\n xnetComp.put(\"XNETLevel\", \"xroot\");\n if (amqComp != null) {\n //We can send messages to a LC queue;\n //Reading from a LC queue depends on the app the card holder uses;\n //The holder has to login and be verified to get his messages;\n //The 'xroot' configuration allows this CAS module to send \n //messages out to the SEHR world using this camel context;\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetcountryurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xctry\");\n xnetComp.put(\"XNETLevel\", \"xctry\");\n if (amqComp != null) {\n //It seems to be that we can send messages to a national LC queue\n //But this depends on the configuration of the country broker\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' also\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetdomainurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xdom\");\n xnetComp.put(\"XNETLevel\", \"xdom\");\n if (amqComp != null) {\n //It seems to be that we can send messages to a LC queue for the \n //whole managed domain\n //To send dmessages to a LC queue depends on the broker settings\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' or 'xctry'\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n } else if (StringUtils.isNotBlank(p.getProperty(\"sehrxnetzoneurl\", \"\"))) {\n amqComp = (ActiveMQComponent) this.camelContext.getComponent(\"xzone\");\n xnetComp.put(\"XNETLevel\", \"xzone\"); //the bottom level\n if (amqComp != null) {\n //There is a local broker (of the zone, the community level, WAN)\n //To send dmessages to other LC queues depends on the broker \n //settings\n xnetComp.put(\"XNETStarted\", amqComp.isStarted());\n //TODO Check broker for a route to 'xroot' otherwise there\n //will be no interchange with patients outside of the zone\n xnetComp.put(\"ActiveMQStatus\", amqComp.getStatus());\n }\n }\n xnetComp.put(\"ActiveMQComponent\", amqComp);\n } else {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetComponent():No routing (Camel) context.\");\n xnetComp.put(\"ActiveMQStatus\", \"No routing context.\");\n }\n\n } catch (NamingException ex) {\n Log.warning(LifeCARDAdmin.class.getName() + \":getXNetComponent():\" + ex.getMessage());\n }\n// //Finally check if this zone (this SEHR-CAS is running for) has centers \n// //that have registered the LifeCARD service (module) to use the XNET for \n// //exchanging data (of/to/with the patient).\n// List<NetCenter> list = getServiceCenter(Integer.parseInt(p.getProperty(\"zoneID\", \"0\")));\n// xnetComp.put(\"ListLCServiceCenter\", list);\n\n return xnetComp;\n }", "protected IXConnection getConnection() {\n return eloCmisConnectionManager.getConnection(this.getCallContext());\n }", "public Connection xcon(){\n Connection cn =null;\n try{\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cn = DriverManager.getConnection(\"jdbc:sqlserver://10.60.41.30:1433;databaseName=Northwind;\",\"idat\",\"123456\");\n if(cn!=null){\n JOptionPane.showMessageDialog(null, \"Estás conectado\");\n }\n }catch(Exception error){\n JOptionPane.showMessageDialog(null, error);\n }\n \n return cn;\n }", "public String getCAdxWebServiceXmlCCAddress() {\n\t\treturn null;\n\t}", "public String getCX() {\n\t\treturn cx;\r\n\t}", "private DataStaxConnection(String cassandraAddress, String keySpaceName) {\r\n\t\ttry {\r\n\t\t if (instance != null)\r\n\t\t return;\r\n\t\t \r\n\t\t this.address = cassandraAddress;\r\n\t\t this.keyspace = keySpaceName;\r\n\t\t \r\n\t\t Cluster.Builder builder = Cluster.builder();\r\n\t\t \r\n\t\t String[] clusterAddress = cassandraAddress.split(\",\");\r\n\t\t for (String nodeAddress: clusterAddress) {\r\n\t\t builder = builder.addContactPoint(nodeAddress);\r\n\t\t }\r\n\t\t \r\n\t\t\tthis.cluster = builder.build();\t\t\t\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Cluster build is successful\");\r\n\t\t\tthis.session = cluster.connect(keySpaceName);\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Session established successfully\");\r\n\t\t\tinstance = this;\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogService.appLog.debug(\"DataStaxConnection: Encoutnered exception:\",e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "public int getCCN(){\n\t\treturn ccn;\n\t}", "public interface XconnectService {\n\n /**\n * VLAN cross-connect ACL priority.\n */\n int XCONNECT_ACL_PRIORITY = 60000;\n\n /**\n * VLAN cross-connect Bridging priority.\n */\n int XCONNECT_PRIORITY = 1000;\n\n /**\n * Creates or updates Xconnect.\n *\n * @param deviceId device ID\n * @param vlanId VLAN ID\n * @param endpoints set of endpoints\n */\n void addOrUpdateXconnect(DeviceId deviceId, VlanId vlanId, Set<XconnectEndpoint> endpoints);\n\n /**\n * Deletes Xconnect.\n *\n * @param deviceId device ID\n * @param vlanId VLAN ID\n */\n void removeXonnect(DeviceId deviceId, VlanId vlanId);\n\n /**\n * Gets Xconnects.\n *\n * @return set of Xconnect descriptions\n */\n Set<XconnectDesc> getXconnects();\n\n /**\n * Check if there is Xconnect configured on given connect point.\n *\n * @param cp connect point\n * @return true if there is Xconnect configured on the connect point\n */\n boolean hasXconnect(ConnectPoint cp);\n\n /**\n * Gives xconnect VLAN of given port of a device.\n *\n * @param deviceId Device ID\n * @param port Port number\n * @return true if given VLAN vlanId is XConnect VLAN on device deviceId.\n */\n List<VlanId> getXconnectVlans(DeviceId deviceId, PortNumber port);\n\n /**\n * Checks given VLAN is XConnect VLAN in given device.\n *\n * @param deviceId Device ID\n * @param vlanId VLAN ID\n * @return true if given VLAN vlanId is XConnect VLAN on device deviceId.\n */\n boolean isXconnectVlan(DeviceId deviceId, VlanId vlanId);\n\n /**\n * Returns the Xconnect next objective store.\n *\n * @return current contents of the xconnectNextObjStore\n */\n ImmutableMap<XconnectKey, Integer> getNext();\n\n /**\n * Removes given next ID from Xconnect next objective store.\n *\n * @param nextId next ID\n */\n void removeNextId(int nextId);\n\n /**\n * Returns Xconnect next objective ID associated with group device + vlan.\n *\n * @param deviceId - Device ID\n * @param vlanId - VLAN ID\n * @return Current associated group ID\n */\n int getNextId(DeviceId deviceId, VlanId vlanId);\n}", "public Connection ObtenirConnexion(){return cn;}", "public void connexion() {\r\n\t\ttry {\r\n\r\n\t\t\tsoapConnFactory = SOAPConnectionFactory.newInstance();\r\n\t\t\tconnection = soapConnFactory.createConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public Connexion getConnexion() {\n\t\treturn cx;\n\t}", "private void init() {\r\n\t\tif (cn == null) {\r\n\t\t\ttry {\r\n\t\t\t\tcn = new XGConnection(url,login,passwd); // Etape 2 : r�cup�ration de la connexion\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.MINUTES.sleep(1);\r\n\t\t\t\t} catch (InterruptedException e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcn.close();// lib�rer ressources de la m�moire.\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public apilfixer() {\n\n try {\n System.out.print(\"Connection to Informix Driver \\n\");\n Class.forName(\"com.informix.jdbc.IfxDriver\");\n // Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n ConnectionURL = DriverManager.getConnection(INFORMX_URL, INFORMX_USERID,INFORMX_USERPASS);\n } catch (Exception e) {\n System.err.println( \"Unable to locate class \\n\" );\n e.printStackTrace();\n System.exit(1);\n }\n\n\n}", "public UpdateableDataContext connect(String uname,String pward,String secTocken)\r\n\t{\n\t\tUpdateableDataContext dataContext = new SalesforceDataContext(uname,pward,secTocken);\r\n\t\t\r\n\t\t/*Table accountTable = dataContext.getDefaultSchema().getTableByName(\"Account\");\r\n\t\t \r\n\t\tDataSet dataSet = dataContext.query().from(accountTable).select(\"Id\", \"Name\").where(\"BillingCity\").eq(\"New York\").execute();\r\n\t\t \r\n\t\twhile (dataSet.next()) {\r\n\t\t Row row = dataSet.getRow();\r\n\t\t Object id = row.getValue(0);\r\n\t\t Object name = row.getValue(1);\r\n\t\t System.out.println(\"Account '\" + name + \"' from New York has id: \" + row.getValue(0));\r\n\t\t}\r\n\t\tdataSet.close();*/\r\n\t\treturn dataContext;\r\n\t}", "public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }", "public boolean isXATransaction()\n {\n if (_connectionConfig.isReadOnly())\n return false;\n else if (_driverList.size() > 0) {\n DriverConfig driver = _driverList.get(0);\n \n return driver.isXATransaction();\n }\n else\n return false;\n }", "Xid createXid();", "protected Connection getConnection() {\n String url = \"jdbc:oracle:thin:@localhost:32118:xe\";\n String username = \"JANWILLEM2\";\n String password = \"JANWILLEM2\";\n\n if (myConnection == null) {\n try {\n myConnection = DriverManager.getConnection(url, username, password);\n } catch (Exception exc) {\n exc.printStackTrace();\n }\n }\n\n return myConnection;\n }", "public static ConnectionSource cs() {\n String dbName = \"pegadaian\";\n String dbUrl = \"jdbc:mysql://localhost:3306/\" + dbName;\n String user = \"root\";\n String pass = \"catur123\";\n\n //inisiasi sumber koneksi\n ConnectionSource csInit = null;\n try {\n csInit = new JdbcConnectionSource(dbUrl, user, pass);\n } catch (SQLException ex) {\n Logger.getLogger(Koneksi.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //kembalikan hasil koneksi\n return csInit;\n\n }", "public Integer getNsxqId() {\n return nsxqId;\n }", "io.netifi.proteus.admin.om.Connection getConnection(int index);", "public void connectionEstablished(SctpChannel cnx){\n\thistory (\"connectionEstablished\");\n\t_connecting = false;\n\t_createdTime = System.currentTimeMillis ();\n\tmakeId ();\n\t_channel = _sctpChannel = cnx;\n\t_channel.setSoTimeout (_soTimeout);\n\t_sendOutBufferMonitor = _engine.getSendSctpBufferMonitor ();\n\t_sendMeter = _engine.getIOHMeters ().getSendSctpMeter ();\n\t_readMeter = _engine.getIOHMeters ().getReadSctpMeter ();\n\t_sendDroppedMeter = _engine.getIOHMeters ().getSendDroppedSctpMeter ();\n\tcnx.setWriteBlockedPolicy (AsyncChannel.WriteBlockedPolicy.IGNORE);\n\t_toString = new StringBuilder ()\n\t .append (\"SctpClientChannel[id=\").append (_id).append (\", remote=\").append (_remote).append (\", secure=\").append (_secure).append (']')\n\t .toString ();\n\tif (_logger.isEnabledFor (_engine.sctpConnectedLogLevel ()))\n\t _logger.log (_engine.sctpConnectedLogLevel (), _engine+\" : connected : \"+this);\n\tif (_shared){\n\t _engine.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t _engine.getSctpChannels ().put (_id, this);\n\t if (_engine.uniqueSctpConnect ()){\n\t\t// we check that all pending agents are still there\n\t\tList<MuxClient> removed = new ArrayList<> (_connectingAgents.size ());\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t if (_engine.getMuxClientList ().contains (agent) == false)\n\t\t\tremoved.add (agent);\n\t\t}\n\t\tfor (MuxClient agent : removed){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+agent);\n\t\t agent.getMuxHandler ().sctpSocketConnected (agent, _id, _connectingAgents.get (agent), null, 0, null, 0, 0, 0, false, _secure, MuxUtils.ERROR_UNDEFINED);\n\t\t agent.getIOHMeters ().getFailedSctpChannelsConnectMeter ().inc (1);\n\t\t _connectingAgents.remove (agent);\n\t\t}\n\t\tif (_connectingAgents.size () == 0){\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = new MuxClientList ();\n\t\tfor (MuxClient agent : _connectingAgents.keySet ()){\n\t\t MuxClientState state = new MuxClientState ()\n\t\t\t.stopped (_engine.getMuxClientList ().isDeactivated (agent))\n\t\t\t.connectionId (_connectingAgents.get (agent));\n\t\t agentJoined (agent, state); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t\t}\n\t\t_connectingAgents = null; // clean\n\t } else {\n\t\tif (_engine.getMuxClientList ().size () == 0){ // checking for _agent to see if it is open is too costly\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : agentClosed while connecting : \"+_agent);\n\t\t if (_logger.isDebugEnabled ()) _logger.debug (this+\" : closing : no agent\");\n\t\t close (false, true); // the socket input exec will remain the engine thread --> monothreaded\n\t\t return;\n\t\t}\n\t\t_agentsList = _engine.copyMuxClientList ();\n\t\titerateAgentConnected (_agentsList); // consider one day scheduling it in _exec to avoid inlining in connectionEstablished\n\t }\n\t _agent = null; // clean\n\t} else {\n\t _agent.getIOHMeters ().getSctpChannelsConnectedMeter ().inc (1);\n\t _agent.getIOHMeters ().getOpenSctpChannelsConnectedMeter ().inc (1);\n\t if (_agent.isOpened () == false){\n\t\tclose (false, true); // the socket input exec will remain the agent thread --> monothreaded\n\t\treturn;\n\t }\n\t _agent.getSctpChannels ().put (_id, this);\n\t notifyOpenToAgent (_agent);\n\t}\n\tsetChannelInputExecutor ();\n\t_flowController = new FlowController (_channel, 1000, 10000, _exec); // _exec is set in setChannelInputExecutor\n\n\tif (_reconnect != null)\n\t for (Runnable r: _reconnect) r.run ();\n }", "public Zclass selectByCid(String xandc) {\n\t\tZclassExample example=new ZclassExample();\r\n\t\tcom.pdsu.stuManage.bean.ZclassExample.Criteria criteria=example.createCriteria();\r\n\t\tcriteria.andZcidEqualTo(xandc);\r\n\t\tList<Zclass>list=zclassMapper.selectByExample(example);\r\n\t\tif(list.size()!=0)\r\n\t\treturn list.get(0);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "Object getXtrc();", "Object getXtrc();", "private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\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\t\r\nreturn con;\r\n}", "public VoXtdzqx() {\n }", "public CamelContext getXNetContext() {\n CamelContext cctx;\n Map<String, Object> xnetComp = getXNetComponent();\n if (xnetComp == null || xnetComp.isEmpty()) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetContext()():No valid XNET routing handle found\");\n return null;\n }\n //+++ do not just return the context...\n //return this.camelContext;\n ActiveMQComponent amqComp = (ActiveMQComponent) xnetComp.get(\"ActiveMQComponent\");\n if (amqComp == null) {\n Log.info(LifeCARDAdmin.class.getName() + \":getXNetContext()():No valid XNET handle found (No AMQ component)\");\n return null;\n }\n //... get and check the context of the highest identified processing\n cctx = amqComp.getCamelContext();\n //TODO check connection... otherwise throw error \"XNetConnectionError\"\n if (cctx == null || cctx.isSuspended()) {\n Log.log(Level.WARNING, LifeCARDAdmin.class.getName() + \":getXNetContext():\" + (cctx == null ? \"XNET context not present (null)\" : \"XNET context suspended \" + cctx.isSuspended()));\n return null;\n }\n return cctx;\n }", "protected boolean isXARequester()\n {\n return (getManagerLevel(CodePoint.XAMGR) >= 7);\n \n }", "private void openConnection(){}", "protected static Connection MySqlCustomersConnection() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = MySqlConn().getConnection();\n\t\t\treturn conn;\n\t\t}\n\t\tcatch (SQLException sqe){\n\t\t\tsqe.printStackTrace();\n\t\t}\n\t\treturn conn;\n\t}", "public void setCX(String cx) {\n\t\tthis.cx = cx;\r\n\t\tfirePropertyChange(ConstantResourceFactory.P_CX,null,cx);\r\n\t}", "@Override\n public Connection call() throws Exception {\n return createConnection();\n }", "public void connect(){\r\n\t\tSystem.out.println(\"Connecting to Sybase Database...\");\r\n\t}", "public XRemote xnext() throws Exception {\n\t\treturn xnextNode();\r\n\t}", "static void checkXAConnection(AssertableApplicationContext ctx) throws JMSException {\n\t\tXAConnection con = ctx.getBean(XAConnectionFactory.class).createXAConnection();\n\t\ttry {\n\t\t\tcon.setExceptionListener(exception -> {\n\t\t\t});\n\t\t\tassertThat(con.getExceptionListener().getClass().getName())\n\t\t\t\t\t.startsWith(\"brave.jms.TracingExceptionListener\");\n\t\t}\n\t\tfinally {\n\t\t\tcon.close();\n\t\t}\n\t}", "public void connect() throws IOException, XMPPException, SmackException {\n InetAddress addr = InetAddress.getByName(\"192.168.1.44\");\n HostnameVerifier verifier = new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return false;\n }\n };\n XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()\n .setXmppDomain(mApplicationContext.getString(R.string.txt_domain_name)) // name of the domain\n .setHost(mApplicationContext.getString(R.string.txt_server_address)) // address of the server\n .setResource(mApplicationContext.getString(R.string.txt_resource)) // resource from where your request is sent\n .setPort(5222) // static port number to connect\n .setKeystoreType(null) //To avoid authentication problem. Not recommended for production build\n .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)\n .setHostnameVerifier(verifier)\n .setHostAddress(addr)\n .setDebuggerEnabled(true)\n .setCompressionEnabled(true).build();\n\n //Set up the ui thread broadcast message receiver.\n setupUiThreadBroadCastMessageReceiver();\n\n mConnection = new XMPPTCPConnection(conf);\n mConnection.addConnectionListener(mOnConnectionListener);\n try {\n Log.d(TAG, \"Calling connect() \");\n mConnection.connect();\n Presence presence = new Presence(Presence.Type.available);\n mConnection.sendPacket(presence);\n\n Log.d(TAG, \" login() Called \");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n /**\n * Listener to receive the incoming message\n */\n\n ChatManager.getInstanceFor(mConnection).addIncomingListener(new IncomingChatMessageListener() {\n @Override\n public void newIncomingMessage(EntityBareJid messageFrom, Message message, Chat chat) {\n String from = message.getFrom().toString();\n\n String contactJid = \"\";\n if (from.contains(\"/\")) {\n contactJid = from.split(\"/\")[0];\n Log.d(TAG, \"The real jid is :\" + contactJid);\n Log.d(TAG, \"The message is from :\" + from);\n } else {\n contactJid = from;\n }\n\n //Bundle up the intent and send the broadcast.\n Intent intent = new Intent(XmppConnectionService.NEW_MESSAGE);\n intent.setPackage(mApplicationContext.getPackageName());\n intent.putExtra(XmppConnectionService.BUNDLE_FROM_JID, contactJid);\n intent.putExtra(XmppConnectionService.BUNDLE_MESSAGE_BODY, message.getBody());\n mApplicationContext.sendBroadcast(intent);\n Log.d(TAG, \"Received message from :\" + contactJid + \" broadcast sent.\");\n }\n });\n\n\n ReconnectionManager reconnectionManager = ReconnectionManager.getInstanceFor(mConnection);\n reconnectionManager.setEnabledPerDefault(true);\n reconnectionManager.enableAutomaticReconnection();\n\n }", "public cusRegister() throws ClassNotFoundException {\n initComponents();\n \n con = DBConnect.connection();\n }", "static void perform_dcx(String passed){\n\t\tint type = type_of_inx(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tdcx_rp(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public boolean isSetCnName() {\n return this.cnName != null;\n }", "boolean needSeparateConnectionForDdl();", "@GET\n @Path(\"/rest/{name}/{value}\")\n @Produces(MediaType.TEXT_XML)\n public String getXCRIXml(@PathParam(\"name\") String name, @PathParam(\"value\") String value) {\n TransformerFactory transFactory = TransformerFactory.newInstance();\n Transformer transformer;\n StringWriter buffer = new StringWriter();\n try {\n transformer = transFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n transformer.transform(new DOMSource(xcriSession.searchCatalog(name, value)), new StreamResult(buffer));\n } catch (TransformerConfigurationException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n } catch (TransformerException ex) {\n Logger.getLogger(XCRI_CAPRestService.class.getName()).log(Level.SEVERE, \"Problem outputting document\", ex);\n }\n return buffer.toString();\n\n\n }", "boolean hasXconnect(ConnectPoint cp);", "public void init() {\n\t\tXMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()\r\n//\t\t .setUsernameAndPassword(\"pwf\", \"123456\")\r\n//\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setServiceName(\"bdht-2016051604\")\r\n\t\t\t\t .setHost(\"bdht-2016051604\")\r\n\t\t\t\t .setSecurityMode(SecurityMode.disabled)\r\n//\t\t\t\t .setCustomSSLContext(context)\r\n\t\t\t\t \r\n//\t\t .setHost(\"bdht-2016051604\")\r\n//\t\t .setPort(5222)\r\n\t\t .build();\r\n\r\n\t\tAbstractXMPPConnection connection = new XMPPTCPConnection(config);\r\n\t\t\r\n\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"BDHT-2016051604\");\r\n//\t\tAbstractXMPPConnection conn = new XMPPTCPConnection(\"pwf\", \"123456\", \"192.168.1.121\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\t\r\n\t\t\tconnection.login(\"pwf1\", \"123456\");\r\n\t\t\t\r\n\t\t} catch (SmackException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t} catch (XMPPException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(connection.getUser());\r\n\t\t\r\n\t\tChatManager chatmanager = ChatManager.getInstanceFor(connection);\r\n\t\tChat newChat = chatmanager.createChat(\"admin\");\r\n\t\t\r\n//\t\tChat newChat = chatmanager.createChat(\"jsmith@jivesoftware.com\", new MessageListener() {\r\n//\t\t\tpublic void processMessage(Chat chat, Message message) {\r\n//\t\t\t\tSystem.out.println(\"Received message: \" + message);\r\n//\t\t\t}\r\n//\t\t});\r\n\t\t\r\n\t\ttry {\r\n\t\t\tnewChat.sendMessage(\"hello!!\");\r\n\t\t} catch (NotConnectedException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t\t\t\r\n\t\t}\r\n//\t\tconnection.get\r\n//\t\tconnection.getChatManager().createChat(\"shimiso@csdn.shimiso.com\",null).sendMessage(\"Hello word!\");\r\n\t\t\r\n\t\tconnection.disconnect();\r\n\t\t\r\n\t\tSystem.out.println(\"end\");\r\n\t}", "public void setNsxqId(Integer nsxqId) {\n this.nsxqId = nsxqId;\n }", "@Override\n public int prepare(final Xid _xid)\n {\n if (VFSStoreResource.LOG.isDebugEnabled()) {\n VFSStoreResource.LOG.debug(\"prepare (xid=\" + _xid + \")\");\n }\n return 0;\n }", "public void setCxcode(java.lang.String cxcode) {\r\r\r\r\r\r\r\n this.cxcode = cxcode;\r\r\r\r\r\r\r\n }", "public void setXq(String xq) {\n\t\tthis.xq = xq;\n\t}", "@Override\r\n protected void onConnected() {\n \r\n }", "@Test\n public void testGetSdsConnection() {\n System.out.println(\"getSdsConnection\");\n SDSconnection expResult = null;\n SDSconnection result = instance.getSdsConnection();\n assertEquals(expResult, result);\n }", "@Override\n\tpublic IConnection execute(String mode) {\n\t\t\n \t\tIConnectionFactory factory = null;\n\t\tfactory = new FastBillConnectionFactory();\n \t\tIConnection connection = factory.createConnection();\n \t\treturn connection;\n \t\t\n\t}", "private void setConnection (TwGateway newCxn) {\n boolean connected = (newCxn != null);\n closeXn.setEnabled (connected);\n openXn.setEnabled (!connected);\n getWksp.setEnabled (connected);\n KbWorkspace[] showingWorkspaces = multiWkspView.getWorkspaces ();\n System.out.println (\"Removing \" + showingWorkspaces.length + \" workspaces!\");\n for (int i=0; i<showingWorkspaces.length; i++)\n multiWkspView.removeWorkspace (showingWorkspaces[i]);\n Rectangle frameRect = getCurrentFrame().getBounds ();\n getCurrentFrame().setBounds(frameRect.x, frameRect.y,\n\t\t\t\tframeRect.width + 1, frameRect.height + 1);\n connection = newCxn;\n }", "public Connection getConn() {\n\ttry {\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tcn=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521/pocdb\",\"PL\",\"PL\");\n\t\t\n\t}\n\tcatch(ClassNotFoundException ce)\n\t{\n\t\tce.printStackTrace();\n\t\t\n\t}\n\tcatch(SQLException se)\n\t{\n\t\tse.printStackTrace();\n\t\t\n\t}\n\t\n\t\n\treturn cn;\n\t\n\n}", "private void createChannelAccess(Nx100Type config) throws FactoryException {\n \t\ttry {\n \t\t\tjobChannel = channelManager.createChannel(config.getJOB().getPv(), false);\n \t\t\tstartChannel = channelManager.createChannel(config.getSTART().getPv(), false);\n \t\t\tholdChannel = channelManager.createChannel(config.getHOLD().getPv(), false);\n \t\t\tsvonChannel = channelManager.createChannel(config.getSVON().getPv(), false);\n \t\t\terrChannel = channelManager.createChannel(config.getERR().getPv(), errls, false);\n \n \t\t\t// acknowledge that creation phase is completed\n \t\t\tchannelManager.creationPhaseCompleted();\n \t\t} catch (Throwable th) {\n \t\t\tthrow new FactoryException(\"failed to create all channels\", th);\n \t\t}\n \t}", "public JNDIConnector(Context context, String name) throws ValidationException {\n this(name);\n this.context = context;\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "private void createProxyConnection() throws ClusterDataAdminException {\n ClusterMBeanDataAccess clusterMBeanDataAccess = ClusterAdminComponentManager.getInstance().getClusterMBeanDataAccess();\n try{\n failureDetectorMBean= clusterMBeanDataAccess.locateFailureDetectorMBean();\n }\n catch(Exception e){\n throw new ClusterDataAdminException(\"Unable to locate failure detector MBean connection\",e,log);\n }\n }", "@Bean\n public ConnectionFactory connectionFactory(){\n ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();\n activeMQConnectionFactory.setBrokerURL(brokerUrl);\n activeMQConnectionFactory.setUserName(brokerUsername);\n activeMQConnectionFactory.setPassword(brokerPassword);\n return activeMQConnectionFactory;\n }", "protected PKCS11Connector() { /* left empty intentionally */\n }", "private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }", "protected void connectionEstablished() {}", "public Component(Reference xmlConfigReference) {\r\n this();\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n dbf.setNamespaceAware(false);\r\n dbf.setValidating(false);\r\n \r\n try {\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document document = db.parse(new FileInputStream(\r\n new LocalReference(xmlConfigReference).getFile()));\r\n \r\n // Look for clients\r\n NodeList clientNodes = document.getElementsByTagName(\"client\");\r\n \r\n for (int i = 0; i < clientNodes.getLength(); i++) {\r\n Node clientNode = clientNodes.item(i);\r\n Node item = clientNode.getAttributes().getNamedItem(\"protocol\");\r\n Client client = null;\r\n \r\n if (item == null) {\r\n item = clientNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (item != null) {\r\n String[] protocols = item.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n client = new Client(getContext(), protocolsList);\r\n }\r\n } else {\r\n client = new Client(getContext(), getProtocol(item\r\n .getNodeValue()));\r\n }\r\n \r\n if (client != null) {\r\n this.getClients().add(client);\r\n }\r\n }\r\n \r\n // Look for servers\r\n NodeList serverNodes = document.getElementsByTagName(\"server\");\r\n \r\n for (int i = 0; i < serverNodes.getLength(); i++) {\r\n Node serverNode = serverNodes.item(i);\r\n Node node = serverNode.getAttributes().getNamedItem(\"protocol\");\r\n Node portNode = serverNode.getAttributes().getNamedItem(\"port\");\r\n Server server = null;\r\n \r\n if (node == null) {\r\n node = serverNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (node != null) {\r\n String[] protocols = node.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n int port = getInt(portNode, Protocol.UNKNOWN_PORT);\r\n \r\n if (port == Protocol.UNKNOWN_PORT) {\r\n getLogger()\r\n .warning(\r\n \"Please specify a port when defining a list of protocols.\");\r\n } else {\r\n server = new Server(getContext(), protocolsList,\r\n getInt(portNode, Protocol.UNKNOWN_PORT),\r\n this.getServers().getTarget());\r\n }\r\n }\r\n } else {\r\n Protocol protocol = getProtocol(node.getNodeValue());\r\n server = new Server(getContext(), protocol, getInt(\r\n portNode, protocol.getDefaultPort()), this\r\n .getServers().getTarget());\r\n }\r\n \r\n if (server != null) {\r\n this.getServers().add(server);\r\n }\r\n \r\n // Look for default host\r\n NodeList defaultHostNodes = document\r\n .getElementsByTagName(\"defaultHost\");\r\n \r\n if (defaultHostNodes.getLength() > 0) {\r\n parseHost(this.getDefaultHost(), defaultHostNodes.item(0));\r\n }\r\n \r\n // Look for other virtual hosts\r\n NodeList hostNodes = document.getElementsByTagName(\"host\");\r\n \r\n for (int j = 0; j < hostNodes.getLength(); j++) {\r\n VirtualHost host = new VirtualHost();\r\n parseHost(host, hostNodes.item(j));\r\n this.getHosts().add(host);\r\n }\r\n }\r\n \r\n // Look for internal router\r\n NodeList internalRouterNodes = document\r\n .getElementsByTagName(\"internalRouter\");\r\n \r\n if (internalRouterNodes.getLength() > 0) {\r\n Node node = internalRouterNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\r\n \"defaultMatchingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setDefaultMatchingMode(\r\n getInt(item, getInternalRouter()\r\n .getDefaultMatchingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"maxAttempts\");\r\n if (item != null) {\r\n this.getInternalRouter().setMaxAttempts(\r\n getInt(item, this.getInternalRouter()\r\n .getMaxAttempts()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"routingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setRoutingMode(\r\n getInt(item, this.getInternalRouter()\r\n .getRoutingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"requiredScore\");\r\n if (item != null) {\r\n this.getInternalRouter().setRequiredScore(\r\n getFloat(item, this.getInternalRouter()\r\n .getRequiredScore()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"retryDelay\");\r\n if (item != null) {\r\n this.getInternalRouter().setRetryDelay(\r\n getLong(item, this.getInternalRouter()\r\n .getRetryDelay()));\r\n }\r\n \r\n // Loops the list of \"attach\" instructions\r\n setAttach(getInternalRouter(), node);\r\n }\r\n \r\n // Look for logService\r\n NodeList logServiceNodes = document\r\n .getElementsByTagName(\"logService\");\r\n \r\n if (logServiceNodes.getLength() > 0) {\r\n Node node = logServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"logFormat\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLogFormat(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"loggerName\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLoggerName(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getLogService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"identityCheck\");\r\n \r\n if (item != null) {\r\n this.getLogService().setIdentityCheck(\r\n getBoolean(item, true));\r\n }\r\n }\r\n \r\n // Look for statusService\r\n NodeList statusServiceNodes = document\r\n .getElementsByTagName(\"statusService\");\r\n \r\n if (statusServiceNodes.getLength() > 0) {\r\n Node node = statusServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"contactEmail\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setContactEmail(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"homeRef\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setHomeRef(\r\n new Reference(item.getNodeValue()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"overwrite\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setOverwrite(getBoolean(item, true));\r\n }\r\n }\r\n } catch (Exception e) {\r\n getLogger().log(Level.WARNING,\r\n \"Unable to parse the Component XML configuration.\", e);\r\n }\r\n }", "public CAdxWebServiceXmlCC getCAdxWebServiceXmlCC() throws ServiceException {\n\t\treturn null;\n\t}", "public boolean jmxBind() {\n\t\ttry {\n\t\t\tString sUrl = \"service:jmx:rmi:///jndi/rmi://\" + hostname + \":\" + port + \"/jmxrmi\";\n\t\t\tLOGGER.info(\"Connecting to remote engine on : \" + sUrl);\n\t\t\turl = new JMXServiceURL(sUrl);\n\t\t\tjmxC = new RMIConnector(url, null);\n\t\t\tjmxC.connect();\n\t\t\tjmxc = jmxC.getMBeanServerConnection();\n\t\t\tObjectName lscServerName = new ObjectName(\"org.lsc.jmx:type=LscServer\");\n\t\t\tlscServer = JMX.newMXBeanProxy(jmxc, lscServerName, LscServer.class, true);\n\t\t\treturn true;\n\t\t} catch (MalformedObjectNameException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (NullPointerException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(e.toString(), e);\n\t\t}\n\t\treturn false;\n\t}", "public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}", "@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}", "protected static JdbcChannel connectionReserve(CallContext cx, Bindings bindings)\n throws ProcedureException {\n \n String str;\n Object obj;\n \n obj = bindings.getValue(BINDING_DB);\n if (obj instanceof String) {\n obj = cx.connectionReserve((String) obj);\n }\n if (!JdbcChannel.class.isInstance(obj)) {\n str = \"connection not of JDBC type: \" + obj.getClass().getName();\n throw new ProcedureException(str);\n }\n return (JdbcChannel) obj;\n }", "public JNDIConnector() {\n super();\n }", "public void start() throws XCFException {\n\t\tpushScope();\n\t\taddConvention(\"validator\", \".request.parameter.VALIDATOR_\");\n\t\taddConvention(\"setter\", \".request.parameter.SETTER_\");\n\t\taddConvention(\"saxel\", \".builder.SAXEL_\");\n\t\taddConvention(\"instruction\", \".request.processor.instructions.INSTRUCTION_\");\n\t\t\n\t\taddPackage(\"com.eternal.xcf\");\n\t\taddPackage(\"com.eternal.xcf.common\");\n\t}", "public void setXknr(String xknr) {\n\t\tthis.xknr = xknr;\n\t}", "public boolean isSetCnsCidadao() {\n return this.cnsCidadao != null;\n }", "public void setLookupIdStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"select \" + ALL_COLS + \n\t\t \" from \" + TABLE_NAME + \n\t\t \" where \" + ID_COL + \" = ? \";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "@Override\r\n\tpublic List<Ccspxxb> selectCcspxx() {\n\t\t\r\n\t\treturn ccspxxbMapper.selectByExample(null);\r\n\t}", "@Override\n public int getConnectionPort() {\n return 10083;\n }", "@Override\n protected void startConnection() throws CoreException {\n }", "public static void proxy(String param) {\n String url = \"http://192.168.10.80:8183/pacsChannel?wsdl\";\n String portTypeName = \"pacsChannel\";//\"receiveCheckApply\";\n try {\n QName qname = new QName(\"http://serv.pacs.senyint.com/\", portTypeName);\n Service service = Service.create(new URL(url), qname);\n // service.addPort(qname, SOAPBinding.SOAP11HTTP_BINDING, url);\n // service.getPort()\n PacsChannel testService = service.getPort(/*new QName(tsn, port name), */PacsChannel.class);\n System.out.println(testService.invoke(\"receiveCheckApply\", param));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void checkConnectivity() throws NotConnected\n\t{\n\t\tif (!s_ctx.isConnected())\n\t\t{\n\t\t\tthrow new NotConnected(\"Cannot operate: not conected to context\");\n\t\t}\n\t}", "public static void openConnection() {\n try {\n connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"system\", \"kevin2000\");\n connection.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void onConnectToNetByIPSucces();", "public void setConn(Connection conn) {this.conn = conn;}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void initialiseCRISTDiscovery() {\n\t}", "public EPPSecDNSExtUpdate() {}", "protected IPhynixxConnectionProxy getObservableProxy() {\n\t\t\treturn null;\r\n\t\t}", "public void process(EdaContext xContext) throws IcofException {\n\n\t// Connect to the database\n\tconnectToDB(xContext);\n\n\t// Determine if branch/component are for a production or development TK.\n\tfindToolKit(xContext);\n\trollBackDBAndSetReturncode(xContext, APP_NAME, SUCCESS);\n\n }", "public void setCCN(int ccn0){\n\t\tccn = ccn0;\n\t}", "public boolean checkConnection() {\n\treturn getBoolean(ATTR_CONNECTION, false);\n }", "public void setXmlx(java.lang.String param) {\r\n localXmlxTracker = param != null;\r\n\r\n this.localXmlx = param;\r\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.enumerateXAConnectionFactory();\n int int0 = connectionFactories0.getConnectionFactoryCount();\n assertEquals(0, int0);\n }", "private void establishConnection() throws ClassNotFoundException, SQLException {\r\n\t \t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t String conUrl = \"jdbc:oracle:thin:@localhost:1521:XE\";\r\n\t String uname = \"system\";\r\n\t\t\tString pwd = \"sathar205\";\r\n\t con = DriverManager.getConnection(conUrl,uname,pwd);\r\n\t }", "public void initializeConnection() {\n\n cluster = Cluster.builder().addContactPoint(host).build();\n session = cluster.connect(keyspaceName);\n session.execute(\"USE \".concat(keyspaceName));\n }", "public RXC getRXC() { \r\n return getTyped(\"RXC\", RXC.class);\r\n }", "private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }", "public java.lang.String getCxcode() {\r\r\r\r\r\r\r\n return cxcode;\r\r\r\r\r\r\r\n }", "@Ignore\n @Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Util.commonServiceIPs = \"127.0.0.1\";\n PooledConnection expResult = null;\n try {\n long ret = JMSUtil.getQueuePendingMessageCount(\"127.0.0.1\",\"localhost\",CommonKeys.INDEX_REQUEST);\n fail(\"The test case is a prototype.\");\n }\n catch(Exception e)\n {\n \n } \n }", "public XMLDatabaseConnector()\n\t{\n\t\t\n\t\tProperties prop = new Properties();\n\t\t\n\t\t InputStream inputStream = this.getClass().getClassLoader()\n\t .getResourceAsStream(\"config.properties\");\n\t\t \n \ttry {\n //load a properties file\n \t\tprop.load(inputStream);\n \n //get the property value and print it out\n \t\tsetURI(prop.getProperty(\"existURI\"));\n \t\tusername = prop.getProperty(\"username\");\n \t\tpassword = prop.getProperty(\"password\");\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n\t}", "void getConnection() {\n }", "public contrustor(){\r\n\t}", "public ExternalServiceLayerCIMFactoryImpl() {\n\t\tsuper();\n\t}", "DBConnect() {\n \n }" ]
[ "0.53064364", "0.5220932", "0.51949483", "0.5146956", "0.51329076", "0.50948656", "0.50758404", "0.50438434", "0.49969062", "0.499373", "0.4981579", "0.49767327", "0.4972163", "0.49536583", "0.4929786", "0.49046612", "0.48441488", "0.4831414", "0.4830681", "0.48295915", "0.48124036", "0.48068672", "0.4806557", "0.4792564", "0.4792564", "0.4783227", "0.47786406", "0.4775227", "0.4713116", "0.47128358", "0.47084382", "0.4697986", "0.46834236", "0.46753126", "0.46716475", "0.46669582", "0.46570486", "0.4656839", "0.46458334", "0.4638603", "0.4622663", "0.46175605", "0.46161962", "0.46154898", "0.46106455", "0.4584667", "0.45828784", "0.45820668", "0.4577838", "0.45743713", "0.4569163", "0.45665866", "0.45630774", "0.4560568", "0.45597905", "0.45521995", "0.45398325", "0.45389578", "0.45337263", "0.45317784", "0.4521721", "0.452055", "0.45149106", "0.45140877", "0.45083082", "0.45071304", "0.45066616", "0.4506083", "0.44993043", "0.44966912", "0.4493784", "0.44918618", "0.44883004", "0.44867343", "0.44860452", "0.44841218", "0.44832742", "0.44784608", "0.44779012", "0.4475435", "0.44751963", "0.44751963", "0.44736755", "0.44735968", "0.4472711", "0.4471323", "0.4469383", "0.44633746", "0.44622663", "0.4459921", "0.44598195", "0.44556513", "0.44548798", "0.44538134", "0.44513872", "0.4447234", "0.44465938", "0.4429108", "0.4427713", "0.44203046", "0.44125736" ]
0.0
-1
TODO Autogenerated method stub
@Override public Seq getbyidentifier(String identifier) { Connection conn = null; PreparedStatement pstmt=null; ResultSet rs; Seq seq=null;List<Seq> seqs=new ArrayList<>(); ProcessesDAO pdao = new ProcessesDAO(); try { String url = "jdbc:sqlite:src\\database\\AT2_Mobile.db"; conn = DriverManager.getConnection(url); pstmt = conn.prepareStatement( "select * from seq where identifier = ?"); pstmt.setString(1,identifier); rs = pstmt.executeQuery(); while (rs.next()) { seqs.add(new Seq(rs.getInt("id"), pdao.getbyidentifier(rs.getString("identifier")), rs.getInt("seq_number"))); } rs.close(); pstmt.close(); } catch (SQLException e) { System.out.println(e.getMessage()); } finally { try { if (conn != null) { conn.close(); } } catch (SQLException ex) { System.out.println(ex.getMessage()); } } if(seqs==null || seqs.size()==0) { System.out.println("No value found"); }else if(seqs.size()>1){ System.out.println("Too many values found for a unique value"); }else { seq = seqs.get(0); //System.out.println("tkharbi9a"); return seq; } //System.out.println("tkharbi9a2"); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int plus(int x, int y) { return x + y; }
{ "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 int multi(int x, int y) { return x * y; }
{ "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
name of shared resource This constructor creates a token that can be passed from node to node on the network
public Token(int TTL, String extraTimeHost, String startNodeID, String skipNode, String customFileName) { this.TTL = TTL; this.extraTimeHost = extraTimeHost; this.startNodeID = startNodeID; this.skipNode = skipNode; this.customFileName = customFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConceptToken(String token) {\n _multiToken = false;\n _text = \"\";\n _tokens = new String[]{token};\n }", "@Override\r\n\tpublic Token createToken() {\n\t\tToken token = new Token();\r\n\t\treturn token;\r\n\t}", "public void setToken(java.lang.String param){\n localTokenTracker = true;\n \n this.localToken=param;\n \n\n }", "public String name() {\n\t\treturn \"shared\";\n\t}", "public Token() {\n token = new Random().nextLong();\n }", "public Token() {\n }", "private Token () { }", "private String createSharedToken(\n\t\t\tShibbolethResolutionContext resolutionContext, String localId,\n\t\t\tbyte[] salt) throws AttributeResolutionException {\n\t\tString persistentId;\n\t\tlog.info(\"creating a sharedToken ...\");\n\t\ttry {\n\t\t\tString localEntityId = null;\n\t\t\tif (this.idpIdentifier == null) {\n\t\t\t\tlocalEntityId = resolutionContext.getAttributeRequestContext()\n\t\t\t\t\t\t.getLocalEntityId();\n\t\t\t} else {\n\t\t\t\tlocalEntityId = idpIdentifier;\n\t\t\t}\n\t\t\tString globalUniqueID = localId + localEntityId + new String(salt);\n\t\t\tlog.info(\"the globalUniqueID (user/idp/salt): \" + localId + \" / \"\n\t\t\t\t\t+ localEntityId + \" / \" + new String(salt));\n\t\t\tbyte[] hashValue = DigestUtils.sha(globalUniqueID);\n\t\t\tbyte[] encodedValue = Base64.encodeBase64(hashValue);\n\t\t\tpersistentId = new String(encodedValue);\n\t\t\tpersistentId = this.replace(persistentId);\n\t\t\tlog.info(\"the created sharedToken: \" + persistentId);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"\\n failed to create the sharedToken. \");\n\t\t\tthrow new AttributeResolutionException(e.getMessage().concat(\n\t\t\t\t\t\"\\n failed to create the sharedToken.\"));\n\t\t}\n\t\treturn persistentId;\n\n\t}", "public Token() {\n }", "public Token newToken() {\r\n\t\tString value = UUID.randomUUID().toString();\r\n\t\treturn new Token(value);\r\n\t}", "public TemplexTokenMaker() {\r\n\t\tsuper();\r\n\t}", "public java.lang.String getToken(){\r\n return localToken;\r\n }", "public Token() {\n mTokenReceivedDate = new Date();\n }", "public java.lang.String getToken(){\n return localToken;\n }", "public AuthorizationToken(String token, String userName){\n this.token = token;\n this.userName = userName;\n }", "public Token(I2PAppContext ctx) {\n super(null);\n byte[] data = new byte[MY_TOK_LEN];\n ctx.random().nextBytes(data);\n setData(data);\n setValid(MY_TOK_LEN);\n lastSeen = ctx.clock().now();\n }", "String getPrimaryToken();", "Network_Resource createNetwork_Resource();", "public String getToken();", "@Override\n\tprotected AuthenticationToken createToken(ServletRequest request,\n\t\t\tServletResponse response) throws Exception {\n\t\tHttpServletRequest httpRequest = (HttpServletRequest) request;\n\t\tString ticket = httpRequest.getParameter(TICKET_PARAMETER);\n\t\treturn new CasToken(ticket);\n\t}", "GetToken.Req getGetTokenReq();", "public ResumptionToken(String token) {\n this(token, null, -1, -1);\n }", "public String newToken(){\n String line = getLine(lines);\n String token = getToken(line);\n return token;\n }", "public Token() {\n this.clitic = \"none\";\n }", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "public String token() {\n return Codegen.stringProp(\"token\").config(config).require();\n }", "public Token(T id, SecretManager<T> mgr) {\n password = mgr.createPassword(id);\n identifier = id.getBytes();\n kind = id.getKind();\n service = new Text();\n }", "private Resource() {}", "public void setToken(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTokenTracker = true;\r\n } else {\r\n localTokenTracker = false;\r\n \r\n }\r\n \r\n this.localToken=param;\r\n \r\n\r\n }", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "public SharedObject() {}", "public GenericResource() {\n }", "private SharedSecret(String domainName, Certificate creatorCert) {\n super(LENGTH);\n this.init();\n this.setDomainName(domainName);\n this.setCreator(creatorCert);\n }", "public GenericResource() {\r\n }", "public Token(byte[] identifier, byte[] password, Text kind, Text service) {\n this.identifier = (identifier == null)? new byte[0] : identifier;\n this.password = (password == null)? new byte[0] : password;\n this.kind = (kind == null)? new Text() : kind;\n this.service = (service == null)? new Text() : service;\n }", "public void allocateToken(int tokenNum) {\n inflightingRPCCounter.addAndGet(tokenNum);\n lastUpdateTs = System.currentTimeMillis();\n }", "Resource createResource();", "public StringBuilder createToken() throws IOException {\n /**\n * we need the url where we want to make an API call\n */\n URL url = new URL(\"https://api.scribital.com/v1/access/login\");\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n /**\n * set the required type, in this case it's a POST request\n */\n connection.setRequestMethod(\"POST\");\n\n /**\n * set the type of content, here we use a JSON type\n */\n connection.setRequestProperty(\"Content-Type\", \"application/json; utf-8\");\n connection.setDoOutput(true);\n\n /**\n * set the Timeout, will disconnect if the connection did not work, avoid infinite waiting\n */\n connection.setConnectTimeout(6000);\n connection.setReadTimeout(6000);\n\n /**\n * create the request body\n * here we need only the username and the api-key to make a POST request and to receive a valid token for the Skribble API\n */\n String jsonInputString = \"{\\\"username\\\": \\\"\" + username +\"\\\", \\\"api-key\\\":\\\"\" + api_key + \"\\\"}\";\n try(OutputStream os = connection.getOutputStream()){\n byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);\n os.write(input,0, input.length);\n }\n\n /**\n * read the response from the Skriblle API which is a token in this case\n */\n try(BufferedReader br = new BufferedReader(\n new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {\n StringBuilder response = new StringBuilder();\n String responseLine = null;\n while ((responseLine = br.readLine()) != null) {\n response.append(responseLine.trim());\n Token = response;\n }\n }\n return Token;\n }", "public BStarTokenMaker() {\n\t\tsuper();\n\t}", "Shared shared();", "public static String getToken() {\n String token = \"96179ce8939c4cdfacba65baab1d5ff8\";\n return token;\n }", "public GenericResource()\n {\n }", "public TokenFetcher(String commHost, damnApp djObj) {\n host = commHost;\n port = 80;\n dJ = djObj;\n }", "public GenericResource()\r\n {\r\n }", "java.lang.String getRemoteToken();", "private String issueToken(String username) {\n \n String token =TokenManagement.getTokenHS256(username,tokenSec,tokenduration);\n return token;\n }", "public synchronized void takeToken(TokenObject token) {\n\t\n\t\t// start critical section by instantiating and starting criticalSection thread\n\t\tcritical = new criticalSection(this_node, this_node_host, next_node, next_node_host, token);\n\t\t\n\t\tSystem.out.println(\"Entered method takeToken(): ringMemberImpl\");\n\t\tcritical.start();\n\t\tSystem.out.println(\"Exiting method takeToken(): ringMemberImpl\");\n\t\t\t\n\t}", "public APIToken() {\n super();\n }", "public ProfileTokenCredential() {\n super();\n new Random().nextBytes(addr_);\n new Random().nextBytes(mask_);\n }", "public String getToken()\n {\n return token;\n }", "GetToken.Res getGetTokenRes();", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\r\n return token;\r\n }", "@Override\n\tprotected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {\n\t\treturn null;\n\t}", "public OAuthRequestToken(Token token) {\n if (token == null) {\n return;\n }\n this.oauthToken = token.getToken();\n this.oauthTokenSecret = token.getSecret();\n }", "public ThreadControl(Socket actionSocket, String ServerThreadName, SharedState numOfSpaces) {\r\n\t\r\n\t super(ServerThreadName);\r\n\t this.actionSocket = actionSocket;\r\n\t mySharedStateObject = numOfSpaces;\r\n\t myServerThreadName = ServerThreadName;\r\n\t \r\n\t}", "public TarefaResource() {\r\n }", "String createToken(User user);", "public static ModuleFactory getInstance(final String token) {\n return getInstance(HOST, token);\n }", "public Request(String username, Resource resource) {\n this.username = username;\n this.resource = resource;\n this.resourceName = resource.getTitle();\n\n }", "public PersistentToken() {\n this.owner = \"\";\n this.issuer = \"\";\n this.amount = 0;\n this.linearId = UUID.randomUUID();\n this.listOfPersistentChildTokens = null;\n }", "Device_Resource createDevice_Resource();", "private Token(ISubscriber inSubscriber,\n MarketDataRequest inRequest)\n {\n subscriber = inSubscriber;\n request = inRequest;\n }", "public TokenTest (String name)\r\n {\r\n super (name);\r\n /*\r\n * This constructor should not be modified. Any initialization code\r\n * should be placed in the setUp() method instead.\r\n */\r\n }", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "public SessionResource() {\n }", "ResponseEntity<Response> me(String token);", "@Override\r\n\tpublic Token getToken(String token) {\n\t\treturn null;\r\n\t}", "void putToken(String name, String value);", "public AuthorizationToken retrieveToken(String token);", "public String createToken(String identity) throws InternalSkiException {\n byte[] tokenKey = getTokenKey();\n byte[] newKey = SkiKeyGen.generateKey(SkiKeyGen.DEFAULT_KEY_SIZE_BITS);\n\n Token tkn = new Token();\n tkn.setIdentity(identity);\n tkn.setKey(newKey);\n // log.info(\"New token key: \" + tkn.getKey());\n\n String tknValue = th.encodeToken(tkn, tokenKey);\n if (tknValue==null) {\n log.warning(\"Failed to encode token during token creation!\");\n }\n if (log.isLoggable(Level.FINE)) {\n log.fine(\"Created token with value: \" + tknValue);\n }\n return tknValue;\n }", "ResourceInstance createResource(String type) {\n Map<Resource.Type, String> mapIds = new HashMap<>();\n mapIds.put(Resource.Type.Cluster, clusterName);\n mapIds.put(Resource.Type.ClusterKerberosDescriptor, type);\n return createResource(Resource.Type.ClusterKerberosDescriptor, mapIds);\n }", "public S_RESOURCEObj() {\r\n }", "public WorkflowResource() {\r\n\t}", "@Override\n\tpublic String getTokenId() {\n\t\treturn null;\n\t}", "public tokenServer(int puerto) \n {\n this.PUERTO = puerto; \n this.token = false;\n this.elegido = false;\n }", "public GrantTokenEvent(List<String> reqTokens, List<String> reqNonTokens, String command, String token){\r\n\t\tsuper(reqTokens, reqNonTokens, command);\r\n\t\tthis.token = token;\r\n\t}", "public Observable<SscToken> requestSscToken() {\n return new ServiceConnector<SscToken>(\"TokenWS.php?wsdl\", \"RequestToken\"){}\n .execute(new WSParam(\"IMEI\", credentials.getImei()), \n new WSParam(\"Signature\", credentials.getSignature()),\n new WSParam(\"Salt\", credentials.getSalt()), new WSParam(\"VersionCode\", \n credentials.getVersionCode()));\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public AccountAuthToken() {\n }", "public void setToken(String token) {\r\n this.token = token;\r\n }", "private ParallelGatewayConstant() {\n }", "SharedPrivateLinkResource.DefinitionStages.Blank define(String name);", "public static String getToken() {\n \treturn mToken;\n }", "private ActiveUserResource(String username) {\n this.username = username;\n }", "public String getToken() {\n return token.get();\n }" ]
[ "0.587614", "0.5837173", "0.5772362", "0.5766106", "0.57480574", "0.57068074", "0.56916124", "0.566429", "0.5622927", "0.56028926", "0.56026787", "0.5598312", "0.55871916", "0.5571116", "0.555906", "0.55305713", "0.54834473", "0.5466122", "0.5444411", "0.5437957", "0.5421188", "0.5363941", "0.53434455", "0.53260255", "0.5314387", "0.5314387", "0.5314387", "0.5314387", "0.5314387", "0.5314387", "0.53128403", "0.52826655", "0.52756214", "0.5267246", "0.52610934", "0.5253961", "0.5253961", "0.5253961", "0.5253961", "0.5253961", "0.5233413", "0.5222254", "0.5219484", "0.52175665", "0.52137357", "0.52053314", "0.52033806", "0.5202761", "0.5201082", "0.519912", "0.51928407", "0.5178167", "0.51727855", "0.517247", "0.51623803", "0.51447254", "0.51406807", "0.5122724", "0.51104164", "0.5106077", "0.51051825", "0.50859123", "0.50859123", "0.5085581", "0.508518", "0.50808746", "0.5076003", "0.5069064", "0.5068927", "0.5058365", "0.5056501", "0.5049611", "0.5049145", "0.5045328", "0.5043988", "0.503727", "0.5035467", "0.5033824", "0.5031125", "0.50284135", "0.50258905", "0.5023989", "0.50235236", "0.50164026", "0.50156367", "0.5012317", "0.5007239", "0.50040877", "0.5002237", "0.5002237", "0.5002237", "0.5002237", "0.5002237", "0.5001639", "0.49958518", "0.49939924", "0.49910337", "0.4984151", "0.49834242", "0.49814066" ]
0.5103136
61
end of constructor Token This is an overloaded constructor that creates a kill token. This will terminate all nodes on the current network.
public Token(boolean killNode) { this.killNode = killNode; //sets local killNode variable to true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Token() {\n }", "public Token() {\n token = new Random().nextLong();\n }", "public Token() {\n this.clitic = \"none\";\n }", "public Token() {\n }", "private Token () { }", "public Token newToken() {\r\n\t\tString value = UUID.randomUUID().toString();\r\n\t\treturn new Token(value);\r\n\t}", "public Token(I2PAppContext ctx) {\n super(null);\n byte[] data = new byte[MY_TOK_LEN];\n ctx.random().nextBytes(data);\n setData(data);\n setValid(MY_TOK_LEN);\n lastSeen = ctx.clock().now();\n }", "public Token(int ordinal) {\r\n\t\tthis.ordinal = ordinal;\r\n\t\tthis.value = null;\r\n\t}", "@Override\r\n\tpublic Token createToken() {\n\t\tToken token = new Token();\r\n\t\treturn token;\r\n\t}", "public TemplexTokenMaker() {\r\n\t\tsuper();\r\n\t}", "public Token(int TTL, String extraTimeHost, String startNodeID, String skipNode, String customFileName)\r\n {\r\n this.TTL = TTL;\r\n this.extraTimeHost = extraTimeHost;\r\n this.startNodeID = startNodeID;\r\n this.skipNode = skipNode;\r\n this.customFileName = customFileName;\r\n\r\n }", "public Tokenizer() {\n tokenInfos = new LinkedList<TokenInfo>();\n tokens = new LinkedList<Token>();\n\n }", "public Token(String terme, int tf) {\r\n\t\t\r\n\t\tthis.Terme = terme;\r\n\t\tthis.tf = tf;\r\n\t}", "public Token(int start)\n {\n this.start = start;\n }", "public AstParser(AstParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 9; i++) jj_la1[i] = -1;\n }", "public DwollaTokens() {\n\t\tthis(\"dwolla_tokens\", null);\n\t}", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Builder clearToken() {\n bitField0_ = (bitField0_ & ~0x00000001);\n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public Token(int nnodes) {\n\t\tthis.l=new int[nnodes];\n\t\tthis.q=new boolean[nnodes];\n\t\tfor(int j=0;j<nnodes;j++){\n\t\t\tq[j]=false;\n\t\t}\n }", "public Token(I2PAppContext ctx, byte[] data) {\n super(data);\n // lets not get carried away\n if (data.length > MAX_TOK_LEN)\n throw new IllegalArgumentException();\n lastSeen = ctx.clock().now();\n }", "public Token() {\n mTokenReceivedDate = new Date();\n }", "public Token(int lineNumber) {\n\t\tthis.value = null;\n\t\tthis.type = TokenType.EOF;\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.numVal = 0;\n\t\tthis.wordVal = null;\n\t}", "public Node() {\n\t\tnumberOfAttacks = Integer.MAX_VALUE;\n\t\tstate = new State(); // Generate a random state.\n\t\t// Calculate its number of attacks.\n\t\tnumberOfAttacks = state.calculatenumberOfAttacks();\n\t}", "public PersistentToken() {\n this.owner = \"\";\n this.issuer = \"\";\n this.amount = 0;\n this.linearId = UUID.randomUUID();\n this.listOfPersistentChildTokens = null;\n }", "private Token(int code)\n {\n myCode = code;\n }", "public Token(byte[] data) {\n super(data);\n lastSeen = 0;\n }", "public Node(){\n this(9);\n }", "public VariableToken(String text) {\n super(text);\n }", "public Parser(ParserTokenManager tm) {\r\n token_source = tm;\r\n token = new Token();\r\n jj_ntk = -1;\r\n }", "public String newToken(){\n String line = getLine(lines);\n String token = getToken(line);\n return token;\n }", "public Builder clearToken() {\n \n token_ = getDefaultInstance().getToken();\n onChanged();\n return this;\n }", "public OtherTokenizer() {\n super();\n }", "public Robot(RobotTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 0; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public ReleaseTokenCommand(final TokenBuilderContext context, final ILexerCommand command) {\n this.context = context;\n this.command = command;\n }", "public BStarTokenMaker() {\n\t\tsuper();\n\t}", "public Token(String tipo, String lexema){\n\t\tthis.tipo = tipo;\n\t\tthis.lexema = lexema;\n\t}", "public BasicParser(BasicParserTokenManager tm) {\n\t token_source = tm;\n\t token = new Token();\n\t jj_ntk = -1;\n\t jj_gen = 0;\n\t for (int i = 0; i < 13; i++) jj_la1[i] = -1;\n }", "public JavaTokenMaker() {\n\t}", "public Token(String text, int start, int end, int flags) {\n termText = text;\n startOffset = start;\n endOffset = end;\n this.flags = flags;\n }", "public Token(Token other) {\n __isset_bitfield = other.__isset_bitfield;\n this.tokenIndex = other.tokenIndex;\n if (other.isSetText()) {\n this.text = other.text;\n }\n if (other.isSetTextSpan()) {\n this.textSpan = new edu.jhu.hlt.concrete.TextSpan(other.textSpan);\n }\n if (other.isSetRawTextSpan()) {\n this.rawTextSpan = new edu.jhu.hlt.concrete.TextSpan(other.rawTextSpan);\n }\n if (other.isSetAudioSpan()) {\n this.audioSpan = new edu.jhu.hlt.concrete.AudioSpan(other.audioSpan);\n }\n }", "@Override\n public void kill()\n {\n }", "public boolean checkKillToken()\r\n {\r\n return killNode;\r\n }", "public Token(int start, int end, int flags){\n startOffset = start;\n endOffset = end;\n this.flags = flags;\n }", "public Token(byte[] identifier, byte[] password, Text kind, Text service) {\n this.identifier = (identifier == null)? new byte[0] : identifier;\n this.password = (password == null)? new byte[0] : password;\n this.kind = (kind == null)? new Text() : kind;\n this.service = (service == null)? new Text() : service;\n }", "public MeinParser(MeinParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 5; i++) jj_la1[i] = -1;\n }", "public Tokenizer() {\r\n tokenList = new ArrayList<>();\r\n\r\n mathOperations = new ArrayList<>(5);\r\n mathOperations.add(\"+\");\r\n mathOperations.add(\"-\");\r\n mathOperations.add(\"*\");\r\n mathOperations.add(\"/\");\r\n mathOperations.add(\"%\");\r\n theBuilder = new TokenBuilder(\"\\\\s+\", mathOperations);\r\n }", "public KillException() {}", "public Go(GoTokenManager tm) {\n token_source = tm;\n token = new Token();\n token.next = jj_nt = token_source.getNextToken();\n jj_gen = 0;\n for (int i = 0; i < 43; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "@Override\n\tpublic void kill() {\n\n\t}", "public void kill();", "public void kill();", "public Token(Type t, String c) {\r\n this.t = t;\r\n this.c = c;\r\n }", "public ParseTreeNode(final Token token) {\r\n _parent = null;\r\n _token = token;\r\n }", "public Token(int start, int end, String typ) {\n startOffset = start;\n endOffset = end;\n type = typ;\n }", "void createLabelToken( String name, int id );", "public tokenServer(int puerto) \n {\n this.PUERTO = puerto; \n this.token = false;\n this.elegido = false;\n }", "public Node(){\n\n\t\t}", "public Node(){}", "private Node() {\n\n }", "public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }", "public PersistentChildToken() {\n this.Id = UUID.randomUUID();\n this.owner = \"\";\n this.issuer = \"\";\n this.amount = 0;\n this.persistentToken = null;\n this.childProof = \"I am a child\";\n this.listOfPersistentGrandChildTokens = null;\n }", "void token(TokenNode node);", "public Token(int lineNum, int tokenId, String tokenName)\n\t{\n\t\tthis.lineNum = lineNum;\n\t\tthis.tokenId = tokenId;\n\t\tthis.tokenName = tokenName;\n\t\ttokenIdtoName(tokenId);\n\t}", "public final void kill() {\n doKill();\n }", "public ConceptToken(String token) {\n _multiToken = false;\n _text = \"\";\n _tokens = new String[]{token};\n }", "public Lex()\n {\n num_tags = Tags.num_tags;\n }", "public Builder clearToken() {\n copyOnWrite();\n instance.clearToken();\n return this;\n }", "public Builder clearToken() {\n copyOnWrite();\n instance.clearToken();\n return this;\n }", "public Builder clearToken() {\n copyOnWrite();\n instance.clearToken();\n return this;\n }", "public Token(String text, int start, int end, String typ) {\n termText = text;\n startOffset = start;\n endOffset = end;\n type = typ;\n }", "public ResumptionToken(String token) {\n this(token, null, -1, -1);\n }", "@Override \n public void commandKill(int id) {\n\n }", "public Node() {\n }", "public Token(TokenType type) {\n\t\tthis.type = type;\n\t\tthis.spelling = type.getSpelling();\n\t}", "public TinyNode(String opCode, String varName) {\n this.OpCode = opCode;\n this.Operand = null;\n this.Result = varName;\n }", "Token(Type ttype, String v, int p, int l) {\n type = ttype;\n value = v;\n pos = p;\n line = l;\n }", "public SpecialCharToken(char value) {\n this(value, null);\n }", "public Token(Token other) {\n __isset_bitfield = other.__isset_bitfield;\n this.token_num = other.token_num;\n if (other.isSetToken()) {\n this.token = other.token;\n }\n if (other.isSetOffsets()) {\n Map<OffsetType,Offset> __this__offsets = new HashMap<OffsetType,Offset>();\n for (Map.Entry<OffsetType, Offset> other_element : other.offsets.entrySet()) {\n\n OffsetType other_element_key = other_element.getKey();\n Offset other_element_value = other_element.getValue();\n\n OffsetType __this__offsets_copy_key = other_element_key;\n\n Offset __this__offsets_copy_value = new Offset(other_element_value);\n\n __this__offsets.put(__this__offsets_copy_key, __this__offsets_copy_value);\n }\n this.offsets = __this__offsets;\n }\n this.sentence_pos = other.sentence_pos;\n if (other.isSetLemma()) {\n this.lemma = other.lemma;\n }\n if (other.isSetPos()) {\n this.pos = other.pos;\n }\n if (other.isSetEntity_type()) {\n this.entity_type = other.entity_type;\n }\n this.mention_id = other.mention_id;\n this.equiv_id = other.equiv_id;\n this.parent_id = other.parent_id;\n if (other.isSetDependency_path()) {\n this.dependency_path = other.dependency_path;\n }\n if (other.isSetLabels()) {\n Map<String,List<Label>> __this__labels = new HashMap<String,List<Label>>();\n for (Map.Entry<String, List<Label>> other_element : other.labels.entrySet()) {\n\n String other_element_key = other_element.getKey();\n List<Label> other_element_value = other_element.getValue();\n\n String __this__labels_copy_key = other_element_key;\n\n List<Label> __this__labels_copy_value = new ArrayList<Label>();\n for (Label other_element_value_element : other_element_value) {\n __this__labels_copy_value.add(new Label(other_element_value_element));\n }\n\n __this__labels.put(__this__labels_copy_key, __this__labels_copy_value);\n }\n this.labels = __this__labels;\n }\n if (other.isSetMention_type()) {\n this.mention_type = other.mention_type;\n }\n }", "public void kill() { _isAlive = false; }", "Node(){\r\n\t\tdata = null;\r\n\t\tnext = null;\r\n\t}", "public Token(TokenCode code, OpType otype, DataType dtype, int line, int column) {\n _code = code;\n _opType = otype;\n _dataType = dtype;\n _lineNumber = line;\n _columnNumber = column;\n }", "private SemanticTokens(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node()\n\t{\n\t\t\n\t\tdata = new IntData();\n\t\tdata.setData(Integer.MIN_VALUE);\n\t\tnext=null;\n\t}", "public Builder clearTokenId() {\n \n tokenId_ = getDefaultInstance().getTokenId();\n onChanged();\n return this;\n }", "public Node() {\r\n\t\tthis.input = null;\r\n\t\tthis.inputWeights = null;\r\n\t}", "public Node()\r\n\t{\r\n\t\tnext = null;\r\n\t\tinfo = 0;\r\n\t}", "TermNode() {\n this.fac = new FacNode();\n this.term = null;\n this.selection = 1;\n }", "Node(){\n\t\t\tthis.array = new Node[256];\n\t\t\tthis.val = null;\n\t\t}", "public Spill() {\n\t\tthis(0, null);\n\t}", "public Node() {\r\n\t}", "public Node() {\r\n\t}", "protected AST_Node() {\r\n\t}", "public TerminalSymbolFact(String name, ITokenizer tkz) {\r\n\t\tsuper(name, tkz);\r\n\t}" ]
[ "0.639739", "0.63928086", "0.6388191", "0.6385388", "0.62574357", "0.6011722", "0.6002115", "0.5953099", "0.57222646", "0.56720746", "0.56660753", "0.5641501", "0.5578558", "0.55605525", "0.5533036", "0.55060846", "0.5491263", "0.5491263", "0.5491263", "0.5491263", "0.5491263", "0.54852104", "0.54840255", "0.5431691", "0.54282886", "0.53999454", "0.53864384", "0.5384074", "0.53695273", "0.53603894", "0.53513294", "0.53486836", "0.5331331", "0.5330177", "0.5281095", "0.52771807", "0.5271389", "0.5267851", "0.5240373", "0.5236437", "0.5229932", "0.52272743", "0.5223004", "0.52170813", "0.5214619", "0.5201259", "0.519999", "0.51835215", "0.51731205", "0.51641667", "0.5152987", "0.5145352", "0.51434934", "0.51434934", "0.51286006", "0.50994706", "0.5078912", "0.5075619", "0.5068147", "0.50555915", "0.50554246", "0.5051004", "0.50469506", "0.50428414", "0.50357425", "0.50318855", "0.5016657", "0.50111467", "0.5008025", "0.50048584", "0.50048584", "0.50048584", "0.49969885", "0.49916053", "0.49895298", "0.49882808", "0.49869376", "0.4977002", "0.49742827", "0.49741685", "0.49732408", "0.49724406", "0.49704915", "0.49678266", "0.4964233", "0.49622384", "0.49622384", "0.49622384", "0.49622384", "0.49461836", "0.4940671", "0.49357033", "0.49325964", "0.4920783", "0.4916664", "0.49141645", "0.4911003", "0.4911003", "0.490408", "0.48968795" ]
0.7808443
0
end of constructor Token (killNode) The section below contains the code that enables the skip processing behaviour This allows a host to skip its processing time using the token every second pass
public boolean setSkips(String host) { if(skipNode.equals(host)) { if(skips == 1) { skips = 0; System.out.println("Skipping token usage"); return true; } skips++; return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Token(boolean killNode)\r\n {\r\n this.killNode = killNode; //sets local killNode variable to true\r\n\r\n }", "public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}", "public Token(int TTL, String extraTimeHost, String startNodeID, String skipNode, String customFileName)\r\n {\r\n this.TTL = TTL;\r\n this.extraTimeHost = extraTimeHost;\r\n this.startNodeID = startNodeID;\r\n this.skipNode = skipNode;\r\n this.customFileName = customFileName;\r\n\r\n }", "public boolean checkKillToken()\r\n {\r\n return killNode;\r\n }", "private Token () { }", "Token next();", "public Token() {\n this.clitic = \"none\";\n }", "void canceledPendingNodeStop();", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "public AstParser(AstParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 9; i++) jj_la1[i] = -1;\n }", "public MeinParser(MeinParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 5; i++) jj_la1[i] = -1;\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"#OPh7\");\n Token token0 = xPathLexer0.whitespace();\n assertEquals((-2), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n \n Token token1 = xPathLexer0.not();\n assertEquals(\"O\", token1.getTokenText());\n assertEquals(23, token1.getTokenType());\n \n Token token2 = xPathLexer0.nextToken();\n assertEquals(\"Ph7\", token2.getTokenText());\n assertEquals(15, token2.getTokenType());\n }", "void unexpectedTokenDeleted(Term token);", "public Token(I2PAppContext ctx) {\n super(null);\n byte[] data = new byte[MY_TOK_LEN];\n ctx.random().nextBytes(data);\n setData(data);\n setValid(MY_TOK_LEN);\n lastSeen = ctx.clock().now();\n }", "public String skipToken() {\n return this.skipToken;\n }", "void nodeStopped();", "public Token() {\n token = new Random().nextLong();\n }", "public Token(int start)\n {\n this.start = start;\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"#OPh7\");\n Token token0 = xPathLexer0.not();\n assertEquals(\"#\", token0.getTokenText());\n assertEquals(23, token0.getTokenType());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"OPh7\", token1.getTokenText());\n }", "@Override\n public void visit(NoOpNode noOpNode) {\n }", "void token(TokenNode node);", "SkipList()\r\n {\r\n head = new Node<T>(1); //Create a new head of our skip list and give it height 1.\r\n }", "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "private void processNonOptionToken(String value, boolean stopAtNonOption) {\n }", "public BasicParser(BasicParserTokenManager tm) {\n\t token_source = tm;\n\t token = new Token();\n\t jj_ntk = -1;\n\t jj_gen = 0;\n\t for (int i = 0; i < 13; i++) jj_la1[i] = -1;\n }", "void cannotRecognize(Term token);", "public Token() {\n }", "@Override\n protected void reportUnwantedToken(Parser recognizer) {\n super.reportUnwantedToken(recognizer);\n System.exit(SYNTAX_ERROR_CODE);\n }", "int getTokenStart();", "private Token(int code)\n {\n myCode = code;\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n StringReader stringReader0 = new StringReader(\"void\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.MoreLexicalActions();\n }", "@Override\n\tpublic void kill() {\n\n\t}", "public Token(int ordinal) {\r\n\t\tthis.ordinal = ordinal;\r\n\t\tthis.value = null;\r\n\t}", "public abstract void unblockNext();", "public TokenPa (int playerCount) {\n\t\t// implemented in part (a)\n\t}", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume(2033);\n Token token0 = xPathLexer0.whitespace();\n assertEquals((-2), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n }", "protected void scanNoSkip() throws TableFunctionMalformedException {\r\n\t\t\t\r\n\t\tint kw;\r\n\t\t\r\n\t\tgetName();\r\n\t\t\r\n\t\tkw = lookup(value);\r\n\t\tif (kw == -1)\r\n\t\t\ttoken = 'x';\r\n\t\telse\r\n\t\t\ttoken = kwcode[kw];\r\n\t\t// Debug.println(\"\\n!!!Value = \" + value);\r\n\t}", "@Override\n\tpublic void skip() {\n\t}", "@Test(timeout = 4000)\n public void test146() throws Throwable {\n StringReader stringReader0 = new StringReader(\"-\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 5458, 5458);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.jjFillToken();\n assertEquals(102, token0.kind);\n assertEquals(\"-\", token0.toString());\n }", "@Override\n public void kill()\n {\n }", "public Token() {\n }", "public Parser(ParserTokenManager tm) {\r\n token_source = tm;\r\n token = new Token();\r\n jj_ntk = -1;\r\n }", "private void passToken(String token, int procNo){\r\n if(procNo>6) {\r\n \tprocNo = procNo - 6;\r\n }\r\n try {\r\n socket = new Socket(\"127.0.0.1\", 8080+procNo);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n } catch(Exception ex) {\r\n \tpassToken(token, procNo+1); // send it to next next if the next one was unavailable\r\n }\r\n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n StringReader stringReader0 = new StringReader(\"void\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"void\", token0.toString());\n }", "public LEParser(LEParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 5; i++) jj_la1[i] = -1;\n }", "public TemplexTokenMaker() {\r\n\t\tsuper();\r\n\t}", "public Go(GoTokenManager tm) {\n token_source = tm;\n token = new Token();\n token.next = jj_nt = token_source.getNextToken();\n jj_gen = 0;\n for (int i = 0; i < 43; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public OBOParser(OBOParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 6; i++) {\n jj_la1[i] = -1;\n }\n }", "public VjComment(VjCommentTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 0; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public Token(byte[] data) {\n super(data);\n lastSeen = 0;\n }", "void nodeFailedToStop(Exception e);", "public SkipListNode() {\n\t// construct a dummy node\n\tdata = null;\n\tnext = new ArrayList<SkipListNode<K>>();\n\tnext.add(null);\n }", "public Token(int nnodes) {\n\t\tthis.l=new int[nnodes];\n\t\tthis.q=new boolean[nnodes];\n\t\tfor(int j=0;j<nnodes;j++){\n\t\t\tq[j]=false;\n\t\t}\n }", "public OtherTokenizer() {\n super();\n }", "@Override\n\tpublic void stopProcessing() {\n\n\t}", "public void releaseToken(int tokenNum) {\n inflightingRPCCounter.addAndGet(-tokenNum);\n lastUpdateTs = System.currentTimeMillis();\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"^,kM\");\n Token token0 = xPathLexer0.dollar();\n assertEquals(\"^\", token0.getTokenText());\n assertEquals(26, token0.getTokenType());\n \n Token token1 = xPathLexer0.not();\n assertEquals(23, token1.getTokenType());\n assertEquals(\",\", token1.getTokenText());\n \n Token token2 = xPathLexer0.nextToken();\n assertEquals(15, token2.getTokenType());\n assertEquals(\"kM\", token2.getTokenText());\n }", "@Nonnull\n public SynchronizationJobCollectionRequest skipToken(@Nonnull final String skipToken) {\n \taddSkipTokenOption(skipToken);\n return this;\n }", "public ProgramParser(ProgramParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 14; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public Token(int lineNumber) {\n\t\tthis.value = null;\n\t\tthis.type = TokenType.EOF;\n\t\tthis.lineNumber = lineNumber;\n\t\tthis.numVal = 0;\n\t\tthis.wordVal = null;\n\t}", "public void setToken(int value){token = value;}", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"^r\");\n Token token0 = xPathLexer0.nextToken();\n assertEquals(\"^r\", token0.getTokenText());\n }", "public Node() {\n pNext = null;\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!%cD=EVjn`\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.curLexState = 464;\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, token0.kind);\n assertEquals(\"\", token0.toString());\n }", "@Override\r\n\tpublic JavaToken nextToken() {\r\n\t\tif (!ready())\r\n\t\t\treturn null;\r\n\t\tint oldPos = this.pos;\r\n\t\tint type = PLAIN;\r\n\t\tif (LL(0) == ' ' || LL(0) == '\\t' || LL(0) == '\\n' || LL(0) == '\\r') {\r\n\t\t\tconsumeWhiteSpace();\r\n\t\t\ttype = WHITESPACE;\r\n\t\t} else if (Character.isJavaIdentifierStart(LL(0))) {\r\n\t\t\tconsumeIdentifier();\r\n\t\t} else if (LL(0) == '#') {\r\n\t\t\tconsumeSingleLineComment();\r\n\t\t\ttype = COMMENT;\r\n\t\t} else if (LL(0) == '\\\"') {\r\n\t\t\tif (LL(1) == '\\\"' && LL(2) == '\\\"') {\r\n\t\t\t\tconsumeMultiLineComment();\r\n\t\t\t\ttype = COMMENT;\r\n\t\t\t} else {\r\n\t\t\t\tconsumeStringLiteral();\r\n\t\t\t\ttype = LITERAL;\r\n\t\t\t}\r\n\t\t} else if (LL(0) == '\\'') {\r\n\t\t\tconsumeCharacterLiteral();\r\n\t\t\ttype = LITERAL;\r\n\t\t} else {\r\n\t\t\tconsumeCharacter();\r\n\t\t}\r\n\t\tString t = text.substring(oldPos, pos);\r\n\t\tif (type == PLAIN) {\r\n\t\t\tif (keywords.get(t) != null)\r\n\t\t\t\ttype = KEYWORD;\r\n\t\t}\r\n\t\treturn new JavaToken(t, off + oldPos, type);\r\n\t}", "public void skip()\n {\n skip(1);\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"niW\");\n Token token0 = xPathLexer0.nextToken();\n assertEquals(15, token0.getTokenType());\n assertEquals(\"niW\", token0.getTokenText());\n }", "public Token(I2PAppContext ctx, byte[] data) {\n super(data);\n // lets not get carried away\n if (data.length > MAX_TOK_LEN)\n throw new IllegalArgumentException();\n lastSeen = ctx.clock().now();\n }", "@Test(timeout = 4000)\n public void test163() throws Throwable {\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager((JavaCharStream) null, 0);\n javaParserTokenManager0.ReInit((JavaCharStream) null, 0);\n }", "@Test(timeout = 4000)\n public void test154() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"'=X_\");\n Token token0 = xPathLexer0.nextToken();\n assertEquals((-1), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n }", "public void preempt()\n\t{\n\t}", "public Spill() {\n\t\tthis(0, null);\n\t}", "public Code visitSkipNode(StatementNode.SkipNode node) {\n beginGen(\"Skip\");\n Code code = new Code();\n endGen(\"Skip\");\n return code;\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n Token token0 = xPathLexer0.notEquals();\n assertEquals(22, token0.getTokenType());\n assertEquals(\"co\", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"m.werken.saxpath.XPathLexer\", token1.getTokenText());\n }", "public synchronized void takeToken(TokenObject token) {\n\t\n\t\t// start critical section by instantiating and starting criticalSection thread\n\t\tcritical = new criticalSection(this_node, this_node_host, next_node, next_node_host, token);\n\t\t\n\t\tSystem.out.println(\"Entered method takeToken(): ringMemberImpl\");\n\t\tcritical.start();\n\t\tSystem.out.println(\"Exiting method takeToken(): ringMemberImpl\");\n\t\t\t\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n Token token0 = xPathLexer0.whitespace();\n assertEquals(\"\", token0.getTokenText());\n assertEquals((-2), token0.getTokenType());\n }", "@Override\n public void run(){\n try {\n sleep(3000);\n node.scream();\n node.kill();\n node.setState(Status.RED);\n\n }\n catch(Exception e){\n System.out.println(e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.setXPath(\"r1p%9otIqOp|?D[\");\n Token token0 = xPathLexer0.notEquals();\n assertEquals(22, token0.getTokenType());\n assertEquals(\"r1\", token0.getTokenText());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\"p\", token1.getTokenText());\n assertEquals(15, token1.getTokenType());\n }", "public void visitNOP(NOP o){\n\t\t// nothing is to be done here.\n\t}", "public String newToken(){\n String line = getLine(lines);\n String token = getToken(line);\n return token;\n }", "void missingTokenInserted(Term token);", "final void advanceToNextTokenSilently()\n {\n try\n {\n getTokenizer().nextToken();\n }\n catch( Exception e )\n {\n // ignore\n }\n }", "private void handleKillStop() {\n if (curState == 3) {\n handler.removeMessages(10);\n int curBuffer = getCurBufferSize();\n targetBuffer = Math.max(curBuffer, targetBuffer);\n targetBuffer = Math.min(maxTargetBuffer, targetBuffer);\n targetBuffer = Math.max(targetBuffer, minTargetBuffer);\n Trace.traceBegin(8, \"killFinish:\" + targetBuffer);\n int i = targetBuffer;\n setBuffer(i, i - lowBufferStep, highBufferStep + i, swapReserve);\n Trace.traceEnd(8);\n Slog.i(TAG, \"handle kill stop end, current buffer: \" + curBuffer + \", targetBuffer: \" + targetBuffer);\n curState = 0;\n }\n }", "@Test(timeout = 4000)\n public void test156() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"II%oBQL*c\");\n Token token0 = xPathLexer0.not();\n assertEquals(23, token0.getTokenType());\n assertEquals(\"I\", token0.getTokenText());\n \n Token token1 = xPathLexer0.star();\n assertEquals(\"I\", token1.getTokenText());\n assertEquals(20, token1.getTokenType());\n \n Token token2 = xPathLexer0.nextToken();\n assertEquals(\"%oBQL*c\", token2.getTokenText());\n assertEquals((-1), token2.getTokenType());\n }", "public void kill(){\n agent.kill();\n killed=true;\n LinkedList<Object> list = new LinkedList<>();\n queue.add(list);\n }", "public BStarTokenMaker() {\n\t\tsuper();\n\t}", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n Token token0 = xPathLexer0.getPreviousToken();\n assertNull(token0);\n }", "public void kill();", "public void kill();", "CodeContext(Context ctx, Node node) {\n super(ctx, node);\n switch (node.op) {\n case DO:\n case WHILE:\n case FOR:\n case FINALLY:\n case SYNCHRONIZED:\n this.breakLabel = new Label();\n this.contLabel = new Label();\n break;\n case SWITCH:\n case TRY:\n case INLINEMETHOD:\n case INLINENEWINSTANCE:\n this.breakLabel = new Label();\n break;\n default:\n if ((node instanceof Statement) && (((Statement)node).labels != null)) {\n this.breakLabel = new Label();\n }\n }\n }", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n StringReader stringReader0 = new StringReader(\"pZhZ$;yY23j:\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 121, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.SwitchTo((-1));\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Error: Ignoring invalid lexical state : -1. State unchanged.\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "public void setNoTokensByLine(final int noTokensByLine) {\r\n\t\tthis.noTokensByLine = noTokensByLine;\r\n\t}", "@Override\r\n\tpublic void skip() {\n\t\tSystem.out.println(\"Skip\");\r\n\t}", "public Robot(RobotTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 0; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public VariableToken(String text) {\n super(text);\n }", "@Test(timeout = 4000)\n public void test128() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!tcbD=EVjn`\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-7), 6);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"D\", token0.toString());\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test124() throws Throwable {\n StringReader stringReader0 = new StringReader(\"J..!IK9I\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"J\", token0.toString());\n assertEquals(74, token0.kind);\n }", "void skip();", "public ResumptionToken(String token) {\n this(token, null, -1, -1);\n }", "@Override\n\tprotected void killReward() {\n\t\t\n\t}" ]
[ "0.7258314", "0.6466044", "0.5832698", "0.57495177", "0.56783074", "0.556037", "0.5533162", "0.54706925", "0.5466864", "0.5384442", "0.53746045", "0.5332439", "0.52939856", "0.52847564", "0.5279081", "0.5277059", "0.52767056", "0.5206558", "0.5200677", "0.51947224", "0.5183744", "0.5178973", "0.51682836", "0.51370037", "0.51204807", "0.5120075", "0.5102444", "0.5101561", "0.5081094", "0.5080206", "0.5078228", "0.5077849", "0.5059414", "0.5042103", "0.5035718", "0.5033668", "0.50265837", "0.5017505", "0.49982077", "0.49891877", "0.4982912", "0.4981707", "0.49710447", "0.49637252", "0.49614206", "0.49613702", "0.49486995", "0.49411294", "0.49393895", "0.49385393", "0.4935808", "0.49354103", "0.4893895", "0.4884242", "0.48800263", "0.48754573", "0.48749503", "0.48679227", "0.48673463", "0.4864985", "0.48564303", "0.4843288", "0.4841055", "0.48406282", "0.4833733", "0.48300692", "0.48297375", "0.48257735", "0.48222694", "0.48210248", "0.48097005", "0.4805765", "0.47984758", "0.47932827", "0.47912684", "0.4788922", "0.47683638", "0.4762337", "0.475701", "0.47506586", "0.47462988", "0.47442815", "0.4738722", "0.47256103", "0.4722368", "0.47221723", "0.4717279", "0.47118935", "0.47118935", "0.47093788", "0.47007734", "0.47001362", "0.46996516", "0.4697316", "0.4696649", "0.4694172", "0.46921223", "0.46893954", "0.46890375", "0.46850792" ]
0.5378222
10
The section below section deals with the behaviour of the kill token Returns the type of token the node is dealing with.
public boolean checkKillToken() { return killNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Token(boolean killNode)\r\n {\r\n this.killNode = killNode; //sets local killNode variable to true\r\n\r\n }", "void unexpectedTokenDeleted(Term token);", "public TYPE tokenType(){\n\n return currentTokenType;\n }", "@Override\n\tpublic void kill() {\n\n\t}", "@Override\n public void kill()\n {\n }", "public void kill();", "public void kill();", "void token(TokenNode node);", "public void actionTYPE(Node<TokenAttributes> node) {\n if (node.getChildren().get(0).getNodeData().getText().equals(\"TYPE\")) {\n BIB.removeNode(node);\n }\n }", "public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}", "public String getToken_type() {\r\n\t\treturn token_type;\r\n\t}", "@Override \n public void commandKill(int id) {\n\n }", "public String getTokenType() {\n return tokenType;\n }", "public int getTokenType() {\n return type_;\n }", "@Override\n\tprotected void killReward() {\n\t\t\n\t}", "@Override\n protected void reportUnwantedToken(Parser recognizer) {\n super.reportUnwantedToken(recognizer);\n System.exit(SYNTAX_ERROR_CODE);\n }", "public void kill(int tk, int ts) {\n\t\tSystem.out.println(\"Total kills: \"+tk);\r\n\t\tSystem.out.println(\"Total Score: \"+ts);\r\n\t}", "public void kill() {\r\n \t\tthis.isDead = true;\r\n \t}", "public final void kill() {\n doKill();\n }", "public void kill()\n\t{\n\t\tisKilled = true;\n\t}", "private TokenType peekType() {\n return peekType(0);\n }", "public void kill(){\n agent.kill();\n killed=true;\n LinkedList<Object> list = new LinkedList<>();\n queue.add(list);\n }", "private void kill(Cell cell)\n\t{\n\t\tcell.setNextState(EMPTY);\n\t\tresetBreedTime(cell);\n\t\tresetStarveTime(cell);\n\t}", "private Token token(final TermToken tt) {\n return tt.hasLexicalToken() ? tt.token().token() : null;\n }", "public boolean killed(Mention mention);", "private Token symbol(TOKEN_TYPE t){\t\n\t\tntk++;\n\t\treturn new Token(t, yytext(), yyline+1, yycolumn+1); // yytext() é o lexema\n\t}", "void cannotRecognize(Term token);", "public TokenType getType() {\n return type;\n }", "private void handleKillStop() {\n if (curState == 3) {\n handler.removeMessages(10);\n int curBuffer = getCurBufferSize();\n targetBuffer = Math.max(curBuffer, targetBuffer);\n targetBuffer = Math.min(maxTargetBuffer, targetBuffer);\n targetBuffer = Math.max(targetBuffer, minTargetBuffer);\n Trace.traceBegin(8, \"killFinish:\" + targetBuffer);\n int i = targetBuffer;\n setBuffer(i, i - lowBufferStep, highBufferStep + i, swapReserve);\n Trace.traceEnd(8);\n Slog.i(TAG, \"handle kill stop end, current buffer: \" + curBuffer + \", targetBuffer: \" + targetBuffer);\n curState = 0;\n }\n }", "protected void kill() {\n\t\tsetDeathTime(0.6);\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void kill() {\n this.hp = 0;\n }", "Token next();", "public int getToken() {\n\t\t//previous token remembered?\n\t\tif (token != null)\n\t\t{\t\n\t\t\treturn tokenVal(); \n\t\t}\n\t\telse //need a new token.\n\t\t{\n\t\t\t//get position of next token\n\t\t\tint tokenStart = findTokenStart();\n\t\t\t//remove leading whitespace\n\t\t\tline = line.substring(tokenStart);\n\t\t\t//create char[] representation of line\n\t\t\tchar[] characters = line.toCharArray();\n\t\t\t//get type of token\n\t\t\ttType = getType(characters[0]);\n\t\t\tif (Objects.equals(tType, \"lowercase\"))\n\t\t\t{\n\t\t\t\ttoken = getLowerToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"uppercase\"))\n\t\t\t{\n\t\t\t\ttoken = getIdentifierToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"int\"))\n\t\t\t{\n\t\t\t\ttoken = getIntToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"special\"))\n\t\t\t{\n\t\t\t\ttoken = getSpecialToken(characters);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error this should not be seen\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t//token was found ok.\n\t\t\treturn tokenVal();\n\t\t}\n\t}", "public void clearTokenType() {\n genClient.clear(CacheKey.tokenType);\n }", "@Override\n public CommonTokenStream getTokens() {\n return null;\n }", "private Token consume() throws SyntaxException {\n\t\tToken tmp = t;\n\t\tt = scanner.nextToken();\n\t\treturn tmp;\n\t}", "public TokenType getType() {\n\t\treturn type;\n\t}", "public TokenType getType() {\n\t\treturn this.type;\n\t}", "public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }", "public Token nextTokenOf(Type type){\n Token token;\n \n while((token = nextToken()) != null){\n if(token.type == type){\n break;\n }\n }\n return token;\n }", "public void syntax_error(Symbol current_token){}", "@Override // ohos.global.icu.text.NFSubstitution\r\n public char tokenChar() {\r\n return '>';\r\n }", "Token peek();", "private Token matchEOF() throws SyntaxException {\n\t\tif (t.kind.equals(EOF)) {\n\t\t\treturn t;\n\t\t}\n\t\tthrow new SyntaxException(\"expected EOF\");\n\t}", "@Override\n public void onKill() {\n }", "void canceledPendingNodeStop();", "private @Nullable Token eat(TokenType expectedTokenType) {\n Token token = nextToken();\n if (token.type != expectedTokenType) {\n reportExpectedError(token, expectedTokenType);\n return null;\n }\n return token;\n }", "@Override\r\n\tpublic Token getToken(String token) {\n\t\treturn null;\r\n\t}", "java_cup.runtime.Symbol TOKEN(int code) { return TOKEN(code, yytext()); }", "public TokenType TokenType(){\r\n\t\tif (isSymbol) {\r\n\t\t\treturn TokenType.SYMBOL;\r\n\t\t} else if (tokenizer.ttype==StreamTokenizer.TT_WORD)\r\n\t\t{\r\n\t\t\tif (keywords.containsKey(currentToken))\r\n\t\t\t{\r\n\t\t\t\treturn TokenType.KEYWORD;\r\n\t\t\t}else{\r\n\t\t\t\treturn TokenType.IDENTIFIER;\r\n\t\t\t}\r\n\t\t}else if(tokenizer.ttype==StreamTokenizer.TT_NUMBER)\r\n\t\t\treturn TokenType.INT_CONST;\r\n\t\telse\r\n\t\t\treturn TokenType.STRING_CONST;\r\n\r\n\t}", "public void arm_kill() {\n arm_analog(0);\n }", "TokenTypes.TokenName getName();", "public interface LuaTokenTypes extends LuaDocElementTypes {\n //IFileElementType FILE = new IFileElementType(Language.findInstance(LuaLanguage.class));\n /**\n * Wrong token. Use for debugger needs\n */\n IElementType WRONG = TokenType.BAD_CHARACTER;\n\n\n /* **************************************************************************************************\n * Whitespaces & NewLines\n * ****************************************************************************************************/\n\n IElementType NL_BEFORE_LONGSTRING = new LuaElementType(\"newline after longstring stert bracket\");\n IElementType WS = TokenType.WHITE_SPACE;\n IElementType NEWLINE = new LuaElementType(\"new line\");\n\n TokenSet WHITE_SPACES_SET = TokenSet.create(WS, NEWLINE, TokenType.WHITE_SPACE, LDOC_WHITESPACE, NL_BEFORE_LONGSTRING);\n\n /* **************************************************************************************************\n * Comments\n * ****************************************************************************************************/\n\n IElementType SHEBANG = new LuaElementType(\"shebang - should ignore\");\n\n IElementType LONGCOMMENT = new LuaElementType(\"long comment\");\n IElementType SHORTCOMMENT = new LuaElementType(\"short comment\");\n\n IElementType LONGCOMMENT_BEGIN = new LuaElementType(\"long comment start bracket\");\n IElementType LONGCOMMENT_END = new LuaElementType(\"long comment end bracket\");\n\n TokenSet COMMENT_SET = TokenSet.create(SHORTCOMMENT, LONGCOMMENT, SHEBANG, LUADOC_COMMENT, LONGCOMMENT_BEGIN,\n LONGCOMMENT_END);\n\n TokenSet COMMENT_AND_WHITESPACE_SET = TokenSet.orSet(COMMENT_SET, WHITE_SPACES_SET);\n /* **************************************************************************************************\n * Identifiers\n * ****************************************************************************************************/\n\n IElementType NAME = new LuaElementType(\"identifier\");\n\n /* **************************************************************************************************\n * Integers & floats\n * ****************************************************************************************************/\n\n IElementType NUMBER = new LuaElementType(\"number\");\n\n /* **************************************************************************************************\n * Strings & regular expressions\n * ****************************************************************************************************/\n\n IElementType STRING = new LuaElementType(\"string\");\n IElementType LONGSTRING = new LuaElementType(\"long string\");\n\n IElementType LONGSTRING_BEGIN = new LuaElementType(\"long string start bracket\");\n IElementType LONGSTRING_END = new LuaElementType(\"long string end bracket\");\n\n\n\n TokenSet STRING_LITERAL_SET = TokenSet.create(STRING, LONGSTRING, LONGSTRING_BEGIN, LONGSTRING_END);\n\n\n IElementType UNTERMINATED_STRING = new LuaElementType(\"unterminated string\");\n\n\n /* **************************************************************************************************\n * Common tokens: operators, braces etc.\n * ****************************************************************************************************/\n\n\n IElementType DIV = new LuaElementType(\"/\");\n IElementType MULT = new LuaElementType(\"*\");\n IElementType LPAREN = new LuaElementType(\"(\");\n IElementType RPAREN = new LuaElementType(\")\");\n IElementType LBRACK = new LuaElementType(\"[\");\n IElementType RBRACK = new LuaElementType(\"]\");\n IElementType LCURLY = new LuaElementType(\"{\");\n IElementType RCURLY = new LuaElementType(\"}\");\n IElementType COLON = new LuaElementType(\":\");\n IElementType COMMA = new LuaElementType(\",\");\n IElementType DOT = new LuaElementType(\".\");\n IElementType ASSIGN = new LuaElementType(\"=\");\n IElementType SEMI = new LuaElementType(\";\");\n IElementType EQ = new LuaElementType(\"==\");\n IElementType NE = new LuaElementType(\"~=\");\n IElementType PLUS = new LuaElementType(\"+\");\n IElementType MINUS = new LuaElementType(\"-\");\n IElementType GE = new LuaElementType(\">=\");\n IElementType GT = new LuaElementType(\">\");\n IElementType EXP = new LuaElementType(\"^\");\n IElementType LE = new LuaElementType(\"<=\");\n IElementType LT = new LuaElementType(\"<\");\n IElementType ELLIPSIS = new LuaElementType(\"...\");\n IElementType CONCAT = new LuaElementType(\"..\");\n IElementType GETN = new LuaElementType(\"#\");\n IElementType MOD = new LuaElementType(\"%\");\n\n /* **************************************************************************************************\n * Keywords\n * ****************************************************************************************************/\n\n\n IElementType IF = new LuaElementType(\"if\");\n IElementType ELSE = new LuaElementType(\"else\");\n IElementType ELSEIF = new LuaElementType(\"elseif\");\n IElementType WHILE = new LuaElementType(\"while\");\n IElementType WITH = new LuaElementType(\"with\");\n\n IElementType THEN = new LuaElementType(\"then\");\n IElementType FOR = new LuaElementType(\"for\");\n IElementType IN = new LuaElementType(\"in\");\n IElementType RETURN = new LuaElementType(\"return\");\n IElementType BREAK = new LuaElementType(\"break\");\n\n IElementType CONTINUE = new LuaElementType(\"continue\");\n IElementType TRUE = new LuaElementType(\"true\");\n IElementType FALSE = new LuaElementType(\"false\");\n IElementType NIL = new LuaElementType(\"nil\");\n IElementType FUNCTION = new LuaElementType(\"function\");\n\n IElementType DO = new LuaElementType(\"do\");\n IElementType NOT = new LuaElementType(\"not\");\n IElementType AND = new LuaElementType(\"and\");\n IElementType OR = new LuaElementType(\"or\");\n IElementType LOCAL = new LuaElementType(\"local\");\n\n IElementType REPEAT = new LuaElementType(\"repeat\");\n IElementType UNTIL = new LuaElementType(\"until\");\n IElementType END = new LuaElementType(\"end\");\n\n /*\n IElementType MODULE = new LuaElementType(\"module\");\n IElementType REQUIRE = new LuaElementType(\"require\");\n */\n\n\n\n TokenSet KEYWORDS = TokenSet.create(DO, FUNCTION, NOT, AND, OR,\n WITH, IF, THEN, ELSEIF, THEN, ELSE,\n WHILE, FOR, IN, RETURN, BREAK,\n CONTINUE, LOCAL,\n REPEAT, UNTIL, END/*, MODULE, REQUIRE */);\n\n TokenSet BRACES = TokenSet.create(LCURLY, RCURLY);\n TokenSet PARENS = TokenSet.create(LPAREN, RPAREN);\n TokenSet BRACKS = TokenSet.create(LBRACK, RBRACK);\n\n TokenSet BAD_INPUT = TokenSet.create(WRONG, UNTERMINATED_STRING);\n \n TokenSet DEFINED_CONSTANTS = TokenSet.create(NIL, TRUE, FALSE);\n\n TokenSet UNARY_OP_SET = TokenSet.create(MINUS, GETN);\n\n TokenSet BINARY_OP_SET = TokenSet.create(\n MINUS, PLUS, DIV, MULT, EXP, MOD,\n CONCAT);\n\n TokenSet BLOCK_OPEN_SET = TokenSet.create(THEN, RPAREN, DO, ELSE, ELSEIF);\n TokenSet BLOCK_CLOSE_SET = TokenSet.create(END, ELSE, ELSEIF, UNTIL);\n\n TokenSet COMPARE_OPS = TokenSet.create(EQ, GE, GT, LT, LE, NE);\n TokenSet LOGICAL_OPS = TokenSet.create(AND, OR, NOT);\n TokenSet ARITHMETIC_OPS = TokenSet.create(MINUS, PLUS, DIV, EXP, MOD);\n\n TokenSet TABLE_ACCESS = TokenSet.create(DOT, COLON, LBRACK);\n\n TokenSet LITERALS_SET = TokenSet.create(NUMBER, NIL, TRUE, FALSE, STRING, LONGSTRING, LONGSTRING_BEGIN, LONGSTRING_END);\n\n TokenSet IDENTIFIERS_SET = TokenSet.create(NAME);\n\n TokenSet WHITE_SPACES_OR_COMMENTS = TokenSet.orSet(WHITE_SPACES_SET, COMMENT_SET);\n\n TokenSet OPERATORS_SET = TokenSet.orSet(BINARY_OP_SET, UNARY_OP_SET, COMPARE_OPS, TokenSet.create(ASSIGN));\n}", "public TipeToken getTkn() /*const*/{\n\t\treturn Tkn;\n\t}", "public String getTokenValue() { return tok; }", "public void kill() { _isAlive = false; }", "public void killIt() {\n isRunning = false;\n killed = true;\n hardKill = true;\n\n dumpState();\n if (UIMAFramework.getLogger().isLoggable(Level.INFO)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_killing_cpm__INFO\",\n new Object[] { Thread.currentThread().getName() });\n }\n if (workQueue != null) {\n while (workQueue.getCurrentSize() > 0) {\n workQueue.dequeue();\n }\n }\n if (outputQueue != null) {\n while (outputQueue.getCurrentSize() > 0) {\n outputQueue.dequeue();\n }\n }\n if (casPool != null) {\n synchronized (casPool) {\n casPool.notifyAll();\n }\n }\n if (workQueue != null) {\n Object[] eofToken = new Object[1];\n // only need one member in the array\n eofToken[0] = new EOFToken();\n workQueue.enqueue(eofToken);\n UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_terminate_pipelines__INFO\",\n new Object[] { Thread.currentThread().getName(), String.valueOf(killed) });\n // synchronized (workQueue) { // redundant - enqueue call above does this\n // workQueue.notifyAll();\n // }\n }\n\n }", "public Token() {\n this.clitic = \"none\";\n }", "@Override\r\n public NonTerminalSymbol getNonTerminalSymbol() {\n return null;\r\n }", "protected String getINT_TYPEToken(EObject semanticObject, RuleCall ruleCall, INode node) {\n\t\tif (node != null)\n\t\t\treturn getTokenText(node);\n\t\treturn \"i\";\n\t}", "Token readToken() throws SyntaxException;", "void nodeStopped();", "public uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType getType() {\n @SuppressWarnings(\"deprecation\")\n uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType result = uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType.valueOf(type_);\n return result == null ? uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType.TOKEN : result;\n }", "static void match(TokenType ttype) throws IOException {\n if(ttype == curr_type) {\n getToken();\n }\n else {\n cout.println(\"Match Error: \" + ttype);\n System.exit(1);\n }\n }", "void unexpectedTokenReplaced(Term unexpectedToken, Term replacementToken);", "public String getKilledVerb()\n\t{\n\t\treturn \"felled\";\n\t}", "public void recTerminate(ATerm t0);", "void isToken(String p) {\r\n\t\tint n = 0;\r\n\t\t// switch statement that finds lexemes and tokens and add them to an arrayList\r\n\t\tString x = p;\r\n\t\tswitch (x) {\r\n\r\n\t\tcase \"int\":\r\n\t\t\tlexemes.add(\"int\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"double\":\r\n\t\t\tlexemes.add(\"double\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"<\":\r\n\t\t\tlexemes.add(\"<\");\r\n\t\t\ttokens.add(\"LESS_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"{\":\r\n\t\t\tlexemes.add(\"{\");\r\n\t\t\ttokens.add(\"OPEN_CURLB\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"String\":\r\n\t\t\tlexemes.add(\"String\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"char\":\r\n\t\t\tlexemes.add(\"char\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"=\":\r\n\t\t\tlexemes.add(\"=\");\r\n\t\t\ttokens.add(\"ASSIGN_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"float\":\r\n\t\t\tlexemes.add(\"float\");\r\n\t\t\ttokens.add(\"DATA_TYPE\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"-\":\r\n\t\t\tlexemes.add(\"-\");\r\n\t\t\ttokens.add(\"SUB_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"+\":\r\n\t\t\tlexemes.add(\"+\");\r\n\t\t\ttokens.add(\"ADD_OPP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"*\":\r\n\t\t\tlexemes.add(\"*\");\r\n\t\t\ttokens.add(\"MUL_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"/\":\r\n\t\t\tlexemes.add(\"/\");\r\n\t\t\ttokens.add(\"DIV_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"%\":\r\n\t\t\tlexemes.add(\"%\");\r\n\t\t\ttokens.add(\"MOD_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \">\":\r\n\t\t\tlexemes.add(\">\");\r\n\t\t\ttokens.add(\"GREAT_OP\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"}\":\r\n\t\t\tlexemes.add(\"}\");\r\n\t\t\ttokens.add(\"CLOSE_CULRB\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"[\":\r\n\t\t\tlexemes.add(\"[\");\r\n\t\t\ttokens.add(\"OPEN_BRACK\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \":\":\r\n\t\t\tlexemes.add(\":\");\r\n\t\t\ttokens.add(\"COLON\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"]\":\r\n\t\t\tlexemes.add(\"]\");\r\n\t\t\ttokens.add(\"CLOSED_BRACK\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"(\":\r\n\t\t\tlexemes.add(\"(\");\r\n\t\t\ttokens.add(\"OPEN_PAR\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \",\":\r\n\t\t\tlexemes.add(\",\");\r\n\t\t\ttokens.add(\"COMMA\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \")\":\r\n\t\t\tlexemes.add(\")\");\r\n\t\t\ttokens.add(\"CLOSED_PAR\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \";\":\r\n\t\t\tlexemes.add(\";\");\r\n\t\t\ttokens.add(\"SEMICOLON\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tlexemes.add(x);\r\n\t\t\ttokens.add(\"IDENT\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void Kill();", "public HuffmanToken getToken () {\n \tif(isLeafNode())\n \t\treturn tokens.get(0);\n \treturn null;\n }", "public uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType getType() {\n @SuppressWarnings(\"deprecation\")\n uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType result = uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType.valueOf(type_);\n return result == null ? uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.NodeType.TOKEN : result;\n }", "protected abstract void doKill();", "public String getTokenType() {\n return scheme;\n }", "public Token nextToken() {\n\t\t\t// if something in queue, just remove and return it\n\t\t\tif ( tokens.size()>0 ) {\n\t\t\t\tToken t = (Token)tokens.firstElement();\n\t\t\t\ttokens.removeElementAt(0);\n\t\t\t\t// System.out.println(t);\n\t\t\t\treturn t;\n\t\t\t}\n\n\t\t\tinsertImaginaryIndentDedentTokens();\n\n\t\t\treturn nextToken();\n\t\t}", "@Override\n\tpublic Token getToken() {\n\t\treturn this.token;\n\t\t\n\t}", "public Token getToken(){\n if(currentToken == -1) return null;\n return tokens.get(currentToken);\n }", "private void match(TokenType tokType) {\r\n if(tokens.get(position).returnType() != tokType) {\r\n \t\tSystem.out.println(position);\r\n parseError();\r\n }\r\n position++;\r\n }", "Node exit();", "private Token () { }", "public void delLiteral();", "@Override\n public void visitTerminal(TerminalNode node) {\n\n }", "public void kill (String uuid, String version, MetaType execType) {\n\t\tBaseRuleExec baseRuleExec = null;\n\t\ttry {\n\t\t\tbaseRuleExec = (BaseRuleExec) commonServiceImpl.getOneByUuidAndVersion(uuid, version, execType.toString(), \"N\");\n\t\t} catch (JsonProcessingException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\t\tif (baseRuleExec == null) {\n\t\t\tlogger.info(\"RuleExec not found. Exiting...\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tlogger.info(\"Before kill - Rule - \" + baseRuleExec.getUuid());\n\t\t\tsynchronized (baseRuleExec.getUuid()) {\n\t\t\t\tbaseRuleExec = (BaseRuleExec) commonServiceImpl.setMetaStatus(baseRuleExec, execType, Status.Stage.TERMINATING);\n\t\t\t\tif (!Helper.getLatestStatus(baseRuleExec.getStatusList()).equals(new Status(Status.Stage.TERMINATING, new Date()))) {\n\t\t\t\t\tlogger.info(\"Latest Status is not in TERMINATING. Exiting...\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tFutureTask<TaskHolder> futureTask = (FutureTask<TaskHolder>) taskThreadMap.get(execType+\"_\"+baseRuleExec.getUuid()+\"_\"+baseRuleExec.getVersion());\n\t\t\tif (futureTask != null) {\n\t\t\t\tfutureTask.cancel(true);\n\t\t\t}\n\t\t\tsynchronized (baseRuleExec.getUuid()) {\n\t\t\t\tcommonServiceImpl.setMetaStatus(baseRuleExec, execType, Status.Stage.KILLED);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.info(\"FAILED to kill. uuid : \" + uuid + \" version : \" + version);\n\t\t\ttry {\n\t\t\t\tsynchronized (baseRuleExec.getUuid()) {\n\t\t\t\t\tcommonServiceImpl.setMetaStatus(baseRuleExec, execType, Status.Stage.KILLED);\n\t\t\t\t}\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\ttaskThreadMap.remove(execType+\"_\"+baseRuleExec.getUuid()+\"_\"+baseRuleExec.getVersion());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Token current();", "Token peekToken() throws SyntaxException;", "public void killed(){\n System.out.println(\"The zombie takes one step closer toward you then falls over.\");\n }", "public abstract boolean killCell(Cell c);", "@Override\n public Token recoverInline(Parser recognizer) {\n super.recoverInline(recognizer);\n recognizer.exitRule();\n System.exit(SYNTAX_ERROR_CODE);\n return null;\n }", "private int tokenVal()\n\t{\n\t\t//check that token is keyword or special\n\t\tif( core.containsKey(token))\t\t\t\n\t\t{ \n\t\t\t//return the value\n\t\t\treturn core.get(token); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t try{ //see if token is integer\n\t\t\t\t Integer.parseInt(token);\n\t\t\t return INTEGER;\n\t\t\t }\n\t\t\t catch(NumberFormatException e){\n\t\t\t \t //token must be an identifier\n\t\t\t \t return IDENTIFIER;\t \n\t\t\t }\n\t\t}\t\n\t}", "@Override\r\n\t\tpublic short getNodeType()\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}", "public char symbol(){\n\n if (currentTokenType == TYPE.SYMBOL){\n\n return currentToken.charAt(0);\n\n }else{\n throw new IllegalStateException(\"Current token is not a symbol!\");\n }\n }", "void kill(long procid);", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "@Override\n\tpublic Void visit(Type type) {\n\t\tif (type.token != null)\n\t\t\tprintIndent(type.token.getText());\n\t\treturn null;\n\t}", "@Override\r\n\tpublic JavaToken nextToken() {\r\n\t\tif (!ready())\r\n\t\t\treturn null;\r\n\t\tint oldPos = this.pos;\r\n\t\tint type = PLAIN;\r\n\t\tif (LL(0) == ' ' || LL(0) == '\\t' || LL(0) == '\\n' || LL(0) == '\\r') {\r\n\t\t\tconsumeWhiteSpace();\r\n\t\t\ttype = WHITESPACE;\r\n\t\t} else if (Character.isJavaIdentifierStart(LL(0))) {\r\n\t\t\tconsumeIdentifier();\r\n\t\t} else if (LL(0) == '#') {\r\n\t\t\tconsumeSingleLineComment();\r\n\t\t\ttype = COMMENT;\r\n\t\t} else if (LL(0) == '\\\"') {\r\n\t\t\tif (LL(1) == '\\\"' && LL(2) == '\\\"') {\r\n\t\t\t\tconsumeMultiLineComment();\r\n\t\t\t\ttype = COMMENT;\r\n\t\t\t} else {\r\n\t\t\t\tconsumeStringLiteral();\r\n\t\t\t\ttype = LITERAL;\r\n\t\t\t}\r\n\t\t} else if (LL(0) == '\\'') {\r\n\t\t\tconsumeCharacterLiteral();\r\n\t\t\ttype = LITERAL;\r\n\t\t} else {\r\n\t\t\tconsumeCharacter();\r\n\t\t}\r\n\t\tString t = text.substring(oldPos, pos);\r\n\t\tif (type == PLAIN) {\r\n\t\t\tif (keywords.get(t) != null)\r\n\t\t\t\ttype = KEYWORD;\r\n\t\t}\r\n\t\treturn new JavaToken(t, off + oldPos, type);\r\n\t}", "public String popCurrentToken() throws IOException, DataFormatException {\n String token = this.currentToken;\n advance();\n return token;\n }", "public static Operator killOperator(Actor self, Actor victim) {\n\n\t\t// Set conditions that must be true\n\t\tArrayList<ICondition> beTrue = new ArrayList<ICondition>();\n\t\tbeTrue.add(new LivesCondition(self));\n\t\tbeTrue.add(new LivesCondition(victim));\n\t\tbeTrue.add(new SamePlaceCondition(self, victim));\n\n\t\t// Set conditions that must be false\n\t\tArrayList<ICondition> beFalse = new ArrayList<ICondition>();\n\n\t\t// Set conditions that will be set true\n\t\tArrayList<ICondition> setTrue = new ArrayList<ICondition>();\n\t\tfor (Prop prop : victim.getProps()) {\n\t\t\tsetTrue.add(new IsAtLocationCondition(prop, victim.getLocation()));\n\t\t}\n\n\t\t// Set conditions that will be set false\n\t\tArrayList<ICondition> setFalse = new ArrayList<ICondition>();\n\t\tsetFalse.add(new LivesCondition(victim));\n\t\t\n\t\t// Add the corresponding action to the operator\n\t\tAction action = new Action(Action.ActionType.KILL, self, victim);\n\t\t\n\t\t// The weight for killing actions\n\t\tint weight = 1;\n\n\t\treturn new Operator(beTrue, beFalse, setTrue, setFalse, action, weight);\n\t}", "public void removeVote(String token);", "String getShortToken();", "String getShortToken();" ]
[ "0.65880466", "0.6120097", "0.5898941", "0.5802045", "0.57455933", "0.56594574", "0.56594574", "0.5423274", "0.5411077", "0.5379752", "0.5376395", "0.53742063", "0.5356294", "0.5346163", "0.5333865", "0.5323339", "0.53167284", "0.5309838", "0.53080654", "0.5305823", "0.52860385", "0.52839476", "0.5259977", "0.52572936", "0.5248715", "0.51995456", "0.5162147", "0.5152757", "0.51404995", "0.511966", "0.5117215", "0.51075333", "0.5090924", "0.50778574", "0.5074816", "0.507124", "0.5069791", "0.50645775", "0.5061296", "0.5058886", "0.505509", "0.50537056", "0.50462365", "0.50287753", "0.50049263", "0.50045437", "0.50012773", "0.50010353", "0.4990349", "0.4978887", "0.4971795", "0.49662367", "0.49583668", "0.49528635", "0.4946854", "0.49147204", "0.49093375", "0.49090844", "0.49073955", "0.4906059", "0.48975763", "0.48820016", "0.48786038", "0.48705313", "0.48669568", "0.48660713", "0.48555487", "0.485057", "0.48477378", "0.48454356", "0.48441938", "0.48398855", "0.48281348", "0.48235983", "0.48235604", "0.48227215", "0.48164216", "0.4815219", "0.48100218", "0.480451", "0.4801371", "0.47992995", "0.47932464", "0.47926226", "0.4791677", "0.4789502", "0.47879848", "0.47781354", "0.47736564", "0.47694033", "0.47651067", "0.4764824", "0.47573522", "0.4753185", "0.47450665", "0.47396046", "0.47322476", "0.47294882", "0.47234547", "0.47234547" ]
0.6531564
1
This returns true if the node has already been visited and false if it has not.
public boolean getVisitedNodes(String currentNodeID) { if(visitedNodes.contains(currentNodeID)) { visitedNodes.remove(visitedNodes.indexOf(currentNodeID)); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasBeenVisited() {\n\t\treturn visited; // Replace with your code\n\t}", "public boolean isVisited()\n\t{\n\t\treturn visited;\n\t}", "public boolean isVisited() {\n return visited;\n }", "public boolean isVisited() {\n return visited;\n }", "public boolean isVisited(){\n return visited;\n }", "public boolean isVisited() {\n\t\treturn visited;\n\t}", "public boolean isVisited() {\n\t\treturn _visited;\n\t}", "public boolean getNodeVisited(){\r\n\t \treturn this.nodeVisited;\r\n\t }", "public boolean isVisited() {\r\n\t\t\treturn this.visited;\r\n\t\t}", "public boolean isVisited () {\n if (this.equals(SquareType.VISITED))\n return true;\n else\n return false;\n }", "private boolean hasCycle() {\n\t\tNode n = head;\n\t\tSet<Node> nodeSeen = new HashSet<>();\n\t\twhile (nodeSeen != null) {\n\t\t\tif (nodeSeen.contains(n)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tnodeSeen.add(n);\n\t\t\t}\n\t\t\tn = n.next;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isVisited() {\n return isVisited;\n }", "public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }", "public boolean WasVisited() { return _visited; }", "public boolean checkLastNodeStatus()\r\n {\r\n return visitedNodes.isEmpty();\r\n }", "boolean isVisited();", "boolean isVisited();", "public final boolean visited(Node n)\n {\n return colors[n.nodeId()] != Color.white;\n }", "@Override\r\n\tpublic boolean isVisited() {\n\t\treturn false;\r\n\t}", "public boolean getVisited() {\n return visited;\n }", "public boolean getVisited()\n {\n return visited;\n }", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean visited(int i) {\r\n return visited[i] == visitedToken;\r\n }", "private boolean visited(int hashCode){\n \t\t//.add returns true if hashCode was added (meaning hashCode haven't been added before)\n \t\tif(visited.add(hashCode))\n \t\t\treturn false;\n \t\telse\n \t\t\treturn true;\n \t}", "boolean hasNode();", "boolean hasNode();", "@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "private boolean isCellVisited(Cell cell) {\n\t\tboolean result;\n\t\t// Return true to skip it if cell is null\n\t\tif (!isIn(cell))\n\t\t\treturn true;\n\n\t\tint r = cell.r;\n\t\tint c = cell.c;\n\t\tif (maze.type == HEX) {\n\t\t\tc = c - (r + 1) / 2;\n\t\t}\n\t\ttry {\n\t\t\tresult = visited[r][c];\n\t\t} catch (Exception e) {\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "protected boolean Exists()\n\t{\n\t\tif (identity<1) return false;\n\t\tNodeReference nodeReference = getNodeReference();\n\t\treturn (nodeReference.exists() || nodeReference.hasSubnodes());\n\t}", "public abstract boolean isNextVisited();", "public boolean isTree() {\n\t\tif (vertices.size() == 0 || vertices.size() == 1) return true;\n\t\tSet<String> visited = new HashSet<String>();\n\t\treturn !isCyclicUtil(vertices.iterator().next(), visited, null) && visited.size() == vertices.size();\n\t}", "boolean hasNextNode()\r\n\t{\n\t\tif (getLink() == null) return false;\r\n\t\telse return true;\r\n\t}", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "public boolean hasNode() {\n return nodeBuilder_ != null || node_ != null;\n }", "boolean repOk() {\n Set<Node> visited = new HashSet<Node>();\n Node n = header;\n while (n != null) {\n if (!visited.add(n)) {\n return false;\n }\n n = n.next;\n }\n return true;\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "public boolean getVisited(){return this.visited;}", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public boolean isVisitado() {\n return this.isVisited;\n }", "public boolean hasCycle() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\t\tSet<Vertex> path = new HashSet<Vertex>();\r\n\r\n\t\t// Call the helper function to detect cycle for all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (detectCycle(this.vertices[i], visited, path))\r\n\t\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "boolean seen(Graph.Vertex u) {\n\t\treturn getVertex(u).seen;\n\t}", "public boolean alreadyVisited(String key) {\n\t\tif (visitedPages.mightContain(key)) {\n\t\t\treturn pageToAssets.containsKey(key);\n\t\t}\n\t\treturn false;\n\t}", "public final boolean isAcyclic() {\n return this.topologicalSort().size() == this.sizeNodes();\n }", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "@Override\n public boolean hasNext() {\n // If there is a valid next, return true\n if (this.next != null){\n return true;\n } else {\n // If next is not calculated, compute the next valid\n Node<S> next = popNextUnvisitedNode();\n this.next = next;\n return next != null;\n }\n }", "boolean hasNodeId();", "public synchronized boolean ifShouldVisitMarkVisited(String URL) {\n\t\tString key = getKey(URL);\n\t\tif (alreadyVisited(key)) {\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t * Mark the current URL as 'visited' by storing it in the BloomFilter\n\t\t * so that no other thread continues further than this\n\t\t */\n\t\tmarkVisited(key);\n\t\treturn true;\n\t}", "private boolean edgeExists() {\n for (int i = 1; i < parentMatrix[randomChild][0]; i++) {\n if (parentMatrix[randomChild][i] == randomParent) {\n return true;\n }\n }\n return false;\n }", "public boolean isAdjacent(NodeTree location){\n return isAdjacent(this.head, location);\n }", "public boolean addNode(GraphNode node){\n if(!graphNodes.contains(node)){\n graphNodes.add(node);\n return true;\n }\n return false;\n }", "public boolean finished() {\r\n\t\tboolean allOccupied = true;\r\n\t\tfor (Node n : allNodes.values()) {\r\n\t\t\tif (n.path == 0) {\r\n\t\t\t\tallOccupied = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (allOccupied) {\r\n\r\n\t\t\tfor (Integer path : paths.keySet()) {\r\n\t\t\t\tStack<Node> sn=paths.get(path);\r\n\t\t\t\tNode n = sn.peek();\r\n\t\t\t\tif (!EndPoint.containsValue(n)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (sn.size() > 1) {\r\n\t\t\t\t\tStack<Node> snBK = (Stack<Node>) sn.clone();\r\n\t\t\t\t\t\r\n\t\t\t\t\tNode n1 = snBK.pop();\r\n\t\t\t\t\twhile (!snBK.isEmpty()) {\r\n\t\t\t\t\t\tif(n1.path!=path)\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\tNode n2= snBK.pop();\r\n\t\t\t\t\t\tif(adjaMatrix[n1.index][n2.index]==0)\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tn1=n2;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "boolean hasIsNodeOf();", "private boolean isReachable(String current, String destination) {\n if (current.equals(destination)) {\n return true;\n } else if (visited.contains(current) || graph.get(current) == null) {\n return false;\n }\n\n // similar to dfs\n visited.add(current);\n for (Object vertex : graph.get(current)) {\n if (isReachable((String) vertex, destination))\n return true;\n }\n\n return false;\n }", "public void visit() {\n visited = true;\n }", "@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void setVisited()\n {\n visited = true;\n }", "public boolean hasNext(){\r\n return node != null;\r\n }", "boolean hasHasNodeID();", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "@Override\n\tpublic boolean containsNode(Object node)\n\t{\n\t\t// This is presumably faster than searching through nodeList\n\t\treturn nodeEdgeMap.containsKey(node);\n\t}", "private Boolean checkCycle() {\n Node slow = this;\n Node fast = this;\n while (fast.nextNode != null && fast.nextNode.nextNode != null) {\n fast = fast.nextNode.nextNode;\n slow = slow.nextNode;\n if (fast == slow) {\n System.out.println(\"contains cycle\");\n return true;\n }\n }\n System.out.println(\"non-cycle\");\n return false;\n }", "private Boolean depthFirstSearch(HashMap<String, Boolean> visited, String node) {\n \tif (visited.get(node)) {\n \t\t// This can actually never happen\n \t\tif (Flags.semant_debug) {\n \t\t\tSystem.out.println(\"Node: \" + node + \" visited twice\");\n \t\t}\n \t\tsemantError(nameToClass.get(node)).println(\"Class \" + node + \", or its ancestors, is invloved in a cycle\");\n \t\treturn false;\n \t}\n \tvisited.put(node, true);\n \tif (adjacencyList.get(node) == null) {\n \t\treturn true;\n \t}\n \tfor (String child : adjacencyList.get(node)) {\n \t\tif (Flags.semant_debug) {\n \t\t\tSystem.out.println(\"Traversing \" + node + \" --> \" + child);\n \t\t}\n \t\tdepthFirstSearch(visited, child);\n \t}\n \treturn true;\n }", "protected final boolean computeHasNext() {\n return this.getEnds().getGraph().getSuccessorEdges(this.getNext()).isEmpty();\n }", "public boolean hasVisitor(String name) {\n\t\treturn isVisitedBy(name);\n\t}", "boolean hasCycle() {\n if (head == null){\n return false;\n }\n Node slow = head;\n Node fast = head;\n while (slow != null && fast != null && fast.next != null){\n slow = slow.next;\n fast = fast.next.next;\n if (slow == fast){\n return true;\n }\n }\n return false;\n }", "public boolean canReachDFS(Dot startNode, Dot finishNode ) {\n Set< Dot > visited = new HashSet<>();\n visited.add( startNode );\n\n visitDFS( startNode, visited );\n return visited.contains( finishNode );\n }", "private static boolean AllCellsVisited()\n {\n for (Cell arr[] : cells){\n for (Cell c : arr)\n {\n if (!c.Visited)\n {\n return false;\n }\n }\n }\n return true;\n }", "public static boolean hasCycle1(ListNode head) {\n Set<ListNode> visited = new HashSet<>();\n\n while (head != null) {\n if (visited.contains(head)) {\n return true;\n }\n visited.add(head);\n head = head.next;\n }\n\n return false;\n }", "private boolean DFSUtil(State state, ArrayList<String> visited, int currentDepth) {\n // Mark the current node as visited and print it\n visited.add(state.joinValues());\n\n this.path.push(state);\n\n if (this.problem.goalTest(state)) {\n return true;\n }\n\n // Recur for all the vertices adjacent to this vertex\n // extend the current node\n ListIterator<State> iterator = this.extend(state).listIterator();\n this.incrementExtendedNumber();\n while (iterator.hasNext()) {\n State state1 = iterator.next();\n if (this.limit > currentDepth) {\n if (this.graphSearch && !visited.contains(state1.joinValues())) {\n this.incrementVisitedNumber();\n if (DFSUtil(state1, visited, currentDepth + 1))\n return true;\n else\n this.path.pop();\n } else if (!this.graphSearch) {\n this.incrementVisitedNumber();\n if (DFSUtil(state1, visited, currentDepth + 1))\n return true;\n else\n this.path.pop();\n }\n }\n\n\n this.setMaxMemory(this.path.size());\n }\n return false;\n }", "public void visit() {\n\t\tvisited = true;\n\t}", "public boolean isSeen() {\n return seen;\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn nextNode != null;\n\t\t}", "public boolean hasNode(Node p_node) {\n\t\treturn nodes.contains(p_node);\n\t}", "private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }", "boolean dfs(int node, Map<Integer, List<Integer>> graph, boolean[] visited, Set<Integer> dfsPath) {\n if(dfsPath.contains(node))\n return false;\n\n // If this node is already visited via some other source node then avoid checking further again\n if(visited[node])\n return true;\n\n dfsPath.add(node);\n visited[node] = true;\n\n for(int adjVertex : graph.get(node)) {\n if(!dfs(adjVertex, graph, visited, dfsPath)) {\n return false;\n }\n }\n\n dfsPath.remove(node);\n return true;\n }", "private boolean wasVisited(int city){\n\t\treturn this.getGraph().wasVisited(city);\n\t}", "@Override\n public boolean containsNodeFor(E item) {\n if(item == null){\n throw new NullPointerException(\"Received null as value.\");\n }\n return graphNodes.containsKey(item);\n }", "public boolean contains(Node node) {\n if (edge.contains(node)) {\n return true;\n }\n Node pNode = edge.getEdgeVariable();\n if (pNode == null) {\n return false;\n }\n return pNode == node;\n }", "public boolean isConnected() {\n\t\tif (vertices.size() == 0)\n\t\t\treturn false;\n\n\t\tif (vertices.size() == 1)\n\t\t\treturn true;\n\n\t\t// determine if it is connected by using a wave\n\t\tHashSet<E> waveFront = new HashSet<>();\n\t\tHashSet<E> waveVisited = new HashSet<>();\n\n\t\t// grab the first element for the start of the wave\n\t\tE first = vertices.iterator().next();\n\t\t\n\n\t\twaveFront.add(first);\n\n\t\t// continue until there are no more elements in the wave front\n\t\twhile (waveFront.size() > 0) {\n\t\t\t// add all of the wave front elements to the visited elements\n\t\t\twaveVisited.addAll(waveFront);\n\t\t\t\n\t\t\t// if done break out of the while\n\t\t\tif (waveVisited.size() == vertices.size())\n\t\t\t\tbreak;\n\n\t\t\t// grab the iterator from the wave front\n\t\t\tIterator<E> front = waveFront.iterator();\n\n\t\t\t// reset the wave front to a new array list\n\t\t\twaveFront = new HashSet<>();\n\n\t\t\t// loop through all of the elements from the front\n\t\t\twhile (front.hasNext()) {\n\t\t\t\tE next = front.next();\n\n\t\t\t\t// grab all of the neighbors to next\n\t\t\t\tList<E> neighbors = neighbors(next);\n\n\t\t\t\t// add them to the wave front if they haven't been visited yet\n\t\t\t\tfor (E neighbor : neighbors) {\n\t\t\t\t\tif (!waveVisited.contains(neighbor))\n\t\t\t\t\t\twaveFront.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// return whether all of the nodes have been visited or not\n\t\treturn waveVisited.size() == vertices.size();\n\t}", "@Override\r\n\t\tpublic boolean hasNext() {\n\t\t\treturn nextNode != null;\r\n\t\t}", "@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\t\r\n\t\t\treturn currentNode.nextNode != null;\r\n\t\t}", "public void setVisited(boolean value){this.visited = value;}", "public boolean compute() {\n\t\tif(this.startNode.equals(goalNode)) {\r\n\t\t\tSystem.out.println(\"Goal Node Found :)\");\r\n\t\t\tSystem.out.println(startNode);\r\n\t\t}\r\n\t\r\n\t\tQueue<Node> queue = new LinkedList<>();\r\n\t\tArrayList<Node> explored = new ArrayList<>();\r\n\t\tqueue.add(this.startNode);\r\n\t\texplored.add(startNode);\r\n\t\t\r\n\t\t//while queue is not empty\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\t//remove and return the first node in the queue\r\n\t\t\tNode current = queue.remove();\r\n\t\t\tif(current.equals(this.goalNode)) {\r\n\t\t\t\tSystem.out.println(\"Explored: \" + explored + \"\\nQueue: \" + queue);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//dead end\r\n\t\t\t\tif(current.getChildren().isEmpty()){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t//add to queue the children of the current node\r\n\t\t\t\telse {\r\n\t\t\t\t\tqueue.addAll(current.getChildren());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\texplored.add(current);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasCycle(Node<T> first) {\n Iterator itOne = this.iterator();\n Iterator itTwo = this.iterator();\n try {\n while (true) {\n T one = (T) itOne.next();\n itTwo.next();\n T two = (T) itTwo.next();\n if (one.equals(two)) {\n return true;\n }\n }\n } catch (NullPointerException ex) {\n ex.printStackTrace();\n }\n return false;\n }", "public abstract boolean isUsing(Long graphNode);", "public boolean isConnectedTo(Node<A> n) {\n\t\t\n\t\tif (g == null) return false;\n\t\t\n\t\tif (g.contains(n)){\n\t\t\t\n\t\t\tfor (Object o: g.getEdges()) {\n\t\t\t\t\n\t\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "protected boolean hasNode(int ID) {\n\t\treturn nodes.containsKey(ID);\n\t}", "public boolean hasNextHop()\n {\n return getHopCount() < route.size()-1;\n }", "private boolean isBipartiteHelper(GraphNode node,\n HashMap<GraphNode, Integer> visited){\n // base case if this node have been BFS, no need to do it again\n if(visited.containsKey(node)) return true;\n // queue for BFS\n LinkedList<GraphNode> queue = new LinkedList<>();\n queue.offer(node);\n // once it put into queue, it should be marked as visited.\n // record it with it's group\n visited.put(node, 0);\n // BFS loop\n while (!queue.isEmpty()){\n // Get the first node.\n GraphNode currVertex = queue.poll();\n // determine the group for this node\n int curGroup = visited.get(currVertex);\n // the neighbor of current node should be all in different group\n int neiGroup = curGroup == 0? 1 : 0;\n // loop through the neighbors of the current node. they all\n // should be in different group.\n for(GraphNode vertex : currVertex.neighbors){\n // if never seen this neighbor, put it into queue, and record\n // with group number as opposed of current node\n if(!visited.containsKey(vertex)){\n visited.put(vertex,neiGroup);\n queue.offer(vertex);\n }\n // if this neighbor have visited, check it's group. It should\n // be in different group. otherwise it is false.\n else if(visited.get(vertex) != neiGroup) {\n return false;\n } } }\n return true;\n }", "boolean hasIsVertexOf();", "protected final boolean computeHasNext() {\n return this.getEnds().getGraph().getPredecessorEdges(this.getNext()).isEmpty();\n }", "public boolean hasNext() {\n\t\treturn next_node == null;\n\t}", "public boolean hasNext() {\n return !left_nodes.isEmpty(); // DON'T FORGET TO MODIFY THE RETURN IF NEED BE\r\n\t\t}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "public boolean exists(ListNode node){\n\t\tif(firstNode == null) return false;\n\t\tListNode temp = firstNode;\n\t\twhile(temp != null){\n\t\t\tif(temp.equals(node)) return true;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\t\treturn false;\n\t}", "private static boolean isItVisted(Node node) {\n\t\t\n\t\tboolean areNodesEqual = false;\n\t\tfor (Node temp : nodesCovered) {\n\t\t\tif(choice==1){\n\t\t\t\tif (node.count == temp.count) \t\t\t\t{\n\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t }\n\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (node.manhattanDist == temp.manhattanDist) {\n\t\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn areNodesEqual;\n\t}", "boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }" ]
[ "0.775649", "0.7644149", "0.76187843", "0.7601885", "0.75906736", "0.7557473", "0.7320062", "0.727989", "0.7243263", "0.7231002", "0.7194186", "0.71518326", "0.71098214", "0.703635", "0.70281833", "0.7013036", "0.7013036", "0.6971668", "0.69631356", "0.69238305", "0.69222754", "0.6645597", "0.66439694", "0.663501", "0.6572437", "0.6572437", "0.6513323", "0.6464223", "0.64430666", "0.642302", "0.64115524", "0.6402966", "0.63873416", "0.63873416", "0.63838696", "0.6367573", "0.6367573", "0.6366587", "0.6352519", "0.6334281", "0.6331895", "0.6278805", "0.6269289", "0.6224155", "0.62175566", "0.621267", "0.6201106", "0.6198867", "0.61934626", "0.61869437", "0.6136609", "0.6131345", "0.6126653", "0.6109289", "0.6105323", "0.60974526", "0.60945916", "0.60937434", "0.60900503", "0.6081394", "0.6070972", "0.60635734", "0.6060109", "0.6041273", "0.60229665", "0.60180116", "0.6011701", "0.60044867", "0.60020876", "0.60012674", "0.59980744", "0.59939843", "0.5990582", "0.5986495", "0.5983624", "0.5977118", "0.5969121", "0.59672815", "0.5963377", "0.59623533", "0.59622985", "0.59583056", "0.5956988", "0.59525615", "0.5922364", "0.5909767", "0.5907128", "0.5903384", "0.58958477", "0.58907694", "0.58885807", "0.58874923", "0.5878057", "0.587746", "0.58741754", "0.58584434", "0.58505505", "0.58495796", "0.5843244", "0.58391994" ]
0.6724191
21
Adds the current node to the node network map
public void addCurrentNode(String currentNodeID) { visitedNodes.add(currentNodeID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addNode(Node n) {\n nodes.put(n.id, n);\n }", "public void addNode(DijkstraNode node) {\n\t\tthis.cache.put(node.getCoordinate(), node);\n\t}", "public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }", "@Override\n\tpublic void addNode(node_data n) {\n\t\tif (Nodes.keySet().contains(n.getKey())) {\n\t\t\tSystem.err.println(\"Err: key already exists, add fail\");\n\t\t\treturn;\n\t\t}\n\t\tif(n.getWeight()<=0)\n\t\t{\n\t\t\tSystem.err.println(\"The weight must be positive! . The node hadn't been added successfully..\");\n\t\t\treturn;\n\t\t}\n\t\tthis.Nodes.put(n.getKey(), n);//n used to be casted into (node)\n\t\tthis.Edges.put(n.getKey(), new HashMap<Integer,edge_data>());\n\t\tMC++;\n\n\t}", "void addNode(Entity entity) {\n\t\tProcessing.nodeSet.add(entity);\n\t\tSystem.out.println(\"the entity was successfully added to the network.\");\n\t}", "public void addNode(Character charId, Node node) {\n graph.put(charId, node);\n }", "public void addNode(int key)\n{\n Node n1 = new Node(key);\n\t\n\tif(!getNodes().containsKey(n1.getKey())) \n\t{\n\tmc++;\n\tthis.getNodes().put(n1.getKey(),n1);\n\t\t\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"Node already in the graph\");\n\t}\n}", "public void addNode(String node) {\n this.graph.put(node, new LinkedList<>());\n }", "protected void addNode(INode node) {\n\n if (node != null) {\n\n this.ids.add(node.getID());\n this.nodeMap.put(node.getID(), node);\n }\n }", "public void addNode(String hostname, String IP) throws IOException, XMLStreamException {\n Integer nodeID = returnHash(hostname);\n if (!IPmap.containsKey(nodeID)) {\n IPmap.put(nodeID, IP);\n //writeToXML();\n for (Map.Entry<Integer, String> entry : IPmap.entrySet()) {\n System.out.println(\"Key: \" + entry.getKey() + \". Value: \" + entry.getValue());\n }\n } else System.out.println(\"Node already in use.\");\n }", "public void Nodemap (String addedNode, String[] connectNode) {\n\t\tNodeswithconnect.put(addedNode, connectNode);\n\t}", "@Override\n public void addNode(node_data n) {\n this.modeCount += this.nodes.putIfAbsent(n.getKey(), n) == null ? 1 : 0; // if the node was already in the graph - it will simply do nothing, if it wasn't - it will add it to the graph and increment modeCount by 1\n }", "public boolean addNode(N node)\r\n/* 32: */ {\r\n/* 33: 68 */ assert (checkRep());\r\n/* 34: 69 */ if (!this.map.containsKey(node))\r\n/* 35: */ {\r\n/* 36: 70 */ this.map.put(node, new HashMap());\r\n/* 37: 71 */ return true;\r\n/* 38: */ }\r\n/* 39: 73 */ return false;\r\n/* 40: */ }", "public void addNode(NodeImpl node) {\n supervisedNodes.add(node);\n \n colorNodes();\n shortenNodeLabels();\n colorNodeLabels();\n colorNodeLabelBorders();\n }", "private void addNode(NeuralNode node) {\r\n\t\tinnerNodes.add(node);\r\n\t}", "void addNode()\n {\n Node newNode = new Node(this.numNodes);\n this.nodeList.add(newNode);\n this.numNodes = this.numNodes + 1;\n }", "public void addToNodeMap(Node node) {\n nodeMap.put(node.getNodeId(), node);\n }", "public void addNeighbor(Node node){\n neighbors.add(node);\n liveNeighbors.add(node);\n }", "public void addNode(String ip, int port) throws UnknownHostException {\t\r\n\t\tNodeRef ref = new NodeRef(ip, port); // create data node reference\r\n\t\tnodeMap.put(ref.getIp().getHostAddress(), ref);\r\n\t}", "String addNewNode(Double lat, Double lon);", "private void addNode(int nodeId, short startNodeOutgoingNodes) {\n if (!nodes.containsKey(nodeId)) {\n statistic.log(Type.LOADED_NODES);\n nodes.put(nodeId, new NodeBINE(nodeId, startNodeOutgoingNodes));\n maxNodeSize = Math.max(maxNodeSize,nodes.size());\n }\n }", "@Override\n\tpublic boolean addNode(N node)\n\t{\n\t\tif (node == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (nodeEdgeMap.containsKey(node))\n\t\t{\n\t\t\t// Node already in this Graph\n\t\t\treturn false;\n\t\t}\n\t\tnodeList.add(node);\n\t\tnodeEdgeMap.put(node, new HashSet<ET>());\n\t\tgcs.fireGraphNodeChangeEvent(node, NodeChangeEvent.NODE_ADDED);\n\t\treturn true;\n\t}", "private void add_node(Node node) {\n if (this.nodes.get(node.name) != null) {\n throw new RuntimeException(\"Node \" + node.name + \" already exists!\");\n }\n this.nodes.put(node.name, node);\n this.bars.put(node.name, new TreeMap<String, Bar>());\n }", "void addNi(int node, double weight) {\n this.neighbors.put(node, weight);\n }", "public void add(Node<T> n){\n\t\tconnect.add(n);\n\t}", "public void addNode(Node node){subNodes.add(node);}", "public void addNode (NodeState node) throws RepositoryException, IOException\n\t{\n\t}", "public void addNode(GraphNode<T> node) {\n\tmRoot.addNode(node);\n\tmNodesCount++;\n }", "public void add(DefaultGraphCell node) {\n nodes.add(node);\n groupObject.add(node);\n fragmentName.append(((NodeData)node.getUserObject()).getName() + \" \");\n \n }", "private Node addNode(String nodeName)\r\n\t{\r\n\t final Node n = new Node(nodeName, attributes, numNodes());\r\n\t if (nodeMap.put(nodeName, n) != null)\r\n\t\tthrow new RuntimeException(\"Node <\"+n+\"> already exists!\");\r\n\t return n;\r\n\t}", "protected void addingNode( SearchNode n ) { }", "public void addNeighbor(MyNode myNode){\r\n if (!neighbors.contains(myNode)) {\r\n neighbors.add(myNode);\r\n }\r\n }", "private void addNode(Node node)\n\t{\n\t\tif (node == null)\n\t\t\treturn;\n\t\tthis.nodes[node.getRowIndex()][node.getColumnIndex()] = node;\n\t}", "void addNeighbor(NodeKey key, GraphNode target, Map<String, String> attr);", "void addNode(CommunicationLink communicationLink)\n {\n int nodeId = communicationLink.getInfo().hashCode();\n assert !nodeIds.contains(nodeId);\n nodeIds.add(nodeId);\n allNodes.put(nodeId, communicationLink);\n }", "public void addNode(INode node) {\r\n\t\tnodeList.add(node);\r\n\t}", "@Override\n public void visit(Node node) {\n nodes.add(node);\n }", "public void addNode(Node node) {\n\t\tnodes.add(node);\n\t}", "public boolean addNode(DAGNode node) {\r\n\t\treturn true;\r\n\t}", "public boolean addNode(GraphNode node){\n if(!graphNodes.contains(node)){\n graphNodes.add(node);\n return true;\n }\n return false;\n }", "void addNode(String node);", "private void addNode() {\n // Add GUI node\n int nodeCount = mGraph.getNodeCount();\n Node node = mGraph.addNode(String.valueOf(nodeCount));\n node.addAttribute(\"ui.label\", nodeCount);\n\n // Add Node_GUI node for algorithm to read from\n Node_GUI listNode = new Node_GUI();\n mNodeList.add(listNode);\n }", "public boolean addNode(T node) {\n\t\tif (node == null) {\n\t\t\tthrow new NullPointerException(\"The input node cannot be null.\");\n\t\t}\n\t\tif (graph.containsKey(node))\n\t\t\treturn false;\n\n\t\tgraph.put(node, new HashMap<T, Path>());\n\t\treturn true;\n\t}", "boolean addNode(long idNum, String label);", "public void addNode(Node node) {\n\t\tthis.nodes.add(node);\n\t}", "public void insNode(T node) {\n\t\tif(nodes.add(node)==true)\n\t\t\tarcs.put(node, new HashSet<T>());\n\t}", "void addNode(int node);", "public boolean add(Node n) {\n\t\t\n\t\t//Validate n is not null\n\t\tif (n == null) { \n\t\t\tSystem.out.println(\"Enter a valid node\");\n\t\t\treturn false; \n\t\t} \n\t\t\n\t\t//If the node is present in the network return\n\t\tif (nodes.contains(n)) {\n\t\t\tSystem.out.println(\"Node name already exists\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Add the node to the network, with a new array for its neighbors\n\t\tnodes.add(n);\n\t\t\n\t\t//Successfully added\n\t\treturn true;\n\t}", "void addHasNodeID(Integer newHasNodeID);", "void add(Member node, long now);", "public void addEdge(String node1, String node2) {\n\r\n LinkedHashSet<String> adjacent = map.get(node1);\r\n// checking to see if adjacent node exist or otherwise is null \r\n if (adjacent == null) {\r\n adjacent = new LinkedHashSet<String>();\r\n map.put(node1, adjacent);\r\n }\r\n adjacent.add(node2); // if exist we add the instance node to adjacency list\r\n }", "public void addNode(final Instruction instruction) {\n instructions.add(instruction);\n if (prevInstruction != null) {\n addEdge(prevInstruction, instruction);\n }\n prevInstruction = instruction;\n }", "void addFlight(Node toNode);", "public int addNode(node_type node) {\n if (node.getIndex() < (int) nodeVector.size()) {\n //make sure the client is not trying to add a node with the same ID as\n //a currently active node\n assert nodeVector.get(node.getIndex()).getIndex() == invalid_node_index :\n \"<SparseGraph::AddNode>: Attempting to add a node with a duplicate ID\";\n\n nodeVector.set(node.getIndex(), node);\n\n return nextNodeIndex;\n } else {\n //make sure the new node has been indexed correctly\n assert node.getIndex() == nextNodeIndex : \"<SparseGraph::AddNode>:invalid index\";\n\n nodeVector.add(node);\n edgeListVector.add(new EdgeList());\n\n return nextNodeIndex++;\n }\n }", "public void addNode(Node p_node) {\n\t\tnodes.add(p_node);\n\t}", "public boolean addNode(Integer id, String nodeName)\r\n {\r\n System.out.printf (\"UGraph: Node %d added named %s\\n\", id, nodeName);\r\n if (uNodes.put( id, new UNode( id, nodeName)) == null) { \r\n return true;\r\n }\r\n \r\n return false;\r\n }", "void addAdjcentNode(int adjcentNodeIdx){\r\n\t\t\tadjacentNodeIndices.add(adjcentNodeIdx);\r\n\t\t}", "public Node addNode(Coordinate coordIn){//adds a node to the list\n\t\t//linear search to make sure the node already isnt there\n\t\tint i;\n\t\tfloat inx = coordIn.getX();\n\t\tfloat iny = coordIn.getY();\n\t\tfloat inz = coordIn.getZ();\n\t\tNode n = null;\n\t\tfor(i = 0; i < listOfNodes.size(); i++){\n\t\t\tn = listOfNodes.get(i);\n\t\t\tif(n==null) continue;\n\t\t\tfloat ox = n.getCoordinate().getX();\n\t\t\tfloat oy = n.getCoordinate().getY();\n\t\t\tfloat oz = n.getCoordinate().getZ();\n\t\t\tif(inx <= ox + 0.01f && inx >= ox - 0.01f && iny <= oy + 0.01f && iny >= oy - 0.01f && inz <= oz + 0.01f && inz >= oz - 0.01f)break;\n\t\t}\n\t\tif(i < listOfNodes.size()){ // found duplicate\n\t\t\treturn n;\n\t\t}\n\n\t\tnode_count++;\n\t\tfor(; node_arrayfirstopen < node_arraysize && listOfNodes.get(node_arrayfirstopen) != null; node_arrayfirstopen++);\n\t\tif(node_arrayfirstopen >= node_arraysize){\t//resize\n\t\t\tnode_arraysize = node_arrayfirstopen+1;\n\t\t\tlistOfNodes.ensureCapacity(node_arraysize);\n\t\t\tlistOfNodes.setSize(node_arraysize);\n\t\t}\n\t\tId nid = new Id(node_arrayfirstopen, node_count);\n\t\tn = new Node(coordIn, nid);\n\t\tlistOfNodes.set(node_arrayfirstopen, n);\n\t\tupdateAABBGrow(n.getCoordinate());\n\t\t\n\t\tif(node_arraylasttaken < node_arrayfirstopen) node_arraylasttaken = node_arrayfirstopen; //todo redo\n\t\treturn n;\n\t}", "@Override\n public boolean addNode(Node x) {\n if (findIndexOfNode(x) > -1) {\n return false;\n }\n\n Node[] copyNodes = new Node[nodes.length + 1];\n int[][] copyAdjacencyMatrix =\n new int[adjacencyMatrix.length + 1][adjacencyMatrix.length + 1];\n\n // to copy existing nodes to new copy of nodes\n System.arraycopy(nodes, 0, copyNodes, 0, nodes.length);\n nodes = copyNodes;\n nodes[nodes.length - 1] = x;\n\n // to copy existing values to new adjacency matrix\n System.arraycopy(adjacencyMatrix, 0, copyAdjacencyMatrix, 0, adjacencyMatrix.length);\n // do not need to change anything because int by default is zero\n\n return true;\n }", "@Override\n public void put(PairNode<K, V> node) {\n super.put(node);\n keySet.add(node.getKey());\n }", "@Override\n public boolean addNode(@Nonnull LinkNode node, @Nullable StandardPathComponent path) {\n if (path == null || path.isEmpty()) return false;\n if (this.linkNodes.containsKey(path) || this.linkNodes.containsValue(node)) return false;\n this.linkNodes.put(path, node);\n this.linkNodesCopy = ImmutableMap.copyOf(this.linkNodes);\n return true;\n }", "public void addNodeToTheObjects(Node theNode) {\r\n getTheObjects().add(theNode);\r\n }", "public boolean addNode(String hostname, String ipAddress)\n\t{\n\t\treturn nodeManager.addNode(hostname, ipAddress);\n\t}", "void addNode(int weight) \n {\n Node newNode = new Node(this.numNodes, weight);\n this.nodeList.add(newNode);\n this.numNodes = this.numNodes + 1;\n \n }", "public Node addNode(String nodeName, Attributes a) \r\n {\r\n\tnodes = null;\r\n\treturn ntMap.get(a.getName()).addNode(nodeName);\r\n }", "public void addNode(ConfigurationNode node)\n {\n if (node == null || node.getName() == null)\n {\n throw new IllegalArgumentException(\n \"Node to add must have a defined name!\");\n }\n node.setParentNode(null); // reset, will later be set\n\n if (nodes == null)\n {\n nodes = new ArrayList<ConfigurationNode>();\n namedNodes = new HashMap<String, List<ConfigurationNode>>();\n }\n\n nodes.add(node);\n List<ConfigurationNode> lst = namedNodes.get(node.getName());\n if (lst == null)\n {\n lst = new LinkedList<ConfigurationNode>();\n namedNodes.put(node.getName(), lst);\n }\n lst.add(node);\n }", "void setNode(int nodeId, double lat, double lon);", "@Override\n\tpublic void putNode(N node) {\n\t\t\n\t}", "public void addToPainter(OSMNode node) {\r\n\t\tGeoPosition geoP = new GeoPosition(Double.parseDouble(node.getLat()), Double.parseDouble((node.getLon())));\r\n\t\tgeopoints.add(geoP);\r\n\t\t \r\n\t\t//waypoints.add(new DefaultWaypoint(geoP));\r\n\t}", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "void setNode(int nodeId, double lat, double lon, double ele);", "public void addCluster()\r\n\t{\r\n\t\tcluster[nextAvailableCluster()] = true;\r\n\t}", "public void add(NODE node) {\n root = root == null ? node : root.add(node);\n }", "public Node appendNode(Node node);", "public boolean add(int node) {\n\t\tif (memberHashSet.contains(node))\n\t\t\treturn false;\n\t\t\n\t\t/* Things will change, invalidate the cached values */\n\t\tinvalidateCache();\n\t\t\n\t\t/* First, increase the internal and the boundary weights with the\n\t\t * appropriate amounts */\n\t\ttotalInternalEdgeWeight += inWeights[node];\n\t\ttotalBoundaryEdgeWeight += outWeights[node] - inWeights[node];\n\t\t\n\t\t/* For each edge adjacent to the given node, make some adjustments to inWeights and outWeights */\n\t\tfor (int adjEdge: graph.getAdjacentEdgeIndicesArray(node, Directedness.ALL)) {\n\t\t\tint adjNode = graph.getEdgeEndpoint(adjEdge, node);\n\t\t\tif (adjNode == node)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tdouble weight = graph.getEdgeWeight(adjEdge);\n\t\t\tinWeights[adjNode] += weight;\n\t\t\toutWeights[adjNode] -= weight;\n\t\t}\n\t\t\n\t\t/* Add the node to the nodeset */\n\t\tmemberHashSet.add(node);\n\t\tmembers.add(node);\n\t\t\n\t\treturn true;\n\t}", "public Node addNode(String node) {\n return nodeRepository.save(new Node(node));\n }", "public void nodeAdded(GraphEvent e);", "@Override\n public void add(EventNode node) {\n nodes.add(node);\n // Invalidate the relations cache.\n //\n // NOTE: The reason we do not update the relations here is because the\n // node might not be finalized yet. That is, the node's transitions\n // might not be created/added yet, so at this point we do not know the\n // exact set of relations associated with this node.\n cachedRelations = null;\n }", "protected boolean add(TreeNode n) {\n name = n.getTitle();\n address = n.getAddress();\n\n //List of current values to the name key\n if (map.get(name) != null) {\n addresses = map.get(name);\n } else {\n addresses = new ArrayList<>();\n }\n\n //Then it'll have to check if that add entry already exits. Although it never should.\n //TODO THIS IS WHERE ITS SLOW\n// if (addresses.contains(name)) {\n// logger.debug(\"HashBrowns: addresses already contained: \" + name);\n// return false;\n// }\n\n //Then it adds this new address entry. Order of addresses doesn't matter for the time being.\n addresses.add(address);\n\n //Replace the old hash key (name) with the update list of addresses\n map.put(name, addresses);\n\n return true;\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "private void addNode(DLinkedNode node) {\n\t\t\tnode.pre = head;\n\t\t\tnode.post = head.post;\n\n\t\t\thead.post.pre = node;\n\t\t\thead.post = node;\n\t\t}", "public boolean addNode(NodeType node) {\n\t\treturn false;\n\t}", "synchronized void addOldOpennetNode(PeerNode pn) {\n\t\toldPeers.push(pn);\n\t}", "public void addNode( SearchNode n, boolean fromStart ) {\n\n\t\tSearchNode [][] nodes_as_image = fromStart ? nodes_as_image_from_start : nodes_as_image_from_goal;\n\n\t\tif( nodes_as_image[n.z] == null ) {\n\t\t\tnodes_as_image[n.z] = new SearchNode[width*height];\n\t\t}\n\n\t\tif( nodes_as_image[n.z][n.y*width+n.x] != null ) {\n\t\t\t// Then there's already a node there:\n\t\t\treturn;\n\t\t}\n\n\t\tif( n.searchStatus == OPEN_FROM_START ) {\n\n\t\t\topen_from_start.add( n );\n\t\t\tnodes_as_image[n.z][n.y*width+n.x] = n;\n\n\t\t} else if( n.searchStatus == OPEN_FROM_GOAL ) {\n\t\t\tassert bidirectional && definedGoal;\n\n\t\t\topen_from_goal.add( n );\n\t\t\tnodes_as_image[n.z][n.y*width+n.x] = n;\n\n\t\t} else if( n.searchStatus == CLOSED_FROM_START ) {\n\n\t\t\tclosed_from_start.add( n );\n\t\t\tnodes_as_image[n.z][n.y*width+n.x] = n;\n\n\t\t} else if( n.searchStatus == CLOSED_FROM_GOAL ) {\n\t\t\tassert bidirectional && definedGoal;\n\n\t\t\tclosed_from_goal.add( n );\n\t\t\tnodes_as_image[n.z][n.y*width+n.x] = n;\n\n\t\t}\n\n\t}", "private void addNode(String name)\n {\n try (Session session = driver.session())\n {\n // Wrapping Cypher in an explicit transaction provides atomicity\n // and makes handling errors much easier.\n try (Transaction tx = session.beginTransaction())\n {\n tx.run(\"MERGE (a:Node {value: {x}})\", parameters(\"x\", name));\n tx.success(); // Mark this write as successful.\n }\n }\n }", "void add_to_network(Town town, List<Town> connectedTowns);", "@PostMapping(path = \"/\")\n public @ResponseBody String addNode(@RequestBody Node node){\n\n return nodeService.addNode(node);\n }", "public void addNode(byte b, Node node) {\n nodes.put(b, node);\n }", "public void updatetosendmap_addnode(String id, HashMap<String, Object> att) {\n\t\t\tfor(String dest : this.toSendMap.keySet()) {\n\t\t\t\tGraph destmap = this.toSendMap.get(dest);\n\t\t\t\tNode newNode = destmap.getNode(id);\n\t\t\t\tif(newNode == null)\n\t\t\t\t\tnewNode = destmap.addNode(id);\n\t\t\t\tnewNode.addAttributes(att);\n\t\t\t}\n\t\t}", "private void addNode(DLinkedNode node){\n node.pre = head;\n node.post = head.post;\n\n head.post.pre = node;\n head.post = node;\n }", "void addHasNodeSettings(NodeSettings newHasNodeSettings);", "public void update(NetworkNode networkNode);", "public boolean add(Object node,ConcurrentHashMap attributes) {\n attributeLis.add(attribute);\n \n return super.add(node);\n \n \n }", "public void addNode(String item){\n Node newNode = new Node(item,null);\nif(this.head == null){\n this.head = newNode;\n}else{\n Node currNode = this.head;\n while(currNode.getNextNode() != null){\n currNode = currNode.getNextNode();\n }\n currNode.setNextNode(newNode);\n}\nthis.numNodes++;\n }", "@Override\r\n protected Node getStoringNode(Integer key) {\r\n return getNetworkNode();\r\n }", "protected void addNode( String workspaceName,\n NodeKey key,\n Path path,\n Name primaryType,\n Set<Name> mixinTypes,\n Properties properties ) {\n }", "@Override\n public boolean addNode(String nodeName) throws NodeException {\n Node newNode = new Node(nodeName);\n\n if(!containsNode(newNode)) {\n nodes.add(new Node(nodeName));\n return true;\n } else {\n // Dany prvek uz v listu existuje\n throw new NodeException(\"Vámi zadaný prvek už v listu existuje!\");\n }\n }", "public void addNodes(final Nodes nodes) {\n if (this.nodes == null) {\n this.nodes = new ArrayList<Nodes>();\n }\n this.findUpdateNode(nodes);\n }", "public String addNode(PlainGraph graph, String nodeName, String label) {\n Map<String, PlainNode> nodeMap = graphNodeMap.get(graph);\n if (!nodeMap.containsKey(nodeName)) {\n PlainNode node = graph.addNode();\n\n // if a label is given add it as an edge\n if (label != null) {\n if (!label.contains(\":\")) {\n // if the label does not contain \":\" then 'type:' should be added\n label = String.format(\"%s:%s\", TYPE, label);\n }\n graph.addEdge(node, label, node);\n }\n\n nodeMap.put(nodeName, node);\n }\n return nodeName;\n }", "public void addToNeighbours(Tile N) {\n \r\n neighbours.add(N);\r\n }" ]
[ "0.69948566", "0.6895437", "0.6865558", "0.6856973", "0.68143266", "0.6808802", "0.6808296", "0.673078", "0.6710786", "0.66002285", "0.65964794", "0.65559566", "0.6545353", "0.6529924", "0.6516353", "0.65141046", "0.6479535", "0.64777654", "0.6477201", "0.6452292", "0.64381814", "0.6438125", "0.64194643", "0.6403176", "0.63936603", "0.6385508", "0.6374747", "0.6371827", "0.6312434", "0.6306077", "0.62702984", "0.6240942", "0.6214082", "0.62132937", "0.61941755", "0.6173292", "0.6171496", "0.6168832", "0.6148402", "0.6145017", "0.61304647", "0.6121453", "0.6118578", "0.61130667", "0.61127084", "0.61059874", "0.61037934", "0.60863113", "0.6070058", "0.6061727", "0.60474986", "0.6035691", "0.60276514", "0.60226923", "0.6001072", "0.59790415", "0.5963487", "0.5955062", "0.59439015", "0.5931206", "0.5884712", "0.58739346", "0.5866023", "0.58544356", "0.58474666", "0.584062", "0.58384764", "0.58319527", "0.5809243", "0.5809005", "0.57812315", "0.5778351", "0.577635", "0.5761605", "0.5760617", "0.575988", "0.57499623", "0.5749336", "0.5712311", "0.5702718", "0.5702327", "0.568431", "0.56828237", "0.5680752", "0.5677742", "0.5677042", "0.56635255", "0.56599826", "0.5654564", "0.5653222", "0.56491905", "0.56399876", "0.5634272", "0.56111", "0.5595604", "0.5595587", "0.5584822", "0.55725414", "0.5571252", "0.55658597" ]
0.6854798
4
Checking to see if the current node is the last node in the sequence
public boolean checkLastNodeStatus() { return visitedNodes.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isLast() {\n\t\treturn (next == null);\n\t}", "private boolean isNodeLast(TreeNode node)\n\t{\n\t\tTreeNode parent = node.getParent();\n\t\tif (parent == null)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn parent.getChildAt(parent.getChildCount() - 1).equals(node);\n\t\t}\n\t}", "public boolean isLastNode() \n\t{\n\t // Checks if I am pointing to null*.\n\t\t// If so, then I know I am the last node.\n\t\t// *Note: From the perspective of this instance of Node.\n\t if (this.next == null)\n\t {\n\t return true;\n\t }\n\t \n\t // Otherwise, I know I am not last,\n\t // because there is a next node after me.\n\t return false;\n\t}", "public boolean isLast() {\n\t\treturn last;\n\t}", "public boolean isLastPosition() {\n return this.value == LAST_VALUE;\n }", "public boolean moveLast(\n )\n {\n int lastIndex = objects.size()-1;\n while(index < lastIndex)\n {moveNext();}\n\n return getCurrent() != null;\n }", "boolean isLast() {\n return !hasNext();\n }", "public boolean isLastInSubList() {\n\t\tif (parent == null || parent.getSubList() == null || parent.getSubList().size() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (parent.getSubList().indexOf(this) == parent.getSubList().size() - 1);\n\t}", "private boolean chkCurRulIsLast(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(currentRule.equals(ConditionTree[i][0]) && ConditionTree[i][5].equals(\"Y\")){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\t\n}", "public boolean last() {\n boolean result = false;\n while(iterator.hasNext()) {\n result = true;\n next();\n }\n\n return result;\n }", "@Override\n\tpublic boolean isAtEnd()\n\t{\n\t\tif (right.isEmpty())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isAfterLast() {\n/* 125 */ return (this.lastRowFetched && this.currentPositionInFetchedRows > this.fetchedRows.size());\n/* */ }", "@Override\r\n public boolean hasNext() {\r\n return node.next() != tail;\r\n }", "@Override\n\tpublic boolean isLast(Position P) throws InvalidPositionException {\n\t\treturn false;\n\t}", "public boolean last(String key) {\n last();\n previous(key);\n return next();\n }", "public boolean deleteLast() {\n if(isEmpty()){\n return false;\n }\n tail = moveLeft(tail);\n return true;\n }", "void isLastPosition(boolean isLastPosition);", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public boolean deleteLast() \n {\n \t\n \tDLLNode delete = tail;\n \tdelete = tail.prev;\n \tdelete.next = null;\n \ttail = delete;\n \treturn true;\n }", "public boolean hasMore(){\r\n return curr != null;\r\n }", "public boolean hasPrevious() {\r\n if (current - 1 <= 0) {\r\n current = elem.length - 1;\r\n }\r\n return elem[current - 1] != null;\r\n }", "public boolean isLast() throws SQLException {\n/* 219 */ return (this.lastRowFetched && this.currentPositionInFetchedRows == this.fetchedRows.size() - 1);\n/* */ }", "private boolean removeLastReturned(Node node) {\n if (node == null) {\n return false;\n }\n if (removeLastReturned(node.rightChild)) {\n return true;\n }\n if (!queue.contains(node.value)) {\n return AVLTree.this.remove(node.value);\n }\n return removeLastReturned(node.leftChild);\n }", "public boolean isAtEnd() {\n return models.indexOf(activeModel) == (models.size()-1);\n }", "@Override\n public boolean isAfterLast() {\n boolean result = true;\n if (mCalllogDatas != null) {\n result = (mIndex >= mCalllogDatas.size()) ? true : false;\n }\n\n MyLogger.logD(CLASS_TAG, \"isAfterLast():\" + result);\n return result;\n }", "public boolean getIsLastInSubList() {\n\t\treturn isLastInSubList();\n\t}", "private boolean reachedEnd() {\n return current >= source.length();\n }", "boolean isFinished() {\n return includedInLastStep() && (end == elementList.size() - 1);\n }", "boolean hasEndPosition();", "boolean hasEndPosition();", "@Override\n public boolean hasNext() {\n\n return curr.nextNode != null && curr.nextNode != tail;\n }", "public boolean isLast() throws SQLException {\n\n try {\n debugCodeCall(\"isLast\");\n checkClosed();\n int row = result.getRowId();\n return row >= 0 && row == result.getRowCount() - 1;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public boolean deleteLast() {\n if (cnt == 0)\n return false;\n\n if (head == tail) {\n head = null;\n } else {\n tail.pre.next = tail.next;\n tail.next.pre = tail.pre;\n tail = tail.pre;\n }\n cnt--;\n return true;\n }", "public boolean isLastBatch() {\r\n\t\treturn (getTotalMatches() == getEndRange());\r\n\t}", "protected final boolean computeHasNext() {\n return this.getEnds().getGraph().getSuccessorEdges(this.getNext()).isEmpty();\n }", "public boolean checkTail() {\n\t\tSegment segCheck = tail; // make some segment have a handle on the supposed last segment\n\t\tint piece = 0; // 0 segments so far\n\t\t\n\t\twhile(segCheck!=null) { // while the segment in question is not the head\n\t\t\tsegCheck = segCheck.getSeg(); // set the test segment to be the one the current segment\n\t\t\t// has a handle on\n\t\t\tpiece++; // add one to the number of segments\n\t\t}\n\t\t\n\t\t/*\n\t\t * This works because it will get to the head, but won't check to see what segment\n\t\t * it has a handle on until it's inside the while loop. By the time it goes around to the\n\t\t * null segment, it has already added in the last segment of the snake.\n\t\t */\n\t\t\n\t\treturn (piece==parts); // return true if the pieces counted is the same as the number of parts\n\t}", "@Override\r\n\t\t\tpublic boolean hasNext() {\n\t\t\t\tnodo<T> sig = sentinel;\r\n\t\t\t\tsentinel = sentinel.getNext();\r\n\t\t\t\treturn (sentinel != null) ? true : false;\r\n\t\t\t}", "private boolean isLastView(int viewIndex){\r\n\t\treturn viewIndex == this.getChildCount() - 1;\r\n\t}", "private nodeClass findLast(){\n nodeClass aux = pivot; \n do{\n aux=aux.next;\n }while (aux.next!=pivot);\n return aux; //esto te devuelve el ultimo nodo de la lista\n }", "public boolean hasNextToken(){\n if(currentToken+1 > tokens.size())\n return false;\n if(currentToken <= 0)\n return false;\n return true;\n }", "public boolean isLastStep() {\r\n return this.isLastStep;\r\n }", "public boolean isAfterLast() throws SQLException {\n\n try {\n debugCodeCall(\"isAfterLast\");\n checkClosed();\n int row = result.getRowId();\n int count = result.getRowCount();\n return row >= count || count == 0;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public boolean hasNext() {\n return !left_nodes.isEmpty(); // DON'T FORGET TO MODIFY THE RETURN IF NEED BE\r\n\t\t}", "public boolean hasNext(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\t//Check this condition, may need to check for empty future nodes\r\n\t\t\tif ((current == null)){//&&(currentNode.getLast()==current)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t\t//current is not endmarker, \r\n\t\t\t\r\n\t\t\t/*if ((currentNode.getLast()!=current))\r\n\t\t\t\treturn true;\r\n\t\t\tif (currentNode.next.getArraySize()!= 0)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;*/\r\n\t\t}", "private boolean _seqHasNext() {\n // If the ISPSeqComponent's builder has a next configuration, then the\n // observation has a next sequence too.\n if (_seqBuilder == null)\n return false;\n\n // Does the current seq builder have next\n if (_seqBuilder.hasNext())\n return true;\n\n // The current seq builder has no more are there more seqbuilders?\n _seqBuilder = _getTopLevelBuilder(_seqBuilderIndex + 1);\n if (_seqBuilder == null)\n return false;\n _seqBuilderIndex++;\n\n // Now reset the new seq builder run\n _doReset(_options);\n\n // Now that it has been moved, try again\n return _seqHasNext();\n }", "private boolean removeLastElement() {\n if (--size == 0) {\n clear();\n return true;\n }\n return false;\n }", "public int findLast() {\n\t\tint result = 0;\n\t\twhile (!checkHaveThisNode(result))\n\t\t\tresult++;\n\n\t\treturn result;\n\t}", "public boolean deleteLast() {\n if(size == 0) return false;\n\n tail.prev = tail.prev.prev;\n tail.prev.next= tail;\n size -= 1;\n return true;\n}", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "boolean hasIsLastBatch();", "public boolean finished() {\r\n\t\tboolean allOccupied = true;\r\n\t\tfor (Node n : allNodes.values()) {\r\n\t\t\tif (n.path == 0) {\r\n\t\t\t\tallOccupied = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (allOccupied) {\r\n\r\n\t\t\tfor (Integer path : paths.keySet()) {\r\n\t\t\t\tStack<Node> sn=paths.get(path);\r\n\t\t\t\tNode n = sn.peek();\r\n\t\t\t\tif (!EndPoint.containsValue(n)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (sn.size() > 1) {\r\n\t\t\t\t\tStack<Node> snBK = (Stack<Node>) sn.clone();\r\n\t\t\t\t\t\r\n\t\t\t\t\tNode n1 = snBK.pop();\r\n\t\t\t\t\twhile (!snBK.isEmpty()) {\r\n\t\t\t\t\t\tif(n1.path!=path)\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\tNode n2= snBK.pop();\r\n\t\t\t\t\t\tif(adjaMatrix[n1.index][n2.index]==0)\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tn1=n2;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn _current < (_items.length -1);\n\t\t}", "public boolean isAtEnd()\n\t{\n\t\treturn (lineNow >= lineTime);\n\t}", "Node lastNode(Node node){\n while(node.next!=null)\n node = node.next;\n return node;\n }", "public boolean hasBack() {\n if (index > 0) {\n return true;\n } else {\n return false;\n }\n }", "public boolean getHasNext() {\n\t\t\treturn !endsWithIgnoreCase(getCursor(), STARTEND);\n\t\t}", "public boolean isLastList() {\r\n return lastList;\r\n }", "public Node getLast()\n {\n return this.last;\n }", "boolean canReachLastStep(int stepsLeft, int previousStep){\n\t\t// if it satisfies worst case: when every subsequent step has to be smallerStep\n\t\treturn ((previousStep - 1) - stepsLeft <= 0);\n\t}", "public boolean deleteLast() {\n if (isEmpty()) {\n return false;\n }\n tail = (tail - 1 + k) % k;\n return true;\n }", "private boolean isLatest()\n {\n return varIndexes.get(curDisplay.get()) >= children.stream().mapToInt(c -> c.varIndexes.isEmpty() ? -1 : c.varIndexes.get(c.varIndexes.size() - 1)).max().orElse(-1);\n }", "private boolean isAtEnd() {\n return peek().type == EOF;\n }", "public boolean isAfterLast() throws SQLException\n {\n return m_rs.isAfterLast();\n }", "protected boolean lastStateOnPathIsNew(PrioritizedSearchNode psn) {\n\n\tPrioritizedSearchNode cmpNode = (PrioritizedSearchNode) psn.backPointer;\n\n\twhile (cmpNode != null) {\n\t if (psn.equals(cmpNode)) {\n\t\treturn false;\n\t }\n\t cmpNode = (PrioritizedSearchNode) cmpNode.backPointer;\n\t}\n\n\treturn true;\n }", "public boolean deleteLast() {\n if (isEmpty()) {\n return false;\n } else {\n elements[front++] = -1;\n return true;\n }\n }", "public boolean hasLastLocation() {\n return lastLocationBuilder_ != null || lastLocation_ != null;\n }", "@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\t\r\n\t\t\treturn currentNode.nextNode != null;\r\n\t\t}", "public boolean hasNext() {\n\t\tMemoryBlock dummyTail = new MemoryBlock(-1, -1); // Dummy for tail\n\t\tboolean hasNext = (current.next.block.equals(dummyTail));\n\t\treturn (!hasNext);\n\t}", "@java.lang.Override\n public boolean hasLastLocation() {\n return lastLocation_ != null;\n }", "private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "private Node<TokenAttributes> findLast(Node<TokenAttributes> current_node) {\n if (current_node.getChildren().isEmpty() || current_node.getChildren().size() > 1) {\n return current_node;\n }\n return findLast(current_node.getChildren().get(0));\n }", "protected final boolean computeHasNext() {\n return this.getEnds().getGraph().getPredecessorEdges(this.getNext()).isEmpty();\n }", "public boolean isLast() throws SQLException\n {\n return m_rs.isLast();\n }", "private static void checkPerticularElementExitInLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tString result = \"\";\n\t\tfor(Integer i:list) {\n\t\t\tresult = (list.contains(60))?\"true\":\"false\";\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "public boolean isFull() {\n return moveRight(tail)==head;\n }", "public E last() {\n if (next == null) {\n return head();\n } else {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining ptr != null;\n while (ptr.next != null) {\n ptr = ptr.next;\n }\n //@ assert ptr.next == null;\n //@ assume ptr.val != null ==> \\typeof(ptr.val) <: \\type(Object);\n E ret = (ptr.val == null\n ? null\n : (ptr.val) );\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }\n }", "public boolean hasMoreTokens() {\n\t\treturn\t(current <=\tmax);\n\t}", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "public boolean isLastPhase ()\n {\n return true;\n }", "@Override\n\tpublic Boolean isEnd() {\n\t\tfor (int i = 0;i < grid.length;i++){\n\t\t\tfor (int j = 0;j < grid.length;j++){\n\t\t\t\tif(grid[i][j] == null){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean checkIfEnd(){\n boolean flag = false;\n int i = 0;\n while(i< arrayBoard.length){\n if(arrayBoard[i] == -1) {\n flag = true;\n break;\n }\n i++;\n }\n return flag;\n }", "public boolean isLastRound(){\n return gameDescriptor.getTotalCycles()==roundNumber;\n }", "public boolean determineTermination(ListNode head) {\r\n\t\tHashSet<ListNode> hashSet = new HashSet<ListNode>();\r\n\t\tListNode node = head;\r\n\t\twhile (node != null) {\r\n\t\t\tif (hashSet.contains(node)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\thashSet.add(node);\r\n\t\t\tnode = node.next;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void setLast() { this._last = true; }", "public boolean goBack() {\n if(index > 0) {\n index--;\n return true;\n } else {\n return false;\n }\n }", "public boolean moreToIterate() {\r\n\t\treturn curr != null;\r\n\t}", "public boolean isFull() {\n if((this.tail+1)%this.size==this.head)\n return true;\n return false;\n }", "@Override\n\t\tpublic boolean hasNext() {\t\t\t\n\t\t\treturn current != null;\n\t\t}", "public boolean isLastTimeFrame(TimeFrame snapshotIdx) {\n if (snapshotIdx.equals(lstTimeFrameOrdering\n .get(lstTimeFrameOrdering.size() -1))) {\n return true;\n }\n return false;\n }", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public boolean hasPreviousSet() { \n return (firstIndexOfCurrentSet > firstIndex);\n }", "public boolean isFull(){\n return this.top==this.maxLength-1;\n }", "@Override\n\tpublic boolean isLastUse(IIntermediate by) {\n\t\treturn heldObj.isLastUse(by);\n\t}", "public boolean isLastTokenMinus(){\r\n return _isLastTokenMinus;\r\n }", "public boolean hasNext(){\n return current!=null;\n }", "public boolean deleteLast() {\n if (head == tail && size == 0)\n return false;\n else {\n tail = (tail - 1 + capacity) % capacity;//删除了最左侧的头元素,则需要将尾指针向左\n //移动一个;\n size--;\n return true;\n }\n // return true;\n }", "public boolean hasNext() {\n return position < history.size() - 1;\n }", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "protected abstract boolean computeHasNext();", "public boolean isLastMoment() {\n return isLastMoment;\n }" ]
[ "0.77768534", "0.7740075", "0.7614342", "0.7135589", "0.7125574", "0.7121309", "0.7096765", "0.7083299", "0.6994391", "0.69939715", "0.6790701", "0.6745663", "0.66936946", "0.6624881", "0.6591465", "0.6580721", "0.6573178", "0.657157", "0.65707505", "0.65490186", "0.6512942", "0.65032554", "0.649784", "0.64747995", "0.6417415", "0.6417052", "0.6395792", "0.6385791", "0.6382499", "0.6382499", "0.6332411", "0.63278186", "0.6315486", "0.630804", "0.63007534", "0.62931323", "0.6293038", "0.62820095", "0.62569976", "0.62358755", "0.6234927", "0.62135524", "0.62061465", "0.62043023", "0.6185859", "0.6175807", "0.61732864", "0.61678815", "0.6161408", "0.61597943", "0.6143052", "0.61297643", "0.61235213", "0.6121622", "0.6119199", "0.61166143", "0.61088806", "0.6107835", "0.6095844", "0.6095633", "0.607027", "0.605912", "0.6044524", "0.6020144", "0.60161555", "0.6013848", "0.60138416", "0.60128033", "0.5998471", "0.5996131", "0.59957284", "0.5981128", "0.5977207", "0.5970659", "0.5970231", "0.5964615", "0.59605736", "0.59589636", "0.5958685", "0.59466773", "0.5937885", "0.5928", "0.5924072", "0.5923135", "0.5909114", "0.58966184", "0.5889394", "0.58859825", "0.5865709", "0.5865244", "0.58512753", "0.58467346", "0.5836118", "0.5829008", "0.58259857", "0.58204687", "0.5817919", "0.5817273", "0.5812507", "0.5812485" ]
0.7241346
3
The section below contains all of the get and set methods needed to update and interrogate the token Returns the name of the shared resource used by the network
public String getCustomFileName() { return customFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getToken(){\r\n return localToken;\r\n }", "public java.lang.String getToken(){\n return localToken;\n }", "java.lang.String getRemoteToken();", "public void setToken(java.lang.String param){\n localTokenTracker = true;\n \n this.localToken=param;\n \n\n }", "public void updateToken(String token){\n //todo something\n if (sharedPreferencesUtils != null){\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }else {\n sharedPreferencesUtils = new SharedPreferencesUtils(this);\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }\n }", "String getPrimaryToken();", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\n return token.get();\n }", "public String getToken()\n {\n return token;\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken();", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n\t\treturn token;\n\t}", "public String getToken() {\n\t\treturn token;\n\t}", "public String getToken() {\n return this.token;\n }", "public String name() {\n\t\treturn \"shared\";\n\t}", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public static String getToken() {\n \treturn mToken;\n }", "public String getToken()\n {\n return ssProxy.getToken();\n }", "public String getToken() {\n return this.token;\n }", "@java.lang.Override\n public java.lang.String getRemoteToken() {\n java.lang.Object ref = remoteToken_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n remoteToken_ = s;\n return s;\n }\n }", "GetToken.Res getGetTokenRes();", "public String getToken() {\n return this.token;\n }", "public String getTokenKey()\r\n\t{\r\n\t\treturn TOKEN_KEY;\r\n\t}", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "public String token() {\n return Codegen.stringProp(\"token\").config(config).require();\n }", "public java.lang.String getRemoteToken() {\n java.lang.Object ref = remoteToken_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n remoteToken_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "GetToken.Req getGetTokenReq();", "public void setToken(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTokenTracker = true;\r\n } else {\r\n localTokenTracker = false;\r\n \r\n }\r\n \r\n this.localToken=param;\r\n \r\n\r\n }", "public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }", "@Override\n public Object getCredentials() {\n return token;\n }", "void putToken(String name, String value);", "public void putToken(Token token)throws Exception;", "public String getToken() {\n\n return this.token;\n }", "@java.lang.Override\n public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Authentication token (see `/auth` and `/configure`)\")\n\n public String getToken() {\n return token;\n }", "public Token getToken() {\n return token;\n }", "public Token getToken() {\r\n return _token;\r\n }", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "@Override\n\t\t\t\tpublic String getUsername() {\n\t\t\t\t\treturn token;\n\t\t\t\t}", "public SSOToken getSSOToken() {\n return ssoToken;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getTokenBytes() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n token_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void storeToken(AuthorizationToken token);", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n token_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n token_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public AuthorizationToken retrieveToken(String token);", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n token_ = s;\n return s;\n }\n }", "@Override\r\n public int getTokenId()\r\n {\r\n return this.tokenId;\r\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n token_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getStringToken()\n\t{\n\t\tgetToken();\n\t\treturn token;\n\t}", "public String token() {\n return this.token;\n }", "private String m2194g() {\n return this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).getString(\"TOKEN\", \"\");\n }", "public Hashtable<Integer, String> getTokenHashTable() { return this.tokenHashTable; }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public java.lang.String getToken() {\n java.lang.Object ref = token_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n token_ = s;\n }\n return s;\n }\n }", "public String getTokenId() {\n return tokenId;\n }", "@Nonnull\n public final String getToken() {\n return this.token;\n }", "public void sendTokenToRemote() { }", "public Token getToken() {\n\t\treturn token;\n\t}", "public Token getToken() {\n\t\treturn token;\n\t}", "public Token getToken() {\n\t\treturn token;\n\t}", "@Override\n\tpublic Token getToken() {\n\t\treturn this.token;\n\t\t\n\t}", "public com.google.protobuf.ByteString\n getTokenBytes() {\n java.lang.Object ref = token_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n token_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTokenBytes() {\n java.lang.Object ref = token_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n token_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTokenBytes() {\n java.lang.Object ref = token_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n token_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTokenBytes() {\n java.lang.Object ref = token_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n token_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTokenBytes() {\n java.lang.Object ref = token_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n token_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "public String getAppToken() {\r\n return appToken;\r\n }", "java.lang.String getChannelToken();", "java.lang.String getChannelToken();", "public DsByteString getToken() {\n return sToken;\n }", "String getComponentAccessToken();" ]
[ "0.6313591", "0.6156787", "0.6140457", "0.5969857", "0.5963719", "0.5963696", "0.59067637", "0.59067637", "0.5900027", "0.58824396", "0.58305377", "0.58305377", "0.58305377", "0.5812603", "0.578538", "0.57831216", "0.57831216", "0.57831216", "0.57831216", "0.57831216", "0.5774517", "0.5774517", "0.5762015", "0.5752245", "0.57281405", "0.57281405", "0.57281405", "0.5719065", "0.5697393", "0.5689574", "0.566729", "0.56645054", "0.5663641", "0.5659902", "0.56486046", "0.56486046", "0.56486046", "0.56486046", "0.56486046", "0.56486046", "0.564106", "0.5639274", "0.5637754", "0.56126434", "0.55979586", "0.5591997", "0.5582427", "0.5578637", "0.556628", "0.5553603", "0.55474025", "0.5543837", "0.5485416", "0.5481612", "0.5470917", "0.5470917", "0.5470917", "0.5470917", "0.5470917", "0.546419", "0.54522485", "0.5452152", "0.5439111", "0.54278547", "0.54278547", "0.54275364", "0.54260635", "0.54243654", "0.5421857", "0.54046935", "0.54046935", "0.54046935", "0.5401672", "0.5399483", "0.53990525", "0.5372479", "0.53639543", "0.53639543", "0.53639543", "0.5361474", "0.5361474", "0.5361474", "0.5361474", "0.53435147", "0.53336096", "0.5332875", "0.53146774", "0.53146774", "0.53146774", "0.5313221", "0.53098667", "0.53098667", "0.53098667", "0.53098667", "0.53098667", "0.5306734", "0.5305815", "0.52886206", "0.52886206", "0.5287722", "0.5279105" ]
0.0
-1
Returns the Id of the host designated for extra time
public String getExtraTimeHost() { return extraTimeHost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getHostId() {\n return hostId;\n }", "public String getHostID() { return hostID; }", "public static int getLastMeetingHostId() {\n return SP_UTILS.getInt(SPDataConstant.KEY_LAST_MEETING_HOST_ID, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT);\n }", "private static final long getHostId(){\n long macAddressAsLong = 0;\n try {\n Random random = new Random();\n InetAddress address = InetAddress.getLocalHost();\n NetworkInterface ni = NetworkInterface.getByInetAddress(address);\n if (ni != null) {\n byte[] mac = ni.getHardwareAddress();\n random.nextBytes(mac); // we don't really want to reveal the actual MAC address\n\n //Converts array of unsigned bytes to an long\n if (mac != null) {\n for (int i = 0; i < mac.length; i++) {\n macAddressAsLong <<= 8;\n macAddressAsLong ^= (long)mac[i] & 0xFF;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return macAddressAsLong;\n }", "public String getHostId() {\n\t\treturn (hid);\n\t}", "public static String getLocalHostId() {\r\n\t\treturn localHostId;\r\n\t}", "int getServerId();", "ResourceID getHeartbeatTargetId();", "public String getHostUuid() {\n return hostUuid;\n }", "String getServerId();", "java.lang.String getMachineId();", "public int getHostAddress() {\n return hostAddress;\n }", "Host getHostById(long aId) throws DaoException;", "int getInstanceId();", "int getInstanceId();", "int getInstanceId();", "public String getUniqueId() {\n\t\treturn m_serverName + \" - \" + m_userId + \" - \" + m_timestampMillisecs;\n\t}", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "public void setHostId(Integer hostId) {\n this.hostId = hostId;\n }", "long getInstanceID();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "public Long getZbHostid() {\r\n return zbHostid;\r\n }", "public String getTimeid() {\n return timeid;\n }", "ExperimenterId getExperimenterId();", "private String getCurrentInstanceId() throws IOException {\n String macAddress = CommonUtils.toHexString(RuntimeUtils.getLocalMacAddress());\n // 16 chars - workspace ID\n String workspaceId = DBWorkbench.getPlatform().getWorkspace().getWorkspaceId();\n if (workspaceId.length() > 16) {\n workspaceId = workspaceId.substring(0, 16);\n }\n\n StringBuilder id = new StringBuilder(36);\n id.append(macAddress);\n id.append(\":\").append(workspaceId).append(\":\");\n while (id.length() < 36) {\n id.append(\"X\");\n }\n return id.toString();\n }", "public Nhosts gethostdetail(HttpSession session, Integer id) {\r\n\t\tString urlReq = \"https://localhost/Demo/clientAPI/dc_hosts/_id/\"+id;\r\n\t\tNhosts[] hosts = HttpClient.doGetServer_withclass(session, urlReq, Nhosts[].class);\r\n\t\treturn hosts[0];\r\n\t\t\r\n\t}", "public String getInstanceId();", "public Host getCurrentHost() {\n\t\tif (current == null) {\n\t\t\tString id = SystemHelper.os.getSystemUUID();\n\t\t\tfor (Host host : config.getHosts()) {\n\t\t\t\tif (id.equals(host.getId())) {\n\t\t\t\t\tcurrent = host;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn current;\n\t}", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "String getInstanceID();", "private static int th() {\n return (int) Thread.currentThread().getId();\n }", "int getUnusedExperimentId();", "public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}", "String getIntegHost();", "UUID getMonarchId();", "public long threadId();", "public int getLastAliveId() {\n\t\treturn this.aliveId;\n\t}", "public byte[] getInstanceId() {\n if (byteInstanceID == null) {\n final Device device = Device.getInstance();\n final byte[] deviceid = device.getWDeviceId();\n byteInstanceID = Encryption.SHA1(deviceid);\n }\n return byteInstanceID;\n }", "long getRpcId();", "public String getMachineId()\n\t{\n\t\treturn machineId;\n\t}", "Host getHost();", "public com.flexnet.opsembedded.webservices.ExternalIdQueryType getServerUniqueId() {\n return serverUniqueId;\n }", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "public int getInstanceId(){\n\t\treturn this._instanceId;\n\t}", "int getEnterId();", "int getEnterId();", "int getEnterId();", "int getEnterId();", "java.lang.String getWorkerId();", "public String hanaInstanceId() {\n return this.hanaInstanceId;\n }", "public Long gethId() {\n return hId;\n }", "String getExistingId();", "public int getMachineID() {\n return machineID;\n }", "String experimentId();", "String getExecId();", "public static synchronized String getUID() throws UnknownHostException, SocketException {\r\n \r\n // Initialized MAC address if necessary.\r\n if (!initialized) {\r\n initialized = true;\r\n macAddress = UMROMACAddress.getMACAddress();\r\n macAddress = Math.abs(macAddress);\r\n }\r\n \r\n // Use standard class to get unique values.\r\n String guidText = new UID().toString();\r\n \r\n StringTokenizer st = new StringTokenizer(guidText, \":\");\r\n \r\n int unique = Math.abs(Integer.valueOf(st.nextToken(), 16).intValue());\r\n long time = Math.abs(Long.valueOf(st.nextToken(), 16).longValue());\r\n // why add 0x8000 ? because usually starts at -8000, which wastes 4 digits\r\n int count = Math\r\n .abs(Short.valueOf(st.nextToken(), 16).shortValue() + 0x8000);\r\n \r\n // concatenate values to make it into a DICOM GUID.\r\n String guid = UMRO_ROOT_GUID + macAddress + \".\" + unique + \".\" + time\r\n + \".\" + count;\r\n \r\n return guid;\r\n }", "public static String getEventHost() {\r\n return eventHost.getValue();\r\n }", "public String getNewId() {\n\t\treturn \"sccp-\" + idCounter++;\n\t}", "DeviceId deviceId();", "DeviceId deviceId();", "public abstract String getMachineID();", "public UUID instanceId() {\n return this.instanceId;\n }", "public static int getNowTime() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HHmmss\");\n\t\treturn Integer.parseInt(timeFormat.format(new Date()));\n\t}", "java.lang.String getServerTime();", "RemoteEventIdentifier createRemoteEventIdentifier();", "int getPacketId();", "public final static String getServerIdentificator() {\r\n\t\treturn serverID;\r\n\t}", "public String getSystemId();", "public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }", "public ServerHostNameAndTimeFilter()\n\t{\n\t\tString hostId = null;\n\t\ttry\n\t\t{\n\t\t\thostId = System.getProperty(\"examples.hostname\");\n\t\t}\n\t\tcatch (SecurityException e)\n\t\t{\n\t\t}\n\t\tif (Strings.isEmpty(hostId))\n\t\t{\n\t\t\thostId = String.valueOf(System.currentTimeMillis());\n\t\t}\n\n\t\tsetHostName(hostId);\n\t}", "IPID getPID();", "public int getServerId() {\n return serverId_;\n }", "public String getHost() {\n return messageProcessor.getIpAddress().getHostAddress();\n }", "public String GiveEventID(){\n \tRandom x = new Random();\n \tString pool = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n \tString newid = \"\";\n \tfor(int i = 0;i<26;i++){\n \t\tnewid+=pool.charAt(x.nextInt(36));\n \t}\n \tJSONArray ja = fetchAllNotes(TimeT.getName(),new String[] {TimeT.getFields()[0]},new String[] {newid});\n \tif(ja.length()!=0)\n \t\tnewid = GiveEventID();\n \treturn newid;\n \t\n }", "public static void saveLastMeetingHostId(int userId) {\n SP_UTILS.put(SPDataConstant.KEY_LAST_MEETING_HOST_ID, userId);\n }", "String getUniqueId();", "UUID getDeviceId();", "Long getRemoteID() throws RemoteException;", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "private String getEc2InstanceHostname() {\n String instanceId = debugInstanceId;\n // For some launches, we won't know the EC2 instance ID until this point.\n if ( instanceId == null || instanceId.length() == 0 ) {\n instanceId = environment.getEC2InstanceIds().iterator().next();\n }\n DescribeInstancesResult describeInstances = environment.getEc2Client().describeInstances(\n new DescribeInstancesRequest().withInstanceIds(instanceId));\n if ( describeInstances.getReservations().isEmpty()\n || describeInstances.getReservations().get(0).getInstances().isEmpty() ) {\n return null;\n }\n return describeInstances.getReservations().get(0).getInstances().get(0).getPublicDnsName();\n }", "public String getInstanceIdentifier();", "@Nullable\n abstract String getInstanceId();", "public YangString getHostIdentityValue() throws JNCException {\n return (YangString)getValue(\"host-identity\");\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "public String getInstanceId() {\r\n\t\treturn instanceId;\r\n\t}", "private static String getHost(final String host) {\n final int colonIndex = host.indexOf(':');\n\n if (colonIndex == -1) {\n return host;\n }\n\n return host.substring(0, colonIndex);\n }", "String getServiceId();", "private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }", "public String generateNodeId(Node node, String remoteHost, String remoteAddress);", "Integer getDeviceId();", "UUID getActivePlayerId();", "long getPlayerId();", "int getLogId();", "public String getInstanceId() {\n return this.InstanceId;\n }", "public String getInstanceId() {\n return this.InstanceId;\n }", "public String getInstanceId() {\n return this.InstanceId;\n }", "public String getHost( ) {\n\t\treturn host;\n\t}" ]
[ "0.649679", "0.6405826", "0.6405718", "0.617522", "0.61575454", "0.61308026", "0.59584373", "0.57363725", "0.5681322", "0.56574595", "0.562846", "0.557764", "0.5551666", "0.55192107", "0.55192107", "0.55192107", "0.5408639", "0.5378102", "0.53661466", "0.53626204", "0.5356987", "0.5356987", "0.5356987", "0.5356987", "0.53020734", "0.5266737", "0.5265991", "0.5259152", "0.5253486", "0.523539", "0.5218581", "0.519954", "0.5188642", "0.5181029", "0.5172694", "0.5163698", "0.5163586", "0.51609904", "0.51607543", "0.51423776", "0.5142183", "0.51216745", "0.5110246", "0.5091871", "0.5088912", "0.5076212", "0.50738394", "0.50680506", "0.50680506", "0.50680506", "0.50680506", "0.50536543", "0.5051829", "0.50470555", "0.5042122", "0.50362533", "0.503499", "0.5016528", "0.5015998", "0.50091845", "0.50026", "0.5001875", "0.5001875", "0.49754617", "0.49747673", "0.49728286", "0.49647063", "0.49563825", "0.49471405", "0.49458584", "0.49453163", "0.49431616", "0.4929254", "0.4929241", "0.4928167", "0.49277705", "0.49262732", "0.49241674", "0.4923809", "0.49215347", "0.49204478", "0.49146047", "0.49074003", "0.4906292", "0.49048454", "0.4902911", "0.49005285", "0.4898016", "0.48864007", "0.488493", "0.4884881", "0.48830032", "0.48801956", "0.48724425", "0.4870194", "0.48642844", "0.48615047", "0.48615047", "0.48615047", "0.48574284" ]
0.690543
0
Returns the value of the extra time given (by default this value is 6000)
public int getExtraTimeGiven() { return extraTimeGiven; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getSecs( );", "public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}", "public int getEat_time()\n\t{\n\t\treturn eat_time;\n\t}", "int getTtiSeconds();", "Double getRemainingTime();", "BigInteger getResponse_time();", "public int getET()\n {\n return exTime;\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public int getTT()\n {\n return toTime;\n }", "public int getTotalTime();", "public double getTime(int timePt);", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "public double getTime() { return time; }", "public static double hoursSpent()\r\n {\r\n double howlong = 24.0;\r\n return howlong;\r\n }", "public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public int getTimeToAtk() {\r\n return timeToAtk;\r\n }", "private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }", "public void addExtraTime (int t) {\n\t\textraTime += t;\n\t\textTime.setText(String.valueOf(extraTime));\n\t}", "public abstract double sensingTime();", "public long getEventTime();", "public double getSetupTime() {\n //SCT: 219 If LGS is in use, the setup is 10 minutes more than when the NGS is in use.\n //The setup overhead is instrument specific, so we just return the extra overhead for\n //using LGS here. Instrument code should call this method to take into account the cost\n //of using Altair\n if (getGuideStarType() == GuideStarType.LGS) {\n return 10.0 * 60;\n }\n return 0.0;\n }", "public long getTimeRemaining() {\n int timer = 180000; //3 minutes for the game in milliseconds\n long timeElapsed = System.currentTimeMillis() - startTime;\n long timeRemaining = timer - timeElapsed + bonusTime;\n long timeInSeconds = timeRemaining / 1000;\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n if (seconds < 0 || minutes < 0) { //so negative numbers don't show\n seconds = 0;\n minutes = 0;\n }\n return timeInSeconds;\n }", "public int getGrowthTime(){\n return this.growthTime;\n }", "int getChronicDelayTime();", "public int getAdditionalRunTime() {\n return additionalRunTime;\n }", "long getRetrievedTime();", "protected static double getFPGATime() {\n return (System.currentTimeMillis() - startTime) / 1000.0;\n }", "public double getAsSeconds()\n {\n return itsValue / 1000000.0;\n }", "long getTotalDoExamTime();", "double getTime();", "private long getCurrentTimeInMillionSeconds(){\n Date currentData = new Date();\n return currentData.getTime();\n }", "public double showHarvestTime(){\r\n\t\tSystem.out.println(\"The average harvest time is \" + averageHarvestTime + \" \" + timeUnit);\r\n\t\treturn averageHarvestTime;}", "@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }", "public double getTempoManipulator(int time) {\n if (time < duration * ((double) pStart / 100)) // BEFORE INCREASE\n return roundWithPrecision(pOffset, 3);\n else if (time > duration * (((double) pStart + (double) pDuration) / 100)) // AFTER INCREASE\n return roundWithPrecision(pOffset * pManipulation, 3);\n else // DURING INCREASE\n {\n double startOfIncrease = (((double) pStart) / 100 * duration);\n double lengthOfIncrease = (((double) pDuration) / 100 * duration);\n\n double at = time - startOfIncrease;\n double atModifier = at / lengthOfIncrease;\n return roundWithPrecision(((1 + ((pManipulation - 1) * atModifier)) * pOffset), 3);\n }\n }", "public void getSecsDetail( );", "public int getTempoSec() {\n return tempoSec;\n }", "public int getHours(){\n return (int) totalSeconds/3600;\n }", "public double GetTimeError(){\n\t\treturn this.timeError;\n\t}", "public double getTime() {return _time;}", "int getSignOffTime();", "int getExpiryTimeSecs();", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "Duration getRemainingTime();", "public double getHoldTime();", "public static double hoursSpent()\n\t{\n\t\treturn 7.0;\n\t}", "public Integer getTestTime() {\n return testTime;\n }", "public double getStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "static int calcCoolingTime(int temperature, int amount) {\n // the time in melting reipes assumes updating 5 times a second\n // we update 20 times a second, so get roughly a quart of those values\n return IMeltingRecipe.calcTimeForAmount(temperature, amount);\n }", "public Integer getAddTime() {\n return addTime;\n }", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "public int getSecond() {\n return this.timeRuunableThread.getSecond();\n }", "T getEventTime();", "private long getTimeDifference(Time timeValue1, Time timeValue2){\n return (timeValue2.getTime()-timeValue1.getTime())/1000;\n }", "long getResponseTimeSec();", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "double getFullTime();", "public double getSecondExtreme(){\r\n return secondExtreme;\r\n }", "public int getDime () {\n return NDime;\n }", "public Integer getCusTime() {\r\n return cusTime;\r\n }", "private int calcTotalTime() {\n\t\tint time = 0;\n\t\tfor (Taxi taxi : taxis) {\n\t\t\ttime += taxi.calcTotalTime();\n\t\t}\n\t\treturn time;\n\t}", "public int getEnergyTimer()\n\t{\n\t\treturn currentEnergyTimer;\n\t}", "public int getThunderTime()\n {\n return thunderTime;\n }", "public static int getTempSampleTime() {\n return tempSampleTime;\n }", "double getClientTime();", "public int getUpSeconds() {\n return (int)((_uptime % 60000) / 1000);\n }", "public int calculateTimeForDeceleration(int i) {\n return super.calculateTimeForDeceleration(i) * 4;\n }", "EDataType getSeconds();", "public double getAltRms() {\n\t\treturn 3600.0 * Math.sqrt(1000.0 * altInt / (double) (updateTimeStamp - startTime));\n\t}", "BusinessCenterTime getValuationTime();", "public static double getSecondsTime() {\n\t\treturn (TimeUtils.millis() - time) / 1000.0;\n\t}", "public double getServiceTime() {\r\n\t\treturn serviceTime.sample();\r\n\t}", "private static float timeForEvent(float simulationTime, int amountEvents) {\r\n float humAmount = (amountEvents * 2) - 1;\r\n float timeInMilli = simulationTime * 3600f;\r\n\r\n return timeInMilli / humAmount;\r\n }", "public int getMaxTime() { return _maxTime; }", "int getResponseTimeNsec();", "Expression getReaction_time_parm();", "private long determineTimestamp(DdfMarketBase m) {\n\n\t\tlong millis = millisCST;\n\n\t\tint type = getSymbolType(m.getSymbol());\n\n\t\tif ((type > 200) && (type < 300)) {\n\t\t\t// Equity, add 1 Hour\n\t\t\tmillis += 60 * 60 * 1000;\n\t\t}\n\n\t\tif (_type == MasterType.Delayed) {\n\t\t\tmillis -= m.getDelay() * 60 * 1000;\n\t\t}\n\n\t\treturn millis;\n\t}", "@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}", "public double getTime();", "public static int getHourOfTime(long time){\n \t//time-=59999;\n \tint retHour=0;\n \tlong edittime=time;\n \twhile (edittime>=60*60*1000){\n \t\tedittime=edittime-60*60*1000;\n \t\tretHour++;\n \t}\n \tretHour = retHour % 12;\n \tif (retHour==0){ retHour=12; }\n \treturn retHour;\n }", "public int getSecond() {\n return dateTime.getSecond();\n }", "public V getPrecedingValue( final double time )\n\t{\n\t\tV amount = null;\n\t\tfinal Entry< Double, V > entry = getPrecedingEntry( time );\n\t\tif( entry != null )\n\t\t{\n\t\t\tamount = entry.getElement();\n\t\t}\n\t\treturn amount;\t\n\t}", "int getQueryTimeNsec();", "public int totalTime()\n {\n return departureTime - arrivalTime;\n }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public int getHeartRate() {\n if (extraCase_ == 5) {\n return (Integer) extra_;\n }\n return 0;\n }", "public double getCost(int miles, int time) {\n\t\treturn 1.00 + (time / 30 ); \n\t}", "public void addBonusTime(int time) {\n if (time == 0) {\n System.out.println(\"No bonus time was added to the timer.\");\n printTimeRemaining();\n } else {\n System.out.println(time + \" seconds were added to the timer!\");\n time = time * 1000; //convert to milliseconds\n bonusTime += time;\n printTimeRemaining();\n }\n }", "public double nextServiceTime() {\n return (-1 / mu) * Math.log(1 - randomST.nextDouble());\n }", "float getEstimatedTime() {\n return estimated_time;\n }", "public double getStopTime();", "public double getSlowToFire();", "int getTestDuration() {\n return config.big ? TEST_TIME_SECONDS : TEST_TIME_SECONDS / 10;\n }", "public float getTimeSeconds() { return getTime()/1000f; }", "long getCurrentTimeMs();", "public int getEleMinTimeOut(){\r\n\t\t String temp=rb.getProperty(\"eleMinTimeOut\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "public int getTime() {\r\n return time;\r\n }" ]
[ "0.6561197", "0.64791715", "0.64394814", "0.6422602", "0.64141536", "0.6220639", "0.61706245", "0.61271274", "0.6117664", "0.6098455", "0.60651886", "0.6064409", "0.60522044", "0.6048652", "0.6021848", "0.5960605", "0.5960605", "0.5940122", "0.59228057", "0.591925", "0.5916525", "0.5913775", "0.59115624", "0.5889343", "0.5889253", "0.5878659", "0.58758533", "0.58717245", "0.5848977", "0.58469725", "0.5835618", "0.5831278", "0.5830061", "0.5828951", "0.5810063", "0.58099693", "0.57990587", "0.5789195", "0.5785323", "0.5778887", "0.57764065", "0.5775055", "0.5770743", "0.5770153", "0.5758658", "0.5757751", "0.5752211", "0.5747243", "0.5745658", "0.5741765", "0.573642", "0.57327497", "0.5728008", "0.57249975", "0.5719767", "0.5719166", "0.57187665", "0.57154465", "0.5714778", "0.5707259", "0.56960607", "0.56884885", "0.5677529", "0.5673457", "0.5666453", "0.56657517", "0.5665435", "0.566429", "0.56596684", "0.56596565", "0.56572545", "0.56571627", "0.5657066", "0.5654732", "0.56544137", "0.5650049", "0.56463695", "0.5641154", "0.56403357", "0.56383896", "0.56321526", "0.5623404", "0.5621744", "0.5621662", "0.5619403", "0.5612649", "0.56113124", "0.5610433", "0.56061447", "0.5605015", "0.5602031", "0.5599272", "0.55972826", "0.55951226", "0.5593434", "0.5590451", "0.5587704", "0.55866706", "0.5585931", "0.55857897" ]
0.7603975
0
Returns the node at injection point This is only used in the TTL via circulations
public String getStartNodeID() { return startNodeID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "entities.Torrent.NodeId getNode();", "entities.Torrent.NodeId getNode();", "ControllerNode localNode();", "public DEPNode getNode()\n\t{\n\t\treturn node;\n\t}", "@Override\n public Cluster.Node getNode() {\n return node;\n }", "public V getOriginator() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = predNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "Node getNode();", "OperationNode getNode();", "public UUID originatingNodeId();", "public String getNode() {\n return node;\n }", "public short getNode() {\n return node;\n }", "Node getVariable();", "public Node getNode(Reference ref, Presentation presentation);", "public Node getNode() {\n Cluster cluster = instance.getCluster();\n if (cluster != null) {\n Member member = cluster.getLocalMember();\n return new HazelcastNode(member);\n } else {\n return null;\n }\n }", "public String getNode()\n {\n return node;\n }", "public String getNode() {\n return node;\n }", "NodeInformationProvider getNodeInformationProvider();", "public Node<?> getNode() {\n return observedNode;\n }", "public Node getNode() {\r\n return channel.attr(NetworkConstants.ATTRIBUTE_NODE).get();\r\n }", "public Node getNode();", "public NodeRef getDataNode(String ip) {\r\n\t\treturn nodeMap.get(ip);\r\n\t}", "public SoNode getNodeAppliedTo() {\n \t \t return pimpl.appliedcode == SoAction.AppliedCode.NODE ? pimpl.applieddata.node : null;\n \t \t }", "@AutoEscape\n\tpublic String getNode_3();", "public String getNodeValue ();", "Term getNodeTerm();", "@java.lang.Override\n public entities.Torrent.NodeId getNode() {\n return node_ == null ? entities.Torrent.NodeId.getDefaultInstance() : node_;\n }", "@java.lang.Override\n public entities.Torrent.NodeId getNode() {\n return node_ == null ? entities.Torrent.NodeId.getDefaultInstance() : node_;\n }", "public com.google.cloud.tpu.v2alpha1.Node getNode(\n com.google.cloud.tpu.v2alpha1.GetNodeRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetNodeMethod(), getCallOptions(), request);\n }", "@AutoEscape\n\tpublic String getNode_5();", "public final IRNode getNode() {\r\n return f_node;\r\n }", "public PDGNode getPDGNode(Object cfgNode);", "entities.Torrent.NodeIdOrBuilder getNodeOrBuilder();", "entities.Torrent.NodeIdOrBuilder getNodeOrBuilder();", "public TMNode getNode() {\n return node;\n }", "public CatalogNode getNode(String node);", "TaskNode getNode(Task task);", "public String getForwardNode() {\r\n\t\ttry {\r\n\t\t\treturn path.getNextNode(procNode);\r\n\t\t} catch (Exception e) {return null; /* In case of an error!*/}\t\t\r\n\t}", "protected Node<T, V> getLocalVersionOfNode(Node<T, V> node) {\r\n\t\treturn ext2int.get(node.getPoint());\r\n\t}", "public Node getNode(String name) {\n Node result = super.getNode(name);\n\n if (result == null) {\n byte type = gateClass.getPinType(name);\n int index = gateClass.getPinNumber(name);\n if (type == CompositeGateClass.INTERNAL_PIN_TYPE)\n result = internalPins[index];\n }\n\n return result;\n }", "public Node getNode() {\n return thread;\n }", "@AutoEscape\n\tpublic String getNode_1();", "public Node getOrigin()\r\n\t{\r\n\t\treturn origin;\r\n\t}", "public Node getNode() {\n return node;\n }", "public Node getNode() {\n return node;\n }", "N getNode(int id);", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "@AutoEscape\n\tpublic String getNode_4();", "public SecurityNode getNode() {\n\t return fo;\n\t}", "Object get(Node node);", "private Node getNode(String resource)\r\n {\r\n return Node.getNode(resource);\r\n }", "public Node getNode() {\n\t\treturn null;\n\t}", "private CommunicationLink getNodeByIndex(int index)\n {\n if (allNodes.size() == 0)\n {\n return null;\n }\n try\n {\n return allNodes.get(nodeIds.get(index));\n } catch (Exception e)\n {\n return null;\n }\n }", "private static int getNodeTime(String node) {\n int offSet = 4;\n return (int) node.toCharArray()[0] - offSet;\n }", "private InetSocketAddress getRandomActiveReplica() {\n\t\treturn (InetSocketAddress) (this.getActiveReplicas().toArray()[(int) (this\n\t\t\t\t.getActiveReplicas().size() * Math.random())]);\n\t}", "NodeId getNodeId();", "public abstract Node getNode();", "public String getNode_pid() {\r\n\t\treturn node_pid;\r\n\t}", "public int Node() { return this.Node; }", "public IRLocation getLocation(IRNode node);", "Node getNode(int n) {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n\n if (n < edge.nbNode()) {\n return edge.getNode(n);\n } else {\n return edge.getEdgeVariable();\n }\n\n case OPT_BIND:\n return get(n).getNode();\n }\n return null;\n }", "public Instruction loadContextNode() {\n/* 270 */ return loadCurrentNode();\n/* */ }", "public Date getNodeInstanceStartTime() {\n\t\treturn nodeInstanceStartTime;\n\t}", "public UUID nodeId();", "public Node getExpressionOrigin() {\n return element;\n }", "public String getNodeValue(Node node) throws Exception;", "public long getNodeID()\n {\n return vnodeid; \n }", "public int getNodeID() {\n return nodeID;\n }", "public int getAD_WF_Node_ID();", "@Override\n\tpublic java.lang.String getNode_5() {\n\t\treturn _dictData.getNode_5();\n\t}", "public Node getCameFrom()\n\t{\n\t\treturn cameFrom;\n\t}", "public int getNodeID() {\r\n \t\treturn nodeID;\r\n \t}", "GraphNode firstEndpoint() \n\t{\n\t\treturn this.firstEndpoint;\n\t\t\n\t}", "RenderedOp getNode(Long id) throws RemoteException;", "public GraphNode firstEndpoint() {\n\t\t\treturn start;\n\t\t}", "public int getX(int node) {\n return xs[node];\n }", "@AutoEscape\n\tpublic String getNode_2();", "public BPM getNode() {\n return BPMNode;\n }", "@Override\n\tpublic java.lang.String getNode_3() {\n\t\treturn _dictData.getNode_3();\n\t}", "protected NNode getRandomNode() {\n\t\tArrayList<NNode> nodearr = new ArrayList<NNode>();\n\t\tnodearr.addAll(nodes.values());\n\t\treturn nodearr.get(Braincraft.randomInteger(nodearr.size()));\n\t}", "public ConnectPoint ingressCP() {\n return ingressCP;\n }", "public SupplyNode getNode(String name){\n return t.get(name);\n }", "public Member getCurrentTargetReplica() {\n return currentTargetReplicaAddress;\n }", "@objid (\"afa7354b-88c4-40d5-b8dd-215055f8955c\")\n CommunicationNode getStart();", "public int getCutPoint(){\n \tint cut = random.nextInt((NODELENGTH * 3));\n \tif (cut % 3 == 1){\n \t\treturn cut + 2;\n \t}\n \telse if (cut % 3 == 2){\n \t\treturn cut + 1;\n \t}\n \telse {\n \t\treturn cut;\n \t}\n \t\n }", "public GraphNode firstEndpoint(){\r\n return first;\r\n }", "public interface NodeAccess extends PointAccess {\n /**\n * @return the index used to retrieve turn cost information for this node, can be {@link TurnCostStorage#NO_TURN_ENTRY}\n * in case no turn costs were stored for this node\n * @throws AssertionError if, and only if, the underlying storage does not support turn costs\n */\n int getTurnCostIndex(int nodeId);\n\n /**\n * Sets the turn cost index for this node, using {@link TurnCostStorage#NO_TURN_ENTRY} means there\n * are no turn costs at this node.\n * <p>\n *\n * @throws AssertionError if, and only if, the underlying storage does not support turn costs\n */\n void setTurnCostIndex(int nodeId, int additionalValue);\n}", "public int getInDegree(int node) {\n return inDegree[node];\n }", "@Override\r\n\tpublic Node selectByIp(Node node) {\n\t\treturn getSqlSession().selectOne(\"com.seu.wsn.node.mapper.selectNodeByIp\", node);\r\n\t}", "public node_info getNode(int key)\n{\n\treturn getNodes().get(key);\n\t\n}", "@Override\n\tpublic java.lang.String getNode_1() {\n\t\treturn _dictData.getNode_1();\n\t}", "public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tpu.v2alpha1.Node>\n getNode(com.google.cloud.tpu.v2alpha1.GetNodeRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getGetNodeMethod(), getCallOptions()), request);\n }", "public int getDistanceTo(int node) {\n return this.distance[node];\n }", "public ListNode getNode(int nodeID){\n\t\treturn getNode(new ListNode(nodeID, 0));\n\t}", "public static Node getCurrentNode(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Node.class);\n }", "public short getNextNodeID() {\n\t\treturn nodeIdCounter++;\n\t}", "public String getNode_id() {\r\n\t\treturn node_id;\r\n\t}", "int getBaseNode();", "public int getOffset(ParseTree node) {\n\t\treturn this.offsets.get(node);\n\t}", "public static Image attackPoint()\n\t{\n\t\treturn attackPoint;\n\t}", "public final int getContextNode(){\n return this.getCurrentNode();\n }" ]
[ "0.5964984", "0.5964984", "0.54407763", "0.54139805", "0.5336579", "0.5331722", "0.5317463", "0.5298514", "0.5294123", "0.52858186", "0.5268091", "0.5218122", "0.5218106", "0.5171359", "0.515552", "0.51497275", "0.51353455", "0.5134313", "0.51135725", "0.5111667", "0.51014405", "0.5074282", "0.5017812", "0.50054014", "0.49911207", "0.49896967", "0.49896967", "0.49889433", "0.49735263", "0.49597353", "0.49530825", "0.49388456", "0.49388456", "0.49251467", "0.4924682", "0.49091783", "0.4907492", "0.4901695", "0.48963174", "0.48944837", "0.48854563", "0.4874949", "0.48673385", "0.48673385", "0.48613507", "0.48598602", "0.48595574", "0.48549157", "0.48441184", "0.48369244", "0.48181248", "0.48112813", "0.48064256", "0.47933456", "0.4788151", "0.47755766", "0.47724864", "0.47713155", "0.47693852", "0.4766894", "0.47590652", "0.47518066", "0.47476646", "0.47318074", "0.47282642", "0.47266242", "0.47129023", "0.47083542", "0.4702122", "0.47007838", "0.4700565", "0.4692502", "0.46892777", "0.46860456", "0.46824837", "0.4682291", "0.46745494", "0.46742234", "0.46728832", "0.4669097", "0.4658098", "0.46532455", "0.4649888", "0.46487096", "0.4642647", "0.4640832", "0.4636943", "0.4634034", "0.46232143", "0.46227813", "0.4619552", "0.4612469", "0.46046194", "0.45998695", "0.45955944", "0.45954517", "0.4594426", "0.4590837", "0.4586207", "0.45770958" ]
0.47719187
57
Increments the pass counter whenever a token is passed from node to node
public void setPassCounter() { passCounter++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void passToken(String token, int procNo){\r\n if(procNo>6) {\r\n \tprocNo = procNo - 6;\r\n }\r\n try {\r\n socket = new Socket(\"127.0.0.1\", 8080+procNo);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n } catch(Exception ex) {\r\n \tpassToken(token, procNo+1); // send it to next next if the next one was unavailable\r\n }\r\n }", "public void counter(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n addlink(tp);\n }\n }", "void token(TokenNode node);", "void tokenchange();", "public void setToken(int value){token = value;}", "public int getPassCounter()\r\n {\r\n return passCounter;\r\n }", "public void tokenArrived(Object token)\n {\n }", "public void saveToken(String token, long passTime) {\n }", "public void addTokens(int amount) {\n \tnumTokens += amount;\n }", "@Test\r\n\tpublic void testProcessPass2()\r\n\t{\r\n\t\tToken t1 = new Token(TokenTypes.EXP4.name(), 1, null);\r\n\t\tt1.setType(\"INT\");\r\n\t\tToken t2 = new Token(TokenTypes.OP4.name(), 1, null);\r\n\t\tToken t3 = new Token(TokenTypes.EXP5.name(), 1, null);\r\n\t\tt3.setType(\"INT\");\r\n\t\tArrayList<Token> tkns = new ArrayList<Token>();\r\n\t\ttkns.add(t1);\r\n\t\ttkns.add(t2);\t\t\t\r\n\t\ttkns.add(t3);\r\n\t\t\r\n\t\tToken t4 = new Token(TokenTypes.EXP4.name(), 1, tkns);\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tToken.pass2(t4);\r\n\t\t} catch (ProcessException x)\r\n\t\t{\r\n\t\t\tfail(\"Failed on type check\");\r\n\t\t}\r\n\t}", "public void UpNumberOfVisitedNodes() {\n NumberOfVisitedNodes++;\n }", "@Override\r\n\tpublic boolean incrementToken() throws IOException {\n\t\treturn false;\r\n\t}", "public void runPass(Pass pass) { pass.run(this); }", "public void runPass(Pass pass) { pass.run(this); }", "protected void updateTokens(){}", "private void processTokenHelper(int tokenLength) {\n if (tokenSizes.containsKey(tokenLength)) {\n int tokenLengthReps = tokenSizes.get(tokenLength);\n tokenSizes.put(tokenLength, ++tokenLengthReps);\n } else {\n tokenSizes.put(tokenLength, 1);\n }\n }", "public void setToken(java.lang.String param){\n localTokenTracker = true;\n \n this.localToken=param;\n \n\n }", "int getTokenStart();", "private void updateTokenCount() {\n // add new tokens based on elapsed time\n int now = service.elapsedMillis();\n int timeElapsed = now - lastTokenTime;\n if (timeElapsed >= tokenPeriodMs) {\n numTokens += timeElapsed / tokenPeriodMs;\n lastTokenTime = now - timeElapsed % tokenPeriodMs;\n }\n }", "public void alg_PASSTOKEN(){\nTokenOut.value=true;\nSystem.out.println(\"pass\");\n\n}", "public void processToken(String token) {\n currentTokenLocation++;\n if (foundLocations.containsKey(token)) {\n List<Integer> list = foundLocations.get(token);\n list.add(currentTokenLocation);\n } \n }", "void visit(AuthToken authToken);", "public void setNoOfPass(Integer noOfPass) {\n\t\tthis.noOfPass = noOfPass;\n\t}", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "long tokenCount();", "@Override\r\n public void visit(Temp n, Graph argu) {\r\n /* Can only be Call() -> Temp(), so Temp is to be used */\r\n cur.addUse(Integer.parseInt(n.f1.f0.tokenImage)); // Temp is used\r\n }", "@Test\r\n\tpublic void testProcessPass1Other()\r\n\t{\r\n\t\tToken t3 = new Token(TokenTypes.EXP5.name(), 1, null);\r\n\t\tt3.setType(\"INT\");\r\n\t\tArrayList<Token> tkns = new ArrayList<Token>();\t\t\t\r\n\t\ttkns.add(t3);\r\n\t\t\r\n\t\tToken t4 = new Token(TokenTypes.EXP4.name(), 1, tkns);\r\n\t\tClass c1 = new Class(\"ClassName\", null, null);\r\n\t\tPublicMethod pm = new PublicMethod(\"MethodName\", null, VariableType.BOOLEAN, null);\r\n\t\tt4.setParentMethod(pm);\r\n\t\tt4.setParentClass(c1);\r\n\r\n\t\tToken.pass1(t4);\r\n\t\t\r\n\t\tfor(int i = 0; i < t4.getChildren().size(); i++){\r\n\t\t\tToken child = t4.getChildren().get(i);\r\n\t\t\t\r\n\t\t\tassertEquals(child.getParentClass().getName(), t4.getParentClass().getName());\r\n\t\t\tassertEquals(child.getParentMethod(), t4.getParentMethod());\r\n\t\t}\r\n\t\t\r\n\t\tassertEquals(t4.getType(), \"INT\");\r\n\t}", "Token next();", "public void visit(int i) {\r\n visited[i] = visitedToken;\r\n }", "public final void incNodeCount() {\n nodeCount++;\n if (depth > maxDepth) {\n maxDepth = depth;\n }\n }", "public void markAllNodesAsUnvisited() {\r\n visitedToken++;\r\n }", "public void enterPass(String pass){\n actionsWithOurElements.enterTextInToElement(inputPass, pass);\n }", "@Test\r\n\tpublic void testProcessPass3()\r\n\t{\t\t\r\n\t\tToken t1 = new Token(TokenTypes.EXP4.name(), 1, null);\r\n\t\tToken t2 = new Token(TokenTypes.OP4.name(), 1, null);\r\n\t\tToken t3 = new Token(TokenTypes.EXP5.name(), 1, null);\r\n\t\tArrayList<Token> tkns = new ArrayList<Token>();\r\n\t\ttkns.add(t1);\r\n\t\ttkns.add(t2);\t\t\t\r\n\t\ttkns.add(t3);\r\n\t\t\r\n\t\tToken t4 = new Token(TokenTypes.EXP4.name(), 1, tkns);\r\n\r\n\t\tToken.pass3(t4);\r\n\t\t\r\n\t\tassertEquals(t4.getCode().toString(), \"OP4.getOperater(), EXP4_B.getValue() ,EXP5.getValue() , EXP4_A.setValue(result)\");\r\n\t\t\r\n\t}", "@Test\r\n\tpublic void testProcessPass1()\r\n\t{\r\n\t\tToken t1 = new Token(TokenTypes.EXP4.name(), 1, null);\r\n\t\tToken t2 = new Token(TokenTypes.OP4.name(), 1, null);\r\n\t\tToken t3 = new Token(TokenTypes.EXP5.name(), 1, null);\r\n\t\tt3.setType(\"INT\");\r\n\t\tArrayList<Token> tkns = new ArrayList<Token>();\r\n\t\ttkns.add(t1);\r\n\t\ttkns.add(t2);\t\t\t\r\n\t\ttkns.add(t3);\r\n\t\t\r\n\t\tToken t4 = new Token(TokenTypes.EXP4.name(), 1, tkns);\r\n\t\tClass c1 = new Class(\"ClassName\", null, null);\r\n\t\tPublicMethod pm = new PublicMethod(\"MethodName\", null, VariableType.BOOLEAN, null);\r\n\t\tt4.setParentMethod(pm);\r\n\t\tt4.setParentClass(c1);\r\n\r\n\t\tToken.pass1(t4);\r\n\t\t\r\n\t\tfor(int i = 0; i < t4.getChildren().size(); i++){\r\n\t\t\tToken child = t4.getChildren().get(i);\r\n\t\t\t\r\n\t\t\tassertEquals(child.getParentClass().getName(), t4.getParentClass().getName());\r\n\t\t\tassertEquals(child.getParentMethod(), t4.getParentMethod());\r\n\t\t}\r\n\t\t\r\n\t\tassertEquals(t4.getType(), \"INT\");\r\n\t}", "public void distributeCurrentPlayerTokens() {\n\t\t// implemented in part (b)\n\t}", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "void incrementAccessCounterForSession();", "public void incrTurn(){\n this.turn++;\n }", "void incCount() {\n ++refCount;\n }", "public Integer getNoOfPass() {\n\t\treturn noOfPass;\n\t}", "public void incrementPacketNumber()\n {\n nextPacketNumber++;\n }", "public void setToken(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTokenTracker = true;\r\n } else {\r\n localTokenTracker = false;\r\n \r\n }\r\n \r\n this.localToken=param;\r\n \r\n\r\n }", "void onTokenPlayed(TokenLocation location);", "public Token(I2PAppContext ctx) {\n super(null);\n byte[] data = new byte[MY_TOK_LEN];\n ctx.random().nextBytes(data);\n setData(data);\n setValid(MY_TOK_LEN);\n lastSeen = ctx.clock().now();\n }", "public void allocateToken(int tokenNum) {\n inflightingRPCCounter.addAndGet(tokenNum);\n lastUpdateTs = System.currentTimeMillis();\n }", "@Override\n public String visit(PassArgStmt n) {\n // 直接将参数保存到下一个栈帧\n // PASSARG 起始1\n int offset = Integer.parseInt(n.f1.f0.tokenImage);\n String r1 = this.reg[n.f2.f0.which];\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 2) * 4)\n + \"($sp)\\n\";\n return null;\n }", "public TokenPa (int playerCount) {\n\t\t// implemented in part (a)\n\t}", "public void addNumOfActionTaken() {\n this.numOfActionTaken++;\n }", "public static void countTokens(Scanner in) {\n }", "void incrementAccessCounter();", "@Override\n public final boolean incrementToken() throws IOException {\n clearAttributes();\n return matcher.yylex() != matcher.getYYEOF();\n }", "public void incrementRefusals() {\n\t}", "private void verifyAlive(int coordID, int procID, int electedID, String token) {\r\n\tSystem.out.println(\"so im here now\" + coordID);\r\n\t\tlong time = 3000;\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(procID>6) {\r\n \tprocID = procID - 6;\r\n }\r\n try {\r\n socket = new Socket(\"127.0.0.1\", 8080+procID);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n //ring.currentAlive = electedID;\r\n } catch(Exception ex) {\r\n \tverifyAlive(coordID, procID+1, electedID, token); // pass to next next if next was unavailable\r\n }\r\n\t//}\r\n}", "public void runEvent(Trainer t){\n\t\tt.addToken(token);\r\n\t}", "@Override\r\n public void visit(BinOp n, Graph argu) {\r\n cur.addUse(Integer.parseInt(n.f1.f1.f0.tokenImage)); // Temp is used\r\n n.f2.accept(this, argu);\r\n }", "int getTokenFinish();", "public Go(GoTokenManager tm) {\n token_source = tm;\n token = new Token();\n token.next = jj_nt = token_source.getNextToken();\n jj_gen = 0;\n for (int i = 0; i < 43; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public void countdown(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n rmlink(tp);\n }\n }", "public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}", "public void putToken(Token token)throws Exception;", "public void incrRefCounter() {\n\t\tthis.refCounter++;\n\t}", "@Override\n public boolean incrementToken() throws IOException {\n while (!exhausted && input.incrementToken()) {\n State current = captureState();\n\n if (previous != null && !isGramType()) {\n restoreState(previous);\n previous = current;\n previousType = typeAttribute.type();\n\n if (isGramType()) {\n posIncAttribute.setPositionIncrement(1);\n // We must set this back to 1 (from e.g. 2 or higher) otherwise the token graph is\n // disconnected:\n posLengthAttribute.setPositionLength(1);\n }\n return true;\n }\n\n previous = current;\n }\n\n exhausted = true;\n\n if (previous == null || GRAM_TYPE.equals(previousType)) {\n return false;\n }\n\n restoreState(previous);\n previous = null;\n\n if (isGramType()) {\n posIncAttribute.setPositionIncrement(1);\n // We must set this back to 1 (from e.g. 2 or higher) otherwise the token graph is\n // disconnected:\n posLengthAttribute.setPositionLength(1);\n }\n return true;\n }", "public abstract void storeToken(String token, int treeDepth) throws IOException;", "protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }", "public void setNumTokens(int numTokens){\n this.numTokens = numTokens;\n }", "public void incrementSuccessfulTrades() {\n successfulTrades++;\n }", "@Test(expected=ProcessException.class)\r\n\tpublic void testProcessPass2Fail() throws ProcessException\r\n\t{\r\n\t\tToken t1 = new Token(TokenTypes.EXP4.name(), 1, null);\r\n\t\tt1.setType(\"INT\");\r\n\t\tToken t2 = new Token(TokenTypes.OP4.name(), 1, null);\r\n\t\tToken t3 = new Token(TokenTypes.EXP5.name(), 1, null);\r\n\t\tt3.setType(\"CHAR\");\r\n\t\tArrayList<Token> tkns = new ArrayList<Token>();\r\n\t\ttkns.add(t1);\r\n\t\ttkns.add(t2);\t\t\t\r\n\t\ttkns.add(t3);\r\n\t\t\r\n\t\tToken t4 = new Token(TokenTypes.EXP4.name(), 1, tkns);\r\n\r\n\t\tToken.pass2(t4);\r\n\r\n\t}", "private Object magicVisit(ParseTree ctx, Node<TokenAttributes> CST_node) {\n current_node = CST_node;\n Object result = visit(ctx);\n current_node = CST_node;\n return result;\n }", "public void increaseNonce() {\n this.index++;\n }", "static void visit (Node node, int[] lev, Node[] list) {\n\t\t\n\t}", "private static void increaseReference(Counter counter) {\n counter.advance(1);\n }", "void passivateFlowStorer();", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "public static void addPassengers(ActorRef checkPoint, int num){\n\t\tfor(int i=0; i<num; i++){\n\t\t\tcount++;\n\t\t\tcheckPoint.tell(new PassengerEnters(count));\n\t\t}\t\t\t\n\t}", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n StringTokenizer tokenizer = new StringTokenizer(value.toString());\n while (tokenizer.hasMoreTokens()) {\n String word = tokenizer.nextToken();\n if (buffer.containsKey(word)) {\n buffer.put(word, buffer.get(word) + 1);\n } else {\n buffer.put(word, 1);\n }\n }\n }", "public short getNextNodeID() {\n\t\treturn nodeIdCounter++;\n\t}", "int nextState (int state, char c) {\r\n\tif (state < tokLen && c == tok.charAt(state)) {\r\n\t return (state+1) ;\r\n\t} else return tokLen+1 ;\r\n }", "public synchronized void incrementNumSent(){\n numSent++;\n }", "public void incrementD_CurrentNumberOfTurns() {\n d_CurrentNumberOfTurns++;\n }", "private void updateToken() throws IOException\n\t{\n\t\ttheCurrentToken = theNextToken;\n\t\ttheNextToken = theScanner.GetToken();\n\t}", "public void processToken(String token) {\n\n distinctTokens.add(token);\n\n }", "@Override\n public void transferred(long num) {\n }", "@Override\n public void transferred(long num) {\n }", "public void alg_REQ(){\nSystem.out.println(\"3LastTokenIn, TokenIn, TokenOut:\" + lastTokenIn.value + TokenIn.value + TokenOut.value);\n\nif(lastTokenIn.value) {\nif (TokenChanged.value) {\n if (!PERequest.value) {\n Block.value = false;\n TokenOut.value = false;\n System.out.println(\"Conv 3: I just got token, request is coming let bag go and keep token\");\n } else {\n Block.value = false;\n TokenOut.value = true;\n System.out.println(\"Conv 3: I just got token, no request so run conveyer but let token go\");\n }\n} else {\n if (!PERequest.value) {\n System.out.println(\"Conv 3: I had token for a while, request here and bag passed eye, keep running conv and keep token\");\n Block.value = false;\n TokenOut.value = false;\n } else {\n if (PEExit.value) {\n Block.value = false;\n TokenOut.value = true;\n System.out.println(\"Conv 3: I had token for a while, no requests and bag passed eye, let token go\");\n } else {\n Block.value = false;\n TokenOut.value = false;\n System.out.println(\"Conv 3: I have token, no requests and bag not passed eye yet, keep token\");\n }\n }\n}\n}\n\nelse {\n if (!PERequest.value) {\n Block.value = true;\nTokenOut.value = true;\n System.out.println(\"Conv 3: No token, rquest here. Wait\");\n }\nelse {\nBlock.value = false;\nTokenOut.value = false;\nSystem.out.println(\"Conv 3: No token no request\");\n}\n}\n\nif(lastTokenIn.value != TokenIn.value) {\n TokenChanged.value = true;\n}\nelse {\n TokenChanged.value = false;\n}\nlastTokenIn.value = TokenIn.value;\n\n}", "public void incCounter()\n {\n counter++;\n }", "private void clearTokens(){\n Login.gramateia_counter = false; \n }", "public LEParser(LEParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 5; i++) jj_la1[i] = -1;\n }", "@Override\n public R visit(BaseDecl n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n return _ret;\n }", "@Override\r\n public void nodeActivity() {\n }", "public AstParser(AstParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 9; i++) jj_la1[i] = -1;\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tcounter.accumulate(1);\n\t\t\t\t}", "private void doRule11(DescartesToken token) {\n this.addChild(2, token.getLineNum());\n this.addChild(40, token.getLineNum());\n this.addChild(3, token.getLineNum());\n this.addChild(31, token.getLineNum());\n this.addChild(41, token.getLineNum());\n }", "public void incCounter(){\n counter++;\n }", "public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }", "private void moveToken() {\n Player player = this.mPlayers[1];\n Token[] tokens = player.tokens;\n BoardField startBases = this.mBoardLevel.getStartingFields()[1];\n\n if (mRedToken == null) {\n // add token to the start position\n\n Point startLocation = startBases.getLocation();\n Vector2 startTokenLocation = this.mBoardLevel.getCenterOfLocation(startLocation.getX(),\n startLocation.getY());\n this.mRedToken = new Token(PlayerType.RED, this.mResources.getToken(PlayerType.RED));\n this.mRedToken.currLocation = startLocation;\n this.mRedToken.setPosition(startTokenLocation.x, startTokenLocation.y);\n this.mStage.addActor(this.mRedToken);\n }\n else {\n Point currLocation = mRedToken.currLocation;\n BoardField boardField = this.mBoardLevel.board[currLocation.getX()][currLocation.getY()];\n Point nextLocation = boardField.getNextLocation();\n Vector2 updatedTokenLocation = this.mBoardLevel.getCenterOfLocation(nextLocation.getX(),\n nextLocation.getY());\n this.mRedToken.currLocation = nextLocation;\n this.mRedToken.setPosition(updatedTokenLocation.x, updatedTokenLocation.y);\n }\n }", "public void incrementOutDegree() {\n\t\tthis.outDegree++;\n\t}", "protected void addCurrentTokenToParseTree() {\n\t\tif (guessing>0) {\n\t\t\treturn;\n\t\t}\n\t\tParseTreeRule root = (ParseTreeRule)currentParseTreeRoot.peek();\n\t\tParseTreeToken tokenNode = null;\n\t\tif ( LA(1)==Token.EOF_TYPE ) {\n\t\t\ttokenNode = new ParseTreeToken(new org.netbeans.modules.cnd.antlr.CommonToken(\"EOF\"));\n\t\t}\n\t\telse {\n\t\t\ttokenNode = new ParseTreeToken(LT(1));\n\t\t}\n\t\troot.addChild(tokenNode);\n\t}", "@Override\n\tpublic void postProcess(NodeCT node) {\n\t}", "public void incrementFrameNumber()\n {\n\tframeNumber++;\n }" ]
[ "0.5922855", "0.5876679", "0.57884216", "0.5760443", "0.574912", "0.57089823", "0.5675831", "0.5625591", "0.5568372", "0.54981434", "0.5461055", "0.54304135", "0.5402358", "0.5402358", "0.53995466", "0.5374876", "0.5367993", "0.536448", "0.535964", "0.5330433", "0.53235215", "0.53161436", "0.5249746", "0.5233661", "0.522867", "0.5211819", "0.5192796", "0.5192791", "0.51484114", "0.50716543", "0.50714165", "0.5056133", "0.5049566", "0.5045024", "0.49806702", "0.49682146", "0.49623305", "0.49590874", "0.49508542", "0.4944213", "0.4919417", "0.491668", "0.49039528", "0.48922262", "0.48907387", "0.48888937", "0.48831758", "0.48720053", "0.48631454", "0.48600084", "0.4853714", "0.48508552", "0.4847221", "0.4845146", "0.48368838", "0.48354176", "0.48349896", "0.4833443", "0.48330653", "0.4832824", "0.48284683", "0.48228598", "0.48187953", "0.4817157", "0.48085526", "0.48017395", "0.48007807", "0.47956452", "0.47893265", "0.47752127", "0.47739595", "0.47733092", "0.47533536", "0.47511193", "0.47422105", "0.4741564", "0.47376305", "0.47295305", "0.47257453", "0.47235146", "0.47164217", "0.4711497", "0.4706571", "0.4706571", "0.4705184", "0.4695003", "0.46892965", "0.46842206", "0.46798617", "0.46771914", "0.4673125", "0.46719176", "0.46711126", "0.46703422", "0.46647462", "0.46606126", "0.4653924", "0.46498916", "0.46488708", "0.4642192" ]
0.6897803
0
Returns the total number of passes between nodes This is printed as diagnostic output and also used to calculate the TTL via hops for token expiry.
public int getPassCounter() { return passCounter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTotalNodeCount() {\n return this.node.getFullNodeList().values().stream()\n .filter(BaseNode::checkIfConsensusNode).count();\n }", "int totalNumberOfNodes();", "public String getNumberOfNodesEvaluated(){return Integer.toString(NumberOfVisitedNodes);}", "public int getPasses() {\n return passes;\n }", "public long totalTime() {\n\t\tlong ret = 0;\n\t\tfor (Task l : plan) {\n\t\t\tret += l.getTaskLength();\n\t\t}\n\n\t\treturn ret;\n\t}", "public int getNumberOfNodesEvaluated();", "public Integer getNoOfPass() {\n\t\treturn noOfPass;\n\t}", "public int totalNumNodes () { throw new RuntimeException(); }", "public int getTotalPassengers() {\n return totalPassengers;\n }", "protected double Hops() {\r\n\t\tint hops = 0;\r\n\t\tIterator<Flow> f = this.flows.iterator();\r\n\t\twhile (f.hasNext()) {\r\n\t\t\thops += f.next().getLinks().size();\r\n\t\t}\r\n\t\treturn hops;\r\n\t}", "public int getTotalTravelTime() {\n return totalTravelTime;\n }", "public int getDepartedPassengerCount() {\n\t\tint total = 0;\n\t\tfor (Taxi taxi : taxis) {\n\t\t\ttotal += taxi.getTotalNrOfPassengers();\n\t\t}\n\t\treturn total;\n\t}", "int getNodesCount();", "int getNodesCount();", "public Long getTotal_latency() {\n return total_latency;\n }", "int getNodeCount();", "int getNodeCount();", "long getTTL();", "public int getCycles();", "int getTotalNumOfNodes() {\n\t\treturn adjList.size();\n\t}", "public int getTotalVisited(){\n return this.getSea().countVisited();\n }", "public String getTotal_latency() {\n return total_latency;\n }", "public static int getRulesPassed(){\r\n\t\treturn rulesPassed;\r\n\t}", "int getMetricCostsCount();", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int getTTL()\r\n {\r\n return TTL;\r\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "public int length(){\r\n int counter = 0;\r\n ListNode c = head;\r\n while(c != null){\r\n c = c.getLink();\r\n counter++;\r\n }\r\n return counter;\r\n }", "public int countNodes(){\r\n \treturn count(root);\r\n }", "public int totalTime() {\n int time = 0;\n for (List l : lists.getList()) time += l.obtainTotalTime();\n return time;\n }", "public int getTotalRouteCost() {\n return totalRouteCost;\n }", "@Override\n public int getNumberOfNodesEvaluated() {\n int result = evaluatedNodes;\n evaluatedNodes = 0;\n return result;\n }", "public int totalNodes(Node<T> n)\n\t{\n\t\tif (n == null) \n return 0; \n else \n { \n \t\n int lTotal = totalNodes(n.left); \n int rTotal = totalNodes(n.right); \n \n return (lTotal + rTotal + 1); \n \n \n \n } \n\t}", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "private void getNodesCount(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int countNodes = SimApi.getNodesCount();\n response.getWriter().write(Integer.toString(countNodes));\n }", "public long getAllContextNodeCount();", "long getTotalServerSocketsCount();", "public long getContextNodeCount();", "public int getNumberOfNodesEvaluated() {\r\n\t\treturn this.evaluatedNodes;\r\n\t}", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}", "public double getFaultyNodeCount() {\n return (this.getTotalNodeCount() - 1)/3;\n }", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "int getPeerCount();", "int getPeersCount();", "Integer getTotalStepCount();", "public int countNodes() {\n\t\t\n\t\tif(isEmpty()==false){\n\t\t\tint count =1;\n\t\t\tDoubleNode temp=head;\n\t\t\twhile(temp.getNext()!=null){\n\t\t\t\tcount++;\n\t\t\t\ttemp=temp.getNext();\n\t\t}\n\t\treturn count;\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t}", "public BigDecimal getTotalLatency() {\n return totalLatency;\n }", "public int getSpace(){\n // iterate through nodes\n int totalSpace = 0;\n Collection<SupplyNode> nodeCol = t.values();\n Iterator<SupplyNode> it = nodeCol.iterator();\n \n // multiply resource count by resource space\n while (it.hasNext()){\n SupplyNode s = it.next();\n totalSpace += (s.getCurrent()*s.getResource().getCost());\n }\n \n // return\n return totalSpace;\n }", "public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }", "public int length(){\n\t\tint length = 0;\n\t\tListNode temp = firstNode;\n\t\twhile(temp!=null){\n\t\t\tlength++;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn length;\n\t}", "@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}", "public double length() {\n if (first.p == null) return 0;\n double distance = 0.0;\n Node n = first;\n Node n2 = first.next;\n while (!n.next.equals(first)) {\n distance += n.p.distanceTo(n2.p);\n n = n.next;\n n2 = n2.next;\n }\n distance += n.p.distanceTo(n2.p);\n return distance;\n }", "long getTotalAcceptCount();", "public int totalTime()\n {\n return departureTime - arrivalTime;\n }", "public int getTotalTime();", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "public int getNodeCount() {\n return nodeCount;\n }", "public int getTransitionLatency() {\n\t\t\tif (mTransitionLatency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + TRANSITION_LATENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmTransitionLatency = value;\t\t\t\n\t\t\t}\n\t\t\treturn mTransitionLatency;\n\t\t}", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "private long nodesLength(Edge[] E) {\n\t\tlong nodesLength = 0;\n\t\tfor (Edge e:E ) {\n\t\t\tif (e.getTo() > nodesLength) nodesLength = e.getTo();\n\t\t\tif (e.getFrom() > nodesLength) nodesLength = e.getFrom();\n\t\t}\n\t\tnodesLength++;\t\n\t\treturn nodesLength;\t\t\n\t}", "public static int getNumberOfNodes() {\n return(numberOfNodes);\n\t }", "int getTotalLeased();", "public int getDegree() {\n return this.customers.size() + this.peers.size() + this.providers.size();\n }", "public int nodesCount() {\n return nodes.size();\n }", "int nodeCount();", "@Override\n public int edgeCount() {\n int count = 0;\n\n for(MyNode n : graphNodes.values()){\n count += n.inDegree();\n }\n\n return count;\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "public int getTTL() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getTTL() \");\n Via via=(Via)sipHeader;\n return via.getTTL();\n }", "int getNodeStatusListCount();", "public int getTtl() {\n return ttl;\n }", "public int getTotalPoints() {\n \tint total = 0;\n \tfor (int i = 0; i < assignments.size(); i++) {\n \t\ttotal += assignments.get(i).getWorth();\n \t}\n \treturn total;\n }", "public Integer getFreeTimes() {\r\n return freeTimes;\r\n }", "public int getTotalRunTime() {\n return totalRunTime;\n }", "private int getTotalTestCase() {\n\t\treturn passedtests.size() + failedtests.size() + skippedtests.size();\n\t}", "public int LengthTab(NodesVector nvector) {\n\t\tint L = 0;\n\t\tNodes nodes;\n\n\t\tfor (int i = 1; i < nvector.size(); i++) {\n\t\t\tnodes = (Nodes) nvector.elementAt(i);\n\t\t\tL = (L + nodes.path.size()) - 1;\n\t\t}\n\n\t\treturn (((L + NbPipes) * NbDiam) + NbNodes) - 1 + (NbDiam * NbPipes);\n\t}", "int getTotalCreatedConnections();", "public int getTotalDust() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getDustByWins());\n }", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "public int getNumTrials() \n {\n return cumulativeTrials; \n }", "public int recCount(TriLinkNode curNode)\r\n {\r\n int answer= 0;\r\n if(curNode.i1==true&&curNode.d1==false)\r\n {\r\n answer+=1;\r\n }\r\n if(curNode.i2==true&&curNode.d2==false)\r\n {\r\n answer+=1;\r\n }\r\n if(curNode.left!=null)\r\n {\r\n answer+=recCount(curNode.left);\r\n }\r\n if(curNode.down!=null)\r\n {\r\n answer+=recCount(curNode.down);\r\n }\r\n if(curNode.right!=null)\r\n {\r\n answer+=recCount(curNode.right);\r\n }\r\n return answer;\r\n }", "private long getChampNodeCount(Node series) {\n\t\tNode chrom = getSolutionChrom(series);\n\t\tif (chrom != null) {\n\t\t\tNode attribute = chrom.getFirstChild();\n\t\t\twhile (attribute != null) {\n\t\t\t\tif (attribute.getNodeName().equals(NODE_COUNT_TAG)) {\n\t\t\t\t\treturn Util.getLong(attribute);\n\t\t\t\t}\n\t\t\t\tattribute = attribute.getNextSibling();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "@Override\n public double computeLikeliness(Node node1, Node node12) {\n return 0;\n }", "public int getTransmissionCount(){\n return networkTransmitCount + 1;\n }", "@Override\r\n\tpublic int getNumberOfSymmetricLinks()\r\n\t{\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tint symLinksSum = 0;\r\n\r\n\t\t// this can be done still more efficiently if i put the nodes in a list\r\n\t\t// and remove from the\r\n\t\t// list current node as well as its children after each loop\r\n\t\t// int progress = 0;\r\n\t\t// int max = vertices.size();\r\n\r\n\t\tfor (Entity source : vertices) {\r\n\t\t\t// ApiUtilities.printProgressInfo(progress, max, 100,\r\n\t\t\t// ApiUtilities.ProgressInfoMode.TEXT, \"Counting symmetric links\");\r\n\t\t\tfor (Entity target : getChildren(source)) {\r\n\t\t\t\t// progress++;\r\n\r\n\t\t\t\tif (isSymmetricLink(source, target)) {\r\n\t\t\t\t\tsymLinksSum++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn symLinksSum / 2;\r\n\t}", "public long getTotalPlanningTime() \n\t{\n\t\t// compute total planning time \n\t\tlong total = 0;\n\t\tfor (Long time : this.planningAttempts) {\n\t\t\ttotal += time;\n\t\t}\n\t\t\n\t\t// get total planning time\n\t\treturn total;\n\t}", "int getTransitFlightsCount();", "public int countNodes()\r\n {\r\n return countNodes(root);\r\n }", "public long getTimeTaken();", "public int getNodeCount() {\n return node_.size();\n }", "synchronized public int getSize() {\n\t\tint x = 0;\n\t\tfor (Enumeration<PeerNode> e = peersLRU.elements(); e.hasMoreElements();) {\n\t\t\tPeerNode pn = e.nextElement();\n\t\t\tif(!pn.isUnroutableOlderVersion()) x++;\n\t\t}\n\t\treturn x;\n\t}", "public int getTotalVariables() ;", "int getTotalLength() {\n synchronized (lock) {\n return cache.getTotalLength();\n }\n }", "public long getTotalSpace(){\n return totalSpace;\n }", "public int getFlowCost()\n\t{\n\t\tint result = 0;\n\t\t\n\t\tfor (Node v : this.getNodes())\n\t\t for (Edge e : v.getOutgoingEdges())\n\t\t\tresult += (e.getFlow() * e.getCost());\n\t\t\n\t\treturn result;\n\t}", "public int getTotalDistance() {\n return totalDistance;\n }", "int getCertificatesCount();", "int getCertificatesCount();", "public long getNumInstructions();" ]
[ "0.62789494", "0.61808294", "0.61727494", "0.616587", "0.58596677", "0.5845657", "0.5813038", "0.5812088", "0.57468057", "0.56957006", "0.56791395", "0.56583786", "0.5638335", "0.5638335", "0.5586043", "0.55809146", "0.55809146", "0.5574243", "0.55686045", "0.5565908", "0.5559625", "0.5555898", "0.5537518", "0.5530926", "0.5482726", "0.5477474", "0.5466101", "0.5450832", "0.5432619", "0.5424357", "0.5420763", "0.54178464", "0.53975224", "0.53732896", "0.5373164", "0.5369806", "0.5363399", "0.53560996", "0.5343896", "0.5336312", "0.5327824", "0.5327652", "0.5301518", "0.53003675", "0.52900743", "0.5280258", "0.5276656", "0.52715874", "0.5256839", "0.52554363", "0.52478725", "0.5241855", "0.5240385", "0.522802", "0.52072036", "0.52027774", "0.52027667", "0.52021575", "0.5195862", "0.5195687", "0.5189626", "0.5186216", "0.5174252", "0.5171748", "0.5168673", "0.51663244", "0.5162695", "0.5162212", "0.5162212", "0.5156847", "0.5149519", "0.5145287", "0.51284707", "0.51250756", "0.5119489", "0.5107413", "0.51042503", "0.50987685", "0.5094142", "0.508442", "0.50789356", "0.5076476", "0.50752753", "0.5073235", "0.5067499", "0.50649714", "0.5060271", "0.50598645", "0.5058594", "0.5051706", "0.5043117", "0.50318784", "0.5026016", "0.50183064", "0.5017482", "0.5012893", "0.50128216", "0.50072014", "0.50072014", "0.49969828" ]
0.5445222
28
Returns the Time To Live of the token
public int getTTL() { return TTL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimeToLive() {\n return timeToLive;\n }", "Duration getTokenExpiredIn();", "@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}", "public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }", "public long getTokenValidityInSecondsForRememberMe() {\n return tokenValidityInSecondsForRememberMe;\n }", "public String getTimeToLiveSeconds() {\n return timeToLiveSeconds+\"\";\n }", "public Date getTokenReceived() {\n return tokenReceived;\n }", "long getExpiration();", "public long getTokenExpirationInMillis() {\n return tokenExpirationInMillis;\n }", "public long getTtl() {\n return ttl_;\n }", "public long getTtl() {\n return ttl_;\n }", "public int getExpiryTime() {\n return expiryTime;\n }", "public int getTimeToLive() {\n\t\treturn deathsTillForget;\n\t}", "long getRetrievedTime();", "public Double tokenRefreshExtensionHours() {\n return this.tokenRefreshExtensionHours;\n }", "public int getTtl() {\n return ttl;\n }", "public long getExpiration() {\n return expiration;\n }", "public Long getExpireTime() {\n\t\treturn expireTime;\n\t}", "int getExpiryTimeSecs();", "int getSignOnTime();", "long getExpiryTime() {\n return expiryTime;\n }", "public long getExpiryTime()\n {\n return m_metaInf.getExpiryTime();\n }", "public int getExpiry();", "long getCurrentTimeMs();", "public int getLifeTime() {\n return lifeTime;\n }", "int getSignOffTime();", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public Integer getTtl() {\n return ttl;\n }", "int getExpireTimeout();", "public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }", "public String getExpireTime() {\n return this.ExpireTime;\n }", "public long getExpiry() {\n return this.contextSet.getExpiration();\n }", "public long getExpiry() {\n return this.expiry;\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "public int getTimeOfSession();", "public Long getExpires_in() {\r\n\t\treturn expires_in;\r\n\t}", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "Optional<Instant> getTokenInvalidationTimestamp();", "public long getExpiresIn() {\n return expiresIn;\n }", "public void setTimeToLive(long value) {\n this.timeToLive = value;\n }", "public long getTime();", "public long getEventTime();", "public boolean checkTokenExpiry() {\n //System.out.println(\"Checking token expiry...\");\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(currentAccessToken);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n //System.out.println(\"Now is \"+nowTime);\n //System.out.println(\"Expires at \"+expires);\n //System.out.println(\"Expired? \"+(nowTime >= expires));\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }", "long getExpirationDate();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "public long getExpirationTime()\n {\n return this.m_eventExpirationTime;\n }", "public Date getExpireTime() {\n\t\treturn expireTime;\n\t}", "public int getSessionMaxAliveTime();", "public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}", "public int getSessionExpireRate();", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public Long getMaxAgeTime() {\n return this.MaxAgeTime;\n }", "public Integer getRefreshTokenValiditySeconds() {\n return refreshTokenValiditySeconds;\n }", "public static long getAccessTokenLifeTimeInSeconds(OAuthAppDO oAuthAppDO) {\n\n long lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();\n if (lifetimeInSeconds == 0) {\n lifetimeInSeconds = OAuthServerConfiguration.getInstance()\n .getUserAccessTokenValidityPeriodInSeconds();\n if (log.isDebugEnabled()) {\n log.debug(\"User access token time was 0ms. Setting default user access token lifetime : \"\n + lifetimeInSeconds + \" sec.\");\n }\n }\n\n if (log.isDebugEnabled()) {\n log.debug(\"JWT Self Signed Access Token Life time set to : \" + lifetimeInSeconds + \" sec.\");\n }\n return lifetimeInSeconds;\n }", "public Long get_cacheexpireatlastbyterate() throws Exception {\n\t\treturn this.cacheexpireatlastbyterate;\n\t}", "public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }", "long getKeepAliveTime();", "public int getExpiry()\n {\n return expiry;\n }", "String getExpiry();", "public int getTimeToAtk() {\r\n return timeToAtk;\r\n }", "public Long getTime() {\n return time;\n }", "public int getUserTime() {\n\t\treturn this.userTime;\n\t}", "public java.util.Date getExpireTime() {\r\n return expireTime;\r\n }", "public long getTime() {\n return time;\n }", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "public long getLastAliveTime() {\n\t\treturn this.aliveTime;\n\t}", "@ApiModelProperty(value = \"The lifetime in seconds of the access token\")\n public String getExpiresIn() {\n return expiresIn;\n }", "long getCreateTime();", "long getCreateTime();", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "public int getTime() {\r\n return time;\r\n }", "long getVisitEndtime();", "long getVisitEndtime();", "public long getTime() {\r\n \treturn time;\r\n }", "public long getSessionDuration(){\n return (currentTime-startTime)/1000;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getContainerTokenExpiryInterval() {\n return containerTokenExpiryInterval;\n }", "public long getLifetime() {\n return lifetime;\n }", "boolean isExpire(long currentTime);", "int getTime();", "int getTime();", "public long getTime() {\n return _time;\n }", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public boolean checkTokenExpiry(String token) {\n System.out.println(token);\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(token);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }", "public int getTimeOut() {\n return timeOut;\n }", "public long getCurrentTime() {\n return currentTime;\n }", "public Token() {\n mTokenReceivedDate = new Date();\n }" ]
[ "0.75463885", "0.73371464", "0.7298816", "0.7179071", "0.69711286", "0.6872059", "0.68339425", "0.67863315", "0.6586208", "0.6573015", "0.65163326", "0.6496423", "0.64907515", "0.6478488", "0.6456748", "0.64425397", "0.64123905", "0.6402425", "0.6394461", "0.6374924", "0.6357786", "0.6351834", "0.63233864", "0.6323351", "0.62916243", "0.62882614", "0.6279893", "0.62392163", "0.62138855", "0.62025595", "0.6175766", "0.6172718", "0.6163613", "0.6144877", "0.61406267", "0.6137547", "0.613135", "0.61238396", "0.61033237", "0.6090761", "0.607612", "0.6067775", "0.6067473", "0.6060412", "0.6058944", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.6035208", "0.5996202", "0.59928113", "0.59903705", "0.59687406", "0.59670913", "0.59447557", "0.59418726", "0.5936392", "0.5925186", "0.5924", "0.59221566", "0.5914491", "0.5911467", "0.5911256", "0.5910492", "0.5895395", "0.58873916", "0.58856463", "0.58799374", "0.5875033", "0.5873125", "0.58729255", "0.587274", "0.587274", "0.5869488", "0.5858577", "0.58576816", "0.58576816", "0.5857358", "0.5856708", "0.5848409", "0.5848409", "0.5848409", "0.5847948", "0.5844949", "0.5841148", "0.5831087", "0.5831087", "0.5827019", "0.582298", "0.5818245", "0.5812106", "0.5811988", "0.58093" ]
0.0
-1
Increments the number of full circulations of the node network
public void setCirculations() { circulations++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void incrementNumConnects() {\n this.numConnects.incrementAndGet();\n }", "public final void incNodeCount() {\n nodeCount++;\n if (depth > maxDepth) {\n maxDepth = depth;\n }\n }", "public void incrementNumDisconnects() {\n this.numDisconnects.incrementAndGet();\n }", "public void incrementRefusals() {\n\t}", "public void UpNumberOfVisitedNodes() {\n NumberOfVisitedNodes++;\n }", "public int getCirculations()\r\n {\r\n return circulations;\r\n }", "private void incrConnectionCount() {\n connectionCount.inc();\n }", "private synchronized void incrNumCurrentClients() {\n\t\t\tthis.numCurrentClients++;\n\t\t\tthis.numTotalClients++; // only increases, never decreases\n\t\t}", "private void counting(MyBinNode<Type> r){\n if(r != null){\n this.nodes++;\n this.counting(r.left);\n this.counting(r.right);\n }\n }", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "private int number_circle() {\r\n int total = 0;\r\n Node node = find_inputNode();\r\n for (Edge e : g.get()) {\r\n if (e.getStart() == node) {\r\n total++;\r\n }\r\n }\r\n return total;\r\n }", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "public void incrementClients() {\n\t\tconnectedClients.incrementAndGet();\n\t}", "public void increment() {\n sync.increment();\n }", "private void increaseReconcileCount(final boolean isSuccess) {\n final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_AND_TIME_FORMAT);\n InstanceIdentifier<ReconcileCounter> instanceIdentifier = InstanceIdentifier\n .builder(ReconciliationCounter.class).child(ReconcileCounter.class,\n new ReconcileCounterKey(nodeId)).build();\n ReadWriteTransaction tx = broker.newReadWriteTransaction();\n Optional<ReconcileCounter> count = getReconciliationCount(tx, instanceIdentifier);\n ReconcileCounterBuilder counterBuilder = new ReconcileCounterBuilder()\n .withKey(new ReconcileCounterKey(nodeId))\n .setLastRequestTime(new DateAndTime(simpleDateFormat.format(new Date())));\n\n if (isSuccess) {\n if (count.isPresent()) {\n long successCount = count.orElseThrow().getSuccessCount().toJava();\n counterBuilder.setSuccessCount(Uint32.valueOf(++successCount));\n LOG.debug(\"Reconcile success count {} for the node: {} \", successCount, nodeId);\n } else {\n counterBuilder.setSuccessCount(Uint32.ONE);\n }\n } else if (count.isPresent()) {\n long failureCount = count.orElseThrow().getFailureCount().toJava();\n counterBuilder.setFailureCount(Uint32.valueOf(++failureCount));\n LOG.debug(\"Reconcile failure count {} for the node: {} \", failureCount, nodeId);\n } else {\n counterBuilder.setFailureCount(Uint32.ONE);\n }\n try {\n tx.mergeParentStructureMerge(LogicalDatastoreType.OPERATIONAL, instanceIdentifier,\n counterBuilder.build());\n tx.commit().get();\n } catch (InterruptedException | ExecutionException e) {\n LOG.error(\"Exception while submitting counter for {}\", nodeId, e);\n }\n }", "public synchronized void incrementClients()\r\n\t{\r\n\t\tnumberOfClients++;\r\n\t}", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "public void changeCount(final int c) {\n\t\tcount += c;\n\t}", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "private void computeParentCount() {\n parentCountArray = new int[numNodes+1];\n for(int i = 0; i < parentCountArray.length;i++){\n parentCountArray[i] = 0;\n }\n for(int i = 0; i < adjMatrix.length; i++){\n int hasParentCounter = 0;\n for(int j = 0; j < adjMatrix[i].length; j++){\n if(allNodes[i].orphan){\n hasParentCounter = -1;\n break;\n }\n if(adjMatrix[j][i] == 1) {\n hasParentCounter++;\n }\n }\n parentCountArray[i] = hasParentCounter;\n }\n\n\n for(int i = 0; i < adjMatrix.length;i++){\n for(int j =0; j < adjMatrix[i].length;j++){\n if(adjMatrix[j][i] == 1){\n if(allNodes[j].orphan && allNodes[i].orphan == false){\n parentCountArray[i]--;\n }\n }\n }\n }\n\n\n\n\n for(int i = 0; i < parentCountArray.length; i++){\n // System.out.println(i + \" has parent \" +parentCountArray[i]);\n }\n\n\n\n\n\n }", "public void incrementBranchCount() {\n this.branchCount++;\n }", "final protected void sendCounterClock() {\n\t\tNode cn = peers.iterator().next();\n\t\tif (serial - cn.serial == 1 || (cn.serial - serial != 1 && cn.serial > serial))\n\t\t\tsend(cn);\n\t\telse\n\t\t\tsendAllBut(cn);\n\t}", "int getNodesCount();", "int getNodesCount();", "public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }", "public void increaseRepDegree() {\r\n\t\tactualRepDegree++;\r\n\r\n\t}", "private void updateNumberOfConnections(int delta)\n\t{\n\t\tint count = numberOfConnections.addAndGet(delta);\t\t\n\t\tLOG.debug(\"Active connections count = {}\", count);\n\t}", "int totalNumberOfNodes();", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "public void incrementCoinCount() {\n coinCount++;\n System.out.println(\"Rich! Coin count = \" + coinCount);\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public void incrementNumModifyDNRequests() {\n this.numModifyDNRequests.incrementAndGet();\n }", "public void incNumMsgEnter() {\n\t\tthis.stat.incEnterEdge();\n\t}", "public void incrementActiveRequests() \n {\n ++requests;\n }", "void incrementCount();", "public void incrementLoopCount() {\n this.loopCount++;\n }", "public void counter(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n addlink(tp);\n }\n }", "public void incrementNumAbandonRequests() {\n this.numAbandonRequests.incrementAndGet();\n }", "public static void increaseNumberOfClients()\n {\n ++numberOfClients;\n }", "int getNodeCount();", "int getNodeCount();", "public static void increase(){\n c++;\n }", "public void incrementLoopCounter() throws EndTaskException {\n\t\tgoToBeeperStock();\n\t\tpickBeeper();\n\t\tgoToLoopCounter();\n\t\tputBeeper();\n\t}", "private synchronized void increment() {\n ++count;\n }", "private int numberOfIncorrectFollowUp(JigsawNode jNode) {\n\t\tint s = 0;\n\t\tint dimension = JigsawNode.getDimension();\n\t\tfor (int index = 1; index < dimension * dimension; index++) {\n\t\t\tif (jNode.getNodesState()[index] + 1 != jNode.getNodesState()[index + 1])\n\t\t\t\ts++;\n\t\t}\n\t\treturn s;\n\t}", "private synchronized void incrementCount()\n\t{\n\t\tcount++;\n\t}", "@Override\n public int nodeCount() {\n return graphNodes.size();\n }", "public int getNumConnections(ImmutableNodeInst n) {\n int myNodeId = n.nodeId;\n int i = searchConnectionByPort(myNodeId, 0);\n int j = i;\n for (; j < connections.length; j++) {\n int con = connections[j];\n ImmutableArcInst a = getArcs().get(con >>> 1);\n boolean end = (con & 1) != 0;\n int nodeId = end ? a.headNodeId : a.tailNodeId;\n if (nodeId != myNodeId) break;\n }\n return j - i;\n }", "public void increaseNonce() {\n this.index++;\n }", "private int countNodes(BTNode r)\r\n {\r\n if (r == null)\r\n return 0;\r\n else\r\n {\r\n int l = 1;\r\n l += countNodes(r.getLeft());\r\n l += countNodes(r.getRight());\r\n return l;\r\n }\r\n }", "public static Long cycleCounting(MySparseMatrix adjMatrix) {\n return adjMatrix.traceCubed();\n }", "@Override\n\tpublic long numNodes() {\n\t\treturn numNodes;\n\t}", "public void incrementInDegree() {\n\t\tthis.inDegree++;\n\t}", "private void updateConnections(NodeRecord currentNode, NodeRecord nextNode) {\n currentNode.incrementConnections();\n currentNode.decrementConnectionsToInitiate();\n\n nextNode.incrementConnections();\n nextNode.decrementConnectionsToInitiate();\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "public int calculateCycles(Player player, Node node, Pickaxe pickaxe) {\n\t\tfinal int mining = player.getSkills().getLevel(Skills.MINING);\n\t\tfinal int difficulty = node.getRequiredLevel();\n\t\tfinal int modifier = pickaxe.getRequiredLevel();\n\t\tfinal int random = new Random().nextInt(3);\n\t\tdouble cycleCount = 1;\n\t\tcycleCount = Math.ceil((difficulty * 60 - mining * 20) / modifier\n\t\t\t\t* 0.25 - random * 4);\n\t\tif (cycleCount < 1) {\n\t\t\tcycleCount = 1;\n\t\t}\n\t\t// player.getActionSender().sendMessage(\"You must wait \" + cycleCount +\n\t\t// \" cycles to mine this ore.\");\n\t\treturn (int) cycleCount;\n\t}", "@Override\n public synchronized void increment() {\n count++;\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "private void incrementComps(int[] flockND){\r\n\t\tndCompartments[0] += flockND[0];\r\n\t\tndCompartments[1] += flockND[1];\r\n\t\tndCompartments[2] += flockND[2];\r\n\t\tndCompartments[3] += flockND[3];\r\n\t\tndCompartments[4] += flockND[4];\r\n\t\tndCompartments[5] += flockND[5];\r\n\t\tndCompartments[6] += flockND[6];\r\n\t\tndCompartments[7] += flockND[7];\r\n\t\tndCompartments[8] += flockND[8];\r\n\t\tndCompartments[9] += flockND[9];\r\n\t\tndCompartments[10] += flockND[10];\r\n\t\tndCompartments[11] += flockND[11];\r\n\t\tndCompartments[12] += flockND[12];\r\n\t\tndCompartments[13] += flockND[13];\r\n\t\tndCompartments[14] += flockND[14];\r\n\t\tndCompartments[15] += flockND[15];\r\n\t\tndCompartments[16] += flockND[16];\r\n\t\tndCompartments[17] += flockND[17];\r\n\t\tndCompartments[18] += flockND[18];\r\n\t\tndCompartments[19] += flockND[19];\r\n\t\tndCompartments[20] += flockND[20];\r\n\t\tndCompartments[21] += flockND[21];\r\n\t\tndCompartments[22] += flockND[22];\r\n\t\tndCompartments[23] += flockND[23];\r\n\t\tndCompartments[24] += flockND[24];\r\n\t\tndCompartments[25] += flockND[25];\r\n\t\tndCompartments[26] = this.nFlocks;\r\n\t\tif(flockND[1] + flockND[2] > 0) ndCompartments[27] ++;\r\n\t}", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public void incrementCount() {\n\t\tcount++;\n\t}", "public void nextCostume() { \n costumeNumber++;\n if (costumeNumber > numberOfCostumes-1) costumeNumber=0;\n }", "public void incrRefCounter() {\n\t\tthis.refCounter++;\n\t}", "@Override\n\tpublic void count(float time) {\n\t\tfinal ICounter counter = currnet();\n\t\tcounter.count(time);\n\t\tif(counter.isDead()){\n\t\t\tthis.mCounters.removeFirst();\n\t\t\tcounter.reset();\n\t\t\tthis.mCounters.addLast(counter);\n\t\t\tmRemainedCounters--;\n\t\t}\n\t}", "public void setCounterpart(Node n)\n\t{\n\t\tcounterpart = n;\n\t}", "public static int numberOfNodes() { return current_id; }", "public void increment() {\n increment(1);\n }", "public void countdown(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n rmlink(tp);\n }\n }", "void incCount() {\n ++refCount;\n }", "public void incrMine() {\r\n\t\tthis.mineCount++;\r\n\t}", "public int totalNumNodes () { throw new RuntimeException(); }", "public void incrementCount(){\n count+=1;\n }", "void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "void renewNeighbourClusters() {\n neighbourClusters = new HashMap<Cluster, Integer>();\n\n for (Person p : members) {\n for (Person x : p.getFriends()) {\n if (!members.contains(x)) {\n Cluster xC = x.getCluster();\n if (!neighbourClusters.containsKey(xC)) {\n neighbourClusters.put(xC, 1);\n } else {\n neighbourClusters.put(xC, neighbourClusters.get(xC) + 1);\n }\n }\n }\n }\n\n }", "void recount();", "public synchronized void incrementCount() {\r\n\t\tcount++;\r\n\t\tnotifyAll();\r\n\t}", "public int recCount(TriLinkNode curNode)\r\n {\r\n int answer= 0;\r\n if(curNode.i1==true&&curNode.d1==false)\r\n {\r\n answer+=1;\r\n }\r\n if(curNode.i2==true&&curNode.d2==false)\r\n {\r\n answer+=1;\r\n }\r\n if(curNode.left!=null)\r\n {\r\n answer+=recCount(curNode.left);\r\n }\r\n if(curNode.down!=null)\r\n {\r\n answer+=recCount(curNode.down);\r\n }\r\n if(curNode.right!=null)\r\n {\r\n answer+=recCount(curNode.right);\r\n }\r\n return answer;\r\n }", "public void incrementNumAddRequests() {\n this.numAddRequests.incrementAndGet();\n }", "int getPeersCount();", "public void incPieceCount () {\n m_PieceCount++;\n\t}", "public void incrementNumCompareRequests() {\n this.numCompareRequests.incrementAndGet();\n }", "int getBlockNumbersCount();", "public void incrementCount() {\n count++;\n }", "public void counterAddup(){\n\t\tfor (int i=0; i<window.size(); i++){\n\t\t\tif ( window.get(i).acked == false ){\n\t\t\t\twindow.get(i).counter = window.get(i).counter+1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn ;\n\t}", "public void incCount() { }", "private long census(ConstituentsAddressNode crt) throws P2PDDSQLException {\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start\");\n\t\tif((crt==null)||(crt.n_data==null)){\n\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: end no ID\");\n\t\t\treturn 0;\n\t\t}\n\t\tlong n_ID = crt.n_data.neighborhoodID;\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start nID=\"+n_ID);\n\t\tif(n_ID <= 0){\n\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start nID=\"+n_ID+\" abandon\");\t\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t\n\t\tlong result = 0;\n\t\tint neighborhoods[] = {0};\n\t\t\n\t\tif(crt.isColapsed()){\n\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: this is colapsed\");\n\t\t\tresult = censusColapsed(crt, neighborhoods);\n\t\t}else{\n\t\t\tfor(int k=0; k<crt.children.length; k++) {\n\t\t\t\tif(!running){\n\t\t\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start nID=\"+n_ID+\" abandon request\");\t\t\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tConstituentsNode child = crt.children[k];\n\t\t\t\tif(child instanceof ConstituentsAddressNode) {\n\t\t\t\t\tresult += census((ConstituentsAddressNode)child);\n\t\t\t\t\tneighborhoods[0]++;\n\t\t\t\t}\n\t\t\t\tif(child instanceof ConstituentsIDNode)\n\t\t\t\t\tresult ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcrt.neighborhoods = neighborhoods[0];\n\t\tcrt.location.inhabitants = (int)result;\n\t\tcrt.location.censusDone = true;\n\t\t\n\t\tannounce(crt);\n\t\t\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:censusColapsed: start nID=\"+n_ID+\" got=\"+result);\t\t\n\t\treturn result;\n\t}", "public static int getNumberOfNodes() {\n return(numberOfNodes);\n\t }", "private void count( int theR, int theC )\n {\n for( int r = -1; r <= 1; r++ ) \n {\n for( int c = -1; c <= 1; c++ )\n {\n if( isValid( theR + r, theC + c ) )\n theCounts[ theR ][ theC ] += theMines[ theR + r ][ theC + c ];\n }\n } \n }", "public void updateIndegree()\n\t{\n\t\tint deg = 0 ;\n\t\tint numOfVertex = getAdjacencyList().size();\n\t\tdeg = adjacencyList.get(numOfVertex-1).getIndegree();\n\t\tadjacencyList.get(numOfVertex-1).setIndegree(deg + 1);\t\t\t\n\t}", "public static int getNodeCount2(Node<Integer> node) {\n node.visited = true;\n //Count this node (1) and it's children (getNodeCount)\n return 1 + node.connected.stream().filter(n -> !n.visited).map(JourneyToMoon::getNodeCount2).reduce(Integer::sum).orElse(0);\n }", "int fillCount();", "void countChains(){\n\t\tint count=0;\r\n\t\tfor(int i=0;i<Table.length;i++){\r\n\t\t\tif(Table[i]==null){\r\n\t\t\t\tEmpty++;\r\n\t\t\t}\r\n\t\t\tfor(StockNode t=Table[i];t!=null;t=t.next){\r\n\t\t\t\tif(t.next!=null)\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tif(Chain<count){\r\n\t\t\t\tChain=count;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "@Override\r\n\tpublic void iterateCount() {\n\t\t\r\n\t}", "void incNetSize(){\r\n\t\t\t\tif (size<500)size+=50;\r\n\t\t\t\telse System.out.println(\"Max net size reached!\");\r\n\t\t\t}", "protected int numNodes() {\n\t\treturn nodes.size();\n\t}" ]
[ "0.63183796", "0.61922574", "0.6166608", "0.61075294", "0.6102007", "0.6078767", "0.594404", "0.5904918", "0.5882657", "0.58627546", "0.58537227", "0.58348054", "0.5712691", "0.56668955", "0.5663387", "0.5635498", "0.5607494", "0.55863506", "0.55845743", "0.55721986", "0.5560934", "0.55522585", "0.55472845", "0.5539513", "0.5539513", "0.55342597", "0.5529647", "0.5525676", "0.5518204", "0.55158514", "0.5513683", "0.5509632", "0.5498732", "0.54903793", "0.5485424", "0.5477862", "0.54752356", "0.5471721", "0.54587835", "0.54565525", "0.5443457", "0.5443457", "0.5437607", "0.54316956", "0.5430704", "0.54036784", "0.53912294", "0.5387531", "0.5381099", "0.5380386", "0.5377265", "0.53534853", "0.5353456", "0.5346636", "0.5339681", "0.53367925", "0.5332734", "0.5331179", "0.5323761", "0.5323379", "0.5321824", "0.5319268", "0.53187907", "0.53048027", "0.5295929", "0.5291052", "0.5290596", "0.52893025", "0.5288746", "0.52842766", "0.52842367", "0.5283926", "0.52831537", "0.52825254", "0.5281966", "0.52816886", "0.5280296", "0.52782863", "0.52747375", "0.5273223", "0.5271082", "0.5260225", "0.5257903", "0.52575713", "0.52547866", "0.5253446", "0.5240507", "0.5239737", "0.5237519", "0.5220122", "0.5217735", "0.5216894", "0.52066076", "0.5205656", "0.52021", "0.520109", "0.519675", "0.5193441", "0.5187867", "0.51832336" ]
0.7389293
0
Returns the number of circulations the token has performed
public int getCirculations() { return circulations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCirculations()\r\n {\r\n circulations++;\r\n }", "long tokenCount();", "int getTokenSegmentCount();", "public long getCancellations() {\r\n\t\tlong result = 0;\r\n\t\tfor (TransitionMode mode : transitionModes) {\r\n\r\n\t\t\tresult = result + mode.getCancellations();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private int number_circle() {\r\n int total = 0;\r\n Node node = find_inputNode();\r\n for (Edge e : g.get()) {\r\n if (e.getStart() == node) {\r\n total++;\r\n }\r\n }\r\n return total;\r\n }", "int getCiphersCount();", "public final int getNumberOfContinuationCharacters() {\n return this.continuationCharacters.length;\n }", "public int getTokensCount() {\n synchronized (this) {\n return tokens.size();\n }\n }", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "int getNumberOfCavalry();", "public int numberOfOccorrence();", "public int getNumTrials() \n {\n return cumulativeTrials; \n }", "int getReaultCount();", "public int getNumTokens() {\n \treturn numTokens;\n }", "public int getCumulativeCount() {\r\n\t\tint cumulativeCount = 0;\r\n\t\tfor (int i = 0; i < counts.length; i++) {\r\n\t\t\tcumulativeCount += counts[i].count;\r\n\t\t}\r\n\t\treturn cumulativeCount;\r\n\t}", "private long getChampConnectionCount(Node series) {\n\t\tNode chrom = getSolutionChrom(series);\n\t\tif (chrom != null) {\n\t\t\tNode attribute = chrom.getFirstChild();\n\t\t\twhile (attribute != null) {\n\t\t\t\tif (attribute.getNodeName().equals(CONNECTION_COUNT_TAG)) {\n\t\t\t\t\treturn Util.getLong(attribute);\n\t\t\t\t}\n\t\t\t\tattribute = attribute.getNextSibling();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public int count() {\n\t\treturn sizeC;\n\t}", "public Long getNumContaCorrente() {\n\t\treturn numContaCorrente;\n\t}", "int getNumCyc();", "public static int numberOfCancellations(int[] tab) {\n int cmpt = 0;\n for(int i = 0; i<tab.length; i++){\n for (int j =i+1; j<tab.length; j++){\n if((tab[i]+tab[j]) == 0){\n cmpt++;\n }\n }\n }\n return cmpt;\n }", "public int howManyActivated() {\n int cont = 0;\n if(!baseProductionPanel.getProductionButton().isToken())\n cont++;\n for(int i = 0 ; i<3;i++){\n if (!productionButtons[i].isToken())\n cont++;\n }\n return cont;\n }", "int getBlockNumbersCount();", "public long getNumInstructions();", "public int countTokens()\n {\n\n int count = 0;\n int currpos = currentPosition;\n\n while (currpos < maxPosition)\n {\n int start = currpos;\n\n while ((currpos < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currpos)))\n {\n currpos++;\n }\n\n if ((start == currpos)\n && (Character.isLetterOrDigit(str.charAt(currpos)) == false))\n {\n currpos++;\n }\n\n count++;\n }\n\n return count;\n }", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "private long getChampNodeCount(Node series) {\n\t\tNode chrom = getSolutionChrom(series);\n\t\tif (chrom != null) {\n\t\t\tNode attribute = chrom.getFirstChild();\n\t\t\twhile (attribute != null) {\n\t\t\t\tif (attribute.getNodeName().equals(NODE_COUNT_TAG)) {\n\t\t\t\t\treturn Util.getLong(attribute);\n\t\t\t\t}\n\t\t\t\tattribute = attribute.getNextSibling();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "int getBlockNumsCount();", "int getBlockNumsCount();", "public static int getNumAlignedBasesCountingSoftClips(final GATKSAMRecord r) {\n int n = 0;\n final Cigar cigar = r.getCigar();\n if (cigar == null) return 0;\n\n for (final CigarElement e : cigar.getCigarElements())\n if (ALIGNED_TO_GENOME_PLUS_SOFTCLIPS.contains(e.getOperator()))\n n += e.getLength();\n\n return n;\n }", "public int lireCount() {\n\t\treturn cpt;\n\t}", "public int numeroCanciones() {\r\n\r\n\t\treturn misCanciones.size();\r\n\t}", "@Override\n\tpublic int getCirculationRulesCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn _circulationRuleLocalService.getCirculationRulesCount();\n\t}", "public int SharesNumClauses(Congruent thatCC)\n\t{\n\t\tif(thatCC != null && thatCC instanceof CongruentSegments)\n\t\t{\n\t\t\tCongruentSegments ccss = (CongruentSegments)thatCC;\n\t\t\tint numShared = cs1.equals(ccss.cs1) || cs1.equals(ccss.cs2) ? 1 : 0;\n numShared += cs2.equals(ccss.cs1) || cs2.equals(ccss.cs2) ? 1 : 0;\n\n return numShared;\n\t\t}\n\t\t\n\t\t//This is untested but should work. If thatCC is null and not an instance of then they can't share things in common\n\t\treturn 0;\n\t}", "public int numTokens() {\n return mTokens.size();\n }", "int getAuthenticationCount();", "public static int numberOfCancellations(int[] tab) {\n int number = 0 ;\n for (int i=0 ; i<tab.length ; i++){\n for(int j=0 ; j<tab.length ; j++){\n if (tab[i] + tab[j]==0){\n number++;\n }\n }\n }\n return number;\n }", "public int rodCount ();", "public int cuantosCursos(){\n return inscripciones.size();\n }", "public int getOCCURSNR() {\n return occursnr;\n }", "long getTotalAcceptCount();", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "public int count(char c){\n int counting = 0;\n \n if(isEmpty()){\n return counting; \n }else if(c == this.top){\n return counting += rest.count(c) + 1 ;\n }else{\n return counting = rest.count(c);\n }\n }", "public Double getCtr() {\r\n return ctr;\r\n }", "public int counter()\n {\n if(count<=825){\n return count++;\n }\n else{ \n count = 0;\n return count;\n }\n }", "public int forcedTerminationCount(){\r\n return forcedTc;\r\n }", "int readRepetitionCount();", "private int calculateConsecutiveDuplicateMutationsThreshold(){\n \tint combinedSiteLength = region.getCombinedSitesLength();\n \tif(combinedSiteLength <= 10){\n \t\treturn 100; // around the order of magnitude of 1,000,000 if we assume each of the 10 positions could have any of the 4 nucleotides\n \t}else{\n \t\tint consecFactor = 400000 / (combinedSiteLength * combinedSiteLength * combinedSiteLength * iContext.strategy.nucleotides.length);\n \t\treturn Math.max(2, consecFactor);\n \t}\n }", "public static int returnCount()\n {return counter;}", "int getCazuriCount();", "public int getNumComps(){\n return this.mFarm.getNumComps();\n }", "public int getCycles();", "public static int numberOfCancellations(int[] tab) {\n int occ=0;\n for(int i=0;i<tab.length-1;i++) {\n for(int j=i+1;j<tab.length;j++) {\n if (tab[i]==-tab[j]) {\n occ++;\n }\n }\n } return occ;\n }", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "public long getNumberOfPatternOccurrences() {\n if(!hasFinished()) {\n throw new IllegalArgumentException(\"the recompression is not jet ready.\");\n }\n\n S terminal = slp.get(getPattern().getLeft(), 1);\n return getPatternOccurrence(terminal).get(getText());\n }", "int getCertificateCount();", "int getCertificateCount();", "long getNumberOfComparisons();", "public int getConsecutivePasses() {\n return _consecutivePasses;\n }", "public int contaPercorre() {\n\t\tint contaM = 0;\n\t\tCampusModel aux = inicio;\n\t\tString r = \" \";\n\t\twhile (aux != null) {\n\t\t\tr = r + \"\\n\" + aux.getNomeCampus();\n\t\t\taux = aux.getProx();\n\t\t\tcontaM++;\n\t\t}\n\t\treturn contaM;\n\t}", "public long getCvpOperationLength()\n {\n \n return __cvpOperationLength;\n }", "public int countInversion(){\n\t\tsetInversiones(0);\n\t\tnumeros = countStep(numeros, 0, numeros.size()-1);\n\t\treturn getInversiones();\n\t}", "int getServiceAccountIdTokensCount();", "public static int fastNumberOfCancellations(int[] tab) {\n int occ=0;\n for(int i=0; i<tab.length;i++) {\n tab[i]=Math.abs(tab[i]);\n } Arrays.sort(tab);\n for (int i=0;i<tab.length-1;i++) {\n if (tab[i]==tab[i+1]) {\n occ++;\n }\n } return occ;\n }", "int getChannelStatisticsCount();", "public int currentCount () {\n return count;\n }", "@Override\n public int count() {\n return this.bench.size();\n }", "int getCertificatesCount();", "int getCertificatesCount();", "public static int count() {\n return numEncryptForm;\n }", "public int getConsecutivoCdp() { return this.consecutivoCdp; }", "int getInCount();", "int getCompletionsCount();", "public long nCr(int n,int r){\r\n return factorial(n)/(factorial(r)*factorial(n-r));\r\n }", "public int getCurrBlockCount() {\r\n\t\tint count = 0;\r\n\t\tTapeBlock curr = this.headLimit.getNext();\r\n\t\twhile(curr != this.tailLimit) {\r\n\t\t\tcount++;\r\n\t\t\tcurr = curr.getNext();\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public String getCuredCount() {\n return curedCount;\n }", "public static int fastNumberOfCancellations(int[] tab) {\n int n=tab.length;\n \tfor (int i = 0; i<n; i++){\n \t\ttab[i]= Math.abs(tab[i]);\n \n \tArrays.sort(tab);\n \tint sum=0;\n \tfor (int i = 0 ; i<n-1; i++){\n \t\tif (tab[i]==tab[i+1]){\n \t\t\tsum++;\n \t\t}\n \t}\n \treturn sum;\n\t}\n}", "public int countInversion(){\r\n\t\tsetInversiones(0);\r\n\t\tnumeros = countStep(numeros, 0, numeros.size()-1);\r\n\t\treturn getInversiones();\r\n\t}", "int getRequestCount();", "private int numeroCuentas() {\r\n\t\tint cuentasCreadas = 0;\r\n\t\tfor (Cuenta cuenta : this.cuentas) {\r\n\t\t\tif (cuenta != null) {\r\n\t\t\t\tcuentasCreadas++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cuentasCreadas;\r\n\t}", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "@java.lang.Override\n public int getTokenSegmentCount() {\n return tokenSegment_.size();\n }", "int getContentIdToEmbeddingTokensCount();", "public int getNumberOfSimulations(){\n return this.nMonteCarlo;\n }", "public int howManyActivatedExceptBaseProduction() {\n int cont = 0;\n for(int i = 0 ; i<3;i++){\n if (!productionButtons[i].isToken())\n cont++;\n }\n return cont;\n }", "public final int getNumCtxts(){\n return I.length;\n }", "public Integer getNumCompetitions() {\r\n return numCompetitions;\r\n }", "private int digitCount(String text, int position, int amount) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[605]++;\r\n int limit = Math.min(text.length() - position, amount);\r\n amount = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[606]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[607]++;\nbyte CodeCoverTryBranchHelper_L18 = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]++;\n\n\nint CodeCoverConditionCoverageHelper_C182;\r\n for (;(((((CodeCoverConditionCoverageHelper_C182 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C182 |= (2)) == 0 || true) &&\n ((limit > 0) && \n ((CodeCoverConditionCoverageHelper_C182 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) && false); limit--) {\nif (CodeCoverTryBranchHelper_L18 == 0) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]++;\n} else if (CodeCoverTryBranchHelper_L18 == 1) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[54]++;\n}\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[608]++;\r\n char c = text.charAt(position + amount);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[609]++;\nint CodeCoverConditionCoverageHelper_C183;\r\n if ((((((CodeCoverConditionCoverageHelper_C183 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C183 |= (8)) == 0 || true) &&\n ((c < '0') && \n ((CodeCoverConditionCoverageHelper_C183 |= (4)) == 0 || true)))\n || \n(((CodeCoverConditionCoverageHelper_C183 |= (2)) == 0 || true) &&\n ((c > '9') && \n ((CodeCoverConditionCoverageHelper_C183 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[389]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[610]++;\r\n break;\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[390]++;}\r\n amount++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[611]++;\r\n }\r\n return amount;\r\n }", "int getDataScansCount();", "int getSequenceStepsCount();", "public static int numberOfCancellations(int[] tab) {\n int n=tab.length;\n int val=tab[i];\n int sum=0;\n for(int i=0,i<n-1, i++){\n for(int k=i,k<n-1,k++){\n if(val+tab[k]==0){\n sum++;\n }\n }\n }\n return sum/2;\n }", "public int getTotalNumCompactSyncPoints() {\n return (Integer) getProperty(\"numTotalCompactSyncPoints\");\n }", "public int getCantidadColores() {\n\t\treturn cantColores;\n\t}", "public int getCazuriCount() {\n return cazuri_.size();\n }", "int getDonatoriCount();", "public int countPlus() {\n\t\tint counter = 0;\n\t\t\n\t\tfor(int row = 0; row < grid.length; row++) {\n\t\t\tfor(int col = 0; col < grid[0].length; col++) {\n\t\t\t\tif(isMiddleOfPlus(row, col)) {\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn counter; // TODO ADD YOUR CODE HERE\n\t}", "public int getNumberConcurrentEmulators() {\n\t\treturn (numberConcurrentEmulators);\n\t}", "public int getTotalRegularCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getCardsByWins());\n }", "public static double getCardCounter() {\n\t\treturn cardCounter;\n\t}", "public int countOfGenerations ();", "public int countRess()\n {\n int nbRess = 0;\n pw.println(13);\n try\n {\n nbRess = Integer.parseInt(bis.readLine()) ;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return nbRess ;\n }" ]
[ "0.66894495", "0.652583", "0.6393574", "0.60746735", "0.60537106", "0.60229164", "0.59954137", "0.5958434", "0.59518164", "0.59439176", "0.59371454", "0.58718354", "0.5864563", "0.58231074", "0.58029485", "0.57695204", "0.5768787", "0.57584554", "0.5746331", "0.5742197", "0.5737586", "0.57365954", "0.57210606", "0.57139516", "0.5701581", "0.5701092", "0.56846446", "0.56846446", "0.5660828", "0.5647103", "0.56429946", "0.56393766", "0.56206477", "0.5608907", "0.559207", "0.55892587", "0.55821", "0.5578784", "0.55762976", "0.5569415", "0.5566753", "0.55634296", "0.55538017", "0.55348516", "0.55222297", "0.5520037", "0.5515164", "0.5509164", "0.5508305", "0.5507967", "0.5503896", "0.55004454", "0.5497537", "0.54973435", "0.5490501", "0.5490501", "0.5488607", "0.5485906", "0.5480935", "0.5477603", "0.5473959", "0.5466785", "0.5464775", "0.5450213", "0.54450315", "0.54447925", "0.5444613", "0.5444613", "0.54406977", "0.5439865", "0.54347616", "0.5417308", "0.5412491", "0.5412284", "0.54049975", "0.54029036", "0.5402116", "0.5393028", "0.5390304", "0.5387717", "0.53820705", "0.5379049", "0.5378845", "0.53758365", "0.5367296", "0.536596", "0.5358896", "0.53576905", "0.53575677", "0.53524214", "0.5345135", "0.53437626", "0.5333427", "0.5327501", "0.53270024", "0.5326297", "0.5324972", "0.5320121", "0.5319993", "0.5317659" ]
0.72651273
0
Interface to handle game spawns
public interface IGameSpawn { /** * @return the {@link BaseGame} of this spawn */ @NotNull BaseGame getGame(); /** * Checks if this spawn are ready for use or not. * * @return true if ready */ boolean isReady(); /** * Returns an unmodifiable list of spawn locations. * * @return an unmodifiable list of location */ @NotNull java.util.List<@NotNull Location> getSpawnLocations(); /** * Adds a new spawn location to the list. * * @param loc The {@link Location} where to save * @return true if added */ boolean addSpawn(@NotNull Location loc); /** * Removes a spawn by location. * * @param loc The {@link Location} where to remove. * @return true if removed */ boolean removeSpawn(@NotNull Location loc); /** * Removes all cached spawns locations. */ void removeAllSpawn(); /** * Checks if the game have any spawn saved. * * @return true if the game have spawn set */ boolean haveAnySpawn(); /** * Gets a random spawn location from the cached list. In case if this method returns null, means that there was no * spawn added before. * * @return {@link org.bukkit.Location} */ @Nullable Location getRandomSpawn(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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 void control(Spawn spawn) {}", "@Override\n public String getName() {\n return \"sspawn:spawn\";\n }", "abstract public void initSpawn();", "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 createNewGame(Player player);", "@SuppressWarnings(\"unused\")\n void spawn(Entity entity);", "SpawnController createSpawnController();", "public void startNewGame();", "void spawnEntityAt(String typeName, int x, int y);", "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 }", "private void doSpawnProcess()\n\t{\n\t\t// spawn sometin\n\t\tthis.spawn();\n\t\t\n\t\t// record another spawned enemy\n\t\tspawnCurrent++;\n\t\t\n\t\t// if that wasn't the last Walker\n\t\tif(currentWave.getNumberOfWalkers() > 0)\n\t\t{\n\t\t\t// restart the spawn timer\n\t\t\tfloat delay = currentWave.getSpawnDelay();\n\t\t\tspawnTimer.start(delay);\n\t\t}\n\t\t// otherwise, we've spawned all our piggies in this wave\n\t\telse\n\t\t{\n\t\t\tprepareNextWave();\n\t\t}\n\t}", "private boolean spawn(int x, int y) {\n\t\treturn false;\n\t}", "SpawnType getGameSpawnType();", "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 }", "void forceSpawn() throws SpawnException;", "@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 addSpawnPoint(float pX, float pY, float pZ,float defaultRot, boolean playerSpawn) {\n //this.testTerrain.setBlockArea( new Vector3Int(5,0,47), new Vector3Int(2,1,2), CubesTestAssets.BLOCK_WOOD);\n Geometry spawnBox = new Geometry(\"Spawn\",new Box(1,2,1));\n Material mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\"); \n \n if(playerSpawn) {\n //If playerSpawn == true, set the global spawn point\n this.spawnPoint = new Node(\"Player Spawn Point\");\n this.spawnPoint.setUserData(\"Orientation\",defaultRot);\n mat.setColor(\"Color\", new ColorRGBA(0,0,1,0.5f));\n mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);\n spawnBox.setMaterial(mat);\n spawnBox.setQueueBucket(Bucket.Transparent);\n this.spawnPoint.attachChild(spawnBox);\n rootNode.attachChild(this.spawnPoint);\n this.spawnPoint.setLocalTranslation((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n this.spawnPointList.add(this.spawnPoint);\n } else {\n //If playerSpawn == false, add a mob spawn point\n Node spawn = new Node(\"Mob Spawn Point\");\n spawn.setUserData(\"Orientation\",defaultRot);\n mat.setColor(\"Color\", new ColorRGBA(0.5f,0.5f,0.5f,0.5f));\n mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);\n spawnBox.setMaterial(mat);\n spawnBox.setQueueBucket(Bucket.Transparent);\n spawn.attachChild(spawnBox);\n rootNode.attachChild(spawn);\n spawn.setLocalTranslation((pX * this.blockScale) + (this.blockScale * 0.5f),(pY * this.blockScale) + this.blockScale,(pZ * this.blockScale) + (this.blockScale * 0.5f));\n this.spawnPointList.add(spawn);\n }\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 spawnStuff(PlayScreen screen, float delta) {\n if (stageId!=3 && stageId!=5) {\n isCombatEnabled = true;\n int where;\n boolean spawnRight = true;\n float speed;\n\n\n //Alien Spawn\n if (System.currentTimeMillis() - lastASpawn >= SpawnATimer + extraTimer) {\n speed = (float)(Utils.doRandom(250,400));\n lastASpawn = System.currentTimeMillis();\n int count = 3;\n if (stageId==4) count = 1;\n for (int i = 0; i < count; i++) {\n if (stageId==4){\n speed = (float) (speed*0.75);\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - Alien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - Alien.width, y, Alien.width, Alien.height)))\n hits = true;\n }\n }\n screen.entities.add(new Alien(new Vector2(x, y), 1, screen.alienImages, speed, screen.player));\n }else{\n int x = 0 - Alien.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - Alien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + Alien.width*2 , y, Alien.width, Alien.height)))\n hits = true;\n }\n }\n screen.entities.add(new Alien(new Vector2(x, y), 1, screen.alienImages, speed, screen.player,false));\n }\n }\n }\n //AcidAlien Spawn\n if (System.currentTimeMillis() - lastBSpawn >= SpawnBTimer + extraTimer) {\n speed = 200;\n lastBSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - AcidAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - AcidAlien.width, y, AcidAlien.width, AcidAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new AcidAlien(new Vector2(x, y), screen.alien2Images, screen.acidImage, speed, screen.player));\n }else{\n int x = 0 - AcidAlien.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - AcidAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + AcidAlien.width*2, y, AcidAlien.width, AcidAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new AcidAlien(new Vector2(x, y), screen.alien2Images, screen.acidImage, speed, screen.player,false));\n }\n }\n //FastAlien Spawn\n if (System.currentTimeMillis() - lastCSpawn >= SpawnCTimer + extraTimer) {\n speed= Utils.doRandom(250,400);\n lastCSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - FastAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - FastAlien.width, y, FastAlien.width, FastAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new FastAlien(new Vector2(x, y), 1, screen.alien3Images,speed, screen.player));\n }else{\n int x = 0 - FastAlien.width;\n int y =0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - FastAlien.height);\n for (int h=0;h<collisions.size();h++){\n if (Collision.checkWalls(collisions.get(h),new Rectangle(x-FastAlien.width*2,y,FastAlien.width,FastAlien.height))) hits = true;\n }\n }\n screen.entities.add(new FastAlien(new Vector2(x, y), 1, screen.alien3Images, speed,screen.player,false));\n }\n\n }\n\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule ) {\n speed = 500;\n int x = 0;\n int y = 0;\n lastCapsuleSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n x = (int) screen.gameViewport.getWorldWidth();\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }else{\n x = 0 - BlueBulletItem.width;\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width *2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }\n\n int capsule = screen.random.nextInt(2);\n\n if (capsule == 0) {\n if (spawnRight) {\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages));\n }else{\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages,false));\n }\n } else if (capsule == 1) {\n if (spawnRight) {\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages));\n }else{\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages,false));\n }\n }\n\n }\n if (System.currentTimeMillis() - lastHealthSpawn >= SpawnTimerHealth) {\n speed = 500;\n lastHealthSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages));\n }else{\n int x = 0 - BlueBulletItem.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width*2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages,false));\n }\n }\n /*if (System.currentTimeMillis() - lastBombSpawn >= SpawnTimerBomb) {\n lastBombSpawn = System.currentTimeMillis();\n int x = (int) screen.gameViewport.getWorldWidth();\n int y =0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - PurpleCapsuleItem.height);\n for (int h=0;h<collisions.size();h++){\n if (Collision.checkWalls(collisions.get(h),new Rectangle(x,y,PurpleCapsuleItem.width,PurpleCapsuleItem.height))) hits = true;\n }\n }\n screen.items.add(new PurpleCapsuleItem(x, y, 500, screen.itemPurpleImages));\n }*/\n }else{\n if (stageId==3) {\n //SPACE STAGE\n ///SPAWN ENEMY SHIP:\n //TODO\n if (PlayScreen.entities.size() == 1) {\n isCombatEnabled = false;\n //no enemy spawned, so spawn:\n if (spawnIterator >= killCount) {\n //TODO END STAGE\n } else {\n System.out.println(\"SPAWNS SHIP\");\n spawnIterator++;\n screen.entities.add(new EnemyShipOne(new Vector2(0, 0), 100, screen.enemyShipOne, true, screen.player));\n\n }\n }\n //Items:\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule) {\n lastCapsuleSpawn = System.currentTimeMillis();\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new BlackBulletItem(x, y, 1000, screen.itemBlackImages));\n\n\n }\n }else{\n if (stageId == 5){\n isCombatEnabled = true;\n float speed;\n boolean spawnRight=true;\n int where=0;\n //TODO FINAL STAGE\n if (!isBossSpawned){\n //TODO\n screen.entities.add(new Boss(new Vector2(PlayScreen.gameViewport.getWorldWidth(),PlayScreen.gameViewport.getWorldHeight()/2 - Boss.height/2),screen.player));\n isBossSpawned=true;\n }\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule ) {\n speed = 500;\n int x = 0;\n int y = 0;\n lastCapsuleSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n x = (int) screen.gameViewport.getWorldWidth();\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }else{\n x = 0 - BlueBulletItem.width;\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width *2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }\n\n int capsule = screen.random.nextInt(2);\n\n if (capsule == 0) {\n if (spawnRight) {\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages));\n }else{\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages,false));\n }\n } else if (capsule == 1) {\n if (spawnRight) {\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages));\n }else{\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages,false));\n }\n }\n\n }\n if (System.currentTimeMillis() - lastHealthSpawn >= SpawnTimerHealth) {\n speed = 500;\n lastHealthSpawn = System.currentTimeMillis();\n if (stageId == 4) {\n speed = speed / 2;\n where = Utils.doRandom(0, 1);\n if (where < 50) {\n spawnRight = true;\n } else {\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages));\n } else {\n int x = 0 - BlueBulletItem.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width * 2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages, false));\n }\n }\n //TODO\n }\n }\n }\n\n //run .update(delta) on all objects\n for (int i=0; i<screen.entities.size();i++){\n screen.entities.get(i).update(delta);\n }\n\n for (int i=0; i<screen.items.size();i++){\n screen.items.get(i).update(delta);\n }\n\n //labels set:\n screen.labelHealth.setText(\"Health: \" + screen.player.health + \"/\" + screen.player.maxHealth);\n if (scoreBased) {\n screen.labelInfo.setText(\"Score: \" + screen.player.score + \"/\" + scoreGoal);\n }else{\n if (killCount>0){\n screen.labelInfo.setText(\"Score: \" + screen.player.score + \"/\" + killCount);\n }else{\n if (boss){\n screen.labelInfo.setText(\"Boss: \"+screen.player.score + \"/\" + Boss.bossHealth);\n }else{\n screen.labelInfo.setText(\"\");\n }\n\n }\n }\n if (this.stageId == 999) {\n screen.labelInfo.setText(\"Score: \" + screen.player.score);\n }\n\n\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 spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }", "private void newGame() {\n\t\t// Firstly, we spawn the player.\n\t\tplayer = new AsteroidsPlayer(GameObject.ROOT, this);\n\t\tspawnPlayer();\n\n\t\t// Make sure that no other objects exist.\n\t\tasteroids.clear();\n\t\tlaserShots.clear();\n\t\totherObjects.clear();\n\n\t\t// Then we create the score text using two strings.\n\t\tAsteroidsString scoreText = new AsteroidsString(GameObject.ROOT, \"SCORE\", true, false);\n\t\tscoreText.translate(new Vector3(-cameraZoom, cameraZoom - 1));\n\t\totherObjects.add(scoreText);\n\t\tscoreString = new AsteroidsString(GameObject.ROOT, Integer.toString(score), true, false);\n\t\tscoreString.translate(new Vector3(-cameraZoom, cameraZoom - 3));\n\t\totherObjects.add(scoreString);\n\n\t\t// We set our starting lives to 3.\n\t\tlives = 3;\n\n\t\t//And we also create the lives text.\n\t\tAsteroidsString livesText = new AsteroidsString(GameObject.ROOT, \"LIVES\", false, true);\n\t\tlivesText.translate(new Vector3(cameraZoom, cameraZoom - 1));\n\t\totherObjects.add(livesText);\n\t\tlivesString = new AsteroidsString(GameObject.ROOT, Integer.toString(lives), false, true);\n\t\tlivesString.translate(new Vector3(cameraZoom, cameraZoom - 3));\n\t\totherObjects.add(livesString);\n\n\t\t// Then we just set the delay to the first asteroid.\n\t\ttimeToNextAsteroid = asteroidDelay;\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}", "boolean spawningEnabled();", "public void spawn()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\t// Set the x,y,z position of the L2Object spawn and update its _worldregion\n\t\t\tsetVisible(true);\n\t\t\tsetWorldRegion(WorldManager.getInstance().getRegion(getWorldPosition()));\n\n\t\t\t// Add the L2Object spawn in the _allobjects of L2World\n\t\t\tWorldManager.getInstance().storeObject(object);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion\n\t\t\tregion.addVisibleObject(object);\n\t\t}\n\n\t\t// this can synchronize on others instancies, so it's out of\n\t\t// synchronized, to avoid deadlocks\n\t\t// Add the L2Object spawn in the world as a visible object\n\t\tWorldManager.getInstance().addVisibleObject(object, region);\n\n\t\tobject.onSpawn();\n\t}", "@Override\n\tpublic void onAdd() {\n\t\tsuper.onAdd();\n\n\t\tsetIdleAnimation(4527);\n\t\tsetNeverRandomWalks(true);\n\t\tsetWalkingHomeDisabled(true);\n\n\t\tthis.region = Stream.of(AbyssalSireRegion.values()).filter(r -> r.getSire().getX() == getSpawnPositionX()\n\t\t && r.getSire().getY() == getSpawnPositionY()).findAny().orElse(null);\n\n\t\tRegion region = Region.getRegion(getSpawnPositionX(), getSpawnPositionY());\n\n\t\tif (region != null) {\n\t\t\tregion.forEachNpc(npc -> {\n\t\t\t\tif (npc instanceof AbyssalSireTentacle) {\n\t\t\t\t\tif (!npc.isDead()) {\n\t\t\t\t\t\tnpc.setDead(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tList<Position> tentaclePositions = Arrays.asList(\n\t\t\t\tthis.region.getTentacleEast(),\n\t\t\t\tthis.region.getTentacleWest(),\n\t\t\t\tthis.region.getTentacleNorthEast(),\n\t\t\t\tthis.region.getTentacleNorthWest(),\n\t\t\t\tthis.region.getTentacleSouthEast(),\n\t\t\t\tthis.region.getTentacleSouthWest()\n\t\t );\n\n\t\ttentaclePositions.forEach(position -> {\n\t\t\ttentacles.add(NpcHandler.spawnNpc(5909, position.getX(), position.getY(), position.getZ()));\n\t\t});\n\n\t\tList<Position> respiratoryPositions = Arrays.asList(\n\t\t\t\tthis.region.getRespiratorySystemNorthEast(),\n\t\t\t\tthis.region.getRespiratorySystemNorthWest(),\n\t\t\t\tthis.region.getRespiratorySystemSouthEast(),\n\t\t\t\tthis.region.getRespiratorySystemSouthWest()\n\t\t );\n\n\t\trespiratoryPositions.forEach(position -> respiratorySystems.add(\n\t\t\t\tNpcHandler.spawnNpc(5914, position.getX(), position.getY(), position.getZ())));\n\t}", "boolean haveAnySpawn();", "public void newGame();", "public void newGame();", "public void newGame();", "@Override\n\tpublic void createNewGame() \n\t{\n\t\t//Create new game\n\t\tboolean randomhexes = getNewGameView().getRandomlyPlaceHexes();\n\t\tboolean randomnumbers = getNewGameView().getRandomlyPlaceNumbers();\n\t\tboolean randomports = getNewGameView().getUseRandomPorts();\n\t\tString title = getNewGameView().getTitle();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tReference.GET_SINGLETON().proxy.createGame(title, randomhexes, randomnumbers, randomports);\n\t\t} \n\t\tcatch (JoinExceptions e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//Refresh game list\n\t\tList<Game> gamelist = Reference.GET_SINGLETON().proxy.getGameList();\n\t\tGameInfo[] games = new GameInfo[gamelist.size()];\n\t\tint counter = 0;\n\t\tfor(Game game: gamelist)\n\t\t{\n\t\t\tGameInfo thisgame = new GameInfo();\n\t\t\tthisgame.setId(game.getId());\n\t\t\tthisgame.setTitle(game.getTitle());\n\t\t\tfor(Player player : game.getPlayers())\n\t\t\t{\n\t\t\t\tPlayerInfo player_info = new PlayerInfo(player);\n\t\t\t\tplayer_info.setColor(player.getColor());\n\t\t\t\tif(!(player.color == null))thisgame.addPlayer(player_info);\n\t\t\t}\n\t\t\tgames[counter] = thisgame;\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\t\n\t\tPlayerInfo ourguy = new PlayerInfo();\n\t\t\n\t\tourguy.setId(ref.player_id);\n\t\tourguy.setName(ref.name);\n\t\tif(getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\t\tif (getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\n\t\tgetJoinGameView().setGames(games, ourguy);\n\t\t\n\t}", "private void addSpawnsToList()\n\t{\n\t\tSPAWNS.put(1, new ESSpawn(1, GraciaSeeds.DESTRUCTION, new Location(-245790,220320,-12104), new int[]{TEMPORARY_TELEPORTER}));\n\t\tSPAWNS.put(2, new ESSpawn(2, GraciaSeeds.DESTRUCTION, new Location(-249770,207300,-11952), new int[]{TEMPORARY_TELEPORTER}));\n\t\t//Energy Seeds\n\t\tSPAWNS.put(3, new ESSpawn(3, GraciaSeeds.DESTRUCTION, new Location(-248360,219272,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(4, new ESSpawn(4, GraciaSeeds.DESTRUCTION, new Location(-249448,219256,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(5, new ESSpawn(5, GraciaSeeds.DESTRUCTION, new Location(-249432,220872,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(6, new ESSpawn(6, GraciaSeeds.DESTRUCTION, new Location(-248360,220888,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(7, new ESSpawn(7, GraciaSeeds.DESTRUCTION, new Location(-250088,219256,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(8, new ESSpawn(8, GraciaSeeds.DESTRUCTION, new Location(-250600,219272,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(9, new ESSpawn(9, GraciaSeeds.DESTRUCTION, new Location(-250584,220904,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(10, new ESSpawn(10, GraciaSeeds.DESTRUCTION, new Location(-250072,220888,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(11, new ESSpawn(11, GraciaSeeds.DESTRUCTION, new Location(-253096,217704,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(12, new ESSpawn(12, GraciaSeeds.DESTRUCTION, new Location(-253112,217048,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(13, new ESSpawn(13, GraciaSeeds.DESTRUCTION, new Location(-251448,217032,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(14, new ESSpawn(14, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(15, new ESSpawn(15, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(16, new ESSpawn(16, GraciaSeeds.DESTRUCTION, new Location(-251416,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(17, new ESSpawn(17, GraciaSeeds.DESTRUCTION, new Location(-249752,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(18, new ESSpawn(18, GraciaSeeds.DESTRUCTION, new Location(-249736,217688,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(19, new ESSpawn(19, GraciaSeeds.DESTRUCTION, new Location(-252472,215208,-12120), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(20, new ESSpawn(20, GraciaSeeds.DESTRUCTION, new Location(-252552,216760,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(21, new ESSpawn(21, GraciaSeeds.DESTRUCTION, new Location(-253160,216744,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(22, new ESSpawn(22, GraciaSeeds.DESTRUCTION, new Location(-253128,215160,-12096), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(23, new ESSpawn(23, GraciaSeeds.DESTRUCTION, new Location(-250392,215208,-12120), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(24, new ESSpawn(24, GraciaSeeds.DESTRUCTION, new Location(-250264,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(25, new ESSpawn(25, GraciaSeeds.DESTRUCTION, new Location(-249720,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(26, new ESSpawn(26, GraciaSeeds.DESTRUCTION, new Location(-249752,215128,-12096), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(27, new ESSpawn(27, GraciaSeeds.DESTRUCTION, new Location(-250280,216760,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(28, new ESSpawn(28, GraciaSeeds.DESTRUCTION, new Location(-250344,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(29, new ESSpawn(29, GraciaSeeds.DESTRUCTION, new Location(-252504,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(30, new ESSpawn(30, GraciaSeeds.DESTRUCTION, new Location(-252520,216792,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(31, new ESSpawn(31, GraciaSeeds.DESTRUCTION, new Location(-242520,217272,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(32, new ESSpawn(32, GraciaSeeds.DESTRUCTION, new Location(-241432,217288,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(33, new ESSpawn(33, GraciaSeeds.DESTRUCTION, new Location(-241432,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(34, new ESSpawn(34, GraciaSeeds.DESTRUCTION, new Location(-242536,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(35, new ESSpawn(35, GraciaSeeds.DESTRUCTION, new Location(-240808,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(36, new ESSpawn(36, GraciaSeeds.DESTRUCTION, new Location(-240280,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(37, new ESSpawn(37, GraciaSeeds.DESTRUCTION, new Location(-240280,218952,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(38, new ESSpawn(38, GraciaSeeds.DESTRUCTION, new Location(-240792,218936,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(39, new ESSpawn(39, GraciaSeeds.DESTRUCTION, new Location(-239576,217240,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(40, new ESSpawn(40, GraciaSeeds.DESTRUCTION, new Location(-239560,216168,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(41, new ESSpawn(41, GraciaSeeds.DESTRUCTION, new Location(-237896,216152,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(42, new ESSpawn(42, GraciaSeeds.DESTRUCTION, new Location(-237912,217256,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(43, new ESSpawn(43, GraciaSeeds.DESTRUCTION, new Location(-237896,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(44, new ESSpawn(44, GraciaSeeds.DESTRUCTION, new Location(-239560,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(45, new ESSpawn(45, GraciaSeeds.DESTRUCTION, new Location(-239560,214984,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(46, new ESSpawn(46, GraciaSeeds.DESTRUCTION, new Location(-237896,215000,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(47, new ESSpawn(47, GraciaSeeds.DESTRUCTION, new Location(-237896,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(48, new ESSpawn(48, GraciaSeeds.DESTRUCTION, new Location(-239560,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(49, new ESSpawn(49, GraciaSeeds.DESTRUCTION, new Location(-239544,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(50, new ESSpawn(50, GraciaSeeds.DESTRUCTION, new Location(-237912,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(51, new ESSpawn(51, GraciaSeeds.DESTRUCTION, new Location(-237912,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(52, new ESSpawn(52, GraciaSeeds.DESTRUCTION, new Location(-237912,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(53, new ESSpawn(53, GraciaSeeds.DESTRUCTION, new Location(-239560,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(54, new ESSpawn(54, GraciaSeeds.DESTRUCTION, new Location(-239560,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(55, new ESSpawn(55, GraciaSeeds.DESTRUCTION, new Location(-241960,214536,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(56, new ESSpawn(56, GraciaSeeds.DESTRUCTION, new Location(-241976,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(57, new ESSpawn(57, GraciaSeeds.DESTRUCTION, new Location(-243624,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(58, new ESSpawn(58, GraciaSeeds.DESTRUCTION, new Location(-243624,214520,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(59, new ESSpawn(59, GraciaSeeds.DESTRUCTION, new Location(-241976,212808,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(60, new ESSpawn(60, GraciaSeeds.DESTRUCTION, new Location(-241960,212280,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(61, new ESSpawn(61, GraciaSeeds.DESTRUCTION, new Location(-243624,212264,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(62, new ESSpawn(62, GraciaSeeds.DESTRUCTION, new Location(-243624,212792,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(63, new ESSpawn(63, GraciaSeeds.DESTRUCTION, new Location(-243640,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(64, new ESSpawn(64, GraciaSeeds.DESTRUCTION, new Location(-243624,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(65, new ESSpawn(65, GraciaSeeds.DESTRUCTION, new Location(-241976,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(66, new ESSpawn(66, GraciaSeeds.DESTRUCTION, new Location(-241976,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(67, new ESSpawn(67, GraciaSeeds.DESTRUCTION, new Location(-241976,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(68, new ESSpawn(68, GraciaSeeds.DESTRUCTION, new Location(-241976,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(69, new ESSpawn(69, GraciaSeeds.DESTRUCTION, new Location(-243624,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(70, new ESSpawn(70, GraciaSeeds.DESTRUCTION, new Location(-243624,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(71, new ESSpawn(71, GraciaSeeds.DESTRUCTION, new Location(-241256,208664,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(72, new ESSpawn(72, GraciaSeeds.DESTRUCTION, new Location(-240168,208648,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(73, new ESSpawn(73, GraciaSeeds.DESTRUCTION, new Location(-240168,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(74, new ESSpawn(74, GraciaSeeds.DESTRUCTION, new Location(-241256,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(75, new ESSpawn(75, GraciaSeeds.DESTRUCTION, new Location(-239528,208648,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(76, new ESSpawn(76, GraciaSeeds.DESTRUCTION, new Location(-238984,208664,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(77, new ESSpawn(77, GraciaSeeds.DESTRUCTION, new Location(-239000,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(78, new ESSpawn(78, GraciaSeeds.DESTRUCTION, new Location(-239512,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(79, new ESSpawn(79, GraciaSeeds.DESTRUCTION, new Location(-245064,213144,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(80, new ESSpawn(80, GraciaSeeds.DESTRUCTION, new Location(-245064,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(81, new ESSpawn(81, GraciaSeeds.DESTRUCTION, new Location(-246696,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(82, new ESSpawn(82, GraciaSeeds.DESTRUCTION, new Location(-246696,213160,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(83, new ESSpawn(83, GraciaSeeds.DESTRUCTION, new Location(-245064,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(84, new ESSpawn(84, GraciaSeeds.DESTRUCTION, new Location(-245048,210904,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(85, new ESSpawn(85, GraciaSeeds.DESTRUCTION, new Location(-246712,210888,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(86, new ESSpawn(86, GraciaSeeds.DESTRUCTION, new Location(-246712,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(87, new ESSpawn(87, GraciaSeeds.DESTRUCTION, new Location(-245048,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(88, new ESSpawn(88, GraciaSeeds.DESTRUCTION, new Location(-245064,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(89, new ESSpawn(89, GraciaSeeds.DESTRUCTION, new Location(-246696,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(90, new ESSpawn(90, GraciaSeeds.DESTRUCTION, new Location(-246712,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(91, new ESSpawn(91, GraciaSeeds.DESTRUCTION, new Location(-245048,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(92, new ESSpawn(92, GraciaSeeds.DESTRUCTION, new Location(-245048,207288,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(93, new ESSpawn(93, GraciaSeeds.DESTRUCTION, new Location(-246696,207304,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(94, new ESSpawn(94, GraciaSeeds.DESTRUCTION, new Location(-246712,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(95, new ESSpawn(95, GraciaSeeds.DESTRUCTION, new Location(-244328,207272,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(96, new ESSpawn(96, GraciaSeeds.DESTRUCTION, new Location(-243256,207256,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(97, new ESSpawn(97, GraciaSeeds.DESTRUCTION, new Location(-243256,205624,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(98, new ESSpawn(98, GraciaSeeds.DESTRUCTION, new Location(-244328,205608,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(99, new ESSpawn(99, GraciaSeeds.DESTRUCTION, new Location(-242616,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(100, new ESSpawn(100, GraciaSeeds.DESTRUCTION, new Location(-242104,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(101, new ESSpawn(101, GraciaSeeds.DESTRUCTION, new Location(-242088,205624,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(102, new ESSpawn(102, GraciaSeeds.DESTRUCTION, new Location(-242600,205608,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\t// Seed of Annihilation\n\t\tSPAWNS.put(103, new ESSpawn(103, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184519,183007,-10456), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(104, new ESSpawn(104, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184873,181445,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(105, new ESSpawn(105, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180962,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(106, new ESSpawn(106, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185321,181641,-10448), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(107, new ESSpawn(107, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184035,182775,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(108, new ESSpawn(108, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185433,181935,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(109, new ESSpawn(109, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183309,183007,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(110, new ESSpawn(110, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181886,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(111, new ESSpawn(111, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180392,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(112, new ESSpawn(112, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183793,183239,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(113, new ESSpawn(113, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184245,180848,-10464), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(114, new ESSpawn(114, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-182704,183761,-10528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(115, new ESSpawn(115, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184705,181886,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(116, new ESSpawn(116, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184304,181076,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(117, new ESSpawn(117, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183596,180430,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(118, new ESSpawn(118, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184422,181038,-10480), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(119, new ESSpawn(119, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181543,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(120, new ESSpawn(120, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184398,182891,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(121, new ESSpawn(121, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182848,-10584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(122, new ESSpawn(122, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178104,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(123, new ESSpawn(123, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177274,182284,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(124, new ESSpawn(124, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177772,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(125, new ESSpawn(125, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181532,180364,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(126, new ESSpawn(126, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181802,180276,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(127, new ESSpawn(127, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,180444,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(128, new ESSpawn(128, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182190,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(129, new ESSpawn(129, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177357,181908,-10576), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(130, new ESSpawn(130, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178747,179534,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(131, new ESSpawn(131, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,179534,-10392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(132, new ESSpawn(132, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178853,180094,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(133, new ESSpawn(133, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181937,179660,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(134, new ESSpawn(134, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-180992,179572,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(135, new ESSpawn(135, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185552,179252,-10368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(136, new ESSpawn(136, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178913,-10400), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(137, new ESSpawn(137, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184768,178348,-10312), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(138, new ESSpawn(138, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178574,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(139, new ESSpawn(139, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185062,178913,-10384), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(140, new ESSpawn(140, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181397,179484,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(141, new ESSpawn(141, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181667,179044,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(142, new ESSpawn(142, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185258,177896,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(143, new ESSpawn(143, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183506,176570,-10280), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(144, new ESSpawn(144, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183719,176804,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(145, new ESSpawn(145, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183648,177116,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(146, new ESSpawn(146, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183932,176492,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(147, new ESSpawn(147, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183861,176570,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(148, new ESSpawn(148, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183790,175946,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(149, new ESSpawn(149, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178641,179604,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(150, new ESSpawn(150, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178959,179814,-10432), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(151, new ESSpawn(151, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176367,178456,-10376), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(152, new ESSpawn(152, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175845,177172,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(153, new ESSpawn(153, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175323,177600,-10248), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(154, new ESSpawn(154, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174975,177172,-10216), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(155, new ESSpawn(155, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176019,178242,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(156, new ESSpawn(156, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174801,178456,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(157, new ESSpawn(157, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185648,183384,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(158, new ESSpawn(158, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186740,180908,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(159, new ESSpawn(159, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185297,184658,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(160, new ESSpawn(160, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185697,181601,-15488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(161, new ESSpawn(161, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186684,182744,-15536), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(162, new ESSpawn(162, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184908,183384,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(163, new ESSpawn(163, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185572,-15784), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(164, new ESSpawn(164, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185796,182616,-15608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(165, new ESSpawn(165, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184970,184385,-15648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(166, new ESSpawn(166, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185995,180809,-15512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(167, new ESSpawn(167, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182872,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(168, new ESSpawn(168, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185624,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(169, new ESSpawn(169, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184486,185774,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(170, new ESSpawn(170, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186496,184112,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(171, new ESSpawn(171, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184232,185976,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(172, new ESSpawn(172, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185673,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(173, new ESSpawn(173, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185733,184203,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(174, new ESSpawn(174, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185079,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(175, new ESSpawn(175, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184803,180710,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(176, new ESSpawn(176, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186293,180413,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(177, new ESSpawn(177, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182936,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(178, new ESSpawn(178, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184356,180611,-15496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(179, new ESSpawn(179, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185375,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(180, new ESSpawn(180, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184867,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(181, new ESSpawn(181, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180553,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(182, new ESSpawn(182, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180422,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(183, new ESSpawn(183, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181863,181138,-15120), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(184, new ESSpawn(184, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181732,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(185, new ESSpawn(185, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180684,180397,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(186, new ESSpawn(186, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-182256,180682,-15112), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(187, new ESSpawn(187, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,179492,-15392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(188, new ESSpawn(188, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(189, new ESSpawn(189, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186028,178856,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(190, new ESSpawn(190, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185224,179068,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(191, new ESSpawn(191, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(192, new ESSpawn(192, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(193, new ESSpawn(193, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180619,178855,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(194, new ESSpawn(194, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180255,177892,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(195, new ESSpawn(195, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185804,176472,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(196, new ESSpawn(196, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184580,176370,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(197, new ESSpawn(197, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184308,176166,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(198, new ESSpawn(198, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-183764,177186,-15304), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(199, new ESSpawn(199, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180801,177571,-15144), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(200, new ESSpawn(200, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184716,176064,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(201, new ESSpawn(201, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184444,175452,-15296), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(202, new ESSpawn(202, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,177464,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(203, new ESSpawn(203, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,178213,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(204, new ESSpawn(204, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-179982,178320,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(205, new ESSpawn(205, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176925,177757,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(206, new ESSpawn(206, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176164,179282,-15720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(207, new ESSpawn(207, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,177613,-15800), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(208, new ESSpawn(208, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175418,178117,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(209, new ESSpawn(209, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176103,177829,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(210, new ESSpawn(210, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175966,177325,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(211, new ESSpawn(211, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174778,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(212, new ESSpawn(212, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,178261,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(213, new ESSpawn(213, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176038,179192,-15736), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(214, new ESSpawn(214, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175660,179462,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(215, new ESSpawn(215, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175912,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(216, new ESSpawn(216, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175156,180182,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(217, new ESSpawn(217, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182059,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(218, new ESSpawn(218, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175590,181478,-15640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(219, new ESSpawn(219, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174510,181561,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(220, new ESSpawn(220, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182391,-15688), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(221, new ESSpawn(221, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174105,182806,-15672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(222, new ESSpawn(222, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174645,182806,-15712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(223, new ESSpawn(223, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214962,182403,-10992), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(224, new ESSpawn(224, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-215019,182493,-11000), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(225, new ESSpawn(225, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211374,180793,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(226, new ESSpawn(226, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211198,180661,-11680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(227, new ESSpawn(227, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213097,178936,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(228, new ESSpawn(228, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213517,178936,-12712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(229, new ESSpawn(229, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214105,179191,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(230, new ESSpawn(230, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213769,179446,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(231, new ESSpawn(231, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214021,179344,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(232, new ESSpawn(232, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210582,180595,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(233, new ESSpawn(233, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210934,180661,-11696), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(234, new ESSpawn(234, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207058,178460,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(235, new ESSpawn(235, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207454,179151,-11368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(236, new ESSpawn(236, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207422,181365,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(237, new ESSpawn(237, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207358,180627,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(238, new ESSpawn(238, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207230,180996,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(239, new ESSpawn(239, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208515,184160,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(240, new ESSpawn(240, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207613,184000,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(241, new ESSpawn(241, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208597,183760,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(242, new ESSpawn(242, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206710,176142,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(243, new ESSpawn(243, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206361,178136,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(244, new ESSpawn(244, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206178,178630,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(245, new ESSpawn(245, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205738,178715,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(246, new ESSpawn(246, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206442,178205,-12648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(247, new ESSpawn(247, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206585,178874,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(248, new ESSpawn(248, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206073,179366,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(249, new ESSpawn(249, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206009,178628,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(250, new ESSpawn(250, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206155,181301,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(251, new ESSpawn(251, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206595,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(252, new ESSpawn(252, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(253, new ESSpawn(253, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181471,-12640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(254, new ESSpawn(254, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206974,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(255, new ESSpawn(255, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206304,175130,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(256, new ESSpawn(256, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206886,175802,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(257, new ESSpawn(257, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207238,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(258, new ESSpawn(258, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,174857,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(259, new ESSpawn(259, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,175039,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(260, new ESSpawn(260, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205976,174584,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(261, new ESSpawn(261, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207367,184320,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(262, new ESSpawn(262, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219002,180419,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(263, new ESSpawn(263, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,182790,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(264, new ESSpawn(264, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,183343,-12600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(265, new ESSpawn(265, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186247,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(266, new ESSpawn(266, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186083,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(267, new ESSpawn(267, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-217574,185796,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(268, new ESSpawn(268, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219178,181051,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(269, new ESSpawn(269, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220171,180313,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(270, new ESSpawn(270, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219293,183738,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(271, new ESSpawn(271, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219381,182553,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(272, new ESSpawn(272, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219600,183024,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(273, new ESSpawn(273, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219940,182680,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(274, new ESSpawn(274, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219260,183884,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(275, new ESSpawn(275, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219855,183540,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(276, new ESSpawn(276, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218946,186575,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(277, new ESSpawn(277, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219882,180103,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(278, new ESSpawn(278, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219266,179787,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(279, new ESSpawn(279, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178337,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(280, new ESSpawn(280, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,179875,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(281, new ESSpawn(281, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,180021,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(282, new ESSpawn(282, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219989,179437,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(283, new ESSpawn(283, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219078,178298,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(284, new ESSpawn(284, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218684,178954,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(285, new ESSpawn(285, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219089,178456,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(286, new ESSpawn(286, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220266,177623,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(287, new ESSpawn(287, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178025,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(288, new ESSpawn(288, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219142,177044,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(289, new ESSpawn(289, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219690,177895,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(290, new ESSpawn(290, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219754,177623,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(291, new ESSpawn(291, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218791,177830,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(292, new ESSpawn(292, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218904,176219,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(293, new ESSpawn(293, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218768,176384,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(294, new ESSpawn(294, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177626,-11320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(295, new ESSpawn(295, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177792,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(296, new ESSpawn(296, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219880,175901,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(297, new ESSpawn(297, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219210,176054,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(298, new ESSpawn(298, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219850,175991,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(299, new ESSpawn(299, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219079,175021,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(300, new ESSpawn(300, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218812,174229,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(301, new ESSpawn(301, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218723,174669,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\t//@formatter:on\n\t}", "public static SpawnerSpawnEvent callSpawnerSpawnEvent(Entity spawnee, int spawnerX, int spawnerY, int spawnerZ) {\n/* 157 */ CraftEntity entity = spawnee.getBukkitEntity();\n/* 158 */ BlockState state = entity.getWorld().getBlockAt(spawnerX, spawnerY, spawnerZ).getState();\n/* */ \n/* 160 */ if (!(state instanceof CreatureSpawner)) {\n/* 161 */ state = null;\n/* */ }\n/* */ \n/* 164 */ SpawnerSpawnEvent event = new SpawnerSpawnEvent((Entity)entity, (CreatureSpawner)state);\n/* 165 */ entity.getServer().getPluginManager().callEvent((Event)event);\n/* 166 */ return event;\n/* */ }", "@Override\n public void updateAI(Entity entity, ServerGameModel model, double seconds) {\n BuildingSpawnerStratAIData data = entity.<BuildingSpawnerStratAIData>get(AI_DATA);\n data.elapsedTime += seconds;\n while (data.elapsedTime > timeBetweenSpawns(entity)) {\n data.elapsedTime -= timeBetweenSpawns(entity);\n if (data.spawnCounter < maxActive(entity)) {\n if (!canAttack()) {\n // Find possible spawn points: cells not blocked by hard entities.\n Set<GridCell> neighbors = model.getNeighbors(model.getCell((int) (double) entity.getX(),\n (int) (double) entity.getY()));\n Set<GridCell> passable = neighbors.stream().filter(GridCell::isPassable).collect(Collectors.toSet());\n\n // If cell directly below it is clear, spawn it there. Otherwise, find another\n // open neighboring cell to spawn the entity.\n if (passable.contains(model.getCell((int) (double) entity.getX(), (int) (double) entity.getY() + 1))) {\n Entity newEntity = makeEntity(entity.getX(), entity.getY() + 1, entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n } else if (!passable.isEmpty()) {\n Entity newEntity = makeEntity(passable.iterator().next().getCenterX(),\n passable.iterator().next().getCenterY(), entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n }\n } else {\n Collection<Entity> attackable = attackableEnemies(entity, model);\n if (!attackable.isEmpty()) {\n Entity closest = getClosestEnemy(attackable, entity, model);\n Entity newEntity = makeEntity(closest.getX(), closest.getY(), entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n }\n }\n }\n if (entity.getUpgraded()) {\n for (Entity e : data.spawned) {\n e.setUpgraded(false);\n e.set(LEVEL, entity.get(LEVEL));\n // TODO UP grade other stuff\n }\n }\n }\n }", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "public static Activity pestControl() {\n Position veteranBoat = new Position(2638, 2653);\n BooleanSupplier isOnIsland = Game.getClient()::isInInstancedScene;\n\n Function<Position, Activity> moveTo = position -> Activity.newBuilder()\n .withName(\"Moving to position: \" + position)\n .addPreReq(() -> Movement.isWalkable(position))\n .addPreReq(() -> position.distance(Players.getLocal()) > 5)\n .addSubActivity(Activities.toggleRun())\n .addSubActivity(() -> Movement.walkTo(position))\n .thenPauseFor(Duration.ofSeconds(4))\n .maximumDuration(Duration.ofSeconds(20))\n .untilPreconditionsFail()\n .build();\n\n Activity boardShip = Activity.newBuilder()\n .withName(\"Boarding ship to start game\")\n .addPreReq(() -> SceneObjects.getNearest(\"Gangplank\") != null)\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() >= 2638)\n .tick()\n .addSubActivity(Activities.moveTo(veteranBoat))\n .addSubActivity(() -> SceneObjects.getNearest(\"Gangplank\").interact(\"Cross\"))\n .thenPauseFor(Duration.ofSeconds(3))\n .build();\n\n Activity waitForGameToStart = Activity.newBuilder()\n .withName(\"Waiting for game to start\")\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() < 2638)\n .addSubActivity(() -> Time.sleepUntil(isOnIsland, 1000 * 60 * 10))\n .build();\n\n Activity goToSpawnSpot = Activity.newBuilder()\n .withName(\"Going to my fav spot\")\n .addPreReq(isOnIsland)\n .addSubActivity(() -> moveTo.apply(Players.getLocal().getPosition().translate(0, -31)).run())\n .build();\n\n Activity killStuff = Activity.newBuilder()\n .withName(\"killing stuff\")\n .addPreReq(isOnIsland)\n .addPreReq(() -> Npcs.getNearest(npc -> true) != null)\n .addPreReq(() -> Npcs.getNearest(npc -> true).containsAction(\"Attack\"))\n .addSubActivity(() -> Npcs.getNearest(npc -> true).interact(\"Attack\"))\n .thenSleepUntil(() -> Players.getLocal().getTarget() == null)\n .build();\n\n return Activity.newBuilder()\n // TODO(dmattia): Check for world 344\n .withName(\"Pest Control\")\n .addSubActivity(boardShip)\n .addSubActivity(waitForGameToStart)\n .addSubActivity(goToSpawnSpot)\n .addSubActivity(killStuff)\n .build();\n }", "public GameChart placePawn(GamePlay p);", "@Override\n public void newGame() {\n //TODO Implement this method\n }", "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 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}", "@Override\r\n\t\tpublic void run() {\n\t\t\t\r\n\t\t\tnew BukkitRunnable() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\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}\r\n\t\t\t}.runTaskLater(Main.plugin, 20);\r\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void run() {\n\n\n\t\t\tif (((CitizensNPC)myNPC).getHandle() == null ) sentryStatus = Status.isDEAD; // incase it dies in a way im not handling.....\n\n\t\t\tif (sentryStatus != Status.isDEAD && System.currentTimeMillis() > oktoheal && HealRate > 0) {\n\t\t\t\tif (myNPC.getBukkitEntity().getHealth() < sentryHealth) {\n\t\t\t\t\tmyNPC.getBukkitEntity().setHealth(myNPC.getBukkitEntity().getHealth() + 1);\n\t\t\t\t\tif (healanim!=null)net.citizensnpcs.util.Util.sendPacketNearby(myNPC.getBukkitEntity().getLocation(),healanim , 64);\n\n\t\t\t\t\tif (myNPC.getBukkitEntity().getHealth() >= sentryHealth) _myDamamgers.clear(); //healed to full, forget attackers\n\n\t\t\t\t}\n\t\t\t\toktoheal = (long) (System.currentTimeMillis() + HealRate * 1000);\n\t\t\t}\n\n\t\t\tif (sentryStatus == Status.isDEAD && System.currentTimeMillis() > isRespawnable && RespawnDelaySeconds != 0) {\n\t\t\t\t// Respawn\n\n\t\t\t\t// Location loc =\n\t\t\t\t// myNPC.getTrait(CurrentLocation.class).getLocation();\n\t\t\t\t// if (myNPC.hasTrait(Waypoints.class)){\n\t\t\t\t// Waypoints wp = myNPC.getTrait(Waypoints.class);\n\t\t\t\t// wp.getCurrentProvider()\n\t\t\t\t// }\n\n\t\t\t\t// plugin.getServer().broadcastMessage(\"Spawning...\");\n\t\t\t\tif (guardEntity == null) {\n\t\t\t\t\tmyNPC.spawn(Spawn);\n\t\t\t\t} else {\n\t\t\t\t\tmyNPC.spawn(guardEntity.getLocation().add(2, 0, 2));\n\t\t\t\t}\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\telse if (sentryStatus == Status.isHOSTILE && myNPC.isSpawned()) {\n\n\t\t\t\tif (projectileTarget != null && !projectileTarget.isDead()) {\n\t\t\t\t\tif (_projTargetLostLoc == null)\n\t\t\t\t\t\t_projTargetLostLoc = projectileTarget.getLocation();\n\n\t\t\t\t\tfaceEntity(myNPC.getBukkitEntity(), projectileTarget);\n\n\t\t\t\t\tif (System.currentTimeMillis() > oktoFire) {\n\t\t\t\t\t\t// Fire!\n\t\t\t\t\t\toktoFire = (long) (System.currentTimeMillis() + AttackRateSeconds * 1000.0);\n\t\t\t\t\t\tFire(projectileTarget);\n\t\t\t\t\t}\n\t\t\t\t\tif (projectileTarget != null)\n\t\t\t\t\t\t_projTargetLostLoc = projectileTarget.getLocation();\n\n\t\t\t\t\treturn; // keep at it\n\n\t\t\t\t}\n\n\t\t\t\telse if (meleeTarget != null && !meleeTarget.isDead()) {\n\t\t\t\t\t// Did it get away?\n\t\t\t\t\tif (meleeTarget.getLocation().distance(myNPC.getBukkitEntity().getLocation()) > sentryRange) {\n\t\t\t\t\t\t// it got away...\n\t\t\t\t\t\tsetTarget(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// target died or null\n\t\t\t\t\tsetTarget(null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (sentryStatus == Status.isLOOKING && myNPC.isSpawned()) {\n\n\t\t\t\tif (guardTarget != null && guardEntity == null) {\n\t\t\t\t\t// daddy? where are u?\n\t\t\t\t\tsetGuardTarget(guardTarget);\n\t\t\t\t}\n\n\t\t\t\tLivingEntity target = findTarget(sentryRange);\n\n\t\t\t\tif (target != null) {\n\t\t\t\t\t// plugin.getServer().broadcastMessage(\"Target selected: \" +\n\t\t\t\t\t// target.toString());\n\t\t\t\t\tsetTarget(target);\n\t\t\t\t} else\n\t\t\t\t\tsetTarget(null);\n\n\t\t\t}\n\n\t\t}", "public void createGame();", "@Test\n\tpublic void validSpawn() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tassertTrue(\"Should be able to be set to 0,0\", gameState.addSpawn(new Location(0, 0)));\n\t}", "Spawn(LatLng position) {\n this.position = position;\n return;\n }", "@Override\n public void run() {\n World world=Bukkit.getWorld(\"world\");\n world.spawnEntity(world.getHighestBlockAt(world.getSpawnLocation()).getLocation(), EntityType.VILLAGER);\n }", "public void spawnAroundBlock(Player player, Location loc, int itemID, Item3DRunnable run) {\r\n\t\tint centerx = (int) Math.floor(loc.getX());\r\n\t\tint centery = (int) Math.floor(loc.getY());\r\n\t\tint centerz = (int) Math.floor(loc.getZ());\r\n\t\t\r\n\t\t//-----------\r\n\t\t//-----------\r\n\t\t\r\n\t\tint x = centerx * 32 + 32 + 12;\r\n\t\tint y = centery * 32;\r\n\t\tint z = centerz * 32;\r\n\t\t\r\n\t\tbyte rotation = (byte) (0);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\t\r\n\t\t//-----------\r\n\t\t\r\n\t\tx = (int) centerx * 32 + 32;\r\n\t\ty = (int) centery * 32;\r\n\t\tz = (int) centerz * 32 + 32 + 12;\r\n\t\t\r\n\t\trotation = (byte) (256/4*1);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\t\r\n\t\t//-----------\r\n\t\t\r\n\t\tx = (int) centerx * 32 - 12;\r\n\t\ty = (int) centery * 32;\r\n\t\tz = (int) centerz * 32 + 32;\r\n\t\t\r\n\t\trotation = (byte) (256/4*2);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\t\r\n\t\t//-----------\r\n\t\t\r\n\t\tx = (int) centerx * 32;\r\n\t\ty = (int) centery * 32;\r\n\t\tz = (int) centerz * 32 - 12;\r\n\t\t\r\n\t\trotation = (byte) (256/4*3);\r\n\t\t\r\n\t\tspawnZombie(player, loc.getWorld().getName(), x, y, z, rotation, itemID, standCounter);\r\n\t\r\n\t\t//-----------\r\n\t\r\n\t\tactions.put(standCounter, run);\r\n\t\t\r\n\t\t//update players\r\n\t\tfor(Player p : loc.getWorld().getPlayers()) {\r\n\t\t\trespawnAll(p);\r\n\t\t}\r\n\t\t\r\n\t\tstandCounter++;\r\n\t}", "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 }", "void fireShellAtPlayer(int playerNr, int x, int y);", "public void spawn(Location location) {\r\n Packet<?>[] packets = {\r\n new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER),\r\n new PacketPlayOutNamedEntitySpawn(),\r\n new PacketPlayOutEntityHeadRotation()\r\n };\r\n\r\n setFieldCastValue(packets[0], \"b\", Collections.singletonList(this.getPlayerInfoData((PacketPlayOutPlayerInfo) packets[0])));\r\n\r\n setFieldValue(packets[1], \"a\", this.entityId); // Just change entity id to prevent client-side problems\r\n setFieldValue(packets[1], \"b\", this.profile.getId());\r\n setFieldValue(packets[1], \"c\", location.getX());\r\n setFieldValue(packets[1], \"d\", location.getY());\r\n setFieldValue(packets[1], \"e\", location.getZ());\r\n setFieldValue(packets[1], \"f\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"g\", (byte) (location.getPitch() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"h\", this.player.getPlayer().getHandle().getDataWatcher());\r\n\r\n setFieldValue(packets[2], \"a\", this.entityId);\r\n setFieldValue(packets[2], \"b\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n\r\n for (GamePlayer player : this.plugin.getGameManager().getAllPlayers())\r\n for (Packet<?> packet : packets)\r\n player.sendPacket(packet);\r\n }", "SpawnType getLobbySpawnType();", "public interface Launcher {\n void notifyKill(GameObject gameObject);\n void deliverProjectile();\n}", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void joinGame(int gameId){\n\n }", "GameState performMove(String guid, String username, int x, int y) throws GameStateException, GamePlayException;", "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "public Game startGame(Game game);", "void onRespawned(Need need, NeedLevel level, PlayerEntity player, PlayerEntity oldPlayer);", "@Override\n\tpublic void onSpawn()\n\t{\n\t\tsetIsNoRndWalk(true);\n\t\tsuper.onSpawn();\n\n\t\t// check the region where this mob is, do not activate the AI if region is inactive.\n\t\tL2WorldRegion region = WorldManager.getInstance().getRegion(getX(), getY());\n\t\tif(region != null && !region.isActive())\n\t\t{\n\t\t\tgetAI().stopAITask();\n\t\t}\n\t}", "private void doSummon(){\n AbstractPieceFactory apf = FactoryProducer.getFactory(tf.getActivePlayer().playerType());\n // check is null\n assert apf != null;\n // create a piece instance\n IPiece temp = apf.getPiece(PieceConstants.MINION, destination);\n // cast Ipiece to minions class\n newPiece = (Minion) temp;\n newPiece.healthProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n if (newValue.doubleValue() <= 0) {\n tf.removePiece(newPiece);\n tf.resetAbilityUsed();\n }\n if (oldValue.doubleValue() <= 0 && newValue.doubleValue() > 0) {\n tf.addPiece(newPiece);\n tf.resetAbilityUsed();\n }\n }\n });\n // set piece name\n newPiece.setPieceName(MinionName);\n // set piece health points\n startingHealth = newPiece.getHealth();\n // add piece to game\n tf.addPiece(newPiece);\n }", "public void StartGame(){\n log(\"Game started\");\n\n myTile = 74;\n opponentTile = 14;\n bombs=3;\n hp=3;\n turnNumber = 1;\n lastTurnPowerup = 1;\n powerup_confusion = false;\n powerup_godmode = false;\n bombs_location = new ArrayList<>();\n powerup_location = new ArrayList<>();\n canPlaceBomb = true;\n invulnerable = false;\n confused = false;\n\n ImageView player2 = (ImageView) findViewById(R.id.square_14);\n ImageView player1 = (ImageView) findViewById(R.id.square_74);\n player1.setScaleType(ImageView.ScaleType.FIT_CENTER);\n player2.setScaleType(ImageView.ScaleType.FIT_CENTER);\n player1.setImageDrawable(getResources().getDrawable(R.drawable.tank_blue));\n player2.setImageDrawable(getResources().getDrawable(R.drawable.tank_red));\n String playerStarterId = getIntent().getStringExtra(getResources().getString(R.string.game_player_starter));\n\n /**\n * decides who gets to start according to the algorithm in MultiplayerManager.java\n */\n// if(playerStarterId.equals(mMyId)){\n// myTurn = true;\n// showTimedAlertDialog(\"Your turn!\", \"Click on spot you want to move your brick to\", 5);\n// }else{\n// myTurn = false;\n// showTimedAlertDialog(\"Your opponent's move\", \"Wait for your opponent to make a move\", 5);\n// }\n\n /**\n * fallback incase the previous method doesnt work\n */\n try{\n if(sharedPreferences.getString(\"brick\", null).contains(\"Arafat\")){\n myTurn = true;\n ShotsCaller = true;\n showTimedAlertDialog(\"Your turn!\", \"Click on spot you want to move your brick to\", 5);\n }else{\n myTurn = false;\n ShotsCaller = false;\n showTimedAlertDialog(\"Your opponent's move\", \"Wait for your opponent to make a move\", 5);\n }\n }catch (NullPointerException e){\n myTurn = false;\n ShotsCaller = false;\n }\n }", "boolean testSpawnShips(Tester t) {\n return t.checkExpect(new NBullets(lob3, los3, 8, 12, 23, new Random(10)).spawnShips(),\n new NBullets(lob3, los3, 8, 12, 23))\n && t.checkExpect(new NBullets(lob3, los3, 8, 12, 24, new Random(10)).spawnShips(),\n new NBullets(lob3,\n new ConsLoGamePiece(new Ship(10, Color.cyan, new MyPosn(0, 127), new MyPosn(4, 0)),\n new ConsLoGamePiece(new Ship(10, Color.cyan, this.p3, this.p6),\n new ConsLoGamePiece(new Ship(10, Color.cyan, this.p1, this.p6),\n new ConsLoGamePiece(\n new Ship(10, Color.cyan, new MyPosn(0, 150), this.p3),\n new MtLoGamePiece())))),\n 8, 12, 24));\n }", "public interface GameListener {\n\n /**\n * Called when a player makes a move in the game.\n * @param playerIndex Player identifier\n * @param move Move made\n */\n void moveAdded(int playerIndex, Move move);\n\n /**\n * Called when a move is undone.\n */\n void moveRemoved(Move move);\n\n /**\n * Called when a haslam.blackstone.players turn has started.\n * @param playerIndex Player identifier\n */\n void turnStarted(int playerIndex);\n\n /**\n * Called when the game has started.\n */\n void gameStarted();\n\n /**\n * Called when a previous game is resumed.\n */\n void gameResumed();\n\n /**\n * Called when the game has finished.\n */\n void gameFinished();\n\n /**\n * Called when the game requests a move from the user.\n */\n void userMoveRequested(int playerIndex);\n\n /**\n * Called when a new position is loaded by the user.\n * @param orderedMoves A list of moves made, in order, to assemble the new\n * position.\n */\n void positionLoaded(List<Move> orderedMoves);\n\n /**\n * Called when a position is cleared by the user.\n */\n void positionCleared();\n\n /**\n * Called when the user adds an external player.\n */\n void playerAdded();\n\n}", "public default boolean shouldSpawnEntity(){ return false; }", "public void startGame(Room room);", "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 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}", "public void RunGame(){\r\n \r\n for (int i=0;i<numberoplayers;i++){ \r\n if (Objects.equals(Players.get(i).numofdestroyedships,numberofships))\r\n {\r\n Leave(Players.get(i));\r\n }\r\n if (Players.size()==1){\r\n Stop(Players.get(0));\r\n return ;\r\n }\r\n Square attackmove=Players.get(i).AttackOpponent();\r\n if (attackmove==null){\r\n if (i==1)\r\n i=-1;\r\n continue;\r\n }\r\n //know the player name and the attack point and add it to the list\r\n moves.add(new ToturialClass(Players.get(i).name,attackmove.x,attackmove.y,new Date()));\r\n //to know the targeted player\r\n int temp=i+1;\r\n if (temp==2)\r\n temp=0;\r\n AttackResult result=Players.get(temp).AcceptAttack(attackmove); \r\n Players.get(i).AcceptAttackResult(result);\r\n playerboard.repaintafterupdate();\r\n \r\n if (i==1)\r\n i=-1;\r\n }\r\n }", "void spawnItem(@NotNull Point point) {\n int anInt = r.nextInt(100) + 1;\n if (anInt <= 10)\n objectsInMap.add(new AmmoItem(point));\n else if (anInt <= 20)\n objectsInMap.add(new HealthItem(point));\n else if (anInt <= 30)\n objectsInMap.add(new ShieldItem(point));\n else if (anInt <= 40)\n objectsInMap.add(new StarItem(point));\n else if (anInt <= 45)\n objectsInMap.add(new LivesItem(point));\n }", "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}", "void createPlayer(Player player);", "public abstract void gameObjectStartsSleeping();", "@Override\n public void newGame(ICrossingStrategy gameStrategy) {\n\n }", "public Location spawn(teamName team, Match m) {\r\n\t\tif (team == teamName.ALLIES && m.getState().equals(gameState.PREGAME)){\r\n\t\t\treturn alliesSpawn;\r\n\t\t} else if (team == teamName.AXIS && m.getState().equals(gameState.PREGAME)){\r\n\t\t\treturn axisSpawn;\r\n\t\t} else if (team == teamName.SPECTATOR){\r\n\t\t\treturn mainSpawn;\r\n\t\t} else if (team == teamName.ALONE){\r\n\t\t\treturn randomSpawn(m);\r\n\t\t} else {\r\n\t\t\treturn randomSpawn(team, m);\r\n\t\t}\r\n\t}", "public Point getSpawn() {\n\t\treturn spawn;\n\t}", "public abstract void execute(Player p);", "public Location mainSpawn(){\r\n\t\treturn mainSpawn;\r\n\t}", "public static void spawnByLoc(WorldPosition pos)\n\t{\n\t\tfor (Entry<WorldPosition, FastList<SpawnTemplate>> spawnpos : spawnsByPosition.entrySet())\n\t\t{\n\t\t\tif (spawnpos.getKey().getX() == pos.getX() && spawnpos.getKey().getY() == pos.getY() && spawnpos.getKey().getZ() == pos.getZ())\n\t\t\t{\n\t\t\t\t//found = true;\n\t\t\t\tint index = Rnd.get(0,(spawnpos.getValue().size()-1));\n\t\t\t\tfinal SpawnTemplate st = spawnpos.getValue().get(index);\n\t\t\t\tint respawntime = 295;\n\t\t ThreadPoolManager.getInstance().schedule(new Runnable() \n\t\t {\n\t\t @Override\n\t\t public void run() \n\t\t {\n\t\t \tspawn(st);\n\t\t }\t\t \n\t\t }, respawntime * 1000);\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t//if (!found) log.warn(\"Didn't found Location for \"+pos.toString());\n\t}", "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 }", "private void sendGameCommand(){\n\n }", "@Override\n public void run() {\n serverHelper.newGame(game, player);\n }", "public boolean getCanSpawnHere()\r\n {\r\n return false;\r\n }", "GameState requestActionGamePiece();", "void startNewGame(String playerName, String gameType) throws GameServiceException;", "private void createGame(String name){\n\n }", "public abstract void handleMovement();", "public abstract void makePlayer(Vector2 origin);", "public void initSpawnPoints() {\n this.spawnPointList = new ArrayList<Node>();\n \n //Player spawn point location (5,0,47) In Ready Room\n this.addSpawnPoint(5.5f,0,47.5f,90, true);\n //Mob spawn point location (16,0,47) In Zone 2\n this.addSpawnPoint(16.5f, 0, 47.5f, 270, false); \n //Mob spawn point location (21,0,43)\n this.addSpawnPoint(21.5f, 0, 43.5f, 0,false);\n \n //Mob spawners in Zone 3\n this.addSpawnPoint(17.5f, 0, 37.5f, 90, false);\n this.addSpawnPoint(29.5f, 0, 37.5f, 90, false);\n this.addSpawnPoint(17.5f, 0, 29.5f, 270, false);\n \n //Mob spawners in Zone 4\n this.addSpawnPoint(12.5f, 0, 29.5f, 90, false);\n this.addSpawnPoint(6.5f, 0, 20.5f, 0, false);\n \n //Mob spawners in Zone 5\n this.addSpawnPoint(9.5f, 0, 6.5f, 0, false);\n this.addSpawnPoint(17.5f, 0, 6.5f, 0, false);\n this.addSpawnPoint(24.5f, 0, 8.5f, 270, false);\n this.addSpawnPoint(24.5f, 0, 11.5f, 270, false);\n this.addSpawnPoint(24.5f, 0, 14.5f, 270, false);\n }", "private void spawnZombie(Player p, String world, int x, int y, int z, byte rotation, int itemID, int stand) {\r\n\t\tint eid = DisguiseSystemHandler.newEntityID();\r\n\t\tentityIDs.add(eid);\r\n\t\tstandIDs.put(eid, stand);\r\n\t\t\r\n\t\t//save positioninfo for respawning\r\n\t\tItem3DInfo info = new Item3DInfo();\r\n\t\tinfo.setWorldName(world);\r\n\t\tinfo.setX(x);\r\n\t\tinfo.setY(y);\r\n\t\tinfo.setZ(z);\r\n\t\tinfo.setRotation(rotation);\r\n\t\tinfo.setItemID(itemID);\r\n\t\tentityInfo.put(eid, info);\r\n\t\t\r\n\t\tsendPacket(p, world, x, y, z, rotation, eid, itemID);\r\n\t}", "java.lang.String getSpawnpointId();", "public abstract void makeMove(GameStatus gameStatus);", "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}", "@SubscribeEvent\n public void spawnMobs(WorldTickEvent event)\n {\n if(event.phase == TickEvent.Phase.END && event.world.provider.getDimension() == 0\n && event.side == Side.SERVER && event.world.playerEntities.size() > 0)\n {\n //fires at 10PM every in-game day\n if(event.world.getWorldTime()%23999 == 16000)\n {\n //gets a list of all players in-game\n List<EntityPlayer> players = event.world.playerEntities;\n ArrayList<BlockPos> spawnpoints = new ArrayList<>();\n\n //gets the current day in-game\n int currDay = DifficultyScaling.getCurrDay(event.world);\n Random rand = new Random();\n\n if(DifficultyScaling.getCurrWeek(event.world) > 0)\n {\n //sets the current difficulty\n difficulty = DifficultyScaling.getDifficulty(currDay);\n\n //populates spawnpoints... creates 5 spawnpoints around each players\n for (int i = 0; i < players.size(); i++)\n {\n BlockPos playerPos = players.get(i).getPosition();\n for (int k = 0; k < 5; k++)\n {\n int x = playerPos.getX(), y, z = playerPos.getZ();\n int posOrNeg = rand.nextInt(2);\n\n if(posOrNeg == 0)\n x = rand.nextInt(15) + 15 + x;\n else\n x = rand.nextInt(15) - 30 + x;\n\n posOrNeg = rand.nextInt(2);\n if(posOrNeg == 0)\n z = rand.nextInt(15) + 15 + z;\n else\n z = rand.nextInt(15) - 30 + z;\n\n y = event.world.getHeight(x, z);\n\n spawnpoints.add(new BlockPos(x, y, z));\n }\n }\n\n //Sets the adjusted amount of mobs\n int creepersToSpawn = (int) (baseSpawnCreeper * (difficulty + (players.size() - 1) * 1.2));\n int zombiesToSpawn = (int) (baseSpawnZombie * (difficulty + (players.size() - 1) * 1.2));\n int endermenToSpawn = (int) (baseSpawnEnderman * (difficulty + (players.size() - 1) * 1.2));\n int totalMobsToSpawn = creepersToSpawn + zombiesToSpawn + endermenToSpawn;\n\n spawnMobs(event.world, spawnpoints, players, zombiesToSpawn, endermenToSpawn, creepersToSpawn);\n\n for(int i = 0; i < players.size(); i++)\n players.get(i).sendMessage(new TextComponentString(\"Number of mobs spawned: \" + totalMobsToSpawn));\n }\n //goes through the playerlist and messages them that it's 10pm at 10pm\n for(int k = 0; k < players.size(); k++)\n {\n players.get(k).sendMessage(new TextComponentString(\"Time: \" + (event.world.getWorldTime()%24000)/10));\n players.get(k).sendMessage(new TextComponentString(\"Day: \" + (DifficultyScaling.getCurrDay(event.world) + 1)));\n players.get(k).sendMessage(new TextComponentString(\"Week: \" + DifficultyScaling.getCurrWeek(event.world)));\n\n }\n }\n }\n }", "interface AlienLaserSpawner {\n void spawnAlienLaser(Transform transform);\n}", "public void playerTurnStart() {\n\r\n\t}", "public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}", "public void act() \n {\n playerMovement();\n }" ]
[ "0.70844746", "0.6994607", "0.68196297", "0.66611314", "0.6545034", "0.6534206", "0.64668643", "0.645632", "0.63916606", "0.6360027", "0.6338542", "0.63331616", "0.6311012", "0.62862015", "0.62501687", "0.62317395", "0.62307817", "0.6211999", "0.6166014", "0.6165554", "0.614471", "0.6142655", "0.61281246", "0.61223286", "0.6119132", "0.61128825", "0.61106867", "0.61067575", "0.6106217", "0.6061084", "0.60421103", "0.60421103", "0.60421103", "0.603181", "0.603144", "0.60251427", "0.60240483", "0.6022824", "0.6018633", "0.6016684", "0.598907", "0.5976885", "0.5971667", "0.5970749", "0.59681267", "0.5962592", "0.5937571", "0.59338063", "0.59262186", "0.5923312", "0.589715", "0.5894072", "0.5877093", "0.58652484", "0.5860092", "0.58456546", "0.584052", "0.58317435", "0.58289844", "0.5825481", "0.58165956", "0.5811702", "0.5811062", "0.5805724", "0.5798292", "0.5794018", "0.57890964", "0.5787059", "0.5786995", "0.5783893", "0.57776785", "0.5775432", "0.5773594", "0.5772087", "0.5765122", "0.5763656", "0.57626295", "0.5760945", "0.57535994", "0.5750183", "0.5748022", "0.57478005", "0.57418174", "0.5740582", "0.573973", "0.5738926", "0.57369024", "0.57287997", "0.5726851", "0.57170653", "0.5716269", "0.57152194", "0.571381", "0.57090646", "0.5707294", "0.57005376", "0.56983787", "0.5698005", "0.5697837", "0.5694421" ]
0.6917517
2
Checks if this spawn are ready for use or not.
boolean isReady();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }", "private boolean isReady() {\n for (Rotor rotor : rotors)\n if (rotor == null)\n return false;\n return (stator != null && reflector != null && plugboard != null);\n }", "public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isReady() {\n return mPoints != null && mPoints.size() >= MINIMUM_SIZE;\n }", "@Override\r\n\tpublic boolean isReady() {\n\t\treturn !finish;\r\n\t}", "protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean isReady() {\n\t\treturn (this.baseTime == this.timeRemaining);\n\t}", "public boolean isReady();", "public boolean isReady();", "private boolean allReady() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n if (playersInLobby.length <= 1)\n return false;\n for (PlayerModel pl : playersInLobby) {\n if (!pl.isReady() && !(pl instanceof ClientPlayerModel))\n return false;\n }\n return true;\n }", "public boolean isReady()\r\n {\r\n return _isReady;\r\n }", "public Boolean isReady()\n {\n return (sensorModules != null && !sensorModules.isEmpty());\n }", "private boolean checkReady() {\n if (mMap == null) {\n Toast.makeText(this, \"Map not ready!\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "@Override\n public boolean isReady() {\n return (running && !opening) || packetQueue.size() > 0;\n }", "public boolean isReady() {\n\t\treturn state == State.READY;\n\t}", "boolean haveAnySpawn();", "void isReady();", "void isReady();", "boolean available()\n {\n synchronized (m_lock)\n {\n return (null == m_runnable) && (!m_released);\n }\n }", "protected final boolean isReady() {\n // check if visible (invisible components are ok to be not ready)\n if (!this.isVisible()) {\n return true;\n }\n if (!this.isDisplayable()) {\n return true;\n }\n // check if this is not ready\n if (!ready) {\n return false;\n }\n // check if any child is not ready\n for (BlankDialogModule module : childModules) {\n if (!module.isReady()) {\n return false;\n }\n }\n // all ready!\n return true;\n }", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "public boolean ready();", "public boolean isReady() {\n return ready;\n }", "@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}", "public boolean ready() {\n diff = eventTime - System.currentTimeMillis(); //Step 4,5\n return System.currentTimeMillis() >= eventTime;\n }", "public boolean isOccupied(){\n \t\treturn occupiedSeconds > 0;\n \t}", "public boolean isReady() {\n return isReady;\n }", "@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}", "protected boolean isFinished() {\n \tboolean distanceTarget = Robot.driveDistancePID.onRawTarget();\n \t\n \tdouble timeNow = timeSinceInitialized();\n \t\n \treturn (distanceTarget || (timeNow >= expireTime));\n }", "protected void checkIfReady() throws Exception {\r\n checkComponents();\r\n }", "private boolean isHealthy() {\n if (!fsOk) {\n // File system problem\n return false;\n }\n // Verify that all threads are alive\n if (!(leases.isAlive() && compactSplitThread.isAlive() &&\n cacheFlusher.isAlive() && logRoller.isAlive() &&\n workerThread.isAlive())) {\n // One or more threads are no longer alive - shut down\n stop();\n return false;\n }\n return true;\n }", "protected boolean isFinished() {\n \tif(timeSinceInitialized() >= 1.75){\n \t\treturn true;\n \t}\n return false;\n }", "@Override\n public boolean isReady() {\n return isFinished();\n }", "public boolean isAvailable() {\n return LocalTime.now().isAfter(busyEndTime);\n }", "protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }", "@Override\n protected boolean isFinished() {\n return timeSinceInitialized() > 0.5 && Robot.toteLifterSubsystem.isEjectorExtended();\n }", "public boolean isReady() {\n return mInputPoints != null && mOutputPoints != null &&\n mInputPoints.size() == mOutputPoints.size() &&\n mInputPoints.size() >= getMinimumPoints();\n }", "public boolean getIsReady() {\n return localIsReady;\n }", "boolean hasPlayready();", "@Override\n public boolean isReady() {\n return true;\n }", "@java.lang.Override\n public boolean hasPlayready() {\n return playready_ != null;\n }", "public boolean allPlayersReady() {\r\n for (Player player : players) {\r\n if (!player.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Override\n public boolean isReady() {\n return areValidReadings(mReadings);\n }", "@Override\n public boolean isReady() {\n return true;\n }", "public boolean isReady() {\n return mIsReady;\n }", "boolean isAvailable( long millis );", "public boolean isOccupied() {\n return !(getLease() == null);\r\n }", "private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "private void checkIfAlive() {\n synchronized (this) {\n if (!mIsAlive) {\n Log.e(LOG_TAG, \"use of a released dataHandler\", new Exception(\"use of a released dataHandler\"));\n //throw new AssertionError(\"Should not used a MXDataHandler\");\n }\n }\n }", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "boolean isFinished() {\n\t\tif (this.currentRoom.isExit() && this.currentRoom.getMonsters().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }", "public boolean isReady() {\n return this.mWmService.mDisplayReady && this.mDisplayReady;\n }", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void checkIsAbleToFire() {\n\n\t\tif (ticksToNextFire <= currentTickCount) {\n\t\t\tisAbleToFire = true;\n\t\t} else {\n\t\t\tisAbleToFire = false;\n\t\t}\n\t}", "@Override\n public boolean isReady() {\n return !isDone;\n }", "@Override\n\tpublic boolean ready() {\n\t\treturn this.ok;\n\t}", "@Override\n public boolean isAvailable() {\n return room.isAvailable();\n }", "boolean spawningEnabled();", "public boolean isComplete()\n {\n return (name != null) && (spacecraft != null) &&\n (sensor != null) && (description != null);\n }", "public boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void checkIfReadyToParse() {\r\n\t\tif (this.hostGraph != null)\r\n\t\t\tif (this.stopGraph != null)\r\n\t\t\t\tif (this.criticalPairs != null || this.criticalPairGraGra != null) {\r\n\t\t\t\t\tthis.readyToParse = true;\r\n\t\t\t\t}\r\n\t}", "private boolean checkMachineAvailable ()\n throws Exception\n {\n try {\n log.info(\"Claiming free machine\");\n\n Machine freeMachine = Machine.getFreeMachine(session);\n if (freeMachine == null) {\n Scheduler scheduler = Scheduler.getScheduler();\n log.info(String.format(\n \"No machine available for scheduled sim %s, retry in %s seconds\",\n game.getGameId(), scheduler.getSchedulerInterval() / 1000));\n return false;\n }\n\n game.setMachine(freeMachine);\n freeMachine.setStateRunning();\n session.update(freeMachine);\n log.info(String.format(\"Game: %s running on machine: %s\",\n game.getGameId(), game.getMachine().getMachineName()));\n return true;\n } catch (Exception e) {\n log.warn(\"Error claiming free machine for game \" + game.getGameId());\n throw e;\n }\n }", "protected boolean isFinished() {\n\t\treturn Robot.oi.ds.isAutonomous();\n\t}", "@Override\n protected boolean isFinished() {\n return (extend || timeSinceInitialized() >= 1.5);\n }", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "public boolean isAlive(){\n\t\treturn lifeForce > 0;\n\t}", "public boolean mo5973j() {\n return !isDestroyed() && !isFinishing();\n }", "protected boolean isOccupied(){\n\t\treturn occupied;\n\t}", "@Override\n public boolean isFinished() {\n return !(System.currentTimeMillis() - currentMs < timeMs) &&\n // Then check to see if the lift is in the correct position and for the minimum number of ticks\n Math.abs(Robot.lift.getPID().getSetpoint() - Robot.lift.getEncoderHeight()) < error\n && ++currentCycles >= minDoneCycles;\n }", "public boolean ready() {\n try {\n return in.available() > 0;\n } catch (IOException x) {\n return false;\n }\n }", "public boolean isAvailable() {\r\n\treturn available;\r\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public boolean isAlive() {\n return this.getHealthPower().hasSomeHealth();\n }", "public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "protected boolean isFinished()\n\t{\n\t\treturn !Robot.oi.respoolWinch.get();\n\t}", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "boolean isWaiting()\n {\n return waitFlags != 0;\n }", "protected boolean isFinished() {\n\t\tboolean beyondTarget = Robot.wrist.getCurrentPosition() > safePosition;\n\t\treturn isSafe || beyondTarget;\n\t}", "public boolean isAlive() {\r\n\t\treturn life > 0;\r\n\t}", "protected boolean isFinished() {\n\t\tif (_timesRumbled == 40) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isFullfilled() throws IllegalStateException;", "public boolean isAvailable() {\n return available;\n }", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "public boolean isAvailable() {\n return available;\n }", "public boolean isAvailable() {\n return available;\n }", "public boolean taken() {\n return pawn.getLives() != 0;\n }", "public boolean isAvailable()\n {\n return available;\n }", "boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "public boolean isComplete() {\n\t\tboolean complete = false;\n\t\tcomplete = !(hasInstInQueue());\n\n\t\tfor (int i = 0; i < MemReservationTomasulo.length && complete; i++) {\n\t\t\tcomplete = !MemReservationTomasulo[i].isBusy();\n\t\t}\n\n\t\tfor (int i = 0; i < alu_rsTomasulo.length && complete; i++) {\n\t\t\tcomplete = !alu_rsTomasulo[i].isBusy();\n\t\t}\n\n\t\treturn complete;\n\t}", "private boolean checkBootstrap ()\n {\n if (game.hasBootstrap()) {\n return true;\n } else {\n log.info(\"Game: \" + game.getGameId() + \" reports that boot is not ready!\");\n game.setStateBootPending();\n return false;\n }\n }", "@Override\n\tpublic boolean isComplete() {\n\t\tif (this.defeated == this.totalEnemies)\n\t\t\treturn true;\n\t\treturn false;\n\t}" ]
[ "0.7089524", "0.690854", "0.68837184", "0.68427086", "0.68369603", "0.6771642", "0.673449", "0.6719595", "0.6719595", "0.67098695", "0.6705428", "0.6697722", "0.665013", "0.66465914", "0.66439646", "0.66415507", "0.66387683", "0.66387683", "0.65975606", "0.65851283", "0.65675795", "0.65675795", "0.6558619", "0.65536225", "0.65429264", "0.6529769", "0.6526786", "0.6525437", "0.6521314", "0.6521106", "0.6469689", "0.64515454", "0.6444335", "0.6418505", "0.6416629", "0.6400632", "0.6377517", "0.63748825", "0.63405323", "0.6304554", "0.6294156", "0.6288304", "0.6282656", "0.6276924", "0.62724656", "0.62509406", "0.6243289", "0.6241984", "0.6233452", "0.62208253", "0.62101233", "0.6194844", "0.6182388", "0.6181291", "0.61729234", "0.616917", "0.61387694", "0.61383027", "0.61381185", "0.61313117", "0.6130843", "0.61187327", "0.6118343", "0.6114995", "0.6112002", "0.6106553", "0.6106042", "0.61031795", "0.6082119", "0.6081723", "0.6078707", "0.60777384", "0.6077426", "0.6076421", "0.6074519", "0.6074519", "0.6074519", "0.6074519", "0.6067055", "0.6062691", "0.60569906", "0.60477465", "0.60442585", "0.60435337", "0.60410625", "0.6039425", "0.6038756", "0.6035517", "0.60338175", "0.60336435", "0.60303587", "0.60303587", "0.60253996", "0.60181993", "0.60125333", "0.6007712", "0.6007396", "0.60023767" ]
0.66978735
13
Returns an unmodifiable list of spawn locations.
@NotNull java.util.List<@NotNull Location> getSpawnLocations();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Location> getSpawns(){\n\t\treturn spawns;\n\t}", "public ArrayList<Integer[]> getMineLocations()\n {\n return mineLocations;\n }", "public ArrayList<Location> getLocations()\n {\n ArrayList<Location> locs = new ArrayList<>();\n for (int row = 0; row < squares.length; row++)\n {\n for (int col = 0; col < squares[0].length; col++)\n {\n locs.add(new Location(row,col));\n }\n }\n return locs;\n }", "public List<SpawnPoint> getSpawns() {\n\t\treturn spawns;\n\t}", "public Location getSpawnLocation() {\n return this.spawnLocation;\n }", "public String getSpawnLocationString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<Location> locs = getSpawns();\n\t\tfor (int i=0;i<locs.size(); i++ ){\n\t\t\tif (locs.get(i) != null) sb.append(\"[\").append(i + 1).append(\":\").\n append(Util.getLocString(locs.get(i))).append(\"] \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public List<SpawnPoint> getSpawnPoints(){\n return spawnPoints;\n }", "public java.util.List<phaseI.Hdfs.DataNodeLocation> getLocationsList() {\n if (locationsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(locations_);\n } else {\n return locationsBuilder_.getMessageList();\n }\n }", "List<String> locations();", "List<SpawnType> getSpawnTypes();", "public List<Location> getLocations() {\n\t\treturn locations;\n\t}", "public java.util.List<phaseI.Hdfs.DataNodeLocation> getLocationsList() {\n return locations_;\n }", "public ArrayList getLocations()\r\n\t\t{\r\n\t\t\treturn locations;\r\n\t\t}", "public List<String> locations() {\n return this.locations;\n }", "java.util.List<phaseI.Hdfs.DataNodeLocation> \n getLocationsList();", "public Location alliesSpawn(){\r\n\t\treturn alliesSpawn;\r\n\t}", "public ImmutableSimpleLocation getSpawn() {\n return spawn;\n }", "ArrayList<Location> getMoveLocations();", "public Position[] getSpawningPositions()\r\n {\r\n return concatArrays(metro.symbolPositions(' '), metro.symbolPositions('X'));\r\n }", "public ArrayList<Location> getMoveLocations()\n {\n ArrayList<Location> locs = new ArrayList<Location>();\n ArrayList<Location> validLocations = getGrid().getValidAdjacentLocations(getLocation());\n for (Location neighborLoc : validLocations)\n {\n if (getGrid().get(neighborLoc) == null || getGrid().get(neighborLoc) instanceof AbstractPokemon || getGrid().get(neighborLoc) instanceof PokemonTrainer)\n locs.add(neighborLoc);\n }\n return locs;\n }", "public String getLocators() {\n return agentConfig.getLocators();\n }", "public ArrayList<Location> getEmptyLocations(){\n\n\t\tArrayList<Tile> emptyTiles = getEmptyTiles();\n\t\tArrayList<Location> emptyLocations = new ArrayList<Location>();\n\n\t\tfor (Tile t : emptyTiles) {\n\n\t\t\temptyLocations.add(t.getLocation());\n\t\t}\n\t\treturn emptyLocations;\n\t}", "public Location[] getLocation() {\r\n return locations;\r\n }", "@Override\n\tpublic List<SourceLocation> getLocations() {\n\t\treturn null;\n\t}", "public Set<Location> getPlayerLocations()\n\t{\n\t\tSet<Location> places = new HashSet<Location>();\n\t\tfor(Location place: playerLocations.values())\n\t\t{\n\t\t\tplaces.add(place);\n\t\t}\n\t\treturn places;\n\t}", "public String[] getAllLocations() {\n // STUB: Return the list of source names\n return null;\n }", "public Location mainSpawn(){\r\n\t\treturn mainSpawn;\r\n\t}", "public java.util.List<? extends phaseI.Hdfs.DataNodeLocationOrBuilder> \n getLocationsOrBuilderList() {\n if (locationsBuilder_ != null) {\n return locationsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(locations_);\n }\n }", "public void initSpawnPoints() {\n this.spawnPointList = new ArrayList<Node>();\n \n //Player spawn point location (5,0,47) In Ready Room\n this.addSpawnPoint(5.5f,0,47.5f,90, true);\n //Mob spawn point location (16,0,47) In Zone 2\n this.addSpawnPoint(16.5f, 0, 47.5f, 270, false); \n //Mob spawn point location (21,0,43)\n this.addSpawnPoint(21.5f, 0, 43.5f, 0,false);\n \n //Mob spawners in Zone 3\n this.addSpawnPoint(17.5f, 0, 37.5f, 90, false);\n this.addSpawnPoint(29.5f, 0, 37.5f, 90, false);\n this.addSpawnPoint(17.5f, 0, 29.5f, 270, false);\n \n //Mob spawners in Zone 4\n this.addSpawnPoint(12.5f, 0, 29.5f, 90, false);\n this.addSpawnPoint(6.5f, 0, 20.5f, 0, false);\n \n //Mob spawners in Zone 5\n this.addSpawnPoint(9.5f, 0, 6.5f, 0, false);\n this.addSpawnPoint(17.5f, 0, 6.5f, 0, false);\n this.addSpawnPoint(24.5f, 0, 8.5f, 270, false);\n this.addSpawnPoint(24.5f, 0, 11.5f, 270, false);\n this.addSpawnPoint(24.5f, 0, 14.5f, 270, false);\n }", "public java.util.List<phaseI.Hdfs.BlockLocations> getBlockLocationsList() {\n return blockLocations_;\n }", "public ArrayList<Location> getLocations() {\n return locations;\n }", "public ArrayList<Location> getDocks() {\n return locations.stream().filter(loc -> loc.getClass().getSimpleName().equals(\"Dock\")).collect(Collectors.toCollection(ArrayList::new));\n }", "@Override\n public Iterable<Location> listLocations() {\n return ImmutableSet.<Location>of();\n }", "public java.util.List<phaseI.Hdfs.BlockLocations> getBlockLocationsList() {\n if (blockLocationsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(blockLocations_);\n } else {\n return blockLocationsBuilder_.getMessageList();\n }\n }", "private List<LatLng> getCoordinates() {\n\n List<LatLng> list = new ArrayList<>();\n SharedPreferences.Editor editor = walkingSharedPreferences.edit();\n int size = walkingSharedPreferences.getInt(user.getUsername(), 0);\n for(int actual = 0; actual < size; actual++) {\n String pos = walkingSharedPreferences.getString(user.getUsername() + \"_\" + actual, \"\");\n editor.remove(user.getUsername() + \"_\" + actual);\n String[] splitPos = pos.split(\" \");\n LatLng latLng = new LatLng(Double.parseDouble(splitPos[LAT]), Double.parseDouble(splitPos[LNG]));\n list.add(latLng);\n }\n editor.remove(user.getUsername());\n editor.apply();\n return list;\n\n }", "public Point getSpawn() {\n\t\treturn spawn;\n\t}", "Collection<L> getLocations ();", "private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}", "public ArrayList<StartLocation> getAvailableStartLocs() {\r\n\t\treturn availableStartLocs;\r\n\t}", "public java.util.List<? extends phaseI.Hdfs.DataNodeLocationOrBuilder> \n getLocationsOrBuilderList() {\n return locations_;\n }", "public java.util.List<edu.usfca.cs.dfs.StorageMessages.StoreChunkLocation> getChunksLocationList() {\n if (chunksLocationBuilder_ == null) {\n return java.util.Collections.unmodifiableList(chunksLocation_);\n } else {\n return chunksLocationBuilder_.getMessageList();\n }\n }", "public ArrayList<HexLocation> getShuffledLocations() {\n\t\t\n\t\tArrayList<HexLocation> locations = new ArrayList<>();\n\t\t\n\t\tHex[][] h = hexGrid.getHexes();\n\t\tlocations.add(h[4][1].getLocation());\n\t\tlocations.add(h[2][2].getLocation());\n\t\tlocations.add(h[5][2].getLocation());\n\t\tlocations.add(h[1][2].getLocation());\n\t\tlocations.add(h[4][3].getLocation());\n\t\tlocations.add(h[3][1].getLocation());\n\t\tlocations.add(h[3][4].getLocation());\n\t\tlocations.add(h[3][5].getLocation());\n\t\tlocations.add(h[5][1].getLocation());\n\t\tlocations.add(h[2][1].getLocation());\n\t\tlocations.add(h[5][3].getLocation());\n\t\tlocations.add(h[2][3].getLocation());\n\t\tlocations.add(h[4][2].getLocation());\n\t\tlocations.add(h[3][2].getLocation());\n\t\tlocations.add(h[4][4].getLocation());\n\t\tlocations.add(h[1][3].getLocation());\n\t\tlocations.add(h[3][3].getLocation());\n\t\tlocations.add(h[2][4].getLocation());\n\t\t\n\t\tCollections.shuffle(locations);\n\t\treturn locations;\n\t}", "public java.util.List<? extends phaseI.Hdfs.BlockLocationsOrBuilder> \n getBlockLocationsOrBuilderList() {\n if (blockLocationsBuilder_ != null) {\n return blockLocationsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(blockLocations_);\n }\n }", "@Override\n\tpublic List<Location> getVertices() {\n\t\treturn locations;\n\t}", "java.util.List<phaseI.Hdfs.BlockLocations> \n getBlockLocationsList();", "public Map<String, Point> getLocationsAsStatic() {\n\t\treturn Collections.unmodifiableMap(new HashMap<String, Point>(locations));\n\t}", "java.util.List<edu.usfca.cs.dfs.StorageMessages.StoreChunkLocation> \n getChunksLocationList();", "public ArrayList<Actor> getActors(){\n\t\t\n\t\tArrayList<Location> occupiedLocations = getGrid().getOccupiedLocations();\n\t\toccupiedLocations.remove(getLocation());\n\t\tArrayList<Actor> actors = new ArrayList<Actor>();\n\t\t\n\t\tfor(int i = 0; i < occupiedLocations.size(); i++) {\n\t\t\tactors.add(getGrid().get(occupiedLocations.get(i)));\n\t\t}\n\t\t\n\t\treturn actors;\n\t}", "public ArrayList<Location> getLocations() {\n return this.imageLocs; \n }", "public java.util.List<EncounterLocation> location() {\n return getList(EncounterLocation.class, FhirPropertyNames.PROPERTY_LOCATION);\n }", "protected static LinkedList<Location> generateLocations() {\n int i = 0;\n LinkedList<Location> list = new LinkedList<Location>();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ImagePacker gearImgs = new ImagePacker();\n\n try {\n gearImgs.readDirectory(new File(Objects.requireNonNull(classLoader.getResource(\"assets/gear-tiles\")).getPath()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n for (i = 0; i < GEARTILES; i++) {\n list.add(new Location(LocationType.GEAR).withImg(gearImgs.popImg()));\n }\n list.get((int)(Math.random()*list.size())).toggleStartingLoc();\n\n Image waterImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-tile.jpg\")).toString());\n for (i = 0; i < WATERTILES; i++) {\n list.add(new Location(LocationType.WELL).withImg(waterImg));\n }\n\n Image waterFakeImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-fake-tile.jpg\")).toString());\n for (i = 0; i < WATERFAKETILES; i++) {\n list.add(new Location(LocationType.MIRAGE).withImg(waterFakeImg));\n }\n\n //TODO: Finish images\n for (i = 0; i < LANDINGPADTILES; i++) {\n list.add(new Location(LocationType.LANDINGPAD).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/landing-pad.jpg\")).toString())));\n }\n for (i = 0; i < TUNNELTILES; i++) {\n list.add(new Location(LocationType.TUNNEL).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/tunnel.jpg\")).toString())));\n }\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-LR.jpg\")).toString())));\n\n return list;\n }", "Set<Location> extractLocations() {\n try {\n Set<Location> extracted = CharStreams.readLines(\n gazetteer,\n new ExtractLocations(populationThreshold)\n );\n\n // Raw population stats doesn't work great in the internet as-is. Calibrate for online activity\n calibrateWeight(extracted);\n\n return extracted;\n\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n }", "public List<GeoRegionInner> locations() {\n return this.locations;\n }", "public Point[] getLocation()\n {\n return shipLocation.clone();\n }", "public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }", "private List<BaseLocation> getExpectedBaseLocations() {\r\n final List<BaseLocation> baseLocations = new ArrayList<>();\r\n\r\n final Position position1 = new Position(3104, 3856, PIXEL);\r\n final Position center1 = new Position(3040, 3808, PIXEL);\r\n baseLocations.add(new BaseLocation(position1, center1, 13500, 5000, true, false, true));\r\n\r\n final Position position2 = new Position(2208, 3632, PIXEL);\r\n final Position center2 = new Position(2144, 3584, PIXEL);\r\n baseLocations.add(new BaseLocation(position2, center2, 9000, 5000, true, false, false));\r\n\r\n final Position position3 = new Position(640, 3280, PIXEL);\r\n final Position center3 = new Position(576, 3232, PIXEL);\r\n baseLocations.add(new BaseLocation(position3, center3, 13500, 5000, true, false, true));\r\n\r\n final Position position4 = new Position(2688, 2992, PIXEL);\r\n final Position center4 = new Position(2624, 2944, PIXEL);\r\n baseLocations.add(new BaseLocation(position4, center4, 9000, 5000, true, false, false));\r\n\r\n final Position position5 = new Position(1792, 2480, PIXEL);\r\n final Position center5 = new Position(1728, 2432, PIXEL);\r\n baseLocations.add(new BaseLocation(position5, center5, 12000, 0, true, true, false));\r\n\r\n final Position position6 = new Position(3200, 1776, PIXEL);\r\n final Position center6 = new Position(3136, 1728, PIXEL);\r\n baseLocations.add(new BaseLocation(position6, center6, 13500, 5000, true, false, true));\r\n\r\n final Position position7 = new Position(640, 1968, PIXEL);\r\n final Position center7 = new Position(576, 1920, PIXEL);\r\n baseLocations.add(new BaseLocation(position7, center7, 9000, 5000, true, false, false));\r\n\r\n final Position position8 = new Position(1792, 1808, PIXEL);\r\n final Position center8 = new Position(1728, 1760, PIXEL);\r\n baseLocations.add(new BaseLocation(position8, center8, 12000, 0, true, true, false));\r\n\r\n final Position position9 = new Position(2336, 560, PIXEL);\r\n final Position center9 = new Position(2272, 512, PIXEL);\r\n baseLocations.add(new BaseLocation(position9, center9, 13500, 5000, true, false, true));\r\n\r\n final Position position10 = new Position(3584, 720, PIXEL);\r\n final Position center10 = new Position(3520, 672, PIXEL);\r\n baseLocations.add(new BaseLocation(position10, center10, 9000, 5000, true, false, false));\r\n\r\n final Position position11 = new Position(544, 432, PIXEL);\r\n final Position center11 = new Position(480, 384, PIXEL);\r\n baseLocations.add(new BaseLocation(position11, center11, 13500, 5000, true, false, true));\r\n\r\n return baseLocations;\r\n }", "public Location getBedSpawnLocation ( ) {\n\t\treturn extract ( handle -> handle.getBedSpawnLocation ( ) );\n\t}", "public java.util.List<? extends phaseI.Hdfs.BlockLocationsOrBuilder> \n getBlockLocationsOrBuilderList() {\n return blockLocations_;\n }", "public java.util.List<phaseI.Hdfs.DataNodeLocation.Builder> \n getLocationsBuilderList() {\n return getLocationsFieldBuilder().getBuilderList();\n }", "private void addSpawnsToList()\n\t{\n\t\tSPAWNS.put(1, new ESSpawn(1, GraciaSeeds.DESTRUCTION, new Location(-245790,220320,-12104), new int[]{TEMPORARY_TELEPORTER}));\n\t\tSPAWNS.put(2, new ESSpawn(2, GraciaSeeds.DESTRUCTION, new Location(-249770,207300,-11952), new int[]{TEMPORARY_TELEPORTER}));\n\t\t//Energy Seeds\n\t\tSPAWNS.put(3, new ESSpawn(3, GraciaSeeds.DESTRUCTION, new Location(-248360,219272,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(4, new ESSpawn(4, GraciaSeeds.DESTRUCTION, new Location(-249448,219256,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(5, new ESSpawn(5, GraciaSeeds.DESTRUCTION, new Location(-249432,220872,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(6, new ESSpawn(6, GraciaSeeds.DESTRUCTION, new Location(-248360,220888,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(7, new ESSpawn(7, GraciaSeeds.DESTRUCTION, new Location(-250088,219256,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(8, new ESSpawn(8, GraciaSeeds.DESTRUCTION, new Location(-250600,219272,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(9, new ESSpawn(9, GraciaSeeds.DESTRUCTION, new Location(-250584,220904,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(10, new ESSpawn(10, GraciaSeeds.DESTRUCTION, new Location(-250072,220888,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(11, new ESSpawn(11, GraciaSeeds.DESTRUCTION, new Location(-253096,217704,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(12, new ESSpawn(12, GraciaSeeds.DESTRUCTION, new Location(-253112,217048,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(13, new ESSpawn(13, GraciaSeeds.DESTRUCTION, new Location(-251448,217032,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(14, new ESSpawn(14, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(15, new ESSpawn(15, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(16, new ESSpawn(16, GraciaSeeds.DESTRUCTION, new Location(-251416,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(17, new ESSpawn(17, GraciaSeeds.DESTRUCTION, new Location(-249752,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(18, new ESSpawn(18, GraciaSeeds.DESTRUCTION, new Location(-249736,217688,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(19, new ESSpawn(19, GraciaSeeds.DESTRUCTION, new Location(-252472,215208,-12120), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(20, new ESSpawn(20, GraciaSeeds.DESTRUCTION, new Location(-252552,216760,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(21, new ESSpawn(21, GraciaSeeds.DESTRUCTION, new Location(-253160,216744,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(22, new ESSpawn(22, GraciaSeeds.DESTRUCTION, new Location(-253128,215160,-12096), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(23, new ESSpawn(23, GraciaSeeds.DESTRUCTION, new Location(-250392,215208,-12120), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(24, new ESSpawn(24, GraciaSeeds.DESTRUCTION, new Location(-250264,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(25, new ESSpawn(25, GraciaSeeds.DESTRUCTION, new Location(-249720,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(26, new ESSpawn(26, GraciaSeeds.DESTRUCTION, new Location(-249752,215128,-12096), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(27, new ESSpawn(27, GraciaSeeds.DESTRUCTION, new Location(-250280,216760,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(28, new ESSpawn(28, GraciaSeeds.DESTRUCTION, new Location(-250344,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(29, new ESSpawn(29, GraciaSeeds.DESTRUCTION, new Location(-252504,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(30, new ESSpawn(30, GraciaSeeds.DESTRUCTION, new Location(-252520,216792,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(31, new ESSpawn(31, GraciaSeeds.DESTRUCTION, new Location(-242520,217272,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(32, new ESSpawn(32, GraciaSeeds.DESTRUCTION, new Location(-241432,217288,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(33, new ESSpawn(33, GraciaSeeds.DESTRUCTION, new Location(-241432,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(34, new ESSpawn(34, GraciaSeeds.DESTRUCTION, new Location(-242536,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(35, new ESSpawn(35, GraciaSeeds.DESTRUCTION, new Location(-240808,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(36, new ESSpawn(36, GraciaSeeds.DESTRUCTION, new Location(-240280,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(37, new ESSpawn(37, GraciaSeeds.DESTRUCTION, new Location(-240280,218952,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(38, new ESSpawn(38, GraciaSeeds.DESTRUCTION, new Location(-240792,218936,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(39, new ESSpawn(39, GraciaSeeds.DESTRUCTION, new Location(-239576,217240,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(40, new ESSpawn(40, GraciaSeeds.DESTRUCTION, new Location(-239560,216168,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(41, new ESSpawn(41, GraciaSeeds.DESTRUCTION, new Location(-237896,216152,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(42, new ESSpawn(42, GraciaSeeds.DESTRUCTION, new Location(-237912,217256,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(43, new ESSpawn(43, GraciaSeeds.DESTRUCTION, new Location(-237896,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(44, new ESSpawn(44, GraciaSeeds.DESTRUCTION, new Location(-239560,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(45, new ESSpawn(45, GraciaSeeds.DESTRUCTION, new Location(-239560,214984,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(46, new ESSpawn(46, GraciaSeeds.DESTRUCTION, new Location(-237896,215000,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(47, new ESSpawn(47, GraciaSeeds.DESTRUCTION, new Location(-237896,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(48, new ESSpawn(48, GraciaSeeds.DESTRUCTION, new Location(-239560,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(49, new ESSpawn(49, GraciaSeeds.DESTRUCTION, new Location(-239544,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(50, new ESSpawn(50, GraciaSeeds.DESTRUCTION, new Location(-237912,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(51, new ESSpawn(51, GraciaSeeds.DESTRUCTION, new Location(-237912,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(52, new ESSpawn(52, GraciaSeeds.DESTRUCTION, new Location(-237912,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(53, new ESSpawn(53, GraciaSeeds.DESTRUCTION, new Location(-239560,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(54, new ESSpawn(54, GraciaSeeds.DESTRUCTION, new Location(-239560,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(55, new ESSpawn(55, GraciaSeeds.DESTRUCTION, new Location(-241960,214536,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(56, new ESSpawn(56, GraciaSeeds.DESTRUCTION, new Location(-241976,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(57, new ESSpawn(57, GraciaSeeds.DESTRUCTION, new Location(-243624,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(58, new ESSpawn(58, GraciaSeeds.DESTRUCTION, new Location(-243624,214520,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(59, new ESSpawn(59, GraciaSeeds.DESTRUCTION, new Location(-241976,212808,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(60, new ESSpawn(60, GraciaSeeds.DESTRUCTION, new Location(-241960,212280,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(61, new ESSpawn(61, GraciaSeeds.DESTRUCTION, new Location(-243624,212264,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(62, new ESSpawn(62, GraciaSeeds.DESTRUCTION, new Location(-243624,212792,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(63, new ESSpawn(63, GraciaSeeds.DESTRUCTION, new Location(-243640,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(64, new ESSpawn(64, GraciaSeeds.DESTRUCTION, new Location(-243624,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(65, new ESSpawn(65, GraciaSeeds.DESTRUCTION, new Location(-241976,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(66, new ESSpawn(66, GraciaSeeds.DESTRUCTION, new Location(-241976,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(67, new ESSpawn(67, GraciaSeeds.DESTRUCTION, new Location(-241976,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(68, new ESSpawn(68, GraciaSeeds.DESTRUCTION, new Location(-241976,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(69, new ESSpawn(69, GraciaSeeds.DESTRUCTION, new Location(-243624,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(70, new ESSpawn(70, GraciaSeeds.DESTRUCTION, new Location(-243624,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(71, new ESSpawn(71, GraciaSeeds.DESTRUCTION, new Location(-241256,208664,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(72, new ESSpawn(72, GraciaSeeds.DESTRUCTION, new Location(-240168,208648,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(73, new ESSpawn(73, GraciaSeeds.DESTRUCTION, new Location(-240168,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(74, new ESSpawn(74, GraciaSeeds.DESTRUCTION, new Location(-241256,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(75, new ESSpawn(75, GraciaSeeds.DESTRUCTION, new Location(-239528,208648,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(76, new ESSpawn(76, GraciaSeeds.DESTRUCTION, new Location(-238984,208664,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(77, new ESSpawn(77, GraciaSeeds.DESTRUCTION, new Location(-239000,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(78, new ESSpawn(78, GraciaSeeds.DESTRUCTION, new Location(-239512,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(79, new ESSpawn(79, GraciaSeeds.DESTRUCTION, new Location(-245064,213144,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(80, new ESSpawn(80, GraciaSeeds.DESTRUCTION, new Location(-245064,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(81, new ESSpawn(81, GraciaSeeds.DESTRUCTION, new Location(-246696,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(82, new ESSpawn(82, GraciaSeeds.DESTRUCTION, new Location(-246696,213160,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(83, new ESSpawn(83, GraciaSeeds.DESTRUCTION, new Location(-245064,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(84, new ESSpawn(84, GraciaSeeds.DESTRUCTION, new Location(-245048,210904,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(85, new ESSpawn(85, GraciaSeeds.DESTRUCTION, new Location(-246712,210888,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(86, new ESSpawn(86, GraciaSeeds.DESTRUCTION, new Location(-246712,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(87, new ESSpawn(87, GraciaSeeds.DESTRUCTION, new Location(-245048,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(88, new ESSpawn(88, GraciaSeeds.DESTRUCTION, new Location(-245064,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(89, new ESSpawn(89, GraciaSeeds.DESTRUCTION, new Location(-246696,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(90, new ESSpawn(90, GraciaSeeds.DESTRUCTION, new Location(-246712,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(91, new ESSpawn(91, GraciaSeeds.DESTRUCTION, new Location(-245048,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(92, new ESSpawn(92, GraciaSeeds.DESTRUCTION, new Location(-245048,207288,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(93, new ESSpawn(93, GraciaSeeds.DESTRUCTION, new Location(-246696,207304,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(94, new ESSpawn(94, GraciaSeeds.DESTRUCTION, new Location(-246712,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(95, new ESSpawn(95, GraciaSeeds.DESTRUCTION, new Location(-244328,207272,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(96, new ESSpawn(96, GraciaSeeds.DESTRUCTION, new Location(-243256,207256,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(97, new ESSpawn(97, GraciaSeeds.DESTRUCTION, new Location(-243256,205624,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(98, new ESSpawn(98, GraciaSeeds.DESTRUCTION, new Location(-244328,205608,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(99, new ESSpawn(99, GraciaSeeds.DESTRUCTION, new Location(-242616,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(100, new ESSpawn(100, GraciaSeeds.DESTRUCTION, new Location(-242104,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(101, new ESSpawn(101, GraciaSeeds.DESTRUCTION, new Location(-242088,205624,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(102, new ESSpawn(102, GraciaSeeds.DESTRUCTION, new Location(-242600,205608,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\t// Seed of Annihilation\n\t\tSPAWNS.put(103, new ESSpawn(103, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184519,183007,-10456), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(104, new ESSpawn(104, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184873,181445,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(105, new ESSpawn(105, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180962,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(106, new ESSpawn(106, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185321,181641,-10448), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(107, new ESSpawn(107, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184035,182775,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(108, new ESSpawn(108, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185433,181935,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(109, new ESSpawn(109, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183309,183007,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(110, new ESSpawn(110, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181886,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(111, new ESSpawn(111, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180392,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(112, new ESSpawn(112, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183793,183239,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(113, new ESSpawn(113, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184245,180848,-10464), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(114, new ESSpawn(114, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-182704,183761,-10528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(115, new ESSpawn(115, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184705,181886,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(116, new ESSpawn(116, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184304,181076,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(117, new ESSpawn(117, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183596,180430,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(118, new ESSpawn(118, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184422,181038,-10480), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(119, new ESSpawn(119, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181543,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(120, new ESSpawn(120, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184398,182891,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(121, new ESSpawn(121, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182848,-10584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(122, new ESSpawn(122, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178104,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(123, new ESSpawn(123, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177274,182284,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(124, new ESSpawn(124, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177772,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(125, new ESSpawn(125, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181532,180364,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(126, new ESSpawn(126, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181802,180276,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(127, new ESSpawn(127, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,180444,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(128, new ESSpawn(128, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182190,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(129, new ESSpawn(129, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177357,181908,-10576), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(130, new ESSpawn(130, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178747,179534,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(131, new ESSpawn(131, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,179534,-10392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(132, new ESSpawn(132, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178853,180094,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(133, new ESSpawn(133, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181937,179660,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(134, new ESSpawn(134, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-180992,179572,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(135, new ESSpawn(135, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185552,179252,-10368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(136, new ESSpawn(136, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178913,-10400), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(137, new ESSpawn(137, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184768,178348,-10312), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(138, new ESSpawn(138, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178574,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(139, new ESSpawn(139, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185062,178913,-10384), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(140, new ESSpawn(140, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181397,179484,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(141, new ESSpawn(141, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181667,179044,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(142, new ESSpawn(142, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185258,177896,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(143, new ESSpawn(143, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183506,176570,-10280), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(144, new ESSpawn(144, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183719,176804,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(145, new ESSpawn(145, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183648,177116,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(146, new ESSpawn(146, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183932,176492,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(147, new ESSpawn(147, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183861,176570,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(148, new ESSpawn(148, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183790,175946,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(149, new ESSpawn(149, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178641,179604,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(150, new ESSpawn(150, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178959,179814,-10432), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(151, new ESSpawn(151, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176367,178456,-10376), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(152, new ESSpawn(152, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175845,177172,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(153, new ESSpawn(153, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175323,177600,-10248), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(154, new ESSpawn(154, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174975,177172,-10216), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(155, new ESSpawn(155, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176019,178242,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(156, new ESSpawn(156, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174801,178456,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(157, new ESSpawn(157, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185648,183384,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(158, new ESSpawn(158, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186740,180908,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(159, new ESSpawn(159, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185297,184658,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(160, new ESSpawn(160, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185697,181601,-15488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(161, new ESSpawn(161, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186684,182744,-15536), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(162, new ESSpawn(162, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184908,183384,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(163, new ESSpawn(163, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185572,-15784), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(164, new ESSpawn(164, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185796,182616,-15608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(165, new ESSpawn(165, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184970,184385,-15648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(166, new ESSpawn(166, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185995,180809,-15512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(167, new ESSpawn(167, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182872,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(168, new ESSpawn(168, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185624,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(169, new ESSpawn(169, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184486,185774,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(170, new ESSpawn(170, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186496,184112,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(171, new ESSpawn(171, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184232,185976,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(172, new ESSpawn(172, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185673,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(173, new ESSpawn(173, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185733,184203,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(174, new ESSpawn(174, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185079,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(175, new ESSpawn(175, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184803,180710,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(176, new ESSpawn(176, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186293,180413,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(177, new ESSpawn(177, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182936,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(178, new ESSpawn(178, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184356,180611,-15496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(179, new ESSpawn(179, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185375,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(180, new ESSpawn(180, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184867,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(181, new ESSpawn(181, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180553,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(182, new ESSpawn(182, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180422,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(183, new ESSpawn(183, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181863,181138,-15120), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(184, new ESSpawn(184, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181732,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(185, new ESSpawn(185, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180684,180397,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(186, new ESSpawn(186, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-182256,180682,-15112), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(187, new ESSpawn(187, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,179492,-15392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(188, new ESSpawn(188, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(189, new ESSpawn(189, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186028,178856,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(190, new ESSpawn(190, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185224,179068,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(191, new ESSpawn(191, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(192, new ESSpawn(192, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(193, new ESSpawn(193, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180619,178855,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(194, new ESSpawn(194, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180255,177892,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(195, new ESSpawn(195, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185804,176472,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(196, new ESSpawn(196, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184580,176370,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(197, new ESSpawn(197, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184308,176166,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(198, new ESSpawn(198, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-183764,177186,-15304), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(199, new ESSpawn(199, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180801,177571,-15144), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(200, new ESSpawn(200, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184716,176064,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(201, new ESSpawn(201, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184444,175452,-15296), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(202, new ESSpawn(202, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,177464,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(203, new ESSpawn(203, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,178213,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(204, new ESSpawn(204, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-179982,178320,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(205, new ESSpawn(205, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176925,177757,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(206, new ESSpawn(206, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176164,179282,-15720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(207, new ESSpawn(207, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,177613,-15800), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(208, new ESSpawn(208, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175418,178117,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(209, new ESSpawn(209, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176103,177829,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(210, new ESSpawn(210, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175966,177325,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(211, new ESSpawn(211, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174778,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(212, new ESSpawn(212, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,178261,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(213, new ESSpawn(213, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176038,179192,-15736), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(214, new ESSpawn(214, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175660,179462,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(215, new ESSpawn(215, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175912,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(216, new ESSpawn(216, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175156,180182,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(217, new ESSpawn(217, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182059,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(218, new ESSpawn(218, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175590,181478,-15640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(219, new ESSpawn(219, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174510,181561,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(220, new ESSpawn(220, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182391,-15688), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(221, new ESSpawn(221, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174105,182806,-15672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(222, new ESSpawn(222, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174645,182806,-15712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(223, new ESSpawn(223, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214962,182403,-10992), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(224, new ESSpawn(224, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-215019,182493,-11000), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(225, new ESSpawn(225, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211374,180793,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(226, new ESSpawn(226, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211198,180661,-11680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(227, new ESSpawn(227, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213097,178936,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(228, new ESSpawn(228, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213517,178936,-12712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(229, new ESSpawn(229, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214105,179191,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(230, new ESSpawn(230, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213769,179446,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(231, new ESSpawn(231, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214021,179344,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(232, new ESSpawn(232, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210582,180595,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(233, new ESSpawn(233, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210934,180661,-11696), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(234, new ESSpawn(234, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207058,178460,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(235, new ESSpawn(235, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207454,179151,-11368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(236, new ESSpawn(236, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207422,181365,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(237, new ESSpawn(237, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207358,180627,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(238, new ESSpawn(238, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207230,180996,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(239, new ESSpawn(239, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208515,184160,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(240, new ESSpawn(240, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207613,184000,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(241, new ESSpawn(241, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208597,183760,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(242, new ESSpawn(242, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206710,176142,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(243, new ESSpawn(243, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206361,178136,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(244, new ESSpawn(244, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206178,178630,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(245, new ESSpawn(245, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205738,178715,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(246, new ESSpawn(246, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206442,178205,-12648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(247, new ESSpawn(247, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206585,178874,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(248, new ESSpawn(248, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206073,179366,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(249, new ESSpawn(249, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206009,178628,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(250, new ESSpawn(250, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206155,181301,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(251, new ESSpawn(251, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206595,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(252, new ESSpawn(252, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(253, new ESSpawn(253, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181471,-12640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(254, new ESSpawn(254, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206974,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(255, new ESSpawn(255, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206304,175130,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(256, new ESSpawn(256, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206886,175802,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(257, new ESSpawn(257, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207238,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(258, new ESSpawn(258, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,174857,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(259, new ESSpawn(259, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,175039,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(260, new ESSpawn(260, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205976,174584,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(261, new ESSpawn(261, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207367,184320,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(262, new ESSpawn(262, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219002,180419,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(263, new ESSpawn(263, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,182790,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(264, new ESSpawn(264, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,183343,-12600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(265, new ESSpawn(265, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186247,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(266, new ESSpawn(266, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186083,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(267, new ESSpawn(267, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-217574,185796,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(268, new ESSpawn(268, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219178,181051,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(269, new ESSpawn(269, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220171,180313,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(270, new ESSpawn(270, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219293,183738,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(271, new ESSpawn(271, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219381,182553,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(272, new ESSpawn(272, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219600,183024,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(273, new ESSpawn(273, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219940,182680,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(274, new ESSpawn(274, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219260,183884,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(275, new ESSpawn(275, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219855,183540,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(276, new ESSpawn(276, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218946,186575,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(277, new ESSpawn(277, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219882,180103,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(278, new ESSpawn(278, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219266,179787,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(279, new ESSpawn(279, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178337,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(280, new ESSpawn(280, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,179875,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(281, new ESSpawn(281, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,180021,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(282, new ESSpawn(282, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219989,179437,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(283, new ESSpawn(283, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219078,178298,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(284, new ESSpawn(284, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218684,178954,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(285, new ESSpawn(285, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219089,178456,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(286, new ESSpawn(286, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220266,177623,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(287, new ESSpawn(287, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178025,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(288, new ESSpawn(288, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219142,177044,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(289, new ESSpawn(289, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219690,177895,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(290, new ESSpawn(290, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219754,177623,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(291, new ESSpawn(291, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218791,177830,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(292, new ESSpawn(292, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218904,176219,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(293, new ESSpawn(293, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218768,176384,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(294, new ESSpawn(294, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177626,-11320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(295, new ESSpawn(295, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177792,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(296, new ESSpawn(296, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219880,175901,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(297, new ESSpawn(297, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219210,176054,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(298, new ESSpawn(298, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219850,175991,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(299, new ESSpawn(299, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219079,175021,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(300, new ESSpawn(300, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218812,174229,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(301, new ESSpawn(301, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218723,174669,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\t//@formatter:on\n\t}", "java.util.List<? extends phaseI.Hdfs.DataNodeLocationOrBuilder> \n getLocationsOrBuilderList();", "public List<LocationInfo> getAllLocation() {\n return allLocation;\n }", "protected abstract void getAllUniformLocations();", "public PluginLocation[] getBuiltinPluginLocations()\r\n {\r\n java.lang.String conf = \"/net/sf/xpontus/plugins/plugins.txt\";\r\n\r\n InputStream is = null;\r\n LineIterator it = null;\r\n\r\n List<PluginLocation> locations = new ArrayList<PluginLocation>();\r\n\r\n try\r\n {\r\n is = getClass().getResourceAsStream(conf);\r\n it = IOUtils.lineIterator(is, \"UTF-8\");\r\n\r\n while (it.hasNext())\r\n {\r\n String line = it.nextLine();\r\n\r\n PluginLocation loc = getPluginLocation(line);\r\n locations.add(loc);\r\n }\r\n }\r\n catch (IOException ex)\r\n {\r\n LOG.error(ex.getMessage(), ex);\r\n }\r\n finally\r\n {\r\n if (is != null)\r\n {\r\n IOUtils.closeQuietly(is);\r\n }\r\n\r\n if (it != null)\r\n {\r\n LineIterator.closeQuietly(it);\r\n }\r\n }\r\n\r\n return (PluginLocation[]) locations.toArray(new PluginLocation[0]);\r\n }", "public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}", "public List<Integer> pacmanLocation(){\n\n pacmanLocay.add(0);\n pacmanLocay.add(0);\n\n return pacmanLocay;\n }", "public java.util.List<? extends edu.usfca.cs.dfs.StorageMessages.StoreChunkLocationOrBuilder> \n getChunksLocationOrBuilderList() {\n if (chunksLocationBuilder_ != null) {\n return chunksLocationBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(chunksLocation_);\n }\n }", "public interface IGameSpawn {\n\n\t/**\n\t * @return the {@link BaseGame} of this spawn\n\t */\n\t@NotNull\n\tBaseGame getGame();\n\n\t/**\n\t * Checks if this spawn are ready for use or not.\n\t * \n\t * @return true if ready\n\t */\n\tboolean isReady();\n\n\t/**\n\t * Returns an unmodifiable list of spawn locations.\n\t * \n\t * @return an unmodifiable list of location\n\t */\n\t@NotNull\n\tjava.util.List<@NotNull Location> getSpawnLocations();\n\n\t/**\n\t * Adds a new spawn location to the list.\n\t * \n\t * @param loc The {@link Location} where to save\n\t * @return true if added\n\t */\n\tboolean addSpawn(@NotNull Location loc);\n\n\t/**\n\t * Removes a spawn by location.\n\t * \n\t * @param loc The {@link Location} where to remove.\n\t * @return true if removed\n\t */\n\tboolean removeSpawn(@NotNull Location loc);\n\n\t/**\n\t * Removes all cached spawns locations.\n\t */\n\tvoid removeAllSpawn();\n\n\t/**\n\t * Checks if the game have any spawn saved.\n\t * \n\t * @return true if the game have spawn set\n\t */\n\tboolean haveAnySpawn();\n\n\t/**\n\t * Gets a random spawn location from the cached list. In case if this method returns null, means that there was no\n\t * spawn added before.\n\t * \n\t * @return {@link org.bukkit.Location}\n\t */\n\t@Nullable\n\tLocation getRandomSpawn();\n}", "public ArrayList<GamePiece> getGamePiecesAtLocation(Location loc)\n\t{\n\t\tArrayList<GamePiece> pieceLocation = new ArrayList<GamePiece>();\n\t\tfor(String name: getPlayersAtLocation(loc))\n\t\t{\n\t\t\tpieceLocation.add(getPlayerGamePiece(name));\n\t\t}\n\t\treturn pieceLocation;\n\t}", "public phaseI.Hdfs.DataNodeLocation getLocations(int index) {\n return locations_.get(index);\n }", "public PawnIterator getPawns(){\n\t\treturn new PawnIterator(pawns);\n\t}", "public Cursor getAllLocationsLoc(){\n if (mDB != null)\n return mDB.query(LOCNODE_TABLE, new String[] { FIELD_ROW_ID, FIELD_NAME, FIELD_ADDY, FIELD_LAT , FIELD_LNG, FIELD_TIMESVISITED }, null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "public Position[] getConvientBaseBuildingLocations() {\n\t\treturn convientBaseLocations;\n\t}", "public List<LeveledMonster> getSpawnableMonsters(int level, EntityType type, Location location){\n if (enabled){\n List<LeveledMonster> spawnableMonsters = new ArrayList<>();\n for (LeveledMonster m : allMonsters){\n if (m.getEntityType() == type && (m.getLevel() == level || m.doesSpawnWithoutLevel()) && m.isEnabled()){\n if (location != null){\n if (m.getMinYRange() > location.getY() || m.getMaxYRange() < location.getY()){\n continue;\n }\n if (m.getBiomeFilter().size() > 0){\n boolean biomeCompatible = false;\n for (String key : m.getBiomeFilter()){\n Container<List<Biome>, Material> container = BiomeCategoryManager.getInstance().getAllBiomes().get(key);\n if (container != null){\n if (container.getKey().contains(location.getBlock().getBiome())){\n biomeCompatible = true;\n break;\n }\n }\n }\n if (!biomeCompatible) continue;\n }\n if (WorldguardManager.getWorldguardManager().useWorldGuard()){\n if (m.getRegionFilter().size() > 0){\n boolean regionCompatible = false;\n for (String region : m.getRegionFilter()){\n if (WorldguardManager.getWorldguardManager().getLocationRegions(location).contains(region)){\n regionCompatible = true;\n break;\n }\n }\n if (!regionCompatible) continue;\n }\n }\n if (m.getWorldFilter().size() > 0){\n if (!m.getWorldFilter().contains(location.getBlock().getWorld().getName())){\n continue;\n }\n }\n }\n spawnableMonsters.add(m);\n }\n }\n return spawnableMonsters;\n } else {\n return new ArrayList<>();\n }\n }", "public String[] locationNames(){\n\t\tString[] s = new String[locations.length];\n\t\tfor(int i=0; i<locations.length; i++){\n\t\t\ts[i] = locations[i].toString();\n\t\t}\n\t\treturn s;\n\t\t//return Arrays.copyOf(locations, locations.length, String[].class);\n\t}", "private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }", "public ArrayList<Actor> getEnemies() {\n return getGrid().getNeighbors(getLocation());\n }", "private void loadVariablesFromConfig()\n {\n List<String> spawnNames = (List<String>) spawnConfig.getConfig().getList(\"spawns\");\n for (String spawn : spawnNames) {\n Location location = new Location(\n getServer().getWorld(spawnConfig.getConfig().getString(\"spawn.\" + spawn + \".world\")),\n spawnConfig.getConfig().getDouble(\"spawn.\" + spawn + \".x\"),\n spawnConfig.getConfig().getDouble(\"spawn.\" + spawn + \".y\"),\n spawnConfig.getConfig().getDouble(\"spawn.\" + spawn + \".z\"));\n location.setPitch(spawnConfig.getConfig().getInt(\"spawn.\" + spawn + \".pitch\"));\n location.setYaw(spawnConfig.getConfig().getInt(\"spawn.\" + spawn + \".yaw\"));\n\n spawnLocations.add(location);\n }\n\n // Spectator Spawn\n spectatorSpawn = new Location(\n getServer().getWorld(spawnConfig.getConfig().getString(\"spectatorSpawn.world\")),\n spawnConfig.getConfig().getDouble(\"spectatorSpawn.x\"),\n spawnConfig.getConfig().getDouble(\"spectatorSpawn.y\"),\n spawnConfig.getConfig().getDouble(\"spectatorSpawn.z\"));\n spectatorSpawn.setPitch(spawnConfig.getConfig().getInt(\"spectatorSpawn.pitch\"));\n spectatorSpawn.setYaw(spawnConfig.getConfig().getInt(\"spectatorSpawn.yaw\"));\n }", "public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }", "@Override\r\n\tpublic List<Coordinate> getPossibleLocations(Coordinate currentLocation) {\r\n\r\n\t\tList<Coordinate> possibleCoordinates = new ArrayList<Coordinate>();\r\n\t\tint x = currentLocation.getX();\r\n\t\tint y = currentLocation.getY();\r\n\t\twhile (x > 0 && y > 0) {\r\n\t\t\tx--;\r\n\t\t\ty--;\r\n\t\t\tpossibleCoordinates.add(new Coordinate(x, y));\r\n\t\t}\r\n\t\tx = currentLocation.getX();\r\n\t\ty = currentLocation.getY();\r\n\r\n\t\twhile (x < Board.SIZE - 1 && y < Board.SIZE - 1) {\r\n\t\t\tx++;\r\n\t\t\ty++;\r\n\t\t\tpossibleCoordinates.add(new Coordinate(x, y));\r\n\t\t}\r\n\r\n\t\tx = currentLocation.getX();\r\n\t\ty = currentLocation.getY();\r\n\r\n\t\twhile (x > 0 && y < Board.SIZE - 1) {\r\n\t\t\tx--;\r\n\t\t\ty++;\r\n\t\t\tpossibleCoordinates.add(new Coordinate(x, y));\r\n\t\t}\r\n\r\n\t\tx = currentLocation.getX();\r\n\t\ty = currentLocation.getY();\r\n\t\twhile (x < Board.SIZE - 1 && y > 0) {\r\n\t\t\tx++;\r\n\t\t\ty--;\r\n\t\t\tpossibleCoordinates.add(new Coordinate(x, y));\r\n\t\t}\r\n\t\treturn possibleCoordinates;\r\n\t}", "public abstract java.util.Set getLocations();", "public static List<World> getWorlds() {\n\t\treturn worlds;\n\t}", "public void createList () {\n imageLocs = new ArrayList <Location> ();\n for (int i = xC; i < xLength * getPixelSize() + xC; i+=getPixelSize()) {\n for (int j = yC; j < yLength * getPixelSize() + yC; j+=getPixelSize()) {\n Location loc = new Location (i, j, LocationType.POWERUP, true);\n\n imageLocs.add (loc);\n getGridCache().add(loc);\n \n }\n }\n }", "public java.util.List<edu.usfca.cs.dfs.StorageMessages.StoreChunkLocation> getChunksLocationList() {\n return chunksLocation_;\n }", "public ArrayList<Guppy> spawn() {\n if (!this.isFemale) { return null; }\n if (this.ageInWeeks < MINIMUM_SPAWNING_AGE) { return null; }\n if (Double.compare(this.randomNumberGenerator.nextDouble(), SPAWN_CHANCE) > 0) { return null; }\n\n ArrayList<Guppy> babyGuppies = new ArrayList<>();\n int babiesAmount = this.randomNumberGenerator.nextInt(MAX_BABIES_SPAWN_AMOUNT + 1);\n for (int i = 0; i < babiesAmount; i++) {\n babyGuppies.add(new Guppy(this.genus,\n this.species,\n 0,\n this.randomNumberGenerator.nextBoolean(),\n this.generationNumber + 1,\n (this.healthCoefficient + 1) / 2));\n }\n return babyGuppies;\n }", "private static void getFighterCoordinateList()\n\t\tthrows IOException\n\t{\n\t\tgetUnitsCoordinateDict();\n\t\tfighter_coordinate_list = unit_coordinate_dict.get(\"Fighter\");\n\t}", "public Location axisSpawn(){\r\n\t\treturn axisSpawn;\r\n\t}", "public ArrayList<String> getPlayersAtLocation(Location loc)\n\t{\n\t\tSet<String> playerLocation = playerLocations.keySet();\n\t\tArrayList<String> player = new ArrayList<String>();\n\t\tfor (String name: playerLocation) \n\t\t{\n\t\t\tif(playerLocations.get(name) == loc)\n\t\t\t{\n\t\t\t\tplayer.add(name);\n\t\t\t}\n\t\t}\n\t\treturn player;\n\t}", "@Override\n public List<Set<String>> getPlayersVisibleTo(){\n Set<String> players = new HashSet<String>();\n players.add(destination.getOwner().getName());\n for(Region adj : destination.getAdjRegions()){\n players.add(adj.getOwner().getName());\n }\n //All adjacent can see cloaking happened\n return Arrays.asList(players);\n }", "public static ArrayList<XYCoord> findVisibleLocations(GameMap map, Unit viewer, boolean piercing)\n {\n return findVisibleLocations(map, viewer, viewer.x, viewer.y, piercing);\n }", "public static LocationId getLocationIds()\n {\n LocationId locnIds = new LocationId();\n IoTGateway.getGlobalStates().forEach(\n (locn,sv)->{\n locnIds.addId(locn);\n }\n );\n return locnIds;\n }", "public List<LatLng> getCoordinates() {\n return mCoordinates;\n }", "public void setSpawnLocation(Location spawnLocation) {\n this.spawnLocation = spawnLocation;\n }", "phaseI.Hdfs.DataNodeLocation getLocations(int index);", "java.util.List<? extends phaseI.Hdfs.BlockLocationsOrBuilder> \n getBlockLocationsOrBuilderList();", "public List<Location> neighbors (Location pos);", "public List<LatLng> getCoordinates() {\n return getGeometryObject();\n }", "public ArrayList<Location> getValid(Location loc) {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<Location> valid = new ArrayList<Location>();\n\t\tfor (int d : DIRS) {\n\t\t\tLocation neighbor = loc.getAdjacentLocation(getDirection() + d);\n\n\t\t\tif (gr.isValid(neighbor)) {\n\t\t\t\tActor a = gr.get(neighbor);\n\t\t\t\tif (!isVisited[neighbor.getRow()][neighbor.getCol()] &&\n\t\t\t\t\t(a == null || a instanceof Flower)) {\n\t\t\t\t\tvalid.add(neighbor);\n\t\t\t\t} else if (a instanceof Rock && a.getColor().equals(Color.RED)) {\n\t\t\t\t\tisEnd = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn valid;\n\t}", "public LookupLocator[] getLookupLocators() throws RemoteException {\n\t\treturn disco.getLocators();\n\t}", "public ArrayList<LocationDetail> getLocations() throws LocationException;" ]
[ "0.7417547", "0.69567794", "0.689372", "0.68860596", "0.67930967", "0.6685461", "0.66074836", "0.6559281", "0.6508373", "0.65066475", "0.6491946", "0.6460814", "0.64523005", "0.644078", "0.6355418", "0.6354624", "0.63370717", "0.6323639", "0.6320592", "0.6275313", "0.62521976", "0.62417424", "0.6235633", "0.6195724", "0.6191908", "0.616891", "0.616806", "0.61590004", "0.6151592", "0.611219", "0.60968834", "0.609476", "0.6094076", "0.6076238", "0.6060325", "0.6054243", "0.60368216", "0.6032623", "0.60076153", "0.598372", "0.5966287", "0.59627515", "0.59614927", "0.5958202", "0.5933281", "0.5932294", "0.5931393", "0.59169286", "0.587949", "0.5867579", "0.58503777", "0.58265996", "0.5815024", "0.58016187", "0.57996005", "0.5799027", "0.57937425", "0.5787463", "0.57817835", "0.5750817", "0.5732281", "0.57306296", "0.57277274", "0.5716289", "0.57056004", "0.57040685", "0.5699268", "0.5692633", "0.568672", "0.5660086", "0.5657389", "0.5644812", "0.56322235", "0.56315506", "0.5626456", "0.5616373", "0.5611001", "0.56102705", "0.56091136", "0.5607258", "0.56045353", "0.55980045", "0.55915534", "0.55902797", "0.5575658", "0.5568052", "0.55656815", "0.55639803", "0.5561548", "0.5547117", "0.55410063", "0.5538391", "0.5532904", "0.55148154", "0.55142874", "0.55117416", "0.5509881", "0.55056936", "0.550394", "0.54950523" ]
0.8917397
0
Removes all cached spawns locations.
void removeAllSpawn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}", "public void resetLocation()\r\n {\r\n locations.clear();\r\n }", "public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "public void removeStalePortalLocations(long worldTime) {\n/* 410 */ if (worldTime % 100L == 0L) {\n/* */ \n/* 412 */ long i = worldTime - 300L;\n/* 413 */ ObjectIterator<PortalPosition> objectiterator = this.destinationCoordinateCache.values().iterator();\n/* */ \n/* 415 */ while (objectiterator.hasNext()) {\n/* */ \n/* 417 */ PortalPosition teleporter$portalposition = (PortalPosition)objectiterator.next();\n/* */ \n/* 419 */ if (teleporter$portalposition == null || teleporter$portalposition.lastUpdateTime < i)\n/* */ {\n/* 421 */ objectiterator.remove();\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "public void removePlaces(){\n List<Place> copies = new ArrayList<>(places);\n for(Place p : copies){\n p.reset();\n }\n }", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "public void clear() {\n\t\tlocation.clear();\n\t\theap.clear();\n\t}", "public void clearMap() {\n\t\tfor (int i = 0; i < parkingsArray.size(); i++)\n\t\t\tparkingsArray.valueAt(i).removeMarker();\n\t\tparkingsArray.clear();\n\t\tmap.clear();\n\t}", "public void clearAll() {\n\n\t\t// Removing the graphics from the layer\n\t\trouteLayer.removeAll();\n\t\t// hiddenSegmentsLayer.removeAll();\n\t\tmMapViewHelper.removeAllGraphics();\n\t\tmResults = null;\n\n\t}", "public void flushCaches() {\n LOCAL_SMALL_CACHE.clear();\n LOCAL_LARGE_CACHE.clear();\n }", "public synchronized void removeForServer(ServerName serverName) {\n for (Map.Entry<byte[], RegionLocations> entry : cache.entrySet()) {\n byte[] regionName = entry.getKey();\n RegionLocations locs = entry.getValue();\n RegionLocations newLocs = locs.removeByServer(serverName);\n if (locs == newLocs) {\n continue;\n }\n if (newLocs.isEmpty()) {\n cache.remove(regionName, locs);\n } else {\n cache.put(regionName, newLocs);\n }\n }\n }", "public void clearLociLocus() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "private void clearCachedLocationForServer(final String server) {\n boolean deletedSomething = false;\n synchronized (this.cachedRegionLocations) {\n if (!cachedServers.contains(server)) {\n return;\n }\n for (Map<byte[], HRegionLocation> tableLocations :\n cachedRegionLocations.values()) {\n for (Entry<byte[], HRegionLocation> e : tableLocations.entrySet()) {\n HRegionLocation value = e.getValue();\n if (value != null\n && value.getHostnamePort().equals(server)) {\n tableLocations.remove(e.getKey());\n deletedSomething = true;\n }\n }\n }\n cachedServers.remove(server);\n }\n if (deletedSomething && LOG.isDebugEnabled()) {\n LOG.debug(\"Removed all cached region locations that map to \" + server);\n }\n }", "public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }", "private void cleanUpAfterMove(Unit unit){\n\t\t\t//add current location\n\t\t\tpastLocations.add(unit.location().mapLocation());\n\t\t\t//get rid of oldest to maintain recent locations\n\t\t\tif (pastLocations.size()>9)\n\t\t\t\tpastLocations.remove(0);\t\n\t}", "private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }", "private void clearCache() {\r\n for (int i = 1; i < neurons.length; i++) {\r\n for (int j = 0; j < neurons[i].length; j++) {\r\n neurons[i][j].clearCache();\r\n }\r\n }\r\n }", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public void clearMarkers() {\n googleMap.clear();\n markers.clear();\n }", "public void clearLocusLocus() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }", "public void clearCache()\n/* */ {\n/* 330 */ if (!this.clearLocalCacheOnly) {\n/* 331 */ for (Painter p : this.painters) {\n/* 332 */ if ((p instanceof AbstractPainter)) {\n/* 333 */ AbstractPainter ap = (AbstractPainter)p;\n/* 334 */ ap.clearCache();\n/* */ }\n/* */ }\n/* */ }\n/* 338 */ super.clearCache();\n/* */ }", "private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}", "public void cleanCaches() {\n WorkspaceConfig workspace = mvc.model.getWorkspace();\n Set<String> used = new HashSet<>();\n // Get list of queries used by graphs\n for (GraphConfig graph : workspace.graphs) {\n graph.accept(new GraphVisitor() {\n\n @Override\n public void visit(HistogramConfig graph) {\n try {\n used.add(DatabaseQueryFactory.generateSQL(graph.query));\n } catch (Exception e) {\n // just do nothing if it's broken\n }\n }\n\n @Override\n public void visit(LineGraphConfig graph) {\n for (LineConfig line : graph.lines) {\n try {\n used.add(DatabaseQueryFactory.generateSQL(line.query));\n } catch (Exception e) {\n // just do nothing if it's broken\n }\n }\n }\n });\n }\n // Get list of queries used by statistics\n for (StatisticConfig statistic : workspace.statistics) {\n for (Metric metric : Metric.getStatisticTypes()) {\n statistic.query.metric = metric;\n try {\n used.add(DatabaseQueryFactory.generateSQL(statistic.query));\n } catch (Exception e) {\n // just do nothing if it's broken\n }\n }\n statistic.query.metric = null;\n }\n\n // Remove any cache that is not used\n Iterator<String> itrCaches = workspace.caches.keySet().iterator();\n while (itrCaches.hasNext()) {\n String cache = itrCaches.next();\n if (!used.contains(cache)) {\n itrCaches.remove();\n }\n }\n }", "public void clearCache() {\n\t\troutes_.clearCache();\n\t}", "private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }", "public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }", "public void clearLoci() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "public void removeAllContentFromLocation() {\n\n\t\tcontentMap.clear();\n\t}", "public static void worldLocsRemove(UUID uuid) {\n\n\t\ttry {\n\n\t\t\tStatement st = conn.createStatement();\n\n\t\t\tst.executeUpdate(\"DELETE FROM worldlocs WHERE uuid='\" + uuid + \"';\");\n\n\t\t} catch (Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}", "public void clear()\n {\n getMap().clear();\n }", "public void clear() { \r\n\t\tmap.clear();\r\n\t}", "private void clearLists() {\n\t\tobjects = new ArrayList<Entity>();\n\t\tenemies.clear();\n\t\titemList.clear();\n\t}", "public void removeAllMissiles(){\n\t\tfor (Missile missile : this.missiles){\n\t\t\tif(!missile.isDestroyed() && missile != null){\n\t\t\t\tmissile.setDestroyed(true);\n\t\t\t\tmissile = null;\n\t\t\t}\n\t\t}\n\t\tfor (Missile fMissile : this.friendlyMissiles){\n\t\t\tif(!fMissile.isDestroyed() && fMissile != null){\n\t\t\t\tfMissile.setDestroyed(true);\n\t\t\t\tfMissile = null;\n\t\t\t}\n\t\t}\n\t}", "public void clear() {\n\t\tmap.clear();\n\t}", "@VisibleForTesting\n public static void clearCachedPaths() {\n requireNonNull(CACHE, \"CACHE\");\n CACHE.asMap().clear();\n }", "void clear() {\n this.mapped_vms.clear();\n this.mapped_anti_coloc_job_ids.clear();\n this.used_cpu = BigInteger.ZERO;\n this.used_mem = BigInteger.ZERO;\n }", "public static void clearUnSatsCache(){\n\n unsats = getUnSats();\n unsats.clear();\n }", "@Override\n\tpublic void unloadAllChunks() {\n\t\tfor (Column column : this.loadedColumns.values()) {\n\t\t\tfor (Cube cube : column.getCubes()) {\n\t\t\t\tthis.cubesToUnload.add(cube.getAddress());\n\t\t\t}\n\t\t}\n\t}", "public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}", "public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public static void clearWorld() {\n\t\t// Complete this method.\n\t\tfor(Critter i: population){\n\t\t\tpopulation.remove(i);\n\t\t}\n\t\tfor(Critter j: babies){\n\t\t\tbabies.remove(j);\n\t\t}\n\t\tpopulation.clear();\n\t\tbabies.clear();\n\n\n\t}", "public void clear() {\n map.clear();\n }", "public void clearTombstones(Player p) {\n\t\tSet<Tile> tombstoneTiles = getTombstoneTiles(p);\n\t\tfor (Tile t : tombstoneTiles) {\n\t\t\t//Destroy tombstone and update land type to grass\n\t\t\tt.destroyStructure();\n\t\t\tt.updateLandType(LandType.Tree);\n\t\t}\n\t}", "public void clear() {\n map.clear();\n }", "public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }", "public static void clearWorld() {\n // TODO: Complete this method\n population.clear();\n babies.clear();\n }", "public void reset() {\n\t\ttilePath.clear();\n\t}", "public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}", "public void clearAllPoints() {\n\t\tpoints.clear();\n\t\tnotifyListeners();\n\t}", "public void resetMap() {\r\n\t\tfor(Block b: this.blockMap) {\r\n\t\t\tb.resetLives();\r\n\t\t}\r\n\t}", "public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }", "@Override\n public void clearLocation() {\n for (Creature creature : getCreatures().values()) {\n if (isEnemy(creature)) {\n if (creature instanceof Kisk) {\n Kisk kisk = (Kisk) creature;\n kisk.getController().die();\n }\n }\n }\n\n for (Player player : getPlayers().values())\n if (isEnemy(player))\n TeleportService2.moveToBindLocation(player, true);\n }", "public void\tclear() {\n\t\tmap.clear();\n\t}", "public void clear() {\r\n this.map.clear();\r\n }", "public void clearInactiveCacheRefs()\n {\n for (Iterator<Map> iterByName = m_mapByName.values().iterator(); iterByName.hasNext(); )\n {\n Map mapByLoader = iterByName.next();\n\n synchronized (mapByLoader)\n {\n for (Iterator iter = mapByLoader.entrySet().iterator(); iter.hasNext(); )\n {\n Map.Entry entry = (Map.Entry) iter.next();\n\n Object oHolder = entry.getValue();\n\n if (oHolder instanceof NamedCache)\n {\n NamedCache cache = (NamedCache) entry.getValue();\n\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n else if (oHolder instanceof SubjectScopedReference)\n {\n Collection col = ((SubjectScopedReference) oHolder).values();\n\n if (!col.isEmpty())\n {\n // all the entries in the SubjectScopedReference refer\n // to the same NamedCache instance, so we only need to\n // check the first one\n NamedCache cache = (NamedCache) col.iterator().next();\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n }\n }\n\n if (mapByLoader.isEmpty())\n {\n iterByName.remove();\n }\n }\n }\n }", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "@NotNull\n\tjava.util.List<@NotNull Location> getSpawnLocations();", "@Override\r\n public void clearMarkers() {\r\n if (mMarkerList != null) {\r\n for (Marker marker : mMarkerList) {\r\n marker.remove();\r\n }\r\n mMarkerList.clear();\r\n }\r\n }", "public void cleanToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"CLEAN\",null));\n\t\t}\n\t}", "public void removeAll() {\n\t\tsynchronized (mNpcs) {\n\t\t\tmNpcs = Collections.synchronizedList(new ArrayList<Npc>());\n\t\t\tmDemonCount = 0;\n\t\t\tmHumanCount = 0;\n\t\t}\n\t}", "public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }", "@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }", "public void clearLookups() {\n diseaseMap = null;\n feedMap = null;\n healthMapProvenance = null;\n }", "@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tmap[i] = new LocalEntry<>();\n\t\t}\n\n\t}", "public void clear(){\r\n MetersList.clear();\r\n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Deprecated\r\n\tpublic void clearMap() {\r\n\t\tthis.blockMap = new ArrayList<Block>();\r\n\t}", "private void clearNodes()\r\n\t{\r\n\t clearMetaInfo();\r\n\t nodeMap.clear();\r\n\t}", "public static void clearCache() {\n\t\tclassNamesToPersistIds = null;\n\t\tclassesToPersistIds = null;\n\t}", "public static void wipeBlocks() {\n for (String location : MyZ.instance.getBlocksConfig().getKeys(false))\n actOnBlock(location, false);\n MyZ.instance.saveBlocksConfig();\n }", "public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }", "void deinit() {\n\t\tsafeLocationTask.cancel();\n\t\t//Deinit all remaining worlds\n\t\tworlds.values().forEach(WorldHandler::deinit);\n\t\t//Clear members\n\t\tworlds.clear();\n\t\toptions = null;\n\t}", "public final void clear() { _map.clear(); }", "private void removeFromCache() {\n int i = 0;\n int removeItem = random.nextInt(cache.size());\n for (ScopePath className : cache.keySet()) {\n if (i == removeItem) {\n cache.remove(className);\n break;\n }\n ++i;\n }\n }", "public void clearSeeds() {\n\t\tseedList = new ArrayList<String>();\n\t}", "public void removeAllAgents()\n/* 76: */ {\n/* 77:125 */ this.mapPanel.removeAllAgents();\n/* 78: */ }", "public void clearAll() {\n\t\tuserMap.clear();\n\t}", "public void limpaCache()\n\t{\n\t\tpoolMensagens.clear();\n\t}", "public void clear() {\n\t\tthis.currentBestNearestNeighbors.clear();\n\t\tthis.currentWorstNearestNeighbors.clear();\n\t}", "public void resetGame() {\n frameRate(framerate);\n w = width;\n h = height;\n if (width % pixelSize != 0 || height % pixelSize != 0) {\n throw new IllegalArgumentException();\n }\n\n this.resetGrid();\n this.doRespawn = false;\n this.runGame = true;\n\n spawns = new HashMap();\n spawns.put(\"RIGHT\", new Location(50, (h - topHeight) / 2)); // LEFT SIDE\n spawns.put(\"LEFT\", new Location(w-50, (h - topHeight) / 2)); // RIGHT SIDE\n spawns.put(\"DOWN\", new Location(w/2, topHeight + 50)); // TOP SIDE\n spawns.put(\"UP\", new Location(w/2, h - 50)); // BOTTOM SIDE\n}", "@Override\r\n\tpublic final void purge() {\r\n\t\tthis.members.clear();\r\n\t\tthis.age++;\r\n\t\tthis.gensNoImprovement++;\r\n\t\tthis.spawnsRequired = 0;\r\n\r\n\t}", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "public void removeLookupLocators( LookupLocator[] locs ) throws RemoteException {\n\t\tlog.config(\"remove lookup locators\");\n\t\ttry {\n\t\t\tPersistentData data = io.readState();\n\t\t\tdisco.removeLocators( locs );\n\t\t\tdata.locators = locs;\n\t\t\tio.writeState( data );\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.throwing( getClass().getName(), \"removeLookupLocators\", ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t} catch( IOException ex ) {\n\t\t\tlog.throwing( getClass().getName(), \"removeLookupLocators\", ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t}\n\t}", "public void deallocate()\n\t{\n\t\t//for(int i = 0; i <= maxsize; i++){\n\t\t//\t notusemap[i].addAll(inusemap[i]);\n\t\t//\t inusemap[i].clear();\n\t\t//}\n\t}", "private void removeDestroyedObjects ()\n {\n Collection<Asteroid> newAsteroids = new ArrayList<>(this.game.getAsteroids().size() * 2); // Avoid reallocation and assume every asteroid spawns successors.\n this.game.getAsteroids().forEach(asteroid -> {\n if (asteroid.isDestroyed()) {\n this.increaseScore();\n newAsteroids.addAll(asteroid.getSuccessors());\n }\n });\n this.game.getAsteroids().addAll(newAsteroids);\n // Remove all asteroids that are destroyed.\n this.game.getAsteroids().removeIf(GameObject::isDestroyed);\n // Remove any bullets that are destroyed.\n this.game.getBullets().removeIf(GameObject::isDestroyed);\n }", "private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "public synchronized void unRegisterAll()\r\n {\r\n clearNameObjectMaps();\r\n }", "public static void removeAll() {\r\n\t\tfor (final Block block : new HashSet<>(instances_.keySet())) {\r\n\t\t\trevertBlock(block, Material.AIR);\r\n\t\t}\r\n\t\tfor (final TempBlock tempblock : REVERT_QUEUE) {\r\n\t\t\ttempblock.state.update(true, applyPhysics(tempblock.state.getType()));\r\n\t\t\tif (tempblock.revertTask != null) {\r\n\t\t\t\ttempblock.revertTask.run();\r\n\t\t\t}\r\n\t\t}\r\n\t\tREVERT_QUEUE.clear();\r\n\t}", "public static void clearWorld() {\n\t\tpopulation.clear();\n\t}", "public void freeAll()\n\t\t{\n\t\t\ts_cGameInstance = null; \n\t\t}", "public void clearCentroids();" ]
[ "0.7063609", "0.62833875", "0.61765", "0.61747944", "0.6109243", "0.6081602", "0.6040359", "0.60285217", "0.60242546", "0.60222906", "0.595726", "0.5946792", "0.5867644", "0.58546555", "0.5852107", "0.5843758", "0.5839115", "0.58220553", "0.5821258", "0.5806293", "0.5803483", "0.5790045", "0.5787696", "0.578502", "0.5777615", "0.5775307", "0.5767969", "0.57629496", "0.57581323", "0.5754229", "0.5741216", "0.57013583", "0.5695626", "0.5692125", "0.56839573", "0.5681586", "0.56457996", "0.5638776", "0.56270635", "0.56158984", "0.5615779", "0.5612577", "0.56050676", "0.55877423", "0.5583708", "0.5579442", "0.55765265", "0.55738634", "0.55637825", "0.5559541", "0.55583256", "0.55552727", "0.55452454", "0.5545108", "0.5542758", "0.55413574", "0.5538239", "0.553737", "0.5525088", "0.5518263", "0.5512099", "0.5507176", "0.55055004", "0.5503193", "0.55018735", "0.5499918", "0.54967225", "0.5494859", "0.54817647", "0.54764146", "0.54755723", "0.54729277", "0.54661834", "0.54652804", "0.54600525", "0.5445484", "0.54435325", "0.5438728", "0.5438213", "0.54375666", "0.54346967", "0.5431433", "0.5429385", "0.54277396", "0.5425346", "0.5425052", "0.5422501", "0.54209566", "0.5418286", "0.54179025", "0.5414793", "0.5410061", "0.54095066", "0.54060173", "0.54058033", "0.5399057", "0.5393885", "0.5388488", "0.53879607", "0.5387512" ]
0.7106161
0
Checks if the game have any spawn saved.
boolean haveAnySpawn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkGameState() {\n\t\tint numberOfPlayers = this.manSys.lockedNavmap.size();\n\t\tfor (int i = 0; i < numberOfPlayers; i++) {\n\t\t\tif (!snakesList.get(i).isDestroyed()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void checkSave() {\n if (view.getSave()) {\n try {\n saveGame.export(view.getSaveGameName());\n } catch (Exception e) {\n System.out.println(\"saving failed\");\n }\n System.exit(0);\n }\n }", "Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }", "public boolean canSpawnMore() {\n for(int e: enemiesLeft) {\n if(e > 0) {\n return true;\n }\n }\n\n return false;\n }", "protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }", "@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n public void checkSpawnTemp() {\n\n int xStart = playingField.getXyhome() - 1;\n int yStart = playingField.getXyhome() - 1;\n int home = playingField.getXyhome();\n boolean changed = false;\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n\n if (xStart + i != home || yStart + j != home) {\n try {\n String tmp;\n if (playingField.getPlayingField()[xStart + i][yStart + j].getAgent() != null) {\n tmp = playingField.getPlayingField()[xStart + i][yStart + j].getAgent().getName();\n } else {\n tmp = \"SoWirdSichKeinSpielerNennen123\";\n }\n\n if (!agentsOnSpawn[i][j].equals(tmp)) {\n changed = true;\n }\n agentsOnSpawn[i][j] = tmp;\n\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n }\n\n }\n }\n\n if (!changed) {\n playingField.setSpawnTemperature(playingField.getSpawnTemperature() + 1);\n //System.out.println(\"Temperature raised to \" + spawnTemp);\n } else {\n playingField.setSpawnTemperature(0);\n //System.out.println(\"Temperature normal, set to 0\");\n }\n\n if (playingField.getSpawnTemperature() >= 10) {\n if (dialog.getSoundBox().isSelected()) {\n new SoundClip(\"BallReset\", -1);\n }\n System.out.println(\"Temperature too hot, explosion\");\n playingField.setSpawnTemperature(0);\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if (xStart + i != home || yStart + j != home) {\n IAgent agent = playingField.getPlayingField()[xStart + i][yStart + j].getAgent();\n if (agent != null) {\n playingField.spreadAgent(agent);\n }\n }\n\n }\n }\n\n }\n\n }", "boolean hasSavedFile() {\n return currPlayer != -1 && getStat(saveStatus) == 1;\n }", "public void checkEnemy() {\n\t\tif (enemy != null)\n\t\tif (Integer.parseInt(getCurrentPositionX()) == enemy.getCurrentPositionX() && Integer.parseInt(getCurrentPositionY()) == enemy.getCurrentPositionY()) {\n\t\t\tx = spawnX;\n\t\t\ty = spawnY;\n\t\t}\n\t}", "private void checkEndGame() {\n if (field.getStackSize() == (field.getPegCount() - 1)) {\n endGame = true;\n }\n }", "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "public boolean taken() {\n return pawn.getLives() != 0;\n }", "void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }", "public boolean checkGameOver(){\n\t\tfor(int x = 0; x < this.tile[3].length; x++){\n\t\t if(this.isFilled(3, x)){\n\t\t \tSystem.out.println(\"game over\");\n\t\t return true;\n\t\t }\n\t\t}\n\t\treturn false;\n\t}", "boolean safeToRun() {\n return game.i != null;\n }", "public boolean allDestroyed()\n {\n\n \tcalculateTotalHitsRequired();\n \tint hits = 0;\n \tfor (int row = 0; row < NUM_ROWS; row++){\n \t\tfor(int col = 0; col < NUM_COLS; col++){\n \t\t\tif(grid[row][col] == HIT)\n \t\t\t\thits++;\n \t\t}\n \t}\n \tif(hits == totalHitsRequired)\n \t\treturn true;\n\n return false;\n }", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }", "private boolean hasEatenPowerUp() {\r\n if (snake[HEAD].row == powerUp.row && \r\n snake[HEAD].column == powerUp.column) { \r\n growSnake();\r\n newPowerUp();\r\n MainClass.totalPoints++;\r\n return true;\r\n }\r\n return false;\r\n }", "public void checkGameEndState() {\n\t\tfor(MapCharacter c : friendlyMissionCriticals) {\n\t\t\tif(!friendlies.contains(c))\n\t\t\t\tthrow new PlayerLosesException();\n\t\t}\n\t\tif(getEnemies().size() == 0)\n\t\t\tthrow new PlayerWinsException();\n\t}", "public void checkGame(){\r\n\t\tif (foodCounter == 0){ // all food is gone, win\r\n\t\t\tSystem.out.println(\"You won!\");\r\n\t\t\t//stops ghosts and pacman\r\n\t\t\tpacman.speed = 0;\r\n\t\t\tg1.speed = 0;\r\n\t\t\tg2.speed = 0;\r\n\t\t\tg3.speed = 0;\r\n\t\t\tlost = true; // return to menu \r\n\t\t}\r\n\t\t// if pacman collide with ghost, lose\r\n\t\tif (collision2(pacmansprite,g1.sprite) || collision2(pacmansprite,g2.sprite) || collision2(pacmansprite,g3.sprite)){\r\n\t\t\tSystem.out.println(\"You lost\");\r\n\t\t\tlost = true;\r\n\t\t}\r\n\t}", "public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "public boolean isSpawn(Location loc) {\n\t\treturn RegionManager.get().hasTag(loc, \"spawn\");\n\t}", "public boolean hasAnyoneLost()\n {\n gameOver = false;\n if(dw.isEmpty() || de.isEmpty())\n gameOver = true;\n \n return gameOver;\n }", "boolean isGameSpedUp();", "private static boolean checkWin() {\n\t\tfor (int i = 0; i < nRows; i++)\n\t\t\tfor (int j = 0; j < nColumns; j++) {\n\t\t\t\tCell cell = field.getCellAt(i, j);\n\t\t\t\tif (cell.hasMine() && !cell.hasSign())\t // if the cell has a mine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// but has no flag\n\t\t\t\t\treturn false;\n\t\t\t\tif (cell.getFlag() >= 0 && !cell.getVisiblity()) // if the cell has no\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mine in it but\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// it is not visible\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\twin = gameOver = true;\n\t\treturn true;\n\t}", "boolean isFinished() {\n\t\tif (this.currentRoom.isExit() && this.currentRoom.getMonsters().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isShipFullyDestroyed() {\n return this.goodShipParts.size() <= 0;\n }", "public boolean allGone()\n {\n return pellets.isEmpty();\n }", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }", "public void checkGame() {\n\n\t}", "void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }", "public boolean hasUnsavedParts() { return (bSave != null ? bSave.isEnabled() : false); }", "boolean allMyShipsAreDestroyed()\n\t{\n\t\tfor (int i = 0; i < board.myShips.size(); i++) {\n\t\t\tif (board.myShips.get(i).isAlive()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }", "public boolean checkGameOver() {\n return ((posIniPiece[piece.getKind()] == piece.getPos(0)) && iteration > 0);\n }", "private void checkCheckpointCollisions() {\n\t\tint len = checkpoints.size();\n\t\t\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tCheckpoint checkpoint = checkpoints.get(i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(OverlapTester.overlapRectangles(checkpoint.bounds, player.bounds)) {\n\t\t\t\t\trespawnPoint = new Vector2(checkpoint.position.x, checkpoint.position.y);\n\t\t\t\t\tfor(int c = 0; c < len; c++) {\n\t\t\t\t\t\tcheckpoints.get(c).active = false;\n\t\t\t\t\t}\n\t\t\t\t\tcheckpoint.active = true;\n\t\t\t\t} \n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public boolean checkWin() throws Exception {\r\n\t\treturn getOcean().checkWin();\r\n\t}", "private boolean isGameOver() {\n\t\tfor (int i = 0; i < this.board.getHeight(); i++) {\n\t\t\tif (this.board.getModel(i, 0) instanceof AbstractZombie) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void invalidSpawn_2() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tSquare[][] board = gameState.getBoard();\n\t\tassertFalse(\"Should not be able to add off the board\", gameState.addSpawn(new Location(board[0].length, 0)));\n\t}", "private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }", "boolean allEnemyShipsAreDestroyed()\n\t{\n\t\tfor (int i = 0; i < targets.myShips.size(); i++) {\n\t\t\tif (targets.myShips.get(i).isAlive()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isThereStandingShips() {\r\n\t\r\n\t/*\t\r\n\t\tint SIZE = 100;\r\n\t\tint state = 0;\r\n\t\tboolean shipPresent = false;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tstate = shipStateMap.get(new Point(x, y));\r\n\t\t\tif (state == 1)\r\n\t\t\t\tshipPresent = true;\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn shipPresent;\r\n\t*/\r\n\r\n\t\treturn (numberOfAllowedShotsRemaining!=0);\r\n\t}", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean endOfGame() {\n\t\tfor(CardGamePlayer player : playerList) {\n\t\t\tif(gameStarted && player.getNumOfCards() == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public final boolean checkForDraw() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n return false;\r\n }\r\n }\r\n \r\n if (tilesPlayed == 9) {\r\n draws++;\r\n // window.getStatusMsg().setText(DRAW_MSG); \r\n result = true;\r\n }\r\n \r\n return result;\r\n }", "private boolean isCheckMate() {\n if (whitePlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"BLACK PLAYER WINS\");\n return true;\n }\n else if (blackPlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"WHITE PLAYER WINS\");\n return true;\n }\n else return false;\n }", "@Test\n\tpublic void invalidSpawn_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tassertFalse(\"Should not be able to add null\", gameState.addSpawn(null));\n\t}", "public boolean endOfGame() {\n\t\tfor (int i = 0; i < getNumOfPlayers(); i++) {\n\t\t\tif (this.getPlayerList().get(i).getCardsInHand().isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean testSpawnShips(Tester t) {\n return t.checkExpect(new NBullets(lob3, los3, 8, 12, 23, new Random(10)).spawnShips(),\n new NBullets(lob3, los3, 8, 12, 23))\n && t.checkExpect(new NBullets(lob3, los3, 8, 12, 24, new Random(10)).spawnShips(),\n new NBullets(lob3,\n new ConsLoGamePiece(new Ship(10, Color.cyan, new MyPosn(0, 127), new MyPosn(4, 0)),\n new ConsLoGamePiece(new Ship(10, Color.cyan, this.p3, this.p6),\n new ConsLoGamePiece(new Ship(10, Color.cyan, this.p1, this.p6),\n new ConsLoGamePiece(\n new Ship(10, Color.cyan, new MyPosn(0, 150), this.p3),\n new MtLoGamePiece())))),\n 8, 12, 24));\n }", "public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}", "public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }", "public boolean waveDestroyed() {\n return map.getHell().getEnemies().size() + map.getEarth().getEnemies().size() + map.getHeaven().getEnemies().size() == 0;\n }", "public boolean hasFutureGames() {\n /*\n if (this.games.isEmpty()) {\n\n //Pull games from DB\n List<Game> refereeGames = EntityManager.getInstance().getRefereeGames(this);\n for (Game game : refereeGames) {\n if (!this.games.contains(game)) {\n this.games.add(game);\n }\n }\n }\n */\n HashMap<String, Boolean> gamesStatus = EntityManager.getInstance().getRefereeGamesStatus(this);\n for (Map.Entry<String, Boolean> hasGameFinished : gamesStatus.entrySet()) {\n if (!hasGameFinished.getValue()) {\n return true;\n }\n }\n for (Game game : getGames()) {\n if (!game.hasFinished()) {\n return true;\n }\n }\n return false;\n }", "public boolean isSavingGame() {\n return savingGame;\n }", "public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }", "private void gameFinished() {\n\n\t\tisFinished = true;\n\t\touter: for (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\tif (!(tileArr[x][y].isOpened() || (tileArr[x][y].hasBomb() && tileArr[x][y]\n\t\t\t\t\t\t.hasFlag()))) {\n\t\t\t\t\tisFinished = false;\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean hasScannedEnemies()\n\t{\n\t\treturn (lastscanround == br.curRound && !needToScanEnemies);\n\t}", "public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }", "@Test\n\tpublic void validSpawn() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tassertTrue(\"Should be able to be set to 0,0\", gameState.addSpawn(new Location(0, 0)));\n\t}", "public boolean CheckWin(){\n\t return false;\n\t }", "private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }", "public boolean checkForGourds() {return false;}", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "public boolean checkForEndgame() {\n\t\tCalculatePossibleMoves(true);\n\t\tint blackMoves = getNumberOfPossibleMoves();\n\t\tCalculatePossibleMoves(false);\n\t\tint redMoves = getNumberOfPossibleMoves();\n\t\t\n\t\tif (blackMoves == 0 && redMoves == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean isGameOver() {\n // either all black or all white pieces don't have any moves left, save\n // to internal field so that a delayed status is available\n gameOver = longestAvailableMoves(1, true).isEmpty() ||\n longestAvailableMoves(1, false).isEmpty();\n return gameOver;\n }", "@Override\n public boolean currentPlayerHavePotentialMoves() {\n return !checkersBoard.getAllPotentialMoves(getCurrentPlayerIndex()).isEmpty();\n }", "public boolean isFull ()\n {\n for (int row = 0; row < 3; row++)\n for (int column = 0; column < 3; column++)\n if (getGridElement(row, column).getPlayer() == Player.NONE)\n return false;\n\n return true;\n }", "public boolean wonGame() {\n for (int x = 0; x < maxX; x++) {\n for (int y = 0; y < maxY; y++) {\n if (snakeSquares[x][y] == NOT_A_SEGMENT) {\n //there is still empty space on the screen, so haven't won\n return false;\n }\n }\n }\n //But if we get here, the snake has filled the screen. win!\n SnakeGame.setGameStage(SnakeGame.GAME_WON);\n\n return true;\n }", "private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }", "private boolean didPlayerWin() {\r\n for (int i = 0; i < targets.length; i++) {\r\n if (targets[i].getHitPoints() != 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean playersFilled() throws SQLException {\n\t\ttry {\n\t\t\tif (getPlayers().last() == true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }", "public static void checkAllPlayers()\n\t{\n\t\ttry {\n\t\t\tSystem.out.println(outFile.getName()+\": \");\n\t\t\twriter = new FileWriter(outFile);\n\t\t\tfor(int i = 0; i < entrants.length; i++)\n\t\t\t{\n\t\t\t\tcheckIndex = i;\n\t\t\t\tcheckPlayer();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\twriter.close();\n\t\t}catch(IOException e) {\n\t\t\tSystem.out.println(\"problem with output\");\n\t\t\t//return false;\n\t\t\t//System.exit(1);\n\t\t}\n\t}", "public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }", "private boolean onlyInstance(){\n File dir1 = new File (\".\");\n String location=\"\";\n\n try{\n location = dir1.getCanonicalPath();\n } catch (IOException e) {\n }\n File temp = new File(location+\"\\\\holder.tmp\");\n\n if (!temp.exists())\n return true;\n else\n {\n int result = JOptionPane.showConfirmDialog(null,\n \"Instance of TEWIN already running (or at least I think it is)!\\n\" +\n \"Click YES to load anyway, or NO to exit\",\"I think I'm already running\",\n JOptionPane.YES_NO_OPTION);\n if(result == JOptionPane.YES_OPTION)\n {\n temp.delete();\n return true;\n }else\n return false;\n }\n \n }", "public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\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 }", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "protected boolean checkWin(int pno) {\n\t\tint[] pos = playerPosition.get(pno);\n\t\tif (collectedGold.get(pno) >= map.getWin() && \n\t\t\t\tmap.lookAtTile(pos[0], pos[1]) == 'E') {\n\t\t\tremovePlayer(pno);\n\t\t\tSystem.out.println(\"Client \" + pno + \" has escaped!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkLoot() {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < loots.size() && !found; i++) {\n\t\t\tLoot l = loots.get(i);\n\t\t\tif (l.isInRange(player.pos) && l.checkPlayerDir(player.direction)) {\n\t\t\t\tif (l.decrementStatus()) {\n\t\t\t\t\tloots.remove(i);\n\t\t\t\t\tLoad.collectLoot(l);\n\t\t\t\t\tcreateSign(l.getLine(0), l.getLine(1), l.getContent());\n\t\t\t\t\tplayer.stop();\n\t\t\t\t}\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}", "private boolean getValidRespawnPosition(int x, int y, int imageW, int imageH) {\n\t\tRectangle iRect = new Rectangle(x, y, imageW, imageH);\n\t\t// dont spawn on a wall\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wRect = w.getBounds();\n\t\t\tif (iRect.intersects(wRect)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// dont spawn on a powerup\n\t\tfor (Powerup p : powerupArray) {\n\t\t\tRectangle pRect = p.getBounds();\n\t\t\tif (iRect.intersects(pRect)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private boolean checkPoints() {\n\n for (Map.Entry pair : playersAgentsMap.entrySet()) {\n ArrayList<IAgent> iAgentList = (ArrayList<IAgent>) pair.getValue();\n\n int points = 0;\n try {\n points = iPlayerList.get(iAgentList.get(0).getName()).getPoints();\n } catch (RemoteException ex) {\n Logger.getLogger(ServerFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n for (Component comp : playerList.getComponents()) {\n if (comp instanceof PlayerPanel) {\n PlayerPanel panel = (PlayerPanel) comp;\n if (panel.getName().equals(iAgentList.get(0).getName())) {\n panel.setPlayerPoints(points);\n }\n }\n\n }\n } catch (RemoteException e1) {\n e1.printStackTrace();\n }\n if (points >= targetAmount) {\n try {\n System.out.println(iAgentList.get(0).getName() + \" has won with \" + points + \" points\");\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return false;\n }\n }\n\n return true;\n }", "public boolean teamsFilled() {\n\t\ttry {\n\t\t\tif (getTeams().last() == true) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "public boolean hasTiles()\r\n\t{\r\n\t\treturn _tiles.size() != 0;\r\n\t}", "boolean playerExists() {\n return this.game.h != null;\n }", "@Override\n\tpublic boolean canCoordinateBeSpawn(int par1, int par2) {\n\t\tint i = worldObj.getFirstUncoveredBlock(par1, par2);\n\t\tif (i == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn Block.blocksList[i].blockMaterial.blocksMovement();\n\t\t}\n\t}", "boolean isGameComplete();", "@Override\r\n\tpublic boolean gameOver() {\r\n\t\t// the game might be over only if the freecells is zero\r\n\t\tif(freeCells == 0) {\r\n\t\t\t// checks if there is any possible move\r\n\t\t\treturn !((new Board2048model(this)).moveUP() || (new Board2048model(this)).moveDOWN()\r\n\t\t\t\t\t|| (new Board2048model(this)).moveLEFT() || (new Board2048model(this)).moveRIGHT());\r\n\t\t}\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "public boolean getCanSpawnHere()\n {\n return this.isValidLightLevel() && super.getCanSpawnHere();\n }" ]
[ "0.69099146", "0.6824999", "0.6450677", "0.6319066", "0.6295607", "0.62945986", "0.6272302", "0.62243915", "0.6214359", "0.6169711", "0.6157948", "0.61425364", "0.6129391", "0.6094433", "0.6089509", "0.60840535", "0.6081013", "0.6075256", "0.6063707", "0.60210353", "0.60180426", "0.60142946", "0.60127246", "0.6003672", "0.59900546", "0.598415", "0.5981574", "0.5972401", "0.5971293", "0.59673685", "0.59588706", "0.5955698", "0.59242666", "0.5886593", "0.5868478", "0.5834245", "0.5833509", "0.5825971", "0.58199996", "0.58174837", "0.5800123", "0.57962996", "0.5779683", "0.5777246", "0.5767949", "0.57679456", "0.57674754", "0.5751637", "0.57428026", "0.5718192", "0.57123864", "0.56874645", "0.56802565", "0.5670088", "0.56695765", "0.5667778", "0.56667256", "0.566609", "0.5664505", "0.5661291", "0.56589043", "0.56548506", "0.5650322", "0.5650288", "0.56477743", "0.5641732", "0.5632164", "0.56257886", "0.5623645", "0.5622346", "0.5620797", "0.5620306", "0.5617644", "0.5610433", "0.559803", "0.5597237", "0.55970055", "0.5586582", "0.5584517", "0.5584143", "0.558074", "0.5572956", "0.55697083", "0.5564621", "0.5561686", "0.55590606", "0.5558737", "0.55577576", "0.5557016", "0.5549905", "0.55496854", "0.55475605", "0.5545596", "0.55430216", "0.5540592", "0.5540053", "0.5537119", "0.55341756", "0.5533091", "0.55314094" ]
0.72474134
0
On send image view click
private void onSendImageClick() { Intent intent = new Intent(); intent.putExtra(Constants.SELECTED_IMAGE, mediaPath); intent.putExtra(Constants.CHAT_TYPE, messageType); setResult(Activity.RESULT_OK, intent); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void imageclick(View view)\n {\n //for logo image upload\n\n\n Intent i =new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(i,\"select an image\"),imagerequestcode);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tActivityDataRequest.getImage(MainActivity.this, img1);\n\t\t\t}", "PreViewPopUpPage clickImageLink();", "@Override\n public void onClick(View v) {\n chooseImage();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsendData.put(\"image\", thumbImage);\n\t\t\t\t\t\tSystem.out.println(sendData);\n\t\t\t\t\t} catch (JSONException 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\t\n\t\t\t\t\tIntent i = new Intent(Filevaultcase.this, ExpandImage.class);\n\t\t\t\t\ti.putExtra(\"image\",\"https://files.healthscion.com/\"+ imageName.get(position));\n\t\t\t\t\ti.putExtra(\"imagename\",imageNametobesent.get(position));\n\t\t\t\t\t\n\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tselectImageMethod();\n\t\t\t}", "@OnClick(R.id.hinhanh_dangtin)\n void ChooseImage(View v) {\n onPickPhoto(v);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(Tab1SocietyShareFragment.this.getActivity(), ImageShowActivity.class);\n\t\t\t\ttry {\n\t\t\t\t\tintent.putExtra(\"imageurl\", \"http://110.84.129.130:8080/Yuf\"+jsonArray.getJSONObject(index).getString(\"postpicurl\"));\n\t\t\t\t} catch (JSONException 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\tstartActivity(intent);\n\t\t\t\tTab1SocietyShareFragment.this.getActivity().overridePendingTransition(R.anim.image_zoom_in,R.anim.image_zoom_out);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.setClass(context, TestActivity1.class);\n\t\t\t\t((MyHome)context).startActivityForResult(intent, 1);\n\t\t\t\tdata.get(pos).put(\"image\", R.drawable.email);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(context, \"You Clicked \"+imageId[position], Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n photoStorage.addImage(currentLabel, currentVisibleImagePath);\n addImage.setEnabled(false);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n // image k selection k liey requesting code jo hai upar vo 1234 hai ye dena hota hai\n startActivityForResult(Intent.createChooser(intent, \"Select Image\"), REQUEST_CODE);\n }", "@Override\n public void onClick(View view) {\n imagemassint.setDrawingCacheEnabled(true);\n imagemassint.buildDrawingCache();\n Bitmap b =imagemassint.getDrawingCache();\n\n Intent share = new Intent(Intent.ACTION_SEND);\n //setamos o tipo da imagem\n share.setType(\"image/jpeg\");\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n // comprimomos a imagem\n b.compress(Bitmap.CompressFormat.JPEG, 100, bytes);\n // Gravamos a imagem\n String path = MediaStore.Images.Media.insertImage(getContentResolver(), b, \"Titulo da Imagem\", null);\n // criamos uam Uri com o endereço que a imagem foi salva\n Uri imageUri = Uri.parse(path);\n // Setmaos a Uri da imagem\n share.putExtra(Intent.EXTRA_STREAM, imageUri);\n // chama o compartilhamento\n startActivity(Intent.createChooser(share, \"Selecione\"));\n }", "public void ImageView(ActionEvent event) {\n\t}", "@Override\n public void onClick(View v) {\n showImageView.setVisibility(View.VISIBLE);\n String imgUrl = \"http://210.42.121.241/servlet/GenImg\";\n new DownImgAsyncTask().execute(imgUrl);\n }", "@Override\n public void onImageClick(View view, ImageBeans.Datum datum, int position) {\n Intent intent = new Intent(getContext(), ImageActivity.class);\n intent.putExtra(\"contents\", datum.getContent());\n if (!datum.getUrl().contains(\"gif\")) {\n intent.putExtra(\"image\", datum.getUrl());\n } else {\n intent.putExtra(\"gif\", true);\n intent.putExtra(\"image\", DiskManager.getInstance(getContext()).get(datum.getUrl())\n .getAbsolutePath());\n }\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onViewClick(MyImageView view)\r\n\t\t\t{\n\t\t\t\tIntent it = new Intent(MainActivity.this,\r\n\t\t\t\t\t\tIndexActivityNew.class);\r\n\t\t\t\tstartActivity(it);\r\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), REQUEST_IMAGE);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tBitmap bm = null;\n\t\t\t\tif(wallPaperBitmap!=null){\n\t\t\t\t\tbm = wallPaperBitmap;\n\t\t\t\t}else{\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"No IMage Selected!!\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tbm=null;\n\t\t\t\t}\n\t\t\t\t//Bitmap bm = shareImage;\n\t\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\t\tFile cachePath = new File(root.getAbsolutePath() + \"/DCIM/Camera/image.jpg\");\n\t\t\t\ttry {\n\t\t\t\t\tcachePath.createNewFile();\n\t\t\t\t\tFileOutputStream ostream = new FileOutputStream(cachePath);\n\t\t\t\t\tbm.compress(CompressFormat.JPEG, 100, ostream);\n\t\t\t\t\tostream.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\tIntent shareIntent = new Intent(Intent.ACTION_SEND);\n\t\t\t\tshareIntent.putExtra(Intent.EXTRA_TEXT, \"Dive Picture\");\n\n\t\t\t\tshareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(cachePath));\n\t\t\t\tshareIntent.setType(\"image/*\");\n\t\t\t\tshareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);\n\t\t\t\tshareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n\t\t\t\tstartActivity(Intent.createChooser(shareIntent, \"Share image\"));\n\t\t\t}", "public void handleActionChosenImageView(MouseEvent event){\n Integer actionSelected = buttonAction.get(event.getSource());\n System.out.println(\"input sent from gameboard Controller : execute action \" + actionSelected.toString());\n sender.sendInput(\"execute action \" + actionSelected.toString());\n\n for (Map.Entry<Integer, ImageView> entry : coverImages.entrySet()) {\n\n entry.getValue().setVisible(false);\n }\n\n }", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tIntent i = new Intent(CapturePhotoActivity.this, RemoteImageGalleryActivity.class);\n\t\t\t\t//i.putExtra(\"Photo file name\", fileStringUri);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View view) {\n if (view == imageView) {\n showFileChooser();\n }\n //if the clicked button is upload\n else if (view == btnPost) {\n uploadFile();\n\n }\n }", "@Override\n public void onClick(View view) {\n Intent implicitIntent = new Intent(Intent.ACTION_GET_CONTENT);\n\n // Define the file type\n implicitIntent.setType(\"image/*\");\n\n // start this intent\n startActivityForResult(implicitIntent,REQUEST_CODE);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), IMG_RESULT);\n\n }", "@Override\n public void topTileClicked(CoverFlowOpenGL view, int position) {\n mHandler.obtainMessage(0, String.format(\"Image %d is clicked\", position)).sendToTarget();\n }", "public void onImageClick(View v) {\n\t\t// Send an intent to PhotoActivity\n\t\tIntent intent = new Intent(getBaseContext(), PhotoActivity.class);\n\t\t\n\t\t// Get the bitmap of the image that was clicked and send that as an extra\n\t\tBitmap bitmap = ((BitmapDrawable)((ImageView) v).getDrawable()).getBitmap();\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); \n\t\tbyte[] b = baos.toByteArray();\n\n\t\tintent.putExtra(\"image\", b);\n\n\t\tstartActivity(intent);\n\t}", "@Override\n public void onClick(View v) {\n handlePhoto();\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_SEND);\n\n\t\t\t\tFile f = new File(imagePath);\n\t\t\t\tif (f != null && f.exists() && f.isFile()) {\n\t\t\t\t\tintent.setType(\"image/jpg\");\n\t\t\t\t\tUri u = Uri.fromFile(f);\n\t\t\t\t\tintent.putExtra(Intent.EXTRA_STREAM, u);\n\t\t\t\t}\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tstartActivity(Intent.createChooser(intent, \"分享图片\"));\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n //here we are setting the type of intent which\n //we will pass to the another screen\n intent.setType(\"image/*\");//For specific type add image/jpeg\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 50);\n }", "@Override\n public void onClick(View view) {\n isEmailSent = false;\n isLiveness = false;\n isFaceMatch = false;\n switch (view.getId()) {\n case R.id.tvSave: // handle click of liveness\n //Start liveness\n isLiveness = true;\n launchZoomScanScreen();\n break;\n case R.id.tvFM: // handle click of FaceMatch\n //Start Facematch\n isFaceMatch = true;\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n File f = new File(Environment.getExternalStorageDirectory(), \"temp.jpg\");\n Uri uriForFile = FileProvider.getUriForFile(\n PanAadharResultActivity.this,\n \"com.accurascan.demoapp.provider\",\n f\n );\n intent.putExtra(MediaStore.EXTRA_OUTPUT, uriForFile);\n startActivityForResult(intent, CAPTURE_IMAGE);\n break;\n case R.id.tvRetry:\n //Start liveness\n isLiveness = true;\n launchZoomScanScreen();\n break;\n case R.id.tvCancel:\n overridePendingTransition(0, 0);\n setResult(RESULT_OK);\n PanAadharResultActivity.this.finish();\n break;\n case R.id.tvOk:\n if (isValidate()) {\n dismissEmailDialog();\n deleteEnroll(identifier, sessionId);\n }\n break;\n case R.id.tvCancelDia:\n dismissEmailDialog();\n break;\n }\n }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tbyte image[] = Global.File2byte(pathImage);\r\n\t\t\t\r\n\t\t\tTransfer.uploadImage(image, new TransferListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onSucceed(JSONObject obj) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tLog.e(\"upload\",obj.toString());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onFail(String desc) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t Log.e(\"upload\",desc);\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "@Override\n public void onClick(View v) {\n\n ((CreateDocketActivityPart2) activity).openGalleryForPickingImage(position);\n }", "@Override\n\t\tpublic void onImageClick(ADInfo info, int position, View imageView) {\n\t\t}", "@Override\n public void onClick(View view) {\n Glide.with(HomeActivity.this).load(\"https://steamcdn-a.akamaihd.net/steam/apps/570840/logo.png?t=1574384831\").into(imageViewNeko);\n }", "@Override\n public void onClick(View v) {\n dispatchTakePictureIntent();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdo_sign();// 图片签收\n\t\t\t}", "@Override\r\n\tpublic void onClick(View view) {\n\t\tswitch (view.getId()) {\r\n\t\tcase R.id.vc_shuaixi:\r\n\t\t\tvc_image.setImageBitmap(Code.getInstance().getBitmap());\r\n\t\t\tgetCode = Code.getInstance().getCode();\r\n\t\t\tbreak;\t\t\r\n\t\t}\r\n\t}", "public void onClick(DialogInterface dialog, int which) {\n\t \t Log.d(\"ImageViewer:\", \"which:\"+which);\n\t \t switch (which) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t }", "@Override\n public void onClick(View v) {\n onImgClickListen.OnClick(rxxp.get(position).getCommodityId());\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n submitImage();\n }", "@OnClick({R.id.imgBrowser})\n public void onClickBrowserMakePost(View view) {\n mListener.onShowBrowser();\n }", "@Override\n public void onClick(View view) {\n send();\n }", "@Override\r\n public void onClick(View arg0) {\n popWindow.setVisibility(View.INVISIBLE);\r\n mBottomBar.setVisibility(View.VISIBLE);\r\n mEditLayout.setVisibility(View.INVISIBLE);\r\n mFaceEditor.updateImage(true);\r\n mImgView.setImageBitmap(null);\r\n mImgView.setImageBitmap(mFaceEditor.getDisplayImage());\r\n }", "@Override\r\n\t\t\tpublic void onViewClick(MyImageView view)\r\n\t\t\t{\n\t\t\t\tIntent it = new Intent(MainActivity.this,\r\n\t\t\t\t\t\tActivityPetLostFound.class);\r\n\t\t\t\ttoastMgr.builder.display(\"lost&found\", 0);\r\n\t\t\t\tstartActivity(it);\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"open gallery\", \"opencamera\");\n\n\t\t\t\t\topenImagechooseAlertDialog();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"open gallery\", \"opencamera\");\n\n\t\t\t\t\topenImagechooseAlertDialog();\n\t\t\t\t}", "@Override\r\n public void onClick(View view) {\n permission();\r\n pickImage();\r\n\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String currentID = listOverView.get(position).getIdSQLData(); // put image to static variable\n Intent intentToShowBigPicture = new Intent(ActivityScreans.this, ActivityShowImage.class);\n intentToShowBigPicture.putExtra(\"intentToShowBigPicture\", currentID);\n startActivity(intentToShowBigPicture);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tcallintentforattachment();\n\t\t\t\t}", "@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 }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t\tif(isAdded())\n\t\t\t\t\tstartActivityForResult(i, RESULT_LOAD_POST_IMAGE);\n\t\t\t\telse{\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tToast.makeText(getActivity(), \"Something went wrong.Try sharing your updates again.\", 1000).show();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n startActivityForResult(Intent.createChooser(intent,\"Choose an app to select a image\"), 1);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_PICK);\n intent.setType(\"image/*\");\n // the one is the number attached to the intent\n //it capture the number and goes with the result\n startActivityForResult(intent,1);\n }", "@Override\n public void onClick(View view) {\n // Each image calls this with the particular position index\n bibleStudyOnClick(bibleStudyPosition);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tsetIamgeClickedState(SetActivity.this, j);\n\t\t\t\t\timage = j;\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\timageView = (ImageView) arg1.findViewById(R.id.imageView);\r\n\t\t\t\tLog.d(\"1111\",\"...............arg1 =\"+(String)imageView.getTag());\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\r\n\t\t\t\t//Uri mUri = Uri.parse(\"file://\" + picFile.getPath());Android3.0以后最好不要通过该方法,存在一些小Bug\r\n\t\t\t\tfile = new File((String)imageView.getTag());\r\n\t\t\t\t//File file = new File(Environment.getExternalStorageDirectory().toString()+GlobalApp.DOWNLOAD_PATH);\r\n\t\t\t\tintent.setDataAndType(Uri.fromFile(file), \"image/*\");\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tNoteEditView.this.addPicture();\n \t\t\t}", "public void onClick(View arg0) {\n\t\t\t\tif(!new File(\"/sdcard/.NoteLib/\" + mNoteID + \"_0.jpg.n\").exists()){\r\n\t\t\t\t\tToast.makeText(NLNoteInfoAct.this, R.string.noteinfo_share_needimages, Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//Check if pictures cached -------------------\r\n\t\t\t\t\r\n\t\t\t\t//Read File\r\n\t\t\t\tFile _tmpImageFile = new File(\"/sdcard/.NoteLib/\" + mNoteID + \"_0.jpg.n\");\r\n\t\t\t\tFile _tmpTempFileToSend = new File(\"/sdcard/.NoteLib/_TmpNoteImg.jpg.n\");\r\n\t\t\t\tNAFileUtils.CopyFile(_tmpImageFile, _tmpTempFileToSend);\r\n\t\t\t\t\r\n\t\t\t\t//Create Intent and put data\r\n\t\t\t\tIntent _tmpIntent = new Intent();\r\n\t\t\t\t_tmpIntent.setAction(\"android.intent.action.SEND\");\r\n\t\t\t\t_tmpIntent.putExtra(Intent.EXTRA_TEXT, \r\n\t\t\t\t\t\tgetString(R.string.noteinfo_share_text) + \r\n\t\t\t\t\t\t((TextView)findViewById(R.id.NLNoteInfoAct_txtNoteName)).getText() + \r\n\t\t\t\t\t\tgetString(R.string.noteinfo_share_text2)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t_tmpIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(_tmpTempFileToSend));\r\n\t\t\t\t_tmpIntent.setType(\"image/*\"); \r\n\t\t\t\tstartActivity(Intent.createChooser(_tmpIntent, getString(R.string.noteinfo_share_chooser)));\r\n\t\t\t\toverridePendingTransition(R.anim.act_enter, R.anim.act_exit);\r\n\t\t\t}", "private void sendImage(Uri selectedImageUri) {\n\t\t\n\t}", "public void onImageClick(View view) {\n Intent photo_picker = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n photo_picker.setType(\"image/jpeg\");\n startActivityForResult(photo_picker,PHOTO_PICK);\n }", "@Override\n public void onClick(View v) {\n thumbnail.handleClick();\n }", "@Override\r\n public void onClick(View arg0) {\n popWindow.setVisibility(View.INVISIBLE);\r\n mBottomBar.setVisibility(View.VISIBLE);\r\n mEditLayout.setVisibility(View.INVISIBLE);\r\n mFaceEditor.updateImage(false);\r\n\r\n mImgView.setImageBitmap(null);\r\n mImgView.setImageBitmap(mFaceEditor.getDisplayImage());\r\n\r\n\r\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(v.getContext(), SimplePreviewActivity.class);\n PreviewData data = new PreviewData();\n ArrayList<ImageItem> imgs = new ArrayList<>();\n imgs.add(item);\n data.setImageItems(imgs);\n intent.putExtra(SimplePreviewActivity.PREVIEW_TAG, data);\n v.getContext().startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n int id= Integer.parseInt(Global.getId());\n mydb.update_user(1,id);\n mydb.insertImage(num,id);\n mydb.close();\n Global.setImage(num);\n startActivity(new Intent(CharSetUp.this,Buttons.class)); // metabainei sthn Buttons\n }", "@Override\n public void onClick(View view) {\n Intent intent=new Intent(Intent.ACTION_PICK);\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,1);\n }", "public void onClick(View arg0) {\n Intent intent = new Intent();\r\n intent.setType(\"image/*\");\r\n intent.setAction(Intent.ACTION_GET_CONTENT);\r\n startActivityForResult(Intent.createChooser(intent,\r\n \"Select Picture\"), SELECT_PICTURE);\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n strings = new String[imgList.size()];\n for (int i = 0; i < imgList.size(); i++) {\n strings[i] = imgList.get(i).getFile_name();\n }\n Intent it = new Intent(mcontext, ShowNetWorkImageActivity.class);\n it.putExtra(\"urls\", strings);\n it.putExtra(\"type\", \"1\");\n it.putExtra(\"nowImage\", position);\n mcontext.startActivity(it);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(CJ_BXBQ_XCKP_edit.this, SelectPicActivity.class);\n startActivityForResult(intent, TO_SELECT_PHOTO);\n }", "public void onClick(View view) {\n FaceImg faceImg = new TrainImg(classId, that, FACE_IMG_W, FACE_IMG_H);\n mCurFaceImg = faceImg;\n faceImg.capture();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent imageIntent = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n\t\t\t\tstartActivityForResult(imageIntent, IMAGE_SELECTION);\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_PICK, null);\n\n\t\t\t\tintent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, \"image/*\");\n\t\t\t\tstartActivityForResult(intent, 1);\n\t\t\t\tmenu_mine.setVisibility(View.GONE);\n\t\t\t}", "public void onClick(View v, Photo photo);", "public void clickStart(View view) {\n // open camera, get image and send to intent\n Intent intent = new Intent(this, PhotoDraw.class);\n String message = \"START\";\n intent.putExtra(msg, message);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickIntent.setType(\"image/*\");\n Intent chooserIntent = Intent.createChooser(intent, \"Select Image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});\n startActivityForResult(chooserIntent,PICK_IMAGE_REQUEST);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t mImgview.resetView();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\tif (arg2 == allImages.size() - 1) {\n\t\t\t\t\t\tif (allImages.size() <= 6) {\n\t\t\t\t\t\t\tnew SelectPopuWindow(context, gridView, arg2);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(context, \"照片不能超过6张\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tIntent intent=new Intent();\n\t\t\t\t\t\tintent.setClass(context, BrowseImageViewActivity.class);\n\t\t\t\t\t\tintent.putStringArrayListExtra(\"imageUrl\", (ArrayList<String>) imageUrl);\n\t\t\t\t\t\tintent.putExtra(\"position\", arg2);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t//Toast.makeText(WriteMoodActivity.this, arg2+\"\"+\"集合的长度:\"+allImages.size(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tupload(arg0);\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n OpenGallery();\n adapter.updateImageList(uploadedImages);\n }", "@Override\n public void onClick(View view) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);\n LayoutInflater layoutInflater = LayoutInflater.from(context);\n View alertDialogView = layoutInflater.inflate(R.layout.alertdialog_photo, null);\n ImageView imageView = alertDialogView.findViewById(R.id.controlImage);\n byte[] decode = Base64.decode(\n arrayList.get(getAdapterPosition()).getUrl(),\n Base64.DEFAULT\n );\n Bitmap bitmap = BitmapFactory.decodeByteArray(decode,0,decode.length);\n imageView.setImageBitmap(bitmap);\n alertDialog.setView(alertDialogView).show();\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n\n case R.id.iv_ivfront:\n Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(i, 1);\n\n }\n }", "public void loadImage1(View view) {\n Intent intent = new Intent(this, SelectImageActivity.class);\n startActivityForResult(intent, REQUEST_SELECT_IMAGE_1);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tIntent intent = new Intent(CreateSalonActivity.this,SelectPicPopupWindow.class);\n\t\tswitch (v.getId()) {\n\t\tcase R.id.img_add0:\n\t\t\tstartActivityForResult(intent, 0);\n\t\t\tbreak;\n\t\tcase R.id.img_add1:\n\t\t\tstartActivityForResult(intent, 1);\n\t\t\tbreak;\n\t\tcase R.id.img_add2:\n\t\t\tstartActivityForResult(intent, 2);\n\t\t\tbreak;\n\t\tcase R.id.img_add3:\n\t\t\tstartActivityForResult(intent, 3);\n\t\t\tbreak;\n\t\tcase R.id.img_add4:\n\t\t\tstartActivityForResult(intent, 4);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tdoTakePhoto();\r\n\t\t\t\t\timagePopupWindow.dismiss();\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\t\t\t\tstartActivityForResult(i, RESULT_LOAD_IMAGE);\n\n\t\t\t refreshResult();\n\t\t\t LeftEdge.setImageResource(R.drawable.left_edgeicon);\n\t\t\t RightEdge.setImageResource(R.drawable.right_edgeicon);\n\t\t\t// ChannelCheck0.setImageResource(R.drawable.control);\n\t\t\t \n\t\t\t}", "@Override\r\n public void onClick(View arg0) {\n ImageSaveAsyncTask imgSaveTask = new ImageSaveAsyncTask();\r\n imgSaveTask.execute();\r\n String txt = \"save to XIUIMAGE!\";\r\n Toast.makeText(BeautyfaceActivity.this, txt, Toast.LENGTH_SHORT).show();\r\n finish();\r\n IntentToStartView();\r\n }", "@Override\r\n\t\t\tpublic void onViewClick(MyImageView view)\r\n\t\t\t{\n\t\t\t\tIntent it = new Intent(MainActivity.this, ActivityPetShop.class);\r\n\t\t\t\tstartActivity(it);\r\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\topenGallery(5);\n\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"SELECT IMAGE\"), GALLERY_PICK);\n }", "public void onShareclicked(MenuItem mi) {\n\t\tSmartImageView ivImage = (SmartImageView) findViewById(R.id.ivResult);\r\n\t\tUri bmpUri = getLocalBitmapUri(ivImage);\r\n\t\tif (bmpUri != null) {\r\n\t\t\t// Construct a ShareIntent with link to image\r\n\t\t\tIntent shareIntent = new Intent();\r\n\t\t\tshareIntent.setAction(Intent.ACTION_SEND);\r\n\t\t\tshareIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);\r\n\t\t\tshareIntent.setType(\"image/*\");\r\n\t\t\t// Launch sharing dialog for image\r\n\t\t\tstartActivity(Intent.createChooser(shareIntent, \"Share Content\"));\r\n\t\t} else {\r\n\t\t\tLog.e(\"ERROR\", \"Image sending failed\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.WEIXIN)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "public void onClick(View view) {\n Picasso.get().load(\"http://image.tmdb.org/t/p/w185/\").into(imageView);\n }", "void onPhotoTap(View view, float x, float y);", "public void btnImgAddClick(View view) {\n\t\tIntent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);\n\t\tphotoPickerIntent.setType(\"image/*\");\n\t\tstartActivityForResult(photoPickerIntent, 1);\n\t}", "public void onItemClick(AdapterView<?> parent,\n View v, int position, long id){\n Intent i = new Intent(getApplicationContext(), SingleViewActivity.class);\n // Pass image index\n i.putExtra(\"id\", position);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n ((MainActivity) getActivity()).startActivityForResult(\n Intent.createChooser(intent, \"Select Picture\"),\n MainActivity.GALLERY_CODE);\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\timgfinalImage.setDrawingCacheEnabled(true);\r\n\t\t\t\tbmp_finalImage = Bitmap.createBitmap(imgfinalImage.getDrawingCache(true));\r\n\t\t\t\tIntent intent = new Intent(FilterScreen.this, ShareItScreen.class);\r\n\t\t\t\tintent.putExtra(\"image_video\", image_video);\r\n\t\t\t\tintent.putExtra(\"rate\", rate);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\toverridePendingTransition(0, 0);\r\n\t\t\t}", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.WEIXIN_CIRCLE)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }" ]
[ "0.748085", "0.74494797", "0.7334241", "0.7315795", "0.7190242", "0.7143525", "0.70987016", "0.70560515", "0.7033613", "0.7026161", "0.7024848", "0.6986872", "0.6940247", "0.68808776", "0.6880096", "0.6876107", "0.68576115", "0.68535143", "0.6829027", "0.67747396", "0.67707175", "0.67700213", "0.67662495", "0.676362", "0.67607963", "0.6758522", "0.6754839", "0.67499053", "0.67499053", "0.6743427", "0.67402416", "0.6736496", "0.6719222", "0.67123497", "0.67036945", "0.66976005", "0.6695809", "0.667052", "0.666984", "0.6664579", "0.6658509", "0.66500694", "0.66426307", "0.6637304", "0.6634717", "0.6634187", "0.66321003", "0.66321003", "0.6631706", "0.66145843", "0.6614047", "0.66111755", "0.6602617", "0.659744", "0.6589178", "0.6575939", "0.65756166", "0.6568608", "0.65665704", "0.65660566", "0.65640914", "0.6563956", "0.6550191", "0.65457207", "0.65414566", "0.6540327", "0.65359354", "0.65239424", "0.65205634", "0.6497508", "0.64971787", "0.6496855", "0.64964694", "0.64948136", "0.6487288", "0.64797187", "0.6476807", "0.6470084", "0.64569485", "0.6454935", "0.64476395", "0.643941", "0.64375085", "0.6435654", "0.6429336", "0.64281154", "0.64197856", "0.6412422", "0.64027655", "0.6398558", "0.63897085", "0.63780427", "0.6373295", "0.6369279", "0.636591", "0.63616127", "0.635978", "0.6358052", "0.6356302", "0.63457394" ]
0.7653066
0
On play video view click
private void onPlayVideoClick() { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("file://" + mediaPath), "video/mp4"); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n playVideo();\n }", "public void playVideo(View view) {\n ImageView video = (ImageView) view;\n String tag = video.getTag().toString();\n listener.playVideo(tag);\n }", "@Override\n\t\tpublic void onClick(View v) {\n\n\t\t\tif (memreas_event_details_video_view.isPlaying()) {\n\t\t\t\tmemreas_event_details_video_view.pause();\n\t\t\t\tmemreas_event_details_video_view.setVisibility(View.GONE);\n\t\t\t\tmemreas_event_details_pager_image_view\n\t\t\t\t\t\t.setVisibility(View.VISIBLE);\n\t\t\t\tmemreas_event_details_pager_play_video_icon\n\t\t\t\t\t\t.setVisibility(View.VISIBLE);\n\t\t\t} else {\n\t\t\t\tmemreas_event_details_pager_framelayout.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\tmemreas_event_details_pager_image_view.setVisibility(View.GONE);\n\t\t\t\tmemreas_event_details_pager_play_video_icon\n\t\t\t\t\t\t.setVisibility(View.GONE);\n\t\t\t\t// mProgressDialog.setAndShow(\"preparing media...\");\n\t\t\t\tmemreas_event_details_video_view\n\t\t\t\t\t\t.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);\n\t\t\t\tmemreas_event_details_video_view.setVisibility(View.VISIBLE);\n\t\t\t\tmemreas_event_details_video_view.requestFocus();\n\t\t\t\tif (mediaController == null) {\n\t\t\t\t\tmediaController = new MediaController(context);\n\t\t\t\t}\n\t\t\t\tmemreas_event_details_video_view.setVideoURI(Uri\n\t\t\t\t\t\t.parse(media_url));\n\t\t\t\tmediaController.setAnchorView(memreas_event_details_video_view);\n\t\t\t\tmediaController\n\t\t\t\t\t\t.setMediaPlayer(memreas_event_details_video_view);\n\t\t\t\tmemreas_event_details_video_view\n\t\t\t\t\t\t.setMediaController(mediaController);\n\t\t\t\tmediaController.setEnabled(true);\n\t\t\t\tsetListeners();\n\t\t\t\tmemreas_event_details_video_view.requestLayout();\n\t\t\t\t// mProgressDialog.dismiss();\n\t\t\t}\n\t\t}", "public void onClick(View v) {\n\t\t\t\tvideoMethod();\n\t\t\t}", "public void onClick(View v) {\n\t\tif(v==play_button)\n\t\t{\n\t\t\tisPause = false;\n\t\t\tSystem.out.println(strVideoPath);\n\t\t\tplayVideo(strVideoPath);\n\t\t}\n\t\telse if(v==pause_button){\n\t\t\tif(isPause == false){\n\t\t\t\tmyMediaPlayer.pause();\n\t\t\t\tisPause = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmyMediaPlayer.start();\n\t\t\t\tisPause = false;\n\t\t\t}\n\t\t}\t\t\n\t}", "public void playVideo() {\n }", "@Override\r\n public void onClick(View v) {\n String path = \"http://techslides.com/demos/sample-videos/small.mp4\";\r\n// Uri uri=Uri.parse(path);\r\n// videoView.setVideoURI(uri);\r\n //MediaController mc = new MediaController(TransformDetailActivity.this);\r\n\r\n //videoView.start();\r\n// videoView.setOnTouchListener(new View.OnTouchListener() {\r\n// @Override\r\n// public boolean onTouch(View v, MotionEvent event) {\r\n// System.out.print(videoView.isPlaying());\r\n// if(videoView.isPlaying()) {\r\n// stopPosition[0] = videoView.getCurrentPosition();\r\n// videoView.pause();\r\n// } else {\r\n// videoView.seekTo(stopPosition[0]);\r\n// videoView.start();\r\n// }\r\n// return false;\r\n// }\r\n// });\r\n// String path = \"android.resource://\" + getPackageName() + \"/\" + R.raw.welcome;\r\n// Uri videoUri = Uri.parse(path);\r\n// Intent intent = new Intent(Intent.ACTION_VIEW, videoUri);\r\n// intent.setDataAndType(videoUri, \"video/*\");\r\n// startActivity(intent);\r\n\r\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path));\r\n intent.setDataAndType(Uri.parse(path), \"video/mp4\");\r\n startActivity(intent);\r\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isplayheng==1){\n\t\t\t\t\t\t\tplay.setBackgroundResource(R.drawable.play);\n\t\t\t\t\t\t\tisplayheng=0;\n\t\t\t\t\t\tif(vvct.isShown()){\n\t\t\t\t\t\t\t vvct.pause();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tvideoview.pause();\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\telse{\n\t\t\t\t\t\t\tplay.setBackgroundResource(R.drawable.pause);\n\t\t\t\t\t\t\tisplayheng=1;\n\t\t\t\t\t\t\tif(vvct.isShown()){\n\t\t\t\t\t\t\t\t vvct.start();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tvideoview.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, MainVideo.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n playVideo(mActivity, itemDrm);\n }", "public void onClick(View v) {\n\t\t\t\tSystem.out.println(\"to video_set\");\n\t\t\t\tIntent intent = new Intent(MainMenuActivity.this,\n\t\t\t\t\t\tapp_video_Activity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void playVideo(View view){\n YT_View.initialize(YouTubeConfig.getApiKey(), onInitializedListener);\n }", "public void onClick(View v) {\n\t\t\tswitch(v.getId())\n\t\t\t{\n\t\t\tcase R.id.imageLatest: \t//上一首, 若已是第一部就移到最後一部\n \t\tvideoindex --;\n \t\tif (videoindex < 0) videoindex = videofile.length-1; \n\t\t\t\tplayVideo();\n\t\t\t\tbreak;\n\t\t\tcase R.id.imageStop: \t\t//停止\n\t\t\t\tmediaplayer.stop(); \n\t\t\t\tbreak;\n\t\t\tcase R.id.imagePlay: \t\t//播放\n\t\t\t\tif(flagPause) { \t\t//如果是暫停狀態就繼續播放\n\t\t\t\t\tmediaplayer.start(); \n \t\tflagPause=false;\n\t\t\t\t}\n\t\t\t\telse playVideo();\n\t\t\t\tbreak;\n\t\t\tcase R.id.imagePause: \t//暫停\n\t\t\t\tif (mediaplayer.isPlaying()) {\n \t\tmediaplayer.pause();\n \t\tflagPause=true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.imageNext: \t\t//下一部, 若已是最後一部就移到第一部\n\t\t\t\tvideoindex ++;\n\t\t\t\tif (videoindex >= videofile.length) videoindex = 0;\n\t\t\t\tplayVideo();\n\t\t\t\tbreak;\n\t\t\tcase R.id.imageTurnoff: \t//結束撥放程式\n\t\t\t\tfinish();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tfinal ImageView imgvw = (ImageView) v;\n\t\t\t\t\t\tif (imgvw.getTag(R.string.PlayPauseKey).equals(\n\t\t\t\t\t\t\t\t\"Stopped\")) {\n\t\t\t\t\t\t\timgvw.setTag(R.string.PlayPauseKey, \"Playing\");\n\t\t\t\t\t\t\timgvw.setImageResource(View.INVISIBLE);\n\t\t\t\t\t\t\t((VideoView) imgvw.getTag(R.string.PlayPauseVideo))\n\t\t\t\t\t\t\t\t\t.start();\n\t\t\t\t\t\t} else if (imgvw.getTag(R.string.PlayPauseKey).equals(\n\t\t\t\t\t\t\t\t\"Playing\")) {\n\t\t\t\t\t\t\timgvw.setTag(R.string.PlayPauseKey, \"Stopped\");\n\t\t\t\t\t\t\timgvw.setImageResource(R.drawable.ic_menu_play_clip);\n\t\t\t\t\t\t\t// seekRun.player.pause();\n\t\t\t\t\t\t\t((VideoView) imgvw.getTag(R.string.PlayPauseVideo))\n\t\t\t\t\t\t\t\t\t.pause();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t((VideoView) imgvw.getTag(R.string.PlayPauseVideo))\n\t\t\t\t\t\t\t\t.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\timgvw.setImageResource(R.drawable.ic_menu_play_clip);\n\t\t\t\t\t\t\t\t\t\timgvw.setTag(R.string.PlayPauseKey,\n\t\t\t\t\t\t\t\t\t\t\t\t\"Stopped\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n handlePlaybackButtonClick();\n }", "@Override\n public void onClick(View view) {\n getOps().downloadVideo();\n }", "@Override\n public void onClick(View v) {\n stopVideo();\n }", "@Override\n public void onClick(View v) {\n play(v);\n }", "@Override\n public void onClick(View v) {\n Intent it = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.parse(\"http://\"+ PostUrl.Media+\":8080/upload/\"+item.getMediaPath().get(0).split(\"\\\\.\")[0]+\".mp4\");\n it.setDataAndType(uri, \"video/mp4\");\n context.startActivity(it);\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent videoIntent = new Intent(SearchVideoListActivity.this,\r\n\t\t\t\t\t\tSearchActivity.class);\r\n\r\n\t\t\t\tAnimatedActivity parentActivity = (AnimatedActivity) SearchVideoListActivity.this\r\n\t\t\t\t\t\t.getParent();\r\n\t\t\t\tparentActivity\r\n\t\t\t\t\t\t.startChildActivity(\"LiveStreamoter\", videoIntent);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n View viewVideo = LayoutInflater.from(mContext).inflate(R.layout.dialog_video,null);\n AlertDialog.Builder layoutDialogVideo = new AlertDialog.Builder(mContext);\n\n VideoView vvVideoView = viewVideo.findViewById(R.id.vv_dialogVideo_video);\n vvVideoView.setVideoPath(item.getVideo());\n vvVideoView.seekTo(0);\n vvVideoView.start();\n MediaController mediaController = new MediaController(mContext);\n vvVideoView.setMediaController(mediaController);\n mediaController.setMediaPlayer(vvVideoView);\n\n layoutDialogVideo.setView(viewVideo);\n Dialog dialogVideo = layoutDialogVideo.create();\n\n dialogVideo.show();\n }", "public void playVideo() {\n \t\t try {\n \t\t\t videoView.setOnPreparedListener(new OnPreparedListener() {\n \n \t\t\t\t @Override\n \t\t\t\t public void onPrepared(MediaPlayer mp) {\n \t\t\t\t\t mp.setLooping(true); \n \t\t\t\t }\n \t\t\t });\n \t\t\t videoView.setVideoPath(SAVE_PATH);\n \t\t\t videoView.start();\n \t\t } catch (Exception e) {\n \t\t\t Log.e(\"Video\", \"error: \" + e.getMessage(), e);\n \t\t }\n \t }", "public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tvideoindex = arg2; \t\t\t\t\t//取得點選位置\n\t\t\t\tplayVideo(); \t\t\t\t\t\t//播放點選影片 \t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMap<String,String>map=new HashMap<String,String>();\n\t\t\t\tmap.put(\"videoID\", object.videoID);\n\t\t\t\tmap.put(\"videoname\", object.videoname);\n\t\t\t\tString albumVideoImgUrl=CommonUrl.baseUrl + object.videoImgUrl +\".small\"+ object.suffix;\n\t\t\t\tmap.put(\"videoImgUrl\", albumVideoImgUrl);\n\t\t\t\tCommonUtil.jumpToPlayerActivity(context, map);\n\t\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v=inflater.inflate(R.layout.fragment_trainee__third, container, false);\n\n Record_button=(Button)v.findViewById(R.id.record_button);\n vView=(VideoView)v.findViewById(R.id.videoView);\n MediaController mediaController = new MediaController(v.getContext());\n mediaController.setAnchorView(vView);\n// set media controller object for a video view\n vView.setMediaController(mediaController);\n Record_button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dispatchTakeVideoIntent();\n\n\n }\n });\n return v;\n\n\n\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tSystem.out.println(\"播放网络上的音频\");\n\t\t\ttry {\n\n\t\t\t\tString path = catalogName + File.separator + videoName;\n\t\t\t\t// String path =\n\t\t\t\t// \"http://192.168.253.1:8080/httpGetVideo/5a3bbe53835ffd43/LoveStory.mp4\";\n\t\t\t\tConnectionDetector cd = new ConnectionDetector(\n\t\t\t\t\t\tHistoryVideoBroadcastActivity.this);\n\t\t\t\tLog.e(TAG, \"11111111111\");\n\t\t\t\tif (cd.isConnectingToInternet()) {\n\t\t\t\t\tMediaController mediaController = new MediaController(\n\t\t\t\t\t\t\tHistoryVideoBroadcastActivity.this); // 通过videoView提供的uri函数借口播放服务器视频\n\t\t\t\t\tmediaController.setAnchorView(videoView);\n\t\t\t\t\tUri video = Uri.parse(path);\n\t\t\t\t\tvideoView.setMediaController(mediaController);\n\t\t\t\t\tvideoView.setVideoURI(video);\n\t\t\t\t\tvideoView.start();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(HistoryVideoBroadcastActivity.this,\n\t\t\t\t\t\t\t\"网络连接没有开启,请设置网络连接\", 2000).show();\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tToast.makeText(HistoryVideoBroadcastActivity.this,\n\t\t\t\t\t\t\"Error connecting\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(mContext, ChangeClarityActivity.class);\n\t\t\t\t\tintent.putExtra(ChangeClarityActivity.VIDEOPATH, videoPath);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(player!=null){\n\t\t\t\t\tif(!isVoiceFlags){\n\t\t\t\t\t\tplayer.setVolume(0f, 0f);\n\t\t\t\t\t\tvideoView.start();\n\t\t\t\t\t\tisVoiceFlags=true;\n\t\t\t\t\t\timg_volumvideo.setBackgroundResource(TapfunsResourceUtil.findDrawableIdByName(AlertVideoActivity.this, \"volumvideo\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tplayer.setVolume(1f, 1f);\n\t\t\t\t\t\tvideoView.start();\n\t\t\t\t\t\tisVoiceFlags=false;\n\t\t\t\t\t\timg_volumvideo.setBackgroundResource(TapfunsResourceUtil.findDrawableIdByName(AlertVideoActivity.this, \"volumclosevideo\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void onVideoStarted () {}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tplay();\n\t\t\t}", "@Override\n public void onClick(View view) {\n youTubePlayerFragment.initialize(YoutubeAPI_KEY, new YouTubePlayer.OnInitializedListener() {\n\n @Override\n public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) {\n if (!wasRestored) {\n player.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT);\n player.loadVideo(\"MOJRWYzevLg\");\n player.play();\n }\n }\n\n @Override\n public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult error) {\n // YouTube error\n // String errorMessage = error.toString();\n }\n });\n }", "@Override\n public boolean onTouch(View v, MotionEvent event)\n {\n Uri rawUri = Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.a_0);\n videoView.setVideoURI(rawUri);\n videoView.start();\n return false;\n }", "public void fetchVideo(View view) {\n Log.i(\"progress\", \"fetchVideo\");\n\n startActivityForResult(requestVideoFileIntent,0);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tv.setVisibility(View.GONE);\n\t\t\t\tvideo_webview.loadDataWithBaseURL(null, url, \"text/html\", \"UTF-8\", \"\");\n\t\t\t}", "@Override\n public void onListItemClick(Video clickedVideo) {\n }", "public void pauseVideoView() {\n\t\tif (memreas_event_details_video_view.isPlaying()) {\n\t\t\tmemreas_event_details_video_view.pause();\n\t\t} else {\n\t\t\tmemreas_event_details_video_view.resume();\n\t\t}\n\t}", "private void toggleScreenShare(View v) {\n\n if(((ToggleButton)v).isChecked()){\n initRecorder();\n recordScreen();\n }\n else\n {\n mediaRecorder.stop();\n mediaRecorder.reset();\n stopRecordScreen();\n\n //play in videoView\n //videoView.setVisibility(View.VISIBLE);\n //videoView.setVideoURI(Uri.parse(videoUri));\n //videoView.start();\n\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\" Location of video : \");\n builder.setMessage(videoUri);\n builder.show();\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent i = new Intent(MainActivity.this, PlayVideo.class);\n i.putExtra(\"KEY\", videoUri);\n //Toast.makeText(this, videoUri, Toast.LENGTH_SHORT).show();\n startActivity(i);\n }\n }, 2000);\n Toast.makeText(this, \"Loading video...\", Toast.LENGTH_SHORT).show();\n\n\n\n }\n }", "public void onClick(View arg0) {\n\t\t\t\tif(!isPlay){\r\n\t\t\t\t\t//change to play button and stop view\r\n\t\t\t\t\thomeview_play_pause_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.homeview_pause_button));\r\n\t\t\t\t\tisPlay = true;\r\n\t\t\t\t\tloadMediaPlayer();\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//change to pause button and play view\r\n\t\t\t\t\thomeview_play_pause_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.homeview_play_button));\r\n\t\t\t\t\tisPlay = false;\r\n\t\t\t\t\tmMediaPlayer.stop();\r\n\t\t\t\t\t\r\n\t\t\t\t\tbuffer_lev1.setVisibility(View.INVISIBLE);\r\n\t\t\t\t\tbuffer_lev2.setVisibility(View.INVISIBLE);\r\n\t\t\t\t\tbuffer_lev3.setVisibility(View.INVISIBLE);\r\n\t\t\t\t\tbuffer_lev4.setVisibility(View.INVISIBLE);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.seekButton:\r\n\t\t\tLog.v(\"VideoActivity\", v.getId() + \"\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n public void onVideoStarted() {\n }", "private void videoVisible() {\n }", "public void playButton(View view) {\n\t\t// show loading dialog, first time may take a bit\n\t\tProgressDialog.show(this, getString(R.string.loadingLabel),\n\t\t\t\tgetString(R.string.loadingMessage));\n\t\tIntent intent = new Intent(this, PlayActivity.class);\n\t\tstartActivity(intent);\n\t}", "public void verVideo(View v) {\n ViewVideo.setVideoURI(Uri.parse(getExternalFilesDir(null) + \"/\" + txtNombreArchivo.getText().toString()));\n /*Ejecutamos el video*/\n ViewVideo.start();\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()){\n case R.id.trainingVideoButton:\n if(skill != null){\n String link = (String) skill.getLink();\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(link));\n getContext().startActivity(i);\n }\n break;\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tplayer.pause();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tplayer.start();\r\n\t\t\t}", "public void onPlayButtonPressed(View view){\n ((ImageView)(findViewById(R.id.pauseButton))).setVisibility(View.VISIBLE);\n ((ImageView)(findViewById(R.id.playButton))).setVisibility(View.INVISIBLE);\n timerService.onPlayRequest();\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tLog.e(TAG,\"video view click\");\n\t\tif (v.getId() == R.id.clickview){\n\t\t\tshowCtl = !showCtl;\n\t\t\tif(showCtl){\n\t\t\t\tctlTop.startAnimation(AnimationUtils.loadAnimation(this, R.anim.show_top));\n\t\t\t\tctlBottom.startAnimation(AnimationUtils.loadAnimation(this, R.anim.show_btm));\n\t\t\t\tif (!uid.equals(\"120\")){\n\t\t\t\t\tctlBottom.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\tctlTop.setVisibility(View.VISIBLE);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tctlTop.startAnimation(AnimationUtils.loadAnimation(this, R.anim.gone_top));\n\t\t\t\tctlBottom.startAnimation(AnimationUtils.loadAnimation(this, R.anim.gone_btm));\n\n\t\t\t\tctlTop.setVisibility(View.GONE);\n\t\t\t\tctlBottom.setVisibility(View.GONE);\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void onClick(View v) {\n if (v == btnVoice) {\n isMute = !isMute;\n // Handle clicks for btnVoice\n updataVoice(currenVoice, isMute);\n } else if (v == btnSwitchPlayer) {\n showSwitchPlayerDialog();//调用系统播放器\n // Handle clicks for btnSwitchPlayer\n } else if (v == btnExit) {\n finish();\n // Handle clicks for btnExit\n } else if (v == btnVideoPre) {\n playPreVideo();\n // Handle clicks for btnVideoPre\n } else if (v == btnVideoStartPause) {\n StartAndPause();\n // Handle clicks for btnVideoStartPause\n } else if (v == btnVideoNext) {\n // Handle clicks for btnVideoNext\n playNextVideo();\n } else if (v == btnVideoSwitchSrceen) {\n // Handle clicks for btnVideoSwitchSrceen\n setFullScreenAndDefault();//设置播放屏幕大小\n }\n //先移除旧的消息,再设置新的消息,这样就保证了在点击的是时候,控制面板不会自己动隐藏\n handler.removeMessages(HIDE_MEDIA_CONTORLLER);\n handler.sendEmptyMessageDelayed(HIDE_MEDIA_CONTORLLER, 4000);\n }", "@Override\n public void videoStarted() {\n super.videoStarted();\n img_playback.setImageResource(R.drawable.ic_pause);\n if (isMuted) {\n muteVideo();\n img_vol.setImageResource(R.drawable.ic_mute);\n } else {\n unmuteVideo();\n img_vol.setImageResource(R.drawable.ic_unmute);\n }\n }", "public void onHowToPlay(View view) {\r\n\t\tIntent intent = new Intent(this, HowToPlayActivity.class);\r\n\t\tstartActivity(intent);\r\n }", "@Override\n public void onMediaClicked(int position) {\n }", "public void onPlaybackInfoClicked(View view) {\n Intent playbackIntent = getIntent(this, PlaybackActivity.class);\n this.startActivity(playbackIntent);\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()){\n case R.id.btnPlay:\n\n if(mediaPlayer.isPlaying())\n {\n mediaPlayer.pause();\n btnPlay.setImageResource(R.drawable.ic_play_arrow_black_24dp);\n }\n else{\n mediaPlayer.start();\n btnPlay.setImageResource(R.drawable.ic_pause_black_24dp);\n changeSeekbar();\n }\n break;\n case R.id.btnFor:\n mediaPlayer.seekTo(mediaPlayer.getCurrentPosition()+5000);\n break;\n case R.id.btnBack:\n mediaPlayer.seekTo(mediaPlayer.getCurrentPosition()-5000);\n break;\n\n }\n\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"3\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"1\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"4\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(mContext, FullScreenActivity.class);\n\t\t\t\tintent.putExtra(\"videoPathType\", \"2\");\n\t\t\t\tintent.putExtra(\"type\", \"videoFragment\");\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().finish();\n\t\t\t}", "public void onClickPlay() {\n if (player != null) {\n if (player.mediaPlayer.isPlaying()) {\n player.pauseMedia();\n changePlayPauseIcon(PLAY);\n isPauseResume = !isPauseResume;\n playListAdapter.setPlayPause(true);\n } else {\n if (isPauseResume) {\n player.resumeMedia();\n changePlayPauseIcon(PAUSE);\n isPauseResume = !isPauseResume;\n playListAdapter.setPlayPause(false);\n } else {\n playSelectSong();\n }\n }\n } else {\n playSelectSong();\n }\n\n }", "public interface VideoClickHandler {\n\n void onClick(Video video);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstopPlay(v);\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n switch (v.getId()){\n case R.id.btn_play_player:\n Log.d(PlayerActivity.TAG,\"Button Play Clicked\");\n this.mPlayerService.playTrack();\n break;\n case R.id.btn_pause_player:\n Log.d(PlayerActivity.TAG,\"Button Pause Clicked\");\n this.mPlayerService.pauseTrack();\n break;\n case R.id.btn_stop_player:\n Log.d(PlayerActivity.TAG,\"Button Stop Clicked\");\n this.mPlayerService.stopTrack();\n break;\n case R.id.btn_prev_player:\n Log.d(PlayerActivity.TAG,\"Button Prev Clicked\");\n this.mPlayerService.prevTrack();\n break;\n case R.id.btn_next_player:\n Log.d(PlayerActivity.TAG,\"Button Next Clicked\");\n this.mPlayerService.nextTrack();\n break;\n }\n\n }", "default public void clickPlay() {\n\t\tremoteControlAction(RemoteControlKeyword.PLAY);\n\t}", "@Override\n public void onClick(View view, int position, boolean isLongClick) {\n Intent videoIntent = new Intent(activity.getBaseContext(), FullVideoActivity.class);\n videoIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n videoIntent.putExtra(\"videoUri\", videoUri);\n activity.startActivity(videoIntent);\n\n }", "public void onView(View v) {\n //switch to render view\n Intent intent = new Intent(this, Playback.class);\n startActivity(intent);\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playPrevious();\r\n\r\n\t\t\t\t\t\t\t}", "default void onVideoStarted() {\n }", "@Override\n public void onClick(View view) {\n if (!Constants.getActivateBottomNavigationWidgetButton().equals(\"Video\")) {\n disabledActivateBottomNavigationWidgetButton();\n\n videoButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.ic_video, 0, 0);\n videoButton.setTypeface(null, Typeface.BOLD);\n videoButton.setTextColor(getResources().getColor(R.color.bottom_navigation_widget_button_enable_color));\n\n Utils.showLibrary(LibraryActivity.this, \"video\");\n Utils.triggerGAEvent(LibraryActivity.this, \"BottomNavigation\", \"Video\", customerId);\n }\n }", "public static void start(YouTubePlayerView view) {\n view.a();\n }", "@Test\n public void panelButtonsMusicVideoTest() {\n getPlayerHandler().startPlay(Playlist.playlistID.VIDEO, 1);\n Player.GetItem item = getPlayerHandler().getMediaItem();\n final String title = item.getTitle();\n onView(isRoot()).perform(ViewActions.waitForView(\n R.id.title, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return title.contentEquals(((TextView) v).getText());\n }\n }, 10000));\n\n onView(withId(R.id.next)).check(matches(isDisplayed()));\n onView(withId(R.id.previous)).check(matches(isDisplayed()));\n onView(withId(R.id.play)).check(matches(isDisplayed()));\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tgetPopupsmallWindowInstanceleft();\n\t getPopupsmallWindowInstanceright();\n\t \t getsharePopupsmallWindowInstance() ;\n\t \t lvct.setVisibility(View.VISIBLE);\n\t\t\tgroup.setVisibility(View.VISIBLE);\n\t\t\t// TODO Auto-generated method stub\n\t\tvideoview.stopPlayback();\n\t\t\tvideoview.setVisibility(View.INVISIBLE);\n\t\t\tvvct.stopPlayback();\n\t\t\tvvct.setVisibility(View.INVISIBLE);\n\t\t\tisplay=false;\n\t \t \n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void onViewCreated(View view, Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\r\n\t\tplayView = view.findViewById(R.id.play);\r\n\t\tplayView.setOnClickListener(this);\r\n\t\tvideoView = (VideoView) view.findViewById(R.id.video);\r\n\t\tListView listView = (ListView) view.findViewById(R.id.listview);\r\n\t\tadapter = new LiveListAdapter(getActivity(), list);\r\n\t\tlistView.setAdapter(adapter);\r\n\t\trequest();\r\n\t}", "@Override\n public void onClick(View view) {\n VideoDetails.this.finish();\n }", "@Override\n public void onClick(View view) {\n Intent playerIntent = new Intent(PlaylistsActivity.this, MainActivity.class);\n startActivity(playerIntent);\n }", "@Override\n public void onClick(View v) {\n Log.e(\"Mess\", \"onClick: \");\n if (v == btnVoice) {\n isMute = !isMute;\n // Handle clicks for btnVoice\n updataVoice(currentVoice, isMute);\n\n } else if (v == btnSwichPlayer) {\n // Handle clicks for btnSwichPlayer\n showSwichPlayerDialog();\n } else if (v == btnExit) {\n // Handle clicks for btnExit\n finish();\n } else if (v == btnPre) {\n // Handle clicks for btnPre\n playPreVideo();\n } else if (v == btnVideoStartPause) {\n // Handle clicks for btnVideoStartPause\n startAndPause();\n } else if (v == btnVideoNext) {\n // Handle clicks for btnVideoNext\n playNextVideo();\n } else if (v == btnVideoVideoSwitchScree) {\n // Handle clicks for btnVideoVideoSwitchScree\n setFullScreenAndDefault();\n }\n handler.removeMessages(HIDE_MEDIACONTROLLER);\n handler.sendEmptyMessageDelayed(HIDE_MEDIACONTROLLER, 5000);\n }", "private void initiatePlayer() {\n ExoPlayerVideoHandler.getInstance().initiateLoaderController(\n this,\n loadingImage,\n exoPlayerView,\n ExoPlayerVideoHandler.getInstance().getVideoResolution()!=null?ExoPlayerVideoHandler.getInstance().getVideoResolution():getString(R.string.default_resolution),\n this\n );\n ExoPlayerVideoHandler.getInstance().playVideo();\n content = ExoPlayerVideoHandler.getInstance().getCurrentVideoInfo();\n //ExoPlayerVideoHandler.getInstance().goToForeground();\n setSpinnerValue();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tplaytwo.setVisibility(View.GONE);\n\t\t\t\tpausetwo.setVisibility(View.VISIBLE);\n\t\t\t\tfollow.setVisibility(View.GONE);\n\t\t\t\tfollowme.setVisibility(View.VISIBLE);\n\n\t\t\t\tmediaFileLengthInMilliseconds = mediaPlayer.getDuration();\n\t\t\t\tmediaPlayer.seekTo(currentDuration);\n\t\t\t\tprimarySeekBarProgressUpdater();\n\t\t\t\tgetActivity().startService(\n\t\t\t\t\t\tnew Intent(StreamSongService.ACTION_PLAY));\n\n\t\t\t\t/*\n\t\t\t\t * if (!mediaPlayer.isPlaying()) {\n\t\t\t\t * mediaPlayer.seekTo(currentDuration); //mediaPlayer.start();\n\t\t\t\t * primarySeekBarProgressUpdater(); }\n\t\t\t\t */\n\t\t\t}", "public void playMedia(View v)\n {\n // Make a decision based on the id of the view\n switch (v.getId())\n {\n case R.id.ukuleleButton:\n // If it's playing, pause it\n if (ukuleleMediaPlayer.isPlaying())\n {\n ukuleleMediaPlayer.pause();\n // Change the text\n ukuleleButton.setText(R.string.ukulele_button_play_text);\n ukuleleButton.setBackgroundColor(getResources().getColor(R.color.turquoise_water));\n ukuleleButton.setTextColor(Color.WHITE);\n // Hide other two buttons:\n ipuButton.setVisibility(View.VISIBLE);\n hulaButton.setVisibility(View.VISIBLE);\n }\n // else, play it\n else\n {\n ukuleleMediaPlayer.start();\n ukuleleButton.setText(R.string.ukulele_button_pause_text);\n ukuleleButton.setBackgroundColor(Color.TRANSPARENT);\n ukuleleButton.setTextColor(getResources().getColor(R.color.turquoise_water));\n ipuButton.setVisibility(View.INVISIBLE);\n hulaButton.setVisibility(View.INVISIBLE);\n }\n break;\n case R.id.ipuButton:\n if (ipuMediaPlayer.isPlaying())\n {\n ipuMediaPlayer.pause();\n ipuButton.setText(R.string.ipu_button_play_text);\n ipuButton.setBackgroundColor(getResources().getColor(R.color.turquoise_water));\n ipuButton.setTextColor(Color.WHITE);\n ukuleleButton.setVisibility(View.VISIBLE);\n hulaButton.setVisibility(View.VISIBLE);\n } else\n {\n ipuMediaPlayer.start();\n ipuButton.setText(R.string.ipu_button_pause_text);\n ipuButton.setBackgroundColor(Color.TRANSPARENT);\n ipuButton.setTextColor(getResources().getColor(R.color.turquoise_water));\n ukuleleButton.setVisibility(View.INVISIBLE);\n hulaButton.setVisibility(View.INVISIBLE);\n }\n break;\n case R.id.hulaButton:\n if (hulaVideoView.isPlaying())\n {\n hulaVideoView.pause();\n hulaButton.setText(R.string.hula_button_watch_text);\n hulaButton.setBackgroundColor(getResources().getColor(R.color.turquoise_water));\n hulaButton.setTextColor(Color.WHITE);\n ukuleleButton.setVisibility(View.VISIBLE);\n ipuButton.setVisibility(View.VISIBLE);\n } else\n {\n hulaVideoView.start();\n hulaButton.setText(R.string.hula_button_pause_text);\n hulaButton.setBackgroundColor(Color.TRANSPARENT);\n hulaButton.setTextColor(getResources().getColor(R.color.turquoise_water));\n ukuleleButton.setVisibility(View.INVISIBLE);\n ipuButton.setVisibility(View.INVISIBLE);\n }\n break;\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfollow.setVisibility(View.VISIBLE);\n\t\t\t\tfollowme.setVisibility(View.GONE);\n\t\t\t\tplaytwo.setVisibility(View.VISIBLE);\n\t\t\t\tpausetwo.setVisibility(View.GONE);\n\t\t\t\tgetActivity().startService(\n\t\t\t\t\t\tnew Intent(StreamSongService.ACTION_PAUSE));\n\t\t\t\tcurrentDuration = mediaPlayer.getCurrentPosition();\n\t\t\t}", "public void onPlayerPlay() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tplay.setVisibility(View.GONE);\n\t\t\t\tpause.setVisibility(View.VISIBLE);\n\t\t\t\tsetCurrentTrack();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfollow.setVisibility(View.VISIBLE);\n\t\t\t\tfollowme.setVisibility(View.GONE);\n\t\t\t\tplaytwo.setVisibility(View.VISIBLE);\n\t\t\t\tpausetwo.setVisibility(View.GONE);\n\n\t\t\t\tgetActivity().startService(\n\t\t\t\t\t\tnew Intent(StreamSongService.ACTION_PAUSE));\n\t\t\t\tcurrentDuration = mediaPlayer.getCurrentPosition();\n\t\t\t}", "public void onClick(View v) {\n if (mPlayer != null && mPlayer.isPlaying()) {\n mPlayer.stop();\n }\n }", "public void playClick(View view)\r\n {\r\n Intent intent=new Intent(MainActivity.this, LevelActivity.class);\r\n startActivity(intent);\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.pro);\n Button info=(Button)findViewById(R.id.info);\n Button back=(Button) findViewById(R.id.back);\n Button power=(Button) findViewById(R.id.power);\n Button home=(Button) findViewById(R.id.home);\n Button next=(Button) findViewById(R.id.next);\n // pro=(VideoView)findViewById(R.id.videoView1);\n \n MediaController mc = new MediaController(this);\n \n VideoView vv = (VideoView)this.findViewById(R.id.video);\n vv.setMediaController(mc);\n String fileName = \"android.resource://\" + getPackageName() + \"/\" + R.raw.backhand_male;\n vv.getDuration();\n vv.setVideoURI(Uri.parse(fileName));\n \n vv.start();\n vv.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n \n public void onCompletion(MediaPlayer mp) {\n // not playVideo\n // playVideo();\n\n \tIntent intent = new Intent(Probackhandmale.this, Probackhandmale.class);\n \t startActivity(intent);\n \t finish();\n }\n });\n \n power.setOnClickListener(new View.OnClickListener() {\n\t public void onClick(View view) {\n\t \t power(); \n\t \t \n\t \t \t \t \n\t\t \t }\n\t\t });\n \n back.setOnClickListener(new View.OnClickListener() {\n\t public void onClick(View view) {\n\t \t back(); \n\t \t \n\t \t \t \t \n\t\t \t }\n\t\t });\n next.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n \t \n \t Context context = getApplicationContext();\n \tCharSequence text = \"Please press back then proceed to record a video.\";\n \tint duration = Toast.LENGTH_SHORT;\n \tToast toast = Toast.makeText(context, text, duration);\n \ttoast.show();\n \t \t \t \n\t \t }\n\t });\n info.setOnClickListener(new View.OnClickListener() {\n\t public void onClick(View view) {\n\t \tinfo(); \n\t \t \n\t \t \t \t \n\t\t \t }\n\t\t });\n home.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n \t home(); \n \t \n \t \t \t \n \t }\n });\n \n \t }", "public void startVideoPlayer(Context context, String url) {\n Resource item = new Resource();\n item.setType(context.getString(R.string.typeVideo));\n item.setUrlMain(url);\n context.startActivity(PlayVideoFullScreenActivity.getStartActivityIntent(context, ConstantUtil.BLANK, ConstantUtil.BLANK, PlayVideoFullScreenActivity.NETWORK_TYPE_ONLINE, (Resource) item));\n }", "@Override\n\tpublic void videoStart() {\n\t\t\n\t}", "private void displayVideo(){\n ButtonBack displayVideo = new ButtonBack(\"/view/VideoWindow.fxml\");\n displayVideo.displayVideo(\"winner\",\"Congratulation\");\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgetPopupsmallWindowInstanceleft();\n\t getPopupsmallWindowInstanceright();\n\t \t getsharePopupsmallWindowInstance() ;\n\t \t lvct.setVisibility(View.VISIBLE);\n\t\t\tgroup.setVisibility(View.VISIBLE);\n\t\t\t// TODO Auto-generated method stub\n\t\tvideoview.stopPlayback();\n\t\t\tvideoview.setVisibility(View.INVISIBLE);\n\t\t\tvvct.stopPlayback();\n\t\t\tvvct.setVisibility(View.INVISIBLE);\n\t\t\tisplay=false;\n\t\t\t\tsm.toggle();\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.button1:\n Intent intent = new Intent();\n intent.setClass(getActivity(), PlayActivity.class);\n startActivity(intent);\n break;\n }\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playNext();\r\n\r\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n Intent nowPlayingIntent = new Intent(MainActivity.this, NowPlayingActivity.class);\n startActivity(nowPlayingIntent);\n }", "@Override\n\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\n\t\t\t\t\t\tmyVideoView.setVideoPath(videopath);\n\t\t\t\t\t\tmyVideoView.start();\n\n\t\t\t\t\t}", "@Override\n public void onClick(View arg0) {\n if (mp.isPlaying()) {\n mp.pause();\n // Changing button image to play button\n play.setImageResource(R.drawable.ic_play_arrow);\n } else {\n // Resume song\n mp.start();\n // Changing button image to pause button\n play.setImageResource(R.drawable.ic_pause);\n mHandler.post(mUpdateTimeTask);\n }\n\n }", "public void goToVideoViewer(Uri vidURI) {\n Log.i(\"progress\",\"goToViewer\");\n\n Intent playerIntent = new Intent(this, VideoActivity.class);\n\n //attaches the video's uri\n playerIntent.putExtra(INTENT_MESSAGE, vidURI.toString());\n startActivity(playerIntent);\n }", "void play(){\n\n\t\tnew X.PlayXicon().root.setOnClickListener(Play_TestsPresenter::cc);\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/watch?v=\"+tmp.get(position).key)));\n\n\n\n }", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n StartVRApp.startVR(getApplicationContext(),\n videos.get(position).getName(),\n videos.get(position).getLink(),\n videos.get(position).getW(),\n videos.get(position).getH(),\n videos.get(position).getTiling(),\n videos.get(position).getDynamicEditingFN(),\n preferences);\n }", "public interface LiveVideoAllCallBack extends VideoAllCallBack{\n //暂时保留standardVideo方法\n //点击了空白区域开始播放\n void onClickStartThumb(String url, Object... objects);\n\n //点击了播放中的空白区域\n void onClickBlank(String url, Object... objects);\n\n //点击了全屏播放中的空白区域\n void onClickBlankFullscreen(String url, Object... objects);\n}", "@Override\n public void run() {\n vPauseImageViewEntertainingFactActivity.setVisibility(View.INVISIBLE);\n vPlayImageViewEntertainingFactActivity.setVisibility(View.VISIBLE);\n mediaPlayer.start();\n }", "@Override\n public void onClick(View view) {\n Intent playIntent = new Intent(FavoriteActivity.this, PlayActivity.class);\n startActivity(playIntent);\n }" ]
[ "0.8295278", "0.79904455", "0.7816933", "0.7797292", "0.76742125", "0.76716894", "0.7670099", "0.7592008", "0.754407", "0.74986213", "0.74662876", "0.7459294", "0.74586606", "0.74537235", "0.7404018", "0.73502535", "0.72932553", "0.7292208", "0.7262085", "0.72432315", "0.7238413", "0.72377133", "0.7223422", "0.7178365", "0.7177878", "0.71526027", "0.71223956", "0.7112047", "0.7073465", "0.70703447", "0.70486665", "0.7009", "0.6986772", "0.69599074", "0.6938617", "0.6937754", "0.6928961", "0.68914866", "0.6886304", "0.6874784", "0.68595046", "0.6850311", "0.6842825", "0.68286395", "0.6789837", "0.67827165", "0.67743826", "0.6766757", "0.67172754", "0.6682336", "0.667443", "0.6672752", "0.66594154", "0.66584903", "0.66416514", "0.663659", "0.6622717", "0.66156125", "0.660862", "0.66033316", "0.6597713", "0.6587575", "0.65806746", "0.6556473", "0.6555428", "0.65540797", "0.6548786", "0.6547861", "0.6516353", "0.6495512", "0.64949274", "0.64885217", "0.6482466", "0.6476351", "0.64707446", "0.64684033", "0.6466284", "0.64636004", "0.64558303", "0.6447011", "0.64385915", "0.6430673", "0.64129144", "0.6411066", "0.6409933", "0.6402657", "0.64020824", "0.6390954", "0.6390768", "0.63894457", "0.6374896", "0.637465", "0.6374353", "0.6368909", "0.6368885", "0.63685066", "0.6365495", "0.63544184", "0.632471", "0.63154745" ]
0.7746955
4
showing the preview of the selected image from the gallery using BitmapFactory decode the string path to bitmap
private void showPreview(File mediaPath) { Bitmap scaledBitmap = BitmapFactory.decodeFile(String.valueOf(mediaPath)); if (scaledBitmap != null) { int bitmapHeight = (int) (scaledBitmap.getHeight() * (512.0 / scaledBitmap.getWidth())); scaledBitmap = Bitmap.createScaledBitmap(scaledBitmap, 512, bitmapHeight, true); scaledBitmap = ((MApplication) getApplication()).rotateImage(scaledBitmap, mediaPath.getPath()); selectedImage.setImageBitmap(scaledBitmap); } else { CustomToast.showToast(this, getString(R.string.media_not_available)); finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case SELECTED_PICTURE:\n if (resultCode == RESULT_OK) {\n uri = data.getData();\n\n\n Log.e(\"Image path is \", \"\" + uri);\n String[] projection = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(projection[0]);\n String filePath = cursor.getString(columnIndex);\n String path = filePath;\n img = path;\n\n cursor.close();\n\n\n Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\n Drawable d = new BitmapDrawable(yourSelectedImage);\n\n newImage.setImageDrawable(d);\n Toast.makeText(getApplicationContext(), filePath,\n Toast.LENGTH_SHORT).show();\n\n\n\n }\n break;\n\n default:\n break;\n }\n }", "private void showGalleryChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == TAKE_IMAGE && resultCode == RESULT_OK) {\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n saveImage(bitmap);\n imageView.setImageBitmap(bitmap);\n } else if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_LONG).show();\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 234 && data != null && data.getData() != null) {\n filePath = data.getData();\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n ImageView imageView = findViewById(R.id.displayPicture);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }", "public void showImageChooser() {\n Intent intent2 = new Intent();\n intent2.setType(\"image/*\");\n intent2.setAction(\"android.intent.action.GET_CONTENT\");\n startActivityForResult(Intent.createChooser(intent2, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == TAKE_IMAGE && resultCode == RESULT_OK){\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n imageView.setImageBitmap(bitmap);\n }\n else {\n if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_SHORT).show();\n //textTargetUri.setText(targetUri.toString());\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n }\n /*String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n\t\t\tCursor cursor = getContentResolver().query(data.getData(), filePathColumn, null, null, null);\n\t\t\tcursor.moveToFirst();\n\n\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\n\t\t\tString filePath = cursor.getString(columnIndex);\n\t\t\tcursor.close();\n\n\t\t\tBitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\t\t\tToast.makeText(getApplicationContext(), filePath, 1000).show();\n\t\t\timageView.setImageBitmap(yourSelectedImage);\n*/\n }\n }\n if(requestCode == 0 && resultCode == RESULT_OK){\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n // imageView.setImageBitmap(bitmap);\n\n\n File root = Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath()+\"/DCIM/Camera/img.jpg\");\n try\n {\n file.createNewFile();\n FileOutputStream ostream = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, ostream);\n ostream.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n Toast.makeText(this,\"Failed to save image, try again\",Toast.LENGTH_LONG).show();\n }\n }\n }", "private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n\n // compare the resultCode with the\n // SELECT_PICTURE constant\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageURI = data.getData();\n// File imageFile = new File(getRealPathFromURI(selectedImageURI));\n Uri selectedImageUri = data.getData( );\n String picturePath = getPath( getApplicationContext( ), selectedImageUri );\n Log.d(\"Picture Path\", picturePath);\n\n // Get the url of the image from data\n selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n bitmap = null;\n // update the preview image in the layout\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n// IVPreviewImage.setImageURI(selectedImageUri);\n// runTextRecognition(bitmap);\n IVPreviewImage.setImageBitmap(bitmap);\n\n }\n }\n\n if (requestCode == 123) {\n\n\n Bitmap photo = (Bitmap) data.getExtras()\n .get(\"data\");\n\n // Set the image in imageview for display\n IVPreviewImage.setImageBitmap(photo);\n runTextRecognition(photo);\n\n }\n\n }\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\tif (requestCode == SELECT_PICTURE) {\n\t\t\t\tUri selectedImageUri = data.getData();\n\n\t\t\t\t//OI FILE Manager\n\t\t\t\tfilemanagerstring = selectedImageUri.getPath();\n\n\t\t\t\t//MEDIA GALLERY\n\t\t\t\tselectedImagePath = getPath(selectedImageUri);\n\t\t\t\timg2.setImageURI(selectedImageUri);\n\n\n\t\t\t\t//img.setImageURI(selectedImageUri);\n\n\t\t\t\timagePath.getBytes();\n\n\t\t\t\timagePath=(imagePath.toString());\n\t\t\t\tSystem.out.println(\"MY PATH: \"+imagePath);\n\t\t\t\tBitmap bm = BitmapFactory.decodeFile(imagePath);\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n public void imageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select picture\"), PICK_IMAGE);\n }", "void imageChooser() {\n\n\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), IMG_RESULT);\n\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n if (resultCode == Activity.RESULT_OK)\r\n switch (requestCode) {\r\n case 0:\r\n //data.getData return the content URI for the selected Image\r\n Uri selectedImage = data.getData();\r\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\r\n // Get the cursor\r\n Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);\r\n // Move to first row\r\n cursor.moveToFirst();\r\n //Get the column index of MediaStore.Images.Media.DATA\r\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\r\n\r\n //Gets the String value in the column\r\n image = cursor.getString(columnIndex);\r\n cursor.close();\r\n // Set the Image in ImageView after decoding the String\r\n // imageView.setImageBitmap(BitmapFactory.decodeFile(imgDecodableString));\r\n\r\n textView.setText(image);\r\n\r\n break;\r\n\r\n }\r\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n FilePathUri = data.getData();\n try {\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), FilePathUri);\n cowImage.setImageBitmap(bitmap);\n galleryChoose.setText(\"Image Selected\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }else if (requestCode == 123) {\n File imgFile = new File(pictureImagePath);\n if(imgFile.exists()){\n FilePathUri = Uri.parse(pictureImagePath);\n FilePathUri = photoURI;\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n //ImageView myImage = (ImageView) findViewById(R.id.imageviewTest);\n cowImage.setImageBitmap(myBitmap);\n\n }\n }\n else{\n System.out.println(\"error\" );\n }\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), 234);\n }", "private void pickFromGallery() {\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n\n intent.setType(\"image/*\");\n\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\",\"image/jpg\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,GALLERY_REQUEST_CODE);\n }", "private void showImageChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Profile Image\"), CHOOSE_IMAGE);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n ((MainActivity) getActivity()).startActivityForResult(\n Intent.createChooser(intent, \"Select Picture\"),\n MainActivity.GALLERY_CODE);\n\n }", "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "public void loadImagefromGallery(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n intent.putExtra(\"crop\", \"true\");\n intent.putExtra(\"aspectX\", 50);\n intent.putExtra(\"aspectY\", 50);\n intent.putExtra(\"outputX\", 100);\n intent.putExtra(\"outputY\", 100);\n\n try {\n // Start the Intent\n startActivityForResult(intent, PICK_FROM_GALLERY);\n } catch (ActivityNotFoundException ae) {\n\n } catch (Exception e) {\n\n }\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public void loadImagefromGallery(View view) {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n // Start the Intent\n startActivityForResult(galleryIntent, RESULT_LOAD_IMG);\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n imageView.setImageBitmap(bitmap);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public void gallery(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), REQUEST_IMAGE_GALLERY);\n\n\n }", "@Override\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n\t \tprofile_photo.setVisibility(View.VISIBLE);\n\t \tUri selectedImage = data.getData();\n\t String[] filePathColumn = { MediaStore.Images.Media.DATA };\n\n\t Cursor cursor = getContentResolver().query(selectedImage,\n\t filePathColumn, null, null, null);\n\t cursor.moveToFirst();\n\n\t int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t String picturePath = cursor.getString(columnIndex);\n\t cursor.close();\n\t \n\t ImageView imageView = (ImageView) findViewById(R.id.profile_photo);\n\t imageView.setImageBitmap(BitmapFactory.decodeFile(picturePath));\n\t }\n\t }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i , RESULT_LOAD_IMAGE);\n\n\n }", "public void setPreviewBitmap(String previewPath)\n {\n if (previewPath != null) {\n // Set the preview image via Glide Library\n Glide.with(ITFImageView.this)\n .load(new File(previewPath)) // Uri of the picture\n .into(ITFImageView.this);\n }\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n //Where do we want to find the data\n File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n //Get the name of the directory\n String pictureDirectoryPath = pictureDirectory.getPath();\n //Get a URI representation of the Path because this is what android needs to deal with\n Uri data = Uri.parse(pictureDirectoryPath);\n //Set the data (where we want to look for this media) and the type (what media do we want to look for).Get all image types\n photoPickerIntent.setDataAndType(data, \"image/*\");\n //We invoke the image gallery and receive something from it\n if (photoPickerIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(photoPickerIntent, IMAGE_GALLERY_REQUEST);\n }\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), REQUEST_IMAGE);\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 choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }", "public void onImageGalleryClicked(View v){\n //invoke the image gallery using an implicit intent\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n\n //decides where to store pictures\n File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n String pictureDirectoryPath = pictureDirectory.getPath();\n\n //gets URI representation\n Uri data = Uri.parse(pictureDirectoryPath);\n\n //sets the data and type of media to look for\n photoPickerIntent.setDataAndType(data,\"image/*\");\n startActivityForResult(photoPickerIntent, Image_Gallery_Request);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\n if (requestCode == CAPTURE_IMAGE_REQUEST && resultCode == RESULT_OK) {\n Bitmap myBitmap = BitmapFactory.decodeFile(photoFile.getAbsolutePath());\n imgDisplay.setImageBitmap(myBitmap);\n textPath.setText(photoFile.getName());\n } else {\n displayMessage(getBaseContext(), \"Request cancelled or something went wrong.\");\n }\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n snackbar.dismiss();\n if(requestCode == REQUEST_CODE_GALLERY && resultCode == RESULT_OK && data !=null){\n Uri uri = data.getData();\n try{\n InputStream inputStream = getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(inputStream);\n profilePic.setImageBitmap(bitmap);\n imageSelected = \"Yes\";\n Toast.makeText(getApplicationContext(),\"Image Selected !!\",Toast.LENGTH_LONG).show();\n\n }catch (FileNotFoundException e){\n e.printStackTrace();\n }\n }\n\n //when use device camera\n\n if (requestCode == REQUEST_CODE_CAMERA && resultCode == Activity.RESULT_OK) {\n Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n profilePic.setImageBitmap(photo);\n imageSelected = \"Yes\";\n Toast.makeText(getApplicationContext(),\"Image Selected !!\",Toast.LENGTH_LONG).show();\n\n }\n\n /**if(requestCode == REQUEST_CODE_CAMERA && resultCode == RESULT_OK && data !=null){\n Uri uri = data.getData();\n try{\n /**BitmapFactory.Options options = new BitmapFactory.Options();\n options.inSampleSize = 8;\n Bitmap bitmap = BitmapFactory.decodeFile(FileUri.getPath());\n profilePic.setImageBitmap(bitmap);\n\n imageSelected = \"Yes\";\n Toast.makeText(getApplicationContext(),\"Image Selected !!\",Toast.LENGTH_LONG).show();**/\n /** InputStream inputStream = getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(inputStream);\n profilePic.setImageBitmap(bitmap);\n imageSelected = \"Yes\";\n Toast.makeText(getApplicationContext(),\"Image Selected !!\",Toast.LENGTH_LONG).show();\n }catch (Exception e){\n e.printStackTrace();\n }\n }**/\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == -1 && requestCode == 1) {\n final Uri imageUri = data.getData();\n InputStream imageStream = null;\n try {\n imageStream = getContentResolver().openInputStream(imageUri);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n final Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\n Cursor cursor = getContentResolver().query(imageUri, null, null, null, null);\n /*\n * Get the column indexes of the data in the Cursor,\n * move to the first row in the Cursor, get the data,\n * and display it.\n */\n int nameIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);\n int column_index = cursor.getColumnIndex(MediaStore.Images.Media.DATA);\n cursor.moveToFirst();\n Log.d(\"test\", cursor.getString(nameIndex));\n// Log.d(\"test\", getRealPathFromURI(imageUri));\n // try {\n// String[] proj = { MediaStore.Images.Media.DATA };\n// cursor = getContentResolver().query(imageUri, proj, null, null, null);\n// int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n// cursor.moveToFirst();\n// Log.d(\"test\", cursor.getString(column_index) + \"\");\n// } finally {\n// if (cursor != null) {\n// cursor.close();\n// }\n// }\n this.selectedImage = cursor.getString(nameIndex);\n this.currentImageVew.setImageBitmap(selectedImage);\n this.currentImageVew.setContentDescription(imageUri.getPath());\n // CALL THIS METHOD TO GET THE URI FROM THE BITMAP\n Uri tempUri = getImageUri(getApplicationContext(), selectedImage);\n\n // CALL THIS METHOD TO GET THE ACTUAL PATH\n File finalFile = new File(getRealPathFromURI(tempUri));\n\n System.out.println(finalFile.getAbsoluteFile());\n System.out.println(finalFile.getName());\n try {\n System.out.println(finalFile.getCanonicalPath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.currentImageVew.setContentDescription(finalFile.getPath());\n this.currentImageVew.setTag(\"0\");\n\n Log.d(\"test\", \"selectedImage \" + selectedImage);\n Log.d(\"test\", \"imageUri.getPath() \" + imageUri.getPath());\n\n }\n }", "public void loadImagefromGallery(View view) {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n // Start the Intent\n startActivityForResult(galleryIntent, RESULT_LOAD_IMG);\n }", "private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tLog.e(\"on success\", \"on success\");\n\t\tBitmap s = null;\n\n\t\tif (resultCode == getActivity().RESULT_OK) {\n\t\t\t// user is returning from capturing an image using the camera\n\t\t\tif (requestCode == CAMERA_CAPTURE) {\n\t\t\t\tLog.e(\"camera\", \"camera\");\n\t\t\t\tpicUri = data.getData();\n\t\t\t\tBundle extras = data.getExtras();\n\t\t\t\t// get the cropped bitmap\n\t\t\t\tBitmap thePic = extras.getParcelable(\"data\");\n\t\t\t\tsavetoaFileLocation(thePic);\n\t\t\t\tthePic = getResizedBitmap(thePic, 200, 200);\n\t\t\t\tcameraBitmap = thePic;\n\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t// display the returned cropped image\n\t\t\t\tprofileimageeditflag=\"true\";\n\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\n\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(thePic, 16));\n\t\t\t\t//picview1.setImageBitmap(cameraBitmap);\n\t\t\t} else if (requestCode == GALLERY_CAPTURE) {\n\n\n\n\n\t\t\t\tUri selectedImage = data.getData();\n\n\t\t\t\tString stringUri;\n\t\t\t\tstringUri = selectedImage.toString();\n\t\t\t\tif ((stringUri != \"\") || stringUri != null) {\n\n\t\t\t\t\tString selectedImagePath = getPath(selectedImage);\ntry {\n\tExifInterface exifInterface = new ExifInterface(selectedImagePath);\n\torientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n}\ncatch (Exception e){}\n\n\n\n\t\t\t\t\tString[] filePathColumn = { MediaStore.Images.Media.DATA };\n\t\t\t\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\t\t\t\tselectedImage, filePathColumn, null, null, null);\n\t\t\t\t\tcursor.moveToFirst();\n\t\t\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t\t\t\t\tString selectedimage_path = cursor.getString(columnIndex);\n\t\t\t\t\tLog.e(\"selected path\",selectedimage_path);\n\t\t\t\t\tcursor.close();\n\t\t\t\t\tif (selectedimage_path.startsWith(\"https://\")) {\n\t\t\t\t\t\tgetBiymapFromGoogleLocation(selectedimage_path);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts = getBitmapFromFile(selectedimage_path);\n\t\t\t\t\t}\n\t\t\t\t\ts = getResizedBitmap(s, 200, 200);\n\t\t\t\t\tcameraBitmap = s;\n\n\t\t\t\t\tswitch(orientation) {\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_90:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 90);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_180:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 180);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_270:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 270);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tcorrectedBitMap=cameraBitmap;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t\t// display the returned cropped image\nprofileimageeditflag=\"true\";\n\t\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\n\n\t/*\t\t\t\tif(correctedBitMap!= null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcorrectedBitMap, 16));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcameraBitmap, 16));\n\t\t\t\t\t}\n\n*/\n\n\t\t\t\t\tif (correctedBitMap != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(correctedBitMap, 16));\n\t\t\t\t\t\tsavetoaFileLocation(correctedBitMap);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t\t\tsavetoaFileLocation(s);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\n\t\t\t\t//\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t//\tpicview1.setImageBitmap(cameraBitmap);\n\t\t\t\t//\tsavetoaFileLocation(s);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if(resultCode == RESULT_OK) {\n imgView.setImageURI(image_uri);\n// image_uri = data.getData();\n// try {\n// InputStream inputStream = getContentResolver().openInputStream(image_uri);\n// bitmap = BitmapFactory.decodeStream(inputStream);\n// imgView.setImageBitmap(bitmap);\n//// imgView.setVisibility(View.VISIBLE);\n//// btnUpload.setVisibility(View.VISIBLE);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(GambarActivity.this, \"o\", Toast.LENGTH_SHORT).show();\n }\n// super.onActivityResult(requestCode, resultCode, data);\n }", "public void selectImage(View view){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent,PICK_IMAGE);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickIntent.setType(\"image/*\");\n Intent chooserIntent = Intent.createChooser(intent, \"Select Image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});\n startActivityForResult(chooserIntent,PICK_IMAGE_REQUEST);\n }", "private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n startActivityForResult(i, RESULT_LOAD_IMAGE);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n picturePath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap bitmap = BitmapFactory.decodeFile(picturePath);\n mItemImageView.setImageBitmap(bitmap);\n }\n }", "private void pickImageFromGallery() {\n Intent intent = new Intent(Intent.ACTION_PICK);\n intent.setType(\"image/*\");\n startActivityForResult(intent, IMAGE_PICK_CODE);\n\n }", "private void galleryIntent()\r\n {\r\nIntent gallery=new Intent();\r\ngallery.setType(\"image/*\");\r\ngallery.setAction(Intent.ACTION_GET_CONTENT);\r\n\r\nstartActivityForResult(Intent.createChooser(gallery,\"Select Picture \"),PICK_IMAGE );\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n Image_brand.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n File file= new File(filePath.getPath());\n file.getName();\n audioUrl.setText(file.getName().toString());\n Log.e( \"path: \", file.getName());\n\n\n\n //Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n imageView.setBackground(ContextCompat.getDrawable(this, R.drawable.ic_done));\n }\n else\n imageView.setBackground(ContextCompat.getDrawable(this, R.drawable.ic_music));\n\n }", "private void showView() {\n\t\tfinal ImageView image = (ImageView) findViewById(R.id.image); \n\t\t//screen.addView(image);\n\t\t//image.setImageResource(images[0]);\n\n\t\tString fileName = getFilesDir().getPath() + \"/\" + FILE_NAME;\n\t\t//System.out.println(fileName);\n\t\tBitmap bm = BitmapFactory.decodeFile(fileName); \n\t\t\n\t\timage.setImageBitmap(bm); \n\t\t\n\t\t//System.out.println(\"show done!\\n\");\t\t\n\t\t\n\t}", "public void openGallery(){\n Intent intentImg=new Intent(Intent.ACTION_GET_CONTENT);\n intentImg.setType(\"image/*\");\n startActivityForResult(intentImg,200);\n }", "public void changePic(View v){\n //Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n //startActivityForResult(gallery,PICK_IMAGE);\n new AlertDialog.Builder(ProfileModify.this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Choose\")\n .setItems(Choose, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0) {\n Intent iGallery = new Intent(Intent.ACTION_PICK,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(iGallery,PICK_GALLERY);\n }\n else {\n Intent iCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if(iCamera.resolveActivity(getPackageManager()) != null){\n startActivityForResult(iCamera,REQUEST_IMAGE_CAPTURE);\n }\n }\n }\n }).create().show();\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }", "@Override\n public void onClick(View view) {\n Intent gallery_intent=new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery_intent,RESULT_LOAD_IMAGE);//Paasing intentobject and an integer value\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n try {\n final Uri imageUri = data.getData();\n final InputStream imageStream = getContentResolver().openInputStream(imageUri);\n final Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\n mImageViewSS.setImageBitmap(selectedImage);\n //Store image locally\n saveToInternalStorage(selectedImage);\n //EOF Store image locally\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n Toast.makeText(this, getString(R.string.image_error), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(this, getString(R.string.didnt_pick_image), Toast.LENGTH_LONG).show();\n }\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 void cargarimagen(){\n Intent intent= new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent.createChooser(intent,\"Seleccione la imagen\"),69);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void choosePicture() {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\"); //inserting all images inside this Image folder\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 1);\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"SELECT IMAGE\"), GALLERY_PICK);\n }", "public void onImageClick(View view) {\n Intent photo_picker = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n photo_picker.setType(\"image/jpeg\");\n startActivityForResult(photo_picker,PHOTO_PICK);\n }", "private void displaySelectedImage(Intent data) {\n if (data == null) {\n return;\n }\n\n // checkPicture = true; depreciated, try catch to catch if photo exists\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n currentPhotoPath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap temp = fixOrientation(BitmapFactory.decodeFile(currentPhotoPath));\n bitmapForAnalysis = temp;\n imageView.setImageBitmap(temp);\n }", "public void getImage(View view)\n {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE);\n\n }", "private Bitmap decodeUri(Uri selectedImage, int size) throws FileNotFoundException {\n // Decode image size\n BitmapFactory.Options o = new BitmapFactory.Options();\n o.inJustDecodeBounds = true;\n BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o);\n\n // Find the correct scale value. It should be the power of 2.\n int width_tmp = o.outWidth, height_tmp = o.outHeight;\n int scale = 1;\n while (true) {\n if (width_tmp / 2 < size\n || height_tmp / 2 < size) {\n break;\n }\n width_tmp /= 2;\n height_tmp /= 2;\n scale *= 2;\n }\n\n // Decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n o2.inSampleSize = scale;\n return BitmapFactory.decodeStream(getContentResolver().openInputStream(selectedImage), null, o2);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, \"Select File\"), 1);\n }", "private void openFileChooser() {\n Intent imageIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n imageIntent.setType(\"image/*\");\n startActivityForResult(imageIntent, GALLERY_REQUEST);\n }", "private void openGallery(){\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(gallery, PICK_IMAGE);\n }", "@Override\n public void onClick(View view) {\n File file = new File(pathFoto);\n final Intent intent = new Intent(Intent.ACTION_VIEW).setDataAndType(FileProvider.getUriForFile(getApplicationContext(), \"com.B3B.farmbros.android.fileprovider\", file), \"image/*\").addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(intent);\n }", "public void OpenGallery(){\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery, PICK_IMAGE);\n }", "public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE);\n\n\n\n\n /*String stringFilePath = Environment.getExternalStorageDirectory().getPath()+\"/Download/\"+editText.getText().toString()+\".jpeg\";\n Bitmap bitmap = BitmapFactory.decodeFile(stringFilePath);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 0, byteArrayOutputStream);\n byte[] bytesImage = byteArrayOutputStream.toByteArray();\n db.addTicket(stringFilePath, bytesImage);*/\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n startActivityForResult(Intent.createChooser(intent,\"Choose an app to select a image\"), 1);\n }", "private void selectImage(){\n final CharSequence[] options = { \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "void imageChooser() {\n\n // create an instance of the\n // intent of the type image\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n // pass the constant to compare it\n // with the returned requestCode\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "private void setPic() {\n int targetW = 210;\n int targetH = 320;\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n bitmap = RotateBitmap(bitmap,270);\n preview.setImageBitmap(bitmap);\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent();\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(photoPickerIntent, GALLERY_REQUEST);\n }", "public void opengallery() {\n Intent gallery = new Intent();\n gallery.setType(\"image/*\");\n gallery.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(getIntent().createChooser(gallery, \"Choose image\"), PICK_IMAGE);\n\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, SELECTED_PICTURE);\n }", "private void openGallery() {\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(gallery, REQUEST_IMAGE_SELECT);\n }", "@Override\n\t\tpublic void onClick(View v) { Intent galleryIntent = new Intent(Intent.ACTION_PICK,\n\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t// Start the Intent\n\t\t\tstartActivityForResult(\n\t\t\t\t\tIntent.createChooser(galleryIntent, \"Select Picture\"), REQUEST_CODE);\n\t\t}", "private void pickFromGallery() {\n Intent intent = new Intent(Intent.ACTION_PICK);\r\n // Sets the type as image/*. This ensures only components of type image are selected\r\n intent.setType(\"image/*\");\r\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\r\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\r\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\r\n // Launching the Intent\r\n startActivityForResult(intent, 0);\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n //everything processed successfully\n if (requestCode == Image_Gallery_Request) {\n //image gallery correctly responds\n Uri imageUri = data.getData(); //address of image on SD Card\n InputStream inputStream; //declaring stream to read data from SD card\n try {\n inputStream = getContentResolver().openInputStream(imageUri);\n Bitmap imagebtmp = BitmapFactory.decodeStream(inputStream); //Puts stream data into bitmap format\n Profile_Picture.setImageBitmap(imagebtmp); //Loads Image to ImageView\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n //error message if image is unavailable\n Toast.makeText(this, \"Unable to open image\", Toast.LENGTH_LONG).show();\n }\n }\n }\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 OpenGallery() {\n Intent pickImage = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickImage, RequestCode);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == camera.IMAGE_CAPTURE) {\n\n\t\t\tif (resultCode == RESULT_OK){\n\t\t\t\tCommon.PATH=BitmapUtils.getAbsoluteImagePath(Preview.this, camera.getImageUri());\n\t\t\t\tIntent intent = new Intent(Preview.this,Preview.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\n\t\t\t}\n\t\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (data != null && data.getData() != null && resultCode == RESULT_OK) {\n ParcelFileDescriptor pfd;\n try {\n ImageView image=(ImageView)findViewById(R.id.imgView);\n pfd = getContentResolver().openFileDescriptor(data.getData(), \"r\");\n FileDescriptor fd = pfd.getFileDescriptor();\n Bitmap img = BitmapFactory.decodeFileDescriptor(fd);\n pfd.close();\n image.setImageBitmap(img); //image represent ImageVIew to display picked image\n\n if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {\n int flags = data.getFlags()&(Intent.FLAG_GRANT_READ_URI_PERMISSION|Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n Uri u = data.getData();\n getContentResolver().takePersistableUriPermission(u,flags);\n String id = u.getLastPathSegment().split(\":\")[1];\n final String[] imageColumns = {MediaStore.Images.Media.DATA};\n final String imageOrderBy = null;\n Uri u1 =Uri.EMPTY;\n String state = Environment.getExternalStorageState();\n if (!state.equalsIgnoreCase(Environment.MEDIA_MOUNTED))\n u1 = MediaStore.Images.Media.INTERNAL_CONTENT_URI;\n else\n u1 = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n Cursor c = managedQuery(u1, imageColumns, MediaStore.Images.Media._ID + \"=\" + id, null, imageOrderBy);\n if (c.moveToFirst()) {\n imgPath = c.getString(c.getColumnIndex(MediaStore.Images.Media.DATA)); //imgPath represents string variable to hold the path of image\n }\n } else {\n Uri imgUri = data.getData();\n Cursor c1 = getContentResolver().query(imgUri, null, null, null, null);\n if (c1 == null) {\n imgPath = imgUri.getPath(); //imgPath represents string variable to hold the path of image\n } else {\n c1.moveToFirst();\n int idx = c1.getColumnIndex(MediaStore.Images.ImageColumns.DATA);\n imgPath = c1.getString(idx); //imgPath represents string variable to hold the path of image\n c1.close();\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }catch(Exception ea)\n {}\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void onClick(View arg0) {\n Intent intent = new Intent();\r\n intent.setType(\"image/*\");\r\n intent.setAction(Intent.ACTION_GET_CONTENT);\r\n startActivityForResult(Intent.createChooser(intent,\r\n \"Select Picture\"), SELECT_PICTURE);\r\n }", "private void select_image() {\n\n final CharSequence[] items = {\"Camera\", \"Gallery\", \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(step4.this);\n builder.setTitle(\"Add Image\");\n builder.setItems(items, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface DialogInterface, int i) {\n if (items[i].equals(\"Camera\")) {\n\n Intent camera = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n if (ActivityCompat.checkSelfPermission(step4.this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(getApplicationContext(), \"Please grant permission to access Camera\", Toast.LENGTH_LONG).show();\n ActivityCompat.requestPermissions(step4.this, new String[]{Manifest.permission.CAMERA}, 1);\n startActivityForResult(camera,REQUEST_CAMERA);\n\n } else {\n startActivityForResult(camera,REQUEST_CAMERA);\n\n }\n\n\n\n } else if (items[i].equals(\"Gallery\")) {\n\n Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n gallery.setType(\"image/*\");\n startActivityForResult(gallery, select_file);\n\n\n } else if (items[i].equals(\"Cancel\")) {\n\n DialogInterface.dismiss();\n\n\n }\n }\n\n\n });\n builder.show();\n }", "private void selectImage() {\n final CharSequence[] options = { \"Take Photo\", \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(EventsActivity.this);\n\n builder.setTitle(\"Search Events By Photo\");\n\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if(options[item].equals(\"Take Photo\")){\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (intent.resolveActivity(getPackageManager()) != null) {\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n\n }\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(context,\n \"com.example.android.fileprovider\",\n photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent, 1);\n }\n }\n }\n else if(options[item].equals(\"Choose from Gallery\")) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select File\"),2);\n }\n else if(options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "private void displayImage() {\n if (currentPhotoPath != null) {\n // checkPicture = true; depreciated, try catch to catch if photo exists\n Bitmap temp = fixOrientation(BitmapFactory.decodeFile(currentPhotoPath));\n bitmapForAnalysis = temp;\n imageView.setImageBitmap(temp);\n } else {\n Toast.makeText(this, \"Image Path is null\", Toast.LENGTH_LONG).show();\n }\n }", "private void pickFromGallery(){\n Intent intent=new Intent(Intent.ACTION_PICK);\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES,mimeTypes);\n // Launching the Intent\n startActivityForResult(intent,1);\n }", "public void pickFromGallery(View view) {\n //Create an Intent with action as ACTION_OPEN_DOCUMENT\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n /*\n Make sure that the user has given storage permissions.\n Note that granting the WRITE_EXTERNAL_STORAGE permission automatically grants the\n READ_EXTERNAL_STORAGE permission.\n */\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"Write storage permission denied\");\n\n // If permission is denied, ask for permission.\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_WRITE_STORAGE);\n }\n else {\n // Sets the type as image/*. This ensures only components of type image are selected\n intent.setType(\"image/*\");\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\n // Launching the Intent\n startActivityForResult(intent, GALLERY_REQUEST_CODE);\n }\n }", "public void changePhoto(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, SELECT_PHOTO);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data){\n if (resultCode == Activity.RESULT_OK){\n if (requestCode == SELECT_FILE){\n selectedImageUri = data.getData();\n String[] projection = {MediaStore.MediaColumns.DATA};\n CursorLoader cursorLoader = new CursorLoader(mActivity, selectedImageUri, projection, null, null,\n null);\n Cursor cursor = cursorLoader.loadInBackground();\n int column_index = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);\n cursor.moveToFirst();\n String selectedImagePath = cursor.getString(column_index);\n Bitmap bm;\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n// BitmapFactory.decodeFile(selectedImagePath, options);\n final int REQUIRED_SIZE = 200;\n int scale = 1;\n while (options.outWidth / scale / 2 >= REQUIRED_SIZE\n && options.outHeight / scale / 2 >= REQUIRED_SIZE)\n scale *= 2;\n options.inSampleSize = scale;\n options.inJustDecodeBounds = false;\n bm = BitmapFactory.decodeFile(selectedImagePath, options);\n emailIntent.setType(\"image/jpeg\");\n emailIntent.putExtra(Intent.EXTRA_STREAM,selectedImageUri);\n Log.i(\"EasyFeedback\", \"Image selected and intent is ready to use!\");\n models.setImage(bm);\n onImageSelectedListener.onImageSelected(bm);\n\n }\n }\n }" ]
[ "0.72183686", "0.69495", "0.67072386", "0.6688963", "0.6626971", "0.66224647", "0.66132194", "0.6595018", "0.65776306", "0.6546691", "0.6538793", "0.6531416", "0.6506789", "0.64898837", "0.6465785", "0.64588904", "0.6458578", "0.64386606", "0.64290094", "0.64284545", "0.6425028", "0.64235747", "0.64190614", "0.64190614", "0.6418468", "0.6415783", "0.6415684", "0.6409833", "0.63982004", "0.6393212", "0.6380817", "0.6379543", "0.63531077", "0.6351412", "0.6345371", "0.6342279", "0.63412434", "0.63347197", "0.63296515", "0.6328462", "0.6328397", "0.6312545", "0.63121563", "0.6308779", "0.62746143", "0.62719893", "0.62645674", "0.6251325", "0.6245352", "0.6242693", "0.62413746", "0.62409776", "0.62388366", "0.62320936", "0.6232028", "0.6230781", "0.62253475", "0.6223732", "0.6223732", "0.6217881", "0.6214416", "0.6213991", "0.62139153", "0.62073123", "0.6206262", "0.6205548", "0.619719", "0.6195725", "0.618669", "0.61737436", "0.6167552", "0.61647373", "0.61619776", "0.61576337", "0.61534005", "0.6151064", "0.61403376", "0.6135808", "0.61350685", "0.61288345", "0.6115013", "0.6114883", "0.6111716", "0.61052716", "0.61023027", "0.60999113", "0.60945326", "0.60930926", "0.60866034", "0.6074177", "0.60551196", "0.60523176", "0.6042327", "0.6033864", "0.60272306", "0.6026867", "0.6022852", "0.6011007", "0.6006419", "0.60056293" ]
0.6799135
2
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { System.out.println("addActionListener"); Database db = new Database(); SuppliersDAO suppDAO = new SuppliersDAO(db); SuppliersModel suppModel = new SuppliersModel(); String suppName = textSuppName.getText(); String suppAddr = textSuppAddr.getText(); String suppPhone = textSuppPhone.getText(); String suppEmail = textSuppEmail.getText(); suppModel.setName(suppName); suppModel.setAddress(suppAddr); suppModel.setPhone(suppPhone); suppModel.setEmail(suppEmail); int return_id = suppDAO.Add(suppModel); db.commit(); db.close(); db = new Database(); suppDAO = new SuppliersDAO(db); System.out.println("addActionListener 1"); suppModel = suppDAO.FindByID(return_id); System.out.println("addActionListener 2"); db.close(); row[0] = suppModel.getSuppliers_id(); row[1] = suppModel.getName(); row[2] = suppModel.getAddress(); row[3] = suppModel.getPhone(); row[4] = suppModel.getEmail(); row[5] = suppModel.getTime_reg(); model.addRow(row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { System.out.println("btnUpdate"); int i = table.getSelectedRow(); if (i >= 0) { System.out.println("row-update-select" + i); System.out.println("row-update-supp-id" + textSuppD.getText()); int suppID = Integer.parseInt(textSuppD.getText().trim()); String suppName = textSuppName.getText(); String suppAddr = textSuppAddr.getText(); String suppPhone = textSuppPhone.getText(); String suppEmail = textSuppEmail.getText(); Database db = new Database(); SuppliersDAO suppDAO = new SuppliersDAO(db); SuppliersModel suppModel = new SuppliersModel(); suppModel.setSuppliers_id(suppID); suppModel.setName(suppName); suppModel.setAddress(suppAddr); suppModel.setPhone(suppPhone); suppModel.setEmail(suppEmail); suppDAO.Update(suppModel); db.commit(); db.close(); setTableGet(i, model); } else { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { System.out.println("btnDelete"); int i = table.getSelectedRow(); if (i >= 0) { System.out.println("row-Delete" + i); System.out.println("row-Delete" + textSuppD.getText()); int suppID = Integer.parseInt(textSuppD.getText().trim()); Database db = new Database(); SuppliersDAO suppDAO = new SuppliersDAO(db); SuppliersModel suppModel = new SuppliersModel(); suppModel.setSuppliers_id(suppID); suppDAO.Delete(suppModel); db.commit(); db.close(); model.removeRow(i); } else { } }
{ "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
Created by sandheepgr on 28/3/14.
public interface UserAccessRightService extends BaseService<UserAccessRight> { public List<UserAccessRight> findByUarUserNo(Long uarUserNo); public UserAccessRight findByUarUarId(Long uarUarId); public UserAccessRight findByUarUserNoAndUarFunctionCode(Long uarUserNo,Long uarFunctionCode); public boolean isDuplicateUserAccessRightExisting(UserAccessRight userAccessRight); public HashMap<Long,String> getUarAsMap(Long uarUserNo) throws InspireNetzException; public UserAccessRight saveUserAccessRight(UserAccessRight userAccessRight); public boolean deleteUserAccessRight(Long uarId); public boolean deleteUserAccessRightSet(Set<UserAccessRight> userAccessRights); public boolean updateUserAccessRights(User user); public Set<UserAccessRight> setUserAccessRights(User user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\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}", "private void m50366E() {\n }", "@Override\n\tprotected void interr() {\n\t}", "public void gored() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\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\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n void init() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "private void init() {\n\n\t}", "@Override\n public void init() {}", "public void method_4270() {}", "@Override\n protected void init() {\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\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public abstract void mo70713b();", "private Rekenhulp()\n\t{\n\t}", "private void m50367F() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tprotected void doF4() {\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 init() {\n\t\t\r\n\t}", "public void m23075a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo12628c() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo21877s() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public abstract void mo56925d();", "public void mo21779D() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n public void initialize() { \n }", "public void skystonePos4() {\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}" ]
[ "0.60626084", "0.5880278", "0.58451086", "0.58147717", "0.5774271", "0.5743422", "0.5742063", "0.5705565", "0.5705565", "0.569128", "0.5681212", "0.5670661", "0.5662814", "0.5637994", "0.56258094", "0.56140983", "0.559741", "0.5588736", "0.5588736", "0.5588736", "0.5588736", "0.5588736", "0.558298", "0.5576927", "0.5558857", "0.55564016", "0.5545283", "0.55353886", "0.5534784", "0.551615", "0.550294", "0.5502661", "0.5498747", "0.5489384", "0.54785806", "0.54785806", "0.54776454", "0.5474755", "0.5465558", "0.54562306", "0.5455507", "0.54531896", "0.54388064", "0.5437474", "0.5437051", "0.5435296", "0.5428929", "0.54274356", "0.54254866", "0.5421375", "0.54139763", "0.54102707", "0.54102707", "0.54102707", "0.54102707", "0.54102707", "0.54102707", "0.5408834", "0.5408834", "0.5408834", "0.54038703", "0.5402785", "0.5402785", "0.54010487", "0.53954715", "0.53954715", "0.53954715", "0.5395259", "0.5390335", "0.538066", "0.5377165", "0.53658694", "0.53627926", "0.536149", "0.536149", "0.536149", "0.5357545", "0.5356389", "0.5355936", "0.5355936", "0.5355936", "0.5355936", "0.5355936", "0.5355936", "0.5355936", "0.53530586", "0.53504324", "0.5350064", "0.53486156", "0.5348196", "0.53480035", "0.5323556", "0.53219503", "0.5317945", "0.53120947", "0.5306097", "0.53054404", "0.5298486", "0.5293373", "0.52876127", "0.52876127" ]
0.0
-1
Test of addRent method, of class ReserveDB.
@Test public void testAddRent() { System.out.println("addRent"); ReserveInfo reserveInfo = new ReserveInfo(); reserveInfo.setGuestIDnumber("test"); reserveInfo.setGuestName("test"); reserveInfo.setRentType("test"); reserveInfo.setRoomType("test"); reserveInfo.setRentDays(1); reserveInfo.setRemark("test"); reserveInfo.setResult(true); BookingController instance = new BookingController(); boolean expResult = true; boolean result = instance.addRent(reserveInfo); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void test() {\n\n Reservation res1 =\n new Reservation(\n -1,\n \"Standard\",\n \"0000111\",\n Timestamp.valueOf(\"2019-06-11 16:10:00\"),\n Timestamp.valueOf(\"2019-06-15 09:00:00\"),\n \"525 W Broadway\",\n \"Vancouver\");\n ReservationsController.makeReservation(res1);\n\n RentalConfirmation rc1 =\n RentalsController.rentVehicle(res1, \"Mastercard\", \"389275920888492\", \"08/22\");\n\n System.out.println(\"Getting the rental added to the database\");\n Rental check = RentalsController.getRental(rc1.getRid());\n System.out.println(check);\n ArrayList<RentalReportCount> rentals =\n RentalsController.getDailyRentalCount(\"2019-11-20\", null, null);\n if (rentals != null && rentals.isEmpty()) {\n System.out.println(\"list is empty\");\n }\n System.out.println(rentals);\n\n RentalsController.deleteRental(rc1.getRid());\n }", "@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }", "int insert(Nutrition record);", "public void insertReservation(TestDto testDto) throws Exception;", "@Test\n public void addRecipeIngredient_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allRecipeIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n RecipeIngredient retrieved = new RecipeIngredient();\n if(allRecipeIngredients != null){\n for(int i = 0; i < allRecipeIngredients.size(); i++){\n if(allRecipeIngredients.get(i).getIngredientID() == ingredientID){\n retrieved = allRecipeIngredients.get(i);\n }\n }\n }\n assertEquals(\"addRecipeIngredient - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"addRecipeIngredient - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"addRecipeIngredient - Correct Details\", \"White Flour\", retrieved.getDetails());\n }", "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "public void addRentEntry(RentEntryBean reb) {\n RentDAO rentDAO = new RentDAO();\n rentDAO.addHouse(reb);\n }", "@Test\n public void addRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertNotEquals(\"addRecipe - Returns True\", -1, returned);\n }", "@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"dbowman@yahoo.com\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }", "@Test\n public void addRecipeIngredient_ReturnsID(){\n int returned = testDatabase.addRecipeIngredient(recipeIngredient);\n assertNotEquals(\"addRecipeIngredient - Returns True\", -1, returned);\n }", "@Test\n\tpublic void testAddTransaction(){\n setDoubleEntryEnabled(true);\n\t\tsetDefaultTransactionType(TransactionType.DEBIT);\n validateTransactionListDisplayed();\n\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Lunch\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"899\"));\n\t\tonView(withId(R.id.input_transaction_type))\n\t\t\t\t.check(matches(allOf(isDisplayed(), withText(R.string.label_receive))))\n\t\t\t\t.perform(click())\n\t\t\t\t.check(matches(withText(R.string.label_spend)));\n\n\t\tString expectedValue = NumberFormat.getInstance().format(-899);\n\t\tonView(withId(R.id.input_transaction_amount)).check(matches(withText(expectedValue)));\n\n int transactionsCount = getTransactionCount();\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n validateTransactionListDisplayed();\n\n List<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(DUMMY_ACCOUNT_UID);\n assertThat(transactions).hasSize(2);\n Transaction transaction = transactions.get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\n assertThat(getTransactionCount()).isEqualTo(transactionsCount + 1);\n }", "@Test\n public void addIngredient_ReturnsID(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"addIngredients - Returns True\",-1, returned);\n }", "@Test\n\tpublic void addTown_when_town_is_added() throws Exception {\n\t\t// GIVEN\n\t\ttown = new Town(\"varna\", 2000);\n\t\t// WHEN\n\t\tcountry.addTown(town);\n\t\t// THEN\n\t\tassertEquals(country.getCountTowns(), 1);\n\t}", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "@Test\n public void testReservationFactoryCreate() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n }", "@Test\n public void testReservationFactoryGetReservation() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n assertEquals(CUSTOMER_NAME, reservationController.getReservation(1).getCustomer().getName());\n assertEquals(CUSTOMER_CONTACT, reservationController.getReservation(1).getCustomer().getContactNo());\n assertEquals(1, reservationController.getReservation(1).getTable().getTableId());\n assertEquals(2, reservationController.getReservation(1).getTable().getNumSeats());\n assertEquals(date, reservationController.getReservation(1).getReservationDate());\n }", "@Test\n\tpublic void addTransaction() {\n\t\tTransaction transaction = createTransaction();\n\t\tint size = transactionService.getTransactions().size();\n\t\ttransactionService.addTransaction(transaction);\n\t\tassertTrue(\"No transaction was added.\", size < transactionService.getTransactions().size());\n\t}", "@Test\r\n\tpublic void testInsertMoney() {\r\n\t\tvendMachine.insertMoney(10.0);\r\n\t\tassertEquals(10.0, vendMachine.getBalance(), 0.001);\r\n\t}", "@Test\n public void testAddOrd() {\n System.out.println(\"addOrd\");\n Criteria ctr = null;\n String orderProp = \"\";\n EDirecaoOrdenacao orderDir = null;\n ClassificacaoTributariaDAO instance = new ClassificacaoTributariaDAO();\n instance.addOrd(ctr, orderProp, orderDir);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testSaveWithRechargeAcct() throws MalBusinessException{\n\t\tsetUpDriverForAdd();\n\t\tdriver.setRechargeCode(externalAccount.getExternalAccountPK().getAccountCode());\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t\t\n\t\tassertEquals(\"Recharge Acct Code does not match \" + externalAccount.getExternalAccountPK().getAccountCode() ,driver.getRechargeCode(), externalAccount.getExternalAccountPK().getAccountCode());\n\t}", "@Test\n public void getIngredient_ReturnsIngredient(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"getIngredient - Return Non-Null Ingredient\",null, testDatabase.getIngredient(returned));\n }", "@SuppressWarnings(\"deprecation\")\r\n\t\r\n\t\r\n\t\r\n\t@Test\r\n\tpublic void insertSuccess(){\n\t\t\t\tDonation donationIn = new Donation();\r\n\t\t\t\tdonationIn.setAmount(23.25);\r\n\t\t\t\tdonationIn.setDonor_Id(\"2\");\r\n\t\t\t\tdonationIn.setDate(\"2016-17-05\");\r\n\t\t\t\tdonationIn.setType(\"offering\");\r\n\t\t\t\t\r\n\t\t\t\t//create donation manager object\r\n\t\t\t\tDonationDBManager donationManager = new DonationDBManager();\r\n\t\t\t\t\r\n\t\t\t\t//insert donor \r\n\t\t\t\tString donationId = donationManager.insertDonation(donationIn);\r\n\t\t\t\tDonation donationOut = donationManager.getDonation(donationId);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//get or select donor\r\n\t\t\t\t\r\n\t\t\t\tassertEquals(donationId, donationOut.getDonor_Id());\r\n\t\t\t\tassertEquals(donationIn.getAmount(), donationOut.getAmount());\r\n\t\t\t\tassertEquals(donationIn.getDate(), donationOut.getDate());\r\n\t\t\t\tassertEquals(donationIn.getType(), donationOut.getType());\r\n\t}", "int insert(OpeningRequirement record);", "@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }", "@Test\n public void addRecipe_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n\n // Check all recipe fields are accurate\n assertEquals(\"addRecipe - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"addRecipe - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"addRecipe - Correct prep_time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"addRecipe - Correct total_time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"addRecipe - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"addRecipe - Correct Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"addRecipe - Correct Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"addRecipe - Correct Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"addRecipe - Correct First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"addRecipe - Correct First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"addRecipe - Correct Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"addRecipe - Correct Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }", "boolean addBillToReservation(long billId, long reservationId);", "@Test\n\tpublic void testInsertObj() {\n\t}", "@Test\n public void editIngredient_ReturnsTrue(){\n int returned = testDatabase.getIngredient(\"egg\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"egg\");\n assertEquals(\"editIngredient - Returns True\", true, testDatabase.editIngredient(newIngredient));\n }", "@org.junit.Test\r\n public void testInsertReview1() throws Exception {\r\n System.out.println(\"insertReview1\");\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n Review result = service.insertReview(review);\r\n assertEquals(review, result);\r\n }", "@Test\n public void testReservationFactoryTableOccupied() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n assertEquals(1, table.getTableId());\n assertEquals(2, table.getNumSeats());\n assertEquals(TableStatus.RESERVED, table.getStatus());\n }", "@Test void addIngredientBoundary()\n {\n }", "@Test()\n public void testAddExpense() {\n\tDefaultTableModel model = new DefaultTableModel();\n\tExpense e = new Expense(\"bread\", 8, LocalDate.of(2015, 10, 22), ExpenseType.DAILY);\n\texpenseManager.setBudgetPerMonth(2500);\n\texpenseManager.addExpense(e, model);\n\tassertEquals(5, expenses.size(), 0);\n }", "int insert(SrmFundItem record);", "int add(Bill bill) throws SQLException;", "@Test\n\tpublic void insertTradeRequest() {\n\t\t\n\t\tDBI dbi = TEST_ENVIRONMENT.getDbi();\n\t\tTradeDao tradeDao = dbi.onDemand(TradeDao.class);\n\t\t\n\t\tString collectionId = \"1\";\n\t\tString itemId = \"1\";\n\t\tString itemAmount = \"1\";\n\t\tTrade insertedTrade = new Trade(collectionId, itemId, itemAmount);\n\t\t\n\t\ttradeDao.insert(insertedTrade);\n\t\t\n\t\tint expectedSize = 1;\n\t\t\n\t\tList<Trade> allTrades = tradeDao.getAll();\n\t\t\n\t\tint actualSize = allTrades.size();\n\t\t\n\t\tAssert.assertEquals(\"Trade table should have 1 trade\", expectedSize, actualSize);\n\t\t\n\t\tSet<String> insertedTradeRequest = new HashSet<String>();\n\t\tDBI dbi1 = TEST_ENVIRONMENT.getDbi();\n\t\tTradeRequestDao tradeRequestDao = dbi1.onDemand(TradeRequestDao.class);\n\t\t\n\t\tString offeredCollectionId = \"1\";\n\t\tString userId = \"1\";\n\t\tString requestId = \"1\";\n\t\tTradeRequest insertedRequest = new TradeRequest(offeredCollectionId, \n\t\t\t\tuserId);\n\t\t\n\t\tinsertedRequest = insertedRequest.setRequestId(requestId);\n\t\t\n\t\ttradeRequestDao.insert(insertedRequest);\n\t\t\n\t\tint expectedSize1 = 1;\n\t\t\n\t\tList<TradeRequest> allTrades1 = tradeRequestDao.getAll();\n\t\t\n\t\tint actualSize1 = allTrades1.size();\n\t\t\n\t\tAssert.assertEquals(\"Trade Request table should have 1 Request made\", expectedSize1, actualSize1);\n\t\t\n\t}", "int insert(R_dept_trade record);", "int insert(SupplyNeed record);", "@Test\n public void editIngredient_CorrectInformation(){\n int returned = testDatabase.getIngredient(\"salt\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"salt\");\n testDatabase.editIngredient(newIngredient);\n Ingredient retrieved = testDatabase.getIngredient(ingredientID);\n assertEquals(\"editIngredient - Correct Name\", \"salt\", retrieved.getName());\n assertEquals(\"editIngredient - Correct ID\", ingredientID, retrieved.getKeyID());\n }", "@Test\n public void testSubmitFood() throws Exception {\n \n //submits a food with the given parmeters and randomizes the \n //foods calories, then verifys the food was created by comparing\n //the random number with the expected random number\n System.out.println(\"Submit Food\");\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost/users\", \"root\", \"tech\");\n Statement stmt= (Statement) conn.createStatement();\n Random rn = new Random();\n int maximum = 300;\n int minimum = 1;\n int range = maximum - minimum + 1;\n int randomNum = rn.nextInt(range) + minimum;\n sql=\"insert into foodlog (id,userName,food,log,totalCalories) \"\n + \"VAlUES (NULL,'thuff','Apple','2016-03-09','\"+randomNum+\"')\";\n stmt.executeUpdate(sql);\n sql = \"SELECT * FROM foodlog WHERE totalCalories='\"+randomNum+\"'\";\n rs = stmt.executeQuery(sql);\n \n while(rs.next()){\n assertTrue(rs.getInt(\"totalCalories\")==(randomNum));\n assertFalse(rs.getInt(\"totalCalories\")==(0));\n }\n }", "@org.junit.Test\r\n public void testInsertReview4() throws Exception {\r\n System.out.println(\"insertReview4\");\r\n Review review = new Review(new Long(0), \"Max\", null, \"It's excellent\");\r\n try{\r\n Review result = service.insertReview(review);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null rating\");\r\n }", "@Test\n\tpublic void addNewCostCenterToADriver_FuncTest() throws MalBusinessException{\n\t\thasCurrentCostCenterDrvId = ((BigDecimal)em.createNativeQuery(TestQueryConstants.READ_DRIVER_ID_WITH_CURR_COST_CENTER).getSingleResult()).longValue();\n\t\t\n\t\tDriver driverWithCostCenter = driverService.getDriver(hasCurrentCostCenterDrvId);\n\n\t\tCostCentreCode expectedCenter = costCenterService.getCostCenters(driverWithCostCenter.getExternalAccount()).get(1);\n\t\t\n\t\tDriver actualDriver = driverService.saveOrUpdateDriver(driverWithCostCenter.getExternalAccount(), driverWithCostCenter.getDgdGradeCode(), driverWithCostCenter, driverWithCostCenter.getDriverAddressList(), driverWithCostCenter.getPhoneNumbers(), \"Testing\", expectedCenter);\n\t\t \n\t\tassertEquals(actualDriver.getDriverCurrentCostCenter().getCostCenterCode(), expectedCenter.getCostCentreCodesPK().getCostCentreCode());\n\t\tassertEquals(actualDriver.getCostCentreCode(), expectedCenter.getCostCentreCodesPK().getCostCentreCode());\n\t}", "int insert(InspectionAgency record);", "@Test\n public void addRecipeDirection_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedDirection1 = testDatabase.addRecipeDirection(recipeDirection1);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returnedRecipe);\n RecipeDirection retrieved = new RecipeDirection();\n if(allDirections != null){\n for(int i = 0; i < allDirections.size(); i++){\n if(allDirections.get(i).getKeyID() == returnedDirection1){\n retrieved = allDirections.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct Number\", 1, retrieved.getDirectionNumber(), 0);\n assertEquals(\"addRecipeDirection - Correct Text\", \"TestDirection1\", retrieved.getDirectionText());\n }", "@Test\n public void testInsertNew() {\n System.out.println(\"insertNew\");\n Address obj = new Address(\"tregi\",\"333\",\"Porto\");;\n boolean expResult = true;\n boolean result = instance.insertNew(obj);\n assertEquals(expResult, result);\n }", "public void RentTool(Rental rental)\n {\n this.rentals.add(rental);\n this.canRent = checkIfCanRent();\n }", "Rental createRental();", "@Test\n @DisplayName(\"Testataan kaikkien tilausten haku\")\n void getAllReservations() {\n assertEquals(0, reservationsDao.getAllReservations().size());\n\n TablesEntity table1 = new TablesEntity();\n table1.setSeats(2);\n tablesDao.createTable(table1);\n // Test that returns the same number as created reservations\n ReservationsEntity firstReservation = new ReservationsEntity(\"amal\",\"46111222\", new Date(System.currentTimeMillis()), table1.getId(),new Time(1000),new Time(2000));\n reservationsDao.createReservation(firstReservation);\n\n TablesEntity table2 = new TablesEntity();\n table2.setSeats(2);\n tablesDao.createTable(table2);\n reservationsDao.createReservation(new ReservationsEntity(\"juho\", \"46555444\", new Date(System.currentTimeMillis()), table2.getId(), new Time(1000),new Time(2000)));\n\n List<ReservationsEntity> reservations = reservationsDao.getAllReservations();\n assertEquals(2, reservations.size());\n assertEquals(firstReservation, reservations.get(0));\n }", "int insert(Sequipment record);", "int insert(RetailModule record);", "int insert(BusinessRepayment record);", "@Test\n\tpublic void addRegistrationDetails() {\n\t\tRegistrationDetails registrationDetailsForHappyPath = RegistrationHelper.getRegistrationDetailsForHappyPath();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tRegistrationDetails addRegistrationDetails = registrationDAO\n\t\t\t\t\t.addRegistrationDetails(registrationDetailsForHappyPath);\n\t\t\tem.getTransaction().commit();\n\t\t\tassertTrue(addRegistrationDetails.getId() != 0l);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t}", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry addNewDebts();", "@Test void addIngredientZero()\n {\n }", "@Test\r\n\t public void addANonExistingRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(\"rutatest\", \"desctest\", \"asdfas\",\"2012-02-02\", this.rafter));\r\n\t\t Assert.assertNotNull(\"it should returns not null\", test);\r\n\t\t routeFatherDAO.delete(test);\r\n\t\t \r\n\t }", "@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}", "@Test\n public void testNewEntity_3args() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", e);\n Job j = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j);\n List<Allocation> allocationListBefore = p.getAllocationList();\n assertNotNull(allocationListBefore);\n assertTrue(\"Bad test data?\", allocationListBefore.isEmpty());\n\n // Here is the statement that we want to test:\n Allocation testItem = allocationCollection.newEntity(p, e, j, \"USER\");\n\n // Verify that the result is as expected.\n assertNotNull(testItem);\n assertNotNull(testItem.getAllocationId());\n assertTrue(testItem.getAllocationId() > 0);\n\n assertEquals(p, testItem.getPerson());\n assertEquals(e, testItem.getEvent());\n assertEquals(j, testItem.getJob());\n\n List<Allocation> allocationListAfter = p.getAllocationList();\n assertTrue(allocationListAfter.contains(testItem));\n }", "@Test\n public void validAdd() throws Exception {\n Logger.getGlobal().info(\"Start validAdd test\");\n RestaurantVO restaurant = new RestaurantVO();\n restaurant.setId(\"999\");\n restaurant.setName(\"Test Restaurant\");\n\n ResponseEntity<Restaurant> restaurants = restaurantController.add(restaurant);\n Assert.assertEquals(HttpStatus.CREATED, restaurants.getStatusCode());\n Logger.getGlobal().info(\"End validAdd test\");\n }", "int insert(Drug_OutWarehouse record);", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }", "int insert(FundManagerDo record);", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "@org.junit.Test\r\n public void testInsertReview2() throws Exception {\r\n System.out.println(\"insertReview2\");\r\n Review review = new Review(new Long(0), null, 9, \"It's excellent\");\r\n try{\r\n Review result = service.insertReview(review);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null author name\");\r\n }", "int insert(EcsSupplierRebate record);", "@Test\r\n public void testReserveSlot() {\r\n System.out.println(\"reserveSlot\");\r\n Table instance = new Table(\"S\",2);\r\n boolean expResult = true;\r\n boolean result = instance.reserveSlot();\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }", "@Test\n\tpublic void testAddingPassengerAfterAnotherPassengerBoarding() throws TrainException\n\t{\n\t\tInteger grossWeight = 1;\n\t\tInteger numberOfSeats = 10;\n\t\tInteger newPassengers = 7;\n\t\tInteger addingNewPassenger = 8;\n\t\t\n\t\tasgn2RollingStock.RollingStock passengerCarUnderTest = \n\t\t\tnew asgn2RollingStock.PassengerCar((Integer)grossWeight, (Integer)numberOfSeats);\n\t\t\n\t\tInteger peopleNotGetSeat = ((asgn2RollingStock.PassengerCar)passengerCarUnderTest).board((Integer) newPassengers);\n\t\t\n\t\tpeopleNotGetSeat = ((asgn2RollingStock.PassengerCar)passengerCarUnderTest).board((Integer) addingNewPassenger);\n\t\t\n\t\tInteger expectedPeopleNotGetSeat = newPassengers + addingNewPassenger - numberOfSeats;\n\t\t\n\t\tassertEquals(expectedPeopleNotGetSeat, peopleNotGetSeat);\n\t\t\n\t}", "@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}", "int insertSelective(Nutrition record);", "@Test\n public void updateTest() {\n reservation3.setId(13L);\n reservation3.setReserveDate(LocalDate.now().plusDays(2));\n reservationService.update(reservation3);\n Mockito.verify(reservationDao, Mockito.times(1)).update(reservation3);\n }", "@Test\n public void addRecipeDirection_ReturnsID(){\n int returned = testDatabase.addRecipeDirection(recipeDirection1);\n assertNotEquals(\"addRecipeDirection - Returns True\", -1, returned);\n }", "@Test\n public void testAddNewRate() {\n System.out.println(\"addNewRate\");\n int rate = 0;\n RateList instance = new RateList();\n Rate expResult = new Rate(0);\n Rate result = instance.addNewRate(rate);\n assertEquals(expResult, result);\n }", "public boolean addRegulation(Regulations r) {\n\t\tboolean result = false;\r\n\t\tSqlSession session = MybatisSqlSessionFactory.getSqlSession();\r\n\t\tInteger Regulationid = session.selectOne(\"getregulationid\");\r\n\t\tr.setRegulationid(Regulationid);\r\n\t\tint i = session.insert(\"addregulation\",r);\r\n\t\r\n\t\tif(i>0){\r\n\t\t\tresult = true;\r\n\t\t\tsession.commit();\r\n\t\t}else{\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\tMybatisSqlSessionFactory.closeSqlSession();\r\n\t\treturn result;\r\n\t}", "public void testInsert() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService service = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(service); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE employee = ?\");\r\n\t\tps.setString(1, \"employee\");\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}", "int insert(Cargo record);", "@Test\n public void searching_for_existing_restaurant_should_return_expected_restaurant_object() throws restaurantNotFoundException {\n //WRITE UNIT TEST CASE HERE\n LocalTime openingTime = LocalTime.parse(\"10:30:00\");\n LocalTime closingTime = LocalTime.parse(\"22:00:00\");\n service.addRestaurant(\"Amelie's cafe\",\"Chennai\",openingTime,closingTime);\n String searchName = \"Amelie's cafe\";\n Restaurant restaurant = service.findRestaurantByName(searchName);\n String actName = restaurant.getName();\n assertEquals(searchName,actName);\n }", "@Test\r\n public void testRent() {\r\n }", "int insert(TestEntity record);", "@Test\n public void test() {\n Minister minister = createMinister();\n Territory territory = createTerritory();\n\n TerritoryEntry territoryEntry = TerritoryEntry.generateForCongregationPool(territory);\n territoryEntry = territoryEntryRepository.save(territoryEntry);\n\n Assert.assertNotNull(territoryEntry.getId());\n Assert.assertTrue(territoryEntry.getCongregationPool());\n Assert.assertTrue(!territoryEntry.getArchived());\n Assert.assertEquals(territory.getId(), territoryEntry.getTerritoryID());\n Assert.assertNull(territoryEntry.getMinisterID());\n\n territoryEntry = TerritoryEntry.generateForMinister(territory, minister);\n territoryEntry = territoryEntryRepository.save(territoryEntry);\n\n Assert.assertNotNull(territoryEntry.getId());\n Assert.assertTrue(!territoryEntry.getCongregationPool());\n Assert.assertTrue(!territoryEntry.getArchived());\n Assert.assertEquals(territory.getId(), territoryEntry.getTerritoryID());\n Assert.assertEquals(minister.getId(), territoryEntry.getMinisterID());\n\n\n deleteMinister(minister);\n deleteTerritory(territory);\n }", "int addReimbursement(Reimbursement rb);", "int insert(SrHotelRoomInfo record);", "@org.junit.Test\r\n public void testInsertReview3() throws Exception {\r\n System.out.println(\"insertReview3\");\r\n Review review = new Review(new Long(0), \"\", 9, \"It's excellent\");\r\n try{\r\n Review result = service.insertReview(review);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted empty author name\");\r\n }", "int insert(ReleaseSystem record);", "int insert(FinancialManagement record);", "@Test\n\tpublic void testAddRecipe(){\n\t\t\n\t\ttestingredient1.setName(\"Peanut Butter\");\n\t\ttestingredient2.setName(\"Jelly\");\n\t\ttestingredient3.setName(\"Bread\");\n\t\t\n\t\t\n\t\tingredients.add(testingredient1);\n\t\tingredients.add(testingredient2);\n\t\tingredients.add(testingredient3);\n\t\t\n\t\ttestRecipe.setName(\"PB and J\");\n\t\ttestRecipe.setDescription(\"A nice, tasty sandwich\");\n\t\ttestRecipe.setIngredients(ingredients);\n\t\t\n\t\ttest2.saveRecipe(testRecipe);\n\t\t//test2.deleteRecipe(testRecipe);\n\t}", "int insert(DepAcctDO record);", "@Test\n\tpublic void createAccountRRSPInvestmentTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnRrspInvestments.setSelected(true);\n\t\tdata.setRdbtnRrspInvestments(rdbtnRrspInvestments);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.RRSP_INVESTMENTS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}", "int insert(PurchasePayment record);", "@Test\n\tpublic void test02() {\n\t\t\tUser user1 = new User(\"megan\");\n\t\t\t\n\t\t\tuser1.setName(\"Name1\");\n\t\t\tassertEquals(\"Name1\", user1.getName());\n\t\t\t\n\t\t//\tdb.addRestaurant(rest1);\n\t\t}", "int insertBet(Account account, Bet bet) throws DAOException;", "int insert(TRefundOrder record);", "@Test\n public void RunwayAddRemoveTest(){\n for(Airport a : controller.get_airports()){\n controller.remove_Airport(a);\n Logger.Log(\"Removing Runway \" + a.toString());\n }\n\n Airport testAirport = new Airport(\"Test Airport\", \"TST\");\n controller.add_airport(testAirport);\n\n RunwayParameters testRP = new RunwayParameters(3901, 3901, 3500, 3000);\n\n\n Random random = new Random();\n int bound = 10;\n Logger.Log(\"Using upper bound for runway add + remove test [\" + bound + \"].\");\n\n ArrayList<Runway> runways = new ArrayList<>();\n for(int x = 0; x < bound; x++){\n String d1 = x + \"L\";\n String d2 = x + \"R\";\n\n Logger.Log(\"Adding virtual runway\");\n VirtualRunway vr1 = new VirtualRunway(d1, testRP);\n VirtualRunway vr2 = new VirtualRunway(d2, testRP);\n Runway runway = new Runway(vr1, vr2);\n runways.add(runway);\n Logger.Log(\"Adding \" + runway.toString());\n controller.add_Runway(runway, testAirport.getAirport_id());\n }\n\n ArrayList<Runway> recoveredRunways = new ArrayList<Runway>(Arrays.asList(controller.get_runways()));\n\n outer:\n for(int x = 0; x < bound; x++){\n for(Runway db_copy : recoveredRunways) {\n if(db_copy.toString().equals(runways.get(x).toString())){\n continue outer;\n }\n }\n fail(\"Failed to find Runway \" + runways.get(x) + \"in database!\");\n }\n\n\n Logger.Log(\"Test Passed! \" + bound + \" Runways added to database and removed again.\");\n controller = null;\n }", "int insert(Salaries record);", "@Test\n\tpublic void testAddRowCommit() {\n\t}", "@Test\n\tpublic void test03() {\n\t\t\tUser user1 = new User(\"megan\");\n\t\t\t\n\t\t\tuser1.setUser_id(\"UserID1\");\n\t\t\tassertEquals(\"UserID1\", user1.getUser_id());\n\t\t\t\n\t\t//\tdb.addRestaurant(rest1);\n\t\t}", "@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }", "@Test\n public void editRecipe_ReturnsTrue(){\n testDatabase.addRecipe(testRecipe);\n testRecipe.setTitle(\"TestRecipe Updated\");\n testRecipe.setServings(1.5);\n testRecipe.setPrep_time(15);\n testRecipe.setTotal_time(45);\n testRecipe.setFavorited(true);\n listOfCategories.clear();\n listOfCategories.add(recipeCategory);\n testRecipe.setCategoryList(listOfCategories);\n listOfIngredients.clear();\n recipeIngredient.setUnit(\"tbsp\");\n recipeIngredient.setQuantity(1.5);\n recipeIngredient.setDetails(\"Brown Sugar\");\n listOfIngredients.add(recipeIngredient);\n testRecipe.setIngredientList(listOfIngredients);\n listOfDirections.clear();\n listOfDirections.add(recipeDirection1);\n testRecipe.setDirectionsList(listOfDirections);\n\n assertEquals(\"editRecipe - Returns True\", true, testDatabase.editRecipe(testRecipe));\n }", "int insert(Tourst record);", "@Test\n public void insertOne() throws Exception {\n\n }" ]
[ "0.6678715", "0.64294046", "0.63298464", "0.6295324", "0.62663895", "0.6258702", "0.624007", "0.6174418", "0.60989076", "0.6090941", "0.607622", "0.6045493", "0.6035803", "0.6018604", "0.60128117", "0.600809", "0.59907067", "0.5990255", "0.59778947", "0.5975939", "0.5952209", "0.5951587", "0.59397805", "0.5933886", "0.5921753", "0.59193975", "0.5909726", "0.58989966", "0.58803904", "0.58689964", "0.5844874", "0.5815282", "0.58029425", "0.57907796", "0.57817215", "0.57771945", "0.57726365", "0.5764722", "0.5756734", "0.57451487", "0.5736509", "0.5736321", "0.5734528", "0.5732536", "0.57295406", "0.572837", "0.5724153", "0.57155", "0.5715443", "0.57139266", "0.5713513", "0.5697449", "0.56945163", "0.5690567", "0.5682603", "0.5681706", "0.5681261", "0.5679615", "0.56783825", "0.5677675", "0.5676123", "0.5671103", "0.56706595", "0.5668453", "0.5656923", "0.5656094", "0.5650993", "0.56450987", "0.5644447", "0.5644057", "0.5636392", "0.5634841", "0.56287444", "0.5625011", "0.5624657", "0.56246376", "0.5612402", "0.5609482", "0.56040114", "0.5600507", "0.55997205", "0.55966294", "0.55959404", "0.55919516", "0.55909044", "0.55905014", "0.5589016", "0.55861175", "0.558427", "0.55830663", "0.55755484", "0.5570991", "0.5570481", "0.55649596", "0.55638534", "0.556116", "0.55604523", "0.5555258", "0.5532558", "0.55299324" ]
0.7206433
0
Test of getRentList method, of class ReserveDB.
@Test public void testGetRentList() { System.out.println("getRentList"); ReserveInfo reserveInfo = new ReserveInfo(); reserveInfo.setGuestName("test"); BookingController instance = new BookingController(); boolean expResult=true; boolean result=false; if(instance.getRentList(reserveInfo).size()>0) result=true; assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void test() {\n\n Reservation res1 =\n new Reservation(\n -1,\n \"Standard\",\n \"0000111\",\n Timestamp.valueOf(\"2019-06-11 16:10:00\"),\n Timestamp.valueOf(\"2019-06-15 09:00:00\"),\n \"525 W Broadway\",\n \"Vancouver\");\n ReservationsController.makeReservation(res1);\n\n RentalConfirmation rc1 =\n RentalsController.rentVehicle(res1, \"Mastercard\", \"389275920888492\", \"08/22\");\n\n System.out.println(\"Getting the rental added to the database\");\n Rental check = RentalsController.getRental(rc1.getRid());\n System.out.println(check);\n ArrayList<RentalReportCount> rentals =\n RentalsController.getDailyRentalCount(\"2019-11-20\", null, null);\n if (rentals != null && rentals.isEmpty()) {\n System.out.println(\"list is empty\");\n }\n System.out.println(rentals);\n\n RentalsController.deleteRental(rc1.getRid());\n }", "@Test\n @DisplayName(\"Testataan kaikkien tilausten haku\")\n void getAllReservations() {\n assertEquals(0, reservationsDao.getAllReservations().size());\n\n TablesEntity table1 = new TablesEntity();\n table1.setSeats(2);\n tablesDao.createTable(table1);\n // Test that returns the same number as created reservations\n ReservationsEntity firstReservation = new ReservationsEntity(\"amal\",\"46111222\", new Date(System.currentTimeMillis()), table1.getId(),new Time(1000),new Time(2000));\n reservationsDao.createReservation(firstReservation);\n\n TablesEntity table2 = new TablesEntity();\n table2.setSeats(2);\n tablesDao.createTable(table2);\n reservationsDao.createReservation(new ReservationsEntity(\"juho\", \"46555444\", new Date(System.currentTimeMillis()), table2.getId(), new Time(1000),new Time(2000)));\n\n List<ReservationsEntity> reservations = reservationsDao.getAllReservations();\n assertEquals(2, reservations.size());\n assertEquals(firstReservation, reservations.get(0));\n }", "@Override public RentalList getRentalList() throws RemoteException, SQLException {\r\n return gameListClientModel.clientGetRentalList();\r\n }", "@Test\n public void getAllRecipeIngredients_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returned);\n assertNotEquals(\"getAllRecipeIngredients - Non-empty List Returned\", 0, allIngredients.size());\n }", "@Test\n public void getAllRecipes_ReturnsList(){\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n assertNotEquals(\"getAllRecipes - Non-empty List Returned\", 0, allRecipes.size());\n }", "@Test\n public void retriveAllTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n List<Servizio> lista = manager.retriveAll();\n assertEquals(7,lista.size(),\"It should return a list of length 7\");\n }", "@Test\n public void findAllTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findAll()).thenReturn(expected);\n Collection<Reservation> result = reservationService.findAll();\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "@Test\n public void findReservationBetweenTest() {\n Collection<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findReservationBetween(Mockito.any(LocalDate.class), Mockito.any(LocalDate.class)))\n .thenReturn(expected);\n Collection<Reservation> result = reservationService.findReservationsBetween(LocalDate.now().minusDays(4),\n LocalDate.now().plusDays(15));\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n Assert.assertTrue(result.contains(reservation3));\n Assert.assertTrue(result.contains(reservation4));\n }", "public static void testEmprunt() throws DaoException {\r\n EmpruntDao empruntDao = EmpruntDaoImpl.getInstance();\r\n LivreDao livreDao = LivreDaoImpl.getInstance();\r\n MembreDao membreDao = MembreDaoImpl.getInstance();\r\n\r\n List<Emprunt> list = new ArrayList<Emprunt>();\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n 'Emprunts' list: \" + list);\r\n\r\n list = empruntDao.getListCurrent();\r\n System.out.println(\"\\n Current 'Emprunts' list: \" + list);\r\n\r\n list = empruntDao.getListCurrentByMembre(5);\r\n System.out.println(\"\\n Current 'Emprunts' list by member: \" + list);\r\n\r\n list = empruntDao.getListCurrentByLivre(3);\r\n System.out.println(\"\\n Current 'Emprunts' list by book: \" + list);\r\n\r\n Emprunt test = empruntDao.getById(5);\r\n System.out.println(\"\\n Selected 'Emprunt' : \" + test);\r\n\r\n empruntDao.create(1, 4, LocalDate.now());\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n List updated with one creation: \" + list);\r\n\r\n\r\n int id_book = livreDao.create(\"My Book\", \"My Autor\", \"123456\");\r\n Livre test_livre = new Livre();\r\n test_livre = livreDao.getById(id_book);\r\n int idMember = membreDao.create(\"Rodrigues\", \"Henrique\", \"ENSTA\", \"henrique@email.fr\", \"+33071234567\", Abonnement.VIP);\r\n Membre test_membre = new Membre();\r\n test_membre = membreDao.getById(idMember);\r\n test = new Emprunt(2, test_membre, test_livre, LocalDate.now(), LocalDate.now().plusDays(60));\r\n empruntDao.update(test);\r\n list = empruntDao.getList();\r\n System.out.println(\"\\n List updated: \" + list);\r\n //System.out.println(\"\\n \" + test_livre.getId() + \" \" + test_membre.getId());\r\n\r\n\r\n int total = empruntDao.count();\r\n System.out.println(\"\\n Number of 'emprunts' in DB : \" + total);\r\n\r\n }", "@Test\n public void testGetListOfPurchases() {\n System.out.println(\"getListOfPurchases\");\n //CashRegister instance = new CashRegister();\n List<Double> expResult;\n expResult = new LinkedList<>();\n assertEquals(expResult, instance.getListOfPurchases());\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n \n expResult.add(0.55);\n expResult.add(1.27);\n \n List<Double> result = instance.getListOfPurchases();\n assertEquals(expResult, result);\n }", "@Test\n public void findByTripTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation2);\n expected.add(reservation4);\n Mockito.when(reservationDao.findByTripId(Mockito.anyLong())).thenReturn(expected);\n Collection<Reservation> result = reservationService.findByTrip(25L);\n Assert.assertEquals(result.size(), 2);\n Assert.assertTrue(result.contains(reservation2));\n Assert.assertTrue(result.contains(reservation4));\n }", "@DirtiesDatabase\n\t@Test\n\tpublic void testRetrieveByBundleConstituentList() {\n\t\tcreateBundles();\n\t\tcreatePA(\"P1\", \"PA1\", \"PLGUID\", \"CGUID\");\n\t\tcreatePA(\"P1\", \"PA2\", \"PLGUID\", \"C2GUID\");\n\t\t\n\t\t\n\t\tPriceAdjustmentDao dao = getBeanFactory().getBean(\"priceAdjustmentDao\");\n\t\tCollection<String> bcList = new ArrayList<String>();\n\t\tbcList.add(\"CGUID\");\n\t\tbcList.add(\"C2GUID\");\n\t\tCollection<PriceAdjustment> assignments = dao.findByPriceListBundleConstituents(\"PLGUID\", bcList);\n\t\tassertEquals(2, assignments.size());\n\t}", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\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 list;\n\t\t\n\t}", "public List<Restaurant> restaurantList(){\r\n\t\treturn DataDAO.getRestaurantList();\r\n\t}", "List<Reimbursement> retrieveAllReimbursements();", "@Test\n public void getAllRecipeIngredients_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returned);\n RecipeIngredient retrieved = allIngredients.get(allIngredients.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipeIngredients - Correct Quantity\", 2.0, retrieved.getQuantity(), 0);\n assertEquals(\"getAllRecipeIngredients - Correct Unit\", \"cups\", retrieved.getUnit());\n assertEquals(\"getAllRecipeIngredients - Correct Details\", \"White Flour\", retrieved.getDetails());\n }", "@Test\n public void getListTest() throws SQLException, IDAO.DALException {\n User[] userList = userDAO.getList();\n assertEquals(\"Simon\", userList[0].getNavn());\n assertEquals(\"Silas\", userList[1].getNavn());\n assertEquals(\"Peter\", userList[2].getNavn());\n }", "@DirtiesDatabase\n\t@Test\n\tpublic void testRetrieveAdjustmentsForPriceList() {\n\t\tcreateBundles();\n\t\tPriceAdjustment createPA = createPA(\"P1\", \"PA1\", \"PLGUID\", \"CGUID\");\n\t\tPriceAdjustment createPA2 = createPA(\"P1\", \"PA2\", \"PLGUID\", \"C2GUID\");\n\t\tList<PriceAdjustment> adjustments = priceAdjustmentService.findByPriceList(\"PLGUID\");\n\t\tassertNotNull(adjustments);\n\t\tassertEquals(2, adjustments.size());\n\t\t\n\t\tassertTrue(\"PA1 should be found\", adjustments.contains(createPA));\n\t\tassertTrue(\"PA2 should be found\", adjustments.contains(createPA2));\n\t}", "public void testFindAccountList(){\n\t\tString begin = \"2013-01-01\" ;\n\t\tString end = \"2014-01-01\" ;\n\t\tAccount account = new Account() ;\n\t\tList<Account> list = this.bean.findAccountList(begin, end, account) ;\n\t\tAssert.assertTrue(list.size()>2) ;\n\t}", "@Test\n\tpublic void getStudyGermplasmListFromDb() {\n\n\t\tfinal Session currentSession = Mockito.mock(Session.class);\n\t\tfinal Criteria mockCriteria = Mockito.mock(Criteria.class);\n\t\twhen(currentSession.createCriteria(ListDataProject.class)).thenReturn(mockCriteria);\n\t\twhen(mockCriteria.createAlias(\"list\", \"l\")).thenReturn(mockCriteria);\n\t\twhen(mockCriteria.add(any(SimpleExpression.class))).thenReturn(mockCriteria);\n\n\t\tfinal PodamFactory factory = new PodamFactoryImpl();\n\n\t\tfinal GermplasmList germplasmList = new GermplasmList();\n\t\tfinal ListDataProject listDataProject = new ListDataProject();\n\n\t\tfactory.populatePojo(germplasmList, GermplasmList.class);\n\t\tfactory.populatePojo(listDataProject, ListDataProject.class);\n\n\t\tlistDataProject.setList(germplasmList);\n\t\tfinal List<ListDataProject> queryResults = new ArrayList<ListDataProject>();\n\t\tqueryResults.add(listDataProject);\n\n\t\twhen(mockCriteria.list()).thenReturn(queryResults);\n\n\t\tfinal StudyGermplasmDto expectedGermplasm = this.getResultingStudyGermplasmDto(germplasmList, listDataProject);\n\n\t\tfinal StudyGermplasmListServiceImpl studyGermplasmListServiceImpl = new StudyGermplasmListServiceImpl(currentSession);\n\t\tfinal List<StudyGermplasmDto> actualGermplasmList = studyGermplasmListServiceImpl.getGermplasmList(2013);\n\n\t\tassertEquals(\"The two lists must be equal.\", Collections.<StudyGermplasmDto>singletonList(expectedGermplasm), actualGermplasmList);\n\t}", "protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\n }", "@Test\r\n\t\tpublic void readAnExistingRouteFatherList(){\r\n\t\t\tList<RouteFather> routeFathers = routeFatherDAO.read();\r\n\t\t\tAssert.assertTrue(\"it should returns full list\", !routeFathers.isEmpty());\r\n\t\t}", "@Override\n\tpublic List<Resident> getResidentList() {\n\t\tQuery query = getSession().createQuery(\"select residents from RESIDENT_HMS residents\");\n\t\tList<Resident> residentlist=query.list();\n\t\treturn residentlist;\n\t}", "@Test\r\n public void testGetList() throws Exception {\r\n LOG.info(\"getList\");\r\n String listId = \"509ec17b19c2950a0600050d\";\r\n MovieDbList result = tmdb.getList(listId);\r\n assertFalse(\"List not found\", result.getItems().isEmpty());\r\n }", "void testCanGetList();", "@Test\n public void testReservationFactoryGetReservation() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n assertEquals(CUSTOMER_NAME, reservationController.getReservation(1).getCustomer().getName());\n assertEquals(CUSTOMER_CONTACT, reservationController.getReservation(1).getCustomer().getContactNo());\n assertEquals(1, reservationController.getReservation(1).getTable().getTableId());\n assertEquals(2, reservationController.getReservation(1).getTable().getNumSeats());\n assertEquals(date, reservationController.getReservation(1).getReservationDate());\n }", "public List<Renter> showRentersList(){\n String sql = \"SELECT renterID AS id, first_name AS firstName, last_name AS lastName, CPR AS cpr, email, phone, \" +\n \"driver_license_number AS licenseNumber, a.street, a.building, a.floor, a.door, z.zip, city.name AS city,\" +\n \" c.name AS country FROM renter r JOIN address a ON r.addressID=a.addressID JOIN zip z ON a.zipID=z.zipID\" +\n \" JOIN city ON z.cityID=city.cityID JOIN country c ON z.countryID=c.countryID\";\n return template.query(sql, rowMapper);\n }", "@Test\n public void testGetRateList() {\n System.out.println(\"getRateList\");\n RateList instance = new RateList();\n List<Rate> expResult = new ArrayList<>();\n List<Rate> result = instance.getRateList();\n assertEquals(expResult, result);\n }", "@Test\n public void getAllRecipes_RecipeInfo(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n Recipe retrieved = allRecipes.get(allRecipes.size()-1);\n //Retrieved should now contain all the same information as testRecipe\n assertEquals(\"getAllRecipes - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getAllRecipes - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getAllRecipes - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getAllRecipes - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getAllRecipes - Correct Favorited\", false, retrieved.getFavorited());\n }", "@Test\n public void testFindAllPassengers() {\n System.out.println(\"findAllPassengers\");\n PassengerHandler instance = new PassengerHandler();\n ArrayList<Passenger> expResult = new ArrayList();\n for(int i = 1; i < 24; i++){\n Passenger p = new Passenger();\n p.setPassengerID(i);\n p.setForename(\"Rob\");\n p.setSurname(\"Smith\");\n p.setDOB(new Date(2018-02-20));\n p.setNationality(\"USA\");\n p.setPassportNumber(i);\n expResult.add(p);\n }\n \n ArrayList<Passenger> result = instance.findAllPassengers();\n assertEquals(expResult, result);\n }", "@Test\n public void getAllRecipeIngredients_ReturnsNull(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipeIngredients(returned);\n assertEquals(\"getAllRecipeIngredients - Empty List Returned\", null, testDatabase.getAllRecipeIngredients(returned));\n }", "@Test\n void test_getALlreviews() throws Exception{\n\n List<ReviewMapping> reviewList=new ArrayList<>();\n\n for(long i=1;i<6;i++)\n {\n reviewList.add( new ReviewMapping(i,new Long(1),new Long(1),\"good\",3));\n }\n\n Mockito.when(reviewRepository.findAll()).thenReturn(reviewList);\n List<ReviewMapping> e=reviewService.GetReviewMappings();\n assertThat(e.size(),equalTo(5));\n }", "@Test\n\tpublic void testListReservationsOfFacilityInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID,\n\t\t\t\tArrays.asList(room1.getId(), infoBuilding.getId()), reservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(2, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t\tassertTrue(reservationsOfFacility.contains(reservation2));\n\t}", "@Test\r\n\tpublic void testGetLstFromDB(){\r\n\t\tList<IP> lst = new ArrayList<IP>();\r\n\t\tlst = ipService.getIPLstFromDB();\r\n\t\tSystem.out.println(\"test method testGetLstFromDB==>ip list:\"+JSON.toJSONString(lst));\r\n\t}", "@Test\n public void getAllRecipeDirections_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returned);\n assertNotEquals(\"getAllRecipeDirections - Non-empty List Returned\", 0, allDirections.size());\n }", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic final void testGetAllRooms() {\n\t\tList<Room> actualList = roomServices.getAllRooms();\r\n\t\t// get all data in JUnit test\r\n\r\n\t\tList<Room> expectedList = new ArrayList<Room>();\r\n\t\texpectedList.addAll(params());\r\n\t\t\r\n\t\tSystem.out.println(\"expectedList\");\r\n\t\tSystem.out.println(expectedList);\r\n\t\tSystem.out.println(\"actualList\");\r\n\t\tSystem.out.println(actualList);\r\n\t\t\r\n\t\t// see if JUnit test value is in room list\r\n\t\tassertTrue(actualList.contains(expected));\r\n\t}", "@Test\n\tpublic void testListReservationsOfUserInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(),\n\t\t\t\treservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfUser;\n\t\treservationsOfUser = bookingManagement.listReservationsOfUser(USER_ID, listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfUser);\n\t\tassertEquals(2, reservationsOfUser.size());\n\t\tassertTrue(reservationsOfUser.contains(reservation1));\n\t\tassertTrue(reservationsOfUser.contains(reservation2));\n\t}", "@Test\n public void getRoads()\n {\n List<Road> noroads = new ArrayList<>();\n assertEquals(noroads, country1.getRoads(cityG));\n //List of roads starting in the city returned.\n List<Road> roads = new ArrayList<>(country1.getRoads(cityA));\n assertEquals(roads.get(0).getFrom(), cityA);\n assertEquals(roads.get(1).getFrom(), cityA);\n assertEquals(roads.get(2).getFrom(), cityA);\n assertEquals(roads.size(),3);\n //4 calls to addRoads with cityF in setUp, but only 3 roads starting in cityF\n roads = new ArrayList<>(country2.getRoads(cityF));\n assertEquals(roads.get(0).getFrom(), cityF);\n assertEquals(roads.get(1).getFrom(), cityF);\n assertEquals(roads.get(2).getFrom(), cityF);\n assertEquals(roads.size(),3);\n \n roads = new ArrayList<>(country2.getRoads(null));\n assertEquals(noroads, roads);\n }", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@Test\n public void listAll_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n List<Workflow> wfList = new ArrayList<>();\n wfList.add(addMOToDb(1));\n wfList.add(addMOToDb(2));\n wfList.add(addMOToDb(3));\n\n // PREPARE THE TEST\n // Fill in the workflow db\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n List<Workflow> readWorkflowList = response.readEntity(new GenericType<List<Workflow>>() {\n });\n assertEquals(wfList.size(), readWorkflowList.size());\n for (int i = 0; i < wfList.size(); i++) {\n assertEquals(wfList.get(i).getId(), readWorkflowList.get(i).getId());\n assertEquals(wfList.get(i).getName(), readWorkflowList.get(i).getName());\n assertEquals(wfList.get(i).getDescription(), readWorkflowList.get(i).getDescription());\n }\n\n\n }", "public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);", "@Test\r\n\tpublic void testPendingInterviewList() throws Exception {\r\n\t\tList<Candidate> candidateList = new ArrayList<Candidate>();\r\n\t\tCandidate candidate = getCandidateObj();\r\n\t\tcandidate.setInterview(getInterview());\r\n\t\tcandidateList.add(candidate);\r\n\r\n\t\tList<ShowCandidateDTO> showCandidateList = new ArrayList<ShowCandidateDTO>();\r\n\t\tshowCandidateList.add(getShowCandidateDTO());\r\n\r\n\t\twhen(candidateRepository.candidatePendingInterviewApproval(anyLong())).thenReturn(candidateList);\r\n\t\twhen(interviewerService.pendingInterviewApprovalList(anyLong())).thenReturn(showCandidateList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getpenddingapproval/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}", "@Test\n public void testGetAll2() throws DbException, SQLException {\n assertSame(listCreditCardEntityList.get(0).getBalance(), creditCardEntity.getBalance());\n }", "void fetchRestaurantsListData(RepositoryContract.GetRestaurantsListCallback callback);", "public static List<ClientReservedTime> getClientReservedTimes(int clientID) {\n\t\tConnection conn = DBConnection.getConnection();\n\t\tList<ClientReservedTime> clientReservedTimes = new ArrayList<>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString command = \"SELECT \" +\n\t\t\t\t\t\" r.ID AS id,\" +\n\t\t\t\t\t\" r.DAY_ID AS dayID,\" +\n\t\t\t\t\t\" r.ST_TIME AS startTime,\" +\n\t\t\t\t\t\" r.DURATION AS duration,\" +\n\t\t\t\t\t\" r.RES_CODE_ID AS reserveCode,\" +\n\t\t\t\t\t\" r.RESERVE_GR_TIME AS gregorianDate,\" +\n\t\t\t\t\t\" r.CLIENT_ID as clientID,\" +\n\t\t\t\t\t\" SUM(rs.SERVICE_PRICE) AS cost,\" +\n\t\t\t\t\t\" c.ID AS companyID,\" +\n\t\t\t\t\t\" c.COMP_NAME AS companyName,\" +\n\t\t\t\t\t\" c.COVER_URL AS companyCover,\" +\n\t\t\t\t\t\" u.ID AS unitID,\" +\n\t\t\t\t\t\" u.UNIT_NAME AS unitName,\" +\n\t\t\t\t\t\" IFNULL(com.comment, ' ') AS comment,\" +\n\t\t\t\t\t\" IFNULL(com.SERVICE_RATE, 0) AS commentRate,\" +\n\t\t\t\t\t\" IFNULL(com.ID, 0) AS commentID,\" +\n\t\t\t\t\t\" IFNULL(com.SERVICE_RATE, 0) AS serviceRate,\" +\n\t\t\t\t\t\" IF(com.ID IS NULL and date_add(now(), interval r.DURATION minute)\" +\n \" > r.RESERVE_GR_TIME, TRUE, FALSE) AS commentable\" +\n\t\t\t\t\t\" FROM\" +\n\t\t\t\t\t\" alomonshi.reservetimes r\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" alomonshi.comments com ON com.RES_TIME_ID = r.ID\" +\n\t\t\t\t\t\" AND com.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" reservetimeservices rs ON rs.RES_TIME_ID = r.ID\" +\n\t\t\t\t\t\" AND rs.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" units u ON r.UNIT_ID = u.ID AND u.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" companies c ON u.COMP_ID = c.ID AND c.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" WHERE\" +\n\t\t\t\t\t\" r.STATUS = \" + ReserveTimeStatus.RESERVED.getValue() +\n\t\t\t\t\t\" AND r.CLIENT_ID = \" + clientID +\n\t\t\t\t\t\" GROUP BY r.ID\" +\n\t\t\t\t\t\" ORDER BY r.DAY_ID DESC, r.ST_TIME DESC \";\n\t\t\tResultSet rs = stmt.executeQuery(command);\n\t\t\tfillClientReserveTimeList(rs, clientReservedTimes);\n\t\t}catch(SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\treturn null;\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn clientReservedTimes;\n\t}", "@Test\r\n\tpublic void testGetPastPregnanciesFromInit() {\r\n\t\tList<PregnancyInfo> list;\r\n\t\ttry {\r\n\t\t\tlist = pregnancyData.getRecordsFromInit(1);\r\n\t\t\tAssert.assertEquals(list, oic.getPastPregnanciesFromInit(1));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t}", "public void testListClaim(){\n\t}", "@Test\n public void testJPA3ListAll (){\n Iterable<TruckInfo> trucklist = truckRepo.findAll();\n\n\n\n\n }", "@Test\n\tpublic void testListReservationsOfUserEqualInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(),\n\t\t\t\tlistStart, listEnd);\n\n\t\t// should find above reservation\n\t\tCollection<Reservation> reservationsOfUser;\n\t\treservationsOfUser = bookingManagement.listReservationsOfUser(USER_ID, listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfUser);\n\t\tassertEquals(1, reservationsOfUser.size());\n\t\tassertTrue(reservationsOfUser.contains(reservation1));\n\t}", "@Test\n public void getClients_retrievesALlClientsFromDatabase_clientsList() {\n Stylist myStylist = new Stylist(\"Ann\");\n myStylist.save();\n Client firstClient = new Client(\"Rose\", myStylist.getId());\n firstClient.save();\n Client secondClient = new Client(\"Mary\", myStylist.getId());\n secondClient.save();\n Client[] clients = new Client[] { firstClient, secondClient };\n assertTrue(myStylist.getClients().containsAll(Arrays.asList(clients)));\n }", "@Test\r\n\tpublic void testGetPastPregnancies() {\r\n\t\ttry {\r\n\t\t\tList<PregnancyInfo> list = pregnancyData.getRecords(1);\r\n\t\t\tAssert.assertEquals(list, oic.getPastPregnancies());\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testListReservationsOfFacilityBeforeInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\t// first reservation start date is 1 hour before list start\n\t\tcal.add(Calendar.HOUR, -26);\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +1);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tdataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()), reservation1StartDate,\n\t\t\t\treservation1EndDate);\n\n\t\t// should not find above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertTrue(reservationsOfFacility.isEmpty());\n\t}", "@Test\n\tpublic void testListReservationsOfUserBeforeInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\t// first reservation start date is 2 hour before list start\n\t\tcal.add(Calendar.HOUR, -26);\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +1);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tdataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), reservation1StartDate,\n\t\t\t\treservation1EndDate);\n\n\t\t// should not find above reservation\n\t\tCollection<Reservation> reservationsOfUser;\n\t\treservationsOfUser = bookingManagement.listReservationsOfUser(USER_ID, listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfUser);\n\t\tassertTrue(reservationsOfUser.isEmpty());\n\t}", "public ArrayList<Bookser> rented_books(int user_id) {\n startSession();\n\n Query q = session.createQuery(\"from Rent where rentee = :r\").setFirstResult(0);\n q.setParameter(\"r\", new User (user_id));\n\n List rents = q.getResultList();\n ArrayList<Bookser> book_objects = new ArrayList<>();\n\n for (Object rent: rents) {\n Rent r = (Rent) rent;\n Book b = r.getBook();\n Bookser bser = new Bookser(b.getId(), b.getName(), b.getAuthor(), b.getRent(), b.getDeposit());\n book_objects.add(bser);\n }\n\n System.out.println(\"Successful queries!\");\n endSession();\n return book_objects;\n }", "@Test\n\t@DatabaseSetup(value = \"classpath:databaseEntries.xml\", type = DatabaseOperation.CLEAN_INSERT)\n\tpublic void testListLecturers(){\n\t\tlecturerJdbcDaoSupport = (LecturerJdbcDaoSupport) autoWireContext.getBean(\"lecturerJdbcDaoSupport\");\n\t\t\n\t\t//Create ArrayList for expected Emails\n\t\tArrayList<String> expectedEmails=new ArrayList<>();\n\t\tString email1=\"MaryGriff@myCIT.ie\";\n \tString email2=\"JohnM@myCIT.ie\";\n \tString email3=\"DaveJohnson2@myCIT.ie\";\n \texpectedEmails.add(email1);\n expectedEmails.add(email2);\n expectedEmails.add(email3);\n \n //Iterate through table and add actual Emails to separate ArrayList\n\t\tArrayList<String> actualEmails = new ArrayList<>();\n\t\tList<Lecturer> lecturers=lecturerJdbcDaoSupport.listLecturers();\n\t\tfor (Lecturer record : lecturers){\n\t\t\tactualEmails.add(record.getEmail());\n\t\t}\n\t\t//Compare both ArrayLists\n\t\tassertEquals(expectedEmails,actualEmails);\n}", "public static void testLivre() throws DaoException {\r\n\r\n LivreDao livreDao = LivreDaoImpl.getInstance();\r\n\r\n List<Livre> list = new ArrayList<Livre>();\r\n list = livreDao.getList();\r\n System.out.println(\"Book list: \" + list);\r\n\r\n Livre livreByID = new Livre();\r\n livreByID = livreDao.getById(4);\r\n System.out.println(\"\\n Book by ID: \" + livreByID);\r\n\r\n int id_book = livreDao.create(\"My Book\", \"My Autor\", \"123456\");\r\n System.out.println(\"\\n New book id : \" + id_book);\r\n Livre livreByID2 = new Livre();\r\n livreByID2 = livreDao.getById(id_book);\r\n System.out.println(\"\\n Book by ID: \" + livreByID2);\r\n\r\n Livre test = new Livre(id_book, \"My Book 2\", \"My Autor 2\", \"123456\");\r\n livreDao.update(test);\r\n list = livreDao.getList();\r\n System.out.println(\"\\n Book list: \" + list);\r\n\r\n livreDao.delete(id_book);\r\n list = livreDao.getList();\r\n System.out.println(\"\\n Book list updated : \" + list);\r\n\r\n int numerOfBooks = livreDao.count();\r\n System.out.println(\"\\n Total number of books in DB: \" + numerOfBooks);\r\n\r\n }", "public ArrayList<Transaction> isRenting(){\n ArrayList<Transaction> renting= new ArrayList<Transaction>();\n for(int i=0;i< Library.Transactions.size();i++){\n //transaction book title equals the book returning\n if((Library.Transactions.get(i).getUsername().equals(this.getUserName()))&&(Library.Transactions.get(i).getReturndate()==null)){\n renting.add(Library.Transactions.get(i));\n }\n }\n return renting;\n\t}", "ObservableList<Revenue> getRevenueList();", "@Test\n\tpublic void testListReservationsOfFacilityEqualInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tlistStart, listEnd);\n\n\t\t// should find above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(1, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t}", "void fetchForRentHousesData();", "@Override\n\tpublic List<Rental> getRentals() {\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void testScheduleInterviewList() throws Exception {\r\n\t\tList<Candidate> candidateList = new ArrayList<Candidate>();\r\n\t\tCandidate candidate = getCandidateObj();\r\n\t\tcandidate.setInterview(getInterview());\r\n\t\tcandidateList.add(candidate);\r\n\r\n\t\tList<ShowCandidateDTO> showCandidateList = new ArrayList<ShowCandidateDTO>();\r\n\t\tshowCandidateList.add(getShowCandidateDTO());\r\n\r\n\t\twhen(candidateRepository.scheduledList(anyLong())).thenReturn(candidateList);\r\n\t\twhen(interviewerService.scheduledList(anyLong())).thenReturn(showCandidateList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/scheduledInterviewListforInterview/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}", "public Reservation makeReservation(Reservation trailRes){\n //Using a for each loop to chekc to see if a reservation can be made or not\n if(trailRes.getName().equals(\"\")) {\n System.out.println(\"Not a valid name\");\n return null;\n }\n \n \n for(Reservation r: listR){\n if(trailRes.getReservationTime() == r.getReservationTime()){\n System.out.println(\"Could not make the Reservation\");\n System.out.println(\"Reservation has already been made by someone else\");\n return null;\n }\n }\n\n //if the time slot is greater than 10 or less than 0, the reservation cannot be made\n if(trailRes.getReservationTime() > 10 || trailRes.getReservationTime() < 0){\n System.out.println(\"Time slot not available\");\n return null;\n }\n\n //check to see if the reservable list is empty or not\n if(listI.isEmpty())\n {\n System.out.println(\"No reservation available\");\n return null;\n }\n\n //find the item and fitnessValue that will most fit our reservation\n Reservable item = listI.get(0);\n int fitnessValue = item.findFitnessValue(trailRes);\n\n //loop through the table list and find the best fit for our reservation\n for(int i = 0; i < listI.size() ; i++){\n if(listI.get(i).findFitnessValue(trailRes) > fitnessValue){\n item = listI.get(i);\n fitnessValue = item.findFitnessValue(trailRes);\n }\n }\n //if we have found a table that works, then we can make our reservation\n if(fitnessValue > 0){\n //add reservation to our internal list\n //point our reservable to the appropriate reservation\n //set the reservable \n //print out the message here not using the iterator\n listR.add(trailRes);\n item.addRes(trailRes);\n trailRes.setMyReservable(item);\n System.out.println(\"Reservation made for \" + trailRes.getName() + \" at time \" + trailRes.getReservationTime() + \", \" + item.getId());\n return trailRes;\n }\n System.out.println(\"No reservation available, number of people in party may be too large\");\n return null; \n }", "@Test\n\tpublic void testListReservationsOfUserAfterInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\t// first reservation is 1 second after list end\n\t\tcal.add(Calendar.SECOND, 1);\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tdataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), reservation1StartDate,\n\t\t\t\treservation1EndDate);\n\n\t\t// should not find above reservation\n\t\tCollection<Reservation> reservationsOfUser;\n\t\treservationsOfUser = bookingManagement.listReservationsOfUser(USER_ID, listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfUser);\n\t\tassertTrue(reservationsOfUser.isEmpty());\n\t}", "@Test\n\tpublic void testfindHouseRoomWithBedsList(){\n\t\tSystem.out.println();\n\t}", "public void update() {\n\t\trl = DBManager.getReservationList();\n\t}", "@Test\n\tpublic void testListReservationsOfFacilityAfterInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\t// first reservation is 1 second after list end\n\t\tcal.add(Calendar.SECOND, 1);\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tdataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()), reservation1StartDate,\n\t\t\t\treservation1EndDate);\n\n\t\t// should not find above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertTrue(reservationsOfFacility.isEmpty());\n\t}", "private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }", "@GetMapping(\"/rent\")\n public ResultEntity<List<ItemDTO>> getAllRent()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Rent\");\n }", "@Test\n public void test3FindAll() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n List<SpecialityDTO> lista=(List<SpecialityDTO>)dao.findAll(); \n System.out.println(lista);\n assertTrue(!lista.isEmpty());\n }", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }", "@SuppressWarnings(\"unchecked\")\n @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED)\n public List<Reservations> getAll() {\n Session s = sessionFactory.getCurrentSession();\n Query hql = s.createQuery(\"From Reservations\");\n return hql.list();\n }", "@Test\n\tpublic void testReimbursementServiceFilter() {\n\t\twhen(rDAO.selectAllWhereXY(anyString(), anyInt())).thenReturn(rList);\n\t\twhen(rList.size()).thenReturn(1);\n\t\t\n\t\tassertEquals(new ReimbursementService(rDAO).getByFilter(\"reimb_status_id\", 1), rList);\n\t}", "@Ignore\n\tpublic void searchForDriversByTALPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, talPlate, false, null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, talPlate, false, null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}", "private static void fillReserveTimeList(ResultSet resultSet, List<ReserveTime> reserveTimes){\n\t\ttry {\n\t\t\twhile (resultSet.next()){\n\t\t\t\tReserveTime reserveTime = new ReserveTime();\n\t\t\t\tfillReserveTime(resultSet, reserveTime);\n\t\t\t\treserveTimes.add(reserveTime);\n\t\t\t}\n\t\t}catch(SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "@Test\r\n void getStations() {\r\n List<Station> stations = model.getStations();\r\n assertNotNull(stations);\r\n assertEquals(124, stations.size());\r\n assertEquals(stations.get(0).getName(), \"OakGrove\");\r\n assertEquals(stations.get(52).getName(), \"Prudential\");\r\n assertEquals(stations.get(123).getName(), \"Braintree\");\r\n }", "@Test\n void getAllUserRolesSuccess() {\n List<UserRoles> userRoles = genericDao.getAll();\n //assert that you get back the right number of results assuming nothing alters the table\n assertEquals(6, userRoles.size());//\n log.info(\"get all userRoles test: all userRoles;\" + genericDao.getAll());\n }", "@Test\r\n\t\tpublic void readANonExistingRouteFatherList(){\r\n\t\t\trouteFatherDAO.delete(this.routeFather);\r\n\t\t\tList<RouteFather> routeFathers = routeFatherDAO.read();\r\n\t\t\tAssert.assertTrue(\"it should returns empty list\", routeFathers.isEmpty());\r\n\t\t}", "Collection<Reservation> getReservations() throws DataAccessException;", "public void readReservationList() {\n\n\t\tif (rList.size() == 0) {\n\t\t\tSystem.out.println(\"No reservations available!\");\n\t\t} else{\n\t\t\tSystem.out.println(\"\\nDisplaying Reservation List: \\n\");\n\t\t\tSystem.out.format(\"%-20s%-15s%-15s%-15s%-20s%-35s%-25s%-25s%-15s\\n\", \"Reservation No.\", \"Guest ID\", \"Num Adult\",\n\t\t\t\t\t\"Num Kid\", \"Room No.\", \"Reservation Status\", \"Check in\", \"Check out\", \"Reservation time\");\n\n\t\t\tfor (Reservation r : rList) {\n\t\t\t\tSystem.out.format(\"%-20d%-15s%-15s%-15s%-20s%-35s%-25s%-25s%-15.8s\\n\", r.getResvNo(), r.getGuestID(),\n\t\t\t\t\t\tr.getAdultNo(), r.getKidNo(), r.getRoomNo(), r.getResvStatus(), r.getDateCheckIn(), r.getDateCheckOut(),\n\t\t\t\t\t\tr.getResvTime());\n\t\t\t}\n\t\t}\n\t}", "public List<Resident> getAllResidents();", "@Test\n\t// @Disabled\n\tvoid testViewAllCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tom\", \"son\", \"951771122\", \"tom@gmail.com\");\n\t\tCustomer customer2 = new Customer(2, \"jerry\", \"lee\", \"951998122\", \"jerry@gmail.com\");\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tcustomerList.add(customer2);\n\t\tMockito.when(custRep.findAll()).thenReturn(customerList);\n\t\tList<Customer> customer = custService.findAllCustomer();\n\t\tassertEquals(2, customer.size());\n\t}", "List<Receipt> getAllReceipts() throws DbException;", "@Test\n public void userRanking() {\n List<ATrip> trips = new ArrayList<ATrip>();\n ATrip trip = new ATrip();\n trip.setDriverid(DRIVER_ID);\n trip.setPassengerid(PASSENGER_ID);\n trip.setTripid(TRIP_ID);\n trip.setStatus(2);\n trip.setStartdate(1);\n trip.setEnddate(10);\n trips.add(trip);\n\n ATrip trip2 = new ATrip();\n trip2.setDriverid(DRIVER_ID);\n trip2.setPassengerid(PASSENGER_ID_2);\n trip2.setTripid(TRIP_ID2);\n trip2.setStatus(2);\n trip2.setStartdate(1);\n trip2.setEnddate(10);\n trips.add(trip2);\n\n ATrip trip3 = new ATrip();\n trip3.setDriverid(DRIVER_ID);\n trip3.setPassengerid(NONEXISTING_PASSENGER_ID);\n trip3.setTripid(TRIP_ID3);\n trip3.setStatus(1);\n trip3.setStartdate(2);\n trip3.setEnddate(9);\n trips.add(trip3);\n\n ArrayList<String> result = new ArrayList<String>();\n result.add(\"1;\" + 1);\n result.add(\"2;\" + 1);\n result.add(\"3;\" + 2);\n result.add(\"4;\" + 2);\n result.add(\"5;\" + 1);\n result.add(\"6;\" + 1);\n\n List<ATripRepository.userTripRanking> response = repo.getUserRankings(0, 10, trips, \"Passenger\");\n\n assertEquals(result.size(), response.size());\n }", "@Test\n void testWriteBoughtItemsList() {\n testWriter.write(list);\n testWriter.close();\n\n // now read them back in and verify that the accounts have the expected values\n try {\n List<Item> items = Reader.readItems(new File(TEST_FILE));\n Item numberOne = items.get(0);\n assertEquals(\"Milk\", numberOne.getName());\n assertEquals(5.99, numberOne.getPrice());\n\n Item numberTwo = items.get(1);\n assertEquals(\"Chicken Dinner\", numberTwo.getName());\n assertEquals(9.99, numberTwo.getPrice());\n\n double budget = Reader.readBudget(new File(TEST_FILE));\n assertEquals(1000, budget);\n } catch (IOException e) {\n fail(\"IOException should not have been thrown\");\n } catch (StringLengthZero | LessThanZeroE stringLengthZero) {\n stringLengthZero.printStackTrace();\n }\n\n\n }", "@Override\n\tpublic List<BookVO> randomList() {\n\t\tList<BookVO> randomList =bookDAO.randomList();\n\t\treturn randomList;\n\t}", "@Test\n public void testPostedApartmentList() throws SQLException {\n System.out.println(\"postedApartmentList\");\n String username = \"hello13\";\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.postedApartmentList(username);\n assertTrue(result.next());\n }", "@Test\n public void getRecipeByID_CorrectInformation(){\n int returned = testDatabase.addRecipe(testRecipe);\n Recipe retrieved = testDatabase.getRecipe(returned);\n assertEquals(\"getRecipeByID - Correct Title\", recipeTitle, retrieved.getTitle());\n assertEquals(\"getRecipeByID - Correct Servings\", 1, retrieved.getServings(), 0);\n assertEquals(\"getRecipeByID - Correct Prep Time\", 30, retrieved.getPrep_time(), 0);\n assertEquals(\"getRecipeByID - Correct Total Time\", 60, retrieved.getTotal_time(), 0);\n assertEquals(\"getRecipeByID - Correct Favorited\", false, retrieved.getFavorited());\n assertEquals(\"getRecipeByID - Ingredient Unit\", \"cups\", retrieved.getIngredientList().get(0).getUnit());\n assertEquals(\"getRecipeByID - Ingredient Quantity\", 2.0, retrieved.getIngredientList().get(0).getQuantity(), 0);\n assertEquals(\"getRecipeByID - Ingredient Details\", \"White Flour\", retrieved.getIngredientList().get(0).getDetails());\n assertEquals(\"getRecipeByID - First Direction Number\", 1, retrieved.getDirectionsList().get(0).getDirectionNumber());\n assertEquals(\"getRecipeByID - First Direction Text\", \"TestDirection1\", retrieved.getDirectionsList().get(0).getDirectionText());\n assertEquals(\"getRecipeByID - Second Direction Number\", 2, retrieved.getDirectionsList().get(1).getDirectionNumber());\n assertEquals(\"getRecipeByID - Second Direction Text\", \"TestDirection2\", retrieved.getDirectionsList().get(1).getDirectionText());\n }", "public List<Reimburse> getAllReimbursements();", "@Test\n public void testGetApartmentDetails() throws SQLException {\n System.out.println(\"getApartmentDetails\");\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getApartmentDetails(apartmentid);\n assertTrue(result.next());\n \n }", "public static void myReservations(String p, ArrayList<Reservation> rTable) {\n\t\tSystem.out.println(\"Reservations of passenger \" + p + \":\" );\n\t\tfor(int i = 0; i < rTable.size(); i++){\n\t\t\tif(rTable.get(i).seatOwner() == p){\n\t\t\t\tSystem.out.println(rTable.get(i));\n\t\t\t}\n\t\t}\n\t}", "public returnRentedItems() {\n rents = RentingSystemRunner.DB.getRents(RentingSystemRunner.wc.C.getPersonID());\n initComponents();\n rents.stream().forEach((r) -> {\n this.rentedItemListSelection.addItem(new comboItem(r.getRentID(), r.getItem().getItemName() + \" \" + r.getItem().getItemModel()));\n });\n this.setVisible(true);\n }", "@Test\n\tpublic void testGetListPersons_thenReturnListOfPersons() {\n\t\t// GIVEN\n\t\tPerson personJohnBoyd = new Person(\"John\", \"Boyd\", \"1509 Culver St\", \"Culver\", \"97451\", \"841-874-6512\",\n\t\t\t\t\"jaboyd@email.com\");\n\t\twhen(personDAOMock.getPersons()).thenReturn(mockList);\n\t\t// WHEN\n\t\tList<Person> resultListgetted = personServiceTest.getListPersons();\n\t\t// THEN\n\t\tassertEquals(personJohnBoyd, resultListgetted.get(0));\n\t\t// the list contain 4 elements\n\t\tassertEquals(4, resultListgetted.size());\n\t}", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "@Test\n public void test_getBillByItem() {\n List<Bill> resultTwo = billManageServiceImpl.getBillByItem(\"0\");\n Assert.assertNotNull(resultTwo);\n// Assert.assertNull(resultOne);\n }", "List<Bill> findBillsForReservation(long reservationId);", "@Test\n\tpublic void searchForDriversByWillowPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, willowPlate, true,null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, willowPlate, true,null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}", "int searchYardList() throws DAOException;" ]
[ "0.67192084", "0.6453253", "0.6318118", "0.60396427", "0.5975838", "0.593367", "0.5909683", "0.58425856", "0.58253187", "0.57936084", "0.5741169", "0.57236624", "0.569869", "0.5688129", "0.56807905", "0.56776077", "0.5663094", "0.5639663", "0.563141", "0.56235653", "0.56000924", "0.55621934", "0.5559828", "0.5545847", "0.5523224", "0.55195504", "0.55019355", "0.55006194", "0.5492783", "0.54832745", "0.54772174", "0.54727983", "0.5471645", "0.545105", "0.5442437", "0.54410994", "0.54399484", "0.5437462", "0.5435558", "0.5412891", "0.54016244", "0.53671664", "0.53639", "0.5353844", "0.53512615", "0.5346257", "0.53419536", "0.5341513", "0.53405935", "0.53327703", "0.5329553", "0.5320419", "0.53038234", "0.5291903", "0.5291622", "0.5287708", "0.5273149", "0.5270825", "0.52647233", "0.5251596", "0.5248592", "0.52425206", "0.5239913", "0.5239335", "0.5233779", "0.52330625", "0.52320176", "0.52294105", "0.5227988", "0.52185553", "0.5218149", "0.5214564", "0.52095973", "0.5207783", "0.5205117", "0.5204125", "0.52041215", "0.5203791", "0.5198132", "0.5196454", "0.5193715", "0.5181751", "0.51806253", "0.51790637", "0.517655", "0.5175492", "0.5175424", "0.5170934", "0.5161643", "0.5161552", "0.5158267", "0.51577806", "0.5153054", "0.51510376", "0.51438457", "0.5143322", "0.5139226", "0.51356715", "0.5135121", "0.5134059" ]
0.67856437
0
Test of getReserveResult method, of class ReserveDB.
@Test public void testGetReserveResult() { System.out.println("getReserveResult"); ReserveInfo reserveInfo = new ReserveInfo(); reserveInfo.setGuestIDnumber("test"); reserveInfo.setResult(true); BookingController instance = new BookingController(); boolean expResult = false; boolean result = instance.getReserveResult(reserveInfo); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }", "@Test\r\n public void testReserveSlot() {\r\n System.out.println(\"reserveSlot\");\r\n Table instance = new Table(\"S\",2);\r\n boolean expResult = true;\r\n boolean result = instance.reserveSlot();\r\n assertEquals(expResult, result);\r\n \r\n }", "@Override\n\tpublic boolean getReserveResults() {\n\t\treturn model.getReserveResults();\n\t}", "GICLClaimReserve getClaimReserve(Integer claimId, Integer itemNo, Integer perilCd) throws SQLException;", "public Reserve getReserve() {\n return reserve;\n }", "@Test\n\tpublic void testGetReservation() throws ReservationNotFoundException {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tReservation res2 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\n\t\tassertNotNull(res1.getId());\n\t\tassertNotNull(res2.getId());\n\n\t\t// Check if second reservation is returned\n\t\tReservation res2Result = bookingManagement.getReservation(res2.getId());\n\t\tassertNotNull(res2Result);\n\t\tassertEquals(res2, res2Result);\n\t}", "@Override\n\tpublic boolean isReserveResults() {\n\t\treturn model.isReserveResults();\n\t}", "@Test\n @DisplayName(\"Testataan kaikkien tilausten haku\")\n void getAllReservations() {\n assertEquals(0, reservationsDao.getAllReservations().size());\n\n TablesEntity table1 = new TablesEntity();\n table1.setSeats(2);\n tablesDao.createTable(table1);\n // Test that returns the same number as created reservations\n ReservationsEntity firstReservation = new ReservationsEntity(\"amal\",\"46111222\", new Date(System.currentTimeMillis()), table1.getId(),new Time(1000),new Time(2000));\n reservationsDao.createReservation(firstReservation);\n\n TablesEntity table2 = new TablesEntity();\n table2.setSeats(2);\n tablesDao.createTable(table2);\n reservationsDao.createReservation(new ReservationsEntity(\"juho\", \"46555444\", new Date(System.currentTimeMillis()), table2.getId(), new Time(1000),new Time(2000)));\n\n List<ReservationsEntity> reservations = reservationsDao.getAllReservations();\n assertEquals(2, reservations.size());\n assertEquals(firstReservation, reservations.get(0));\n }", "@Test\n public void testReservationFactoryGetReservation() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n assertEquals(CUSTOMER_NAME, reservationController.getReservation(1).getCustomer().getName());\n assertEquals(CUSTOMER_CONTACT, reservationController.getReservation(1).getCustomer().getContactNo());\n assertEquals(1, reservationController.getReservation(1).getTable().getTableId());\n assertEquals(2, reservationController.getReservation(1).getTable().getNumSeats());\n assertEquals(date, reservationController.getReservation(1).getReservationDate());\n }", "@Override\n\tpublic int selectReserveCount() {\n\t\treturn dgCallServiceMapper.selectReserveCount();\n\t}", "@Test\n public void testReservationFactoryTableOccupied() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n assertEquals(1, table.getTableId());\n assertEquals(2, table.getNumSeats());\n assertEquals(TableStatus.RESERVED, table.getStatus());\n }", "@Override\n\tpublic Reserve getReserveById(int rid) {\n\t\treturn reserveDao.getReserveById(rid);\n\t}", "@Override\r\n\tpublic ErrorCode reserveRoom(\r\n\t\t\tString guestID, String hotelName, RoomType roomType, SimpleDate checkInDate, SimpleDate checkOutDate,\r\n\t\t\tlong resID) {\n\t\tErrorAndLogMsg m = clientProxy.reserveHotel(\r\n\t\t\t\tguestID, hotelName, roomType, checkInDate, checkOutDate, \r\n\t\t\t\t(int)resID);\r\n\t\t\r\n\t\tSystem.out.print(\"RESERVE INFO:\");\r\n\t\tm.print(System.out);\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\treturn m.errorCode();\r\n\t}", "public String getReserve() {\n return reserve;\n }", "Reservation loadReservation(int id) throws DataAccessException;", "public QueryReserve(int cid, int itineraryId, String name, ReservationDatabase reservationDB, Query lastQuery,\n\t\t\t\t\t\tClientDatabase clientDB) {\n\t\tsuper(cid);\n\t\tthis.clientDB = clientDB;\n\t\tthis.itineraryId = itineraryId;\n\t\tthis.name = name;\n\t\tthis.reservationDB = reservationDB;\n\t\tthis.lastQuery = lastQuery;\n\t\tclientDB.addUndoQuery(this, cid); //TESTING\n\t}", "@Test\n public void testAddRent() {\n System.out.println(\"addRent\");\n ReserveInfo reserveInfo = new ReserveInfo();\n reserveInfo.setGuestIDnumber(\"test\");\n reserveInfo.setGuestName(\"test\");\n reserveInfo.setRentType(\"test\");\n reserveInfo.setRoomType(\"test\");\n reserveInfo.setRentDays(1);\n reserveInfo.setRemark(\"test\");\n reserveInfo.setResult(true); \n BookingController instance = new BookingController();\n boolean expResult = true;\n boolean result = instance.addRent(reserveInfo);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n public void testGetRentList() {\n System.out.println(\"getRentList\");\n ReserveInfo reserveInfo = new ReserveInfo();\n reserveInfo.setGuestName(\"test\");\n BookingController instance = new BookingController();\n boolean expResult=true;\n boolean result=false;\n if(instance.getRentList(reserveInfo).size()>0) result=true;\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n public void testGetApartmentDetails() throws SQLException {\n System.out.println(\"getApartmentDetails\");\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getApartmentDetails(apartmentid);\n assertTrue(result.next());\n \n }", "public void insertReservation(TestDto testDto) throws Exception;", "public long countAllReserveTransactions() throws MiddlewareQueryException;", "void storeReservation(Reservation reservation) throws DataAccessException;", "public void testReserveSeatsZeroHoldId(){\n TheatreTicketService ticketService = new TheatreTicketService();\n String confirmationCode = ticketService.reserveSeats(0, \"kakireddy.divya@gmail.com\");\n assertTrue(confirmationCode == null);\n }", "public static ClientReservedTime getClientReservedTime(int reserveTimeID) {\n\t\tConnection conn = DBConnection.getConnection();\n\t\tClientReservedTime clientReservedTime = new ClientReservedTime();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString command = \"SELECT \" +\n\t\t\t\t\t\" r.id AS id,\" +\n\t\t\t\t\t\" r.DAY_ID AS dayID,\" +\n\t\t\t\t\t\" r.ST_TIME AS startTime,\" +\n\t\t\t\t\t\" r.DURATION AS duration,\" +\n\t\t\t\t\t\" r.RES_CODE_ID AS reserveCode,\" +\n\t\t\t\t\t\" r.RESERVE_GR_TIME AS gregorianDate,\" +\n\t\t\t\t\t\" \t r.CLIENT_ID as clientID,\" +\n\t\t\t\t\t\" c.id AS companyID,\" +\n\t\t\t\t\t\" c.COMP_NAME AS companyName,\" +\n\t\t\t\t\t\" \t c.COVER_URL AS companyCover,\" +\n\t\t\t\t\t\" u.ID AS unitID,\" +\n\t\t\t\t\t\" u.UNIT_NAME AS unitName,\" +\n \" SUM(rs.SERVICE_PRICE) AS cost\" +\n\t\t\t\t\t\" FROM\" +\n\t\t\t\t\t\" alomonshi.reservetimes r,\" +\n\t\t\t\t\t\" alomonshi.units u,\" +\n\t\t\t\t\t\" alomonshi.companies c,\" +\n \" alomonshi.reservetimeservices rs\" +\n\t\t\t\t\t\" WHERE\" +\n\t\t\t\t\t\" r.unit_id = u.id\" +\n \" AND\" +\n \" u.comp_id = c.id\" +\n \" AND\" +\n \" r.id = rs.RES_TIME_ID\" +\n\t\t\t\t\t\" AND r.ID = \" + reserveTimeID;\n\t\t\tResultSet rs = stmt.executeQuery(command);\n\t\t\tfillSingleClientReservedTime(rs, clientReservedTime);\n\t\t}catch(SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn clientReservedTime;\n\t}", "@Test\n public void findAllTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findAll()).thenReturn(expected);\n Collection<Reservation> result = reservationService.findAll();\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }", "@Test\n\tpublic void testBook() throws Exception {\n\t\tString createdReservationID = bookingManagement.book(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tvalidStartDate, validEndDate);\n\t\t// a reservation must be returned\n\t\tassertNotNull(\"Reservation id is null\", createdReservationID);\n\t\tassertFalse(\"Reservation id is emtpy\", createdReservationID.isEmpty());\n\t\t// check if returned reservation is correct\n\t\tReservation createdReservation = bookingManagement.getReservation(createdReservationID);\n\t\tassertNotNull(\"Reservation of returned id was not found\", createdReservation);\n\n\t\tassertEquals(USER_ID, createdReservation.getBookingUserId());\n\n\t\tassertEquals(1, createdReservation.getBookedFacilityIds().size());\n\t\tassertTrue(createdReservation.getBookedFacilityIds().contains(room1.getId()));\n\t\tassertEquals(validStartDate, createdReservation.getStartTime());\n\t\tassertEquals(validEndDate, createdReservation.getEndTime());\n\t}", "@Test\n public void testBusinessClassReservationMethods() {\n \n busClassRes = new BusinessClassReservation(\"Passenger, One\", planeOneClass , true); //1A\n busClassRes.findSeat();\n\n busClassRes = new BusinessClassReservation(\"Passenger, Two\", planeOneClass, false); //1B\n busClassRes.findSeat();\n\n //firstClassRes = new FirstClassReservation(\"Passenger, Three\", planeOneClass, true); //2A\n //firstClassRes.findSeat();\n \n //firstClassRes = new FirstClassReservation(\"Passenger, Three\", planeOneClass, true); //2E\n //firstClassRes.findSeat();\n \n //firstClassRes = new FirstClassReservation(\"Passenger, Three\", planeOneClass, true); //3A\n //firstClassRes.findSeat();\n \n boolean[][] currentSeat = planeOneClass.getSeatOccupationMap();\n assertTrue(currentSeat[0][0]);\n assertTrue(currentSeat[0][1]);\n //assertTrue(currentSeat[1][0]);\n //assertTrue(currentSeat[1][5]);\n //assertTrue(currentSeat[2][0]);\n //assertTrue(currentSeat[2][5]);\n }", "@Test\n public void findByTripTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation2);\n expected.add(reservation4);\n Mockito.when(reservationDao.findByTripId(Mockito.anyLong())).thenReturn(expected);\n Collection<Reservation> result = reservationService.findByTrip(25L);\n Assert.assertEquals(result.size(), 2);\n Assert.assertTrue(result.contains(reservation2));\n Assert.assertTrue(result.contains(reservation4));\n }", "public static void test() {\n\n Reservation res1 =\n new Reservation(\n -1,\n \"Standard\",\n \"0000111\",\n Timestamp.valueOf(\"2019-06-11 16:10:00\"),\n Timestamp.valueOf(\"2019-06-15 09:00:00\"),\n \"525 W Broadway\",\n \"Vancouver\");\n ReservationsController.makeReservation(res1);\n\n RentalConfirmation rc1 =\n RentalsController.rentVehicle(res1, \"Mastercard\", \"389275920888492\", \"08/22\");\n\n System.out.println(\"Getting the rental added to the database\");\n Rental check = RentalsController.getRental(rc1.getRid());\n System.out.println(check);\n ArrayList<RentalReportCount> rentals =\n RentalsController.getDailyRentalCount(\"2019-11-20\", null, null);\n if (rentals != null && rentals.isEmpty()) {\n System.out.println(\"list is empty\");\n }\n System.out.println(rentals);\n\n RentalsController.deleteRental(rc1.getRid());\n }", "@Test\n public void testGetAdressByID() throws Exception {\n System.out.println(\"getAdressByID\");\n int adressID = 0;\n String result = instance.getAdressByID(adressID);\n assertTrue(!result.isEmpty());\n \n }", "Reservation createReservation();", "@DOpt(type=DOpt.Type.DerivedAttributeUpdater)\n @AttrRef(value=\"reservations\")\n public void doReportQuery() throws NotPossibleException, DataSourceException {\n\n QRM qrm = QRM.getInstance();\n\n // create a query to look up Reservation from the data source\n // and then populate the output attribute (reservations) with the result\n DSMBasic dsm = qrm.getDsm();\n\n //TODO: to conserve memory cache the query and only change the query parameter value(s)\n Query q = QueryToolKit.createSearchQuery(dsm, Reservation.class,\n new String[]{Reservation.AttributeName_Status},\n new Expression.Op[]{Expression.Op.MATCH},\n new Object[]{status});\n\n Map<Oid, Reservation> result = qrm.getDom().retrieveObjects(Reservation.class, q);\n\n if (result != null) {\n // update the main output data\n reservations = result.values();\n\n // update other output (if any)\n numReservations = reservations.size();\n } else {\n // no data found: reset output\n resetOutput();\n }\n }", "public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "private static void fillSingleReserveTime(ResultSet resultSet, ReserveTime reserveTime){\n\t try {\n\t while (resultSet.next()){\n\t fillReserveTime(resultSet, reserveTime);\n }\n }catch (SQLException e){\n\t Logger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception\" + e);\n }\n }", "@Test( dependsOnMethods = \"testPrintTicket_NotPaid\" )\n public void testPrintTicket() throws Exception {\n Reservation reservation = service.find( reservationId, PASSWORD );\n reservation.setPaid( reservation.getCost() );\n transaction.begin();\n em.merge( reservation );\n transaction.commit();\n\n // perform and verify\n assertNotNull( service.printETicket( reservationId, PASSWORD ) );\n }", "@Test\n public void testReservationFactoryCreate() {\n ReservationController reservationController = reservationFactory.getReservationController();\n Customer customer = new Customer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n Calendar date = Calendar.getInstance();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n Table table = tableFactory.getTableController().getTable(1);\n reservationController.addReservation(date, customer, 2, table);\n assertEquals(1, reservationController.getReservationList().size());\n }", "@Test\n public void getPlace() {\n Place result = mDbHelper.getPlace(Realm.getInstance(testConfig), \"1234\");\n\n // Check place\n Assert.assertNotNull(result);\n\n // Check place id\n Assert.assertEquals(\"1234\", result.getId());\n\n }", "@Test\n public void testScan() {\n // Choose, among the available ones, a random key as starting point for the scan transaction.\n int startScanKeyNumber = new Random().nextInt(((RiakKVClientTest.recordsToInsert) - (RiakKVClientTest.recordsToScan)));\n // Prepare a HashMap vector to store the scan transaction results.\n Vector<HashMap<String, ByteIterator>> scannedValues = new Vector<>();\n // Check whether the scan transaction is correctly performed or not.\n Assert.assertEquals(\"Scan transaction FAILED.\", OK, RiakKVClientTest.riakClient.scan(RiakKVClientTest.bucket, ((RiakKVClientTest.keyPrefix) + (Integer.toString(startScanKeyNumber))), RiakKVClientTest.recordsToScan, null, scannedValues));\n // After the scan transaction completes, compare the obtained results with the expected ones.\n for (int i = 0; i < (RiakKVClientTest.recordsToScan); i++) {\n Assert.assertEquals(\"Scan test FAILED: the current scanned key is NOT MATCHING the expected one.\", RiakKVClientTest.createExpectedHashMap((startScanKeyNumber + i)).toString(), scannedValues.get(i).toString());\n }\n }", "public int getReservationId() { return reservationId; }", "@Override\n\tpublic void setReserveResults(boolean reserveResults) {\n\t\tmodel.setReserveResults(reserveResults);\n\t}", "@Test\n public void testShowSearchedApartment() throws SQLException {\n System.out.println(\"showSearchedApartment\");\n String location = \"gokarna\";\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.showSearchedApartment(location);\n assertTrue(result.next());\n }", "@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }", "@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }", "String reserveSeats(String seatHoldId, String customerEmail) throws BookingNotAvailableException;", "public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }", "@Test\n public void findReservationBetweenTest() {\n Collection<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findReservationBetween(Mockito.any(LocalDate.class), Mockito.any(LocalDate.class)))\n .thenReturn(expected);\n Collection<Reservation> result = reservationService.findReservationsBetween(LocalDate.now().minusDays(4),\n LocalDate.now().plusDays(15));\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n Assert.assertTrue(result.contains(reservation3));\n Assert.assertTrue(result.contains(reservation4));\n }", "POGOProtos.Rpc.CombatProto.CombatPokemonProto getReservePokemon(int index);", "CurrentReservation createCurrentReservation();", "@Test\n @DisplayName(\"Testataan tilausten poisto tietokannasta\")\n void deleteReservation() {\n TablesEntity table = new TablesEntity();\n table.setSeats(2);\n tablesDao.createTable(table);\n\n ReservationsEntity reservation = new ReservationsEntity(\"Antero\", \"10073819\", new Date(System.currentTimeMillis()), table.getId(), new Time(1000), new Time(2000));\n reservationsDao.createReservation(reservation);\n\n // Confirm that the reservation is in DB\n ReservationsEntity reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(reservation, reservationFromDb);\n\n // Delete reservation and confirm that it's not in the DB\n reservationsDao.deleteReservation(reservation);\n\n reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(null, reservationFromDb);\n\n }", "@Test\r\n public void testRegister1() throws Exception {\r\n String employee_account = System.currentTimeMillis() + \"\";\r\n String employee_name = \"XiaoBo\";\r\n int department_id = 1;\r\n int position_id = 1;\r\n String password = \"admin\";\r\n int status = 1;\r\n String date = \"\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n int expResult = 1;\r\n Employee result = instance.register(employee_account, employee_name, department_id, position_id, password, status, date);\r\n assertTrue(expResult <= result.getEmployee_id());\r\n }", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\r\n public void testGetSlot() {\r\n System.out.println(\"getSlot\");\r\n int s = 0;\r\n Table instance = new Table(\"S\",2);\r\n String expResult = \"10-11\";\r\n String result = instance.getSlot(s);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void getAvailableEmployeeById() {\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n\n //creating dummy shiftlist\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n //test\n assertNotNull(availableEmployeeResource.getAvailableEmployees(new AvailableEmployee(2,\"2017-02-02\",3)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser(\"dummy3\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy3\"));\n }", "int getReservePokemonCount();", "@Test\n public void testgetPostedApartmentEndDate() throws SQLException {\n System.out.println(\"getPostedApartmentEndDate\");\n String username = \"hello13\";\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getPostedApartmentEndDate(username);\n assertTrue(result.next());\n }", "private static void fillReserveTime(ResultSet resultSet, ReserveTime reserveTime){\n\t\ttry {\n\t\t\treserveTime.setID(resultSet.getInt(1));\n\t\t\treserveTime.setUnitID(resultSet.getInt(2));\n\t\t\treserveTime.setDateID(resultSet.getInt(3));\n\t\t\treserveTime.setMiddayID(MiddayID.getByValue(resultSet.getInt(4)));\n\t\t\treserveTime.setStartTime(resultSet.getObject(5, LocalTime.class));\n\t\t\treserveTime.setDuration(resultSet.getInt(6));\n\t\t\treserveTime.setStatus(ReserveTimeStatus.getByValue(resultSet.getInt(7)));\n\t\t\treserveTime.setClientID(resultSet.getInt(8));\n\t\t\treserveTime.setResCodeID(resultSet.getString(9));\n\t\t\treserveTime.setReserveTimeGRDateTime(resultSet.getObject(10, LocalDateTime.class));\n\t\t}catch (SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "@Test\n public void testGetPurchaseCount() {\n System.out.println(\"getPurchaseCount\");\n //CashRegister instance = new CashRegister();\n //Test the inital state = should have NO items\n assertEquals(0, instance.getPurchaseCount());\n \n //now set up a test of two items\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n int expResult = 2;\n int result = instance.getPurchaseCount();\n assertEquals(expResult, result);\n }", "@Test(expected = ReservationNotFoundException.class)\n\tpublic void testDeleteReservation() throws ReservationNotFoundException {\n\t\t// TODO: add a second res that sould be let untouched\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tassertNotNull(res1.getId());\n\t\tString id = res1.getId();\n\t\tbookingManagement.deleteReservation(res1.getId());\n\n\t\tres1 = bookingManagement.getReservation(id);\n\t\tassertTrue(res1 == null);\n\t}", "public boolean reserve(int reservation) {\n int index = reservation - this.loRange;\n if (this.freeSet.get(index)) { // FREE\n this.freeSet.clear(index);\n return true;\n } else {\n return false;\n }\n }", "@Test\n public void findByCustomerTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n Mockito.when(reservationDao.findByCustomerId(Mockito.anyLong())).thenReturn(expected);\n Collection<Reservation> result = reservationService.findByCustomer(10L);\n Assert.assertEquals(result.size(), 2);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }", "public synchronized double getReservePrice(){\n \treturn reserve_price;\n }", "private static void fillClientReserveTime(ResultSet resultSet\n\t\t\t, ClientReservedTime clientReservedTime) {\n\t\ttry {\n\t\t\tclientReservedTime.setReserveTimeID(resultSet.getInt(\"id\"));\n\t\t\tclientReservedTime.setDayID(resultSet.getInt(\"dayID\"));\n\t\t\tclientReservedTime.setStartTime(resultSet.getObject(\"startTime\", LocalTime.class));\n\t\t\tclientReservedTime.setDuration(resultSet.getInt(\"duration\"));\n\t\t\tclientReservedTime.setReserveCodeID(resultSet.getString(\"reserveCode\"));\n\t\t\tclientReservedTime.setGregorianDateTime(resultSet.getObject(\"gregorianDate\", LocalDateTime.class));\n\t\t\tclientReservedTime.setClientID(resultSet.getInt(\"clientID\"));\n\t\t\tclientReservedTime.setCompanyID(resultSet.getInt(\"companyID\"));\n\t\t\tclientReservedTime.setCompanyName(resultSet.getString(\"companyName\"));\n\t\t\tclientReservedTime.setUnitID(resultSet.getInt(\"unitID\"));\n\t\t\tclientReservedTime.setUnitName(resultSet.getString(\"unitName\"));\n\t\t\tclientReservedTime.setCost(resultSet.getInt(\"cost\"));\n\t\t\tclientReservedTime.setCompanyCover(resultSet.getString(\"companyCover\"));\n\t\t\tclientReservedTime.setServices(TableReserveTimeServices\n\t\t\t\t\t.getServices(clientReservedTime.getReserveTimeID()));\n\t\t}catch (SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMonth) + \"/\" +startDay+ \"/\" + startYear;\n roomEndDate = convertMonthToDigit(endMonth) + \"/\" +endDay+ \"/\" + endYear; \n \n System.out.println(\"\\nSaving reservation\");\n System.out.println(\"roomStartDate\" + roomStartDate);\n System.out.println(\"roomEndDate:\" + roomEndDate);\n \n //Searching the reserved room number in the hotel rooms\n for(int i=0;i<selRoomCount;i++){\n for(int i2=0;i2<roomCounter;i2++){\n if(myHotel[i2].getRoomNum() == tempRooms[i]){ \n //if room number from array is equal to selected room number by guest\n System.out.println(\"Room Found:\"+tempRooms[i]); \n \n myHotel[i2].setOccupantID(guestID);\n myHotel[i2].setAvailability(false);\n myHotel[i2].setOccupant(guest[guestIndex].getName());\n myHotel[i2].setStartDate(roomStartDate);\n myHotel[i2].setEndDate(roomEndDate);\n }\n }\n }\n \n updateRoomChanges_DB(); //apply changes to the database\n \n //Updates room preference of the current guest \n String sqlstmt = \"UPDATE APP.GUEST \"\n + \" SET ROOMPREF = '\" + guest[guestIndex].getPref()\n + \"' WHERE ID = \"+ guest[guestIndex].getAccountID();\n \n CallableStatement cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n cs.close(); \n }", "public String generateResponse() {\n\t\tif (lastQuery instanceof QueryInfo) {\n\t\t\tQueryInfo itineraryQuery = (QueryInfo) lastQuery;\n\t\t\tif (itineraryId < 0 || itineraryId > itineraryQuery.getItineraries().size()) {\n\t\t\t\treturn cid + \",error,invalid id\";\n\t\t\t}\n\t\t\treserving = itineraryQuery.getItinerary(itineraryId);\n\t\t\tList<Reservation> check = reservationDB.retrieveReservations(name, reserving.getOrigin(), reserving.getDestination());\n\t\t\tif (check.size() > 0) {\n\t\t\t\treturn cid + \",error,duplicate reservation\";\n\t\t\t} else {\n\t\t\t\treservationDB.bookReservation(reserving, name);\n\t\t\t\treturn cid + \",reserve,successful\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String redo() {\n\t\tList<Reservation> check = reservationDB.retrieveReservations(name, reserving.getOrigin(), reserving.getDestination());\n\t\tif (check.size() > 0) {\n\t\t\treturn \"error,duplicate reservation\";\n\t\t} else {\n\t\t\treservationDB.bookReservation(reserving, name);\n\t\t}\n\t\tString response = cid + \",redo,reserve,\" + name + \",\" + reserving.toString();\n\t\treturn response;\n\t}", "private SiteReservation save(SiteReservation reservation){\n try {\n reservation = repo.save(reservation);\n }\n catch (RuntimeException e){\n throw new DayReservedException();\n }\n return reservation;\n }", "private void playerReserve(String promoCode, String username)\n {\n\n Reservation myReservation = new Reservation(username,reservationStartsOn,reservationEndsOn,pitch.getVenueID(),pitch.getPitchName(),promoCode);\n connectionManager.reserve(myReservation, instance);\n }", "@Test\n public void testGetPK() {\n System.out.println(\"getPK\");\n Regime instance = r1;\n int expResult = 1;\n int result = instance.getPK();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testIsAvailability() {\r\n System.out.println(\"isAvailability\");\r\n Table instance = new Table(\"s\",1);\r\n boolean expResult = true;\r\n boolean result = instance.isAvailability();\r\n assertEquals(expResult, result);\r\n \r\n }", "public PlaceReserveInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "Collection<Reservation> getReservations() throws DataAccessException;", "@Test\n\tpublic void searchForPendingLiveByUnitNbr_FuncTest(){\n\t\tpendingLiveUnit = (String)em.createNativeQuery(TestQueryConstants.READ_PENDING_LIVE_UNIT_NO).getSingleResult().toString();\n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, pendingLiveUnit, null, null, null, true,null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, pendingLiveUnit, null, null, null, true,null);\n\t\t// we get back one result\n\t\tassertEquals(1, driversCnt);\n\t\t\n\t\tif(drivers.get(0).getContractLineStartDate() != null){\n\t\t\t// that result has a start date in the future\n\t\t\tassertTrue(drivers.get(0).getContractLineStartDate().after(new Date(System.currentTimeMillis())));\n\t\t}\n\t}", "@Test\n public void testGetCoordinatesByAddressID() throws Exception {\n System.out.println(\"getCoordinatesByAddressID\");\n int adressID = 0;\n String result = instance.getCoordinatesByAddressID(adressID);\n assertTrue(!result.isEmpty());\n }", "@Test\n public void testPersonMethods() throws SQLException, InterruptedException {\n\n //Arrange\n PagingService service = new PagingService(connection);\n Person testPerson = new Person(1, \"TEST\", \"test\", \"testEmail\", \"testCountry\", \"testIpAddress\");\n\n //Act\n service.insertPerson(connection, testPerson);\n Person selectPerson = service.selectPerson(connection, 1);\n\n connection.close();\n\n //Assert\n assertThat(selectPerson.getId(), is(1));\n }", "public void insertreservationinfo(int Roomno , String checkin , String checkout , int clientid , int days , String clientname ){\n String query = \"insert into Reservation (Roomno , checkindate , checkoutdate , clientID, Days , TotalMoney ) \"\n + \"values(? , ? , ? , ? , ? ,? )\";\n \n String query2 = \" SELECT Price\"\n + \" FROM Rooms R \"\n + \" JOIN RoomType T ON T.RTID = R.RoomtypeID \"\n + \" WHERE R.Roomno = ? \";\n String query3 = \"insert into Client (CID , Name)\" \n + \"values(?,?)\" ; \n String query4 = \"Select CID from Client where CID = ? \";\n double Total_Price = 0 ;\n \n try { \n PreparedStatement Query4 = conn.prepareStatement(query4);\n Query4.setInt(1, clientid);\n ResultSet rs2 = Query4.executeQuery();\n if(!rs2.next()){\n PreparedStatement Query3 = conn.prepareStatement(query3);\n Query3.setInt(1 , clientid);\n Query3.setString(2,clientname);\n Query3.execute();}\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n try { \n String query5 = \"select Reserved from Rooms where Roomno = ?\" ; \n PreparedStatement Query5 = conn.prepareStatement(query5);\n Query5.setInt(1, Roomno);\n ResultSet rs3 = Query5.executeQuery();\n rs3.next();\n if(rs3.getBoolean(\"Reserved\") != true){\n PreparedStatement Query2 = conn.prepareStatement(query2);\n Query2.setInt(1 ,Roomno);\n ResultSet rs = Query2.executeQuery();\n rs.next();\n Total_Price = rs.getDouble(\"Price\") * days ;\n updatehotelincome(Total_Price);\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setInt(1,Roomno);\n Query.setString(2, checkin);\n Query.setString(3, checkout);\n Query.setInt(4, clientid);\n Query.setInt(5, days);\n Query.setDouble(6,Total_Price);\n Query.execute();}\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Test\n public void createTest() {\n reservationService.create(reservation1);\n Mockito.verify(reservationDao).create(reservation1);\n }", "@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "@Test\n public void testPostedApartmentList() throws SQLException {\n System.out.println(\"postedApartmentList\");\n String username = \"hello13\";\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.postedApartmentList(username);\n assertTrue(result.next());\n }", "@Test\n public void retriveAllTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n List<Servizio> lista = manager.retriveAll();\n assertEquals(7,lista.size(),\"It should return a list of length 7\");\n }", "public List<Transaction> getAllReserveTransactionsByRequestor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;", "@Test\n public void testFindEntity_Person_TimeSlot() throws Exception {\n // check whether the database is set-up as expected.\n Person p = Manager.getPersonCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", p);\n List<Allocation> pa = p.getAllocationList();\n assertFalse(\"Bad test data?\", pa.isEmpty());\n Allocation a = pa.get(0);\n Event e = a.getEvent();\n assertNotNull(\"Bad test data?\", e);\n TimeSlot t = e.getTimeSlot();\n assertNotNull(\"Bad test data?\", t);\n\n // Here is the statement that we want to test:\n Allocation result = Manager.getAllocationCollection().findEntity(p, t);\n assertNotNull(result);\n assertTrue(Objects.equals(result, a));\n\n }", "@Test(enabled = true, retryAnalyzer=RetryAnalyzer.class)\r\n\tpublic void testParkingBookingPreparationTimeAndCleanupNotConsidered() throws IOException{\r\n\t\tReporter.log(\"<span style='font-weight:bold;color:#000033'> \"\r\n\t\t\t\t+ \"C118064: Preparation and Cleanup time should not be considered while calculating Total Cost in Parking reservation\", true);\r\n\r\n\t\t int random = (int)(Math.random() * 10)+24;\r\n\t\t String date = this.getFutureDate(random);\r\n\t\t String region = \"1preRgRef\";\r\n\t\t String from = \"18:00\";\r\n\t\t String until = \"19:00\";\r\n\t\t String prakingResv = \"prePrkDefRef\";\r\n\t\t String prepTime = \"00:30\";\r\n\t\t String cleanupTime = \"00:30\";\r\n\t\t String responsible=getUserLastNameOfLoggedInUser();\r\n\r\n\t\t SoftAssert softAssert = new SoftAssert();\r\n\t\t softAssert.setMethodName(\"testParkingBookingPreparationTimeAndCleanupNotConsidered\");\r\n\t\t \r\n\t\t expandAdministration();\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t expandSubMainMenu(\"Reservation\");\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t waitAndClick(XPATH_NEWRESERVATIONS);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t //C118064\r\n\t\t setRegion(region);\r\n\t\t setDate(date);\r\n\t\t setTimeFrom(from);\r\n\t\t setTimeUntil(until);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t clickParkingTab();\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t clickSearch();\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t clickLaunchReservation(prakingResv);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t setTimePrepareFromReservationPanel(prepTime);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t setTimeCleanupFromReservationPanel(cleanupTime);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t setResponsible(responsible);\r\n\t\t waitForExtJSAjaxComplete(10);\r\n\r\n\t\t clickSummaryTab();\r\n\t\t waitForExtJSAjaxComplete(20);\r\n\r\n\t\t String getSummaryText = getItemDetailsFromReservationSummary(prakingResv);\r\n\t\t softAssert.assertTrue( getSummaryText.contains(\"1 h x 4.00 EUR\"),\"Total cost is calculated without considering Prepare/Cleanup time\");\r\n\t\t softAssert.assertTrue(getSummaryTitle().contains(\"4.04 EUR\"),\"summary title is ok before adding additional Equipment, Vehicles & Parking\");\r\n\t}", "@Test\n public void testParkingACar(){\n ParkingService parkingService = new ParkingService(inputReaderUtil, parkingSpotDAO, ticketDAO);\n parkingService.processIncomingVehicle();\n //TODO: check that a ticket is actually saved in DB and Parking table is updated with availability\n assertAll(\n () -> assertEquals(1,dataBasePrepareService.calculateTheNumberOfTicketSavedInTheDB()),\n () -> assertFalse(dataBasePrepareService.checkIfThisSpotIsAvailable(1))\n );\n }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "public JSONResponse offline(HashMap<String, String> parameters) {\n\t\tString pos = parameters.get(\"pos\"); \t\t\t\t\t// the point of sale code.\n\t\tString id = parameters.get(\"id\"); \t\t\t\t\t\t// the number of the reservation\n\t\tString quote = parameters.get(\"quote\"); \t\t\t\t// the quoted price of the reservation\n\t\tString cost = parameters.get(\"cost\"); \t\t\t\t\t// the STO cost of the reservation\n\t\tString deposit = parameters.get(\"deposit\"); \t\t\t// the deposit % to confirm the reservation\n\t\tString termsaccepted = parameters.get(\"termsaccepted\"); // true if the reservation is accepted\n\t\tString notes = parameters.get(\"notes\"); \t\t\t\t// the reservation notes\n\n\t\tif (id == null || id.isEmpty() || id.length() > 10) {throw new ServiceException(Error.reservation_id, id);}\n\n\t\tSqlSession sqlSession = RazorServer.openSession();\n\t\tReservationWidgetItem result = new ReservationWidgetItem();\n\t\ttry {\n\t\t\tParty organization = JSONService.getParty(sqlSession, pos);\n\t\t\tReservation reservation = new Reservation();\n\t\t\treservation.setOrganizationid(organization.getId());\n\t\t\treservation.setId(id);\n\t\t\treservation = sqlSession.getMapper(ReservationMapper.class).readbyorganization(reservation);\n\t\t\tif (reservation == null || !organization.hasId(reservation.getOrganizationid())) {throw new ServiceException(Error.reservation_bad, id);}\n\t\t\t//if (reservation == null) {throw new ServiceException(Error.reservation_id, id);}\n\t\t\treservation.setQuote(Double.valueOf(quote));\n\t\t\treservation.setCost(Double.valueOf(cost));\n\t\t\treservation.setDeposit(Double.valueOf(deposit));\n\t\t\treservation.setNotes(notes);\n\t\t\treservation.setState(Boolean.valueOf(termsaccepted) ? Reservation.State.Confirmed.name() : Reservation.State.Final.name());\n\t\t\tReservationService.offline(sqlSession, reservation, Boolean.valueOf(termsaccepted));\n\t\t\tresult.setOrganizationid(organization.getId());\n\t\t\tresult.setId(id);\n\t\t\tresult.setState(reservation.getState()); //TODO handle in offline.js\n\t\t}\n\t\tcatch (Throwable x) {result.setMessage(x.getMessage());}\n\t\treturn result;\n\t}", "@Test\n public void testGetLibroId() {\n System.out.println(\"getLibroId\");\n Reserva instance = new Reserva();\n long expResult = 0L;\n long result = instance.getLibroId();\n assertEquals(expResult, result);\n \n }", "protected int checkRowForAdd(GenericValue reservation, String orderId, String orderItemSeqId, String shipGroupSeqId, String productId,\n BigDecimal quantity) {\n // check to see if the reservation can hold the requested quantity amount\n String inventoryItemId = reservation.getString(\"inventoryItemId\");\n BigDecimal resQty = reservation.getBigDecimal(\"quantity\");\n VerifyPickSessionRow pickRow = this.getPickRow(orderId, orderItemSeqId, shipGroupSeqId, productId, inventoryItemId);\n\n if (pickRow == null) {\n if (resQty.compareTo(quantity) < 0) {\n return 0;\n } else {\n return 2;\n }\n } else {\n BigDecimal newQty = pickRow.getReadyToVerifyQty().add(quantity);\n if (resQty.compareTo(newQty) < 0) {\n return 0;\n } else {\n pickRow.setReadyToVerifyQty(newQty);\n return 1;\n }\n }\n }", "@Test\n\tpublic void getBookingTest() {\n\n\t\tBooking outputBooking = bookingDao.getBooking(booking.getBookingId());\n\n\t\tAssert.assertEquals(2, outputBooking.getFlightId());\n\n\t}", "public int getNoOfReservations(int userID) throws ClassNotFoundException{\n //sql statement\n String No_OF_Reservation_SQL = \"SELECT COUNT(*) as 'rcount' FROM reservation WHERE user_ID = ?\";\n\n int count=0;\n\n try(\n //initialising the database connection\n Connection conn = DatabaseConnection.connectDB();\n PreparedStatement statement = conn.prepareStatement(No_OF_Reservation_SQL);)\n { \n statement.setInt(1, userID);\n\n //executing the query and getting data\n ResultSet userdetails = statement.executeQuery(); \n\n userdetails.next();\n count = userdetails.getInt(\"rcount\");\n \n //closing the database connection\n conn.close();\n\n } catch (SQLException | ClassNotFoundException e){\n e.printStackTrace();\n } \n\n return count;\n }", "@Test\n public void testSelectSpecificRow() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID();\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertEquals(commits.getCommitID() , commitID);\n }", "@Override\r\n\tpublic void test() {\n\t\t\r\n\t\tMap<String, Object> map = new HashMap<>();\r\n\t\t\r\n\t\tcarModelMapper.queryCarModel(map);\r\n\t\tInteger count = (Integer) map.get(\"result\");\r\n\t\tSystem.out.println(count);\r\n\t}", "@Test\n public void testGetEstado() {\n System.out.println(\"getEstado\");\n Reserva instance = new Reserva();\n String expResult = \"\";\n String result = instance.getEstado();\n assertEquals(expResult, result);\n \n }", "private static void fillSingleClientReservedTime(ResultSet resultSet,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ClientReservedTime clientReservedTime) {\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tfillClientReserveTime(resultSet, clientReservedTime);\n\t\t\t}\n\t\t}catch (SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "public void bookHotelScenarioTest() throws BookHotelFault, DatatypeConfigurationException, CancelHotelFault{\n // Booking of an hotel in Paris\n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_4\", \"Tick Joachim\", \"50408824\", 2, 11);\n boolean result = bookHotel(input);\n assertEquals(true, result);\n System.out.println(\"first test result: \" + result); \n \n if(result == true){\n // Trying to get the list of hotel from Paris and we should have only one hotel because the NY hotel is already booked\n GetHotelInputType getInput = CreateGetHotelInputType(\"Paris\");\n GetHotelsOutputType getOutput = getHotels(getInput);\n int expectedNbHotels = 1;\n int resultNbHotels = 0;\n if (getOutput.getHotelInformations().isEmpty() == false){\n resultNbHotels = getOutput.getHotelInformations().size();\n } \n cancelHotel(\"booking_Hotel_4\");\n assertEquals(expectedNbHotels, resultNbHotels); \n } \n else {\n assertEquals(true, false);\n }\n }", "@Test\n public void create1Test2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(true,true,true,true,true,true,true);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }", "List<Reservierung> selectAll() throws ReservierungException;", "@Test\n public void testReservationFactory() {\n assertNotNull(reservationFactory);\n }", "@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}" ]
[ "0.6265897", "0.6227824", "0.6139199", "0.59492415", "0.5896389", "0.58608973", "0.5858692", "0.5806035", "0.57796437", "0.5672485", "0.56403226", "0.5562168", "0.55310535", "0.5519987", "0.5445944", "0.53742534", "0.5357812", "0.53544885", "0.53441817", "0.53351754", "0.53335434", "0.53333694", "0.5332772", "0.5332462", "0.53256434", "0.5324088", "0.5251265", "0.5237392", "0.52172834", "0.52085876", "0.5207413", "0.5201126", "0.51896447", "0.516995", "0.5169826", "0.51602614", "0.51535773", "0.51507074", "0.5131313", "0.5126478", "0.5113293", "0.51132107", "0.511225", "0.5106155", "0.51007307", "0.5079822", "0.50791174", "0.50731707", "0.5064667", "0.50606143", "0.50605255", "0.5057887", "0.50511736", "0.5032978", "0.5032122", "0.5023038", "0.5021141", "0.50166994", "0.50122654", "0.49944726", "0.49857855", "0.4977074", "0.49700034", "0.49685726", "0.49622717", "0.49471", "0.49462035", "0.49415928", "0.4940096", "0.49390024", "0.49363208", "0.49290052", "0.49273318", "0.49186835", "0.4918314", "0.4888807", "0.4886653", "0.4878656", "0.48774517", "0.48695487", "0.48623663", "0.48609468", "0.48600307", "0.48591816", "0.4857348", "0.48454615", "0.48417875", "0.48390144", "0.48353896", "0.48330966", "0.48309743", "0.48288426", "0.48246267", "0.48152167", "0.481314", "0.4809245", "0.47979844", "0.47868913", "0.47826484", "0.47822738" ]
0.73276097
0
Test of delete method, of class ReserveDB.
@Test public void testDelete() { System.out.println("delete"); String guestIDnumber = "test"; BookingController instance = new BookingController(); boolean expResult = true; boolean result = instance.delete(guestIDnumber); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void deleteTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.delete(1);\n Servizio servizio= manager.retriveById(1);\n assertNull(servizio,\"Should return true if delete Servizio\");\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String isbn = \"1222111131\";\r\n int expResult = 1;\r\n int result = TitleDao.delete(isbn);\r\n assertEquals(expResult, result);\r\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }", "@Test\n void deleteSuccess() {\n carDao.delete(carDao.getById(1));\n assertNull(carDao.getById(1));\n\n //Delete repairs\n GenericDao<Repair> repairDao = new GenericDao(Repair.class);\n Repair repair = repairDao.getById(2);\n assertNull(carDao.getById(2));\n\n //Delete part\n GenericDao<Part> partDao = new GenericDao(Part.class);\n Role part = partDao.getById(2);\n assertNull(partDao.getById(2));\n }", "@Test\n @DisplayName(\"Testataan tilausten poisto tietokannasta\")\n void deleteReservation() {\n TablesEntity table = new TablesEntity();\n table.setSeats(2);\n tablesDao.createTable(table);\n\n ReservationsEntity reservation = new ReservationsEntity(\"Antero\", \"10073819\", new Date(System.currentTimeMillis()), table.getId(), new Time(1000), new Time(2000));\n reservationsDao.createReservation(reservation);\n\n // Confirm that the reservation is in DB\n ReservationsEntity reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(reservation, reservationFromDb);\n\n // Delete reservation and confirm that it's not in the DB\n reservationsDao.deleteReservation(reservation);\n\n reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(null, reservationFromDb);\n\n }", "@Test\n public void deleteRecipe_Deletes(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipe(returned);\n assertEquals(\"deleteRecipe - Deletes From Database\", null, testDatabase.getRecipe(returned));\n }", "@Test(dependsOnMethods = \"update\")\n public void delete()throws Exception{\n repository.delete(id);\n OwnerRegion delete = repository.findOne(id);\n Assert.assertNull(delete);\n }", "@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }", "@Test\n public void test5Delete() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.delete(\"telecomunicaciones\"),1);\n }", "@Test\n void deleteSuccess() {\n genericDAO.delete(genericDAO.getByID(2));\n assertNull(genericDAO.getByID(2));\n }", "@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }", "@Test\n void deleteSuccess() {\n\n UserDOA userDao = new UserDOA();\n User user = userDao.getById(1);\n String orderDescription = \"February Large Test-Tshirt Delete\";\n\n Order newOrder = new Order(orderDescription, user, \"February\");\n user.addOrder(newOrder);\n\n dao.delete(newOrder);\n List<Order> orders = dao.getByPropertyLike(\"description\", \"February Large Test-Tshirt Delete\");\n assertEquals(0, orders.size());\n }", "@Test\n public void testDelete() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest = disciplineDao.selectById(resultInt);\n \n result = disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }", "private static void deleteTest(int no) {\n\t\tboolean result=new CartDao().delete(no);\r\n\t\tif(!result) System.out.println(\"deleteTest fail\");\r\n\t}", "@Test\r\n public void testDelete() throws Exception {\r\n System.out.println(\"delete\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n instance.delete(obj);\r\n try {\r\n instance.read(obj.getIdbur());\r\n fail(\"exception de record introuvable non générée\");\r\n }\r\n catch(SQLException e){}\r\n //TODO vérifier qu'on a bien une exception en cas de record parent de clé étrangère\r\n }", "@Test\n\tpublic void testDelete(){\n\t}", "@Test\n public void deleteRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipe - Returns True\",true, testDatabase.deleteRecipe(returned));\n\n }", "public void testDelete() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // delete row 1\n ServiceStateTable table = new ServiceStateTable();\n String whereClause = COL_ID + \" = ?\";\n String[] whereArgs = { String.valueOf(row1) };\n int deleted = table.delete(mTestContext, whereClause, whereArgs);\n assertEquals(1, deleted);\n\n // query verify using base db\n Cursor cursor = mBaseDb.query(TBL_SERVICE_STATE, null, null, null, null, null, null);\n assertValuesCursor(row2, values2, cursor);\n cursor.close();\n }", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "@Test\n @Ignore\n public void testDelete_Identifier() 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(identifier);\n assertFalse(instance.exists(identifier));\n }", "public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testDelete()throws Exception {\n System.out.println(\"delete\");\n String query= \"delete from librarian where id=?\";\n int id = 15;\n int expResult = 0;\n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n when(mockPs.executeUpdate()).thenReturn(1);\n int result = mockLibrarian.delete(id);\n assertEquals(result>0 , true);\n \n \n }", "@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }", "public void testDelete() {\r\n Dao dao = new DaoTag();\r\n Tag tag = new Tag(\"50798,6874,visceral,1273666358\");\r\n assertTrue(dao.delete(tag));\r\n }", "@Test\n public void testDelete() throws Exception {\n System.out.println(\"delete\");\n Connection con = ConnexionMySQL.newConnexion();\n int size = Inscription.size(con);\n Timestamp timestamp = stringToTimestamp(\"2020/01/17 08:40:00\");\n Inscription result = Inscription.create(con, \"toto@gmail.com\", timestamp);\n assertEquals(size + 1, Inscription.size(con));\n result.delete(con);\n assertEquals(size, Inscription.size(con));\n }", "@Test\n public void delete() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(2, 0, 6, \"GUI\");\n Student s2 = new Student(2,221, \"Pop Ion\",\"pop.ion@gmail.com\",\"prof\");\n Nota n2 = new Nota(2,2,\"prof\", 3, \"cv\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repot.delete(2);\n repo.delete(2);\n repon.delete(\"22\");\n assert repo.size() == 1;\n assert repot.size() == 1;\n assert repon.size() == 1;\n }\n catch (ValidationException e){\n }\n }", "@Test\n\tpublic void testDelete() {\n\t\t\n\t\tLong id = 4L;\n\t\tString cpr = \"271190-0000\";\n\t\tint kr = 100;\n\t\tString dato = \"01-01-2001\";\n\t\tString type = \"type2\";\n\n\t\tYdelse y = new Ydelse(id, cpr, kr, dato, type);\n\t\t\n\t\tdoReturn(y).when(entityManager).getReference(y.getClass(), y.getId());\n\t\t\n\t\tydelseService.delete(y.getClass(), id);\n\t}", "@Test\n public void deleteDoctor() {\n\t\tList<Doctor> doctors = drepository.findByName(\"Katri Halonen\");\n\t\tassertThat(doctors).hasSize(1);\n \tdrepository.deleteById((long) 3);\n \tdoctors = drepository.findByName(\"Katri Halonen\");\n \tassertThat(doctors).hasSize(0);\n }", "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String doc = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.delete(doc);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testDelete() {\r\n\r\n\t\ttry {\r\n\t\t\tlong count, newCount, diff = 0;\r\n\t\t\tcount = levelOfCourtService.getCount();\r\n\t\t\tLevelOfCourt levelOfCourt = (LevelOfCourt) levelOfCourtTestDataFactory\r\n\t\t\t\t\t.loadOneRecord();\r\n\t\t\tlevelOfCourtService.delete(levelOfCourt);\r\n\t\t\tnewCount = levelOfCourtService.getCount();\r\n\t\t\tdiff = newCount - count;\r\n\t\t\tassertEquals(diff, 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void shouldDeleteTheRoomIfTheIndexIsFoundInTheDatabase()\n\t throws Exception {\n\n\tfinal DeleteRoomCommand command = new DeleteRoomCommand(validRoomOffer);\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, builder, null, null);\n\n\twhen(dao.read(validRoomOffer.getIndex())).thenReturn(validRoomOffer);\n\n\tfinal int deletedRoomIndex = roomOfferService.deleteRoomOffer(command);\n\n\tverify(dao).lock(anyInt());\n\tverify(dao).unlock(anyInt(), anyLong());\n\tverify(dao).delete(eq(validRoomOffer.getIndex()), anyLong());\n\tassertThat(deletedRoomIndex, is(equalTo(deletedRoomIndex)));\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testDelete() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/tec_dump.xml.smalltest\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(10, mi.getNodeDao().countAll());\n }", "@Test\r\n\tpublic void testDelete() {\n\t\tint todos = modelo.getAll().size();\r\n\r\n\t\tassertTrue(modelo.delete(1));\r\n\r\n\t\t// comprobar que este borrado\r\n\t\tassertNull(modelo.getById(1));\r\n\r\n\t\t// borrar un registro que no existe\r\n\t\tassertFalse(modelo.delete(13));\r\n\t\tassertNull(modelo.getById(13));\r\n\r\n\t\tassertEquals(\"debemos tener un registro menos\", (todos - 1), modelo\r\n\t\t\t\t.getAll().size());\r\n\r\n\t}", "@Test\n void delete() {\n }", "@Test\n void delete() {\n }", "@Test\n public void deleteRecipeIngredient_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeIngredient - Returns True\",true, testDatabase.deleteRecipeIngredients(returned));\n }", "@Test\r\n public void testDelete() throws Exception {\r\n bank.removePerson(p2);\r\n assertEquals(bank.viewAllPersons().size(), 1);\r\n assertEquals(bank.viewAllAccounts().size(), 1);\r\n }", "@SmallTest\n public void testDelete() {\n int result = -1;\n if (this.entity != null) {\n result = (int) this.adapter.remove(this.entity.getId());\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n public void deleteRecipeIngredient_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedIngredient = testDatabase.addRecipeIngredient(recipeIngredient);\n testDatabase.deleteRecipeIngredients(returnedIngredient);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n boolean deleted = true;\n if(allIngredients != null){\n for(int i = 0; i < allIngredients.size(); i++){\n if(allIngredients.get(i).getIngredientID() == returnedIngredient){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeIngredient - Deletes From Database\", true, deleted);\n }", "@Test\n @Order(17)\n void TC_UTENTE_DAO_5()\n {\n UtenteDAO utenteDAO= new UtenteDAO();\n assertThrows(RuntimeException.class,()->utenteDAO.delete(null));\n }", "@Test\n void testDeleteCity() {\n CityList cityList = mockCityList();\n cityList.delete(mockCity());\n\n assertFalse(cityList.hasCity(mockCity()));\n assertTrue(cityList.countCities() == 0);\n\n }", "@Test\n public void testDeleteTravel() throws Exception{\n \n doNothing().when(databaseMock).deleteTravel(anyInt());\n \n mockMVC.perform(delete(\"/user/1/travel/1\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isNoContent());\n \n verify(databaseMock, times(1)).getUser(1);\n verify(databaseMock, times(1)).deleteTravel(1);\n verifyNoMoreInteractions(databaseMock);\n }", "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n Comment instance = new Comment(\"Test Komment 2\", testCommentable, testAuthor);\n instance.delete();\n \n assertFalse(testCommentable.getComments().contains(instance));\n assertFalse(testAuthor.getCreatedComments().contains(instance));\n assertTrue(instance.isMarkedForDeletion());\n assertFalse(Database.getInstance().getComments().contains(instance));\n }", "@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }", "@Test\r\n\tvoid DeleteProductByID() throws SQLException {\r\n\t\tString IDExistentInDB = \"d228b297-f4a2-4a91-823d-317c3926def8\";\r\n\r\n\t\tProductRepository repo = new ProductRepository();\r\n\t\tint productDelete = repo.deleteProduct(IDExistentInDB);\r\n\r\n\t\tAssertions.assertEquals(1, productDelete, \"The Product has not been deleted\");\r\n\t}", "@Test\n\t@DatabaseSetup(value = \"classpath:databaseEntries.xml\", type = DatabaseOperation.CLEAN_INSERT)\n\tpublic void testDeleteLecturer() {\n\t\t\n\t\t//Confirm table row count\n\t\tlecturerJdbcDaoSupport = (LecturerJdbcDaoSupport) autoWireContext.getBean(\"lecturerJdbcDaoSupport\");\n\t\tlecturerJdbcDaoSupport.deleteLecturer(\"L001\");\n\t\tint rowCount = lecturerJdbcDaoSupport.countRows();\n\t\tassertEquals(2, rowCount);\n\t}", "@Test\n public void deleteRecipeDirections_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeDirections - Returns True\",true, testDatabase.deleteRecipeDirections(returned));\n }", "@Test\n public void deleteId() throws Exception {\n Role role = create(new Role(\"roleName\"));\n\n //Attempt to remove from the database with delete request\n try {\n mvc.perform(MockMvcRequestBuilders.delete(\"/auth/roles/{id}\", UUIDUtil.UUIDToNumberString(role.getUuid()))\n .header(\"Authorization\", authPair[0])\n .header(\"Function\", authPair[1])\n )\n .andExpect(status().isOk());\n } catch (Exception e) {\n remove(role.getUuid());\n throw e;\n }\n\n //Check if successfully removed from database\n try {\n //Remove from database (above get function should have thrown an error if the object was no longer in the database)\n remove(role.getUuid());\n fail(\"DELETE request did not succesfully delete the object from the database\");\n } catch (ObjectNotFoundException e) {\n //Nothing because the object is no longer present in the database which is expected\n }\n }", "@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test\n\t public void testDelete(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(user);\n\t\t\t\tuserDao.delete(user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }", "void delete ( int id ) throws DAOException;", "@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }", "private Delete() {}", "private Delete() {}", "@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}", "@Test\n final void testDeleteDevice() {\n when(deviceDao.deleteDevice(user, DeviceFixture.SERIAL_NUMBER)).thenReturn(Long.valueOf(1));\n ResponseEntity<String> response = deviceController.deleteDevice(DeviceFixture.SERIAL_NUMBER);\n assertEquals(200, response.getStatusCodeValue());\n assertEquals(\"Device with serial number 1 deleted\", response.getBody());\n }", "@Test\r\n\tpublic void testDeleteById() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tfor (E e : entities) {\r\n\t\t\tInteger id = supplyId(e);\r\n\t\t\tdao.deleteById(id);\r\n\t\t\tE read = dao.read(id);\r\n\t\t\tassertNull(read);\r\n\t\t}\r\n\t}", "public void testRemove() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\t\t\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tmodelDS.remove(service.getId()); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT count(*) FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tint expected = 0;\r\n\t\tif (rs.next())\r\n\t\t\texpected = rs.getInt(1);\r\n\t\tassertEquals(expected, 0);\r\n\t}", "@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }", "@Test\n @Order(18)\n void TC_UTENTE_DAO_6()\n {\n UtenteDAO utenteDAO= new UtenteDAO();\n String username=\"utenteTest1\";\n assertTrue(utenteDAO.delete(username));\n }", "@Test\n public void testDeleteTravel_RecordNotFoundExceptionDeleteTravel() throws Exception {\n doThrow(new RecordNotFoundException()).when(databaseMock).deleteTravel(anyInt());\n \n mockMVC.perform(delete(\"/user/1/travel/1\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isNotFound());\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verify(databaseMock, times(1)).deleteTravel(anyInt());\n verifyNoMoreInteractions(databaseMock);\n }", "@Test\n void deleteItem() {\n }", "public abstract boolean delete(long arg, Connection conn) throws DeleteException;", "@Test\n public void shouldDeleteAllDataInDatabase(){\n }", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "@Test\n public void testRemoveNegativeNonExistingId() throws Exception{\n Assert.assertFalse(itemDao.delete(\"non existing item\"));\n }", "@org.junit.Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String emailid = \"dnv3@gmail.com\";\r\n ContactDao instance = new ContactDao();\r\n List<ContactResponse> expResult = new ArrayList<ContactResponse>();\r\n ContactResponse c = new ContactResponse(\"Contact Deleted\");\r\n expResult.add(c);\r\n List<ContactResponse> result = instance.delete(emailid);\r\n String s=\"No such contact ID found\";\r\n if(!result.get(0).getMessage().equals(s))\r\n assertEquals(expResult.get(0).getMessage(), result.get(0).getMessage());\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\r\n public void testdeleteCustomer() throws Exception {\r\n List<Server.Customer> lesClients = DAOCustomer.loadCustomer(Con());\r\n DAOCustomer.deleteCustomer(Con(),2);\r\n List<Server.Customer> r = DAOCustomer.loadCustomer(Con());\r\n assertEquals(lesClients.size()-1 , r.size());\r\n \r\n \r\n }", "void deleteReservation(int id) throws DataAccessException;", "@Test\n public void deleteIngredient_ReturnsFalse(){\n assertEquals(\"deleteIngredient - Returns False\",false, testDatabase.deleteIngredient(Integer.MAX_VALUE));\n }", "void delete(int id) throws Exception;", "@Test\n\tvoid testDeletePlant() {\n\t\tList<Plant> plant = service.deletePlant(50);\n\t\tassertFalse(plant.isEmpty());\n\t}", "protected abstract void doDelete();", "@Test\n public void testDeleteProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n doNothing().when(productRepository).delete(product);\n\n testResponseData(RequestInfo.builder()\n .request(delete(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "public void testDelete() {\n TDelete_Return[] PriceLists_delete_out = priceListService.delete(new String[] { path + alias });\n\n // test if deletion was successful\n assertEquals(\"delete result set\", 1, PriceLists_delete_out.length);\n\n TDelete_Return PriceList_delete_out = PriceLists_delete_out[0];\n\n assertNoError(PriceList_delete_out.getError());\n\n assertEquals(\"deleted?\", true, PriceList_delete_out.getDeleted());\n }", "@Test\r\n public void testDeleteById() {\r\n System.out.println(\"deleteById\");\r\n int id = 0;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent expResult = null;\r\n Abonent result = instance.deleteById(id);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void foodDeletedGoesAway() throws Exception {\n createFood();\n // locate the food item\n\n // delete the food item\n\n // check that food item no longer locatable\n\n }", "@Test\n void testDelete_incorrectId() {\n assertThrows(NotFoundException.class, () -> propertyInfoDao.delete(\"randomString\"));\n }", "public int deleteByDesc(String description) throws DataAccessException;", "@Test\n public void deleteItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Delete the Item from the database using the Item API method\n service.removeItem(item.getItem_id());\n\n // Test the deleteItem() method\n verify(itemDao, times(1)).deleteItem(integerArgumentCaptor.getValue());\n TestCase.assertEquals(item.getItem_id(), integerArgumentCaptor.getValue().intValue());\n }", "@Test(expected = ReservationNotFoundException.class)\n\tpublic void testDeleteReservation() throws ReservationNotFoundException {\n\t\t// TODO: add a second res that sould be let untouched\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tassertNotNull(res1.getId());\n\t\tString id = res1.getId();\n\t\tbookingManagement.deleteReservation(res1.getId());\n\n\t\tres1 = bookingManagement.getReservation(id);\n\t\tassertTrue(res1 == null);\n\t}", "@Test\n @Prepare(autoImport = true, autoClearExistsData = true)\n public void testdeleteById() throws Exception {\n\n int[] ids = { 111123456, 111123457, 111123458, 111123459 };\n for (int id : ids) {\n inventoryOutDao.deleteById(id);\n }\n for (int id : ids) {\n assertNull(inventoryOutDao.getById(id));\n }\n\n // List<InventoryOutDO> list = inventoryOutDao.list(new\n // InventoryOutDO());\n // assertResultListSorted(list, \"id\");\n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "@Test\n public void testDeleteTravel_DataAccessExceptionDeleteTravel() throws Exception {\n doThrow(new DataAccessException(\"\")).when(databaseMock).deleteTravel(anyInt());\n \n mockMVC.perform(delete(\"/user/1/travel/1\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isInternalServerError());\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verify(databaseMock, times(1)).deleteTravel(anyInt());\n verifyNoMoreInteractions(databaseMock);\n }", "@Test\n\t public void testDeleteEntity(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(entityManager.getReference(Users.class,\n\t\t\t \t \t\tuser.getLoginName()));\n\t\t\t\tuserDao.delete(user.getLoginName(),user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }", "@Test\n public void testExclui() {\n System.out.println(\"exclui\");\n Object obj = null;\n AdministradorDAO instance = new AdministradorDAO();\n instance.exclui(obj);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDeleteVehicleById() {\n //Arrange\n Vehicle vehicle = new Vehicle();\n Model model = new Model();\n Make make = new Make();\n \n make.setMakeName(\"Ford\");\n \n Make createdMake = makeDao.addMake(make);\n \n model.setModelName(\"Explorer\");\n model.setMake(createdMake);\n \n Model createdModel = modelDao.addModel(model);\n \n vehicle.setYear(2018);\n vehicle.setTransmission(\"Automatic\");\n vehicle.setMileage(1000);\n vehicle.setColor(\"Blue\");\n vehicle.setInterior(\"Leather\");\n vehicle.setBodyType(\"SUV\");\n vehicle.setVin(\"W9D81KQ93N8Z0KS7\");\n vehicle.setSalesPrice(new BigDecimal(\"35000.00\"));\n vehicle.setMsrp(new BigDecimal(\"40000.00\"));\n vehicle.setDescription(\"A practical vehicle\");\n vehicle.setPicURL(\"http://www.sampleurl.com/samplepic\");\n vehicle.setModel(createdModel);\n\n Vehicle createdVehicle = vehicleDao.addVehicle(vehicle);\n\n //Act\n vehicleDao.deleteVehicleById(vehicle.getVehicleId());\n \n //Assert\n Vehicle fetchedVehicle = vehicleDao.getVehicleById(createdVehicle.getVehicleId());\n assertNull (fetchedVehicle);\n \n }", "@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }", "@Test\n public void deleteViajeroTest() {\n ViajeroEntity entity = data.get(0);\n vp.delete(entity.getId());\n ViajeroEntity deleted = em.find(ViajeroEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Test\n public void testRemovePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n Assert.assertTrue(itemDao.delete(item.getName()));\n Assert.assertNull(itemDao.read(item.getName()));\n }", "int delete(T data) throws SQLException, DaoException;", "int deleteByExample(TransactionExample example);", "@Test\n public void deleteHouseholdUsingDeleteTest() throws ApiException {\n UUID householdId = null;\n api.deleteHouseholdUsingDelete(householdId);\n\n // TODO: test validations\n }", "@Test\n public void deleteRecipe_ReturnsFalse(){\n assertEquals(\"deleteRecipe - Returns False\", false, testDatabase.deleteRecipe(Integer.MAX_VALUE));\n }", "public void delete(int id) throws DAOException;", "@Test\n void deleteTest() {\n URI uri = URI.create(endBody + \"/delete\");\n\n // get the response\n HttpResponse<String> response = HttpMethods.delete(uri);\n\n assertEquals(200, response.statusCode());\n }", "@Test\n public void deleteById() {\n User user = new User();\n user.setId(1259474874313797634L);\n boolean ifDelete = user.deleteById();\n System.out.println(ifDelete);\n }" ]
[ "0.7896117", "0.76900864", "0.76586866", "0.7657055", "0.76313907", "0.76207536", "0.76186126", "0.76084304", "0.7543278", "0.75038034", "0.7451752", "0.7408626", "0.737398", "0.73719066", "0.73461396", "0.7325193", "0.7309504", "0.7286333", "0.7273887", "0.7252576", "0.7248703", "0.7232087", "0.7225992", "0.7223148", "0.71407384", "0.7136691", "0.70764166", "0.7075558", "0.7061126", "0.7052004", "0.70418996", "0.7038517", "0.7029005", "0.7010703", "0.70082575", "0.69978684", "0.69978684", "0.6968276", "0.6958791", "0.6955942", "0.6955667", "0.69490135", "0.69489336", "0.6944434", "0.69425035", "0.6928412", "0.6920407", "0.68819803", "0.68673974", "0.6866982", "0.68581676", "0.6846398", "0.68302876", "0.6828632", "0.6815607", "0.6815607", "0.6794112", "0.67934495", "0.67889196", "0.67870754", "0.6785195", "0.67811114", "0.678045", "0.6777832", "0.6775518", "0.6768371", "0.67526513", "0.67503846", "0.6748173", "0.67444855", "0.6726545", "0.6726356", "0.6724702", "0.6712562", "0.6705404", "0.67032313", "0.66973", "0.6696344", "0.6691929", "0.6687022", "0.66803443", "0.66753036", "0.6671171", "0.667078", "0.6655257", "0.66529304", "0.6647629", "0.66464233", "0.6646005", "0.66452783", "0.66444063", "0.6643506", "0.6640451", "0.6637548", "0.6635178", "0.66333425", "0.66182077", "0.66155666", "0.6604913", "0.66041356" ]
0.6874152
48
TODO Autogenerated method stub
@Override public Map<File, List<String>> grep(File directory, String fileSelectionPattern, String substringSelectionPattern, boolean recursive) { File[] fileList=directory(directory,recursive,fileSelectionPattern); //Map<File, List<String>> grepped=new HashMap<File, List<String>>(); return PatternMatcher(fileList,Pattern.compile(substringSelectionPattern)); }
{ "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
Created by IntelliJ IDEA. User: cyril Date: 12/19/11 Time: 1:59 PM To change this template use File | Settings | File Templates.
public interface IConditionBuilder { public <T> ICondition<T> list( ICondition<T>... list ); public <T> ICondition<T> not( ICondition<T> condition ); public <T> ICondition<T> and( ICondition<T> left, ICondition<T> right ); public <T> ICondition<T> or( ICondition<T> left, ICondition<T> right ); public <T> ICondition<T> keywordMatch( String keyword ); public <T> ICondition<T> numberMatch( String number ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "public void mo38117a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public final void mo51373a() {\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}", "private Solution() {\n /**.\n * { constructor }\n */\n }", "public void mo21792Q() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "@Override\n public void init() {\n\n }", "public void m23075a() {\n }", "public void mo21825b() {\n }", "public void mo21779D() {\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo12930a() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public static void thisDemo() {\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void mo21795T() {\n }", "public void mo4359a() {\n }", "public void mo23813b() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo1531a() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private static void oneUserExample()\t{\n\t}", "public void mo21877s() {\n }", "public void mo21781F() {\n }", "@Override\n public void initialize() { \n }", "public void mo21878t() {\n }", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo56167c() {\n }", "private void m50366E() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo5382o() {\n }", "public static void listing5_14() {\n }", "public void mo3376r() {\n }", "public void mo115188a() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public final void mo91715d() {\n }", "public void mo21782G() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo21793R() {\n }", "public void mo6081a() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo115190b() {\n }", "public void mo21791P() {\n }", "public void mo5248a() {\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public void mo2740a() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "public void mo55254a() {\n }", "private test5() {\r\n\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public static void generateCode()\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 }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "public void method_4270() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo3749d() {\n }", "public void mo9848a() {\n }" ]
[ "0.6102181", "0.5934621", "0.5923935", "0.5878662", "0.58505636", "0.58417356", "0.5840689", "0.58138764", "0.58069557", "0.58069557", "0.5778265", "0.5774765", "0.57649153", "0.5761415", "0.5751363", "0.5751363", "0.571848", "0.5717914", "0.5709283", "0.5706327", "0.5693478", "0.5690995", "0.5687771", "0.5681984", "0.5681262", "0.56808525", "0.5677618", "0.5677618", "0.5677618", "0.5677618", "0.5677618", "0.5677618", "0.56764024", "0.56730664", "0.56730664", "0.56671", "0.565388", "0.5653017", "0.5651322", "0.56507176", "0.56452775", "0.56394523", "0.56271845", "0.56271845", "0.5623956", "0.5622975", "0.56185365", "0.56162", "0.56160283", "0.5606233", "0.56021297", "0.55985683", "0.55979854", "0.5594982", "0.55942696", "0.5589899", "0.5589414", "0.55882525", "0.5583991", "0.5575271", "0.5572592", "0.5572232", "0.55688065", "0.55685204", "0.556805", "0.5564631", "0.55634624", "0.5557444", "0.55537504", "0.55537504", "0.5553439", "0.55508524", "0.5546223", "0.5537361", "0.55373037", "0.55311847", "0.5531021", "0.55269146", "0.552325", "0.55220574", "0.5521744", "0.55197513", "0.5517483", "0.55111885", "0.5511151", "0.55053383", "0.55027246", "0.55027246", "0.55027246", "0.55027246", "0.55027246", "0.55027246", "0.55027246", "0.5502216", "0.55016047", "0.55016047", "0.55016047", "0.55012846", "0.5497207", "0.5495778", "0.549457" ]
0.0
-1
Makes a gui Hallway01 location Sends name, desciption, exits and map file name
public Hallway01(Boolean gui){ super( "Hallway01", "Hallway connecting Personal, Laser and Net.", new Exit('S', "Personal"), new Exit('E', "Laser"), new Exit('E', "Net"), null, "hallway01Map.txt"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeGUI()\n\t{\n\t\tbuttonPanel = new ButtonPanel(this,ship,planet);\n\t\tgamePanel = new GamePanel(this,ship,planet);\n\n\t\tJMenuBar menubar = new JMenuBar();\n\t\tJMenu menuHelp = new JMenu(\"Help\");\n\t\thelpItem = new JMenuItem(\"Help\");\n\t\tmenuHelp.add(helpItem);\n\t\tmenubar.add(menuHelp);\n\t\tsetJMenuBar(menubar);\n\n\t\tsounds = new AudioClip[2];\n\n\t\ttry\n\t\t{\n\t\t\turl = new URL(getCodeBase() + \"/thrust.au\");\n\t\t\tsounds[0] = Applet.newAudioClip(url);\n\t\t\turl = new URL(getCodeBase() + \"/crash.au\");\n\t\t\tsounds[1] = Applet.newAudioClip(url);\n\t\t}\n\t\tcatch(Exception e){}\n\n\t\thelpItem.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(e.getSource() == helpItem)\n\t\t\t\t{\n\t\t\t\t\tString helpMessage = \"The goal of the game is to land\\nthe ship on the red lines (pads).\\nThe ship must be completely contained\\nwithin the bounds of the red pad.\\nThere are 10 levels total\\nand you will have a certain amount\\nof time to complete each level.\\nGood Landing: velocities must be <10\\nOK Landing: velocities must be <20\\nThe ship's bottom must be facing the ground.\";\n\t\t\t\t\tJOptionPane.showMessageDialog(lander, helpMessage, \"Help Display\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tgetContentPane().add(gamePanel, BorderLayout.PAGE_START);\n\t\tgetContentPane().add(buttonPanel, BorderLayout.PAGE_END);\n\t\tsetVisible(true);\n\t}", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "private static void createAndShowGUI() {\r\n\t\tString pathwayFile = System.getenv(\"PATHWAY_FILE\");\r\n\t\tString defaultsFile = System.getenv(\"DEFAULTS_FILE\");\r\n\r\n\t\tPathway path;\r\n\r\n\t\tif (defaultsFile == null) {\r\n\t\t\tpath = new Pathway(pathwayFile);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Using defaults file \" + defaultsFile);\r\n\t\t\tpath = new Pathway(pathwayFile, defaultsFile);\r\n\t\t}\r\n\r\n\t\t// Disable boldface controls.\r\n\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n\r\n\t\t// Create and set up the window.\r\n\t\tJFrame frame = new JFrame(\"Pathway Simulator\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Create and set up the content pane.\r\n\t\tSimPanel newContentPane = new SimPanel(path);\r\n\t\tnewContentPane.setOpaque(true); // content panes must be opaque\r\n\t\tframe.setContentPane(newContentPane);\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tg.printHelp(\"OthelloHelp.txt\");\n\t}", "public static void help() {\n System.out.println(\"MENU : \");\n System.out.println(\"Step 1 to create a default character.\"); // create and display a character\n System.out.println(\"Step 2 to display characters.\");\n System.out.println(\"Step 3 to choice a character for list his details. \");\n System.out.println(\"Step 4 to start fight between 2 characters\");\n System.out.println(\"step 5 to remove a character.\");\n System.out.println(\"step 6 to create a Warrior.\");\n System.out.println(\"step 7 to create a Wizard.\");\n System.out.println(\"step 8 to create a Thief.\");\n System.out.println(\"Step 9 to exit the game. \");\n System.out.println(\"Step 0 for help ....\");\n\n }", "public static void WarGameStart() throws IOException {\n\t\tJLabel label2 = new JLabel(new ImageIcon(\"WarTitle.png\"));\r\n\t\t\t\t \r\n\t\tJFrame title2 = new JFrame();\r\n\t\ttitle2.add(label2);\r\n\t\ttitle2.getContentPane().add(label2);\r\n\t\ttitle2.pack();\r\n\t\ttitle2.setLocationRelativeTo(null);\r\n\t\tlabel2.repaint();\r\n\t\ttitle2.setVisible(true);\r\n\t\t\r\n\t}", "private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }", "public void help()\r\n {\r\n \tJFrame insScr=new JFrame(\"Instructions\");\r\n \tJLabel instructions=new JLabel(new ImageIcon(getClass().getResource(\"Instructions.png\")));\r\n \t\r\n insScr.add(instructions);\r\n insScr.setSize(900,600);\r\n insScr.setVisible(true);\r\n \r\n Dimension screenLoc=Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tinsScr.setLocation(screenLoc.width/2-insScr.getSize().width/2, screenLoc.height/2-insScr.getSize().height/2);\r\n \r\n }", "public static void map(int location)\n\t{\n\t\tswitch(location)\n\t\t{\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * X # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 8:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 11:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 12:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # X # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\");\n\t\t}//end switch(location)\n\t\t\n\t}", "public static void helpCommand(){\n\n System.out.println(\"--------list of controls-------\");\n System.out.println(\"'help' : display the list of control\");\n System.out.println(\"'exit' : for quit the app /n\");\n System.out.println(\"'adduser' : you can add user with this command,<fistname>,<lastname>,<country>,<departement>,<age>\");\n System.out.println(\"'edituser' : you can edit an user with this command, <firstname>,<lastname>\");\n System.out.println(\"'removeuser' : you can remove an user with this command, <firstanme>,<lastname>\");\n System.out.println(\"'listusers' : display all of users\");\n System.out.println(\"'addcar' : add a car to the list, <brand>,<model>,<ref>,<year>\");\n System.out.println(\"'editcar' : use this command for edit a car, <ref>\");\n System.out.println(\"'removecar' : use this command for remove a car\");\n System.out.println(\"'listcars' : display all the cars\");\n System.out.println(\"'rentcar' : command for rent a car\");\n System.out.println(\"'returncar' : command for return a car\");\n System.out.println(\"'listrent' : display the list of rents\");\n System.out.println(\"'saveusers' : use this command for save your users file\");\n System.out.println(\"'restoreusers' : use this command open your save users file\");\n System.out.println(\"'serialusers' : use this command serialize object users\");\n System.out.println(\"'saverents' : use this command save the list of rents in file\");\n System.out.println(\"'loadrents' : use this command load the list from file\");\n System.out.println(\"'savecars' : use this command for save the list of cars in a file\");\n System.out.println(\"'loadcars' : use this command for import the list from file \");\n System.out.println(\"'saveall' : use this command for save all the list in a file\");\n System.out.println(\"'loadall' : use this command for import all the list from file\");\n System.out.println(\"----------------------------------\");\n\n }", "private void aboutHandler() {\n JOptionPane.showMessageDialog(\n this.getParent(),\n \"YetAnotherChessGame v1.0 by:\\nBen Katz\\nMyles David\\n\"\n + \"Danielle Bushrow\\n\\nFinal Project for CS2114 @ VT\");\n }", "protected void ACTION_B_HELP(ActionEvent arg0) {\n\t\t\r\n\t\tString msg = \"Network Packet Sniffer is JAva packet capturing and traffic analysis application\"\r\n\t\t\t\t+ \"\\n CAPTURE : Start capturing packets on the interface\"\r\n\t\t\t\t+ \"\\nSTOP : Stop capturing packets on the interface\"\r\n\t\t\t\t+ \"\\n LIST : List Network Interfaces on the host\"\r\n\t\t\t\t+ \"\\n SELECT : Select Interface to capture Packets with\"\r\n\t\t\t\t+ \"\\n FILTER : Filter on the selected port when filtering is enabled\"\r\n\t\t\t\t+ \"\\n ENABLE : Enable Port Filtering\"\r\n\t\t\t\t+ \"\\n HELP : Displays the help screen\"\r\n\t\t\t\t+ \"\\n SAVE : Save the information about the packet\"\r\n\t\t\t\t+ \"\\n LOAD : Load the saved data on the interface \"\r\n\t\t\t\t+ \"\\n \";\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t}", "public GUI(GUIListener gl) {\n // Load certain necessary resources.\n map = getClass().getResource(\"/res/map.html\").toString();\n start = createImageIcon(\"play_16.png\");\n stop = createImageIcon(\"stop_16.png\");\n MIN_FRAME_DIM = new Dimension(960, 540);\n popup = new PopupMenu();\n trayIcon = new TrayIcon(createImageIcon(\"map_16.png\").getImage());\n languageCodes.put(\"English\", \"en\");\n languageCodes.put(\"Dutch\", \"nl\");\n languageCodes.put(\"German\", \"de\");\n languageCodes.put(\"French\", \"fr\");\n languageCodes.put(\"Spanish\", \"es\");\n languageCodes.put(\"Italian\", \"it\");\n languageCodes.put(\"Russian\", \"ru\");\n languageCodes.put(\"Lithuanian\", \"lt\");\n languageCodes.put(\"Hindi\", \"hi\");\n languageCodes.put(\"Tamil\", \"ta\");\n languageCodes.put(\"Arabic\", \"ar\");\n languageCodes.put(\"Chinese\", \"zh\");\n languageCodes.put(\"Japanese\", \"ja\");\n languageCodes.put(\"Korean\", \"ko\");\n languageCodes.put(\"Vietnamese\", \"vi\");\n\n // Create a browser, its associated UI view object and the browser listener.\n browser = new Browser();\n browserView = new BrowserView(browser);\n listener = gl;\n \n /* set link load handler to load all links in the running system's \n default browser.*/\n browser.setLoadHandler(new DefaultLoadHandler(){\n\n @Override\n public boolean onLoad(LoadParams lp) {\n String url = lp.getURL();\n boolean cancel = !url.endsWith(\"map.html\");\n if(cancel) {\n try {\n // open up any other link on the system's default browser.\n UIutils.openWebpage(new java.net.URL(url));\n } catch (MalformedURLException ex) {\n JDialog.setDefaultLookAndFeelDecorated(true);\n JOptionPane.showMessageDialog(null, \"Could not open link.\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }\n return cancel;\n }\n \n });\n\n /* Set the Windows look and feel and initialize all the GUI components. */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html\n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Windows\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n initComponents();\n\n // Select english as a filter language by default.\n String[] sel = new String[] {\"English\", \"en\"};\n selectedLanguages.put(sel[0], sel[1]);\n ((DefaultTableModel) selectedLangTable.getModel()).addRow(sel);\n\n // Load certain variables.\n timeScale = 60000; // 1min = 60000ms\n\n // Add the map view to the GUI frame and load the map URL.\n mapPanel.add(browserView, BorderLayout.CENTER);\n browser.loadURL(map);\n\n // Adding support for minimizing window to system tray if supported.\n if (SystemTray.isSupported()) {\n systrayCheckBox.setEnabled(true);\n try {\n systrayCheckBox.setSelected(Boolean.parseBoolean(\n listener.getProperties().getProperty(\"MINIMIZE_TO_TRAY\")));\n } catch (Exception ex) {}\n systrayCheckBox.setToolTipText(\"Enable/Disable minimizing to system tray.\");\n\n // Context menu items to system tray icon.\n final MenuItem exitItem = new MenuItem(\"Exit\");\n exitItem.addActionListener((ActionEvent e) -> {\n GUI.this.exitMenuItemActionPerformed(e);\n });\n popup.add(exitItem);\n trayIcon.setPopupMenu(popup);\n trayIcon.addActionListener((ActionEvent e) -> {\n GUI.this.setVisible(true);\n GUI.this.setExtendedState(GUI.NORMAL);\n SystemTray.getSystemTray().remove(trayIcon);\n });\n } else {\n systrayCheckBox.setEnabled(false);\n systrayCheckBox.setToolTipText(\"OS does not support this function.\");\n }\n\n // add a text field change listener to the twitter credentials input dialog.\n DocumentListener dl1 = new DocumentListener() {\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n applyKeysButton.setEnabled(true);\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n applyKeysButton.setEnabled(true);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n consumerKeyTextField.getDocument().addDocumentListener(dl1);\n consumerSecretTextField.getDocument().addDocumentListener(dl1);\n apiKeyTextField.getDocument().addDocumentListener(dl1);\n apiSecretTextField.getDocument().addDocumentListener(dl1);\n\n // add a text field change listener to the MySQL credentials input dialog.\n DocumentListener dl2 = new DocumentListener() {\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n sqlApplyButton.setEnabled(true);\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n sqlApplyButton.setEnabled(true);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n sqlUserTextField.getDocument().addDocumentListener(dl2);\n sqlPasswordField.getDocument().addDocumentListener(dl2);\n sqlLinkTextField.getDocument().addDocumentListener(dl2);\n \n // Set and start the connection to the MySQL database if USE_MYSQL is true.\n try {\n Properties p = listener.getProperties();\n boolean isSelected = Boolean.parseBoolean(p.getProperty(\"USE_MYSQL\"));\n useDBCheckBox.setSelected(isSelected);\n dbInputDialogShown(null);\n if(isSelected)\n sqlApplyButtonActionPerformed(null);\n } catch (Exception ex) {}\n\n // Display the keywords dialog at start\n keywordsDialog.setVisible(true);\n }", "public void helpAbout_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, \"About InfoFilter Application\", true);\n Point loc = this.getLocation();\n\n dlg.setLocation(loc.x + 50, loc.y + 50);\n dlg.show();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(1000, 1000));\n getContentPane().setLayout(null);\n\n jLabel2.setFont(new java.awt.Font(\"Tiger\", 3, 36));\n jLabel2.setForeground(new java.awt.Color(255, 0, 51));\n jLabel2.setText(\"ROAD MAP VIEW\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(80, 10, 460, 60);\n\n jButton3.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18));\n jButton3.setText(\"HOME\");\n jButton3.setToolTipText(\"move main panel\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3);\n jButton3.setBounds(650, 180, 90, 100);\n\n jButton2.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 18));\n jButton2.setText(\"EXIT\");\n jButton2.setToolTipText(\"end application\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2);\n jButton2.setBounds(650, 350, 90, 90);\n\n jLabel1.setBackground(new java.awt.Color(255, 51, 153));\n jLabel1.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 24));\n jLabel1.setForeground(new java.awt.Color(255, 51, 102));\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/HOSPITAL_MANAGEMENT/F2.JPG\"))); // NOI18N\n jLabel1.setText(\"jLabel1\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 640, 570);\n\n pack();\n }", "private void createAndShowGUI(){\r\n initComponents();\r\n openMazefile.addActionListener(this);\r\n solveMaze.addActionListener(this);\r\n clearSolution.addActionListener(this);\r\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n pack();\r\n setVisible(true);\r\n }", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tString info=5+\" \"+name;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t//send exit info to server\r\n\t\t\t\t\t\ttoServer.writeUTF(info);\r\n\t\t\t\t\t\ttoServer.flush();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//get return tips from server\r\n\t\t\t\t\t\tinfo=fromServer.readUTF();\r\n\t\t\t\t\t\thandle.setVisible(false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tSystem.err.println(ex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public void initGui()\n {\n Keyboard.enableRepeatEvents(true);\n this.buttons.clear();\n GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format(\"selectWorld.edit.resetIcon\")));\n this.buttons.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format(\"selectWorld.edit.openFolder\")));\n this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectWorld.edit.save\")));\n this.buttons.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\")));\n guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, \"icon.png\").isFile();\n ISaveFormat isaveformat = this.mc.getSaveLoader();\n WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);\n String s = worldinfo == null ? \"\" : worldinfo.getWorldName();\n this.nameEdit = new GuiTextField(2, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);\n this.nameEdit.setFocused(true);\n this.nameEdit.setText(s);\n }", "public static void main(String args[]) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(\"info\"));\n\t\temail = reader.readLine();\n\t\tpass = reader.readLine();\n\t\treader.close();\n\t\tSystem.out.println(\"[ListSystemContorl] Drawing Gui\");\n\t\tTextDisplay.drawGUI();\n\t\tSystem.out.println(\"[ListSystemContorl] Finished\");\n\t}", "private void help() {\n System.out.println(\"PLACE X,Y,F #Placing the robot in (X,Y) facing F. \\n\" +\n \"\\tX and Y are numbers between 0 AND 5, F is NORTH, EAST, WEST, SOUTH directions\\n\" +\n \"MOVE #Move one position towards the current direction\\n\" +\n \"LEFT #Turn left\\n\" +\n \"RIGHT #Turn right\\n\" +\n \"REPORT #Prints current position and the direction\\n\" +\n \"HELP #Help menu\");\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "public static void main(String args[]) {\n NewMend newmend = new NewMend(\"1221101\",\"1\");\n newmend.setBounds(50,100,420,500);\n newmend.setVisible(true);\n }", "private void setUpGui(){\n window = new JFrame(\"Error\");\n window.add(new JPanel().add(new JLabel(\"<html><div \" +\n \"style=\\\"margin:10px\\\"><h1 style=\\\"color:red; \" +\n \"text-align:center\\\">An error occurred!</h1> <p \" +\n \"style=\\\"font-size:18\\\">press \" +\n \"Error message to view the message or press default to use \" +\n \"the games default maps</p></div></html>\")));\n JPanel bottom = new JPanel();\n bottom.add(defaultMap(),BorderLayout.SOUTH);\n bottom.add(messageButton(), BorderLayout.SOUTH);\n bottom.add(quit(),BorderLayout.SOUTH);\n window.add(bottom,BorderLayout.SOUTH);\n }", "void aboutMenuItem_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, \"About InfoFilter Application\", true);\n Point loc = this.getLocation();\n\n dlg.setLocation(loc.x + 50, loc.y + 50);\n dlg.show();\n }", "public static void main(String[] args) {\n new DisplayManager(new AppointmentMgr()).StartProg(true);\n //AppointmentMgr.makeAppt = new makeAppt(AppointmentMgr);\n //myMgr.screen2 = new Screen2(myMgr);\n\n //new MakeAppoinment().setVisible(true);\n //upldMedRec.setVisible(true);\n //makeAppt.setVisible(true);\n //showScreen1();\n //jButton2ActionPerformed(java.awt.event.ActionEvent evt)\n \n //makeAppt.jButton2ActionPerformed();\n\n \n \n }", "private void createContents() {\r\n this.shell = new Shell(this.getParent(), this.getStyle());\r\n this.shell.setText(\"自動プロキシ構成スクリプトファイル生成\");\r\n this.shell.setLayout(new GridLayout(1, false));\r\n\r\n Composite composite = new Composite(this.shell, SWT.NONE);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n composite.setLayout(new GridLayout(1, false));\r\n\r\n Label labelTitle = new Label(composite, SWT.NONE);\r\n labelTitle.setText(\"自動プロキシ構成スクリプトファイルを生成します\");\r\n\r\n String server = Filter.getServerName();\r\n if (server == null) {\r\n Group manualgroup = new Group(composite, SWT.NONE);\r\n manualgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n manualgroup.setLayout(new GridLayout(2, false));\r\n manualgroup.setText(\"鎮守府サーバーが未検出です。IPアドレスを入力して下さい。\");\r\n\r\n Label iplabel = new Label(manualgroup, SWT.NONE);\r\n iplabel.setText(\"IPアドレス:\");\r\n\r\n final Text text = new Text(manualgroup, SWT.BORDER);\r\n GridData gdip = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n gdip.widthHint = SwtUtils.DPIAwareWidth(150);\r\n text.setLayoutData(gdip);\r\n text.setText(\"0.0.0.0\");\r\n text.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent e) {\r\n CreatePacFileDialog.this.server = text.getText();\r\n }\r\n });\r\n\r\n this.server = \"0.0.0.0\";\r\n } else {\r\n this.server = server;\r\n }\r\n\r\n Button storeButton = new Button(composite, SWT.NONE);\r\n storeButton.setText(\"保存先を選択...\");\r\n storeButton.addSelectionListener(new FileSelectionAdapter(this));\r\n\r\n Group addrgroup = new Group(composite, SWT.NONE);\r\n addrgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n addrgroup.setLayout(new GridLayout(2, false));\r\n addrgroup.setText(\"アドレス(保存先のアドレスより生成されます)\");\r\n\r\n Label ieAddrLabel = new Label(addrgroup, SWT.NONE);\r\n ieAddrLabel.setText(\"IE用:\");\r\n\r\n this.iePath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdIePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdIePath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.iePath.setLayoutData(gdIePath);\r\n\r\n Label fxAddrLabel = new Label(addrgroup, SWT.NONE);\r\n fxAddrLabel.setText(\"Firefox用:\");\r\n\r\n this.firefoxPath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdFxPath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdFxPath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.firefoxPath.setLayoutData(gdFxPath);\r\n\r\n this.shell.pack();\r\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Enter Character Name\");\r\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.addWindowListener(new WindowListener()\r\n\t\t {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowIconified(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\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\r\n\t\t } ) ;\r\n\r\n //Set up the content pane.\r\n addComponentsToPane(frame.getContentPane());\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setSize(new Dimension(390,90)) ;\r\n frame.setVisible(true);\r\n frame.setResizable(false) ;\r\n }", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "public void newHelp() {\n\t\tif(helpWindow){\n\t\t\tJOptionPane.showMessageDialog(null, \"Une fenêtre d'aide est déjà ouverte.\");\n\t\t}\n\t\telse {\n\t\t\thelpWindow = true;\n\t\t\t\n\t\t\tJFrame aide = new JFrame();\n\t\t\t\n\t\t\taide.setTitle(\"Aide\");\n\t\t\taide.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\taide.setSize(700,500);\n\t\t\taide.setLocationRelativeTo(null);\n\t\t\taide.setVisible(true);\n\n\t\t\tJTextArea helpText = new JTextArea();\n\t\t\thelpText.setText(Constants.HELP);\n\t\t\thelpText.setEditable(false);\n\n\t\t\tJScrollPane scrollbar = new JScrollPane(helpText);\n\t\t\tscrollbar.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\t\tscrollbar.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\n\t\t\taide.add(scrollbar);\n\t\t\t\n\t\t\taide.addWindowListener(new WindowAdapter() {\n\t\t\t public void windowClosed(WindowEvent e) {\n\t\t\t \thelpWindow = false;\n\t\t\t }\n\t\t\t});\n\t\t}\n\t}", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "@Override\r\n public void doHelpAction() {\n BIReportService.getInstance().traceHelpClick(project.getBasePath(), ConversionHelpEnum.PATH_SETTING);\r\n\r\n ApplicationManager.getApplication().invokeLater(() -> {\r\n BrowserUtil.browse(allianceDomain + HmsConvertorBundle.message(\"directory_url\"));\r\n }, ModalityState.any());\r\n }", "private void createAndShowGUI(String str) throws IOException\n {\n setUndecorated(true);\n setAlwaysOnTop(true);\n // Set some layout\n setLayout(new BorderLayout());\n \n closeButton = new JButton(\"Ok.\");\n closeButton.addActionListener(this);\n add(closeButton, BorderLayout.SOUTH);\n JLabel ico = new JLabel(str);\n ico.setIcon(new ImageIcon(ImageIO.read(new File(\"icons\\\\rarenep.png\"))));\n add(ico, BorderLayout.CENTER);\n\n pack();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n //setSize(sizeX,sizeY);\n Dimension dialogSize = getSize();\n setLocation(screenSize.width/2-dialogSize.width/2, screenSize.height/2-dialogSize.height/2);\n setVisible(true);\n }", "@Override\n\tpublic void openProgrammerGUI(MachineCrafterTileEntity tile) {\n\t\t\n\t}", "private void buildGui() {\n nifty = screen.getNifty();\n nifty.setIgnoreKeyboardEvents(true);\n nifty.loadStyleFile(\"nifty-default-styles.xml\");\n nifty.loadControlFile(\"nifty-default-controls.xml\");\n nifty.addScreen(\"Option_Screen\", new ScreenBuilder(\"Options_Screen\") {\n {\n controller((ScreenController) app);\n layer(new LayerBuilder(\"background\") {\n {\n childLayoutCenter();;\n font(\"Interface/Fonts/zombie.fnt\");\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n childLayoutOverlay();\n font(\"Interface/Fonts/zombie.fnt\");\n\n panel(new PanelBuilder(\"Switch_Options\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n interactOnClick(\"goTo(Display_Settings)\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Graphics_Settings\", new ScreenBuilder(\"Graphics_Extension\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n panel(new PanelBuilder(\"Post_Water_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Post Water\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Post_Water_Button\") {\n {\n marginLeft(\"110%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Reflections_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Reflections\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Reflections_Button\") {\n {\n marginLeft(\"45%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Ripples_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Ripples\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Ripples_Button\") {\n {\n marginLeft(\"75%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Specular_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Specular\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Specular_Button\") {\n {\n marginLeft(\"59%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Foam_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Foam\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Foam_Button\") {\n {\n marginLeft(\"93%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Sky_Dome_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Sky Dome\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Sky_Dome_Button\") {\n {\n marginLeft(\"128%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Star_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Star Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Star_Motion_Button\") {\n {\n marginLeft(\"106%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Cloud_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Cloud Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Cloud_Motion_Button\") {\n {\n marginLeft(\"87%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Bloom_Light_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Bloom Lighting\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Bloom_Light_Button\") {\n {\n marginLeft(\"70%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Light_Scatter_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Light Scatter\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Light_Scatter_Button\") {\n {\n marginLeft(\"90%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutHorizontal();\n marginLeft(\"43%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"applySettings()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Display_Screen\", new ScreenBuilder(\"Display_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"Resolution_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Set Resolution\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ListBoxBuilder(\"Resolution_Opts\") {\n {\n marginLeft(\"4%\");\n marginBottom(\"10%\");\n displayItems(1);\n showVerticalScrollbar();\n hideHorizontalScrollbar();\n selectionModeSingle();\n width(\"10%\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"displayApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Sound Settings\", new ScreenBuilder(\"#Sound_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"#Master_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"35%\");\n control(new LabelBuilder(\"\", \"Master Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Master_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Ambient_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Ambient Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Ambient_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Combat_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Combat Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Combat_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Dialog_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Dialog Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Dialog_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Footsteps_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Footsteps Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Footsteps_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"#Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"soundApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n\n }\n }.build(nifty));\n }", "protected void aboutUs(ActionEvent arg0) {\n\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\"A Curriculum Design of DBMS By psiphonc in NOV.2019\");\r\n\t}", "public static void main (String args[]) {\r\n\t\t\r\n\t\tinputScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tinputScreen.setSize(700,500);\r\n\t\tinputScreen.getContentPane();\r\n\t\tinputScreen.setVisible(true);\r\n\t\t\r\n\r\n\t\tEmployeeName();\r\n\t\tEmployeeAddress();\r\n\t\tEmployeePhoneNumber();\r\n\t\tEmployeeJob();\r\n\t\tEmployeeHoursWorked();\r\n\t\tEmployeePay();\r\n\t\tBottomRow();\r\n\t\tAction();\r\n\t\tAction2();\r\n\t\tAction3();\r\n\t\tSearchAction();\r\n\t\t\r\n\t\r\n\t\tinputScreen.getContentPane().add(GUI1Panel);\r\n\t\tGUI1Panel.setBorder(border1);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void initUI () {\n\t\t\t\n\t\t\tJFrame error = new JFrame();\n\t\t\tJFrame tmp = new JFrame();\n\t\t\ttmp.setSize(50, 50);\n\t\t\tString select = \"cheese\";\n\t\t\tboolean boolTemp = false;\n\t\t\tif(new File(\"prefFile.txt\").exists() == false){ //if this is the first run\n\t\t\t\twhile(select.equals(\"cheese\")){\n\t\t\t\t\tselect = JOptionPane.showInputDialog(tmp, \"It appears this is your first run. \"\n\t\t\t\t\t\t\t+ \"Enter the city name of your current location:\"); //prompts user for their current location\n\t\t\t\t\tif(select != null){\n\t\t\t\t\t\tboolTemp = searchBoxUsedTwo(select); //used the search function\n\t\t\t\t\t}\n\t\t\t\t\tif(boolTemp == false){\n\t\t\t\t\t\tselect = \"cheese\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tapp.setCurrentLocation(app.getVisibleLocation()); //sets the current location\n\t\t\t}\n\t\t\telse{ //if it's been run before\n\t\t\t\tlocation tmpLoc = new location();\n\t\t\t\ttry {\n\t\t\t\t\ttmpLoc = app.loadPref(); //load the location from memory\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(error, \"An error occured\");\n\t\t\t\t}\n\t\t\t\tapp.setCurrentLocation(tmpLoc); //and set it as the current location\n\t\t\t\tapp.setVisibleLocation(tmpLoc);\n\t\t\t\t\n\t\t\t}\n\t\t\tthis.setTitle(\"Weather Application\"); //sets title of frame \n\t\t\tthis.setSize(1300, 600); //sets size of frame\n\t\t\tthis.setLocationRelativeTo(null);\n\t\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE); //initiates exit on close command\n\t\t\tthis.setJMenuBar(this.createMenubar()); \n\t\t\t\n\t\t\tcreateFormCalls();\n\t\t\t\n\t\t\ttabbedPane.addTab(\"Current\", null, currentPanel); //fills a tab window with current data\n\t\t\ttabbedPane.addTab(\"Short Term\", null, shortPanel); //fills a tab window with short term data\n\t\t\ttabbedPane.addTab(\"Long Term\", null, longPanel); //fills a tab window with short term data\n\t\t\ttabbedPane.addTab(\"Mars Weather\", null, marsPanel); //fills a tab window with short term data\n\t\t\t\n\t\t\tGroupLayout layout = new GroupLayout(this.getContentPane());\n\t\t\tlayout.setAutoCreateGaps(true);\n\t\t\tlayout.setAutoCreateContainerGaps(true);\n\t\t\tlayout.setHorizontalGroup( layout.createSequentialGroup() //sets the vertical groups\n\t\t\t\t\t\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) \n\t\t\t\t\t\t\t\t.addComponent(tabbedPane)\n\t\t\t\t\t\t\t\t.addComponent(refreshLabel)\n\t\t\t\t\t\t)\n\n\t\t\t);\n\t\t\tlayout.setVerticalGroup( layout.createSequentialGroup() //sets the vertical groups\n\t\t\t\t\t\n\t\t\t\t\t.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE) \n\t\t\t\t\t\t\t.addComponent(tabbedPane)\n\t\t\t\t\t)\n\t\t\t\t\t.addComponent(refreshLabel)\n\n\t\t\t);\n\t\t\t\n\t\t\tthis.getContentPane().setLayout(layout);\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jDesktopPane1 = new javax.swing.JDesktopPane();\n jFrameMap = new javax.swing.JFrame();\n mapPanel = new javax.swing.JPanel();\n jPanelDB = new javax.swing.JPanel();\n jButtonDBToAddr = new javax.swing.JButton();\n jLabelHMTitle = new javax.swing.JLabel();\n jButtonHMExit = new javax.swing.JButton();\n jPanelDBLoad = new javax.swing.JPanel();\n jLabelDBHead = new javax.swing.JLabel();\n jFieldDBFile = new javax.swing.JTextField();\n jButtonDBLoad = new javax.swing.JButton();\n jCheckBoxZipFilter = new javax.swing.JCheckBox();\n jTextFieldZipcodes = new javax.swing.JTextField();\n jPanelAddr = new javax.swing.JPanel();\n jButtonAddrToDB = new javax.swing.JButton();\n jPanelAddrInfo = new javax.swing.JPanel();\n jTextFieldEnd = new javax.swing.JTextField();\n jLabelStart = new javax.swing.JLabel();\n jLabelEnd = new javax.swing.JLabel();\n jTextFieldStart = new javax.swing.JTextField();\n jLabelShowDB = new javax.swing.JLabel();\n jPanelFormat = new javax.swing.JPanel();\n jLabelFormatHead = new javax.swing.JLabel();\n jComboBoxFormat = new javax.swing.JComboBox();\n jCheckBoxQuickSearch = new javax.swing.JCheckBox();\n jLabelHMTitle1 = new javax.swing.JLabel();\n jButtonGetDirections = new javax.swing.JButton();\n jCheckBoxHideStreetNames = new javax.swing.JCheckBox();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaResults = new javax.swing.JTextArea();\n\n jFrameMap.setTitle(\"Husky Maps: Map View\");\n jFrameMap.setMinimumSize(new java.awt.Dimension(100, 100));\n\n mapPanel.setBackground(new java.awt.Color(254, 254, 254));\n mapPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n mapPanel.setPreferredSize(new java.awt.Dimension(500, 300));\n mapPanel.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n mapPanelMouseReleased(evt);\n }\n });\n mapPanel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n mapPanelMouseDragged(evt);\n }\n });\n\n javax.swing.GroupLayout mapPanelLayout = new javax.swing.GroupLayout(mapPanel);\n mapPanel.setLayout(mapPanelLayout);\n mapPanelLayout.setHorizontalGroup(\n mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 496, Short.MAX_VALUE)\n );\n mapPanelLayout.setVerticalGroup(\n mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 296, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jFrameMapLayout = new javax.swing.GroupLayout(jFrameMap.getContentPane());\n jFrameMap.getContentPane().setLayout(jFrameMapLayout);\n jFrameMapLayout.setHorizontalGroup(\n jFrameMapLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jFrameMapLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jFrameMapLayout.setVerticalGroup(\n jFrameMapLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jFrameMapLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(mapPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Husky Maps: Controls\");\n\n jPanelDB.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanelDB.setPreferredSize(new java.awt.Dimension(400, 251));\n\n jButtonDBToAddr.setLabel(\"Back to Current\");\n jButtonDBToAddr.setMaximumSize(new java.awt.Dimension(130, 29));\n jButtonDBToAddr.setMinimumSize(new java.awt.Dimension(130, 29));\n jButtonDBToAddr.setPreferredSize(new java.awt.Dimension(130, 29));\n jButtonDBToAddr.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonDBToAddrActionPerformed(evt);\n }\n });\n\n jLabelHMTitle.setFont(new java.awt.Font(\"Arial Black\", 3, 24));\n jLabelHMTitle.setText(\"Husky Maps!\");\n\n jButtonHMExit.setText(\"Exit\");\n jButtonHMExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonHMExitActionPerformed(evt);\n }\n });\n\n jLabelDBHead.setText(\"Enter Database Source:\");\n\n jFieldDBFile.setForeground(new java.awt.Color(170, 170, 170));\n jFieldDBFile.setText(\"enter folder path\");\n jFieldDBFile.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jFieldDBFileFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jFieldDBFileFocusLost(evt);\n }\n });\n\n jButtonDBLoad.setText(\"Load Database\");\n jButtonDBLoad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonDBLoadActionPerformed(evt);\n }\n });\n\n jCheckBoxZipFilter.setText(\"Filter zipcodes?\");\n\n jTextFieldZipcodes.setForeground(new java.awt.Color(170, 170, 170));\n jTextFieldZipcodes.setText(\"zipcode1, zipcode2, etc\");\n jTextFieldZipcodes.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jTextFieldZipcodesFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextFieldZipcodesFocusLost(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelDBLoadLayout = new javax.swing.GroupLayout(jPanelDBLoad);\n jPanelDBLoad.setLayout(jPanelDBLoadLayout);\n jPanelDBLoadLayout.setHorizontalGroup(\n jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jFieldDBFile, javax.swing.GroupLayout.DEFAULT_SIZE, 375, Short.MAX_VALUE)\n .addComponent(jLabelDBHead)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDBLoadLayout.createSequentialGroup()\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addComponent(jTextFieldZipcodes, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)\n .addGap(30, 30, 30))\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addComponent(jCheckBoxZipFilter)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addComponent(jButtonDBLoad, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanelDBLoadLayout.setVerticalGroup(\n jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelDBHead)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jFieldDBFile, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonDBLoad)\n .addComponent(jCheckBoxZipFilter))\n .addGroup(jPanelDBLoadLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jTextFieldZipcodes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanelDBLayout = new javax.swing.GroupLayout(jPanelDB);\n jPanelDB.setLayout(jPanelDBLayout);\n jPanelDBLayout.setHorizontalGroup(\n jPanelDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelHMTitle)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)\n .addComponent(jButtonDBToAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDBLayout.createSequentialGroup()\n .addContainerGap(310, Short.MAX_VALUE)\n .addComponent(jButtonHMExit, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(jPanelDBLayout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(jPanelDBLoad, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelDBLayout.setVerticalGroup(\n jPanelDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelDBLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelDBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelHMTitle)\n .addComponent(jButtonDBToAddr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanelDBLoad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonHMExit)\n .addGap(36, 36, 36))\n );\n\n jPanelAddr.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n jPanelAddr.setPreferredSize(new java.awt.Dimension(400, 251));\n\n jButtonAddrToDB.setLabel(\"Database select\");\n jButtonAddrToDB.setMaximumSize(new java.awt.Dimension(130, 29));\n jButtonAddrToDB.setMinimumSize(new java.awt.Dimension(130, 29));\n jButtonAddrToDB.setPreferredSize(new java.awt.Dimension(130, 29));\n jButtonAddrToDB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonAddrToDBActionPerformed(evt);\n }\n });\n\n jTextFieldEnd.setForeground(new java.awt.Color(170, 170, 170));\n jTextFieldEnd.setText(\"address street zipcode\");\n jTextFieldEnd.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jTextFieldEndFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextFieldEndFocusLost(evt);\n }\n });\n\n jLabelStart.setText(\"Start Address:\");\n\n jLabelEnd.setText(\"Destination:\");\n\n jTextFieldStart.setForeground(new java.awt.Color(170, 170, 170));\n jTextFieldStart.setText(\"address street zipcode\");\n jTextFieldStart.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n jTextFieldStartFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n jTextFieldStartFocusLost(evt);\n }\n });\n\n jLabelShowDB.setText(\"Current Database: \");\n\n javax.swing.GroupLayout jPanelAddrInfoLayout = new javax.swing.GroupLayout(jPanelAddrInfo);\n jPanelAddrInfo.setLayout(jPanelAddrInfoLayout);\n jPanelAddrInfoLayout.setHorizontalGroup(\n jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrInfoLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelShowDB)\n .addGroup(jPanelAddrInfoLayout.createSequentialGroup()\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelEnd)\n .addComponent(jLabelStart))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldEnd, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)\n .addComponent(jTextFieldStart, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE))))\n .addContainerGap())\n );\n jPanelAddrInfoLayout.setVerticalGroup(\n jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrInfoLayout.createSequentialGroup()\n .addComponent(jLabelShowDB)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabelStart))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelAddrInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelEnd)\n .addComponent(jTextFieldEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n jLabelFormatHead.setText(\"<html>How will you travel?\");\n\n jComboBoxFormat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"I'm driving\", \"I'm walking\" }));\n jComboBoxFormat.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jComboBoxFormatFocusLost(evt);\n }\n });\n\n jCheckBoxQuickSearch.setText(\"Quick 'n Dirty search\");\n jCheckBoxQuickSearch.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jCheckBoxQuickSearchMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelFormatLayout = new javax.swing.GroupLayout(jPanelFormat);\n jPanelFormat.setLayout(jPanelFormatLayout);\n jPanelFormatLayout.setHorizontalGroup(\n jPanelFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelFormatLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelFormatHead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBoxFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCheckBoxQuickSearch))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelFormatLayout.setVerticalGroup(\n jPanelFormatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelFormatLayout.createSequentialGroup()\n .addComponent(jLabelFormatHead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBoxFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxQuickSearch)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabelHMTitle1.setFont(new java.awt.Font(\"Arial Black\", 3, 24));\n jLabelHMTitle1.setText(\"Husky Maps!\");\n\n jButtonGetDirections.setFont(new java.awt.Font(\"DejaVu Sans\", 0, 17));\n jButtonGetDirections.setText(\"Find Directions!\");\n jButtonGetDirections.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonGetDirectionsActionPerformed(evt);\n }\n });\n\n jCheckBoxHideStreetNames.setText(\"Hide street names\");\n\n javax.swing.GroupLayout jPanelAddrLayout = new javax.swing.GroupLayout(jPanelAddr);\n jPanelAddr.setLayout(jPanelAddrLayout);\n jPanelAddrLayout.setHorizontalGroup(\n jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabelHMTitle1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)\n .addComponent(jButtonAddrToDB, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanelAddrInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addComponent(jPanelFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jCheckBoxHideStreetNames))\n .addComponent(jButtonGetDirections, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())\n );\n jPanelAddrLayout.setVerticalGroup(\n jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelHMTitle1)\n .addComponent(jButtonAddrToDB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanelAddrInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanelAddrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanelFormat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanelAddrLayout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jButtonGetDirections, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxHideStreetNames)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jTextAreaResults.setColumns(20);\n jTextAreaResults.setEditable(false);\n jTextAreaResults.setRows(20);\n jTextAreaResults.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Results\"));\n jScrollPane1.setViewportView(jTextAreaResults);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanelDB, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)\n .addComponent(jPanelAddr, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanelDB, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanelAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "public static void Welcome (){ //this method outputs welcome information and possibly other relevant information to user\r\n System.out.println(\"Welcome to the Maze Pathfinder Program! \\n\\nThis program can either create a random maze or accept input from a file to create one. Then the program will find a path from the start point to the end point in the maze.\\nEnjoy! \");\r\n System.out.println(\"\\n\");\r\n }", "public static void main(String argv[]) {\n String infile = DATA_FILE;\n String label = \"name\";\n\n if ( argv.length > 1 ) {\n infile = argv[0];\n label = argv[1];\n }\n\n UILib.setAlloyLookAndFeel();\n\n JFrame frame = new JFrame(\"NCMS - Routing Topology\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setContentPane(demo(infile, label));\n\n frame.pack();\n frame.setVisible(true);\n }", "private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }", "private void btn_HelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_HelpActionPerformed\n // go to help screen\n SIHS = new HelpScreen(value);\n SIHS.setVisible(true);\n\n\n }", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }", "public static void main (String argv[]) {\n if (argv.length > 0) { // read params as props from file\n String params_file = argv[0];\n File file = new File(params_file);\n String path = file.getPath();\n int path_last_sep_idx = path.lastIndexOf(File.separator);\n String dirpath = path_last_sep_idx > -1 ? path.substring(0, path_last_sep_idx+1) : \"\";\n\n if (params_file.endsWith(\".html\") || params_file.endsWith(\".htm\")) { // apllet html file\n html_param_syntax = true;\n try {\n javax.xml.parsers.DocumentBuilderFactory dbFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\n javax.xml.parsers.DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n org.w3c.dom.Document doc = dBuilder.parse(file);\n doc.getDocumentElement().normalize();\n org.w3c.dom.NodeList nList = doc.getElementsByTagName(\"PARAM\");\n props = new Properties();\n for (int temp = 0; temp < nList.getLength(); temp++) {\n org.w3c.dom.Node nNode = nList.item(temp);\n if (nNode.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {\n org.w3c.dom.Element eElement = (org.w3c.dom.Element) nNode;\n String name = eElement.getAttribute(\"NAME\");\n String value = eElement.getAttribute(\"VALUE\");\n props.setProperty(name, value);\n }\n }\n } catch (Exception e) {\n System.out.println(\"-- e: \" + e);\n }\n \n } else { // java props syntax \n try { (props = new Properties()).load(FoilBoard.class.getClassLoader().getResourceAsStream(params_file)); } \n catch (Exception ex) { ex.printStackTrace(); }\n }\n props.setProperty(\"__def_file_dirpath\", dirpath);\n }\n \n frame = new JFrame();\n final FoilBoard foilboard = new FoilBoard();\n Runtime.getRuntime().addShutdownHook(new Thread() { \n public void run() { \n System.out.println(foilboard.wing.make_spec());\n System.out.println(foilboard.stab.make_spec());\n System.out.println(foilboard.fuse.make_spec());\n System.out.println(foilboard.strut.make_spec());\n }}); \n foilboard.runAsApplication = true; // not as Applet\n frame.getContentPane().add(foilboard);\n frame.addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent we) {\n // / above shutdown hook takes care of these\n // System.out.println(foilboard.wing.make_spec());\n // System.out.println(foilboard.stab.make_spec());\n // System.out.println(foilboard.strut.make_spec());\n // System.out.println(foilboard.fuse.make_spec());\n foilboard.stop();\n foilboard.destroy();\n System.exit(0);\n }\n });\n frame.pack();\n frame.setSize(Integer.parseInt(getProperty(\"WIDTH\", \"1300\")), Integer.parseInt(getProperty(\"HEIGHT\", \"700\")));\n foilboard.init();\n\n // foilboard.out_top.plot.loadPlot();\n // foilboard.recomp_all_parts();\n // foilboard.vpp.steady_flight_at_given_speed(5, 0);\n\n foilboard.start();\n frame.setVisible(true);\n }", "public static void main(String[] args) {\n\t\tDisplay.openWorld(\"maps/pasture.map\");\n\n Display.setSize(15, 15);\n Display.setSpeed(7);\n Robot andre = new Wanderer(int i, int j);\n for(int n = 0; n<36; n++) {\n for(int k=0; k<36; k++) {\n andre.wander(); \n }\n explode();\n \n\t\t// TODO Create an instance of a Horse inside the pasture\n\t\t// TODO Have the horse wander for 36 steps with a timer of 7\n\t\t// TODO Have the horse explode()\n\t}\n\n}", "public static void main (String [] args){\r\n //Creo el objeto\r\n Formulario Form= new Formulario();\r\n Form.setBounds(0,0,400,550);\r\n Form.setVisible(true);\r\n Form.setLocationRelativeTo(null);\r\n \r\n }", "public void buildGui() {\n\t}", "public helpFrame() {\n this.setTitle(\"Help\");\n JPanel panel = new JPanel();\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\n JLabel helpLabel = new JLabel(\"This is helpful\");\n JTextArea helpArea = new JTextArea(\"Executable refers to the program which will be run, eg python, ls \" +\n \"\\n\\nInput file is the file, or files, to be read by the running program.\" +\n \"\\n\\nExecutable arguments are the parameters given to that program, eg example.py, -l\" +\n \"\\n\\nSearch text is the string Triana will look for in the executables output. \" +\n \"The integer directly after the search string will be sent to the next unit in the workflow. \" +\n \"If this unit is a collection FileUnit, the number will be used as the number of files in the collection.\");\n helpArea.setEditable(false);\n helpArea.setLineWrap(true);\n helpArea.setWrapStyleWord(true);\n\n JScrollPane scrollPane = new JScrollPane(helpArea);\n\n panel.add(helpLabel);\n panel.add(scrollPane);\n JButton ok = new JButton(\"Ok\");\n ok.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n dispose();\n }\n });\n panel.add(ok);\n this.add(panel);\n this.setSize(400, 200);\n this.setVisible(true);\n }", "public help() {\n initComponents();\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tJFrame hel=new JFrame(\"help\");\n\t\t\t\t\thel.setBounds(400, 200,675, 575);\n\t\t\t\t\thel.setResizable(false);\n\t\t\t\t\tJLabel l=new JLabel();\n\t\t\t\t\tl.setIcon(new ImageIcon(\"about.png\"));\n\t\t\t\t\n\t\t\t\t\thel.add(l);\n\t\t\t\t\thel.setVisible(true);\n\t\t\t\t}", "public static void GameStart() throws IOException {\n\t\tJLabel label = new JLabel(new ImageIcon(\"title.png\"));\r\n\t\t\t\t \r\n\t\tJFrame title = new JFrame();\r\n\t\ttitle.add(label);\r\n\t\ttitle.getContentPane().add(label);\r\n\t\ttitle.pack();\r\n\t\ttitle.setLocationRelativeTo(null);\r\n\t\tlabel.repaint();\r\n\t\ttitle.setVisible(true); \r\n\t}", "private void tutorial(){\n\t\tString msg = \"[Space] = Inicia e pausa o jogo depois de iniciado.\";\n\t\tmsg += \"\\n[Seta esquerda] = Move o paddle para a esquerda.\";\n\t\tmsg += \"\\n[Seta direita] = Move o paddle para a direita.\";\n\t\tmsg += \"\\n[I] = Abre a janela de informaçoes.\";\n\t\tmsg += \"\\n[R] = Reinicia o jogo.\";\n\t\tJOptionPane.showMessageDialog(null, \"\"+msg, \"Informaçoes\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tJFrame hankFrame = new JFrame(\"Hank\");\r\n\t\t\t\tJPanel hankPanel = new JPanel();\r\n\r\n\t\t\t\t// Can be any size- opens second window. (w,h)\r\n\t\t\t\thankFrame.setSize(250, 400);\r\n\r\n\t\t\t\t// Labels for information\r\n\t\t\t\t// Path must be relative to res folder!\r\n\t\t\t\t// src/res/nameoffile.extension\r\n\t\t\t\tJLabel hankPic = new JLabel(new ImageIcon(\"src/res/cheyCat.png\"));\r\n\t\t\t\tJLabel hankName = new JLabel(\"*Name- Hank Bullock\");\r\n\t\t\t\tJLabel hankEducation = new JLabel(\"*Education- Major MIS | Minor Computer Science\");\r\n\t\t\t\tJLabel hankJob = new JLabel(\"*Job Description- Student at UM\");\r\n\r\n\t\t\t\t// adding to frame\r\n\t\t\t\thankFrame.add(hankPanel);\r\n\t\t\t\thankPanel.add(hankPic);\r\n\t\t\t\thankPanel.add(hankName);\r\n\t\t\t\thankPanel.add(hankEducation);\r\n\t\t\t\thankPanel.add(hankJob);\r\n\t\t\t\thankFrame.setVisible(true);\r\n\t\t\t}", "private static void help() {\n\t\tSystem.out.println(\"\\n----------------------------------\");\n\t\tSystem.out.println(\"---Regatta Calculator Commands----\");\n\t\tSystem.out.println(\"----------------------------------\");\n\t\tSystem.out.println(\"addtype -- Adds a boat type and handicap to file. Format: name:lowHandicap:highHandicap\");\n\t\tSystem.out.println(\"format -- Provides a sample format for how input files should be arranged.\");\n\t\tSystem.out.println(\"help -- Lists every command that can be used to process regattas.\");\n\t\tSystem.out.println(\"podium -- Lists the results of the regatta, assuming one has been processed.\");\n\t\tSystem.out.println(\"regatta [inputfile] -- Accepts an input file as a parameter, this processes the regatta results outlined in the file.\");\n\t\tSystem.out.println(\"types -- lists every available boat type.\");\n\t\tSystem.out.println(\"write [outputfile] -- Takes the results of the regatta and writes them to the file passed as a parameter.\");\n\t\tSystem.out.println(\"----------------------------------\\n\");\n\t}", "private void setupGUI()\n\t{\n\t\t//initializes labelNumberOfASCII and adds to frame \n\t\tlabelNumberOfASCII = new JLabel();\n\t\tlabelNumberOfASCII.setLocation(12, 8);\n\t\tlabelNumberOfASCII.setSize(191,26);\n\t\tlabelNumberOfASCII.setText(\"Number of ASCII characters used\");\n\t\tgetContentPane().add(labelNumberOfASCII);\n\t\t\n\t\t//initialized comboCharSet and adds to frame\n\t\tString comboCharSet_tmp[]={\"Small\", \"Medium\", \"Large\"};\n\t\tcomboCharSet = new JComboBox<String>(comboCharSet_tmp);\n\t\tcomboCharSet.setLocation(294, 12);\n\t\tcomboCharSet.setSize(96, 25);\n\t\tcomboCharSet.setEditable(true);\n\t\tcomboCharSet.addActionListener(this);\n\t\tgetContentPane().add(comboCharSet);\n\n\t\t//initializes labelNumberofPixels and adds to frame\n\t\tlabelNumberOfPixels = new JLabel();\n\t\tlabelNumberOfPixels.setLocation(12,28);\n\t\tlabelNumberOfPixels.setSize(240,51);\n\t\tlabelNumberOfPixels.setText(\"Number of pixels per ASCII character: \");\n\t\tgetContentPane().add(labelNumberOfPixels);\n\t\t\n\t\t//initializes comboNumberOfPixels and adds to frame\n\t\tString comboNumberOfPixels_tmp[]={\"1\",\"3\",\"5\",\"7\",\"10\"};\n\t\tcomboNumberOfPixels = new JComboBox<String>(comboNumberOfPixels_tmp);\n\t\tcomboNumberOfPixels.setLocation(294,40);\n\t\tcomboNumberOfPixels.setSize(96,25);\n\t\tcomboNumberOfPixels.setEditable(true);\n\t\tcomboNumberOfPixels.addActionListener(this);\n\t\tgetContentPane().add(comboNumberOfPixels);\n\n\t\t//initializes outputPathLabel and adds to frame\n\t\toutputPathLabel = new JLabel();\n\t\toutputPathLabel.setLocation(12, 55);\n\t\toutputPathLabel.setText(\"Output folder:\");\n\t\toutputPathLabel.setSize(218, 51);\n\t\toutputPathLabel.setVisible(true);\n\t\tgetContentPane().add(outputPathLabel);\n\n\t\t//initializes outputPathTextField and adds to frame\n\t\toutputPathTextField = new JTextField();\n\t\tString initPath;\n\t\t//sets default output to default directory, created in Main.java. looks according to operating system.\n\t\tif (OSUtils.isUnixOrLinux())\n\t\t\tinitPath = System.getProperty(\"user.home\") + \"/.picture-to-ascii/output\";\n\t\telse if (OSUtils.isWindows())\n\t\t\tinitPath = System.getProperty(\"user.home\") + \"\\\\My Documents\\\\picture-to-ascii\\\\output\";\n\t\telse\n\t\t\tinitPath = \"(output path)\";\n\t\t//if the directory failed to create for reasons other than incompatible OS, we want (output path).\n\t\tif (!new File(initPath).isDirectory())\n\t\t\tinitPath = \"(output path)\";\n\n\t\toutputPathTextField.setLocation(150, 70);\n\t\toutputPathTextField.setSize(240,25);\n\t\toutputPathTextField.setText(initPath);\n\t\tgetContentPane().add(outputPathTextField);\n\n\t\tfontSizeTextField = new JTextField();\n\t\tfontSizeTextField.setLocation(150, 100);\n\t\tfontSizeTextField.setSize(240,25);\n\t\tfontSizeTextField.setText(\"5\");\n\t\tgetContentPane().add(fontSizeTextField);\n\n\t\tfontSizeLabel = new JLabel();\n\t\tfontSizeLabel.setText(\"Font size:\");\n\t\tfontSizeLabel.setSize(125, 51);\n\t\tfontSizeLabel.setLocation(12, 85);\n\t\tfontSizeLabel.setVisible(true);\n\t\tgetContentPane().add(fontSizeLabel);\n\t}", "private void designGUI() {\n\t\tmnb= new JMenuBar();\r\n\t\tFileMenu=new JMenu(\"file\");\r\n\t\tEditMenu=new JMenu(\"edit\");\r\n\t\timg1=new ImageIcon(\"s.gif\");\r\n\t\tNew=new JMenuItem(\"new\",img1);\r\n\t\topen=new JMenuItem(\"open\");\r\n\t\tsave=new JMenuItem(\"save\");\r\n\t\tquit=new JMenuItem(\"quit\");\r\n\t\tcut=new JMenuItem(\"cut\");\r\n\t\tcopy=new JMenuItem(\"copy\");\r\n\t\tpaste=new JMenuItem(\"paste\");\r\n\t\t\r\n\t\tFileMenu.add(New);\r\n\t\tFileMenu.add(save);\r\n\t\tFileMenu.add(open);\r\n\t\tFileMenu.add(new JSeparator());\r\n\t\tFileMenu.add(quit);\r\n\t\tEditMenu.add(cut);\r\n\t\tEditMenu.add(copy);\r\n\t\tEditMenu.add(paste);\r\n\t\t\r\n\t\tmnb.add(FileMenu);\r\n\t\tmnb.add(EditMenu);\r\n\t\tsetJMenuBar(mnb);\r\n\t\t\r\n\t\t//to add shortcut\r\n\t\tquit.setMnemonic('q');\r\n\t\t//quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,ActionEvent.CTRL_MASK));\r\n\t\tquit.addActionListener((ActionEvent e)->\r\n\t\t\t\t{\r\n\t\t\tSystem.exit(0);\r\n\t\t\t\t});\r\n\t\t\r\n\t\t//moving the mouse near to it we get this\r\n\t\tcut.setToolTipText(\"cut the text\");\r\n\t\t//new way fro get domension\r\n\t\tdim=getToolkit().getScreenSize();\r\n\t\tint x=(int) dim.getHeight();\r\n\t\tint y=(int) dim.getWidth();\r\n\t\tc=getContentPane();\r\n\t\tc.setLayout(new BorderLayout());\r\n\t\tmainpanel=new JPanel();\r\n\t\tta1=new JTextArea(x/18,y/12);\r\n\t\tmainpanel.add(new JScrollPane(ta1));\r\n\t\tc.add(mainpanel,BorderLayout.CENTER);\r\n\t\tmymethods();\r\n\t\topen.addActionListener(this);\r\n\t\tsave.addActionListener(this);\r\n\t\tcut.addActionListener(this);\r\n\t\tcopy.addActionListener(this);\r\n\t\tpaste.addActionListener(this);\r\n\t\t\r\n\t}", "private void fillMapsAndLists() {\n\t\ttabNames.add(\"BenchIT-GUI\");\n\t\ttabNames.add(\"Network\");\n\t\ttabNames.add(\"Tips\");\n\t\ttabNames.add(\"Console\");\n\t\ttabNames.add(\"Execute\");\n\t\ttabNames.add(\"Remote-Execute\");\n\n\t\t// do not display admin tool configuration as it's integrated into the GUI\n\t\t// tabNames.add( \"Admin-GUI\" );\n\t\t// If the tool tip starts with \"Check \" a checkbox will be shown.\n\t\t// If the tool tip starts with \"The \" it's refered to as String type.\n\t\t// If the tool tip starts with something else it's refered to as int type.\n\t\t// Comment put statements of gui options you don't want to see\n\t\t// in the option dialog!\n\t\tbenchitGUIMap.put(\"scaleShape\", \"Size of the points in plots (default is 6).\");\n\t\tbenchitGUIMap.put(\"errorInt\", \"Which value to use for invalid points (should be << 0).\");\n\t\tbenchitGUIMap.put(\"numberOfMixers\",\n\t\t\t\t\"Insert the number of mixers, you'd like to use (updated with restart).\");\n\n\t\tbenchitGUIMap.put(\"loadAndSaveSettings\",\n\t\t\t\t\"Check this if you'd like to save and load changes in result-view.\");\n\n\t\tbenchitGUIMap.put(\"editorTextSize\", \"Text size for editors.\");\n\t\tbenchitGUIMap.put(\"consoleTextSize\", \"Text size for console (needs restart).\");\n\n\t\tbenchitGUIMap.put(\"kernelSourceEdit\", \"Check this to see and edit the kernel source files.\");\n\t\tnetworkMap.put(\"serverIP\", \"The server's IP or name for database access.\");\n\t\tnetworkMap.put(\"updateServer\", \"The server directory, where the GUI can find updates.\");\n\t\tnetworkMap.put(\"updateEnabled\", \"Check to enable update-check when starting.\");\n\t\tnetworkMap.put(\"showRemoteTypeDialog\", \"Check this show \\\"enter password\\\" reminder dialog.\");\n\t\ttipsMap.put(\"showTipsOnStartUp\", \"Check this to display the daily tip on start up.\");\n\t\ttipsMap.put(\"nextTip\", \"This is the number of the next tip to show.\");\n\t\ttipsMap.put(\"tipFileBase\", \"The relative path to the tip html files.\");\n\t\ttipsMap.put(\"tipIconBase\", \"The relative path to the tip icon.\");\n\t\tconsoleMap.put(\"openConsole\",\n\t\t\t\t\"Check to open the output console on start up in external window.\");\n\t\tconsoleMap.put(\"consoleWindowXPos\", \"Console x-position of top left corner.\");\n\t\tconsoleMap.put(\"consoleWindowYPos\", \"Console x-position of top left corner.\");\n\t\tconsoleMap.put(\"consoleWindowXSize\", \"Console window width.\");\n\t\tconsoleMap.put(\"consoleWindowYSize\", \"Console window height.\");\n\t\tcompileAndRunMap.put(\"settedTargetActiveCompile\",\n\t\t\t\t\"Check to activate the target flag for compiling\");\n\t\tcompileAndRunMap.put(\"settedTargetCompile\", \"The target flag for compiling\");\n\t\tcompileAndRunMap.put(\"settedTargetActiveRun\", \"Check to activate the target flag for running\");\n\t\tcompileAndRunMap.put(\"settedTargetRun\", \"The target flag for running\");\n\t\tcompileAndRunMap.put(\"runWithoutParameter\",\n\t\t\t\t\"Check to run executables with the Parameters from Compile-time\");\n\n\t\tcompileAndRunMap.put(\"shutDownForExec\", \"Check to shutdown the GUI for local measurements.\");\n\n\t\tcompileAndRunMap\n\t\t\t\t.put(\"askForShutDownForExec\",\n\t\t\t\t\t\t\"Check to activate a dialog which asks whether to shut-down, when starting a kernel locally.\");\n\n\t\tremoteCompileAndRunMap.put(\"settedTargetActiveCompileRemote\",\n\t\t\t\t\"Check to activate the target flag for remote compiling\");\n\t\tremoteCompileAndRunMap.put(\"settedTargetCompileRemote\", \"The target flag for remote compiling\");\n\t\tremoteCompileAndRunMap.put(\"settedTargetActiveRunRemote\",\n\t\t\t\t\"Check to activate the target flag for remote running\");\n\t\tremoteCompileAndRunMap.put(\"settedTargetRunRemote\", \"The target flag for remote running\");\n\t\tremoteCompileAndRunMap.put(\"runRemoteWithoutParameter\",\n\t\t\t\t\"Check to run remote-executables with the Parameters from Compile-time\");\n\n\t}", "public static void prikaziAboutUs() {\r\n\t\tguiAboutUs = new GUIAboutUs(teretanaGui, true);\r\n\t\tguiAboutUs.setLocationRelativeTo(null);\r\n\t\tguiAboutUs.setVisible(true);\r\n\t}", "public void startProgram() {\n this.displayBanner();\n// prompt the player to enter their name Retrieve the name of the player\n String playersName = this.getPlayersName();\n// create and save the player object\n User user = ProgramControl.createPlayer(playersName);\n// Display a personalized welcome message\n this.displayWelcomeMessage(user);\n// Display the Main menu.\n MainMenuView mainMenu = new MainMenuView();\n mainMenu.display();\n }", "public void setGuiHashMap() {\n\n gameMap.setGetGuiHashMapParameter(\"author\",\"Default authorName\");\n gameMap.setGetGuiHashMapParameter(\"warn\",\"Default warning\");\n gameMap.setGetGuiHashMapParameter(\"image\",\"Default image\");\n gameMap.setGetGuiHashMapParameter(\"wrap\",\"Default wrapping\");\n gameMap.setGetGuiHashMapParameter(\"scroll\",\"Default scrolling\");\n }", "public InfoWindow(StartGame start) {\n try {\n initComponents();\n this.start = start;\n setLocationRelativeTo(null);\n InputStream imgStream = getClass().getResourceAsStream(\"exit_32.png\");\n BufferedImage myImg = ImageIO.read(imgStream);\n exitLabel.setIcon (new javax.swing.ImageIcon(myImg));\n setVisible(true);\n } catch (IOException ex) {\n Logger.getLogger(InfoWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public SimpleGUI(String p_host, String p_name) {\r\n super();\r\n initialize();\r\n int porti=1099;\r\n String adresa=\"192.165.43.195\"; \r\n try\r\n {\r\n this.rem = (ServerInterface)Naming.lookup(\"rmi://\"+adresa+\":\"+porti+\"/RMD\");\r\n \t\r\n this.id = rem.EnterGame(p_name);\r\n System.out.println(\"Your id is : \"+ id);\r\n \t\r\n if(id == 0)\r\n {\r\n System.out.println(\"Max Connection reached\");\r\n \t\r\n }\r\n else\r\n {\r\n this.name = rem.getName(id);\r\n this.setTitle(\"Welcome \" + name);\r\n \t\r\n GiveCards();\r\n \t\r\n }\r\n \r\n }\r\n catch (MalformedURLException e)\r\n {\r\n System.err.println(\"MalformedURLException: \"+e.getMessage());\r\n }\r\n catch (RemoteException e)\r\n {\r\n System.err.println(\"RemoteException: \" + e.getMessage());\r\n }\r\n catch (NotBoundException e)\r\n {\r\n System.err.println(\"NotBoundException: \"+e.getMessage());\r\n }\r\n }", "public JFrameInfo(String mappa) {\n setCenterScreen(this);\n initComponents();\n String path=null;\n if(mappa.equals(\"classicalMap\")) {\n path = \"/virtualrisikoii/resources/info/classicalInfo.png\";\n }\n else if(mappa.equals(\"europaMap\")) {\n path = \"/virtualrisikoii/resources/info/europaInfo.png\";\n }\n else {\n path = \"/virtualrisikoii/resources/info/italiaInfo.png\";\n }\n\n infoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(path)));\n }", "public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }", "public void HelpTopicsActionPerformed(java.awt.event.ActionEvent evt) {\n\n HelpWindow helpWindow = new HelpWindow(this);\n helpWindow.setVisible(true);\n\n\n // HTMLDisplay helpdisplay = new HTMLDisplay( str, \"TerpPaint Help\" );\n //\t helpdisplay.setVisible( true );\n // System.out.println(\"help topics\");\n }", "private void initialize() {\n\t\t// Configurations \n\t\tfrmAnliseDeMapa = new JFrame();\n\t\tfrmAnliseDeMapa.setResizable(false);\n\t\tfrmAnliseDeMapa.setTitle(\"An\\u00E1lise de mapa - INF008\");\n\t\tfrmAnliseDeMapa.setBounds(100, 100, 800, 405);\n\t\tfrmAnliseDeMapa.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmAnliseDeMapa.getContentPane().setLayout(null);\n\t\t\n\n\t\t//###Label para escolha do arquivo\n\t\tJLabel lblNewLabel = new JLabel(\"Informe o caminho do arquivo para avalia\\u00E7ao:\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\n\t\tlblNewLabel.setBounds(10, 36, 268, 14);\n\t\t//###\n\t\tfrmAnliseDeMapa.getContentPane().add(lblNewLabel);\n\t\t\n\t\t//###Campo que exibe o caminho do arquivo\n\t\ttextFieldEndereco = new JTextField();\n\t\ttextFieldEndereco.setBounds(288, 33, 387, 20);\n\t\ttextFieldEndereco.setEditable(false);\n\t\t//###\n\t\tfrmAnliseDeMapa.getContentPane().add(textFieldEndereco);\n\t\ttextFieldEndereco.setColumns(10);\n\t\t\n\t\t//Botao para abertura da janela para escolha do arquivo\n\t\tJButton btnBrowser = new JButton(\"Browser...\");\n\t\tJFileChooser fc = new JFileChooser();\n\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\t\t\n\t\t//evento do clique do botao \n\t\t//Abre janela do windows para selecao de arquivo e retorna endereco do arquivo para o campo de texto.\n\t\tbtnBrowser.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t\t int returnVal = fc.showOpenDialog(CorUI.this);\n\t\t\t\t if (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t File file = fc.getSelectedFile();\n\t\t\t\t\t\ttextFieldEndereco.setText(file.getPath());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Erro na abertura\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBrowser.setBounds(685, 32, 89, 23);\n\t\t//###\n\t\tfrmAnliseDeMapa.getContentPane().add(btnBrowser);\n\t\t\n\t\t//###Label para exibicao dos elementos no BD\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Selecione o tipo de elemento:\");\n\t\tlblNewLabel_1.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblNewLabel_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 11));\n\t\tlblNewLabel_1.setBounds(128, 75, 150, 14);\n\t\t//###\n\t\tfrmAnliseDeMapa.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tcomboBox.setBounds(288, 71, 387, 22);\n\t\tloadCombo(comboBox);\n\t\t\n\t\t//###\n\t\tfrmAnliseDeMapa.getContentPane().add(comboBox);\n\t\t\n\t\t//###Botao para analisar o arquivo conforme o elemento escolhido\n\t\tJButton btnAnalisar = new JButton(\"Analisar\");\n\t\t\n\t\tbtnAnalisar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString simbolo = (String) comboBox.getSelectedItem();\n\t\t\t\ttry {\n\t\t\t\t\tCollection<ItemDeAnaliseDTO> dados = logica\n\t\t\t\t\t\t\t.analisarImagem(textFieldEndereco.getText(), simbolo);\n\t\t\t\t\t\n\t\t\t\t\t//Inserir a String de Elemento por porcentagem\n\t\t\t\t\tloadAnalisePane(txtPaneElemento, dados);\n\t\t\t\t} catch (ClassNotFoundException | SQLException | IOException e1) {\n\t\t\t\t\tSystem.out.println(\"Erro na analise: \" + e1.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnAnalisar.setBounds(685, 119, 89, 23);\n\t\tfrmAnliseDeMapa.getContentPane().add(btnAnalisar);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(10, 153, 764, 202);\n\t\tfrmAnliseDeMapa.getContentPane().add(scrollPane);\n\t\t\n\t\t//Pane para exibir os elementos\n\t\tscrollPane.setViewportView(txtPaneElemento);\n\t\ttxtPaneElemento.setEditable(false);\n\t}", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButtonBack = new javax.swing.JButton();\n jButtonFisciano = new javax.swing.JButton();\n jButtonStandardMap = new javax.swing.JButton();\n jButtonPlay = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"DEAD ZONE\");\n setResizable(false);\n getContentPane().setLayout(null);\n\n jLabel3.setFont(new java.awt.Font(\"Papyrus\", 1, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Fisciano\");\n jLabel3.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel3);\n jLabel3.setBounds(510, 80, 120, 39);\n\n jLabel4.setFont(new java.awt.Font(\"Papyrus\", 1, 28)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel4);\n jLabel4.setBounds(460, 40, 216, 39);\n\n jLabel2.setFont(new java.awt.Font(\"Papyrus\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel2.setText(\"Standard Map\");\n jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n getContentPane().add(jLabel2);\n jLabel2.setBounds(120, 80, 170, 39);\n\n jButtonBack.setText(\"Back\");\n jButtonBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonBackActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonBack);\n jButtonBack.setBounds(60, 490, 59, 25);\n\n jButtonFisciano.setText(\"jButton1\");\n jButtonFisciano.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButtonFisciano.setBorderPainted(false);\n jButtonFisciano.setMaximumSize(new java.awt.Dimension(200, 200));\n jButtonFisciano.setPreferredSize(new java.awt.Dimension(200, 200));\n jButtonFisciano.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonFiscianoActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonFisciano);\n jButtonFisciano.setBounds(400, 140, 350, 250);\n\n jButtonStandardMap.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButtonStandardMap.setBorderPainted(false);\n jButtonStandardMap.setMaximumSize(new java.awt.Dimension(200, 200));\n jButtonStandardMap.setPreferredSize(new java.awt.Dimension(200, 200));\n jButtonStandardMap.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonStandardMapActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonStandardMap);\n jButtonStandardMap.setBounds(80, 130, 270, 270);\n\n jButtonPlay.setText(\"PLAY!\");\n jButtonPlay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonPlayActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonPlay);\n jButtonPlay.setBounds(350, 490, 65, 25);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/deadzone/sfondo_senza_spari.png\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(-10, -10, 930, 640);\n\n pack();\n setLocationRelativeTo(null);\n }", "public static void main(String[] args) {\n\t\t SwingUtilities.invokeLater(new Runnable() {\r\n\r\n\t public void run() {\r\n\r\n\t \tCharacterBuilderInterface ex = new CharacterBuilderInterface();\r\n\t ex.setVisible(true);\r\n\t }\r\n\t });\r\n\t}", "public MyGUI() {\n \t super(\"Mastermind\");\n \t guiManager = new GUIManager();\n createMenuComponents();\n createMastermindComponents(this,2);\n \n }", "protected void help() {\n println(\"go - Begin execution at Start or resume execution from current pc location\");\n println(\"go <loc1> - Begin execution at <loc1>\");\n println(\"step - Execute next step\");\n println(\"dump <loc1> <loc2> - Dump memory locations from (including) <loc1> - <loc2>\");\n println(\"dumpr - Dump a table of registers\");\n println(\"exit - Exit debugger\");\n println(\"deas <loc1> <loc2> - Deassmble memory locations from (including) <loc1> - <loc2>\");\n println(\"brkt - List the current break point table\");\n println(\"sbrk <loc1> - Set break point at <loc1>\");\n println(\"cbrk <loc1> - Clear break point at <loc1>\");\n println(\"cbrkt - Clear breakpoint table\");\n println(\"help - Print a summary of debugger commands\");\n println(\"chngr <r#> <value> - Change the value of register <r#> to <value>\");\n println(\"chngm <loc1 <value> - Change the value of memory loaction <loc1> to <value>\");\n }", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}", "public mythologyBattleGui() {\n initComponents();\n labelClear();\n groupBoardArea();\n playBoard.initGame();\n initRan(18);\n }", "public static void help() {\n\tSystem.out.println(\"-- Avaible options --\");\n\tSystem.out.println(\"-- [arg]: Required argument\");\n\tSystem.out.println(\"-- {arg}: Optional argument\");\n\tSystem.out.println(\"* -s {file} Save the game into a file\");\n\tSystem.out.println(\"* -r {file} Play or Replay a game from a file\");\n\tSystem.out.println(\"* -a [file] Play a binary file or a game file\");\n\tSystem.out.println(\"* -n [file] Create a random game file\");\n\tSystem.out.println(\"* -t [size] Specify the size of the board\");\n\tSystem.out.println(\"* -k Solve the game with the IA solver\");\n\tSystem.out.println(\"* -m Solve the game with the MinMax/AlphaBeta algorithm\");\n\tSystem.out.println(\"----------------------------------------------\");\n\tSystem.out.println(\". Press Enter to Start or Restart\");\n\tSystem.out.println(\". Press Z to Undo the last move\");\n\tSystem.out.println(\"\");\n }", "private static void displayHelp()\r\n {\r\n System.out.println(\"Usage: \");\r\n System.out.println(\"======\");\r\n System.out.println(\"\");\r\n System.out.println(\" -i=<file> : The input file name\");\r\n System.out.println(\" -o=<file> : The output file name\");\r\n System.out.println(\" -e : Write the output as embedded glTF\");\r\n System.out.println(\" -b : Write the output as binary glTF\");\r\n System.out.println(\" -c=<type> : The indices component type. \"\r\n + \"The <type> may be GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT \"\r\n + \"or GL_UNSIGNED_INT. The default is GL_UNSIGNED_SHORT\");\r\n System.out.println(\" -m : Create one mesh per primitive, \"\r\n + \"each attached to its own node.\");\r\n System.out.println(\" -h : Print this message.\");\r\n System.out.println(\" -v=<number> : The target glTF version. \"\r\n + \"The <number> may be 1 or 2. The default is 2.\");\r\n System.out.println(\"\");\r\n System.out.println(\"Example: \");\r\n System.out.println(\"========\");\r\n System.out.println(\"\");\r\n System.out.println(\" ObjToGltf -b -i=C:/Input/Example.obj \" \r\n + \"-o=C:/Output/Example.glb\");\r\n }", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: wtrocki@gmail.com\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "public static void main( String args[] ) throws IOException {\n\t\t\r\n\t\t\r\n\t\tmancalaFrame = new MancalaFrame(); // create Mancala Frame\r\n\t\tMenuBar menuBar = new MenuBar(); // Create Menu bar\r\n\t\tmancalaFrame.setDefaultCloseOperation( MancalaFrame.EXIT_ON_CLOSE ); // exit on close\r\n\t\tmancalaFrame.setJMenuBar(menuBar); // add menu bar\r\n\t\tmancalaFrame.setLocationRelativeTo(null); // open in center of screen\r\n\t\tMancalaTest.newGame();\r\n\t\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tJFrame frame=new JFrame();\n\t\tStart start=new Start();\n\t\tframe.add(start);\n\t\tframe.setSize(WIDTH, HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.addKeyListener(start.kl);\n\t\tframe.setVisible(true);\n\t\tstart.mos.add(start.sky);\n\t\tstart.mos.add(start.hero);\n\t\tstart.action();\n\n\t}", "public void processAbout() {\n AppMessageDialogSingleton dialog = AppMessageDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"About This Application\", \"Application Name: Metro Map Maker\\n\"\n + \"Written By: Myungsuk Moon and Richard McKenna\\n\"\n + \"Framework Used: DesktopJavaFramework (by Richard McKenna)\\n\"\n + \"Year of Work: 2017\");\n }", "void show_info() {\n\t\tsetAlwaysOnTop(false);\n\n\t\tString msg = \"<html><ul><li>Shortcuts:<br/>\"\n\t\t\t\t+ \"(\\\") start macro<br/>\"\n\t\t\t\t+ \"(esc) exit<br/><br/>\"\n\t\t\t\t+ \"<li>Author: <b>Can Kurt</b></ul></html>\";\n\n\t\tJLabel label = new JLabel(msg);\n\t\tlabel.setFont(new Font(\"arial\", Font.PLAIN, 15));\n\n\t\tJOptionPane.showMessageDialog(null, label ,\"Info\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\tsetAlwaysOnTop(true);\n\t}", "public void showGui()\n {\n // TODO\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\tx = e.getX();//gets the x and y values of the location clicked\r\n\t\t\ty = e.getY();\r\n\t\t\tif((x > 150 && x < 200) && (y > 50 && y < 150))\r\n\t\t\t{\r\n\t\t\t\t Mario myGUI = new Mario();//if they click mario start mario and exits the program\r\n\t\t\t\t this.dispose();\r\n\t\t\t}\r\n\t\t\telse if((x > 300 && x < 350) && (y > 50 && y < 150))\r\n\t\t\t{\r\n\t\t\t\t Luigi myGUI = new Luigi();//if they click luigi start luigi and exits the program\r\n\t\t\t\t this.dispose();\r\n\t\t\t}\r\n\t\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n boolean exit = false;\n String select;\n loadFromFile();\n do {\n System.out.println(\"Premier League Manager\");\n System.out.println(\"=================================\");\n System.out.println(\"Please enter A to Add Football Club\");\n System.out.println(\"Please enter D to Delete Football Club\");\n System.out.println(\"Please enter S to Display Club Statistics\");\n System.out.println(\"Please enter P to Display League Table\");\n System.out.println(\"Please enter M to Add Played Match\");\n System.out.println(\"Please enter G to Start GUI\");\n System.out.println(\"Please enter Q to Exit\");\n System.out.print(\"Please enter your choice: \");\n select = scanner.nextLine();\n switch (select){\n case \"A\":\n case \"a\" :\n addFootballClub();\n exit = false;\n break;\n case \"D\":\n case \"d\":\n deleteFootballClub();\n exit = false;\n break;\n case \"S\":\n case \"s\":\n displayStatistics();\n exit = false;\n break;\n case \"P\":\n case \"p\":\n displayLeagueTable();\n exit = false;\n break;\n case \"M\":\n case \"m\":\n addPlayedMatch();\n exit = false;\n break;\n case \"G\":\n case \"g\":\n gui();\n exit = false;\n break;\n case \"Q\":\n case \"q\":\n //saveToFile();\n System.exit(0);\n exit = true;\n default:\n System.out.println(\"Invalid choice! please try again\");\n exit = false;\n\n }\n }while (!exit);\n\n\n }", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "public InsectGUIInfo() {\r\n\t\texecInfos = new HashMap();\r\n\t}", "private static void showHelp(){\r\n JOptionPane.showMessageDialog(null, \"1. Choose the faculty.\\n\"\r\n + \"2. Type in the year when the school year started in format YYYY.\\n\"\r\n + \"3. Choose the semester.\\n\"\r\n + \"4. Enter subject codes separated by semicolon. You can add them all at once or add other subjects later.\\n\"\r\n + \"5. Press the Add button to load schedule options.\\n\"\r\n + \"6. Click on the loaded options you want to choose. Their color will turn red.\\n\"\r\n + \"7. Save the options you chose to the text file through File -> Save.\\n\",\r\n \"How-to\", JOptionPane.PLAIN_MESSAGE);\r\n }", "public void switchToMap()\n {\n feedbackLabel.setVisible(false);\n d.setVisible(false);\n a.setText(destinations[0].getName());\n b.setText(destinations[1].getName());\n c.setText(destinations[2].getName());\n currentClue=destinations[0].getRandClue();\n questionLabel.setText(currentClue);\n atQuestionStage=false;\n shuffleButtons();\n questionLabel.setBounds(650-questionLabel.getPreferredSize().width,120,600,30);\n mapImageLabel.setVisible(true);\n mapImageLabel.repaint();\n revalidate();\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "public menu(){\n\t\tsuper(\"Panter Map!\"); //setTitle(\"Map Counter\"); // \"super\" Frame sets its title\n\t\tthis.setBounds(0,0,getWidth(),getHeight()); //setSize(1433,700); // \"super\" Frame sets its initial window size\n\t\t// Exit the program when the close-window button clicked\n\t\ttry {\n\t\t\tString path = \"Ariel.jpg\";\n\t\t\tif(!path.endsWith(\"jpg\") && !path.endsWith(\"png\")) {\n\t\t\t\tthrow new IOException(\"Can't read input file!\");\n\t\t\t}\n\t\t\tthis.image =ImageIO.read(new File(path));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\t//cf = new ConvertFactory(this.getImg());\n\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t//\tpack();\n\n\t\tgame =new Game();\n\t\topenFileChosser= new JFileChooser();\n\t\topenFileChosser.setCurrentDirectory(new File(\"C:\\\\Users\\\\n&e\\\\eclipse-workspace\\\\second_year\\\\GeoLnfo_System\\\\csvFile\"));\n\t\t//openFileChosser.setFileFilter(new FileNameExtensionFilter(\"csv\"));\n\t\t//map=new Map();\n\t\t//this.image=map.getImg();\n\t}", "public void helpMenu()\n {\n System.out.println(\"*********************************************Help Menue**************************************************************\");\n System.out.println(\"Each player starts the game with zero points.\");\n System.out.println(\"Each player is given the following set of five tiles. Each tile has a value and an associated score\");\n System.out.println(\"For each round, each player will play ONE tile, with the tile value adding to the game total for that round.\"); \n System.out.println(\"Provided the game total is less than or equal to 21, the player will get the score for using that tile.\");\n System.out.println(\"If the game total is greater than 21\");\n System.out.println(\"no score is allocated to the player who played the last tile causing the score to become greater than 21.\");\n System.out.println(\"Once the round ends, Each player will get their score based on the total of the tiles they have used during the round.\");\n System.out.println(\"Any player who has NOT used the tile with the value of 5, will get a penalty of -3 points.\");\n System.out.println(\"The player who, after all deductions, has the highest score, will be the winner of that round and will get 5 points.\"); \n System.out.println(\"At the end of all the rounds, the player who has won the most rounds is declared the winner of the game.\");\n System.out.println(\"**********************************************************************************************************************\");\n getUserStringInput(\"Please enter continue\");\n }", "private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tkhachhangtra akhm = new khachhangtra();\n\t\takhm.setVisible(true);\n\t}", "public void welcome_screen() {\r\n\t\tclear_screen();\r\n\t\tJLabel kahoot_msg = new JLabel(\"Kahoot Java\", SwingConstants.CENTER);\r\n\t\tkahoot_msg.setFont(new Font(\"Calibri\", Font.BOLD, 50));\r\n\t\tkahoot_msg.setBounds(0,156, 1280,60 );\r\n\t\tthis.add(kahoot_msg);\r\n\t\tJLabel please_enter = new JLabel(\"Merci d'entrer les informations de connexion du serveur\", SwingConstants.CENTER);\r\n\t\tplease_enter.setFont(new Font(\"Calibri\", Font.PLAIN, 30));\r\n\t\tplease_enter.setBounds(0,204,1280,50);\r\n\t\tthis.add(please_enter);\r\n\r\n\t\tJLabel enter_ip = new JLabel(\"Entrez l'adresse IP du serveur : \");\r\n\t\tenter_ip.setBounds(320, 499, 320, 13);\r\n\t\tthis.add(enter_ip);\r\n\r\n\t\tJLabel enter_port = new JLabel(\"Entrez le port du serveur : \");\r\n\t\tenter_port.setBounds(320, 530, 320, 13);\r\n\t\tthis.add(enter_port);\r\n\r\n\t\t// JTextArea pour entrer les donn�es\r\n\t\tip = new JTextField(\"127.0.0.1\");\r\n\t\tip.setBounds(640, 497, 320, 16);\r\n\t\tthis.add(ip);\r\n\r\n\t\tport = new JTextField(\"50000\");\r\n\t\tport.setBounds(640, 530, 320, 16);\r\n\t\tthis.add(port);\r\n\r\n\t\tlogin_btn = new JButton(\"Se Connecter\");\r\n\t\tlogin_btn.setBounds(515,640,250,30);\r\n\t\tlogin_btn.addActionListener(this);\r\n\t\tthis.add(login_btn);\r\n\r\n\t}", "public static void main(String args[]) \n {\n\n \n \n \tNewFrame.introDialog();\n EvolutionGame game = new EvolutionGame();\n \n \n while(true)\n\n {\n Area nextArea = ioUtils.enterCommand(character);\n\n if(!character.fighting)\n {\n if(nextArea != character.currentArea)\n\n {\n\n character.moveToArea(nextArea);\n NewFrame.setAreaDescription();\n NewFrame.addCharacters();\n\n }\n }\n else\n {\n\n }\n \n\n }\n\n }" ]
[ "0.63488334", "0.6343645", "0.62703216", "0.623675", "0.6168266", "0.6123709", "0.6050118", "0.601863", "0.60095894", "0.60089034", "0.6005152", "0.60034853", "0.5991637", "0.5988258", "0.59866154", "0.5974642", "0.59507746", "0.5942646", "0.5919659", "0.59118336", "0.59062904", "0.59055775", "0.589422", "0.5868461", "0.5818848", "0.58187735", "0.58159775", "0.5799479", "0.57959855", "0.578313", "0.5776227", "0.577401", "0.57703054", "0.577004", "0.5767658", "0.5765459", "0.5764094", "0.57599217", "0.5751187", "0.5748613", "0.57471603", "0.57462984", "0.57462186", "0.5743613", "0.57425386", "0.5731706", "0.57311046", "0.57198304", "0.5719273", "0.5715381", "0.5714845", "0.57029265", "0.5699858", "0.5695807", "0.5691185", "0.568899", "0.56884855", "0.5687644", "0.56851894", "0.568025", "0.56698704", "0.5668224", "0.5663223", "0.56578106", "0.5654913", "0.5651858", "0.5646296", "0.56420887", "0.5641724", "0.563797", "0.56312317", "0.5627352", "0.5614933", "0.5612874", "0.56026727", "0.5601297", "0.5599736", "0.5594216", "0.5593253", "0.5592935", "0.5592527", "0.5592442", "0.55912685", "0.5589057", "0.5588774", "0.5584088", "0.55807817", "0.5578337", "0.55771726", "0.5576778", "0.5576419", "0.55720884", "0.55717", "0.5571531", "0.5569213", "0.5568678", "0.5568221", "0.5566504", "0.5564883", "0.55620974" ]
0.7728255
0
Makes a CLI Hallway location by adding rooms to a location
@Override protected void createLocationCLI() { /*The rooms in the hallway01 location are created---------------------*/ /*Hallway-------------------------------------------------------------*/ Room hallway = new Room("Hallway 01", "This hallway connects the Personal, Laser and Net"); super.addRoom(hallway); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "Location createLocation();", "Location createLocation();", "Location createLocation();", "public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }", "private void makeRoute(Route route, AbstractPort location1, AbstractPort location2) {\n route.add(location1);\n route.add(closestCrossing(location1.getLocation(), location2.getLocation()));\n route.add(location2);\n registerGameObject(route);\n }", "public void createHallway(int len) {\n createRoom(len, 0, 0);\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}", "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "private void AddLocation () {\n Location mLocation = new Location();\n mLocation.SetId(1);\n mLocation.SetName(\"Corner Bar\");\n mLocation.SetEmail(\"contact.email.com\");\n mLocation.SetAddress1(\"1234 1st Street\");\n mLocation.SetAddress2(\"\");\n mLocation.SetCity(\"Minneapolis\");\n mLocation.SetState(\"MN\");\n mLocation.SetZip(\"55441\");\n mLocation.SetPhone(\"612-123-4567\");\n mLocation.SetUrl(\"www.cornerbar.com\");\n\n ParseACL acl = new ParseACL();\n\n // Give public read access\n acl.setPublicReadAccess(true);\n mLocation.setACL(acl);\n\n // Save the post\n mLocation.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n\n }\n });\n }", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "public void buildLocation() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS location (location_name\"\n + \" TEXT, lat REAL, lon REAL PRIMARY KEY (location_name));\")) {\n prep.executeUpdate();\n } catch (final SQLException e) {\n e.printStackTrace();\n }\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "private void createAccess(ArrayList<Room> rooms) {\n\n rooms.get(0).setNorth(rooms.get(1));\n\n rooms.get(1).setEast(rooms.get(2));\n rooms.get(1).setWest(rooms.get(4));\n rooms.get(1).setSouth(rooms.get(0));\n\n rooms.get(2).setWest(rooms.get(1));\n rooms.get(2).setNorth(rooms.get(10));\n rooms.get(2).setEast(rooms.get(3));\n\n rooms.get(3).setWest(rooms.get(2));\n\n rooms.get(4).setWest(rooms.get(5));\n rooms.get(4).setNorth(rooms.get(8));\n rooms.get(4).setEast(rooms.get(1));\n\n rooms.get(5).setNorth(rooms.get(7));\n rooms.get(5).setSouth(rooms.get(6));\n rooms.get(5).setEast(rooms.get(4));\n\n rooms.get(6).setNorth(rooms.get(5));\n\n rooms.get(7).setNorth(rooms.get(13));\n rooms.get(7).setSouth(rooms.get(5));\n\n rooms.get(8).setEast(rooms.get(9));\n rooms.get(8).setSouth(rooms.get(4));\n\n rooms.get(9).setWest(rooms.get(8));\n rooms.get(9).setNorth(rooms.get(15));\n rooms.get(9).setEast(rooms.get(10));\n\n rooms.get(10).setWest(rooms.get(9));\n rooms.get(10).setEast(rooms.get(11));\n rooms.get(10).setSouth(rooms.get(2));\n\n rooms.get(11).setWest(rooms.get(10));\n\n rooms.get(12).setEast(rooms.get(13));\n\n rooms.get(13).setWest(rooms.get(12));\n rooms.get(13).setEast(rooms.get(14));\n rooms.get(13).setSouth(rooms.get(7));\n\n rooms.get(14).setWest(rooms.get(13));\n rooms.get(14).setNorth(rooms.get(18));\n rooms.get(14).setEast(rooms.get(15));\n\n rooms.get(15).setWest(rooms.get(14));\n rooms.get(15).setNorth(rooms.get(19));\n rooms.get(15).setEast(rooms.get(16));\n rooms.get(15).setSouth(rooms.get(9));\n\n rooms.get(16).setWest(rooms.get(15));\n rooms.get(16).setEast(rooms.get(17));\n\n rooms.get(17).setWest(rooms.get(16));\n\n rooms.get(18).setSouth(rooms.get(14));\n\n rooms.get(19).setSouth(rooms.get(13));\n\n }", "Builder addLocationCreated(String value);", "@Override\n\tpublic void updateLocation(String roomLocation, String sideLocation) {\n\t\tthis.room = roomLocation;\n\t\tthis.side = sideLocation;\n\t}", "public RTWLocation append(Object... list);", "public void setBasicNewGameWorld()\r\n\t{\r\n\t\tlistCharacter = new ArrayList<Character>();\r\n\t\tlistRelationship = new ArrayList<Relationship>();\r\n\t\tlistLocation = new ArrayList<Location>();\r\n\t\t\r\n\t\t//Location;\r\n\t\t\r\n\t\tLocation newLocationCity = new Location();\r\n\t\tnewLocationCity.setToGenericCity();\r\n\t\tLocation newLocationDungeon = new Location();\r\n\t\tnewLocationDungeon.setToGenericDungeon();\r\n\t\tLocation newLocationForest = new Location();\r\n\t\tnewLocationForest.setToGenericForest();\r\n\t\tLocation newLocationJail = new Location();\r\n\t\tnewLocationJail.setToGenericJail();\r\n\t\tLocation newLocationPalace = new Location();\r\n\t\tnewLocationPalace.setToGenericPalace();\r\n\t\t\r\n\t\tlistLocation.add(newLocationCity);\r\n\t\tlistLocation.add(newLocationDungeon);\r\n\t\tlistLocation.add(newLocationForest);\r\n\t\tlistLocation.add(newLocationJail);\r\n\t\tlistLocation.add(newLocationPalace);\r\n\t\t\r\n\t\t\r\n\t\t//Item\r\n\t\tItem newItem = new Item();\r\n\t\t\r\n\t\tString[] type =\t\tnew String[]\t{\"luxury\"};\r\n\t\tString[] function = new String[]\t{\"object\"};\t\r\n\t\tString[] property = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900101,\"diamond\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationPalace.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"weapon\"};\r\n\t\tfunction = new String[]\t{\"equipment\"};\t\r\n\t\tproperty = new String[]\t{\"weapon\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(500101,\"dagger\", type, function, \"null\", property, 1, false);\t\t\r\n\t\tnewLocationJail.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\ttype =\t\tnew String[]\t{\"quest\"};\r\n\t\tfunction = new String[]\t{\"object\"};\t\r\n\t\tproperty = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900201,\"treasure_map\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationDungeon.addOrUpdateItem(newItem);\r\n\r\n\t\t\r\n\t\t////// Add very generic item (10+ items of same name)\r\n\t\t////// These item start ID at 100000\r\n\t\t\r\n\t\t//Add 1 berry\r\n\t\t//100000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"berry\"};\r\n\t\tnewItem.setNewItem(100101,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100103,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t*/\r\n\r\n\t\t\r\n\t\t//Add 2 poison_plant\r\n\t\t//101000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem.setNewItem(100201,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100202,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\r\n\t\t//player\r\n\t\tCharacter newChar = new Character(\"player\", 1, true,\"city\", 0, false);\r\n\t\tnewChar.setIsPlayer(true);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//UNIQUE NPC\r\n\t\tnewChar = new Character(\"mob_NPC_1\", 15, true,\"city\", 0, false);\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\t\t\r\n\t\tnewChar = new Character(\"king\", 20, true,\"palace\", 3, true);\r\n\t\tnewChar.addOccupation(\"king\");\r\n\t\tnewChar.addOccupation(\"noble\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\r\n\t\t//Mob character\r\n\t\tnewChar = new Character(\"soldier1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// REMOVE to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"soldier2\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"soldier3\", 20, true,\"palace\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//listLocation.add(newLocationCity);\r\n\t\t//listLocation.add(newLocationDungeon);\r\n\t\t//listLocation.add(newLocationForest);\r\n\t\t//listLocation.add(newLocationJail);\r\n\t\t//listLocation.add(newLocationPalace);\r\n\t\t\r\n\t\tnewChar = new Character(\"doctor1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addSkill(\"heal\");\r\n\t\tnewChar.addOccupation(\"doctor\");\r\n\t\tlistCharacter.add(newChar);\t\r\n\t\tnewChar = new Character(\"blacksmith1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"blacksmith\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"thief1\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"thief\");\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"unlock\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(300101,\"lockpick\", type, function, \"thief1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// Remove to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"messenger1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"messenger\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\tnewChar = new Character(\"miner1\", 20, true,\"dungeon\", 1, true);\r\n\t\tnewChar.addOccupation(\"miner\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"lumberjack1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"lumberjack\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewChar = new Character(\"scout1\", 20, true,\"forest\", 2, true);\r\n\t\tnewChar.addOccupation(\"scout\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"farmer1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"farmer\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"merchant1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addOccupation(\"merchant\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\t// Merchant Item\r\n\t\t//NPC item start at 50000\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200101,\"potion_poison\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"healing\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200201,\"potion_heal\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"cure_poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200301,\"antidote\", type, function, \"merchant1\", property, 1, false);\t\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\t//add merchant to List\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Relation\r\n\t\tRelationship newRelation = new Relationship();\r\n\t\tnewRelation.setRelationship(\"merchant1\", \"soldier1\", \"friend\");\r\n\t\tlistRelationship.add(newRelation);\r\n\t\t\r\n\t\t//\r\n\t\r\n\t}", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "private void setLocation(){\r\n\t\t//make the sql command\r\n\t\tString sqlCmd = \"INSERT INTO location VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"');\";\r\n\r\n\t\ttry {//start SQL statement\r\n\t\t\tstmt.executeUpdate(sqlCmd);\r\n\t\t} catch (SQLException e) {\r\n\t\t\terror = true;\r\n\t\t\tout.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");\r\n\t}", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n anteriorRoom.push(currentRoom);\n currentRoom = nextRoom;\n printLocationInfo();\n }\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public AddressSetView addToView(ProgramLocation loc);", "public void addLocation(Location location)\n {\n locationLst.add(location);\n }", "private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }", "private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "Builder addLocationCreated(Place value);", "public void buildLocations() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS locations (id TEXT, latitude\"\n + \" REAL, longitude REAL, name TEXT, PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n \n \n \n String direction = command.getSecondWord();\n Room nextRoom = currentRoom.getExit(direction); \n \n if (nextRoom == null) \n {\n System.out.println(\"There is no door!\");\n }\n else \n {\n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n printInfo();\n }\n \n }", "public void makeRoom(int location)\r\n\t{\r\n\t\t//if that location isnt in the back\r\n\t\t//shift to the next index to create space\r\n\t\tif(location!=backIndex+1)\r\n\t\t\tfor(int i=backIndex; i>=location; i++)\r\n\t\t\t{\r\n\t\t\t\tnormalQueue[i+1]=normalQueue[i];\r\n\t\t\t\tpriorityQueue[i+1]=priorityQueue[i+1];\r\n\t\t\t}\r\n\t\t//continue iterating through the back\r\n\t\tbackIndex++;\r\n\t}", "Builder addLocationCreated(Place.Builder value);", "public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory = new ArrayList<>();\n\tArrayList<Exit> kitchenExits = new ArrayList<>();\n\tRoom Kitchen = new Room(\"Kitchen\", \"This is a very large kitchen.\", kitchenInventory, kitchenExits);\n\n\t//dining room\n\tArrayList<Item> diningInventory = new ArrayList<>();\n\tArrayList<Exit> diningExits = new ArrayList<>();\n\tRoom Dining = new Room(\"Dining Room\", \"This dining room is set for 12 people\", diningInventory, diningExits);\n\n\t//lounge\n\tArrayList<Item> loungeInventory = new ArrayList<>();\n\tArrayList<Exit> loungeExits = new ArrayList<>();\n\tRoom Lounge = new Room(\"Lounge\", \"The Lounge is a mess, and there are blood spatters on the wall\", loungeInventory, loungeExits);\n\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"Fill rooms with objects\">\n\thallInventory.add(new Item(\"a fruit bowl\", \"The fruit bowl contains some fruit\"));\n\thallInventory.add(new Item(\"a clock\", \"Tick Tock\"));\n\tkitchenInventory.add(new Item(\"a stove\", \"The stove is very hot\"));\n\tkitchenInventory.add(new Item(\"a knife\", \"The knife is blunt\"));\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"add exits to rooms\">\n\thallExits.add(new Exit(1, Lounge));\n\thallExits.add(new Exit(4, Dining));\n\tloungeExits.add(new Exit(2, Hall));\n\tdiningExits.add(new Exit(3, Hall));\n\tdiningExits.add(new Exit(4, Kitchen));\n\tkitchenExits.add(new Exit(3, Dining));\n\t//</editor-fold>\n\n\t//create character : Avatar\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"character creation\">\n\tArrayList<Item> invent = new ArrayList<>();\n\tCharacter Avatar = new Character(\"Tethys\", \"A tall elf dressed in armour\", 100, invent);\n\tinvent.add(new Item(\"armour\", \"leather armour\"));\n\t//</editor-fold>\n\t//begin\n\tRoom currentLoc = Hall;\n\tSystem.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\tcurrentLoc.printInventory();\n\tcurrentLoc.printExits();\n\n\tBufferedReader command = new BufferedReader(new InputStreamReader(System.in));\n\tString orders = null;\n\twhile (true) {\n\t System.out.print(\"What do you want to do? \");\n\t try {\n\t\torders = command.readLine();\n\t } catch (IOException ioe) {\n\t\tSystem.out.println(\"I'm sorry, I didn't understand that!\");\n\t\tSystem.exit(1);\n\t }\n\n\t String[] orderWords = orders.split(\" \");\n\n//\t for (String s : orderWords){\n//\t\tSystem.out.print(s);\n\t switch (orderWords[0].toLowerCase()) {\n\t\tcase \"go\":\n\t\t int count = 0;\n\t\t for (Exit e : currentLoc.getExits()) {\n\t\t\tString direct = orderWords[1].toUpperCase();\n\t\t\tif (direct.equals(e.getDirectionName())) {\n\t\t\t currentLoc = e.getLeadsTo();\n\t\t\t count++;\n\t\t\t System.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\t\t\t currentLoc.printInventory();\n\t\t\t currentLoc.printExits();\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (count == 0) {\n\t\t\tSystem.out.print(\"I'm sorry, I can't go that way.\\n\");\n\t\t }\n\t\t break;\n\n\t\tcase \"pick\":\n\n\n\t\tcase \"put\":\n\n\n\t\tcase \"exit\":\n\t\t System.exit(0);\n\t\t break;\n\t }\n\n\t}\n\n\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n locations.put(0, new Location(0, \"You are sitting infront of a computer learning java\"));\n locations.put(1, new Location(1, \"You are standing at the end of a road\"));\n locations.put(2, new Location(2, \"You are at the top of the hill\"));\n locations.put(3, new Location(3, \"You are inside a building\"));\n locations.put(4, new Location(4, \"You are in a valley beside the stream\"));\n locations.put(5, new Location(5, \"You are in the forest\"));\n\n locations.get(1).addExit(\"W\", 2);\n locations.get(1).addExit(\"E\", 3);\n locations.get(1).addExit(\"S\", 4);\n locations.get(1).addExit(\"N\", 5);\n// locations.get(1).addExit(\"Q\", 0);\n\n locations.get(2).addExit(\"N\", 5);\n// locations.get(2).addExit(\"Q\", 0);\n\n locations.get(3).addExit(\"W\", 1);\n// locations.get(3).addExit(\"Q\", 0);\n\n locations.get(4).addExit(\"N\", 1);\n locations.get(4).addExit(\"W\", 2);\n// locations.get(4).addExit(\"Q\", 0);\n\n locations.get(5).addExit(\"S\", 1);\n// locations.get(5).addExit(\"Q\", 0);\n\n\n\n// System.out.println(locations.containsKey(6));\n int loc = 1;\n while(true){\n System.out.println(locations.get(loc).getDescription());\n if(loc ==0){\n break;\n }\n\n Map<String , Integer> exits = locations.get(loc).getExits();\n System.out.println(\"Available exits are \");\n for(String exit: exits.keySet()) {\n System.out.print(exit + \", \");\n }\n System.out.println();\n String[] str = sc.nextLine().split(\" \");\n String direction = \"\";\n if(str.length == 1){\n direction = str[0].toUpperCase();\n } else{\n for(String s: str){\n if(s.equalsIgnoreCase(\"North\")){\n direction = \"N\";\n }\n if(s.equalsIgnoreCase(\"South\")){\n direction = \"S\";\n }\n if(s.equalsIgnoreCase(\"West\")){\n direction = \"W\";\n }\n if(s.equalsIgnoreCase(\"East\")){\n direction = \"E\";\n }\n }\n }\n\n// String direction = sc.nextLine().toUpperCase();\n\n if(exits.containsKey(direction)){\n loc = exits.get(direction);\n } else{\n System.out.println(\"You cannot go in that direction\");\n }\n\n// else {\n// loc = sc.nextInt();\n// if(locations.containsKey(loc)){\n//\n// } else {\n// System.out.println(\"You cannot go in that direction\");\n// }\n// }\n }\n\n }", "public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}", "public void makeRoom(String name, String desc){\n\tRoom buffer = new Room(name,desc,gx,gy);\n\n\t//Add adjacencies\n\tif(gy > 0 && rooms[gx][gy - 1] != null){\n\t buffer.addCompass(0, rooms[gx][gy - 1].getRoomName());\n\t rooms[gx][gy - 1].addCompass(1, name);\n\t}\n\tif(gy < 6 && rooms[gx][gy + 1] != null){\n\t buffer.addCompass(1, rooms[gx][gy + 1].getRoomName());\n\t rooms[gx][gy + 1].addCompass(0, name);\n\t}\n\tif(gx < 6 && rooms[gx + 1][gy] != null){\n\t buffer.addCompass(2, rooms[gx + 1][gy].getRoomName());\n\t rooms[gx + 1][gy].addCompass(3, name);\n\t}\n\tif(gx > 0 && rooms[gx - 1][gy] != null){\n\t buffer.addCompass(3, rooms[gx - 1][gy].getRoomName());\n\t rooms[gx - 1][gy].addCompass(2, name);\n\t}\n\t\n\trooms[gx][gy] = buffer;\t\n\trevalidate();\n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "public void generate() {\n\t\tLocation location0 = new Location();\n\t\tlocation0.setAddress(\"Zhong Nan Hai\");\n\n\t\tlocation0.setLatitude(0.0);\n\t\tlocation0.setLongitude(0.0);\n;\n\t\tTestDriver.locationList.add(location0);\n\t\t\n\t\t\n\t\tLocation location1 = new Location();\n\t\tlocation1.setAddress(\"Tian An Men\");\n\t\tlocation1.setLatitude(0.1);\n\t\tlocation1.setLongitude(0.1);\n\n\t\tTestDriver.locationList.add(location1);\n\t\t\n\t\t\n\t\tLocation location2 = new Location();\n\t\tlocation2.setAddress(\"White House\");\n\t\tlocation2.setLatitude(100.21);\n\t\tlocation2.setLongitude(102.36);\n\t\tTestDriver.locationList.add(location2);\n\t}", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "public void populateRooms(){\n }", "public static void map(int location)\n\t{\n\t\tswitch(location)\n\t\t{\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * X # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 8:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 11:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 12:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # X # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\");\n\t\t}//end switch(location)\n\t\t\n\t}", "public static void AddLocation(Location location){\n\ttry (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT City, AirportCode from Location\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateString(\"City\", location.getCity());\n resultSet.updateString(\"AirportCode\", location.getAirportCode());\n resultSet.insertRow();\n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n }", "public void updateLocation();", "private void addRouteMArkers()\n {\n //routeMarker.add(new MarkerOptions().position(new LatLng(geo1Dub,geo2Dub)));\n\n }", "public int addAirport(Vector location, Vector heading){\n\t\t//get the parameters needed for airport generation\n\t\tMap<Integer, WorldAirport> airports = this.getAirportMap();\n\t\t//first check if the width and length are already defined, if not define them now\n\t\tint newID = this.getNextAirportID();\n\t\t//generate the airport\n\t\tWorldAirport airport = new WorldAirport(location, heading, this.getRunwayWidth(), this.getRunwayLength(), newID);\n\t\tairports.put(newID, airport);\n\t\treturn newID;\n\t}", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public Mountain(String name, int height, String location){\n this.name = name;\n this.height = height;\n this.location = location;\n }", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "private Room boxCreatorFromHallway(Hallway hallway) {\n int[] previous = hallway.bottomleft;\n int length = hallway.length;\n String pdirection = hallway.orientation;\n int width = r.nextInt(5) + 5;\n int height = r.nextInt(6) + 5;\n if (pdirection.equals(\"up\")) {\n int[] coordinates = new int[2];\n coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1;\n coordinates[1] = previous[1] + length;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room \" + (this.numberofRooms + 1);\n String received = \"S\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0] + 1][previous[1] + length] = Tileset.FLOWER;\n this.rooms.put(this.numberofRooms, room);\n return room;\n }\n } else if (pdirection.equals(\"down\")) {\n int[] coordinates = new int[2];\n coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1;\n coordinates[1] = previous[1] - height;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room \" + (this.numberofRooms + 1);\n String received = \"N\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0] + 1][previous[1]] = Tileset.FLOWER;\n this.rooms.put(this.numberofRooms, room);\n return room;\n }\n } else if (pdirection.equals(\"right\")) {\n int[] coordinates = new int[2];\n coordinates[0] = previous[0] + length;\n coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room\" + (this.numberofRooms + 1);\n String received = \"W\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0] + length][previous[1] + 1] = Tileset.FLOWER;\n this.rooms.put(numberofRooms, room);\n return room;\n }\n } else {\n int[] coordinates = new int[2];\n coordinates[0] = previous[0] - width;\n coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room\" + (this.numberofRooms + 1);\n String received = \"E\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0]][previous[1] + 1] = Tileset.FLOWER;\n this.rooms.put(this.numberofRooms, room);\n return room;\n }\n }\n }", "static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) \n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n //remove energy from the player everytime he switches rooms\n p.energy -= 10;\n System.out.println(\"Energy: \" + p.energy);\n \n \n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n \n }\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public LocationBuilder() {\n super(\"locations\");\n }", "public long addLoc(String location) {\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_LOC_NAME, location); \n return db.insert(DATABASE_TABLE_LOC, null, initialValues);\n }", "public static void createMap()\n\t\t\t{\n\t\t\tmap = new Vector<Location>(4);\n\t\n\t\t\tLocation location1 = new Location(\"the southwest room.\",\"You see doors to the north and east.\");\n\t\t\tLocation location2 = new Location(\"the southeast room.\",\"You see doors to the north and west.\");\n\t\t\tLocation location3 = new Location(\"the northwest room.\",\"You see doors to the south and east.\");\n\t\t\tLocation location4 = new Location(\"the northeast room.\",\"You see doors to the south and west.\");\n\n\t\t\tmap.addElement(location1);\n\t\t\tmap.addElement(location2);\n\t\t\tmap.addElement(location3);\n\t\t\tmap.addElement(location4);\n\t\t\t\n\t\t\t// This section defines the exits found in each location and the \n\t\t\t// locations to which they lead.\n\t\t\tlocation1.addExit(new Exit(Exit.north, location3));\n\t\t\tlocation1.addExit(new Exit(Exit.east, location2));\n\t\t\tlocation2.addExit(new Exit(Exit.north, location4));\n\t\t\tlocation2.addExit(new Exit(Exit.west, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.south, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.east, location4));\n\t\t\tlocation4.addExit(new Exit(Exit.west, location3));\n\t\t\tlocation4.addExit(new Exit(Exit.south, location2));\n\t\t\t\n\t\t\tcurrentLocation = location1;\t\t\t\t\n\t\t\t}", "public abstract void updateLocation(Location location, String newLocationName, int newLocationCapacity);", "public void setBedSpawnLocation ( Location location ) {\n\t\texecute ( handle -> handle.setBedSpawnLocation ( location ) );\n\t}", "void addLocation(Location location) {\n\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, location.getName()); // assign location name\n values.put(KEY_CATEGORY, location.getCategory()); // religion\n values.put(KEY_DESCRIPTION, location.getDescription()); // description\n values.put(KEY_LATITUDE, location.getLatitude());\n values.put(KEY_LONGITUDE, location.getLongitude());\n\n // Inserting Row\n db.insert(TABLE_LOCATIONS, null, values);\n db.close(); // Closing database connection\n }", "public boolean reserveRoom(int id, int customerID, String location)\n throws RemoteException, DeadlockException;", "@Test\n\tpublic void addRoadTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\tLocation l1 = new Location(\"Guildford\");\n\t\tLocation l2 = new Location(\"Portsmouth\");\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n assertEquals(l1.getName(), m.getNode(\"Guildford\").getName());\t//Tests that the method added the roads correctly to teh map\n assertEquals(l2.getName(), m.getNode(\"Portsmouth\").getName());\n\t}", "@java.lang.Deprecated public google.maps.fleetengine.v1.TerminalLocation.Builder addRouteBuilder() {\n return getRouteFieldBuilder().addBuilder(\n google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance());\n }", "public void spawnEnemy(Location location) {\r\n\t\t\tlocation.addNpc((Npc) this.getNpcSpawner().newObject());\r\n\t\t}", "private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n System.out.println(\"That way is blocked!\");\n }\n else {\n lastRoom = currentRoom;\n multiLastRooms.push (lastRoom);\n currentRoom = nextRoom;\n timer = timer + 1;\n System.out.println(currentRoom.getLongDescription());\n }\n }", "Room mo12151c();", "public void add(Location loc, Evolver occupant)\n {\n occupant.putSelfInGrid(getGrid(), loc);\n }", "RoomInfo room(String name);", "void makeMove(Location loc);", "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "public Location addLocation(final Location location) {\n route.add(location);\n return location;\n }", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "public int addHome(UUID uuid, String name, Location loc){\r\n\t\t//Load Map (Update)\r\n\t\tloadMap();\r\n\r\n\t\t//Combovar of Homename & UUID of Player\r\n\t\tString uniqhome = uuid.toString() + name;\r\n\r\n\t\t//Create new HomePoint and write it to Map\r\n\t\tif(!map.containsKey(uniqhome)){\r\n\t\t\tmap.put(uniqhome, loc.getWorld().getName() + \";\" + loc.getX() + \";\" + loc.getY() + \";\" + loc.getZ() + \";\" + loc.getYaw() + \";\" + loc.getPitch());\r\n\t\t} else {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\t\t//Save Map\r\n\t\ttry {\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\toos.writeObject(map);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 2;\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}", "public void setLocation(String location);", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\\n\");\n }\n else {\n moveRooms.push(currentRoom);\n currentRoom = nextRoom;\n look();\n }\n }", "public int queryRooms(int id, String location)\n throws RemoteException, DeadlockException;", "public void initAndSetWorld() {\n\t\tHashMap<String, Location> gameWorld = new HashMap<String, Location>();\r\n\t\tthis.world = gameWorld;\r\n\t\t\r\n\t\t// CREATING AND ADDING LOCATIONS, LOCATION AND ITEM HASHES ARE AUTOMATICALLY SET BY CALLING CONSTRUCTOR\r\n\t\tLocation valley = new Location(\"valley\", \"Evalon Valley. A green valley with fertile soil.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(valley);\r\n\t\tLocation plains = new Location(\"plains\", \"West Plains. A desolate plain.\",\r\n\t\t\t\t\"You cannot go in that direction. There is nothing but dust over there.\",true);\r\n\t\tthis.addLocation(plains);\r\n\t\tLocation mountain = new Location(\"mountain\", \"Northern Mountains. A labyrinth of razor sharp rocks.\",\r\n\t\t\t\t\"You cannot go in that direction. The Mountain is not so easily climbed.\",true);\r\n\t\tthis.addLocation(mountain);\r\n\t\tLocation shore = new Location(\"shore\", \"Western Shore. The water is calm.\",\r\n\t\t\t\t\"You cannot go in that direction. There might be dangerous beasts in the water.\",true);\r\n\t\tthis.addLocation(shore);\r\n\t\tLocation woods = new Location(\"woods\", \"King's Forest. A bright forest with high pines.\",\r\n\t\t\t\t\"You cannot go in that direction. Be careful not to get lost in the woods.\",true);\r\n\t\tthis.addLocation(woods);\r\n\t\tLocation hills = new Location(\"hills\", \"Evalon hills.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(hills);\r\n\t\tLocation cave = new Location(\"cave\", \"Blood Cave. Few of those who venture here ever return.\",\r\n\t\t\t\t\"The air smells foul over there, better not go in that direction.\",true);\r\n\t\tthis.addLocation(cave);\r\n\t\tLocation innercave = new Location(\"innercave\", \"Blood Cave. This path must lead somewhere.\",\r\n\t\t\t\t\"Better not go over there.\",true);\r\n\t\t\r\n\t\tLocation westhills = new Location(\"westhills\", \"Thornhills. A great many trees cover the steep hills.\",\r\n\t\t\t\t\"You cannot go in that direction. Watch out for the thorny bushes.\",true);\r\n\t\tthis.addLocation(westhills);\r\n\t\t\r\n\t\tLocation lake = new Location(\"lake\", \"Evalon Lake. A magnificent lake with a calm body of water.\",\r\n\t\t\t\t\"You cannot go in that direction, nothing but fish over there.\",true);\r\n\t\tthis.addLocation(lake);\r\n\t\t\r\n\t\tLocation laketown = new Location(\"laketown\", \"Messny village. A quiet village with wooden houses and a dirt road.\",\r\n\t\t\t\t\"You cannot go in that direction, probably nothing interesting over there.\",true);\r\n\t\t\r\n\t\tLocation inn = new Room(\"inn\", \"Messny Inn. A small but charming inn in the centre of the village.\",\r\n\t\t\t\t\"You cannot go in that direction.\",false);\r\n\t\t\r\n\t\t// CONNECTING LOCATIONS\r\n\t\t// IT DOES NOT MATTER ON WHICH LOCATION THE METHOD ADDPATHS IS CALLED\r\n\t\tvalley.addPaths(valley, \"east\", plains, \"west\");\r\n\t\tvalley.addPaths(valley, \"north\", mountain, \"south\");\r\n\t\tvalley.addPaths(valley, \"west\", shore, \"east\");\r\n\t\tvalley.addPaths(valley, \"south\", woods, \"north\");\r\n\t\twoods.addPaths(woods, \"east\", hills, \"west\");\r\n\t\thills.addPaths(hills, \"south\", westhills, \"north\");\r\n\t\twesthills.addPaths(westhills, \"west\", lake, \"east\");\r\n\t\tlake.addPaths(woods, \"south\", lake, \"north\");\r\n\t\tlake.addPaths(lake, \"west\", laketown, \"east\");\r\n\t\tmountain.addPaths(mountain, \"cave\", cave, \"exit\");\r\n\t\tlaketown.addPaths(laketown, \"inn\", inn, \"exit\");\r\n\t\t\r\n\r\n\t\t\r\n\t\t// CREATE EMPTY ARMOR SET FOR GAME START AND UNEQUIPS\r\n\t\tBodyArmor noBodyArmor = new BodyArmor(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBodyArmor(noBodyArmor);\r\n\t\tBoots noBoots = new Boots(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBoots(noBoots);\r\n\t\tHeadgear noHeadgear = new Headgear(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultHeadgear(noHeadgear);\r\n\t\tGloves noGloves = new Gloves(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultGloves(noGloves);\r\n\t\tWeapon noWeapon = new Weapon(\"unarmored\", 0, 0, true, 5, false);\r\n\t\tthis.setDefaultWeapon(noWeapon);\r\n\t\t\r\n\t\tthis.getPlayer().setBodyArmor(noBodyArmor);\r\n\t\tthis.getPlayer().setBoots(noBoots);\r\n\t\tthis.getPlayer().setGloves(noGloves);\r\n\t\tthis.getPlayer().setHeadgear(noHeadgear);\r\n\t\tthis.getPlayer().setWeapon(noWeapon);\r\n\t\t\r\n\t\t\r\n\t\t// CREATING AND ADDING ITEMS TO PLAYER INVENTORY \r\n\t\tItem potion = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tthis.getPlayer().addItem(potion);\r\n\t\tWeapon sword = new Weapon(\"sword\", 10, 200, true, 10, false);\r\n\t\tvalley.addItem(sword);\r\n\t\t\r\n\t\tWeapon swordEvalon = new Weapon(\"EvalonianSword\", 15, 400, true, 1, 15, false);\r\n\t\thills.addItem(swordEvalon);\r\n\t\t\r\n\t\tPotion potion2 = new Potion(\"largepotion\", 2, 200, true, 25);\r\n\t\tPotion potion3 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tPotion potion4 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tlake.addItem(potion3);\r\n\t\tinn.addItem(potion4);\r\n\t\t\r\n\t\tItem potion5 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion6 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\twoods.addItem(potion6);\r\n\t\t\r\n\t\tPurse purse = new Purse(\"purse\",0,0,true,100);\r\n\t\tvalley.addItem(purse);\r\n\t\t\r\n\t\tChest chest = new Chest(\"chest\", 50, 100, false, 50);\r\n\t\tvalley.addItem(chest);\r\n\t\tchest.addItem(potion2);\r\n\t\t\r\n\t\tChest chest2 = new Chest(\"chest\", 10, 10, false, 20);\r\n\t\tinn.addItem(chest2);\r\n\t\t\r\n\t\t// ENEMY LOOT\r\n\t\tBodyArmor chestplate = new BodyArmor(\"chestplate\", 20, 200, true, 20);\r\n\t\t\r\n\t\t// ADDING NPC TO WORLD\r\n\t\tNpc innkeeper = new Npc(\"Innkeeper\", false, \"Hello, we have rooms available if you want to stay over night.\",true,1000);\r\n\t\tinn.addNpc(innkeeper);\r\n\t\t\r\n\t\tItem potion7 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion8 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tinnkeeper.addItem(potion7);\r\n\t\tinnkeeper.addItem(potion8);\r\n\t\t\r\n\t\tNpc villager = new Npc(\"Lumberjack\", false, \"Gotta get those logs back to the mill soon, but first a few pints at the inn!\",false,0);\r\n\t\tlaketown.addNpc(villager);\r\n\t\t\r\n\t\tEnemy enemy1 = new Enemy(\"Enemy\", true, \"Come at me!\", 50, chestplate, 200, 10);\r\n\t\tmountain.addNpc(enemy1);\r\n\t\t\r\n\t\tEnemyGuardian guardian = new EnemyGuardian(\"Guardian\", true, \"I guard this cave.\", 100, potion5, 600, 15, innercave, \"An entrance reveals itself behind the fallen Guardian.\", \"inwards\", \"entrance\");\r\n\t\tcave.addNpc(guardian);\r\n\t\t\r\n\t\t// ADDING SPAWNER TO WORLD\r\n\t\tthis.setNpcSpawner(new BanditSpawner()); \r\n\t\t\r\n\t\t// ADDING PLAYER TO THE WORLD\r\n\t\tthis.getPlayer().setLocation(valley);\r\n\t\t\r\n\t\t// QUEST\r\n\t\tQuest noquest = new Quest(\"noquest\",\"nodesc\",\"nocomp\",false,true,1000,0,0,0);\r\n\t\tthis.setCurrentQuest(noquest);\r\n\t\t\r\n\t\t\r\n\t\tQuest firstquest = new Quest(\"A New Journey\",\"Find the lost sword of Evalon.\",\"You have found the lost sword of Evalon!\",false,false,1,400,0,1);\r\n\t\t\r\n\t\tScroll scroll = new Scroll(\"Questscroll\",1,1,true,firstquest);\r\n\t\tmountain.addItem(scroll);\r\n\t\t\r\n\t\tSystem.out.println(\"All set up.\");\r\n\t}", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = null;\n \n for(Exit e : currentRoom.getListExits()) {\n String key = e.getDirection();\n Room exit = e.getRoom();\n \n if(direction.equals(key)){\n nextRoom = exit;\n break;\n }\n }\n \n if (nextRoom == null) {\n \n }\n else {\n currentRoom = nextRoom;\n printExits ();\n }\n }", "protected static void doCommand(char cmd, String location, String destination) {\n \n switch (cmd)\n {\n case 'a': case 'A':\n \n for(Iterator<String> i = testGameLayout.locations(); i.hasNext(); ){\n LocationDescription description = testGameLayout.getLocationDescription(i.next());\n if(!description.getItem().equals(\"X\"))\n listOfPossibleItems.add(description.getItem());\n \n }\n break; \n case 'b': case 'B':\n System.out.println(testGameLayout.getLocationDescription(location));\n break;\n case 'c': case 'C':\n int count = 0;\n for(Iterator<String> i = testGameLayout.connections(location); i.hasNext(); ){\n LocationDescription description = testGameLayout.getLocationDescription(i.next());\n listOfConnections[count++]=description.getLocation(); \n }\n break;\n case 'd': case 'D':\n Boolean found = false;\n String newLocation = destination;\n for(Iterator<String> i = testGameLayout.connections(location); i.hasNext(); ){\n LocationDescription description = testGameLayout.getLocationDescription(i.next());\n String possibleLocation = description.getLocation();\n if(possibleLocation.equals(newLocation)){\n currentLocation = newLocation;\n //currentHealth+=description.getHealthChange();\n// if(currentHealth>10)\n// currentHealth=10;\n if(currentLocation.equals(\"Out\"))\n win=true;\n currentHealth--;\n if(currentHealth==0 || getNumConnections(currentLocation)==0)\n lose=true;\n return;\n }\n } \n //System.out.println(\"Sorry that is not an option.\");\n break;\n case 'e': case 'E':\n LocationDescription description = testGameLayout.getLocationDescription(currentLocation);\n if(!description.getItem().equals(\"X\")){\n listOfItems.add(description.getItem());\n myList.push(description.getItem());\n description.setItem(\"X\");\n \n currentHealth+=description.getHealthChange();\n if(currentHealth>10)\n currentHealth=10;\n }\n currentHealth--;\n if(currentHealth==0)\n lose=true;\n break; \n \n case 'f': case 'F':\n String property = destination;\n itemLocation = testGameLayout.search(currentLocation, property);\n break;\n case 'g': case 'G':\n// PrintWriter writer = FileChooser.openPrintWriter();\n// for(Iterator<String> i = testGameLayout.locations(); i.hasNext(); ){\n// LocationDescription description = testGameLayout.getLocationDescription(i.next());\n// for(Iterator<String> title = titles(author); title.hasNext(); ){\n// writer.print(library.get(author).get(title.next()).toString() + \"\\n\" + \"_\" + \"\\n\");\n// }\n// }\n// writer.close();\n testGameLayout.fileWriter(currentLocation, currentHealth);\n break;\n case 'q': case 'Q':\n break;\n default:\n }\n }", "public void makeUseOfNewLocation(Location location) {\n \t\tString place = null;\n \t\tif(location!=null)\n \t\t{\n \t\t\tGeocoder gc = new Geocoder(organise.getApplicationContext());\n \t\t\ttry {\n \t\t\t\tList<Address> list = gc.getFromLocation(location.getLatitude(), location.getLongitude(), 5);\n \t\t\t\tint i = 0;\n \t\t\t\twhile (i<list.size()) \n \t\t\t\t{\n \t\t\t\t\tString temp = list.get(i).getLocality();\n \t\t\t\t\tif(temp!=null) {place = temp;}\n \t\t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\tif(place!=null) {cur_loc.setText(place);}\n \t\t\t\telse {cur_loc.setText(\"(\" + location.getLatitude() + \",\" + location.getLongitude() + \")\");}\n \t\t\t}\n \t\t\t//This is thrown if the phone has no Internet connection.\n \t\t\tcatch (IOException e) {\n \t\t\t\tcur_loc.setText(\"(\" + location.getLatitude() + \",\" + location.getLongitude() + \")\");\n \t\t\t}\n \t\t}\n \t}", "public void createRoom(int len, int leftWid, int rightWid) {\n switch (facing) {\n case \"Up\":\n addUpBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Down\":\n addDownBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Left\":\n addLeftBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Right\":\n addRightBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n default:\n System.out.println(\"The wizard loses his direction!\");\n\n }\n }", "public Room createRoom(Room room);", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }", "public DirectorOffice(String description, String name,Room room) {\n\t\tsuper(description, name,room);\n\t this.addItem(new Pass(\"pass-G\"));\n\t}", "public void createRoom(int roomId, String featureSummary) throws NumberFormatException, IOException {\n\t\tSystem.out.println(\"Would you like to add a Standard Room or a Suite?\");\n\t\tSystem.out.println(\"1: Standard Room\");\n\t\tSystem.out.println(\"2: Suite\");\n\n\t\tint input = Integer.parseInt(br.readLine());\n\n\t\tif (input == 1) {\n\t\t\tSystem.out.println(\"Creating Standard Room...\");\n\t\t\tcreateStandardRoom(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else if (input == 2) {\n\t\t\tSystem.out.println(\"Creating Suite...\");\n\t\t\tcreateSuite(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Please select a valid option\\n\");\n\t\t\tcreateRoom(roomId, featureSummary);\n\t\t} \n\n\t}", "void update(Location location);", "public abstract void enterRoom();", "@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }" ]
[ "0.6337494", "0.63038176", "0.62747794", "0.6273916", "0.6273916", "0.6273916", "0.5999597", "0.59764445", "0.5951872", "0.59430766", "0.58903927", "0.5864555", "0.57974666", "0.57865185", "0.57683873", "0.5756449", "0.57467586", "0.573434", "0.5697683", "0.56973946", "0.5678652", "0.56522983", "0.56188756", "0.557925", "0.55781084", "0.5559143", "0.5553716", "0.5552362", "0.55424064", "0.55382216", "0.5532297", "0.5528804", "0.55173033", "0.55163026", "0.5498225", "0.54961175", "0.54945594", "0.5465638", "0.54633164", "0.546187", "0.54612017", "0.54588556", "0.5453942", "0.54537004", "0.54245317", "0.5422075", "0.54132986", "0.5411946", "0.53979975", "0.53860235", "0.5380831", "0.53641975", "0.5357744", "0.53538996", "0.5345717", "0.5314701", "0.5313832", "0.52962554", "0.52960986", "0.5293422", "0.5289711", "0.52875006", "0.52858245", "0.52771825", "0.5275774", "0.5270486", "0.5265489", "0.5247257", "0.5243271", "0.5238618", "0.52320075", "0.5229785", "0.52269584", "0.5222106", "0.52207047", "0.52141875", "0.5200476", "0.51980084", "0.51931787", "0.5192396", "0.5191577", "0.51846284", "0.5178219", "0.5176871", "0.5176439", "0.5172666", "0.51725644", "0.51706505", "0.5169614", "0.5167707", "0.5155996", "0.51498663", "0.5146873", "0.5146628", "0.51448214", "0.51407653", "0.5138918", "0.5133026", "0.5132422", "0.51172537" ]
0.8556825
0
Get current weather for any given city.
@Override public String getWeatherDataCity(String city, String country) throws IOException { return connectAPICity(city, country); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getWeather(String city, String units);", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByCityAndCountry(String country, String city) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", country, city);\r\n\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL).expand(city, country, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "public WeatherForecast getForecast(String city) throws WeatherForecastClientException {\n HttpResponse<String> response;\n try {\n URI uri = new URI(\"http\", \"api.openweathermap.org\", \"/data/2.5/weather\",\n String.format(\"q=%s&units=metric&lang=bg&appid=%s\", city, apiKey), null);\n\n System.out.println(uri);\n HttpRequest request = HttpRequest.newBuilder().uri(uri).build();\n response = weatherHttpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n } catch (URISyntaxException | IOException | InterruptedException e) {\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\", e);\n }\n if (response.statusCode() == HttpURLConnection.HTTP_OK) {\n Gson gson = new Gson();\n return gson.fromJson(response.body(), WeatherForecast.class);\n } else if (response.statusCode() == HttpURLConnection.HTTP_NOT_FOUND) {\n throw new LocationNotFoundException(\"Couldn't find location with name : \" + city);\n }\n\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\");\n }", "@SneakyThrows\n String getTemperature(String city) throws MalformedURLException, IOException {\n double current_temperature = 0;\n JSONObject json = new JSONObject(IOUtils.toString(new URL(\"https://api.openweathermap.org/data/2.5/weather?q=\" + city.toLowerCase(Locale.ROOT) + \"&appid=\"), Charset.forName(\"UTF-8\")));\n current_temperature = (Float.parseFloat(json.getJSONObject(\"main\").get(\"temp\").toString()));\n current_temperature = Math.round(current_temperature*100.0)/100.0;\n System.out.println(json);\n return current_temperature + \"\";\n }", "@GetMapping(\"/weather/current\")\n public Location getCurrentWeather(@RequestParam(value = \"city\", required = false) final String city, @RequestParam(value = \"country\", required = false) final String country, @RequestParam(value = \"lon\", required = false) final String lon, @RequestParam(value = \"lat\", required = false) final String lat) {\n final StringBuilder locationBuilder = new StringBuilder();\n validator.getCurrentWeatherValidator(city, country, lon, lat);\n\n if (city != null) {\n locationBuilder.append(\"city=\").append(city);\n if(country != null) {\n locationBuilder.append(\"&country=\").append(country);\n }\n } else if (lat != null) {\n final double latitude = Double.parseDouble(lat);\n final double longitude = Double.parseDouble(lon);\n final Coordinates latLong = new Coordinates(longitude, latitude);\n locationBuilder.append(latLong.getUriComponent());\n } else {\n Coordinates randomCoordinates = getRandomCoordinates();\n locationBuilder.append(randomCoordinates.getUriComponent());\n }\n\n final String location = locationBuilder.toString();\n return weatherService.getCurrentConditions(location);\n }", "@Override\n public City getStatsByCity(String name) throws UnirestException {\n City cityWeather = new City();\n JSONObject object = weatherService.getWeatherByCity(name);\n Coord coord = formatObject(\"coord\",object,Coord.class);\n Wind wind = formatObject(\"wind\",object,Wind.class);\n\n Clouds clouds = formatObject(\"clouds\",object,Clouds.class);\n MainStats mainStats = formatObject(\"main\",object,MainStats.class);\n JSONObject objectWeather = object.getJSONArray(\"weather\").getJSONObject(0);\n Weather weather = mapWeather(objectWeather);\n cityWeather.setCoord(coord);\n cityWeather.setWeather(weather);\n cityWeather.setWind(wind);\n cityWeather.setClouds(clouds);\n cityWeather.setName(object.getString(\"name\"));\n cityWeather.setTimezone(object.getInt(\"timezone\"));\n cityWeather.setCod(object.getInt(\"cod\"));\n cityWeather.setVisibility(object.getInt(\"visibility\"));\n return cityWeather;\n }", "@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);", "@Override\n\tpublic String getHourlyWeatherData(String city, String country) throws IOException {\n\t\t\n\t\treturn connectFiveDayForecast(city, country);\n\t\t\n\t}", "@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "GeneralWeatherReport queryWeatherReport(String cityId);", "@Cacheable(\"darkSkyTemperature\")\n public WeatherDataDto getTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(getServiceName());\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public String getCurrentWeather() {\n\t\tString jsonStr = null;\n\t\t\n\t\tClient client = ClientBuilder.newClient();\t\t\n\t\tWebTarget target = client.target(OpenWeatherApiUtil.BASE_URL)\n\t\t\t\t.path(OpenWeatherApiUtil.WEATHER_RESOURCE)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.CITY_QUERY_PARAM, CITY_VANCOUVER)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.UNITS_QUERY_PARAM, OpenWeatherApiUtil.METRIC_UNITS)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.API_KEY_QUERY_PARAM, getApiKey());\n\n\t\tLOG.debug(\"Target URL: \" + target.getUri().toString());\n\t\t\n\t\tInvocation.Builder invocationBuilder = target.request(MediaType.APPLICATION_JSON);\t\t\n\t\t\n\t\tResponse response = invocationBuilder.get(Response.class);\t\t\n\t\tjsonStr = response.readEntity(String.class);\n\t\t\n\t\t// Check response from Open Weather API and log the response appropriately\n\t\tif (response.getStatus() == 200) {\n\t\t\tLOG.debug(jsonStr);\n\t\t}\n\t\telse {\n\t\t\tLOG.error(ErrorMessageUtils.ERROR_OPEN_WEATHER_API_RESPONSE_NON_200_STATUS\n\t\t\t\t\t+ \"\\n\" + response.readEntity(String.class));\n\t\t}\n\t\t\t\n\t\treturn jsonStr;\n\t}", "public void getCityResult() {\n String cityNameStr = TextUtils.isEmpty(cityName) ? \"Halifax\" : cityName;\n final String url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + cityNameStr + \"&appid=\" + API_KEY + \"&units=\" + CELSIUS_UNITS;\n //build the request\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray weather = response.getJSONArray(\"weather\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject cloudsJSON = response.getJSONObject(\"clouds\");\n\n //Set values on layout\n setCityNameOnLayout(response);\n setWeather(weather);\n setTemperature(main);\n setMinMaxTemperature(main);\n setHumidity(main);\n setClouds(cloudsJSON);\n setWeatherIcon((weather.getJSONObject(0)).get(\"icon\").toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n\n Toast.makeText(getApplicationContext(), \"Please, introduce an existing city\", Toast.LENGTH_SHORT).show();\n }\n }\n );\n RequestQueueSingleton.getInstance(getApplicationContext()).addToRequestQueue(request);\n }", "public WeatherModel getCurrentWeather() {\n return currentWeather;\n }", "public static String getWoeid(String city)\n {\n try {\n String inline = useAPI(\"https://www.metaweather.com/api/location/search/?query=\" + city);\n if (!inline.equals(\"[]\")) {\n String[] words = inline.split(\",\");\n String[] erg = words[2].split(\":\");\n return erg[1];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "void handleWeatherDataForCity(String cityName);", "private void searchCity() {\n toggleProgress();\n try {\n WeatherClient client = builder.attach(this)\n .provider(new OpenweathermapProviderType())\n .httpClient(WeatherClientDefault.class)\n .config(config)\n .build();\n\n // Try to find a good location\n // using medium settings\n Criteria criteria = new Criteria();\n criteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n criteria.setAccuracy(Criteria.ACCURACY_MEDIUM);\n // Can we use data?\n criteria.setCostAllowed(true);\n\n // Search city by gps/network using\n // above critera\n client.searchCityByLocation(\n criteria,\n new WeatherClient.CityEventListener() {\n\n // When we get the city list\n @Override\n public void onCityListRetrieved(List<City> cityList) {\n for (int i = 0; i < cityList.size(); i++) {\n adapter.set(cityList.get(i), i);\n }\n displayMessage(\"Not the correct results?\" +\n \" Press the button above to try again.\");\n }\n\n\n @Override\n public void onWeatherError(WeatherLibException wle) {\n displayMessage(\"There seems to be no \" +\n \"weather data, please try again later.\");\n\n }\n\n\n @Override\n public void onConnectionError(Throwable t) {\n displayMessage(\"Whoops! We can't seem to \" +\n \"connect to the weather servers.\");\n }\n\n });\n\n } catch (WeatherProviderInstantiationException e) {\n displayMessage(\"Error: Unable to access \" +\n \"the weather provider.\");\n } catch (LocationProviderNotFoundException e) {\n displayMessage(\"Whoops! Unable to access \" +\n \"location provider.\");\n } catch (NullPointerException e) {\n displayMessage(\"Whoops! We can't seem to\" +\n \"connect to the weather servers.\");\n }\n\n }", "@RequestMapping(value = \"/weather/{cityName}\", method = RequestMethod.GET)\n public ResponseEntity<Weather> getWeatherDetails(@PathVariable(\"cityName\") String cityName)\n {\n logger.info(\"Calling getWeatherDetails() method with \" + cityName + \" as param\");\n Weather weather = weatherService.getWeather(cityName);\n\n if(weather.getCurrentObservation() == null)\n {\n logger.debug(\"NULL DATA RETURNED\");\n return new ResponseEntity<Weather>(HttpStatus.NOT_FOUND);\n }\n\n return new ResponseEntity<Weather>(weather, HttpStatus.OK);\n }", "public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;", "public synchronized void getWeeklyForecast(String city){\r\n\t\t// Create a new Handler\r\n\t\tHandlerThread handlerThread = new HandlerThread(\"Weekly_Forecast\");\r\n\t\thandlerThread.start();\r\n\t\tHandler handler = new Handler(handlerThread.getLooper(), this);\r\n\t\t\r\n\t\tMessage msg = handler.obtainMessage();\r\n\t\tmsg.what = WEEKLY_FORECAST;\r\n\t\tmsg.obj = \"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=\".concat(city);\r\n\t\thandler.sendMessage(msg);\r\n\t}", "public double getWeatherAPI() {\n\t\tRestAssured.baseURI= props.getProperty(\"BaseURI\");\n\t\tString response = \tgiven().log().all().header(\"Content-Type\",\"application/json\").\n\t\t\t\tqueryParam(\"q\", props.getProperty(\"city\")).\n\t\t\t\tqueryParam(\"appid\", props.getProperty(\"key\")).\n\t\t\t\tqueryParam(\"units\", props.getProperty(\"unit\"))\n\t\t\t\t.when().get(\"data/2.5/weather\")\n\t\t\t\t.then().log().all().assertThat().statusCode(200).header(\"charset\", \"UTF-8\").extract().response().asString();\n\n\n\t\tSystem.out.println(response);\n\n\t\tJsonPath json = new JsonPath(response); // parsing the String response to Json\n\t\tString temp = json.getString(\".main.temp\");\n\t\tSystem.out.println(temp);\n\t\t\n\t\tdouble tempurature = Double.parseDouble(temp);\n\t\t\n\t\treturn tempurature;\n\t\t\n\t\t\n\t\t\n\t}", "public void callAPICall_shouldRetrieveCurrentWeatherInformation(String cityName) {\n\n WeatherAPIManager weatherAPIManager = new WeatherAPIManager(activity);\n weatherAPIManager.setOnResponseListener(new WeatherAPIManagerOnResponseListener());\n weatherAPIManager.connectToWeatherEndpoint(cityName);\n }", "@Override\n @Cacheable(\"darkSkyHumidity\")\n public WeatherDataDto getHumidity(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);", "@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}", "@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}", "public static Weather getNextCityWeather(){\r\n\t\t/*\r\n\t\t * While weatherDetails is getting updated with background\r\n\t\t * Handler, it shouldn't be read\r\n\t\t */\r\n\t\tsynchronized (weatherDetails) {\r\n\t\t\tString code = airportCodes.get(city_index);\r\n\t\t\tLog.i(\"WeatherRecord\", \"Display Weather of: \"+ code+ \" \"+ airportCodes.size());\r\n\t\t\tcity_index++;\r\n\t\t\tif(city_index >= airportCodes.size())\r\n\t\t\t\tcity_index = 0;\r\n\t\t\tWeather w = weatherDetails.get(code);\r\n\t\t\treturn w;\r\n\t\t}\r\n\t}", "@Override\n @Cacheable(\"darkSkySunriseTime\")\n public WeatherDataDto getSunriseTime(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n String sunrise = \"Api does not support this field.\";\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setSunrise(sunrise);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Cacheable(\"darkSkyFeelsLikeTemperature\")\n public WeatherDataDto getFeelsLikeTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperatureFeelsLike = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"apparentTemperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperatureFeelsLike(temperatureFeelsLike);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "Weather getById(Long id);", "public WeatherDataResponse getWeather() {\n\n return weather.get(0);\n }", "public Weather getDetails(String cityName) throws SQLException, JSONException {\n Weather wSO = weatherService.getWeatherService(cityName);\n List<Cities> citySO = cityRepository.getCityDetails(cityName);\n\n return extractCityDetails(wSO, citySO);\n }", "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "@Cacheable(\"darkSkyCityCoordinates\")\n public WeatherDataDto getCityCoordinates(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String latitude = String.valueOf(jsonObject\n .getDouble(\"latitude\"));\n String longitude = String.valueOf(jsonObject\n .getDouble(\"longitude\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setLatitude(latitude);\n weatherDataDto.setLongitude(longitude);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Override\n public rx.Observable<CityWeather> getForecast(final String cityId) {\n return Observable.create(new Observable.OnSubscribe<CityWeather>() {\n @Override\n public void call(Subscriber<? super CityWeather> subscriber) {\n try {\n subscriber.onNext(getCityWeatherFromCityId(cityId));\n } catch (Exception e) {\n subscriber.onError(e);\n } finally {\n subscriber.onCompleted();\n }\n }\n });\n }", "public List<WeatherCitySummary> findAllCity(){\n return weatherCityRepository.findAllCity();\n }", "public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }", "private String connectAPICity(String city, String country) throws IOException {\n\t\t\n\t\tOkHttpClient client = new OkHttpClient();\n\t\tRequest request;\n\t\t\n\t\tif(country.isEmpty()) {\n\t\t\trequest = new Request.Builder()\n\t\t\t\t.url(\"https://community-open-weather-map.p.rapidapi.com/weather?q=\" + city)\n\t\t\t\t.get()\n\t\t\t\t.addHeader(\"x-rapidapi-key\", RAPID_API_KEY)\n\t\t\t\t.addHeader(\"x-rapidapi-host\", \"community-open-weather-map.p.rapidapi.com\")\n\t\t\t\t.build();\n\t\t}else {\n\t\t\trequest = new Request.Builder()\n\t\t\t\t.url(\"https://community-open-weather-map.p.rapidapi.com/weather?q=\" + city + \"%2C\" + country)\n\t\t\t\t.get()\n\t\t\t\t.addHeader(\"x-rapidapi-key\", RAPID_API_KEY)\n\t\t\t\t.addHeader(\"x-rapidapi-host\", \"community-open-weather-map.p.rapidapi.com\")\n\t\t\t\t.build();\n\t\t}\n\n\t\treturn getResponse(client, request);\n\t\t\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "@Override\n public WeatherData getCurrentWeather(String location)\n throws RemoteException {\n WeatherData weatherResult = Utils.getResult(location, getApplicationContext());\n\n if (weatherResult != null) {\n Log.d(TAG, \"\"\n + weatherResult.toString()\n + \" result for location: \"\n + location);\n\n // Return the weather data back\n return weatherResult;\n } else {\n return null;\n }\n }", "public ArrayList<Flight> getCity(String city) {\n return connects.get(city);\n }", "private void updateWeatherData(final String city){\n new Thread(){\n public void run(){\n final JSONObject json = WeatherJSON.getJSON(getActivity(), city);\n if(json != null){\n handler.post(new Runnable(){\n public void run(){\n renderWeather(json);\n }\n });\n } else {\n\n }\n }\n }.start();\n }", "public java.lang.String getCity () {\n\t\treturn city;\n\t}", "public static String getOpenCity() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn city;\n\t}", "public String getWeather() {\n int weatherCode = 0;\n String weather = \" \";\n if (readings.size() > 0) {\n weatherCode = readings.get(readings.size() - 1).code;\n\n if (weatherCode == 100) {\n weather += weather + \" Clear \";\n } else if (weatherCode == 200) {\n weather += weather + \" Partial clouds \";\n } else if (weatherCode == 300) {\n weather += weather + \" Cloudy \";\n } else if (weatherCode == 400) {\n weather += weather + \" Light Showers \";\n } else if (weatherCode == 500) {\n weather += weather + \" Heavy Showers \";\n } else if (weatherCode == 600) {\n weather += weather + \" Rain \";\n } else if (weatherCode == 700) {\n weather += weather + \" Snow \";\n } else if (weatherCode == 800) {\n weather += weather + \" Thunder \";\n } else {\n weather += weather + \" Partial clouds \";\n }\n }\n return weather;\n }", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "String getCity();", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCity() {\n return (String) get(\"city\");\n }", "public String getCity() {\n return city;\n }", "@Override\n\tpublic Response weather(String iata, String radiusString) {\n\t\treturn null;\n\t}", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "@Test(priority = 2)\n\tpublic void WeatherReportForParticularCity() {\n\t\ttest.homepage.searchForLocation(ReadWrite.getProperty(\"Noida_City_State\"));\n\t\ttest.currentWeatherReportPage.verifyCurrentDayAndTime();\n\t\tweatherMap = test.currentWeatherReportPage.storeInformationOfWeather();\n\n\t}", "public WeatherNow getSingleWeather(int position){\n return weatherNow.get(position);\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "@Override\n @Cacheable(\"darkSkyPressure\")\n public WeatherDataDto getPressure(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setPressure(pressure);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location.get(\"name\").getAsString();\n String country = location.get(\"country\").getAsString();\n JsonObject current = rootObject.getAsJsonObject(\"current\");\n Double temp = current.get(\"temp_c\").getAsDouble();\n JsonObject condition = current.getAsJsonObject(\"condition\");\n String conditionText = condition.get(\"text\").getAsString();\n return new WeatherInfo(city, country, conditionText, temp);\n}", "public WeatherType getPlayerWeather ( ) {\n\t\treturn extract ( handle -> handle.getPlayerWeather ( ) );\n\t}", "public String getLocationCity() {\n return locationCity;\n }", "private static boolean fetchYahooWeather() {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n SAXParser parser = spf.newSAXParser();\n \n String yql_format = String.format(\"select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\\\"%s, %s\\\")\", CITY, ST);\n \n /* Fetch Wind Data (temp, windDir, and windSpeed) */\n String yql_wind = String.format(yql_format, \"wind\", \"weather.forecast\");\n String url_wind = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_wind, \"UTF-8\"));\n \n DefaultHandler wind_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:wind\")) return;\n \n temp = Integer.parseInt(attributes.getValue(\"chill\"));\n \n int dir = Integer.parseInt(attributes.getValue(\"direction\")); // number from 0-359 indicating direction\n // I began writing an if tree, then remembered I was lazy.\n String[] dir_words = new String[] {\n \"east\", \"northeast\", \"north\", \"northwest\", \"west\", \"southwest\", \"south\", \"southeast\"\n };\n windDir = dir_words[dir/45];\n \n windSpeed = Integer.parseInt(attributes.getValue(\"speed\")); // speed in mph\n }\n };\n parser.parse(url_wind, wind_handler);\n \n /* Fetch Atronomy Data (sunriseHour and sunsetHour) */\n String yql_astro = String.format(yql_format, \"astronomy\", \"weather.forecast\");\n String url_astro = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_astro, \"UTF-8\"));\n \n DefaultHandler astro_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }\n };\n parser.parse(url_astro, astro_handler);\n \n /* Fetch Description Data (sky) */\n String yql_sky = String.format(yql_format, \"item.condition.text\", \"weather.forecast\");\n String url_sky = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_sky, \"UTF-8\"));\n \n DefaultHandler sky_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:condition\")) return;\n \n sky = attributes.getValue(\"text\").toLowerCase();\n \n }\n };\n parser.parse(url_sky, sky_handler);\n \n return E.sky != null;\n \n } catch (java.net.UnknownHostException uhe) {\n if (Data.DEBUG) System.err.println(\"You are offline!\");\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "@GET(\"weather?APPID=bec2ea2f434c848c09196f2de96e3c4c&units=metric\")\n Single<Weather> getWeatherData(@Query(\"q\") String name);", "public String getCity()\n {\n \treturn city;\n }", "@Cacheable(\"darkSkyDirectionWind\")\n public WeatherDataDto getDirectionWind(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setDirectionWind(constants.getMessageDoesNotSupportField());\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public String getCity() {\n return city;\n }", "public City getCity() {\n return city;\n }", "public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "@Test\n\t@Title(\"TC_008: Verify that the current weather data is returned correctly when user search for the City Name\")\n\t \n\tpublic void TC_008_Verify_CurrentWeatherInfo_Is_Returned_For_ValidCity() {\n\t\t\n\t\tLocation city = new Location();\n\t\t\n\t\tcity = DataReader.RetrieveLocationFromFile(\"data.json\").get(0);\n\t\t\n\t\tcity.weather = new Weather(\"C\");\n\t\t\n\t\t//Steps:\n\t\t//1. Access to the site\n\t\tendUser.access_Site();\n\t\t\n\t\t//Search Weather by CityName\n\t\tendUser.SearchWeatherbyCityName(city);\n\t\t\n\t\t//Assume that the test application is triggering the correct API as expectation: OncCall\n\t\tcity = endUser.getWeatherInfoViaAPIResponse(city);\n\t\t\n\t\t//Validate Current Weather\n\t\tendUser.Validate_CurrentWeather(city);\n\t\t\n\t\tAssert.assertTrue(TestConfigs.glb_TCFailedMessage, TestConfigs.glb_TCStatus);\n\t}", "@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }", "public String weather() {\r\n\t\treturn weather(random.nextInt(4));\r\n\t}", "@Override\n public Day getCurrentDay(double lat, double lon) throws Exception {\n String tempUnitPref = sharedPref.getString(SettingsFragment.TEMP_UNIT_KEY,\"\");\n\n String res = this.httpRequester.getWeatherByCoordinates(lat, lon);\n WeatherResponse weather = this.jsonConverter.jsonToWeatherResponse(res);\n\n Day current = new Day();\n current.setLocationCity(weather.getName());\n\n switch(tempUnitPref){\n case \"Celsius\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToCelsius(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"C\");\n break;\n case \"Fahrenheit\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToFahrenheit(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"F\");\n break;\n }\n\n int weatherConditionsCode = weather.getWeather()[0].getId();\n\n current.setWeather(this.getWeatherConditionsByCode(weatherConditionsCode));\n current.setWindSpeed((float) weather.getWind().getSpeed());\n current.setLastUpdated(new Date());\n\n return current;\n }", "public static ArrayList<Double> getWebTempValues(String city) {\n try {\n return readDoubleDataInJsonFile(getPropertyValue(\"webdata\"), \"$..\" + city.toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "public Document getWeatherPage() throws IOException {\n Document page = Jsoup.connect(\"https://yandex.ru/pogoda/\" + this.city)\n .userAgent(\"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\").get();\n return page;\n }", "private void getHttpResponse() {\n String url = \"https://api.openweathermap.org/data/2.5/weather?id=\"+city.getId()+\"&units=metric&appid=77078c41435ef3379462eb28afbdf417\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Accept\", \"application/json\")\n .header(\"Content-Type\", \"application/json\")\n .build();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n String message = e.getMessage();\n System.out.println(message);\n }\n\n /**\n * Update the UI with the information\n * @param call\n * @param response\n * @throws IOException\n */\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String body = response.body().string();\n\n Gson gson = new Gson();\n CityInfoDto cityInfo = gson.fromJson(body, CityInfoDto.class);\n\n setNewValues(Math.round(cityInfo.main.temp), cityInfo.weather[0].main);\n setBackground();\n }\n });\n }" ]
[ "0.80972105", "0.7586606", "0.7499402", "0.74280417", "0.72590804", "0.7113707", "0.7083284", "0.69891965", "0.6980956", "0.6950459", "0.69482464", "0.6928035", "0.6826329", "0.6810303", "0.6788367", "0.6768201", "0.6767672", "0.6747137", "0.67429215", "0.6741812", "0.67394847", "0.66778517", "0.6667011", "0.66484153", "0.66478634", "0.6634209", "0.661841", "0.6611384", "0.65094143", "0.6497627", "0.6473978", "0.6472368", "0.646535", "0.6382767", "0.6356373", "0.63451755", "0.6337841", "0.63299066", "0.6310582", "0.6298943", "0.6298943", "0.62957114", "0.6293182", "0.62907344", "0.6279797", "0.62733996", "0.6269163", "0.6263465", "0.6263465", "0.6263465", "0.6263465", "0.62615085", "0.6258863", "0.62516296", "0.62490946", "0.62451226", "0.62439245", "0.62306154", "0.6212332", "0.62104905", "0.6200744", "0.62002", "0.62002", "0.62002", "0.62001556", "0.6188024", "0.6186328", "0.6186328", "0.6184226", "0.6177783", "0.61671895", "0.61609787", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.6155501", "0.61527294", "0.6150016", "0.6137772", "0.6126826", "0.61251795", "0.6102027", "0.60966927", "0.6089244", "0.6089244", "0.6089244", "0.6065543", "0.6057555", "0.60462207", "0.6044292", "0.6033784", "0.60313463", "0.60307753", "0.60299134" ]
0.7634182
1
Get a five day forecast in 3 hour increments for any given city.
@Override public String getHourlyWeatherData(String city, String country) throws IOException { return connectFiveDayForecast(city, country); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "public synchronized void getWeeklyForecast(String city){\r\n\t\t// Create a new Handler\r\n\t\tHandlerThread handlerThread = new HandlerThread(\"Weekly_Forecast\");\r\n\t\thandlerThread.start();\r\n\t\tHandler handler = new Handler(handlerThread.getLooper(), this);\r\n\t\t\r\n\t\tMessage msg = handler.obtainMessage();\r\n\t\tmsg.what = WEEKLY_FORECAST;\r\n\t\tmsg.obj = \"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=\".concat(city);\r\n\t\thandler.sendMessage(msg);\r\n\t}", "public WeatherForecast getForecast(String city) throws WeatherForecastClientException {\n HttpResponse<String> response;\n try {\n URI uri = new URI(\"http\", \"api.openweathermap.org\", \"/data/2.5/weather\",\n String.format(\"q=%s&units=metric&lang=bg&appid=%s\", city, apiKey), null);\n\n System.out.println(uri);\n HttpRequest request = HttpRequest.newBuilder().uri(uri).build();\n response = weatherHttpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n } catch (URISyntaxException | IOException | InterruptedException e) {\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\", e);\n }\n if (response.statusCode() == HttpURLConnection.HTTP_OK) {\n Gson gson = new Gson();\n return gson.fromJson(response.body(), WeatherForecast.class);\n } else if (response.statusCode() == HttpURLConnection.HTTP_NOT_FOUND) {\n throw new LocationNotFoundException(\"Couldn't find location with name : \" + city);\n }\n\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\");\n }", "public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;", "public void getWeather(String city, String units);", "void getForecastInitially(DarkSkyApi api, PlaceWeather weather){\n\n long newWeatherPlaceId = databaseInstance.weatherDao().insertPlaceWeather(weather);\n\n weather.getDaily().setParentPlaceId(newWeatherPlaceId);\n databaseInstance.weatherDao().insertDaily(weather.getDaily());\n\n List<DailyData> dailyData = weather.getDaily().getData();\n\n for(int i = 0; i < dailyData.size(); ++i){\n dailyData.get(i).setParentPlaceId(newWeatherPlaceId);\n dailyData.get(i).setId(\n databaseInstance.weatherDao().insertDailyData(dailyData.get(i))\n );\n }\n\n long currentDayId = dailyData.get(0).getId();\n\n weather.getHourly().setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourly(weather.getHourly());\n\n List<HourlyData> hourlyData = weather.getHourly().getData();\n\n for(int i = 0; i < hourlyData.size(); ++i){\n hourlyData.get(i).setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(i));\n }\n\n //now load hours of next 7 days initially\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n\n PlaceWeather dayWeather;\n for(int i = 1; i < dailyData.size(); ++i){\n try{\n dayWeather = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n dailyData.get(i).getTime()+1,\n avoid).execute().body();\n }catch (IOException e){\n break;\n }\n\n dayWeather.getHourly().setParentDayId(dailyData.get(i).getId());\n dayWeather.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(dayWeather.getHourly())\n );\n\n hourlyData = dayWeather.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(dailyData.get(i).getId());\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n\n }", "net.webservicex.www.WeatherForecasts getWeatherForecasts();", "@Override\n public rx.Observable<CityWeather> getForecast(final String cityId) {\n return Observable.create(new Observable.OnSubscribe<CityWeather>() {\n @Override\n public void call(Subscriber<? super CityWeather> subscriber) {\n try {\n subscriber.onNext(getCityWeatherFromCityId(cityId));\n } catch (Exception e) {\n subscriber.onError(e);\n } finally {\n subscriber.onCompleted();\n }\n }\n });\n }", "@Override\n @Cacheable(\"darkSkySunriseTime\")\n public WeatherDataDto getSunriseTime(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n String sunrise = \"Api does not support this field.\";\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setSunrise(sunrise);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "void handleWeatherDataForCity(String cityName);", "@SneakyThrows\n String getTemperature(String city) throws MalformedURLException, IOException {\n double current_temperature = 0;\n JSONObject json = new JSONObject(IOUtils.toString(new URL(\"https://api.openweathermap.org/data/2.5/weather?q=\" + city.toLowerCase(Locale.ROOT) + \"&appid=\"), Charset.forName(\"UTF-8\")));\n current_temperature = (Float.parseFloat(json.getJSONObject(\"main\").get(\"temp\").toString()));\n current_temperature = Math.round(current_temperature*100.0)/100.0;\n System.out.println(json);\n return current_temperature + \"\";\n }", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByCityAndCountry(String country, String city) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", country, city);\r\n\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL).expand(city, country, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "@Override\n\tpublic String getWeatherDataCity(String city, String country) throws IOException {\n\n\t\treturn connectAPICity(city, country);\n\t\t\n\t}", "@Cacheable(\"darkSkyTemperature\")\n public WeatherDataDto getTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(getServiceName());\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Test\n\tpublic void dayTimeAndNightTimeAreDetectedCorrectlyTest() {\n\t\tcurrentDate = LocalDate.of(2019, 01, 27);\n\t\tAverageTemperatureAndPressure atp = forecastService.getAverageTemperatureAndPressure(city, currentDate, 3);\n\t\t\n\t\tassertEquals(3, atp.getAvrgDayTimeTemperature(), 0.000000001);\n\t\tassertEquals(7, atp.getAvrgNightTimeTemperature(), 0.000000001);\n\t\tassertEquals(6, atp.getAvrgPressure(), 0.000000001);\n\t}", "GeneralWeatherReport queryWeatherReport(String cityId);", "@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);", "@Cacheable(\"darkSkyFeelsLikeTemperature\")\n public WeatherDataDto getFeelsLikeTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperatureFeelsLike = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"apparentTemperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperatureFeelsLike(temperatureFeelsLike);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public void showTodayForecast(View view) {\n Log.i(\"User input\", cityUserInput.getText().toString());\n //String cityName = cityUserInput.getText().toString().trim();\n String cityName = null;\n todayInfo = new ArrayList<>();\n try {\n cityName = URLEncoder.encode(cityUserInput.getText().toString(), \"UTF-8\");\n if (cityName.equals(\"\")){\n Toast.makeText(getApplicationContext(), \"Using default city: london\", Toast.LENGTH_SHORT).show();\n cityName = \"london\";\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n String url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + cityName + \"&appid=5c7c917f2eedbebf85086c5fab2569d2\";\n //FragmentA fragmentA = new FragmentA();\n //FragmentA.DownloadTask downloadTask = fragmentA.new DownloadTask();\n FragmentA.TodayWeatherTask downloadTask = f1.new TodayWeatherTask();\n downloadTask.execute(url);\n\n\n\n\n //TODO: get arraylist containing today's information\n //launchTodayFragment(todayInfo);\n }", "@Override\n @Cacheable(\"darkSkyHumidity\")\n public WeatherDataDto getHumidity(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "void updateForecast(DarkSkyApi api, PlaceWeather weather){\n\n long now = Calendar.getInstance().getTimeInMillis()/1000;\n\n deleteObsoleteEntries(now);\n\n long placeId = weather.getId();\n long currentDay = databaseInstance.weatherDao().selectObsoleteDayCount(now);\n long daysSaved = databaseInstance.weatherDao().selectDayCount();\n\n //check if need to load data\n if(daysSaved - currentDay < 7){\n\n List<HourlyData> hourlyData;\n\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n long currentTime = weather.getDaily().getData().get(\n weather.getDaily().getData().size()-1\n ).getTime() + 1;\n\n //load days\n for(long day = daysSaved - currentDay; day < 7; ++day){\n currentTime += 3600 * 24;\n PlaceWeather nextDay;\n try{\n nextDay = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n now, avoid).execute().body();\n }catch (IOException e){\n //log network failure\n break;\n }\n\n nextDay.getDaily().getData().get(0).setParentPlaceId(placeId);\n\n long nextDailyDataId =\n databaseInstance.weatherDao().insertDailyData(\n nextDay.getDaily().getData().get(0)\n );\n\n nextDay.getHourly().setParentDayId(nextDailyDataId);\n nextDay.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(nextDay.getHourly())\n );\n\n hourlyData = nextDay.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(nextDailyDataId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n }\n }", "@RequestMapping(value = \"/caseMore3\")\n\t public String caseMore3(Model model, HttpServletRequest request, HttpServletResponse response,\n\t\t\t\t@CookieValue(value = \"city\", defaultValue = \"-1\") int city) {\n\t\t model.addAttribute(\"auctionList\", cpdService.getIndexCpdList(city, 4));\n\t \treturn \"caseMore3\";\n\t }", "public static Weather getNextCityWeather(){\r\n\t\t/*\r\n\t\t * While weatherDetails is getting updated with background\r\n\t\t * Handler, it shouldn't be read\r\n\t\t */\r\n\t\tsynchronized (weatherDetails) {\r\n\t\t\tString code = airportCodes.get(city_index);\r\n\t\t\tLog.i(\"WeatherRecord\", \"Display Weather of: \"+ code+ \" \"+ airportCodes.size());\r\n\t\t\tcity_index++;\r\n\t\t\tif(city_index >= airportCodes.size())\r\n\t\t\t\tcity_index = 0;\r\n\t\t\tWeather w = weatherDetails.get(code);\r\n\t\t\treturn w;\r\n\t\t}\r\n\t}", "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "public CityDailyWeather(String city, int startYear, int endYear, int stationID){\n\t\tthis.city = city;\n\t\tthis.startYear = startYear;\n\t\tthis.endYear = endYear;\n\t\tthis.stationID = stationID;\n\t}", "@Test(priority = 2)\n\tpublic void WeatherReportForParticularCity() {\n\t\ttest.homepage.searchForLocation(ReadWrite.getProperty(\"Noida_City_State\"));\n\t\ttest.currentWeatherReportPage.verifyCurrentDayAndTime();\n\t\tweatherMap = test.currentWeatherReportPage.storeInformationOfWeather();\n\n\t}", "public static ArrayList<Double> getWebTempValues(String city) {\n try {\n return readDoubleDataInJsonFile(getPropertyValue(\"webdata\"), \"$..\" + city.toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);", "@GET(\"/cities/{cityId}/tours\")\n Call<List<Tour>> getTours(\n @Path(\"cityId\") int cityId\n );", "public static HourWeatherForecastFragment getInstance(String day, int cityId) {\n\n HourWeatherForecastFragment hourWeatherForecastFragment = new HourWeatherForecastFragment();\n Bundle bundle = new Bundle();\n bundle.putString(DAY_KEY, day);\n bundle.putInt(CITY_ID, cityId);\n hourWeatherForecastFragment.setArguments(bundle);\n return hourWeatherForecastFragment;\n }", "public static WeatherDataModel hourlyForecastFromJson(final JSONObject jsonObject) throws JSONException {\n final WeatherDataModel model = new WeatherDataModel();\n List<WeatherDataModel> list = model.getHourlyForecast();\n for(int i=0; i<jsonObject.getJSONArray(\"list\").length(); i++) {\n list.add(hourlyWeatherElement(jsonObject.getJSONArray(\"list\").getJSONObject(i)));\n }\n return model;\n }", "@Test\n\t@Title(\"TC_010:Verify that the daily forecast data is returned correctly for the searched City Name\")\n\t \n\tpublic void TC_010_Verify_DailyForCast_Is_Returned_For_ValidCity() {\n\t\t\n\t\tLocation city = new Location();\n\t\t\n\t\tcity = DataReader.RetrieveLocationFromFile(\"data.json\").get(0);\n\t\t\n\t\tcity.weather = new Weather(\"C\");\n\t\t\n\t\t\t\t\n\t\t//Steps:\n\t\t//1. Access to the site\n\t\tendUser.access_Site();\n\t\t\n\t\t//Search Weather by CityName\n\t\tendUser.SearchWeatherbyCityName(city);\n\t\t\n\t\t//Assume that the test application is triggering the correct API as expectation: OncCall\n\t\tcity = endUser.getWeatherInfoViaAPIResponse(city);\n\t\t\n\t\tendUser.Validate_DailyForcastList(7,city);\n\t\t\n\t\tendUser.Validate_DailyForcastDetail_AllDay(city);\n\t\t\n\t\tAssert.assertTrue(TestConfigs.glb_TCFailedMessage, TestConfigs.glb_TCStatus);\n\t}", "@GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);", "public void getCityResult() {\n String cityNameStr = TextUtils.isEmpty(cityName) ? \"Halifax\" : cityName;\n final String url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + cityNameStr + \"&appid=\" + API_KEY + \"&units=\" + CELSIUS_UNITS;\n //build the request\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray weather = response.getJSONArray(\"weather\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject cloudsJSON = response.getJSONObject(\"clouds\");\n\n //Set values on layout\n setCityNameOnLayout(response);\n setWeather(weather);\n setTemperature(main);\n setMinMaxTemperature(main);\n setHumidity(main);\n setClouds(cloudsJSON);\n setWeatherIcon((weather.getJSONObject(0)).get(\"icon\").toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n\n Toast.makeText(getApplicationContext(), \"Please, introduce an existing city\", Toast.LENGTH_SHORT).show();\n }\n }\n );\n RequestQueueSingleton.getInstance(getApplicationContext()).addToRequestQueue(request);\n }", "String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}", "@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "List<Quarter> getQuarterList(Integer cityId)throws EOTException;", "private void findWindSpeeds(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minSpeed = hourlyForecast.getHour(0).windSpeed();\n double maxSpeed = minSpeed;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double speed = hourlyForecast.getHour(i).windSpeed();\n if (minSpeed > speed)\n minSpeed = speed;\n if (maxSpeed < speed) {\n maxSpeed = speed;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setWindMin((int) (minSpeed + 0.5));\n day.setWindMax((int) (maxSpeed + 0.5));\n day.setWindMaxTime(maxHour);\n }", "@Cacheable(\"darkSkyCityCoordinates\")\n public WeatherDataDto getCityCoordinates(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String latitude = String.valueOf(jsonObject\n .getDouble(\"latitude\"));\n String longitude = String.valueOf(jsonObject\n .getDouble(\"longitude\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setLatitude(latitude);\n weatherDataDto.setLongitude(longitude);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Override\n public WeatherDaySample getDailyForecast(final String location, final WeekDay weekday, final TemperatureUnit temperatureUnit) {\n final String url = UriComponentsBuilder.fromHttpUrl(weatherServiceUrl)\n .path(\"/forecast/{location}/day/{weekday}\")\n .buildAndExpand(location, weekday)\n .toUriString();\n\n try {\n logger.trace(\"GET {}\", url);\n\n final HttpHeaders headers = new HttpHeaders();\n headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);\n\n final HttpEntity<?> requestEntity = new HttpEntity<>(headers);\n// final ResponseEntity<WeatherDaySample> forEntity = restTemplate.getForEntity(url, WeatherDaySample.class);\n final ResponseEntity<WeatherDaySample> forEntity = restTemplate.exchange(url, HttpMethod.GET, requestEntity, WeatherDaySample.class);\n\n logger.trace(\"GET {} - HTTP {}\", url, forEntity.getStatusCodeValue());\n\n return forEntity.getBody();\n } catch (RestClientResponseException ex) {\n // Http error response\n logger.error(\"GET {} - HTTP {} - {}\", url, ex.getRawStatusCode(), ex.getResponseBodyAsString());\n } catch (ResourceAccessException ex) {\n // Connection error (ex. wrong URL), or unknown http code received\n logger.error(\"GET {} - {}\", url, ex.getMessage());\n }\n\n // An error has occurred\n return null;\n }", "interface OpenWeatherMapService {\n @GET(\"forecast/daily\")\n Call<Forecast> dailyForecast(\n @Query(\"q\") String city,\n @Query(\"mode\") String format,\n @Query(\"units\") String units,\n @Query(\"cnt\") Integer num,\n @Query(\"appid\") String appid);\n}", "@Test(priority = 3)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_City() {\n\t\tweatherResponse_city = WeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"Noida_City\"),\n\t\t\t\tConfigFileReader.getProperty(\"appid\"), 200);\n\n\t}", "public String getForecast2() throws IOException, JSONException\n {\n String forecastString = \"\";\n nList = doc.getElementsByTagName(\"yweather:forecast\");\n\n for (int i = 3; i < 5; i++)\n {\n nNode = nList.item(i);\n Element element = (Element) nNode;\n\n forecastString += element.getAttribute(\"day\") + \" \" + element.getAttribute(\"date\") + \"\\n\" +\n \"Min: \" + getTemperatureInCelcius(Float.parseFloat(element.getAttribute(\"low\"))) + \"\\n\" +\n \"Max: \" + getTemperatureInCelcius(Float.parseFloat(element.getAttribute(\"high\"))) + \"\\n\" +\n element.getAttribute(\"text\") + \"\\n\\n\";\n }\n return forecastString;\n }", "@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public List<WeatherModel> getPastWeather() {\n return getPastWeather(5);\n }", "List<AirportDTO> getAirportsByCity(String city);", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "private void searchCity() {\n toggleProgress();\n try {\n WeatherClient client = builder.attach(this)\n .provider(new OpenweathermapProviderType())\n .httpClient(WeatherClientDefault.class)\n .config(config)\n .build();\n\n // Try to find a good location\n // using medium settings\n Criteria criteria = new Criteria();\n criteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n criteria.setAccuracy(Criteria.ACCURACY_MEDIUM);\n // Can we use data?\n criteria.setCostAllowed(true);\n\n // Search city by gps/network using\n // above critera\n client.searchCityByLocation(\n criteria,\n new WeatherClient.CityEventListener() {\n\n // When we get the city list\n @Override\n public void onCityListRetrieved(List<City> cityList) {\n for (int i = 0; i < cityList.size(); i++) {\n adapter.set(cityList.get(i), i);\n }\n displayMessage(\"Not the correct results?\" +\n \" Press the button above to try again.\");\n }\n\n\n @Override\n public void onWeatherError(WeatherLibException wle) {\n displayMessage(\"There seems to be no \" +\n \"weather data, please try again later.\");\n\n }\n\n\n @Override\n public void onConnectionError(Throwable t) {\n displayMessage(\"Whoops! We can't seem to \" +\n \"connect to the weather servers.\");\n }\n\n });\n\n } catch (WeatherProviderInstantiationException e) {\n displayMessage(\"Error: Unable to access \" +\n \"the weather provider.\");\n } catch (LocationProviderNotFoundException e) {\n displayMessage(\"Whoops! Unable to access \" +\n \"location provider.\");\n } catch (NullPointerException e) {\n displayMessage(\"Whoops! We can't seem to\" +\n \"connect to the weather servers.\");\n }\n\n }", "public static void main(String[] args) {\n City city = new City(60, 200);\n TourManager.addCity(city);\n City city2 = new City(180, 200);\n TourManager.addCity(city2);\n City city3 = new City(80, 180);\n TourManager.addCity(city3);\n City city4 = new City(140, 180);\n TourManager.addCity(city4);\n City city5 = new City(20, 160);\n TourManager.addCity(city5);\n City city6 = new City(100, 160);\n TourManager.addCity(city6);\n City city7 = new City(200, 160);\n TourManager.addCity(city7);\n City city8 = new City(140, 140);\n TourManager.addCity(city8);\n City city9 = new City(40, 120);\n TourManager.addCity(city9);\n City city10 = new City(100, 120);\n TourManager.addCity(city10);\n City city11 = new City(180, 100);\n TourManager.addCity(city11);\n City city12 = new City(60, 80);\n TourManager.addCity(city12);\n City city13 = new City(120, 80);\n TourManager.addCity(city13);\n City city14 = new City(180, 60);\n TourManager.addCity(city14);\n City city15 = new City(20, 40);\n TourManager.addCity(city15);\n City city16 = new City(100, 40);\n TourManager.addCity(city16);\n City city17 = new City(200, 40);\n TourManager.addCity(city17);\n City city18 = new City(20, 20);\n TourManager.addCity(city18);\n City city19 = new City(60, 20);\n TourManager.addCity(city19);\n City city20 = new City(160, 20);\n TourManager.addCity(city20);\n\n // Initialize population\n Population pop = new Population(50, true);\n System.out.println(\"Initial distance: \" + pop.getFittest().getDistance());\n\n // Evolve population for 100 generations\n pop = GA.evolvePopulation(pop);\n for (int i = 0; i < 100; i++) {\n pop = GA.evolvePopulation(pop);\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getFittest().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getFittest());\n }", "public WeatherData (Long sunset, Long sunrise, int weatherCode, String cityName, int temperature) {\n sunsetTime = sunset;\n sunriseTime = sunrise;\n weather = weatherCode;\n city = cityName;\n temp = temperature;\n }", "@Override\n public void run() {\n for(int i=0;i<TheWeatherMan.WEATHER_CHECKS; i++) {\n\n // Have some delay\n try {\n Thread.sleep(1000* startTime);\n } catch (InterruptedException e) {\n System.out.println(\"『 Weather Report 』 Pacific has gone berserk and cant sleep.\\n\" +\n \"Terminating Program...\");\n System.exit(1);\n }\n\n /**\n * Handling Different City Temperatures -------------------------------------------\n */\n\n\n // Handling Singapore Temperatures\n if(cityName == \"Singapore\") {\n\n // Generates a random number between -.3 and .3\n double randNum = (Math.random() * (.6)) - .3;\n // Formats decimals to 2 places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n\n cityTemperature = Double.valueOf(df.format((cityTemperature + randNum)));\n // Set Temp\n ((Satellite) satellite).setWeather1(cityTemperature);\n }\n\n // Handling Melbourne Temperatures\n if(cityName == \"Melbourne\") {\n Random random = new Random();\n double temp = (double) random.nextInt(45) + random.nextDouble();\n\n cityTemperature = temp;\n // Set Temp\n ((Satellite) satellite).setWeather2(cityTemperature);\n }\n\n // Handling Shanghai Temperatures\n if(cityName == \"Shanghai\") {\n\n // Fluctuate +-5\n Random random = new Random();\n double temp = ((double) random.nextInt(5) +\n random.nextDouble()) * (random.nextBoolean() ? 1 : -1);\n\n\n cityTemperature = cityTemperature + temp;\n // Set Temp\n ((Satellite) satellite).setWeather3(cityTemperature);\n }\n\n }\n }", "public void getForecasts() {\r\n\r\n\t\tWeatherDAO weatherDao = new WeatherDAO();\r\n\r\n\t\tforecasts = weatherDao.getForecasts(this.getSceneNumber());\r\n\r\n\t\tif (forecasts == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisUpdated(forecasts[0]);\r\n\r\n\t\tsetLabels(forecasts);\r\n\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}", "public void updateDataWithNewLocation(String day, int cityId) {\n mIsTomorrow = day.equals(Constants.TOMORROW);\n mCityId = cityId;\n mViewModel.getHourWeatherForecastData(mContext, String.valueOf(mCityId));\n }", "public List<ATM> listATMsByCity(String city) throws JsonParseException,\n JsonMappingException, IOException {\n RestTemplate restTemplate = new RestTemplate();\n\n String response = restTemplate.getForObject(URL, String.class);\n String toBeParsed = response.substring(6, response.length());\n\n ObjectMapper objectMapper = new ObjectMapper();\n ATM[] atms = objectMapper.readValue(toBeParsed, ATM[].class);\n\n List<ATM> atmsList = Arrays.asList(atms);\n List<ATM> atmsByCityList = new LinkedList<ATM>();\n\n for (ATM atm : atmsList) {\n String theType = atm.getType(), theCity = atm.getAddress()\n .getCity();\n if (theType.equals(\"ING\") && theCity.equalsIgnoreCase(city)) {\n atmsByCityList.add(atm);\n }\n }\n\n return atmsByCityList;\n }", "public void getWeatherData(View view){\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);\n\n //get city name from user's input in edittext\n String cityText = editText.getText().toString();\n\n //make sure spaces between words is handled properly\n try {\n String spacedCityName= URLEncoder.encode(cityText, \"UTF-8\");\n //concatenated string for link to be opened\n String link = \"https://openweathermap.org/data/2.5/weather?q=\" + spacedCityName + \"&appid=b6907d289e10d714a6e88b30761fae22\";\n //create Download class to download data\n DownloadClass downloadClass = new DownloadClass();\n downloadClass.execute(link);\n }catch (Exception e){\n loadToast();\n e.printStackTrace();\n }\n\n\n\n }", "List<City> getCityList(Integer countryId)throws EOTException;", "public City getMostVisitedPhotosOfCity(String city){\n this.city = flickrDao.getCity(city);\n\n //Get the photos of city from Flickr\n photosList = flickrDao.getCityPhotos(this.city.getPlace_id());\n\n //get the top five photos of photoslist and set them to the city\n this.city.setTopFivePhotos(ClusterService.getTopFivePhotos(photosList));\n\n return this.city;\n }", "void loadData() {\n Request request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=20.5937,78.9629\")\n .get().build();\n //Create OkHttpClient Object\n OkHttpClient client = new OkHttpClient();\n\n // Call the request using client we just created\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n //Use this code to Handle Failed Request mostly due to internet issue\n // we will just Create a Tost Message for user\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n //Here we will check is reponse is Sucessfull or is their any\n // request error i.e url error\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }\n });\n\n\n //---------------------------------FOR United States----------------------------------------\n\n //Following codes has similar output as before but the difference is the city Names here\n //is of United States\n request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=38.899101,-77.028999\")\n .get().build();\n client = new OkHttpClient();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n String respFromApi = response.body().string();\n Log.d(\"RawData\", respFromApi);\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n\n }", "public List<InputData> getCityData(String city) {\n String SQL = \"SELECT * FROM world_bank WHERE city = ?\";\n List<InputData> records = jdbcTemplate.query(SQL,\n new Object[] { city }, new DataMapper());\n return records;\n }", "public static ArrayList<Weather> getForecast(String[][] array) { \n \t\t\n \t\tArrayList<Weather> hours = new ArrayList<Weather>();\t// array to hold weather info \n \t\t\n \t\t// iterates through database array\n \t\tfor( int i = 0; i < 30; i++) {\n\t\t\tString pretty = array[i][1];\n\t\t\tString cond = array[i][2];\n\t\t\tString temp = array[i][3];\n\t\t\tString humid = array[i][4];\n\t\t\tString icon = array[i][5];\n\t\t\thours.add(new Weather(pretty, cond, \"Temperature: \" + temp + \" degrees\", \"Humidity: \" + humid + \"%\", icon));\n \t\t}\n \t\treturn hours; \n \t}", "private void findHumidities(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n int numHours = hourlyForecast.hours();\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minHum = hourlyForecast.getHour(0).humidity();\n double maxHum = minHum;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double hum = hourlyForecast.getHour(i).humidity();\n if (minHum > hum)\n minHum = hum;\n if (maxHum < hum) {\n maxHum = hum;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setHumMin((int) (minHum * 100));\n day.setHumMax((int) (maxHum * 100));\n day.setHumMaxTime(maxHour);\n }", "private void updateWeatherData(final String city){\n new Thread(){\n public void run(){\n final JSONObject json = WeatherJSON.getJSON(getActivity(), city);\n if(json != null){\n handler.post(new Runnable(){\n public void run(){\n renderWeather(json);\n }\n });\n } else {\n\n }\n }\n }.start();\n }", "private List<Tuple> weatherMap(Tuple input) {\n \n Map<String, String> mockLocationService = new HashMap<String, String>();\n mockLocationService.put(\"Harrisburg\", \"PA\");\n mockLocationService.put(\"Pittsburgh\", \"PA\");\n mockLocationService.put(\"Phildelphia\", \"PA\");\n mockLocationService.put(\"Houston\", \"TX\");\n mockLocationService.put(\"SanAntonio\", \"TX\");\n mockLocationService.put(\"Austin\", \"TX\");\n mockLocationService.put(\"Sacramento\", \"CA\");\n mockLocationService.put(\"LosAngeles\", \"CA\");\n mockLocationService.put(\"SanFransico\", \"CA\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String city = input.fst();\n String hiLow = input.snd();\n \n output.add(new Tuple(mockLocationService.get(city), hiLow));\n \n lolligag();\n \n //<state, hi low>\n return output;\n }", "@Override\n public void downloadWeatherDataHourly(String zipCode){\n\n //make request to get the l\n final OkHttpClient okHttpClient;\n final Request request;\n HttpUrl url = new HttpUrl.Builder()\n .scheme(\"https\")\n .host(WEATHER_URL)\n .addPathSegment(\"api\")\n .addPathSegment(KEY)\n .addPathSegment(\"hourly10day\")\n .addPathSegment(\"q\")\n .addPathSegment(zipCode + \".json\")\n .build();\n\n okHttpClient = new OkHttpClient();\n request = new Request.Builder()\n .url(url)\n .build();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(@NonNull Call call, @NonNull IOException e) {\n Toast.makeText(context, \"Failed to make connection\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {\n Gson gson = new Gson();\n hourlyWeatherInfo = gson.fromJson(response.body().string(), HourlyWeatherInfo.class);\n view.hourlyWeatherDownloadedUpdateUI(hourlyWeatherInfo);\n }\n });\n\n }", "public ArrayList<Forecast> getForecastsForDay( int day ) {\n if (forecasts.size() == 0) {\n return null;\n }\n\n int startIndex = 0;\n int endIndex = 0;\n\n if (day < 8) {\n startIndex = dayIndices[day];\n }\n\n if (startIndex == -1) {\n return null;\n }\n\n if (day < 7) {\n endIndex = dayIndices[day+1];\n if (endIndex < 0) {\n endIndex = forecasts.size();\n }\n } else {\n endIndex = forecasts.size();\n }\n\n return new ArrayList<>(forecasts.subList(startIndex, endIndex));\n }", "@Test(dataProvider=\"WeatherTests\", dataProviderClass=DataProviders.class, enabled=true)\n\tpublic void WeatherTests(TestInput testInput) {\n\t\ttest = extent.startTest(\"Weather Test for \" + testInput.cityName);\n\t\ttest.log(LogStatus.INFO, \"Starting tests for \" + testInput.cityName);\n\n\t\ttry {\n\t\t\t//Checks if we were able to find an entry for the given city in the cities.json file\n\t\t\tif(testInput.city.id != null) {\n\t\t\t\tlog.debug(\"Found an entry for the city \" + testInput.cityName + \" in the Cities JSON File. Starting.\");\n\n\t\t\t\t//Extract the weather information from API for the given city\n\t\t\t\tCityWeatherInfo currenctCityWeatherInfoAPI = APIRequests.extractLatestWeatherForecastFromAPI(testInput, config.getProperty(\"APIKEY\"));\n\n\t\t\t\t//Extract the weather information from the website\n\t\t\t\tHomePage home = new HomePage();\n\t\t\t\thome.setTemperatureToFarenheit(); //Switch temperature to farenheit to be inline with the information from API\n\n\t\t\t\tSearchResultsPage resultsPage = home.searchCity(testInput.cityName.trim());\n\t\t\t\tCityWeatherPage cityWeatherPage = resultsPage.clickOnCityEntry(testInput.city.id.trim());\n\n\t\t\t\tArrayList<Double> forecastWeathers = cityWeatherPage.extractForecastTemperatures();\n\t\t\t\tcityWeatherPage.navigateToHourlyTab();\n\t\t\t\tCityWeatherInfo currenctCityAPIWeatherInfoWeb = cityWeatherPage.extractFirstForecastInfo();\n\n\t\t\t\t//////////// TEST 1 //////////////\n\t\t\t\t//Checks to see if the forecast weather information from API matches the data from website\n\t\t\t\tif(currenctCityWeatherInfoAPI.equals(currenctCityAPIWeatherInfoWeb))\n\t\t\t\t\ttest.log(LogStatus.PASS, \"TEST1: Weather information from API matches with website\");\n\t\t\t\telse {\n\t\t\t\t\ttest.log(LogStatus.FAIL, \"TEST1: Weather information from API does not match with website\");\n\n\t\t\t\t\tif(currenctCityWeatherInfoAPI.temperatureInFarenheit != currenctCityAPIWeatherInfoWeb.temperatureInFarenheit)\n\t\t\t\t\t\ttest.log(LogStatus.FAIL, \"TEST1: Temperature from API (\" + currenctCityWeatherInfoAPI.temperatureInFarenheit +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\") does not match Temperature from Web (\" + currenctCityAPIWeatherInfoWeb.temperatureInFarenheit + \")\");\n\t\n\t\t\t\t\tif(currenctCityWeatherInfoAPI.windSpeedInMPH != currenctCityAPIWeatherInfoWeb.windSpeedInMPH)\n\t\t\t\t\t\ttest.log(LogStatus.FAIL, \"TEST1: Wind Speed from API (\" + currenctCityWeatherInfoAPI.windSpeedInMPH +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\") does not match Wind Speed from Web (\" + currenctCityAPIWeatherInfoWeb.windSpeedInMPH + \")\");\n\t\n\t\t\t\t\tif(currenctCityWeatherInfoAPI.cloudCoverPercentage != currenctCityAPIWeatherInfoWeb.cloudCoverPercentage)\n\t\t\t\t\t\ttest.log(LogStatus.FAIL, \"TEST1: Cloud Coverage from API (\" + currenctCityWeatherInfoAPI.cloudCoverPercentage +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"%) does not match Cloud Coverage from Web (\" + currenctCityAPIWeatherInfoWeb.cloudCoverPercentage + \"%)\");\n\t\n\t\t\t\t\tif(currenctCityWeatherInfoAPI.atmPressureInHPA != currenctCityAPIWeatherInfoWeb.atmPressureInHPA)\n\t\t\t\t\t\ttest.log(LogStatus.FAIL, \"TEST1: Atmospheric Pressure from API (\" + currenctCityWeatherInfoAPI.atmPressureInHPA +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\") does not match Atmospheric Pressure from Web (\" + currenctCityAPIWeatherInfoWeb.atmPressureInHPA + \")\");\n\t\t\t\t}\n\n\t\t\t\t//////////// TEST 2 //////////////\n\t\t\t\t//Check whether the difference between minimum and maximum forecast temperature listed on website is less than 10 or not\n\t\t\t\tdouble minForecastWeather = Common.minValueInList(forecastWeathers), maxForecastWeather = Common.maxValueInList(forecastWeathers);\n\t\t\t\tdouble diffForecastWeather = maxForecastWeather - minForecastWeather; \n\t\t\t\tif(diffForecastWeather <= 10)\n\t\t\t\t\ttest.log(LogStatus.PASS, \"TEST2: Difference between Maximum Forecast Temperature (\" + maxForecastWeather + \") \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"and Minimum Forecast Temperature (\" + minForecastWeather + \") is \" + diffForecastWeather\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" which is less than 10 degrees farenheit\");\n\t\t\t\telse\n\t\t\t\t\ttest.log(LogStatus.FAIL, \"TEST2: Difference between Maximum Forecast Temperature (\" + maxForecastWeather + \") \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ \"and Minimum forecast temperature (\" + minForecastWeather + \") is \" + diffForecastWeather\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" which is greater than 10 degrees farenheit\");\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Could not find an entry for the city \" + testInput.cityName + \" in the Cities JSON File. Skipping.\");\n\t\t\t\ttest.log(LogStatus.FAIL, \"Unable to find entry in cities.json for the city: \" + testInput.cityName);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\textent.endTest(test);\n\t\t}\n\t}", "private static void addCity(City[] cities, int numberOfMonths) throws IllegalArgumentException,IOException {\n Scanner kb = new Scanner(System.in);\n System.out.print(\"Enter city name:\");\n String cityName = kb.next();\n System.out.print(\"Enter country name:\");\n String countryName = kb.next();\n if(getTheindexOrcheckAvilability(cities,cityName,countryName)!=-1)\n throw new IllegalArgumentException(\"Duplicate City and Country Pair.\");\n double [] rainfallAverages = new double[numberOfMonths];\n for (int j = 0 ; j < numberOfMonths ; j++) {\n System.out.print(\"Enter month#\" + (j+1) + \" total rainfall value [mm]: \");\n rainfallAverages[j] = kb.nextDouble();\n }\n City [] updatedCities = new City[cities.length + 1];\n for (int i = 0 ; i < cities.length ; i++ )\n updatedCities[i] = cities[i];\n City newCity = new City(cityName , countryName , rainfallAverages);\n updatedCities[cities.length] = newCity;\n updateFile(updatedCities,false);\n }", "private void fetchdata(String countries)\n {\n final String url = \"https://api.weatherapi.com/v1/forecast.json?key=20cc9a9b0a4243b4be970612211704&q=\"+countries+\"&days=1&aqi=no&alerts=no\";\n\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response)\n {\n\n // Handle the JSON object and\n // handle it inside try and catch\n try {\n\n // Creating object of JSONObject\n JSONObject jsonObject = new JSONObject(response);\n country.setText(\"Region: \"+jsonObject.getJSONObject(\"location\").getString(\"region\"));\n currentWeather.setText(\"Currently \"+jsonObject.getJSONObject(\"current\").getJSONObject(\"condition\").getString(\"text\"));\n humidity.setText(\"Current Humidity: \"+jsonObject.getJSONObject(\"current\").getString(\"humidity\"));\n temperature.setText(\"Current°C: \"+jsonObject.getJSONObject(\"current\").getString(\"temp_c\"));\n temperatureF.setText(\"Current°F: \"+jsonObject.getJSONObject(\"current\").getString(\"temp_f\"));\n time.setText(\"Current Time: \"+jsonObject.getJSONObject(\"location\").getString(\"localtime\"));\n countryZone.setText(\"Current Zone: \"+jsonObject.getJSONObject(\"location\").getString(\"tz_id\"));\n windD.setText(\"Direction: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_dir\"));\n windS.setText(\"Speed: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_kph\")+\" Kph\");\n windDegree.setText(\"Degree: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_degree\")+\" °\");\n\n JSONArray jsonArray = jsonObject.getJSONObject(\"forecast\").getJSONArray(\"forecastday\");\n for(int i = 0;i<jsonArray.length();i++){\n jsonObject = jsonArray.getJSONObject(i);\n tWeather = jsonObject.getJSONObject(\"day\").getJSONObject(\"condition\").getString(\"text\");\n tDate = jsonObject.getString(\"date\");\n tTempC = jsonObject.getJSONObject(\"day\").getString(\"avgtemp_c\");\n tTempF = jsonObject.getJSONObject(\"day\").getString(\"avgtemp_f\");\n tHumidity = jsonObject.getJSONObject(\"day\").getString(\"avghumidity\");\n\n phases = jsonObject.getJSONObject(\"astro\").getString(\"moon_phase\");\n sunriseT = jsonObject.getJSONObject(\"astro\").getString(\"sunrise\");\n sunsetT = jsonObject.getJSONObject(\"astro\").getString(\"sunset\");\n moonriseT = jsonObject.getJSONObject(\"astro\").getString(\"moonrise\");\n moonsetT = jsonObject.getJSONObject(\"astro\").getString(\"moonset\");\n TwillRain = jsonObject.getJSONObject(\"day\").getString(\"daily_chance_of_rain\");\n Twillsnow = jsonObject.getJSONObject(\"day\").getString(\"daily_chance_of_snow\");\n\n }\n forecastWeather.setText(tWeather+\" later\");\n tempTommorrowF.setText(\"Avg daily °F: \"+tTempF);\n tempTommorowC.setText(\"Avg daily °C: \"+tTempC);\n TchanceRain.setText(\"Chances of Rain \"+TwillRain+\" %\");\n TchanceSnow.setText(\"Chances of Snow \"+Twillsnow+\" %\");\n humidityT.setText(\"Humidity: \"+tHumidity);\n //myuri = Uri.parse(uriS);\n Tphases.setText(\"Moon Phases \"+phases);\n Tsunrise.setText(\"Sunsrise: \"+sunriseT);\n Tsunset.setText(\"Sunset: \"+sunsetT);\n Tmoonrise.setText(\"moonrise: \"+moonriseT);\n Tmoonset.setText(\"moonset: \"+moonsetT);\n\n\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error)\n {\n Toast.makeText(\n MainActivity.this,\n error.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(request);\n requestQueue.getCache().clear();\n }", "@Test\n public void testTimezone() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/Paris\"));\n\n SunTimes paris = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .latitude(48, 51, 24.0) // Latitude of Paris: 48°51'24\" N\n .longitude(2, 21, 6.0) // Longitude: 2°21'06\" E\n .execute();\n System.out.println(\"Sunrise in Paris: \" + paris.getRise());\n System.out.println(\"Sunset in Paris: \" + paris.getSet());\n\n SunTimes newYork = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYork.getRise());\n System.out.println(\"Sunset in New York: \" + newYork.getSet());\n\n SunTimes newYorkTz = SunTimes.compute()\n .on(2020, 5, 1) // May 1st, 2020, starting midnight\n .timezone(\"America/New_York\") // ...New York timezone\n .at(40.712778, -74.005833) // Coordinates of New York\n .execute();\n System.out.println(\"Sunrise in New York: \" + newYorkTz.getRise());\n System.out.println(\"Sunset in New York: \" + newYorkTz.getSet());\n }", "private String connectAPICity(String city, String country) throws IOException {\n\t\t\n\t\tOkHttpClient client = new OkHttpClient();\n\t\tRequest request;\n\t\t\n\t\tif(country.isEmpty()) {\n\t\t\trequest = new Request.Builder()\n\t\t\t\t.url(\"https://community-open-weather-map.p.rapidapi.com/weather?q=\" + city)\n\t\t\t\t.get()\n\t\t\t\t.addHeader(\"x-rapidapi-key\", RAPID_API_KEY)\n\t\t\t\t.addHeader(\"x-rapidapi-host\", \"community-open-weather-map.p.rapidapi.com\")\n\t\t\t\t.build();\n\t\t}else {\n\t\t\trequest = new Request.Builder()\n\t\t\t\t.url(\"https://community-open-weather-map.p.rapidapi.com/weather?q=\" + city + \"%2C\" + country)\n\t\t\t\t.get()\n\t\t\t\t.addHeader(\"x-rapidapi-key\", RAPID_API_KEY)\n\t\t\t\t.addHeader(\"x-rapidapi-host\", \"community-open-weather-map.p.rapidapi.com\")\n\t\t\t\t.build();\n\t\t}\n\n\t\treturn getResponse(client, request);\n\t\t\n\t}", "public HashMap<String,Weather> getPrecipData() {\n HashMap<String, Weather> result = new HashMap<String, Weather>();\n //String url = NOAA.PRECIP_URL.replace(\"*STARTDATE*\", startDate).replace(\"*ENDDATE*\", endDate);\n try {\n // Get and parse the JSON\n Response res = makeRequest(NOAA.PRECIP_URL);\n JsonParser parser = new JsonParser();\n JsonArray results = parser.parse(res.body().string())\n .getAsJsonObject()\n .getAsJsonArray(\"results\");\n\n // Iterate over results, storing the values un the hashmap,\n // the key is the StationID, the value is a weather object of the\n // conditions and information about the station.\n Iterator<JsonElement> iterator = results.iterator();\n while (iterator.hasNext()) {\n JsonObject e = iterator.next().getAsJsonObject();\n String type = e.get(\"datatype\").getAsString();\n String station = e.get(\"station\").getAsString();\n String attributes = e.get(\"attributes\").getAsString();\n String date = e.get(\"date\").getAsString();\n int value = e.get(\"value\").getAsInt();\n\n result.put(station, new Weather(type, station, attributes, date, value));\n }\n return result;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static ArrayList<Weather> getForecast(JsonArray timearray, DatabaseManager myDB) { \n \t\t\n \t\tArrayList<Weather> hours = new ArrayList<Weather>();\t// array to hold weather info \n \t\t// clears database before rebuilding\n \t\tmyDB.removeAll();\n \t\t\n \t\t// iterates through Json array\n \t\tfor( int i = 0; i < 30; i++) {\n\t\t\tJsonObject time = timearray.get(i).getAsJsonObject();\n\t\t\tString pretty = time.get(\"FCTTIME\").getAsJsonObject().get(\"pretty\").getAsString();\n\t\t\tString temp = time.get(\"temp\").getAsJsonObject().get(\"english\").getAsString();\n\t\t\tString cond = time.get(\"condition\").getAsString();\n\t\t\tString humid = time.get(\"humidity\").getAsString();\n\t\t\tString icon = time.get(\"icon_url\").getAsString();\n\t\t\thours.add(new Weather(pretty, cond, \"Temperature: \" + temp + \" degrees\", \"Humidity: \" + humid + \"%\", icon));\n\t\t\t\n\t\t\t// rebuilds database, only adding the time to the first entry (it may throw a non-unique error otherwise)\n \t\tif (i == 0){\n \t\t\tmyDB.addRow(System.currentTimeMillis(), pretty, cond, temp, humid, icon);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tmyDB.addRow(i, pretty, cond, temp, humid, icon);\n \t\t}\n \t\t}\n \t\treturn hours; \n \t}", "@Override\n public Single<WeatherData> getForecastData(@NonNull final Location location) {\n return Single.just(true)\n .observeOn(Schedulers.io())\n .flatMap(aBoolean -> api.getForecast(apiKey, location.latitude(), location.longitude(), EXCLUDE_DATA_BLOCKS, \"ca\"));\n }", "public LongTermForecast(JSONObject j, char tempUnits){\n \n /*Set sub-JSONObjects\n *OpenWeatherMap returns a large JSONObject that contains multiple\n *smaller JSONObjects; we get these during this step\n */\n \ttry{\n this.jCity = j.getJSONObject(\"city\");\n this.jListArray = j.getJSONArray(\"list\");\n this.jTempList = new ArrayList<JSONObject>();\n this.jWeatherList = new ArrayList<JSONObject>();\n int dateOffset = 0; // <--- To exclude the current day, change this to 1\n for (int i = dateOffset; i < 5 + dateOffset; i++) \n {\n JSONObject nextObject = jListArray.getJSONObject(i);\n this.jTempList.add(nextObject.getJSONObject(\"temp\"));\n this.jWeatherList.add(nextObject.getJSONArray(\"weather\").getJSONObject(0));\n }\n this.tempUnits = tempUnits;\n\n \n //Set the variable values based on the JSON data\n this.fullCityName = getFullCityName(jCity);\n this.temperatureList = new ArrayList<String>();\n this.minTempList = new ArrayList<String>();\n this.maxTempList = new ArrayList<String>();\n this.skyConditionList = new ArrayList<String>();\n this.skyIconList = new ArrayList<ImageIcon>();\n this.dateList = new ArrayList<String>();\n for (int i = 0; i < 5; i++)\n {\n JSONObject nextTemp = jTempList.get(i);\n JSONObject nextWeather = jWeatherList.get(i);\n this.temperatureList.add(getTemperature(nextTemp));\n this.minTempList.add(getMinTemp(nextTemp));\n this.maxTempList.add(getMaxTemp(nextTemp));\n this.skyConditionList.add(getSkyCondition(nextWeather));\n try{\n this.skyIconList.add(getSkyIcon(nextWeather));\n }\n catch(IOException e){\n System.out.println(\"Error: Can't obtain sky icon\");\n }\n this.dateList.add(getDate(jListArray, i + dateOffset));\n }\n \t} catch (Exception e){\n\t\t\tthis.temperatureList = new ArrayList<String>();\n\t\t\tthis.skyConditionList = new ArrayList<String>();\n\t\t\tthis.skyIconList = new ArrayList<ImageIcon>();\n\t\t\tthis.minTempList = new ArrayList<String>();\n\t\t\tthis.maxTempList = new ArrayList<String>();\n\t this.dateList = new ArrayList<String>();\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\tthis.minTempList.add(\"No Data \");\n\t\t\t\tthis.maxTempList.add(\"No Data \");\n\t\t\t\tthis.temperatureList.add(\"No Data \");\n\t\t\t\tthis.dateList.add(\"No Data \");\n\t\t\t\ttry {\n\t\t\t\t\tthis.skyIconList.add(getSkyIcon(new JSONObject(\"{icon:01d}\")));\n\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.skyConditionList.add(\"No Data \");\n\t\t\t} \n\t\t}\n\n }", "public ArrayList<Weather> getDarkSkyWeather(String longitude, String latitude) {\n\n Log.i(\"long: \", longitude);\n Log.i(\"lat: \", latitude);\n\n Weather weather = new Weather();\n ArrayList<Weather> weatherArr = new ArrayList<Weather>();\n ArrayList<String> temp = new ArrayList<String>();\n String content;\n try {\n content = weather.execute(\"https://api.darksky.net/forecast/a4b289aa3abfbee48b4fc1df98208a34/\"+ latitude + \",\" + longitude + \"?lang=vi&exclude=minutely,flags,currently\").get();\n\n if(content == null)\n {\n return null;\n }\n JSONObject obj = new JSONObject(content);\n\n JSONObject daily = obj.getJSONObject(\"daily\");\n JSONArray dataDaily = daily.getJSONArray(\"data\");\n\n String summary;\n String temperatureMin;\n String temperatureMax;\n String humidity;\n String windSpeed;\n String windGust;\n String airPressure;\n String visibility;\n String ozoneDensity;\n String uvIndex;\n String cloudCover;\n String precipProbability;\n String time;\n\n Bundle bundle2 = new Bundle();\n images = new Integer[dataDaily.length()];\n\n for(int i = 0; i < dataDaily.length(); i++)\n {\n Weather result = new Weather();\n\n JSONObject detail = dataDaily.getJSONObject(i);\n\n summary = detail.getString(\"summary\");\n temperatureMin = detail.getString(\"temperatureMin\");\n temperatureMax = detail.getString(\"temperatureMax\");\n precipProbability = detail.getString(\"precipProbability\");\n humidity = detail.getString(\"humidity\");\n windSpeed = detail.getString(\"windSpeed\");\n windGust = detail.getString(\"windGust\");\n airPressure = detail.getString(\"pressure\");\n visibility = detail.getString(\"visibility\");\n ozoneDensity = detail.getString(\"ozone\");\n uvIndex = detail.getString(\"uvIndex\");\n cloudCover = detail.getString(\"cloudCover\");\n time = unixTimeToDate(detail.getString(\"time\"));\n\n\n String precipProb = String.valueOf(String.format(\"%.0f\", (Float.parseFloat(precipProbability)*100))+ \"%\");\n\n // Update UI\n result.setDate(normalizeDate(time.substring(0, 10)));\n result.setWeather(summary);\n result.setDescription(\"Khả năng mưa: \" + precipProb);\n result.setTemperature(celsiusToFahrenheit(temperatureMax) + \"\\u2103\");\n result.setWind(\"Gió: \" + windSpeed + \"mph\");\n weatherArr.add(result);\n\n if(summary.toLowerCase().contains(\"quang\"))\n {\n images[i] = R.drawable.sunny;\n }\n if(summary.toLowerCase().contains(\"mưa\"))\n {\n images[i] = R.drawable.rainy;\n }\n else if (summary.toLowerCase().contains(\"âm u\"))\n {\n images[i] = R.drawable.foggy;\n }\n else if (summary.toLowerCase().contains(\"mây\"))\n {\n images[i] = R.drawable.cloudy;\n }\n else\n {\n images[i] = R.drawable.sunny;\n }\n\n\n// Bundle bundlee = new Bundle();\n// ArrayList<String> dailyData = new ArrayList<String>();\n//\n// dailyData.add(summary);\n// dailyData.add(precipProb);\n// dailyData.add(normalizeDate(time.substring(0, 10)));\n// dailyData.add(temperatureMin +\"\\u2103\");\n// dailyData.add(temperatureMax +\"\\u2103\");\n// dailyData.add(humidity + \"%\");\n// dailyData.add(windSpeed + \" mph\");\n// dailyData.add(windGust + \" mph\");\n// dailyData.add(airPressure + \" mb\");\n// dailyData.add(visibility + \" mi\");\n// dailyData.add(ozoneDensity + \" DU\");\n// dailyData.add(uvIndex);\n// dailyData.add(cloudCover);\n// dailyData.add(String.valueOf(i)); // fragment-tag\n//\n// bundlee.putStringArrayList(\"daily-data\",dailyData);\n\n\n Bundle bundle = new Bundle();\n bundle.putString(\"weather\", summary);\n bundle.putString(\"PoP\", precipProb);\n bundle.putString(\"date\", normalizeDate(time.substring(0, 10)));\n bundle.putString(\"tempMin\", temperatureMin +\"\\u2103\");\n bundle.putString(\"tempMax\", temperatureMax +\"\\u2103\");\n bundle.putString(\"humidity\", humidity + \"%\");\n bundle.putString(\"windSpeed\", windSpeed + \" mph\");\n bundle.putString(\"winGust\", windGust + \" mph\");\n bundle.putString(\"airPressure\", airPressure + \" mb\");\n bundle.putString(\"visibility\", visibility + \" mi\");\n bundle.putString(\"ozoneDensity\", ozoneDensity + \" DU\");\n bundle.putString(\"uvIndex\", uvIndex);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTag\", String.valueOf(i));\n\n temp.add(temperatureMin);\n\n bundleDailyArr.add(bundle);\n// bundleDailyArr.add(bundlee);\n\n// Log.i(\"Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n for(int i = 0; i < temp.size(); i++)\n {\n bundle2.putString(\"temp\"+String.valueOf(i), temp.get(i));\n }\n\n\n\n// Get weather hourly\n\n JSONObject hourly = obj.getJSONObject(\"hourly\");\n JSONArray dataHourly = hourly.getJSONArray(\"data\");\n String temperature;\n\n for(int i = 0; i < dataHourly.length(); i++)\n {\n JSONObject detail = dataHourly.getJSONObject(i);\n\n temperature = detail.getString(\"temperature\");\n precipProbability = detail.getString(\"precipProbability\");\n windSpeed = detail.getString(\"windSpeed\");\n cloudCover = detail.getString(\"cloudCover\");\n\n Bundle bundle = new Bundle();\n bundle.putString(\"PoP\", precipProbability);\n //bundle.putString(\"temp\", String.valueOf((int)(Float.parseFloat(temperatureMin) + Float.parseFloat(temperatureMax) / 2)));\n bundle.putString(\"temperature\", temperature);\n bundle.putString(\"windSpeed\", windSpeed);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTagasd\", String.valueOf(i));\n\n\n bundleHourlyArr.putBundle(String.valueOf(i),bundle);\n\n\n Log.i(\"Hourly Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return weatherArr;\n }", "public List<WeatherCitySummary> findAllCity(){\n return weatherCityRepository.findAllCity();\n }", "@Override\n public City getStatsByCity(String name) throws UnirestException {\n City cityWeather = new City();\n JSONObject object = weatherService.getWeatherByCity(name);\n Coord coord = formatObject(\"coord\",object,Coord.class);\n Wind wind = formatObject(\"wind\",object,Wind.class);\n\n Clouds clouds = formatObject(\"clouds\",object,Clouds.class);\n MainStats mainStats = formatObject(\"main\",object,MainStats.class);\n JSONObject objectWeather = object.getJSONArray(\"weather\").getJSONObject(0);\n Weather weather = mapWeather(objectWeather);\n cityWeather.setCoord(coord);\n cityWeather.setWeather(weather);\n cityWeather.setWind(wind);\n cityWeather.setClouds(clouds);\n cityWeather.setName(object.getString(\"name\"));\n cityWeather.setTimezone(object.getInt(\"timezone\"));\n cityWeather.setCod(object.getInt(\"cod\"));\n cityWeather.setVisibility(object.getInt(\"visibility\"));\n return cityWeather;\n }", "@Override\n protected String[] doInBackground(String... params) {\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n // Will contain the raw JSON response as a string.\n String forecastJsonStr = null;\n\n String location = params[0];\n String format = \"json\";\n String units = params[1];\n String lang = \"fr\";\n int numDays = 14;\n\n try {\n // Construct the URL for the OpenWeatherMap query\n // Possible parameters are avaiable at OWM's forecast API page, at\n // http://openweathermap.org/API#forecast\n final String FORECAST_BASE_URL =\n \"http://api.openweathermap.org/data/2.5/forecast/daily?\";\n final String QUERY_PARAM = \"q\";\n final String FORMAT_PARAM = \"mode\";\n final String UNITS_PARAM = \"units\";\n final String DAYS_PARAM = \"cnt\";\n final String LANGUAGE_PARAM = \"lang\";\n final String APPID_PARAM = \"appid\";\n\n Uri builtUri = Uri.parse(FORECAST_BASE_URL).buildUpon()\n .appendQueryParameter(QUERY_PARAM, location)\n .appendQueryParameter(FORMAT_PARAM, format)\n .appendQueryParameter(UNITS_PARAM, units)\n .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))\n .appendQueryParameter(LANGUAGE_PARAM, lang)\n .appendQueryParameter(APPID_PARAM, \"232763e5b836e83388caca0749577747\")\n .build();\n\n URL url = new URL(builtUri.toString());\n// Log.v(LOG_TAG, url.toString());\n\n // Create the request to OpenWeatherMap, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuilder builder = new StringBuilder();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)\n // But it does make debugging a *lot* easier if you print out the completed\n // builder for debugging.\n builder.append(line).append(\"\\n\");\n }\n\n if (builder.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n forecastJsonStr = builder.toString();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error \" + e, e);\n\n // If the code didn't successfully get the weather data, there's no point in attempting\n // to parse it.\n return null;\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(LOG_TAG, \"Error closing stream\", e);\n }\n }\n }\n\n try {\n return getWeatherDataFromJson(forecastJsonStr, numDays);\n } catch (JSONException e) {\n Log.e(LOG_TAG, e.getMessage(), e);\n e.printStackTrace();\n }\n\n // This will only happen if there was an error getting or parsing the forecast.\n return null;\n }", "@Test\n\tpublic void noValidForecastsReturnZeroResultTest() {\n\t\tcurrentDate = LocalDate.of(2019, 01, 28);\n\t\tAverageTemperatureAndPressure atp = forecastService.getAverageTemperatureAndPressure(city, currentDate, 3);\n\t\t\n\t\tassertEquals(0, atp.getAvrgDayTimeTemperature(), 0.000000001);\n\t\tassertEquals(0, atp.getAvrgNightTimeTemperature(), 0.000000001);\n\t\tassertEquals(0, atp.getAvrgPressure(), 0.000000001);\n\t}", "public void setCityCount(int cityCount) {\n\t\tthis.cityCount = cityCount;\n\t}", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "net.webservicex.www.WeatherForecasts addNewWeatherForecasts();", "public static String getWoeid(String city)\n {\n try {\n String inline = useAPI(\"https://www.metaweather.com/api/location/search/?query=\" + city);\n if (!inline.equals(\"[]\")) {\n String[] words = inline.split(\",\");\n String[] erg = words[2].split(\":\");\n return erg[1];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "private void findViews(){\n input = (EditText)findViewById(R.id.inputCity);\n input.setText(\"Montreal\");\n temperature = (TextView)findViewById(R.id.temperature);\n spinner = (Spinner)findViewById(R.id.spinner);\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.iso_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n weatherBtn = (Button)findViewById(R.id.weatherBtn);\n //On the button click, an Async task is launched\n weatherBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n temperature.setText(\"\");\n String city = input.getText().toString();\n String iso = spinner.getSelectedItem().toString();\n String forecastQuery = ForecastURL + city + \",\" + iso + \"&mode=xml&units=metric&appid=080b8de151ba3865a7b5e255f448f10f\";\n Log.d(TAG, forecastQuery);\n new WeatherActivityTask(WeatherActivity.this , forecastQuery).execute();\n }\n });\n }", "@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}", "public ArrayList<Flight> getCity(String city) {\n return connects.get(city);\n }", "public WeatherStation(String city, ArrayList<ie.nuig.stattion.Measurement> Measurement) \n\t{\n\t\tthis.city = city;\n\t\tthis.Measurement = Measurement;\n\t\tstations.add(this);// Every time you make new weather station it will get added to this list\n\t}", "private void getFiveDays(BaseResponse baseResponse) {\n\n Observable.fromCallable(() -> {\n for (int i = 0; i < baseResponse.getList().size(); i = i + 8) {\n BottomTemp bottomTemp = new BottomTemp(baseResponse.getList().get(i).getWeather().get(0).getIcon() + \"@2x\" + \".png\",\n new DecimalFormat(\"##.##\").format(baseResponse.getList().get(i).getMain().getTemp() - 273.15),\n baseResponse.getList().get(i).getDtTxt());\n alltemp.add(bottomTemp);\n if (alltemp.size() > 6)\n break;\n }\n\n return alltemp;\n\n\n }\n )\n .subscribeOn(Schedulers.computation())\n .observeOn(AndroidSchedulers.mainThread())\n .doOnError(throwable -> Log.e(\"Exception\", throwable.getMessage()))\n .subscribe((alltemp) -> {\n if (alltemp.size() > 0)\n showMore.setVisibility(View.VISIBLE);\n }, (throwable) -> Log.e(\"Exception\", throwable.getMessage()));\n }", "com.google.ads.googleads.v13.services.ForecastMetrics getForecast();", "@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }", "@Repository\npublic interface ForecastWeatherRepository extends JpaRepository<ForecastWeather,Integer> {\n List<ForecastWeather> findTop28ByCityIdOrderByFutureDateDesc(Integer cityId);\n ForecastWeather findByFutureDateAndCity(LocalDate localDate, City city);\n}", "public void getCityData(String cityName){\n\t\tICityDataService cityDataService = new CityDataService();\n\t\tcityData = cityDataService.getCityData(cityName);\n\t}", "City city(int i) {\r\n\t\treturn tsp.cities[this.index[i]];\r\n\t}", "@Cacheable(\"darkSkyDirectionWind\")\n public WeatherDataDto getDirectionWind(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setDirectionWind(constants.getMessageDoesNotSupportField());\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;", "@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }", "@Test\r\n public void multipleCities() {\r\n // Create new list of cities\r\n Vector<City> cities = new Vector<City>();\r\n\r\n // Fill in data for each cities country, city info\r\n Country countryA = new Country(\"AAA\", \"TestCountryA\");\r\n City cityA = new City(1, \"TestCity\", \"AAA\", \"DistrictTest\", 11111);\r\n cities.add(cityA);\r\n given(countryRepository.findByCode(\"AAA\")).willReturn(countryA);\r\n\r\n Country countryB = new Country(\"BBB\", \"TestCountryB\");\r\n City cityB = new City(1, \"TestCity\", \"BBB\", \"DistrictTest2\", 22222);\r\n cities.add(cityB);\r\n given(countryRepository.findByCode(\"BBB\")).willReturn(countryB);\r\n\r\n Country countryC = new Country(\"CCC\", \"TestCountryC\");\r\n City cityC = new City(1, \"TestCity\", \"CCC\", \"DistrictTest3\", 33333);\r\n cities.add(cityC);\r\n given(countryRepository.findByCode(\"CCC\")).willReturn(countryC);\r\n\r\n // temp and the same the same for all test cities A,B, and C given the same name \"TestCity\"\r\n given(weatherService.getTempAndTime(\"TestCity\"))\r\n .willReturn(new TempAndTime(310.37, 1593964800, -14400));\r\n\r\n given(cityRepository.findByName(\"TestCity\")).willReturn(cities);\r\n\r\n CityInfo cityResult = cityService.getCityInfo(\"TestCity\");\r\n CityInfo expectedResult =\r\n new CityInfo(1, \"TestCity\", \"AAA\", \"TestCountryA\", \"DistrictTest\", 11111, 99.0, \"12:00 PM\");\r\n\r\n assertThat(cityResult).isEqualTo(expectedResult);\r\n }", "@Test(priority = 4)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_CityAndStateCode() {\n\t\tWeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"London_City_State\"), ConfigFileReader.getProperty(\"appid\"),\n\t\t\t\t200);\n\n\t}", "private void getHttpResponse() {\n String url = \"https://api.openweathermap.org/data/2.5/weather?id=\"+city.getId()+\"&units=metric&appid=77078c41435ef3379462eb28afbdf417\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Accept\", \"application/json\")\n .header(\"Content-Type\", \"application/json\")\n .build();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n String message = e.getMessage();\n System.out.println(message);\n }\n\n /**\n * Update the UI with the information\n * @param call\n * @param response\n * @throws IOException\n */\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String body = response.body().string();\n\n Gson gson = new Gson();\n CityInfoDto cityInfo = gson.fromJson(body, CityInfoDto.class);\n\n setNewValues(Math.round(cityInfo.main.temp), cityInfo.weather[0].main);\n setBackground();\n }\n });\n }", "@Override\n @Cacheable(\"darkSkyPressure\")\n public WeatherDataDto getPressure(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setPressure(pressure);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }" ]
[ "0.5988832", "0.5880584", "0.5806552", "0.5779802", "0.5729594", "0.5606808", "0.55668634", "0.5525065", "0.55196583", "0.54711634", "0.5365364", "0.53408617", "0.52838355", "0.5262539", "0.5257765", "0.52459556", "0.52318376", "0.52318347", "0.52195007", "0.52125025", "0.52053726", "0.51999396", "0.51719195", "0.51406157", "0.511033", "0.509338", "0.5034301", "0.5023049", "0.49646154", "0.49534962", "0.4933323", "0.4933042", "0.49275967", "0.49162716", "0.49109164", "0.4886199", "0.4885014", "0.48718113", "0.48604932", "0.48411906", "0.48392123", "0.4820491", "0.4808244", "0.48043546", "0.47849587", "0.47829583", "0.4782122", "0.4772833", "0.47631428", "0.47596827", "0.47556984", "0.47396272", "0.47391996", "0.4733066", "0.47295144", "0.47281036", "0.47173008", "0.47164777", "0.47160318", "0.47069854", "0.47035578", "0.46901354", "0.46785453", "0.46771368", "0.4670295", "0.46701342", "0.46561265", "0.4647751", "0.46411726", "0.46391207", "0.46352705", "0.4578151", "0.45667085", "0.45649412", "0.45647696", "0.45559004", "0.45552275", "0.4550197", "0.45487517", "0.45424104", "0.45413405", "0.45394108", "0.4523718", "0.45208445", "0.45183435", "0.45147103", "0.4512829", "0.45097122", "0.45090926", "0.4502741", "0.44870293", "0.44800508", "0.44763562", "0.44746822", "0.44686535", "0.44644985", "0.4452852", "0.444599", "0.44386616", "0.443324" ]
0.71254957
0
Gets weather data for current time
private String connectAPICity(String city, String country) throws IOException { OkHttpClient client = new OkHttpClient(); Request request; if(country.isEmpty()) { request = new Request.Builder() .url("https://community-open-weather-map.p.rapidapi.com/weather?q=" + city) .get() .addHeader("x-rapidapi-key", RAPID_API_KEY) .addHeader("x-rapidapi-host", "community-open-weather-map.p.rapidapi.com") .build(); }else { request = new Request.Builder() .url("https://community-open-weather-map.p.rapidapi.com/weather?q=" + city + "%2C" + country) .get() .addHeader("x-rapidapi-key", RAPID_API_KEY) .addHeader("x-rapidapi-host", "community-open-weather-map.p.rapidapi.com") .build(); } return getResponse(client, request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "public WeatherDataResponse getWeather() {\n\n return weather.get(0);\n }", "public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;", "@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}", "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "public void getWeather(String city, String units);", "public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }", "public WeatherModel getCurrentWeather() {\n return currentWeather;\n }", "@Override\n\tpublic String getHourlyWeatherData(String city, String country) throws IOException {\n\t\t\n\t\treturn connectFiveDayForecast(city, country);\n\t\t\n\t}", "public HistoricalWeather getHistoricalWeather(String data) throws WeatherLibException;", "@GET(\"weather?APPID=bec2ea2f434c848c09196f2de96e3c4c&units=metric\")\n Single<Weather> getWeatherData(@Query(\"q\") String name);", "public ArrayList<Weather> getDarkSkyWeather(String longitude, String latitude) {\n\n Log.i(\"long: \", longitude);\n Log.i(\"lat: \", latitude);\n\n Weather weather = new Weather();\n ArrayList<Weather> weatherArr = new ArrayList<Weather>();\n ArrayList<String> temp = new ArrayList<String>();\n String content;\n try {\n content = weather.execute(\"https://api.darksky.net/forecast/a4b289aa3abfbee48b4fc1df98208a34/\"+ latitude + \",\" + longitude + \"?lang=vi&exclude=minutely,flags,currently\").get();\n\n if(content == null)\n {\n return null;\n }\n JSONObject obj = new JSONObject(content);\n\n JSONObject daily = obj.getJSONObject(\"daily\");\n JSONArray dataDaily = daily.getJSONArray(\"data\");\n\n String summary;\n String temperatureMin;\n String temperatureMax;\n String humidity;\n String windSpeed;\n String windGust;\n String airPressure;\n String visibility;\n String ozoneDensity;\n String uvIndex;\n String cloudCover;\n String precipProbability;\n String time;\n\n Bundle bundle2 = new Bundle();\n images = new Integer[dataDaily.length()];\n\n for(int i = 0; i < dataDaily.length(); i++)\n {\n Weather result = new Weather();\n\n JSONObject detail = dataDaily.getJSONObject(i);\n\n summary = detail.getString(\"summary\");\n temperatureMin = detail.getString(\"temperatureMin\");\n temperatureMax = detail.getString(\"temperatureMax\");\n precipProbability = detail.getString(\"precipProbability\");\n humidity = detail.getString(\"humidity\");\n windSpeed = detail.getString(\"windSpeed\");\n windGust = detail.getString(\"windGust\");\n airPressure = detail.getString(\"pressure\");\n visibility = detail.getString(\"visibility\");\n ozoneDensity = detail.getString(\"ozone\");\n uvIndex = detail.getString(\"uvIndex\");\n cloudCover = detail.getString(\"cloudCover\");\n time = unixTimeToDate(detail.getString(\"time\"));\n\n\n String precipProb = String.valueOf(String.format(\"%.0f\", (Float.parseFloat(precipProbability)*100))+ \"%\");\n\n // Update UI\n result.setDate(normalizeDate(time.substring(0, 10)));\n result.setWeather(summary);\n result.setDescription(\"Khả năng mưa: \" + precipProb);\n result.setTemperature(celsiusToFahrenheit(temperatureMax) + \"\\u2103\");\n result.setWind(\"Gió: \" + windSpeed + \"mph\");\n weatherArr.add(result);\n\n if(summary.toLowerCase().contains(\"quang\"))\n {\n images[i] = R.drawable.sunny;\n }\n if(summary.toLowerCase().contains(\"mưa\"))\n {\n images[i] = R.drawable.rainy;\n }\n else if (summary.toLowerCase().contains(\"âm u\"))\n {\n images[i] = R.drawable.foggy;\n }\n else if (summary.toLowerCase().contains(\"mây\"))\n {\n images[i] = R.drawable.cloudy;\n }\n else\n {\n images[i] = R.drawable.sunny;\n }\n\n\n// Bundle bundlee = new Bundle();\n// ArrayList<String> dailyData = new ArrayList<String>();\n//\n// dailyData.add(summary);\n// dailyData.add(precipProb);\n// dailyData.add(normalizeDate(time.substring(0, 10)));\n// dailyData.add(temperatureMin +\"\\u2103\");\n// dailyData.add(temperatureMax +\"\\u2103\");\n// dailyData.add(humidity + \"%\");\n// dailyData.add(windSpeed + \" mph\");\n// dailyData.add(windGust + \" mph\");\n// dailyData.add(airPressure + \" mb\");\n// dailyData.add(visibility + \" mi\");\n// dailyData.add(ozoneDensity + \" DU\");\n// dailyData.add(uvIndex);\n// dailyData.add(cloudCover);\n// dailyData.add(String.valueOf(i)); // fragment-tag\n//\n// bundlee.putStringArrayList(\"daily-data\",dailyData);\n\n\n Bundle bundle = new Bundle();\n bundle.putString(\"weather\", summary);\n bundle.putString(\"PoP\", precipProb);\n bundle.putString(\"date\", normalizeDate(time.substring(0, 10)));\n bundle.putString(\"tempMin\", temperatureMin +\"\\u2103\");\n bundle.putString(\"tempMax\", temperatureMax +\"\\u2103\");\n bundle.putString(\"humidity\", humidity + \"%\");\n bundle.putString(\"windSpeed\", windSpeed + \" mph\");\n bundle.putString(\"winGust\", windGust + \" mph\");\n bundle.putString(\"airPressure\", airPressure + \" mb\");\n bundle.putString(\"visibility\", visibility + \" mi\");\n bundle.putString(\"ozoneDensity\", ozoneDensity + \" DU\");\n bundle.putString(\"uvIndex\", uvIndex);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTag\", String.valueOf(i));\n\n temp.add(temperatureMin);\n\n bundleDailyArr.add(bundle);\n// bundleDailyArr.add(bundlee);\n\n// Log.i(\"Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n for(int i = 0; i < temp.size(); i++)\n {\n bundle2.putString(\"temp\"+String.valueOf(i), temp.get(i));\n }\n\n\n\n// Get weather hourly\n\n JSONObject hourly = obj.getJSONObject(\"hourly\");\n JSONArray dataHourly = hourly.getJSONArray(\"data\");\n String temperature;\n\n for(int i = 0; i < dataHourly.length(); i++)\n {\n JSONObject detail = dataHourly.getJSONObject(i);\n\n temperature = detail.getString(\"temperature\");\n precipProbability = detail.getString(\"precipProbability\");\n windSpeed = detail.getString(\"windSpeed\");\n cloudCover = detail.getString(\"cloudCover\");\n\n Bundle bundle = new Bundle();\n bundle.putString(\"PoP\", precipProbability);\n //bundle.putString(\"temp\", String.valueOf((int)(Float.parseFloat(temperatureMin) + Float.parseFloat(temperatureMax) / 2)));\n bundle.putString(\"temperature\", temperature);\n bundle.putString(\"windSpeed\", windSpeed);\n bundle.putString(\"cloudCover\", cloudCover);\n bundle.putString(\"fragmentTagasd\", String.valueOf(i));\n\n\n bundleHourlyArr.putBundle(String.valueOf(i),bundle);\n\n\n Log.i(\"Hourly Index: \", String.valueOf(i));\n// Log.i(\"summary :\", summary);\n// Log.i(\"temperatureMin :\", temperatureMin);\n// Log.i(\"temperatureMax :\", temperatureMax);\n// Log.i(\"humidity :\", humidity);\n// Log.i(\"windSpeed :\", windSpeed);\n// Log.i(\"winGust :\", windGust);\n// Log.i(\"airPressure :\", airPressure);\n// Log.i(\"visibility :\", visibility);\n// Log.i(\"ozoneDensity :\", ozoneDensity);\n// Log.i(\"uvIndex :\", uvIndex);\n// Log.i(\"cloudCover :\", cloudCover);\n// Log.i(\"cloudCover :\", \"\\n\");\n// Log.i(\"precipProbability :\", precipProbability);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return weatherArr;\n }", "public HashMap<String,Weather> getPrecipData() {\n HashMap<String, Weather> result = new HashMap<String, Weather>();\n //String url = NOAA.PRECIP_URL.replace(\"*STARTDATE*\", startDate).replace(\"*ENDDATE*\", endDate);\n try {\n // Get and parse the JSON\n Response res = makeRequest(NOAA.PRECIP_URL);\n JsonParser parser = new JsonParser();\n JsonArray results = parser.parse(res.body().string())\n .getAsJsonObject()\n .getAsJsonArray(\"results\");\n\n // Iterate over results, storing the values un the hashmap,\n // the key is the StationID, the value is a weather object of the\n // conditions and information about the station.\n Iterator<JsonElement> iterator = results.iterator();\n while (iterator.hasNext()) {\n JsonObject e = iterator.next().getAsJsonObject();\n String type = e.get(\"datatype\").getAsString();\n String station = e.get(\"station\").getAsString();\n String attributes = e.get(\"attributes\").getAsString();\n String date = e.get(\"date\").getAsString();\n int value = e.get(\"value\").getAsInt();\n\n result.put(station, new Weather(type, station, attributes, date, value));\n }\n return result;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n }\n return null;\n }", "public WeatherNow getSingleWeather(int position){\n return weatherNow.get(position);\n }", "public double getWeatherAPI() {\n\t\tRestAssured.baseURI= props.getProperty(\"BaseURI\");\n\t\tString response = \tgiven().log().all().header(\"Content-Type\",\"application/json\").\n\t\t\t\tqueryParam(\"q\", props.getProperty(\"city\")).\n\t\t\t\tqueryParam(\"appid\", props.getProperty(\"key\")).\n\t\t\t\tqueryParam(\"units\", props.getProperty(\"unit\"))\n\t\t\t\t.when().get(\"data/2.5/weather\")\n\t\t\t\t.then().log().all().assertThat().statusCode(200).header(\"charset\", \"UTF-8\").extract().response().asString();\n\n\n\t\tSystem.out.println(response);\n\n\t\tJsonPath json = new JsonPath(response); // parsing the String response to Json\n\t\tString temp = json.getString(\".main.temp\");\n\t\tSystem.out.println(temp);\n\t\t\n\t\tdouble tempurature = Double.parseDouble(temp);\n\t\t\n\t\treturn tempurature;\n\t\t\n\t\t\n\t\t\n\t}", "public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;", "public List<WeatherModel> getPastWeather() {\n return getPastWeather(5);\n }", "public void getData(String lat, String lon) {\n // Instantiate the RequestQueue.\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"https://api.openweathermap.org/data/2.5/air_pollution?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n String forecast_url = \"https://api.openweathermap.org/data/2.5/air_pollution/forecast?lat=\"+lat+\"&lon=\"+lon+\"&appid=2bcdd94a20ae1c5acd2f35b063bb3a0f\";\n\n //*****************GET THE CURRENT VALUES***********************\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(0);\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n //Insert the retrieved to an object in order to be visualized\n Pollutants data = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n\n //sending the data to be visualized\n visualizeUp(data);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequest);\n\n\n //***********************GET THE FORECAST VALUES**************************\n Pollutants[] forecast = new Pollutants[5];\n // Request a JSON response for the current values from the provided URL.\n JsonObjectRequest stringRequestF = new JsonObjectRequest(Request.Method.GET, forecast_url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n for (int i = 0; i<5; i++) {\n JSONObject details = response.getJSONArray(\"list\").getJSONObject(132+(i*24)); //calculate date numbers by adding 24 hours per day\n\n //Get day of the week\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEEE\");\n Date date = new java.util.Date(Long.valueOf(details.getInt(\"dt\"))*1000);\n String day = dateFormat.format(date );\n System.out.println(day);\n\n forecast[i] = new Pollutants(day,\n details.getJSONObject(\"main\").getString(\"aqi\"),\n details.getJSONObject(\"components\").getString(\"pm2_5\"),\n details.getJSONObject(\"components\").getString(\"pm10\"),\n details.getJSONObject(\"components\").getString(\"o3\"),\n details.getJSONObject(\"components\").getString(\"co\"),\n details.getJSONObject(\"components\").getString(\"so2\"),\n details.getJSONObject(\"components\").getString(\"no2\"));\n }\n //Call visualize function to view the results\n visualizeForecast(forecast);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(MainActivity.this, \"An error occurred!\", Toast.LENGTH_SHORT).show();\n Log.i(\"error\", String.valueOf(error));\n }\n }\n );\n\n // Add the request to the RequestQueue.\n queue.add(stringRequestF);\n }", "@Override\n\tpublic List<MemberVO> weather() {\n\t\treturn applyDAO.weather();\n\t}", "net.webservicex.www.WeatherForecasts getWeatherForecasts();", "private CurrentWeather getCurrentDetails(String jsonData) throws JSONException{\n JSONObject jsonObject=new JSONObject(jsonData);\n JSONObject current=jsonObject.getJSONObject(\"currently\");\n CurrentWeather currentWeather=new CurrentWeather();\n currentWeather.setIcon(current.getString(\"icon\"));\n currentWeather.setHumidity(current.getDouble(\"humidity\"));\n currentWeather.setPreipChance(current.getInt(\"precipProbability\"));\n currentWeather.setSummary(current.getString(\"summary\"));\n currentWeather.setTime(current.getLong(\"time\"));\n currentWeather.setTemperature(current.getDouble(\"temperature\"));\n currentWeather.setTimeZone(jsonObject.getString(\"timezone\"));\n String place=jsonObject.getString(\"timezone\");\n currentWeather.setPresure(current.getDouble(\"pressure\"));\n System.out.println(place);\n return currentWeather;\n }", "void getForecastInitially(DarkSkyApi api, PlaceWeather weather){\n\n long newWeatherPlaceId = databaseInstance.weatherDao().insertPlaceWeather(weather);\n\n weather.getDaily().setParentPlaceId(newWeatherPlaceId);\n databaseInstance.weatherDao().insertDaily(weather.getDaily());\n\n List<DailyData> dailyData = weather.getDaily().getData();\n\n for(int i = 0; i < dailyData.size(); ++i){\n dailyData.get(i).setParentPlaceId(newWeatherPlaceId);\n dailyData.get(i).setId(\n databaseInstance.weatherDao().insertDailyData(dailyData.get(i))\n );\n }\n\n long currentDayId = dailyData.get(0).getId();\n\n weather.getHourly().setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourly(weather.getHourly());\n\n List<HourlyData> hourlyData = weather.getHourly().getData();\n\n for(int i = 0; i < hourlyData.size(); ++i){\n hourlyData.get(i).setParentDayId(currentDayId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(i));\n }\n\n //now load hours of next 7 days initially\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n\n PlaceWeather dayWeather;\n for(int i = 1; i < dailyData.size(); ++i){\n try{\n dayWeather = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n dailyData.get(i).getTime()+1,\n avoid).execute().body();\n }catch (IOException e){\n break;\n }\n\n dayWeather.getHourly().setParentDayId(dailyData.get(i).getId());\n dayWeather.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(dayWeather.getHourly())\n );\n\n hourlyData = dayWeather.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(dailyData.get(i).getId());\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n\n }", "private void getTemperatureAndHumidity() {\n // Get Temp and Humid sensors only at PM10 locations, otherwise\n // the connection takes too long to load all\n for (Sensor pm10sensor : this.sensorsPm10) {\n this.sensorsTempHumid.addAll(\n this.getSensors(\n this.readHTML(\n this.buildURLTempHumid(\n pm10sensor.getLatLng()))));\n }\n }", "Weather getById(Long id);", "public YahooWeatherInformation getResult_Weather_Information(){\n return this.Result_Weather_Information;\n }", "public String getCurrentWeather() {\n\t\tString jsonStr = null;\n\t\t\n\t\tClient client = ClientBuilder.newClient();\t\t\n\t\tWebTarget target = client.target(OpenWeatherApiUtil.BASE_URL)\n\t\t\t\t.path(OpenWeatherApiUtil.WEATHER_RESOURCE)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.CITY_QUERY_PARAM, CITY_VANCOUVER)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.UNITS_QUERY_PARAM, OpenWeatherApiUtil.METRIC_UNITS)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.API_KEY_QUERY_PARAM, getApiKey());\n\n\t\tLOG.debug(\"Target URL: \" + target.getUri().toString());\n\t\t\n\t\tInvocation.Builder invocationBuilder = target.request(MediaType.APPLICATION_JSON);\t\t\n\t\t\n\t\tResponse response = invocationBuilder.get(Response.class);\t\t\n\t\tjsonStr = response.readEntity(String.class);\n\t\t\n\t\t// Check response from Open Weather API and log the response appropriately\n\t\tif (response.getStatus() == 200) {\n\t\t\tLOG.debug(jsonStr);\n\t\t}\n\t\telse {\n\t\t\tLOG.error(ErrorMessageUtils.ERROR_OPEN_WEATHER_API_RESPONSE_NON_200_STATUS\n\t\t\t\t\t+ \"\\n\" + response.readEntity(String.class));\n\t\t}\n\t\t\t\n\t\treturn jsonStr;\n\t}", "String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}", "@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);", "private WeatherUnit getWeather(long time, int stack) {\n if (time < 0) return null;\n\tString sidx = Data.stringDateTime(Main.WATCH*(time/Main.WATCH));\n if (sidx == null) return null; // No calendar present\n\tWeatherUnit weath = (WeatherUnit) availWeath.get(sidx);\n\t// Weather unit isn't there yet.\n\tif (weath == null) {\n\t if (stack > 0) {\n\t\tWeatherUnit old = getWeather(time - main.WATCH, stack - 1);\n if (old != null)\n weath = new WeatherUnit(old, time);\n else\n weath = new WeatherUnit(time);\n\t }\n\t else {\n\t\tweath = new WeatherUnit(time);\n\t }\n\t changed = true;\n\t setDirty(true);\n\t availWeath.put(sidx, weath);\n\n\t // Get parent in DOM document\n\t Node parent = stateDoc.getDocumentElement();\n\n\t // Put into DOM document\n\t Element nn = stateDoc.createElement(\"date\");\n\t nn.setAttribute(\"name\", Data.stringDateTime(time));\n\t weath.setAttributes(nn);\n\t parent.appendChild(nn);\n\t}\n\treturn weath;\n }", "@SneakyThrows\n String getTemperature(String city) throws MalformedURLException, IOException {\n double current_temperature = 0;\n JSONObject json = new JSONObject(IOUtils.toString(new URL(\"https://api.openweathermap.org/data/2.5/weather?q=\" + city.toLowerCase(Locale.ROOT) + \"&appid=\"), Charset.forName(\"UTF-8\")));\n current_temperature = (Float.parseFloat(json.getJSONObject(\"main\").get(\"temp\").toString()));\n current_temperature = Math.round(current_temperature*100.0)/100.0;\n System.out.println(json);\n return current_temperature + \"\";\n }", "private void weather() {\n\t\t// System.out.println(\"Sending weather information via Twitter.\");\n\t\t// TwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t// Alfred.getYrParser()\n\t\t// .getWeatherReport().twitterForecastToString());\n\t}", "private void fetchdata(String countries)\n {\n final String url = \"https://api.weatherapi.com/v1/forecast.json?key=20cc9a9b0a4243b4be970612211704&q=\"+countries+\"&days=1&aqi=no&alerts=no\";\n\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response)\n {\n\n // Handle the JSON object and\n // handle it inside try and catch\n try {\n\n // Creating object of JSONObject\n JSONObject jsonObject = new JSONObject(response);\n country.setText(\"Region: \"+jsonObject.getJSONObject(\"location\").getString(\"region\"));\n currentWeather.setText(\"Currently \"+jsonObject.getJSONObject(\"current\").getJSONObject(\"condition\").getString(\"text\"));\n humidity.setText(\"Current Humidity: \"+jsonObject.getJSONObject(\"current\").getString(\"humidity\"));\n temperature.setText(\"Current°C: \"+jsonObject.getJSONObject(\"current\").getString(\"temp_c\"));\n temperatureF.setText(\"Current°F: \"+jsonObject.getJSONObject(\"current\").getString(\"temp_f\"));\n time.setText(\"Current Time: \"+jsonObject.getJSONObject(\"location\").getString(\"localtime\"));\n countryZone.setText(\"Current Zone: \"+jsonObject.getJSONObject(\"location\").getString(\"tz_id\"));\n windD.setText(\"Direction: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_dir\"));\n windS.setText(\"Speed: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_kph\")+\" Kph\");\n windDegree.setText(\"Degree: \"+jsonObject.getJSONObject(\"current\").getString(\"wind_degree\")+\" °\");\n\n JSONArray jsonArray = jsonObject.getJSONObject(\"forecast\").getJSONArray(\"forecastday\");\n for(int i = 0;i<jsonArray.length();i++){\n jsonObject = jsonArray.getJSONObject(i);\n tWeather = jsonObject.getJSONObject(\"day\").getJSONObject(\"condition\").getString(\"text\");\n tDate = jsonObject.getString(\"date\");\n tTempC = jsonObject.getJSONObject(\"day\").getString(\"avgtemp_c\");\n tTempF = jsonObject.getJSONObject(\"day\").getString(\"avgtemp_f\");\n tHumidity = jsonObject.getJSONObject(\"day\").getString(\"avghumidity\");\n\n phases = jsonObject.getJSONObject(\"astro\").getString(\"moon_phase\");\n sunriseT = jsonObject.getJSONObject(\"astro\").getString(\"sunrise\");\n sunsetT = jsonObject.getJSONObject(\"astro\").getString(\"sunset\");\n moonriseT = jsonObject.getJSONObject(\"astro\").getString(\"moonrise\");\n moonsetT = jsonObject.getJSONObject(\"astro\").getString(\"moonset\");\n TwillRain = jsonObject.getJSONObject(\"day\").getString(\"daily_chance_of_rain\");\n Twillsnow = jsonObject.getJSONObject(\"day\").getString(\"daily_chance_of_snow\");\n\n }\n forecastWeather.setText(tWeather+\" later\");\n tempTommorrowF.setText(\"Avg daily °F: \"+tTempF);\n tempTommorowC.setText(\"Avg daily °C: \"+tTempC);\n TchanceRain.setText(\"Chances of Rain \"+TwillRain+\" %\");\n TchanceSnow.setText(\"Chances of Snow \"+Twillsnow+\" %\");\n humidityT.setText(\"Humidity: \"+tHumidity);\n //myuri = Uri.parse(uriS);\n Tphases.setText(\"Moon Phases \"+phases);\n Tsunrise.setText(\"Sunsrise: \"+sunriseT);\n Tsunset.setText(\"Sunset: \"+sunsetT);\n Tmoonrise.setText(\"moonrise: \"+moonriseT);\n Tmoonset.setText(\"moonset: \"+moonsetT);\n\n\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error)\n {\n Toast.makeText(\n MainActivity.this,\n error.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(request);\n requestQueue.getCache().clear();\n }", "public void getForecasts() {\r\n\r\n\t\tWeatherDAO weatherDao = new WeatherDAO();\r\n\r\n\t\tforecasts = weatherDao.getForecasts(this.getSceneNumber());\r\n\r\n\t\tif (forecasts == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisUpdated(forecasts[0]);\r\n\r\n\t\tsetLabels(forecasts);\r\n\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}", "private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for the Calendar to understand\n\t\ttime.setTime(new Date());\n\t\tSystem.out.println(\"Fetaching data from SOAP Web Service... Please wait\");\n\t\tString result = proxy.NDFDgen(lat,lon,\"time-series\",time,time,\"e\",wp);\n\t\tDocument dom= convertStringToDocument(result);\n\t\ttry{\n\t\t\t//Displaying the result on the output screen\n\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\tXPath xpath = xpathFactory.newXPath();\n\t\t\tSystem.out.println(\"Minimum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='minimum']\")); //print the minimum temp\n\t\t\tSystem.out.println(\"Maximum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='maximum']\")); // print the maximum temp\n\t\t\tSystem.out.println(\"Wind Direction: \"+getValuesFromDom(dom,xpath,\"direction\")); // print the wind direction\n\t\t\tSystem.out.println(\"Wind Speed: \"+getValuesFromDom(dom,xpath,\"wind-speed\")); // print the wind speed\n\t\t\tSystem.out.println(\"Temperature Dew point: \"+getValuesFromDom(dom,xpath,\"temperature[@type='dew point']\")); // print the dew point temperature\n\t\t\tSystem.out.println(\"12 Hour Probability of Precipitation:\"+getValuesFromDom(dom,xpath,\"probability-of-precipitation\"));\n\t\t\tString command = isRefreshed();\n\t\t\tif(command.trim().toLowerCase().equals(\"yes\")){\n\t\t\t\t\n\t\t\t\tgetWeatherDataForInputValues(lat,lon);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getWeather() {\n int weatherCode = 0;\n String weather = \" \";\n if (readings.size() > 0) {\n weatherCode = readings.get(readings.size() - 1).code;\n\n if (weatherCode == 100) {\n weather += weather + \" Clear \";\n } else if (weatherCode == 200) {\n weather += weather + \" Partial clouds \";\n } else if (weatherCode == 300) {\n weather += weather + \" Cloudy \";\n } else if (weatherCode == 400) {\n weather += weather + \" Light Showers \";\n } else if (weatherCode == 500) {\n weather += weather + \" Heavy Showers \";\n } else if (weatherCode == 600) {\n weather += weather + \" Rain \";\n } else if (weatherCode == 700) {\n weather += weather + \" Snow \";\n } else if (weatherCode == 800) {\n weather += weather + \" Thunder \";\n } else {\n weather += weather + \" Partial clouds \";\n }\n }\n return weather;\n }", "private void updateWeather() {\n\t\tFetchWeatherTask weatherTask = new FetchWeatherTask(getActivity()); \n\t\tString location = Utility.getPreferredLocation(getActivity());\n\t\tweatherTask.execute(location); \n\t}", "private static boolean fetchYahooWeather() {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n SAXParser parser = spf.newSAXParser();\n \n String yql_format = String.format(\"select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\\\"%s, %s\\\")\", CITY, ST);\n \n /* Fetch Wind Data (temp, windDir, and windSpeed) */\n String yql_wind = String.format(yql_format, \"wind\", \"weather.forecast\");\n String url_wind = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_wind, \"UTF-8\"));\n \n DefaultHandler wind_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:wind\")) return;\n \n temp = Integer.parseInt(attributes.getValue(\"chill\"));\n \n int dir = Integer.parseInt(attributes.getValue(\"direction\")); // number from 0-359 indicating direction\n // I began writing an if tree, then remembered I was lazy.\n String[] dir_words = new String[] {\n \"east\", \"northeast\", \"north\", \"northwest\", \"west\", \"southwest\", \"south\", \"southeast\"\n };\n windDir = dir_words[dir/45];\n \n windSpeed = Integer.parseInt(attributes.getValue(\"speed\")); // speed in mph\n }\n };\n parser.parse(url_wind, wind_handler);\n \n /* Fetch Atronomy Data (sunriseHour and sunsetHour) */\n String yql_astro = String.format(yql_format, \"astronomy\", \"weather.forecast\");\n String url_astro = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_astro, \"UTF-8\"));\n \n DefaultHandler astro_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }\n };\n parser.parse(url_astro, astro_handler);\n \n /* Fetch Description Data (sky) */\n String yql_sky = String.format(yql_format, \"item.condition.text\", \"weather.forecast\");\n String url_sky = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_sky, \"UTF-8\"));\n \n DefaultHandler sky_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:condition\")) return;\n \n sky = attributes.getValue(\"text\").toLowerCase();\n \n }\n };\n parser.parse(url_sky, sky_handler);\n \n return E.sky != null;\n \n } catch (java.net.UnknownHostException uhe) {\n if (Data.DEBUG) System.err.println(\"You are offline!\");\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }", "public WeatherData (Long sunset, Long sunrise, int weatherCode, String cityName, int temperature) {\n sunsetTime = sunset;\n sunriseTime = sunrise;\n weather = weatherCode;\n city = cityName;\n temp = temperature;\n }", "public MarsWeather(JSONObject info) throws Exception {\n\n\t\tDecimalFormat temp = new DecimalFormat(\"#.#\");\n\t\t \n\t\t //Declare Json Objects for use\n\t\t JSONObject data = info.getJSONObject(\"report\");\n\t\t \n\t\t //TEMPERATURE\n\t\t int maxTemp = data.getInt(\"max_temp\");\n\t\t int minTemp = data.getInt(\"min_temp\");\n\t\t int avgTemp = (maxTemp+minTemp)/2;\n\t\t \n\t\t //TEMPERATURE\n\t\t int maxFTemp = data.getInt(\"max_temp_fahrenheit\");\n\t\t int minFTemp = data.getInt(\"min_temp_fahrenheit\");\n\t\t int avgFTemp = (maxFTemp+minFTemp)/2;\n\t\t \n\t\t //DATE\n\t\t String date = data.getString(\"terrestrial_date\"); //Earth Date\n\t\t String season = data.getString(\"season\"); //Martian Month\n\t\t String totalDate = date + \" (\" + season + \" on mars)\";\n\t\t \n\t\t //WIND\n\t\t String windDirection = data.getString(\"wind_direction\");\n\t\t Object windSpeed = data.get(\"wind_speed\");\n\t\t \n\t\t //PRESSURE\n\t\t int pressureNum = data.getInt(\"pressure\");\n\t\t String pressureString = data.getString(\"pressure_string\");\n\t\t //String pressure = temp.format(pressureNum) + \" (\" + pressureString + \")\";\n\t\t String pressure = temp.format(pressureNum);\n\t\t \n\t\t //HUMIDITY + CONDITION\n\t\t Object humidity = data.get(\"abs_humidity\"); \n\t\t String skyCondition = data.getString(\"atmo_opacity\");\n\t\t String atmoOpacity = data.getString(\"atmo_opacity\");\n\t\t \n\t\t\n\t\tthis.date = String.format(\"Date of update: \" + totalDate);\n\t\tthis.temperature = temp.format(avgTemp) + \"\\u00b0\";\n\t\tthis.Ftemp = temp.format(avgFTemp) + \"\\u00b0\";\n\t\t\n\t\tif (!windDirection.equals(\"--\"))\n\t\t\tthis.windDirection = (\"Wind Direction: \" + windDirection);\n\t\t else this.windDirection = (\"\");\n\t\t \n\t\t if (!windSpeed.equals(null))\n\t\t\t this.windDirection = (\"Wind speed \" + windSpeed);\n\t\t else this.windSpeed = (\"No wind speed available.\");\n\t\t \n\t\t if (!humidity.equals(null))\n\t\t\t this.humidity = (\"Humidity \"+ humidity);\t\n\t\t else this.humidity = (\"No humidity available.\");\t \n\t\tthis.atmoOpacity = atmoOpacity;\n\t\tthis.skyCondition = \"Sky Conditon: \" + skyCondition;\n\t\tthis.pressure = pressure + \" KpA\";\n\t\t\n\t}", "@Cacheable(\"darkSkyTemperature\")\n public WeatherDataDto getTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(getServiceName());\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public WeatherData getCurLocCacheData() {\n return reqCurLocCacheData;\n }", "public static ContentValues[] getFullWeatherDataFromJson(Context context, String movieJsonStr) {\n /** This will be implemented in a future lesson **/\n return null;\n }", "private int syncWeatherData() throws IOException {\n URL carleton = null;\n try {\n carleton = new URL(\"http://weather.carleton.edu\");\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.i(\"syncWeatherData\", \"malformed URL for carleton weather\");\n return -1;\n }\n BufferedReader in = null;\n try {\n in = new BufferedReader(\n new InputStreamReader(carleton.openStream()));\n } catch (IOException e) {\n e.printStackTrace();\n Log.i(\"syncWeatherData\", \"openSteam IOException for carleton weather\");\n return -1;\n }\n String inputLine;\n int lineNum = 0;\n String speedString = new String();\n String tempString = new String();\n try {\n while ((inputLine = in.readLine()) != null){\n if (lineNum == 126) {\n tempString = inputLine;\n }\n else if (lineNum == 152) {\n speedString = inputLine;\n }\n lineNum++;\n }\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n Log.i(\"syncWeatherData\", \"parsing IOException for carleton weather\");\n return -1;\n }\n double temp = parseHTMLForTemp(tempString);\n int speed = parseHTMLForSpeed(speedString);\n\n currentTemperature = temp;\n currentWindspeed = speed;\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor e = sharedPref.edit();\n e.putFloat(\"currentTemperature\", (float)currentTemperature);\n e.putFloat(\"currentWindspeed\", (float)currentWindspeed);\n e.commit();\n return 0;\n\n }", "void loadData() {\n Request request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=20.5937,78.9629\")\n .get().build();\n //Create OkHttpClient Object\n OkHttpClient client = new OkHttpClient();\n\n // Call the request using client we just created\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n //Use this code to Handle Failed Request mostly due to internet issue\n // we will just Create a Tost Message for user\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n //Here we will check is reponse is Sucessfull or is their any\n // request error i.e url error\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }\n });\n\n\n //---------------------------------FOR United States----------------------------------------\n\n //Following codes has similar output as before but the difference is the city Names here\n //is of United States\n request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=38.899101,-77.028999\")\n .get().build();\n client = new OkHttpClient();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n String respFromApi = response.body().string();\n Log.d(\"RawData\", respFromApi);\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n\n }", "@Override\n public WeatherData getCurrentWeather(String location)\n throws RemoteException {\n WeatherData weatherResult = Utils.getResult(location, getApplicationContext());\n\n if (weatherResult != null) {\n Log.d(TAG, \"\"\n + weatherResult.toString()\n + \" result for location: \"\n + location);\n\n // Return the weather data back\n return weatherResult;\n } else {\n return null;\n }\n }", "public WeatherType getPlayerWeather ( ) {\n\t\treturn extract ( handle -> handle.getPlayerWeather ( ) );\n\t}", "@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Override\n public City getStatsByCity(String name) throws UnirestException {\n City cityWeather = new City();\n JSONObject object = weatherService.getWeatherByCity(name);\n Coord coord = formatObject(\"coord\",object,Coord.class);\n Wind wind = formatObject(\"wind\",object,Wind.class);\n\n Clouds clouds = formatObject(\"clouds\",object,Clouds.class);\n MainStats mainStats = formatObject(\"main\",object,MainStats.class);\n JSONObject objectWeather = object.getJSONArray(\"weather\").getJSONObject(0);\n Weather weather = mapWeather(objectWeather);\n cityWeather.setCoord(coord);\n cityWeather.setWeather(weather);\n cityWeather.setWind(wind);\n cityWeather.setClouds(clouds);\n cityWeather.setName(object.getString(\"name\"));\n cityWeather.setTimezone(object.getInt(\"timezone\"));\n cityWeather.setCod(object.getInt(\"cod\"));\n cityWeather.setVisibility(object.getInt(\"visibility\"));\n return cityWeather;\n }", "public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location.get(\"name\").getAsString();\n String country = location.get(\"country\").getAsString();\n JsonObject current = rootObject.getAsJsonObject(\"current\");\n Double temp = current.get(\"temp_c\").getAsDouble();\n JsonObject condition = current.getAsJsonObject(\"condition\");\n String conditionText = condition.get(\"text\").getAsString();\n return new WeatherInfo(city, country, conditionText, temp);\n}", "public synchronized void getWeeklyForecast(String city){\r\n\t\t// Create a new Handler\r\n\t\tHandlerThread handlerThread = new HandlerThread(\"Weekly_Forecast\");\r\n\t\thandlerThread.start();\r\n\t\tHandler handler = new Handler(handlerThread.getLooper(), this);\r\n\t\t\r\n\t\tMessage msg = handler.obtainMessage();\r\n\t\tmsg.what = WEEKLY_FORECAST;\r\n\t\tmsg.obj = \"http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=\".concat(city);\r\n\t\thandler.sendMessage(msg);\r\n\t}", "void updateForecast(DarkSkyApi api, PlaceWeather weather){\n\n long now = Calendar.getInstance().getTimeInMillis()/1000;\n\n deleteObsoleteEntries(now);\n\n long placeId = weather.getId();\n long currentDay = databaseInstance.weatherDao().selectObsoleteDayCount(now);\n long daysSaved = databaseInstance.weatherDao().selectDayCount();\n\n //check if need to load data\n if(daysSaved - currentDay < 7){\n\n List<HourlyData> hourlyData;\n\n String apiKey = context.getString(R.string.api_key);\n Map<String, String> avoid = new HashMap<>();\n avoid.put(\"units\", \"si\");\n avoid.put(\"lang\", \"en\");\n avoid.put(\"exclude\", \"alerts,daily\");\n\n long currentTime = weather.getDaily().getData().get(\n weather.getDaily().getData().size()-1\n ).getTime() + 1;\n\n //load days\n for(long day = daysSaved - currentDay; day < 7; ++day){\n currentTime += 3600 * 24;\n PlaceWeather nextDay;\n try{\n nextDay = api.getTimeForecast(apiKey,\n weather.getLatitude(),\n weather.getLongitude(),\n now, avoid).execute().body();\n }catch (IOException e){\n //log network failure\n break;\n }\n\n nextDay.getDaily().getData().get(0).setParentPlaceId(placeId);\n\n long nextDailyDataId =\n databaseInstance.weatherDao().insertDailyData(\n nextDay.getDaily().getData().get(0)\n );\n\n nextDay.getHourly().setParentDayId(nextDailyDataId);\n nextDay.getHourly().setId(\n databaseInstance.weatherDao().insertHourly(nextDay.getHourly())\n );\n\n hourlyData = nextDay.getHourly().getData();\n\n for(int j = 0; j < hourlyData.size(); ++j){\n hourlyData.get(j).setParentDayId(nextDailyDataId);\n databaseInstance.weatherDao().insertHourlyData(hourlyData.get(j));\n }\n }\n }\n }", "@Override\n public Day getCurrentDay(double lat, double lon) throws Exception {\n String tempUnitPref = sharedPref.getString(SettingsFragment.TEMP_UNIT_KEY,\"\");\n\n String res = this.httpRequester.getWeatherByCoordinates(lat, lon);\n WeatherResponse weather = this.jsonConverter.jsonToWeatherResponse(res);\n\n Day current = new Day();\n current.setLocationCity(weather.getName());\n\n switch(tempUnitPref){\n case \"Celsius\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToCelsius(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"C\");\n break;\n case \"Fahrenheit\":\n current.setTemperature((float)TemperatureUnitConvertor.\n kelvinToFahrenheit(weather.getMain().getTemp()));\n current.setTemperatureUnit(\"F\");\n break;\n }\n\n int weatherConditionsCode = weather.getWeather()[0].getId();\n\n current.setWeather(this.getWeatherConditionsByCode(weatherConditionsCode));\n current.setWindSpeed((float) weather.getWind().getSpeed());\n current.setLastUpdated(new Date());\n\n return current;\n }", "private void getHttpResponse() {\n String url = \"https://api.openweathermap.org/data/2.5/weather?id=\"+city.getId()+\"&units=metric&appid=77078c41435ef3379462eb28afbdf417\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Accept\", \"application/json\")\n .header(\"Content-Type\", \"application/json\")\n .build();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n String message = e.getMessage();\n System.out.println(message);\n }\n\n /**\n * Update the UI with the information\n * @param call\n * @param response\n * @throws IOException\n */\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String body = response.body().string();\n\n Gson gson = new Gson();\n CityInfoDto cityInfo = gson.fromJson(body, CityInfoDto.class);\n\n setNewValues(Math.round(cityInfo.main.temp), cityInfo.weather[0].main);\n setBackground();\n }\n });\n }", "@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Override\n public void run() {\n for(int i=0;i<TheWeatherMan.WEATHER_CHECKS; i++) {\n\n // Have some delay\n try {\n Thread.sleep(1000* startTime);\n } catch (InterruptedException e) {\n System.out.println(\"『 Weather Report 』 Pacific has gone berserk and cant sleep.\\n\" +\n \"Terminating Program...\");\n System.exit(1);\n }\n\n /**\n * Handling Different City Temperatures -------------------------------------------\n */\n\n\n // Handling Singapore Temperatures\n if(cityName == \"Singapore\") {\n\n // Generates a random number between -.3 and .3\n double randNum = (Math.random() * (.6)) - .3;\n // Formats decimals to 2 places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n\n cityTemperature = Double.valueOf(df.format((cityTemperature + randNum)));\n // Set Temp\n ((Satellite) satellite).setWeather1(cityTemperature);\n }\n\n // Handling Melbourne Temperatures\n if(cityName == \"Melbourne\") {\n Random random = new Random();\n double temp = (double) random.nextInt(45) + random.nextDouble();\n\n cityTemperature = temp;\n // Set Temp\n ((Satellite) satellite).setWeather2(cityTemperature);\n }\n\n // Handling Shanghai Temperatures\n if(cityName == \"Shanghai\") {\n\n // Fluctuate +-5\n Random random = new Random();\n double temp = ((double) random.nextInt(5) +\n random.nextDouble()) * (random.nextBoolean() ? 1 : -1);\n\n\n cityTemperature = cityTemperature + temp;\n // Set Temp\n ((Satellite) satellite).setWeather3(cityTemperature);\n }\n\n }\n }", "@Override\n public Single<WeatherData> getForecastData(@NonNull final Location location) {\n return Single.just(true)\n .observeOn(Schedulers.io())\n .flatMap(aBoolean -> api.getForecast(apiKey, location.latitude(), location.longitude(), EXCLUDE_DATA_BLOCKS, \"ca\"));\n }", "public Weather getDestinationWeather() {\r\n return destinationWeather;\r\n }", "GeneralWeatherReport queryWeatherReport(String cityId);", "void handleWeatherDataForLocation(String lon, String lat);", "public String weather() {\r\n\t\treturn weather(random.nextInt(4));\r\n\t}", "private void requestWeatherTypes() {\n SharedPreferences preferences = getSharedPreferences(CommonConstants.APP_SETTINGS, MODE_PRIVATE);\n String url = \"https://api.openweathermap.org/data/2.5/forecast?\" +\n \"id=\" + input.get(CommonConstants.ARRIVAL_CITY_ID) +\n \"&appid=\" + CommonConstants.OWM_APP_ID +\n \"&lang=\" + Locale.getDefault().getLanguage() +\n \"&units=\" + preferences.getString(CommonConstants.TEMPERATURE_UNIT, \"Standard\");\n ForecastListener listener = new ForecastListener(weatherList -> {\n try {\n WeatherTypeMapper mapper = new WeatherTypeMapper();\n fillPreview(mapper.from(weatherList));\n if (input.containsKey(CommonConstants.SELECTIONS)) {\n //noinspection unchecked\n setSelections((List<Settings.Selection>) input.get(CommonConstants.SELECTIONS));\n }\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"onSuccess: \" + e.getMessage(), e);\n }\n });\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, listener, null);\n TravelRequestQueue.getInstance(this).addRequest(request);\n }", "private void setDailyValues(){\n //set updateTime\n SimpleDateFormat t = new SimpleDateFormat(\"h:mm:ss a\");\n updatedTime = \"Last updated: \" + t.format(new Date(System.currentTimeMillis()));\n \n //set maxTemp and minTemp\n maxTemp = Integer.toString(weather.getMaxTemp());\n minTemp = Integer.toString(weather.getMinTemp());\n \n //set sunriseTime and sunsetTime\n SimpleDateFormat sr = new SimpleDateFormat(\"h:mm a\");\n sunriseTime = sr.format(new Date(weather.getSunrise()*1000));\n SimpleDateFormat ss = new SimpleDateFormat(\"h:mm a\");\n sunsetTime = sr.format(new Date(weather.getSunset()*1000));\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}", "@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }", "@Override\n public WeatherDaySample getDailyForecast(final String location, final WeekDay weekday, final TemperatureUnit temperatureUnit) {\n final String url = UriComponentsBuilder.fromHttpUrl(weatherServiceUrl)\n .path(\"/forecast/{location}/day/{weekday}\")\n .buildAndExpand(location, weekday)\n .toUriString();\n\n try {\n logger.trace(\"GET {}\", url);\n\n final HttpHeaders headers = new HttpHeaders();\n headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);\n\n final HttpEntity<?> requestEntity = new HttpEntity<>(headers);\n// final ResponseEntity<WeatherDaySample> forEntity = restTemplate.getForEntity(url, WeatherDaySample.class);\n final ResponseEntity<WeatherDaySample> forEntity = restTemplate.exchange(url, HttpMethod.GET, requestEntity, WeatherDaySample.class);\n\n logger.trace(\"GET {} - HTTP {}\", url, forEntity.getStatusCodeValue());\n\n return forEntity.getBody();\n } catch (RestClientResponseException ex) {\n // Http error response\n logger.error(\"GET {} - HTTP {} - {}\", url, ex.getRawStatusCode(), ex.getResponseBodyAsString());\n } catch (ResourceAccessException ex) {\n // Connection error (ex. wrong URL), or unknown http code received\n logger.error(\"GET {} - {}\", url, ex.getMessage());\n }\n\n // An error has occurred\n return null;\n }", "public interface WeatherDataHolder {\n public WeatherData getWeatherData();\n}", "public WeatherAPI(double lat, double lon) throws IOException{\n\t\tapiUrl = \"http://api.openweathermap.org/data/2.5/weather?lat=\" + lat + \"&lon=\" + lon + \"&appid=\" + apiKey + \"&lang=\" + \"de\" + \"&units=metric\";\n\n\t\tresponse = HTMLGET.getHTML(apiUrl);\n\n\t\tJSONObject apiResponseJSON = new JSONObject(response);\n\t\ttempInCelsius = \t\t\tapiResponseJSON.getJSONObject(\"main\").getDouble(\"temp\") + \"\";\n\t\tfeelsLikeTempInCelsius = \tapiResponseJSON.getJSONObject(\"main\").getDouble(\"feels_like\") + \"\";\n\t\tpressure = \t\t\t\t\tapiResponseJSON.getJSONObject(\"main\").getInt(\"pressure\") + \"\";\n\t\thumidity = \t\t\t\t\tapiResponseJSON.getJSONObject(\"main\").getInt(\"humidity\") + \"\";\n\t\t\n\t\twindSpeed = \tapiResponseJSON.getJSONObject(\"wind\").getDouble(\"speed\") + \"\";\n\t\twindDirection = apiResponseJSON.getJSONObject(\"wind\").getInt(\"deg\") + \"\";\n\t\t\n\t\tcloudiness = apiResponseJSON.getJSONObject(\"clouds\").getInt(\"all\") + \"\";\n\t\t\n\t\tmain = \t\t\tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"main\") + \"\";\n\t\tdescription = \tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"description\") + \"\";\n\t\tweatherID = \tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getInt(\"id\") + \"\";\n\t\tweatherIcon =\tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"icon\") + \"\";\n\t\ttimeOfCreation = System.currentTimeMillis() / 1000L;;\n\t}", "@RequestMapping(\"/temperature\")\n public TemperatureResponse temperature() {\n LOG.info(\"Reading temperature\");\n TemperatureResponse response = new TemperatureResponse();\n response.setHost(getHostname());\n response.setTemperature(getTemperature());\n return response;\n }", "void getWeatherObject(WeatherObject weatherObject);", "public void getCityResult() {\n String cityNameStr = TextUtils.isEmpty(cityName) ? \"Halifax\" : cityName;\n final String url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + cityNameStr + \"&appid=\" + API_KEY + \"&units=\" + CELSIUS_UNITS;\n //build the request\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray weather = response.getJSONArray(\"weather\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject cloudsJSON = response.getJSONObject(\"clouds\");\n\n //Set values on layout\n setCityNameOnLayout(response);\n setWeather(weather);\n setTemperature(main);\n setMinMaxTemperature(main);\n setHumidity(main);\n setClouds(cloudsJSON);\n setWeatherIcon((weather.getJSONObject(0)).get(\"icon\").toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n\n Toast.makeText(getApplicationContext(), \"Please, introduce an existing city\", Toast.LENGTH_SHORT).show();\n }\n }\n );\n RequestQueueSingleton.getInstance(getApplicationContext()).addToRequestQueue(request);\n }", "@Override\n @Cacheable(\"darkSkySunriseTime\")\n public WeatherDataDto getSunriseTime(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n String sunrise = \"Api does not support this field.\";\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setSunrise(sunrise);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public void getWeatherData(View view){\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);\n\n //get city name from user's input in edittext\n String cityText = editText.getText().toString();\n\n //make sure spaces between words is handled properly\n try {\n String spacedCityName= URLEncoder.encode(cityText, \"UTF-8\");\n //concatenated string for link to be opened\n String link = \"https://openweathermap.org/data/2.5/weather?q=\" + spacedCityName + \"&appid=b6907d289e10d714a6e88b30761fae22\";\n //create Download class to download data\n DownloadClass downloadClass = new DownloadClass();\n downloadClass.execute(link);\n }catch (Exception e){\n loadToast();\n e.printStackTrace();\n }\n\n\n\n }", "public LiveData<WeatherDetail> getWeatherInfo(double latitude, double longitude) {\n final MutableLiveData<WeatherDetail> data = new MutableLiveData<>();\n\n Call<WeatherDetail> call = apiInterface.getWeatherInfo(latitude, longitude, Const.WEATHER_API_KEY);\n call.enqueue(new Callback<WeatherDetail>() {\n @Override\n public void onResponse(Call<WeatherDetail> call, Response<WeatherDetail> response) {\n if (response.code() == 200)\n data.setValue(response.body());\n else {\n try {\n ErrorBody errorBody = errorConverter.convert(response.errorBody());\n data.postValue(new WeatherDetail(errorBody));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n @Override\n public void onFailure(Call<WeatherDetail> call, Throwable t) {\n data.postValue(new WeatherDetail(t));\n }\n });\n\n return data;\n }", "public int getWeather(){\n return weather;\n }", "public interface IWeatherDataProvider {\n\n\tpublic WeatherData getWeatherData(Location location);\n\t\n}", "public static void syncWeather(Context context) {\n try {\n URL weatherRequestUrl = NetworkUtils.getUrl(context);\n String jsonWeatherResponse = NetworkUtils.getResponseFromHttpUrl(weatherRequestUrl);\n ContentValues[] weatherValues = OpenWeatherJsonUtils\n .getWeatherContentValuesFromJson(context, jsonWeatherResponse);\n if (weatherValues != null && weatherValues.length != 0) {\n ContentResolver sunshineContentResolver = context.getContentResolver();\n sunshineContentResolver.delete(\n WeatherContract.WeatherEntry.CONTENT_URI,\n null,\n null);\n sunshineContentResolver.bulkInsert(\n WeatherContract.WeatherEntry.CONTENT_URI,\n weatherValues);\n\n boolean notificationsEnabled = SunshinePreferences.areNotificationsEnabled(context);\n long timeSinceLastNotification = SunshinePreferences\n .getEllapsedTimeSinceLastNotification(context);\n boolean oneDayPassedSinceLastNotification = false;\n\n if (timeSinceLastNotification >= DateUtils.DAY_IN_MILLIS) {\n oneDayPassedSinceLastNotification = true;\n }\n if (notificationsEnabled && oneDayPassedSinceLastNotification) {\n NotificationUtils.notifyUserOfNewWeather(context);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String[] getCurrentTime(){\n return responseData;\n }", "public String getForecast2() throws IOException, JSONException\n {\n String forecastString = \"\";\n nList = doc.getElementsByTagName(\"yweather:forecast\");\n\n for (int i = 3; i < 5; i++)\n {\n nNode = nList.item(i);\n Element element = (Element) nNode;\n\n forecastString += element.getAttribute(\"day\") + \" \" + element.getAttribute(\"date\") + \"\\n\" +\n \"Min: \" + getTemperatureInCelcius(Float.parseFloat(element.getAttribute(\"low\"))) + \"\\n\" +\n \"Max: \" + getTemperatureInCelcius(Float.parseFloat(element.getAttribute(\"high\"))) + \"\\n\" +\n element.getAttribute(\"text\") + \"\\n\\n\";\n }\n return forecastString;\n }", "private void parseJson() {\n \t\t// TODO Auto-generated method stub\n\n \t\ttry {\n// \t\t\tWeatherDetail wD = new WeatherDetail();\n// \t\t\tJSONObject jObj_cityname=jObj.getJSONObject(\"city\");\n// \t\t\twD.setname(jObj_cityname.getString(\"name\"));\n// \t\t\twD.setcountry(jObj_cityname.getString(\"country\"));\n \t\t\tJSONArray jArry = jObj.getJSONArray(\"list\");\n \t\t\tfor (int i = 0; i < jArry.length(); i++) {\n \t\t\t\t// put in loop for all elements\n \t\t\t\tc3.add(Calendar.DATE, i+1);\n \t\t\t\td2=c3.get(Calendar.DAY_OF_WEEK);\n \t\t\t\tswitch(d2){\n \t\t\t\tcase 1:\n \t\t\t\t\tday=\"Sun\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 2:\n \t\t\t\t\tday=\"Mon\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 3:\n \t\t\t\t\tday=\"Tues\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 4:\n \t\t\t\t\tday=\"Wed\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 5:\n \t\t\t\t\tday=\"Thurs\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 6:\n \t\t\t\t\tday=\"Fri\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 7:\n \t\t\t\t\tday=\"Sat\";\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tForecastDetail fD = new ForecastDetail();\n \t\t\tJSONObject jObj_cityname=jObj.getJSONObject(\"city\");\n \t\t\tfD.setday(day);\n \t\t\tfD.setdate(df3.format(c3.getTime()));\n \t\t\tfD.setname(jObj_cityname.getString(\"name\"));\n \t\t\tfD.setcountry(jObj_cityname.getString(\"country\"));\n \t\t\t\tJSONObject json_MSG = jArry.getJSONObject(i);\n \t\t\t\tJSONObject temp_MSG = json_MSG.getJSONObject(\"temp\");\n \t\t\t\tfD.setmin(temp_MSG.getDouble(\"min\"));\n \t\t\t\tfD.setmax(temp_MSG.getDouble(\"max\"));\n \t\t\t\tfD.setmorn(temp_MSG.getDouble(\"morn\"));\n \t\t\t\tfD.seteve(temp_MSG.getDouble(\"eve\"));\n \t\t\t\tfD.setpressure(json_MSG.getDouble(\"pressure\"));\n \t\t\t\tfD.sethumidity(json_MSG.getDouble(\"humidity\"));\n \t\t\t\tJSONArray jArry2 = json_MSG.getJSONArray(\"weather\");\n \t\t\t\tJSONObject json_MSG2=jArry2.getJSONObject(0);\n \t\t\t\tfD.setmain(json_MSG2.getString(\"main\"));\n \t\t\t\tfD.setdescription(json_MSG2.getString(\"description\"));\n \t\t\t\tfD.seticon(json_MSG2.getString(\"icon\"));\n \t\t\t\tc3.add(Calendar.DATE, -(i+1));\n \t\t\t\tmessages.add(fD);\n \t\t\t\t//\n \t\t\t}\n \t\t} catch (JSONException e) {\n \t\t\t// TODO: handle exception\n \t\t} catch (Exception e) {\n \t\t\t// TODO: handle exception\n\n \t\t}\n\n \t}", "@Override\n\tpublic String getWeatherDataCity(String city, String country) throws IOException {\n\n\t\treturn connectAPICity(city, country);\n\t\t\n\t}", "void handleWeatherDataForCity(String cityName);", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByLatitudeAndLongitude(String lat, String lon) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", lat, lon);\r\n\t\t\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL1).expand(lat, lon, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "@GetMapping(\"/weather/current\")\n public Location getCurrentWeather(@RequestParam(value = \"city\", required = false) final String city, @RequestParam(value = \"country\", required = false) final String country, @RequestParam(value = \"lon\", required = false) final String lon, @RequestParam(value = \"lat\", required = false) final String lat) {\n final StringBuilder locationBuilder = new StringBuilder();\n validator.getCurrentWeatherValidator(city, country, lon, lat);\n\n if (city != null) {\n locationBuilder.append(\"city=\").append(city);\n if(country != null) {\n locationBuilder.append(\"&country=\").append(country);\n }\n } else if (lat != null) {\n final double latitude = Double.parseDouble(lat);\n final double longitude = Double.parseDouble(lon);\n final Coordinates latLong = new Coordinates(longitude, latitude);\n locationBuilder.append(latLong.getUriComponent());\n } else {\n Coordinates randomCoordinates = getRandomCoordinates();\n locationBuilder.append(randomCoordinates.getUriComponent());\n }\n\n final String location = locationBuilder.toString();\n return weatherService.getCurrentConditions(location);\n }", "@Override\n @Cacheable(\"darkSkyHumidity\")\n public WeatherDataDto getHumidity(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);", "public static String findTemp(String lat, String lon) {\n //final String methodPath = \"/entities.electricityusage/\";\n //initialize\n URL url = null;\n String appid = \"appid=f93bd59bea3ab44fb8dba0d95596adfc\";\n HttpURLConnection conn = null;\n String textResult = \"\";\n //making http request\n try {\n url = new URL(WEATHER_URI + \"lat=\" + lat + \"&\" + \"lon=\" + lon + \"&\" +appid);\n // open the connection\n conn = (HttpURLConnection) url.openConnection();\n // set the time out\n conn.setReadTimeout(10000);\n conn.setConnectTimeout(15000);\n // set the connection method to GET\n conn.setRequestMethod(\"GET\");\n //add http headers to set your response type to json\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n //Read the response\n Scanner inStream = new Scanner(conn.getInputStream());\n //read the input stream and store it as string\n while (inStream.hasNextLine()) {\n textResult += inStream.nextLine();\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n conn.disconnect();\n }\n return textResult;\n }", "private void renderWeather(JSONObject json){\n try {\n cF.setText(json.getString(\"name\").toUpperCase(Locale.US) +\n \", \" +\n json.getJSONObject(\"sys\").getString(\"country\"));\n\n\n JSONObject details = json.getJSONArray(\"weather\").getJSONObject(0);\n JSONObject main = json.getJSONObject(\"main\");\n Double fTemp = main.getDouble(\"temp\");\n fTemp = fTemp * 1.8 + 32;\n dF.setText(\n details.getString(\"description\").toUpperCase(Locale.US) +\n \"\\n\" + \"Humidity: \" + main.getString(\"humidity\") + \"%\" +\n \"\\n\" + \"Pressure: \" + main.getString(\"pressure\") + \" hPa\");\n\n cTF.setText(\n String.format(\"%.2f\", fTemp)+ \"°F\");\n\n DateFormat df = DateFormat.getDateTimeInstance();\n String updatedOn = df.format(new Date(json.getLong(\"dt\")*1000));\n uF.setText(\"Last update: \" + updatedOn);\n\n setWeatherIcon(details.getInt(\"id\"),\n json.getJSONObject(\"sys\").getLong(\"sunrise\") * 1000,\n json.getJSONObject(\"sys\").getLong(\"sunset\") * 1000);\n\n }catch(Exception e){\n Log.e(\"SimpleWeather\", \"One or more fields not found in the JSON data\");\n }\n }", "@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }", "public static Weather getNextCityWeather(){\r\n\t\t/*\r\n\t\t * While weatherDetails is getting updated with background\r\n\t\t * Handler, it shouldn't be read\r\n\t\t */\r\n\t\tsynchronized (weatherDetails) {\r\n\t\t\tString code = airportCodes.get(city_index);\r\n\t\t\tLog.i(\"WeatherRecord\", \"Display Weather of: \"+ code+ \" \"+ airportCodes.size());\r\n\t\t\tcity_index++;\r\n\t\t\tif(city_index >= airportCodes.size())\r\n\t\t\t\tcity_index = 0;\r\n\t\t\tWeather w = weatherDetails.get(code);\r\n\t\t\treturn w;\r\n\t\t}\r\n\t}", "private void getData(){\r\n \tsetProgressBarIndeterminateVisibility(true);\r\n \t\r\n\t String url = \"HospitalInfo?hospital=\" + URLEncoder.encode(hospital) + \"&ssid=\" + UserInfo.getSSID();\r\n\t download = new HttpGetJSONConnection(url, mHandler, TASK_GETDATA);\r\n\t download.start();\r\n }", "@Override\n protected String doInBackground(String... strings) {\n String stringUrl = \"http://api.openweathermap.org/data/2.5/forecast?q=Chongqing,cn&mode=json&APPID=aa3d744dc145ef9d350be4a80b16ecab\";\n HttpURLConnection urlConnection = null;\n BufferedReader reader;\n try {\n URL url = new URL(stringUrl);\n\n // Create the request to get the information from the server, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuffer buffer = new StringBuffer();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n String line;\n while ((line = reader.readLine()) != null) {\n // Mainly needed for debugging\n buffer.append(line + \"\\n\");\n }\n if (buffer.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n //Parse JSON data\n try{\n JSONObject jsonObj = new JSONObject(buffer.toString());\n String list = jsonObj.optString(\"list\").toString();\n String city = jsonObj.optString(\"city\").toString();\n JSONObject cityObj = new JSONObject(city);\n city_name = cityObj.optString(\"name\");\n\n //There are arrays in list\n JSON_Array = new JSONArray(list);\n\n //Get the current temperature in the array which index is 0\n int[][] array = new int[5][8];\n for(int j=0; j<5; j++){\n for(int i=0; i<8; i++)\n array[j][i] = getTemperature(JSON_Array,i+8*j);\n bubbleSort(array[j]);\n }\n /*for(int i=0; i<6; i++)\n array[4][i] = getTemperature(JSON_Array,i+8*j);\n bubbleSort(array[4]);*/\n\n secondTemp = String.valueOf(array[1][0]) + \"~\" + String.valueOf(array[1][7]) + \"°C\";\n thirdTemp = String.valueOf(array[2][0]) + \"~\" + String.valueOf(array[2][7]) + \"°C\";\n fourthTemp = String.valueOf(array[3][0]) + \"~\" + String.valueOf(array[3][7]) + \"°C\";\n fifthTemp = String.valueOf(array[4][3]) + \"~\" + String.valueOf(array[4][7]) + \"°C\";\n\n String currentTemp = String.valueOf(array[0][0]) + \"~\" + String.valueOf(array[0][7]);\n return currentTemp;\n }catch (JSONException e){\n e.printStackTrace();\n }\n //return result;//return the data of temperature.\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (ProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);", "public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Cacheable(\"darkSkyFeelsLikeTemperature\")\n public WeatherDataDto getFeelsLikeTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperatureFeelsLike = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"apparentTemperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperatureFeelsLike(temperatureFeelsLike);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Override\n protected Void doInBackground(Void... voids) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n WeatherService service = retrofit.create(WeatherService.class);\n Call<CurrentWeatherCallResult> call = service.getCurrentWeatherDataLatLng(String.valueOf(latLng.latitude), String.valueOf(latLng.longitude), AppId);\n call.enqueue(new Callback<CurrentWeatherCallResult>() {\n @Override\n public void onResponse(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Response<CurrentWeatherCallResult> response) {\n if (response.code() == 200 && response.body() != null) {//TODO DEFINE 200\n\n CurrentWeatherCallResult currentWeatherCallResult = response.body();\n CurrentWeather currentWeather =\n new CurrentWeather(\n position,\n currentWeatherCallResult.weather.get(0).description,\n currentWeatherCallResult.weather.get(0).icon,\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_max - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_min - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp - 273)),\n currentWeatherCallResult.name);\n Intent i;\n switch (position) {\n case -2:\n i = new Intent(\"CURRENT_WEATHER_SEARCH_A\");\n break;\n case -1:\n i = new Intent(\"CURRENT_WEATHER\");\n break;\n default:\n i = new Intent(\"CURRENT_WEATHER_F\");\n break;\n\n\n }\n i.putExtra(\"CURRENT_WEATHER_OBJECT\", currentWeather);\n mContext.sendBroadcast(i);\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Throwable t) {\n t.getMessage();\n }\n });\n return null;\n }", "public int getLatestWeather() { //This function goes through the readings Arraylist and gets the most recent weather Code and returns it.\n int code;\n code = readings.get(readings.size() - 1).code;\n return code;\n }", "public LongTermForecast(JSONObject j, char tempUnits){\n \n /*Set sub-JSONObjects\n *OpenWeatherMap returns a large JSONObject that contains multiple\n *smaller JSONObjects; we get these during this step\n */\n \ttry{\n this.jCity = j.getJSONObject(\"city\");\n this.jListArray = j.getJSONArray(\"list\");\n this.jTempList = new ArrayList<JSONObject>();\n this.jWeatherList = new ArrayList<JSONObject>();\n int dateOffset = 0; // <--- To exclude the current day, change this to 1\n for (int i = dateOffset; i < 5 + dateOffset; i++) \n {\n JSONObject nextObject = jListArray.getJSONObject(i);\n this.jTempList.add(nextObject.getJSONObject(\"temp\"));\n this.jWeatherList.add(nextObject.getJSONArray(\"weather\").getJSONObject(0));\n }\n this.tempUnits = tempUnits;\n\n \n //Set the variable values based on the JSON data\n this.fullCityName = getFullCityName(jCity);\n this.temperatureList = new ArrayList<String>();\n this.minTempList = new ArrayList<String>();\n this.maxTempList = new ArrayList<String>();\n this.skyConditionList = new ArrayList<String>();\n this.skyIconList = new ArrayList<ImageIcon>();\n this.dateList = new ArrayList<String>();\n for (int i = 0; i < 5; i++)\n {\n JSONObject nextTemp = jTempList.get(i);\n JSONObject nextWeather = jWeatherList.get(i);\n this.temperatureList.add(getTemperature(nextTemp));\n this.minTempList.add(getMinTemp(nextTemp));\n this.maxTempList.add(getMaxTemp(nextTemp));\n this.skyConditionList.add(getSkyCondition(nextWeather));\n try{\n this.skyIconList.add(getSkyIcon(nextWeather));\n }\n catch(IOException e){\n System.out.println(\"Error: Can't obtain sky icon\");\n }\n this.dateList.add(getDate(jListArray, i + dateOffset));\n }\n \t} catch (Exception e){\n\t\t\tthis.temperatureList = new ArrayList<String>();\n\t\t\tthis.skyConditionList = new ArrayList<String>();\n\t\t\tthis.skyIconList = new ArrayList<ImageIcon>();\n\t\t\tthis.minTempList = new ArrayList<String>();\n\t\t\tthis.maxTempList = new ArrayList<String>();\n\t this.dateList = new ArrayList<String>();\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\tthis.minTempList.add(\"No Data \");\n\t\t\t\tthis.maxTempList.add(\"No Data \");\n\t\t\t\tthis.temperatureList.add(\"No Data \");\n\t\t\t\tthis.dateList.add(\"No Data \");\n\t\t\t\ttry {\n\t\t\t\t\tthis.skyIconList.add(getSkyIcon(new JSONObject(\"{icon:01d}\")));\n\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.skyConditionList.add(\"No Data \");\n\t\t\t} \n\t\t}\n\n }", "@Override\n protected String[] doInBackground(String... params) {\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n // Will contain the raw JSON response as a string.\n String forecastJsonStr = null;\n\n String location = params[0];\n String format = \"json\";\n String units = params[1];\n String lang = \"fr\";\n int numDays = 14;\n\n try {\n // Construct the URL for the OpenWeatherMap query\n // Possible parameters are avaiable at OWM's forecast API page, at\n // http://openweathermap.org/API#forecast\n final String FORECAST_BASE_URL =\n \"http://api.openweathermap.org/data/2.5/forecast/daily?\";\n final String QUERY_PARAM = \"q\";\n final String FORMAT_PARAM = \"mode\";\n final String UNITS_PARAM = \"units\";\n final String DAYS_PARAM = \"cnt\";\n final String LANGUAGE_PARAM = \"lang\";\n final String APPID_PARAM = \"appid\";\n\n Uri builtUri = Uri.parse(FORECAST_BASE_URL).buildUpon()\n .appendQueryParameter(QUERY_PARAM, location)\n .appendQueryParameter(FORMAT_PARAM, format)\n .appendQueryParameter(UNITS_PARAM, units)\n .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))\n .appendQueryParameter(LANGUAGE_PARAM, lang)\n .appendQueryParameter(APPID_PARAM, \"232763e5b836e83388caca0749577747\")\n .build();\n\n URL url = new URL(builtUri.toString());\n// Log.v(LOG_TAG, url.toString());\n\n // Create the request to OpenWeatherMap, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuilder builder = new StringBuilder();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)\n // But it does make debugging a *lot* easier if you print out the completed\n // builder for debugging.\n builder.append(line).append(\"\\n\");\n }\n\n if (builder.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n forecastJsonStr = builder.toString();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error \" + e, e);\n\n // If the code didn't successfully get the weather data, there's no point in attempting\n // to parse it.\n return null;\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(LOG_TAG, \"Error closing stream\", e);\n }\n }\n }\n\n try {\n return getWeatherDataFromJson(forecastJsonStr, numDays);\n } catch (JSONException e) {\n Log.e(LOG_TAG, e.getMessage(), e);\n e.printStackTrace();\n }\n\n // This will only happen if there was an error getting or parsing the forecast.\n return null;\n }", "private static boolean fetchDefaultData() {\n if (!Data.DEBUG) return false;\n System.err.println(\"We cannot fetch from any online sources, so default weather data has been injected.\");\n sky = Util.rand(\"partly sunny\", \"mostly cloudy\", \"rainy\", \"mostly sunny\");\n windDir = Util.rand(\"north\", \"south\", \"east\", \"west\");\n windSpeed = Util.rand(0, 5, 10, 15);\n temp = Util.rand(40, 50, 60, 70, 80);\n sunriseHour = 6.5;\n sunsetHour = 20.0;\n return true;\n }", "public void updateCurrentConditions(Forcast weatherData) {\n // If the view doesn't exist, an error will occur because we are calling it below. Return to prevent this.\n if (getView() == null || !isAdded()) {\n return;\n }\n\n /**\n * Fetch all the text views to populate them below.\n */\n TextView currentTempLabel = (TextView) getView().findViewById(R.id.text_current_temp);\n TextView currentConditionLabel = (TextView) getView().findViewById(R.id.text_current_condition);\n TextView currentPrecipitationLabel = (TextView) getView().findViewById(R.id.text_current_precipitation);\n TextView currentWindLabel = (TextView) getView().findViewById(R.id.text_wind_speed);\n TextView todayHighTempLabel = (TextView) getView().findViewById(R.id.text_today_high);\n TextView todayLowTempLabel = (TextView) getView().findViewById(R.id.text_today_low);\n ImageView weatherIcon = (ImageView) getView().findViewById(R.id.weatherIcon);\n\n /**\n * Fetch all the data.\n */\n String summary = weatherData.getCurrently().getSummary();\n long currentTemp = Math.round(weatherData.getCurrently().getTemperature());\n long precipitation = Math.round(weatherData.getCurrently().getPrecipProbability());\n long lowTemp = Math.round(weatherData.getDaily().getData().get(0).getTemperatureMin());\n long highTemp = Math.round(weatherData.getDaily().getData().get(0).getTemperatureMax());\n long windSpeed = Math.round(weatherData.getCurrently().getWindSpeed());\n\n\n\n /**\n * Populate all the text views.\n */\n currentConditionLabel.setText(summary);\n currentPrecipitationLabel.setText(getString(R.string.weather_percent, precipitation));\n currentTempLabel.setText(getString(R.string.weather_temperature, currentTemp));\n todayHighTempLabel.setText(getString(R.string.weather_temperature, highTemp));\n todayLowTempLabel.setText(getString(R.string.weather_temperature, lowTemp));\n currentWindLabel.setText(getString(R.string.weather_wind, windSpeed));\n\n }" ]
[ "0.74861765", "0.6896385", "0.6773417", "0.6739232", "0.67329866", "0.6641617", "0.6624548", "0.6583085", "0.65347147", "0.6520862", "0.65154225", "0.64872265", "0.64705646", "0.6423554", "0.6416689", "0.6403352", "0.6394522", "0.6351407", "0.6332905", "0.6294551", "0.6266319", "0.6257428", "0.620565", "0.62034035", "0.6165865", "0.6131507", "0.61245686", "0.61055267", "0.60904896", "0.6083421", "0.6067004", "0.605548", "0.60155505", "0.6015064", "0.5992099", "0.5977231", "0.5968757", "0.595982", "0.59402966", "0.59295684", "0.59150827", "0.5907343", "0.5901136", "0.5897358", "0.5865664", "0.5835013", "0.58323956", "0.58274925", "0.58238643", "0.5821272", "0.58010113", "0.5795764", "0.5794873", "0.57842946", "0.57775027", "0.5774683", "0.57690704", "0.57585883", "0.57346827", "0.572559", "0.5714958", "0.5701071", "0.56971335", "0.5678867", "0.56768745", "0.5671725", "0.56622297", "0.56621915", "0.5654441", "0.5653309", "0.56356984", "0.5626724", "0.56241155", "0.56055605", "0.55973643", "0.5595341", "0.55898356", "0.5585215", "0.5578509", "0.5574424", "0.55680746", "0.5564935", "0.5560553", "0.5558248", "0.555108", "0.55494505", "0.55423635", "0.55390185", "0.55359626", "0.55226535", "0.5522031", "0.55167156", "0.55110997", "0.55085987", "0.55029595", "0.549435", "0.5487898", "0.5485912", "0.54838234", "0.5472412", "0.5470637" ]
0.0
-1
inputValidation method Purpose: Verify number of args is correct and if args[0] is a file or directory
public static ArrayList<String> inputValidation(String[] myArgs){ //Variables ArrayList<String> filesInFolder = new ArrayList<>(); File file_DirectoryFromArgs = new File(myArgs[0]); File[] files = file_DirectoryFromArgs.listFiles(); //Error check the input //Check if number of arguments are as expected and if values of arguments are as expected //if < or > 3 arguments print error if(myArgs.length != 3){ System.out.println("Usage: java WordCount <file|directory> <chunk size 10-5000> <num of threads 1-100>"); //System.out.println("Arguments are wrong!"); System.exit(1); } //if chunkSize is too small or big print error else if(Integer.parseInt(myArgs[1]) < 10 || Integer.parseInt(myArgs[1]) > 5000){ System.out.println("Usage: java WordCount <file|directory> <chunk size 10-5000> <num of threads 1-100>"); //System.out.println("Chunksize is wrong!"); System.exit(1); } //if number of threads is too small or big print error else if(Integer.parseInt(myArgs[2]) < 1 || Integer.parseInt(myArgs[2]) > 100) { System.out.println("Usage: java WordCount <file|directory> <chunk size 10-5000> <num of threads 1-100>"); //System.out.println("Thread is wrong!"); System.exit(1); } //Check if args[0] is a file if(file_DirectoryFromArgs.exists() && !file_DirectoryFromArgs.isDirectory()){ directoryName = myArgs[0]; //Save file name into arraylist. filesInFolder.add(directoryName); } //Check if args[0] is a directory else if(file_DirectoryFromArgs.exists() && file_DirectoryFromArgs.isDirectory()){ directoryName = myArgs[0]; //Copy file names into arraylist for (File f: files) { //Save file names into arraylist. filesInFolder.add(f.getName()); } } //if not a file or directory print error message else{ System.out.println("No such file/directory: " + file_DirectoryFromArgs); } return filesInFolder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCheckInput() throws Exception {\r\n System.out.println(\"checkInput\");\r\n System.out.println(\"test1\");\r\n String[] arguments = {\"1k2h3u\",\"test.txt\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"};\r\n CommandLineArgumentParser instance =new CommandLineArgumentParser(arguments);\r\n String expResult = \"correct\";\r\n String result = instance.checkInput(arguments);\r\n assertEquals(expResult, result);\r\n \r\n System.out.println(\"test 2\");\r\n String[] arguments2 = {\"1k\",\"test.txt\",\"1\"};\r\n String expResult2 = \"correct\";\r\n String result2 = instance.checkInput(arguments2);\r\n assertEquals(expResult2, result2);\r\n \r\n System.out.println(\"test 3\");\r\n String[] arguments3 = {\"chat.txt\"};\r\n String expResult3 = \"correct\";\r\n String result3 = instance.checkInput(arguments3);\r\n assertEquals(expResult3, result3);\r\n \r\n System.out.println(\"test 4\");\r\n String[] arguments4 = {\"1k2h3u\",\"test.txt\",\"1\",\"2\",\"3\",\"4\",\"5\"};\r\n String expResult4 = \"Incorrect number of arguments\";\r\n String result4 = instance.checkInput(arguments4);\r\n assertEquals(expResult4, result4);\r\n \r\n System.out.println(\"test 5\");\r\n String[] arguments5 = {};\r\n String expResult5 = \"Need at least one argument with input file path\";\r\n String result5 = instance.checkInput(arguments5);\r\n assertEquals(expResult5, result5);\r\n }", "private static boolean argsAreValid(String[] args) {\n try {\n if (args.length != NUM_OF_ARGS) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n BAD_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n File sourceDirectory = new File(args[0]);\n File commandFile = new File(args[1]);\n if ((!sourceDirectory.isDirectory()) || (!commandFile.isFile())) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n BAD_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n } catch (Exception e) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n UNKNOWN_ERROR_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n return true;\n }", "private void argumentChecker(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Invalid arguments. \\nExpected:\\tDriver inputFile.txt outputFile.txt\");\n\t\t}\n\t}", "private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(goSlimFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GOslim file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(slimAnnotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an output file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t}", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "private void inputValidation(String[] args) {\r\n\t\t// Must have two argument inputs - grammar and sample input\r\n\t\tif (args.length != 2) {\r\n\t\t\tSystem.out.println(\"Invalid parameters. Try:\\njava Main <path/to/grammar> <path/to/input>\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "private static boolean processArgs(String[] args){\n\n // Check to see if there are two files names that can be read\n if(args.length != 2){\n\n System.out.println(\"Please enter two file names:\" +\n \" Books, Transactions or Books1, Transaction1\");\n System.out.println(\"Or compatible files\");\n\n return false;\n\n // Check to see if the two files can be opened\n } else {\n for (int x = 0; x < 2; x++){\n // Make a file object to represent txt file to be read\n File inputFile = new File(args[x]);\n if (!inputFile.canRead()) {\n System.out.println(\"The file \" + args[x]\n + \" cannot be opened for input.\");\n return false;\n }\n }\n // At this point we know the files are readable\n return true;\n }\n }", "public ApplicationInputResult processInput(String[] args) {\n List<String> invalidInputs = new ArrayList<>();\n CommandLine clp;\n try {\n // Use the CLI parser to help us parse the input\n clp = new DefaultParser().parse(ALL_INPUT_OPTIONS, args);\n String payrollFile = null;\n if (clp.hasOption(FILE_INPUT_OPTION.getOpt())) {\n payrollFile = clp.getOptionValue(FILE_INPUT_OPTION.getOpt());\n }\n // Let's make sure we got a file\n if (!StringUtils.isBlank(payrollFile)) {\n return new ApplicationInputResult(payrollFile); // all good\n } else {\n invalidInputs.add(FILE_INPUT_OPTION.getOpt()); // add this missing argument to the result\n }\n } catch (MissingOptionException e) {\n LOGGER.error(\"The required arguments {} were missing\", e.getMissingOptions());\n List<?> missingOptions = e.getMissingOptions();\n missingOptions.forEach( missingOption -> invalidInputs.add(missingOption.toString()));\n } catch (MissingArgumentException e) {\n LOGGER.error(\"The required argument [{}] is missing its value\", e.getOption().getOpt());\n invalidInputs.add(e.getOption().getOpt());\n } catch (ParseException pe) {\n LOGGER.error(\"An exception occurred while parsing command line read of arguments: {}{}\", Arrays.toString(args), pe);\n }\n return new ApplicationInputResult(invalidInputs);\n }", "private static void validPaths(String args[]){\n if(args.length!=2){\r\n System.out.println(\"First argument required is path, Second argument required is output directory\");\r\n System.exit(-1);\r\n }\r\n File json = new File(args[0]);\r\n File csv = new File (args[1]);\r\n if(json.exists() == false || csv.exists() == false){\r\n if(json.exists()==false){\r\n System.out.println(\"Path: \" + args[0] + \" does not exist\");\r\n }\r\n if(csv.exists()==false){\r\n System.out.println(\"Path: \" + args[1] + \" does not exist\");\r\n }\r\n System.exit(-1);\r\n }\r\n }", "public static boolean isValid(String args[]){\n \n if(args.length < 2){\n System.out.println(\"Not enough arguments detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n \n Scanner scanin = new Scanner(args[0]);\n Scanner scanin2 = new Scanner(args[1]);\n\t \n if(!scanin.hasNextInt() || !scanin2.hasNextInt()){\n System.out.println(\"Invalid argument type detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n\t else\n return true;\n }", "private static void checkPassedInArguments(String[] args, EquationManipulator manipulator) {\n // Convert arguments to a String\n StringBuilder builder = new StringBuilder();\n for (String argument: args) {\n builder.append(argument + \" \");\n }\n \n // check if equation is valid\n String[] equation = manipulator.getEquation(builder.toString());\n if (equation.length == 0) {\n // unable to parse passed in arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else {\n // arguments were passed in correctly\n System.out.println(\"Wohoo! It looks like everything was passed in correctly!\"\n + \"\\nYour equation is: \" + builder.toString() + \"\\n\");\n handleArguments(equation, manipulator);\n }\n }", "@Test\n public void wrongArgumentsReturnsNullAndPrintsMessage() {\n String[] inputArgs = new String[] {\"-i\", \"/path/\"};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, nullValue());\n assertThat(errContent.toString(), containsString(\"must be provided!\"));\n assertThat(errContent.toString(), containsString(\"Usage:\"));\n }", "@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }", "static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }", "public void testGetInputArguments() {\n List<String> args = mb.getInputArguments();\n assertNotNull(args);\n for (String string : args) {\n assertNotNull(string);\n assertTrue(string.length() > 0);\n }\n }", "public static boolean checkArgs(String[] args) {\n\t\tboolean valid = true;\n\t\t\n\t\tfor (int index = 0; valid && index < args.length; index++) {\n\t\t\tif (args[index].equals(\"-help\") || args[index].equals(\"--help\"))\n\t\t\t\tvalid = false;\n\n\t\t\t// All following arguments should have one value that follows each argument\n\t\t\tif (index+1 >= args.length || args[index+1] == null)\n\t\t\t\tvalid = false;\n\n\t\t\telse if (valid && args[index].equals(\"-dir\"))\n\t\t\t\targsMap.put(\"dir\", args[++index]);\n\t\t}\n\t\treturn valid;\n\t}", "private static void processArguments(String[] args) {\r\n if (args.length < 2) {\r\n IO.displayGUI(args.length + \" arguments provided.\\nPlease provide input and output files through the GUI.\");\r\n IO.chooseFiles(); // choose files with GUI\r\n } else {\r\n // Open file streams\r\n IO.openStream(args[0], args[1]);\r\n }\r\n }", "private static void checkNumOfArguments(String[] args) throws IllegalArgumentException{\n\t\ttry{\n\t\t\tif(args.length != App.numberOfExpectedArguments ) {\t\n\t\t\t\tthrow new IllegalArgumentException(\"Expected \" + App.numberOfExpectedArguments + \" arguments but received \" + args.length);\n\t\t\t}\n }\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\texitArgumentError();\n\t\t}\n\t\t\n\t}", "public abstract ValidationResults validArguments(String[] arguments);", "private void inputHandle(String[] arguments) {\n\t\tif (arguments.length != 1)\n\t\t\tSystem.err.println(\"There needs to be one argument:\\n\"\n\t\t\t\t\t+ \"directory of training data set, and test file name.\");\n\t\telse {\t\t\t\n\t\t\tinputTestFile = arguments[0];\n\t\t}\n\t}", "@Test\n\tpublic void test_ArgumentCount_0_InvalidInput() {\n\t\tString[] args = {};\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_ARGUMENT_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}", "public interface ArgumentValidator {\n boolean areArgumentsValid(String[] arguments);\n boolean configDirectoryExists(String configDirectory);\n boolean keyValuePairDirectoryExists(String keyValuePairDirectory);\n boolean configDirectoryContainsTemplateFiles(String configDirectory);\n boolean keyValuePairDirectoryContainKeyValuePairFiles(String keyValuePairDirectory);\n\n\n}", "private static void checkArgsAndSetUp()\n {{\n File outDir= new File( arg_outDirname );\n\n if ( outDir.exists() ) {\n\t if ( !outDir.isDirectory() ) {\n\t System.err.println( PROGRAM_NAME+ \n\t\t\t\t\": output directory is not a directory; \"); \n\t System.err.println( \"\\t\"+ \"dir=\\\"\"+ arg_outDirname+ \"\\\", \" );\n\t System.err.println( \"\\t\"+ \"please specify an empty directory.\" );\n\t System.exit(-1);\n\t }\n\t if ( outDir.list().length > 0 ) {\n\t System.err.println( PROGRAM_NAME+ \n\t\t\t\t\": output directory is not empty; \"); \n\t System.err.println( \"\\t\"+ \"dir=\\\"\"+ arg_outDirname+ \"\\\", \" );\n\t System.err.println( \"\\t\"+ \"please specify an empty directory.\" );\n\t System.exit(-1);\n\t }\n } else {\n\t outDir.mkdir();\n }\n }}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tString str=sc.next();\r\n\t\tFile f=new File(str);\r\n\t\tSystem.out.println(f.exists());\r\n\t\tSystem.out.println(f.canRead());\r\n\t\tSystem.out.println(f.canWrite());\r\n System.out.println(f.length());\r\n System.out.println(f.getClass());\r\n\t}", "public static boolean validateInputLength(String[] args) {\n return args.length == 3;\n }", "@Test\n\tpublic void test_ArgumentCount_2_InvalidPath() {\n\t\tString[] args = { \"\", \"\" };\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_PATH_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}", "@Override\r\n\tpublic String execute(File workingDir, String stdin) {\r\n\t\tboolean checkCase = true;\r\n\t\tint skippedFieldCount = 0;\r\n\t\tArrayList<String> operands = new ArrayList<String>();\r\n\r\n\t\tif (args == null) {\r\n\t\t\treturn getUnique(checkCase, stdin);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < args.length; i++) {\r\n\t\t\tString arg = args[i];\r\n\r\n\t\t\t// Check for extra operands\r\n\t\t\tif (operands.size() >= 2) {\r\n\t\t\t\tsetStatusCode(ERR_CODE_EXTRA_OPERAND);\r\n\t\t\t\treturn String.format(ERR_MSG_EXTRA_OPERAND, arg);\r\n\t\t\t}\r\n\r\n\t\t\t// Check for valid file\r\n\t\t\tif (!arg.startsWith(\"-\")) {\r\n\t\t\t\tFile file = new File(arg);\r\n\r\n\t\t\t\t// Check if filePath is relative to working dir (i.e. not absolute path)\r\n\t\t\t\t// If it is we make the file relative to working dir.\r\n\t\t\t\tif (!file.isAbsolute() && workingDir.exists()) {\r\n\t\t\t\t\tfile = new File(workingDir, arg);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (operands.size() == 0 && !file.exists()) {\r\n\t\t\t\t\tsetStatusCode(ERR_CODE_FILE_NOT_FOUND);\r\n\t\t\t\t\treturn String.format(ERR_MSG_FILE_NOT_FOUND, arg);\r\n\t\t\t\t}\r\n\t\t\t\toperands.add(file.toString());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for stdin argument\r\n\t\t\tif (arg.equals(\"-\")) {\r\n\t\t\t\toperands.add(arg);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Option argument\r\n\t\t\tswitch (arg) {\r\n\t\t\tcase \"-i\":\r\n\t\t\t\tcheckCase = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"-f\":\r\n\t\t\t\tif (i + 1 >= args.length) {\r\n\t\t\t\t\tsetStatusCode(ERR_CODE_MISSING_OPTION_ARG);\r\n\t\t\t\t\treturn String.format(ERR_MSG_MISSING_OPTION_ARG, arg);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ti += 1;\r\n\t\t\t\targ = args[i];\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tskippedFieldCount = Integer.parseInt(arg);\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tsetStatusCode(ERR_CODE_INVALID_NUM_OF_FIELDS);\r\n\t\t\t\t\treturn String.format(ERR_MSG_INVALID_NUM_OF_FIELDS, arg);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"-help\":\r\n\t\t\t\treturn getHelp();\r\n\t\t\tdefault:\r\n\t\t\t\tsetStatusCode(ERR_CODE_INVALID_OPTION);\r\n\t\t\t\treturn String.format(ERR_MSG_INVALID_OPTION, arg);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString input;\r\n\t\tif (operands.size() == 0 || operands.get(0).equals(\"-\")) {\r\n\t\t\tinput = stdin;\r\n\t\t} else {\r\n\t\t\tinput = readFile(operands.get(0), Charset.forName(\"UTF8\"));\r\n\t\t}\r\n\r\n\t\tString output;\r\n\t\tif (skippedFieldCount == 0) {\r\n\t\t\toutput = getUnique(checkCase, input);\r\n\t\t} else {\r\n\t\t\toutput = getUniqueSkipNum(skippedFieldCount, checkCase, input);\r\n\t\t}\r\n\r\n\t\t// Check if the user specify an output file\r\n\t\tif (operands.size() > 1) {\r\n\t\t\tString outputFilePath = operands.get(1);\r\n\r\n\t\t\tif (!outputFilePath.equals(\"-\")) {\r\n\t\t\t\t// Output is redirected to file\r\n\t\t\t\twriteToFile(outputFilePath, output);\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}", "private void scanArgs(String [] args)\n{\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(\"-\")) {\n\t badArgs();\n }\n else badArgs();\n }\n}", "private void validate() throws JShellException {\r\n // cmd shud have no args\r\n if (!this.hasValidArgs()) {\r\n String msg = \"ERROR: popd: does not accept any arguments\\n\";\r\n throw new JShellException(msg);\r\n }\r\n // directory stack shudnt be empty\r\n if (this.getShell().getDirStack().size() < 1) {\r\n String msg = \"ERROR: popd: cannot popd on empty stack\\n\";\r\n throw new JShellException(msg);\r\n }\r\n }", "private static void checkCmdArgs(int numberOfArgs, String[] args) {\n\t\tif (args.length != numberOfArgs) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}", "public void processArgs(String[] args){\r\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\r\n\t\tfor (int i = 0; i<args.length; i++){\r\n\t\t\tString lcArg = args[i].toLowerCase();\r\n\t\t\tMatcher mat = pat.matcher(lcArg);\r\n\t\t\tif (mat.matches()){\r\n\t\t\t\tchar test = args[i].charAt(1);\r\n\t\t\t\ttry{\r\n\t\t\t\t\tswitch (test){\r\n\t\t\t\t\tcase 'f': directory = new File(args[i+1]); i++; break;\r\n\t\t\t\t\tcase 'o': orderedFileNames = args[++i].split(\",\"); break;\r\n\t\t\t\t\tcase 'c': output = new File(args[++i]); break;\r\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\r\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e){\r\n\t\t\t\t\tSystem.out.print(\"\\nSorry, something doesn't look right with this parameter request: -\"+test);\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check to see if they entered required params\r\n\t\tif (directory==null || directory.isDirectory() == false){\r\n\t\t\tSystem.out.println(\"\\nCannot find your directory!\\n\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void validate(String[] argsIn) {\n\n\t\tif (argsIn.length > 1 || null == argsIn) {\n\t\t\tSystem.err.println(\"Arguments passed were either less/more than expected!\\nThe program can accepts 1 arguments.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tif(argsIn.length != 1 || argsIn[0].equals(\"${arg0}\") || (Integer.parseInt(argsIn[0]) > 2)) {\n\t\t\tSystem.err.println(\"Debug arguments can take values from 0-2\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tbuildInput(argsIn);\n\t\tif (argsIn.length == 1) {\n\t\t\tint debugValue = 0;\n\t\t\ttry {\n\t\t\t\tdebugValue = Integer.parseInt(argsIn[0]);\n\t\t\t\tMyLogger.setDebugValue(debugValue);\n\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Error while parsing debug level value\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}", "private void validateInputParameters(){\n\n }", "@Test(expectedExceptions=InvalidArgumentValueException.class)\n public void argumentValidationTest() {\n String[] commandLine = new String[] {\"--value\",\"521\"};\n\n parsingEngine.addArgumentSource( ValidatingArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n ValidatingArgProvider argProvider = new ValidatingArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 521, \"Argument is not correctly initialized\");\n\n // Try some invalid arguments\n commandLine = new String[] {\"--value\",\"foo\"};\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }", "@Test\n public void wrongFilterFileReturnsNullAndPrintsMessage() {\n String[] inputArgs = new String[] {\"-i\", \"/path/\", \"-o\", \"/path/\", \n \"-a\", apkFile.getAbsolutePath(), \n \"-f\", \"/wrong/\"};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, nullValue());\n String message = File.separator + \"wrong is not found!\";\n assertThat(errContent.toString(), containsString(message));\n }", "Optional<String> validate(String command, List<String> args);", "private void scanArgs(String [] args)\n{\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(\"-\")) {\n \n }\n else { \n root_files.add(new File(args[i]));\n }\n }\n \n if (root_files.isEmpty()) {\n root_files.add(new File(DEFAULT_FILE));\n }\n if (output_file == null) output_file = new File(OUTPUT_FILE);\n}", "private static boolean validateInput1(String[] input) {\n\t\tif (input.length != 1) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static void basicCheck(String... args) {\r\n if (args.length == 0) {\r\n throw new GitletException(\"Please enter a command.\");\r\n }\r\n if (!args[0].equals(\"init\") && !MAIN_FOLDER.isDirectory()) {\r\n throw new GitletException(\"Not in \"\r\n + \"an initialized Gitlet directory.\");\r\n }\r\n }", "@Override\n public void validateArgs(String[] args, ArgsValidation check) throws ArgsException\n {\n try\n {\n check.validateTwoArgs(args);\n }\n catch(ArgsException exception)\n {\n throw exception;\n }\n }", "abstract public boolean argsNotFull();", "private void validateInput () throws IOException, Exception {\n\t\t\n\t\t// Check that the properties file exists\n\t\tFile propFile = new File(propertiesFile);\n\t\tif (!propFile.exists()) { \n\t\t\tthrow new IOException(\"Unable to open properties file \" + propertiesFile);\t\n\t\t}\n\t\t\n\t\t// Check that the list of register files is not empty\n\t\tif (inputFiles == null || inputFiles.isEmpty()) {\n\t\t\tthrow new Exception(\"No files to process\");\n\t\t}\n\t}", "@Override\n public ValidationResults validArguments(String[] arguments) {\n final int MANDATORY_NUM_OF_ARGUMENTS = 1;\n if (arguments.length == MANDATORY_NUM_OF_ARGUMENTS) {\n // Check if CommandMAN was called on itself (Checker doesn't need to\n // validate CommandMAN twice).\n if (arguments[0].equals(this.getCommandName())) {\n this.toDocument = this; // man will document itself.\n } else {\n // Man will document this command object.\n try {\n this.toDocument = Checker.getCommand(arguments[0], true);\n } catch (Exception ex) {\n return new ValidationResults(false, \"No manual entry for \"\n + arguments[0]); // CMD does not exist.\n }\n }\n return new ValidationResults(true, null);\n }\n return new ValidationResults(false, \"Requires \"\n + MANDATORY_NUM_OF_ARGUMENTS + \" argument.\");\n }", "private boolean validateArguments() {\n return !isEmpty(getWsConfig()) && !isEmpty(getVirtualServer()) && !isEmpty(getVirtualServer()) && !isEmpty(getAppContext()) && !isEmpty(getWarFile()) && !isEmpty(getUser()) && !isEmpty(getPwdLocation());\n }", "@Test\n public void nonExistingApkPathReturnsNullAndPrintsMessage() {\n String[] inputArgs = new String[] {\"-i\", \"/path/\", \"-o\", \"/path/\", \"-a\", \"/wrong/\"};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, nullValue());\n String message = File.separator + \"wrong is not found!\";\n assertThat(errContent.toString(), containsString(message));\n }", "public void testValidateArgs() {\n\t\tString[] args = new String[]{\"name\",\"bob\",\"jones\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 1 argument, should fail\n\t\targs = new String[]{\"name\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 0 arguments, should be a problem\n\t\targs = new String[]{};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with null arguments, should be a problem\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with correct arguments, first one is zero, should work\n\t\targs = new String[]{\"name\",\"bob\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tfail(\"An InvalidFunctionArguements exception should have NOT been thrown by the constructor!\");\n\t\t}\n\t}", "private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\n public void correctArgumentsReturnsArguments() {\n String projectPath = \"/pathI/\";\n String resultPath = \"/pathO/\";\n String apkPath = apkFile.getAbsolutePath();\n String filtersPath = filterFile.getAbsolutePath();\n String[] inputArgs = new String[] {\"-i\", projectPath, \"-o\", resultPath, \n \"-a\", apkPath, \"-f\", filtersPath};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, notNullValue());\n assertThat(args.getProjectPath(), equalTo(projectPath));\n assertThat(args.getResultPath(), equalTo(resultPath));\n assertThat(args.getApkFilePath(), equalTo(apkPath));\n assertThat(args.getFiltersPath(), equalTo(filtersPath));\n }", "private static boolean validOptionalArgs (String[] args){\n boolean validChar;\n // Iterate over args\n for (int i = 0; i < args.length; i++){\n if (args[i].charAt(0)!='-')\n \treturn false;\n // Iterate over characters (to read combined arguments)\n for (int charPos = 1; charPos < args[i].length(); charPos++){\n \tvalidChar = false;\n \tfor (int j = 0; j < VALID_OPTIONAL_ARGS.length; j++){\n\t if (args[i].charAt(charPos) == VALID_OPTIONAL_ARGS[j]){\n\t validChar = true;\n\t break;\n\t }\n \t}\n \tif (!validChar)\n \t\treturn false;\n \t}\n }\n return true;\n }", "public static void main(String[] args) {\n\n long startTime = System.currentTimeMillis();\n GenericSchemaValidator validator = new GenericSchemaValidator();\n\n // check if the required number of arguments where supplied\n if(args == null || args.length != 2) {\n printUsage();\n System.exit(1);\n }\n\n // Check schema file.\n URI schemaUri = null;\n\n // check if we can use the file location as given\n File schemaFile = new File(args[0]);\n if (schemaFile.exists()) {\n schemaUri = schemaFile.toURI();\n }\n\n // maybe the schema was provided in URL/URI form\n if (schemaUri == null ) {\n try {\n schemaUri = new URI(args[0]);\n } catch (URISyntaxException e) {\n System.err.println(\"\\nURI is not in a valid syntax! \" + args[0] + \"\\n\");\n System.exit(1);\n }\n }\n\n // a few checks on the URI \n if (schemaUri.isOpaque()) {\n System.err.println(\"\\nOpaque URIs are not supported! \" + args[0] + \"\\n\");\n System.exit(1);\n }\n if (!schemaUri.getPath().endsWith(\".xsd\")) {\n System.err.println(\"\\nWARNING: The specified URI does not seem to point to \" +\n \"a XML schema file (it should have the ending '.xsd')! Trying anyway...\");\n }\n\n boolean inputIsFolder = false;\n\n // Check input file or folder.\n File inputLocation = new File(args[1]);\n if(!inputLocation.exists()){\n System.err.println(\"\\nUnable to find the input you specified: '\" + args[1] + \"'!\\n\");\n System.exit(1);\n }\n if(inputLocation.isDirectory()) {\n inputIsFolder = true;\n } else if (inputLocation.isFile()) {\n inputIsFolder = false;\n } else {\n System.err.println(\"\\nThe input you specified (\" + args[1] + \") is not a folder nor a normal file!\\n\");\n System.exit(1);\n }\n\n\n try {\n // Set the schema.\n validator.setSchema(schemaUri);\n\n // accumulate the file(s) we are supposed to validate\n File[] inputFiles;\n if (inputIsFolder) {\n // the specified input is a directory, so we have to validate all XML files in that directory\n System.out.println(\"\\nRetrieving files from '\" + inputLocation.getAbsolutePath() + \"'...\");\n inputFiles = inputLocation.listFiles(new FilenameFilter() {\n public boolean accept(File dir, String name) {\n boolean result = false;\n if(name.toLowerCase().endsWith(\"mzml\") || name.toLowerCase().endsWith(\"xml\")) {\n result = true;\n }\n return result;\n }\n });\n } else {\n // the specified input is a file, so we only have to validate this file\n inputFiles = new File[1];\n inputFiles[0] = inputLocation;\n }\n\n System.out.println(\"Validating \" + inputFiles.length + \" input file(s)...\");\n for (File inputFile : inputFiles) {\n BufferedReader br = null;\n try{\n // set the suggested buffer size for the BufferedReader\n validator.setReadBufferSize(suggestBufferSize(inputFile));\n System.out.println(\"\\n\\n - Validating file '\" + inputFile.getAbsolutePath() + \"'...\");\n System.out.println(\" (using a buffer size (in bytes): \" + validator.getReadBufferSize());\n\n if (validator.getReadBufferSize() > 0) {\n // use user defined buffer size\n br = new BufferedReader(new FileReader(inputFile), validator.getReadBufferSize());\n } else {\n // use system default size for the buffer\n br = new BufferedReader(new FileReader(inputFile));\n }\n ErrorHandlerIface xveh = validator.validate(br);\n if (xveh.noErrors()) {\n System.out.println(\" File is valid!\");\n } else {\n System.out.println(\" * Errors detected: \");\n for (Object vMsg : xveh.getErrorMessages()) {\n System.out.println( vMsg.toString() );\n }\n }\n } finally {\n try {\n if(br != null) {\n br. close();\n }\n } catch(IOException ioe) {\n // Do nothing.\n }\n }\n }\n System.out.println(\"\\nAll done!\\n\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n long stopTime = System.currentTimeMillis();\n\n System.out.println( \"Time for validation (in ms): \" + (stopTime - startTime) );\n }", "private static boolean validateInput2(String[] input) {\n\t\tif (input.length != 2) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void AppNoParams() {\n try{\n App.main(new String[]{});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Insufficient arguments given. Needs [input file] [# processors]\");\n }\n }", "protected void checkInputFile(final String inputFile)\r\n\t{\r\n\t\tif(inputFile == null)\r\n\t\t{\r\n\t\t\tthrow new NullPointerException(\"Given input file is null\");\r\n\t\t}\r\n\t\t\r\n\t\tif(inputFile.trim().isEmpty())\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Name of the input file is empty\");\r\n\t\t}\r\n\t\t\r\n\t\tfinal File in = new File(inputFile);\r\n\t\tif (!in.canRead())\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"File \" + \r\n\t\t\t\t\t\t\t\t\t\t\t\tinputFile + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\" does not exist or is not readable.\");\r\n\t\t}\r\n\t}", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tSystem.out.println(\"\\n\"+IO.fetchUSeqVersion()+\" Arguments: \"+Misc.stringArrayToString(args, \" \")+\"\\n\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'b': bedFile = new File (args[i+1]); i++; break;\n\t\t\t\t\tcase 'm': minNumExons = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'a': requiredAnnoType = args[i+1]; i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: System.out.println(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (bedFile == null || bedFile.canRead() == false) Misc.printExit(\"\\nError: cannot find your bed file!\\n\");\t\n\t}", "@Test\n public void correctArgumentsWithoutFiltersReturnsArguments() {\n String projectPath = \"/pathI/\";\n String resultPath = \"/pathO/\";\n String apkPath = apkFile.getAbsolutePath();\n String[] inputArgs = new String[] {\"-i\", projectPath, \"-o\", resultPath, \n \"-a\", apkPath};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, notNullValue());\n assertThat(args.getFiltersPath(), nullValue());\n assertThat(args.getProjectPath(), equalTo(projectPath));\n assertThat(args.getResultPath(), equalTo(resultPath));\n assertThat(args.getApkFilePath(), equalTo(apkPath));\n }", "private boolean isInValidInput(String input) {\n\n\t\tif (input == null || input.isEmpty())\n\t\t\treturn true;\n\n\t\tint firstPipeIndex = input.indexOf(PARAM_DELIMITER);\n\t\tint secondPipeIndex = input.indexOf(PARAM_DELIMITER, firstPipeIndex + 1);\n\n\t\t/*\n\t\t * if there are no PARAM_DELIMITERs or starts with a PARAM_DELIMITER\n\t\t * (Meaning command is missing) or only single PARAM_DELIMITER input is\n\t\t * not valid\n\t\t */\n\t\tif (firstPipeIndex == -1 || firstPipeIndex == 0 || secondPipeIndex == -1)\n\t\t\treturn true;\n\n\t\t// Means package name is empty\n\t\tif (secondPipeIndex - firstPipeIndex < 2)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "private boolean isValidQuestionsArgument(ArrayList<String> argArray) {\n boolean isValid = true;\n if (argArray.size() != ADD_NOTE_ARGUMENTS) {\n TerminusLogger.warning(String.format(\"Failed to find %d arguments: %d arguments found\",\n ADD_NOTE_ARGUMENTS, argArray.size()));\n isValid = false;\n } else if (CommonUtils.hasEmptyString(argArray)) {\n TerminusLogger.warning(\"Failed to parse arguments: some arguments found is empty\");\n isValid = false;\n }\n return isValid;\n }", "protected void validateNewFiles(java.lang.String[] param){\r\n \r\n }", "public static boolean isSecondArgumentValid(String input) {\n\t\tif (CommonUtils.isNotNullOrEmpty(input) && CommonUtils.isNumeric(input))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private String parseArgs(String args[])\n {\n String fpath = null;\n \n for (String arg : args)\n {\n if (arg.startsWith(\"-\"))\n {\n // TODO: maybe add something here.\n }\n else // expect a filename.\n {\n fpath = arg;\n }\n }\n \n return fpath;\n }", "private static void validateCommandLineArguments(AutomationContext context, String extendedCommandLineArgs[])\r\n\t{\r\n\t\t//fetch the argument configuration types required\r\n\t\tCollection<IPlugin<?, ?>> plugins = PluginManager.getInstance().getPlugins();\r\n \t\tList<Class<?>> argBeanTypes = plugins.stream()\r\n\t\t\t\t.map(config -> config.getArgumentBeanType())\r\n\t\t\t\t.filter(type -> (type != null))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\targBeanTypes = new ArrayList<>(argBeanTypes);\r\n\t\t\r\n\t\t//Add basic arguments type, so that on error its properties are not skipped in error message\r\n\t\targBeanTypes.add(AutoxCliArguments.class);\r\n\r\n\t\t//if any type is required creation command line options and parse command line arguments\r\n\t\tCommandLineOptions commandLineOptions = OptionsFactory.buildCommandLineOptions(argBeanTypes.toArray(new Class<?>[0]));\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tcommandLineOptions.parseBeans(extendedCommandLineArgs);\r\n\t\t} catch(MissingArgumentException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception {\n int numFiles = 0;\n boolean keepValid = false;\n for (int i=0; i<args.length; i++) {\n if (args[i].startsWith(\"-\")) {\n if (args[i].equals(\"-valid\")) keepValid = true;\n else {\n System.err.println(\"Warning: ignoring unknown command line flag \\\"\" +\n args[i] + \"\\\"\");\n }\n }\n else numFiles++;\n }\n\n if (numFiles == 0) {\n // read from stdin\n process(new BufferedReader(new InputStreamReader(System.in)), keepValid);\n }\n else {\n // read from file(s)\n for (int i=0; i<args.length; i++) {\n if (!args[i].startsWith(\"-\")) {\n process(new BufferedReader(new FileReader(args[i])), keepValid);\n }\n }\n }\n }", "public SearchCommand(String[] args) {\n super(args);\n\n try{\n pathToDir = validatePathToDir(args[1]);\n maxFileSize = validateMaxFileSize(args[2]);\n keywords = validateKeywords(args);\n }\n catch (IndexOutOfBoundsException e){\n isValid = false;\n invalidReasonString = \"The search command didn`t contain enough arguments\";\n } catch (Exception nfe){\n isValid = false;\n invalidReasonString = nfe.getMessage();\n }\n }", "@Test public void gracefullyEndsForEmptyInputs() {\n\t\tAssert.assertNotNull(parser.parse(new String[0], new CliOptions()));\n\t}", "private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }", "@Test\n public void AppFileError() {\n try{\n App.main(new String[]{TEST_PATH + \"asdfghjkl-nice.dot\",\"1\"});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Input file does not exist\");\n }\n }", "public static void main(String [] args) throws DynamicSudokuException{\n //checking whether exactly one argument is pass\n if(args.length ==0 || args.length>1 ) throw new DynamicSudokuException(\"Need exactly one file to process the input\");\n\n SudokuValidator validator = new SudokuValidator();\n try {\n //calling validation method to verify the solution\n validator.isValid(args[0]);\n System.out.println(\"Awesome! You did it, correct sudoku solution\");\n } catch (DynamicSudokuException e) {\n\n if(e.getMessage().equalsIgnoreCase(\"File Not Found\")){\n System.out.println(\"Please pass the absolute file path\");\n }else if(e.getMessage().equalsIgnoreCase(\"unknown exception occurred\")){\n System.out.println(\"Please check file format, Input should be digits and in the form of a CSV (comma-separated value) text \" +\n \"file with columns separated by commas and rows separated by newline characters\");\n }else if(e.getMessage().equalsIgnoreCase(\"Incorrect sudoku\")){\n System.out.println(\"Please solve again, incorrect sudoku!\");\n }else{\n throw new DynamicSudokuException(e);\n }\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(isValid(\"aabbccddeefghi\"));\n\t}", "private static boolean valid(String arg) {\n\n /* check if valid option */\n if ( arg.equals(\"-v\") || arg.equals(\"-i\") || arg.equals(\"-p\") || arg.equals(\"-h\") )\n return true;\n\n /* check if valid port */\n try {\n int port = Integer.parseInt(arg);\n if ( ( 0 < port ) && ( port < 65354 ) )\n return true;\n } catch (NumberFormatException ignored) {}\n\n /* check if valid ip address */\n String[] ips = arg.split(\"\\\\.\");\n if ( ips.length != 4 )\n return false;\n try{\n for (int i=0; i<4; i++){\n int ip = Integer.parseInt(ips[i]);\n if ( ( ip < 0) || (255 < ip ) )\n return false;\n }\n } catch (NumberFormatException ignored) {return false;}\n\n return true;\n }", "@Test\n\tpublic void executeInvalidFileForSlash() {\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\/\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"//\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"/\"));\n\t}", "@Test\n\tpublic void executeInvalidDirectoryForSlash() {\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\/\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"//\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"/\"));\n\t}", "private void handleCommandLineArgs(final String[] args) {\n if (args.length == 1) {\n final String value;\n if (args[0].startsWith(ToolArguments.MAP_FOLDER)) {\n value = getValue(args[0]);\n } else {\n value = args[0];\n }\n final File mapFolder = new File(value);\n if (mapFolder.exists()) {\n mapFolderLocation = mapFolder;\n } else {\n log.info(\"Could not find directory: \" + value);\n }\n } else if (args.length > 1) {\n log.info(\"Only argument allowed is the map directory.\");\n }\n // might be set by -D\n if (mapFolderLocation == null || mapFolderLocation.length() < 1) {\n final String value = System.getProperty(ToolArguments.MAP_FOLDER);\n if (value != null && value.length() > 0) {\n final File mapFolder = new File(value);\n if (mapFolder.exists()) {\n mapFolderLocation = mapFolder;\n } else {\n log.info(\"Could not find directory: \" + value);\n }\n }\n }\n }", "@Override\n protected void processShellCommandLine() throws IllegalArgumentException {\n final Map<String, String> argValues = getCommandLineArguments();\n logger.debug(\"processShellCommandLine: {}\", argValues);\n\n // note: open file is NOT done in background ...\n final String fileArgument = argValues.get(CommandLineUtils.CLI_OPEN_KEY);\n\n // required open file check:\n if (fileArgument == null) {\n throw new IllegalArgumentException(\"Missing file argument !\");\n }\n final File fileOpen = new File(fileArgument);\n\n // same checks than LoadOIDataCollectionAction:\n if (!fileOpen.exists() || !fileOpen.isFile()) {\n throw new IllegalArgumentException(\"Could not load the file: \" + fileOpen.getAbsolutePath());\n }\n\n logger.debug(\"processShellCommandLine: done.\");\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please set the path to the Rhapsody Project !\");\n else\n if(value.length()<4)\n warning(\"isn't the path too short?\");\n else {\n \tFile file = new File(value);\n \tif (file.isDirectory()) {\n \t\terror(\"you entered a directory please select the *.rpy file !\");\n \t} else \n \t\t//TODO add more checks\n \t\tok();\n }\n\n }", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter string\");\n\t\tString input1 = scan.next();\n\t\tString input2 = scan.next();\n\t\tcheckPermutations(input1,input2);\n\t}", "private void checkUserInput() {\n }", "protected abstract boolean checkInput();", "public static void main(String[] args) {\n\t\tif (!processArguments(args)) {\n\t\t\tSystem.out.println(\"Invalid Arguments! Please try again..\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "protected void parseArgs(String[] args) {\n // Arguments are pretty simple, so we go with a basic switch instead of having\n // yet another dependency (e.g. commons-cli).\n for (int i = 0; i < args.length; i++) {\n int nextIdx = (i + 1);\n String arg = args[i];\n switch (arg) {\n case \"--prop-file\":\n if (++i < args.length) {\n loadPropertyFile(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--schema-name\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case to avoid tricky-to-catch errors related to quoting names\n this.schemaName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--grant-to\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case because user names are case-insensitive\n this.grantTo = args[i].toUpperCase();\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--target\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n List<String> targets = Arrays.asList(args[i].split(\",\"));\n for (String target : targets) {\n String tmp = target.toUpperCase();\n nextIdx++;\n if (tmp.startsWith(\"BATCH\")) {\n this.grantJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"OAUTH\")){\n this.grantOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"DATA\")){\n this.grantFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--add-tenant-key\":\n if (++i < args.length) {\n this.addKeyForTenant = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--update-proc\":\n this.updateProc = true;\n break;\n case \"--check-compatibility\":\n this.checkCompatibility = true;\n break;\n case \"--drop-admin\":\n this.dropAdmin = true;\n break;\n case \"--test-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.testTenant = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key\":\n if (++i < args.length) {\n this.tenantKey = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key-file\":\n if (++i < args.length) {\n tenantKeyFileName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--list-tenants\":\n this.listTenants = true;\n break;\n case \"--update-schema\":\n this.updateFhirSchema = true;\n this.updateOauthSchema = true;\n this.updateJavaBatchSchema = true;\n this.dropSchema = false;\n break;\n case \"--update-schema-fhir\":\n this.updateFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n this.schemaName = DATA_SCHEMANAME;\n }\n break;\n case \"--update-schema-batch\":\n this.updateJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--update-schema-oauth\":\n this.updateOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schemas\":\n this.createFhirSchema = true;\n this.createOauthSchema = true;\n this.createJavaBatchSchema = true;\n break;\n case \"--create-schema-fhir\":\n this.createFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-batch\":\n this.createJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-oauth\":\n this.createOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--drop-schema\":\n this.updateFhirSchema = false;\n this.dropSchema = true;\n break;\n case \"--drop-schema-fhir\":\n this.dropFhirSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-batch\":\n this.dropJavaBatchSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-oauth\":\n this.dropOauthSchema = Boolean.TRUE;\n break;\n case \"--pool-size\":\n if (++i < args.length) {\n this.maxConnectionPoolSize = Integer.parseInt(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--prop\":\n if (++i < args.length) {\n // properties are given as name=value\n addProperty(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--confirm-drop\":\n this.confirmDrop = true;\n break;\n case \"--allocate-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.allocateTenant = true;\n this.dropTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropTenant = true;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--freeze-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.freezeTenant = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-detached\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropDetached = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--delete-tenant-meta\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.deleteTenantMeta = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--dry-run\":\n this.dryRun = Boolean.TRUE;\n break;\n case \"--db-type\":\n if (++i < args.length) {\n this.dbType = DbType.from(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n switch (dbType) {\n case DERBY:\n translator = new DerbyTranslator();\n // For some reason, embedded derby deadlocks if we use multiple threads\n maxConnectionPoolSize = 1;\n break;\n case POSTGRESQL:\n translator = new PostgreSqlTranslator();\n break;\n case DB2:\n default:\n break;\n }\n break;\n default:\n throw new IllegalArgumentException(\"Invalid argument: \" + arg);\n }\n }\n }", "private void validate(Path path) {\n }", "public ParseTree checkArgument(String arg) throws ParseException{\n\t\ttree = new ParseTree(info);\n\t\tcheckArgument(arg, new int[] {0, Integer.MAX_VALUE - 1, ERROR});\n\t\treturn tree;\n\t}", "public String validate() {\n\n // validate input source\n int inputCounts = 0;\n if (!inputFiles.isEmpty())\n inputCounts++;\n if (inputDescriptor != null)\n inputCounts++;\n if (stdin)\n inputCounts++;\n if (stdinDescriptor)\n inputCounts++;\n if (customInputStream != null)\n inputCounts++;\n\n if (inputCounts == 0)\n return \"Must specify at least one input source.\";\n if (inputCounts > 1)\n return \"Please specify only one type of input source.\";\n\n\n // validate output target\n int outputCounts = 0;\n if (outputDir != null)\n outputCounts++;\n if (outputFile != null)\n outputCounts++;\n if (stdout)\n outputCounts++;\n\n if (outputCounts == 0)\n return \"Must specify an output target.\";\n if (outputCounts > 1)\n return \"Please specify only one output target.\";\n\n if (outputLang != null) {\n if (outputFile != null)\n return \"Native java/python compilation cannot be used with the --outputFile option\";\n if (stdout)\n return \"Native java/python compilation cannot be used with the --stdout option\";\n }\n\n return null;\n }", "public static void main(String[] args) {\n\t\tLengthException ln=new LengthException();\n\t\tScanner sc=new Scanner(System.in);\n\t\tint length=sc.nextInt();\n\t\tString str=sc.next();\n\t\t try\n\t {\n\t ln.lengthcheck(length,str);\n\t }\n\t catch (LengthMatchException ex)\n\t {\n\t System.out.println(\"Caught the exception\");\n\t System.out.println(ex.getMessage());\n\t }\n\t}", "@Test(expected = SortException.class)\n\tpublic void testRunInvalidArgsMissingStdin() throws SortException {\n\t\tString[] argsArr = new String[] { \"-j\" };\n\t\tByteArrayOutputStream stdout = new ByteArrayOutputStream();\n\t\tsortApplication.run(argsArr, null, stdout);\n\t}", "public static void main(String[] args) {\n\t\tdouble width = 0;\n\t\tdouble height = 0;\n\t\tboolean valid = false;\n\n\t\tscan.useLocale(Locale.getDefault()); // using current OS's locale to avoid errors with double numbers\n\n\t\tif (args.length == NUMBER_OF_ARGUMENTS && checkInput(args[0]) != ERROR && checkInput(args[1]) != ERROR) {\n\t\t\twidth = checkInput(args[0]);\n\t\t\theight = checkInput(args[1]);\n\t\t\tif(width>0 && height>0) {\n\t\t\t\tvalid = true;\n\t\t\t}\n\t\t} else if (args.length == 0) {\n\t\t\twidth = demandInput(\"širinu\");\n\t\t\theight = demandInput(\"visinu\");\n\t\t\tvalid = true;\n\t\t}\n\n\t\tif (valid) {\n\t\t\tcalculateRectangle(width, height);\n\t\t} else {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Nevaljan broj validnih argumenata. Dozvoljena su dva ili niti jedan argument prilikom pokretanja.\");\n\t\t}\n\t\tscan.close();\n\t}", "public void testCheckString_EmptyArg() {\n try {\n Util.checkString(\" \", \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_EmptyArg() {\n try {\n Util.checkString(\" \", \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "private static String[] checkInput(String input) throws Exception{\n String[] in = input.trim().split(\" \");\n\n if(in.length == 0){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(CommandEnum.getCommandEnumFrom(in[0]) == null){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(isSpecificCommandENum(in[0],BYE)){\n return in;\n }\n if(isSpecificCommandENum(in[0],TERMINATE)){\n return in;\n }\n\n if(in.length < MIN_PARAM){\n throw new CommandException(ExceptionEnum.LESS_INPUT_EXCEPTION);\n }\n\n if(in.length > MAX_PARAM){\n throw new CommandException(ExceptionEnum.EXTRA_INPUT_EXCEPTION);\n }\n\n //check input value\n for(int i = 1; i < in.length; i++){\n try{\n Integer.parseInt(in[i]);\n }catch(NumberFormatException e){\n throw new CommandException(ExceptionEnum.INVALID_INPUT_EXCEPTION);\n }\n }\n\n return in;\n }", "@Override\n\tpublic boolean accept(Path arg0) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tFileSystem fs = FileSystem.get(Conf);\n\t\t\tFileStatus stat = fs.getFileStatus(arg0);\n\t\t\tString filename=arg0.getName();\n\t\t\t\n\t\t\tif (stat.isDir())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\tif (filename.equals(\"data\"))\n\t\t\t{\n\t\t\t\tif (stat.getLen()==0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Ignoring file:\"+ arg0.getName());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\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\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}", "public boolean checkInput();", "public boolean hasValidArgs() {\r\n // if it has has zero argument, it is valid\r\n boolean zeroArgs = this.getCmd().getArguments().size() == 0;\r\n // return the boolean value\r\n return zeroArgs;\r\n }", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "private boolean parseArguments(String input) {\r\n\t\tString arguments[] = input.split(\" \");\r\n\t\tif (arguments.length == TWO_ARGUMENTS) {\r\n\t\t\tmailbox = arguments[ARRAY_SECOND_ELEMENT].trim();\r\n\t\t\tpassword = arguments[ARRAY_THIRD_ELEMENT].trim();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\t\t\r\n\t}", "@Override\r\n public boolean isValidCommandLine(String inputLine) {\r\n String strippedLine = inputLine.strip();\r\n String[] tokens = strippedLine.split(\" \", -1);\r\n int flagIndex = findFlagIndex(tokens);\r\n\r\n if (flagIndex == NOT_FOUND) {\r\n return false;\r\n }\r\n\r\n String[] argumentTokens = Arrays.copyOfRange(tokens, 1, flagIndex);\r\n String[] flagTokens = Arrays.copyOfRange(tokens, flagIndex + 1, tokens.length);\r\n\r\n String argumentValue = String.join(\" \", argumentTokens);\r\n String flagValue = String.join(\" \", flagTokens);\r\n\r\n boolean isStartWithCommand = strippedLine.startsWith(super.getCommand() + \" \");\r\n boolean isNonEmptyArgument = argumentValue.length() > 0;\r\n boolean isNonEmptyFlag = flagValue.length() > 0;\r\n\r\n return isStartWithCommand && isNonEmptyArgument && isNonEmptyFlag;\r\n }", "private void checkRuntimeFail(String filename, int... input){\n\t\tString inputString = createInput(input);\n\t\t\n\t\tProgram prog;\n\t\tSimulator sim = null;\n\t\tMachine vm = null;\n\t\tPipedInputStream in = null;\n\t\ttry {\n\t\t\tprog = compiler.compile(new File(BASE_DIR, filename + EXT));\n\t\t\tvm = new Machine();\n\t\t\tsim = new Simulator(prog, vm);\n\t\t\tvm.clear();\n\t\t\tsim.setIn(new ByteArrayInputStream(inputString.getBytes()));\n\t\t\tin = new PipedInputStream();\n\t\t\tOutputStream out;\n\t\t\tout = new PipedOutputStream(in);\n\t\t\tsim.setOut(out);\n\t\t} catch (ParseException e) {fail(filename + \" did not generate\");\n\t\t} catch (IOException e) {\tfail(filename + \" did not generate\");}\n\t\t\n\t\ttry{\n\t\t\tsim.run();\n\t\t\tString output = \"\";\n\t\t\tint max = in.available();\n\t\t\tfor(int index = 0; index < max; index++)\n\t\t\t\toutput += (char)in.read();\n\t\t\t/** Check whether there was an error outputted. */\n\t\t\tif(!output.toLowerCase().contains(\"error: \"))\n\t\t\t\tfail(filename + \" shouldn't check but did\");\n\t\t} catch (Exception e) {\n\t\t\t// this is the expected behaviour\n\t\t}\n\t}", "public static boolean isFirstArgumentValid(String input) {\n\t\tif (CommonUtils.isNotNullOrEmpty(input) && isValidCurrency(input))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n protected void validate()\n throws CommandException, CommandValidationException {\n super.validate();\n String pp = getOption(\"printprompt\");\n if (pp != null)\n printPrompt = Boolean.parseBoolean(pp);\n else\n printPrompt = programOpts.isInteractive();\n encoding = getOption(\"encoding\");\n String fname = getOption(\"file\");\n if (fname != null)\n file = new File(fname);\n }", "public static void main(String args[]) throws Exception {\n Scanner scan = new Scanner(System.in);\n\n CommandProcessor cmd = CommandProcessorFactory.getCommandProcessor();\n\n while (true) {\n\n String str = scan.nextLine();\n\n String[] obj = str.split(\" \");\n\n int len = obj.length;\n\n if (\"mkdir\".equals(obj[0])) {\n\n if (len != 2) {\n\n System.out.println(\"Invalid Directory Name\");\n\n continue;\n\n }\n\n cmd.createDirectory(obj[1]);\n\n } else if (\"cd\".equals(obj[0])) {\n\n if (len == 2) {\n cmd.changeDirectory(obj[1]);\n } else {\n cmd.changeDirectory(null);\n }\n\n } else if (\"touch\".equals(obj[0])) {\n\n if (len != 2) {\n\n System.out.println(\"Invalid Directory Name\");\n\n continue;\n\n } else {\n\n cmd.createFile(obj[1]);\n\n }\n\n } else if (\"ls\".equals(obj[0])) {\n\n cmd.listAllFiles();\n\n } else if (\"pwd\".equals(obj[0])) {\n\n cmd.pwd();\n\n } else if (\"quit\".equals(obj[0])) {\n\n break;\n\n } else {\n\n System.out.println(\"Unrecognized Command\");\n\n }\n\n }\n\n }" ]
[ "0.76541805", "0.7555588", "0.7542235", "0.74159485", "0.7295901", "0.7258106", "0.70353574", "0.6846199", "0.6753999", "0.67049664", "0.6699397", "0.66980433", "0.6673965", "0.656911", "0.6526132", "0.6499561", "0.6433336", "0.6408257", "0.6400424", "0.639122", "0.6376545", "0.6307781", "0.62759566", "0.62573", "0.6255195", "0.62485933", "0.6242878", "0.6233051", "0.62089354", "0.62067366", "0.6204016", "0.62039506", "0.6174189", "0.617038", "0.61565846", "0.6145582", "0.6137197", "0.613611", "0.61219895", "0.6065213", "0.6050964", "0.602282", "0.5989938", "0.5955016", "0.5950312", "0.5935394", "0.5915972", "0.5906019", "0.58934903", "0.5887818", "0.588077", "0.58713037", "0.5863534", "0.5845537", "0.58282185", "0.5827653", "0.5824422", "0.58126783", "0.58108133", "0.58095926", "0.5785661", "0.5774447", "0.5774135", "0.5771811", "0.5769925", "0.5767021", "0.57495934", "0.57440114", "0.5729866", "0.5720919", "0.57061476", "0.56961876", "0.5690006", "0.5684072", "0.5672695", "0.56636155", "0.5661018", "0.5658588", "0.565706", "0.56321526", "0.5624071", "0.56209534", "0.5615353", "0.56048757", "0.55960023", "0.55945957", "0.55928326", "0.55928326", "0.55900687", "0.5581679", "0.55812037", "0.5570827", "0.55479807", "0.55279815", "0.55245644", "0.55242443", "0.55193055", "0.5504019", "0.5503741", "0.5502354" ]
0.6476229
16
end validation method main method Purpose is to start program and validate input and run threads method
public static void main(String[] args) { //Variables int chunkSize = Integer.parseInt(args[1]); int numThreads = Integer.parseInt(args[2]); BufferedReader br = null; ReadFromFile rf = new ReadFromFile(); ArrayList<String> filesInFolder = inputValidation(args); //Delete the output folder if it exists File dirName = new File("output"); File[] files = dirName.listFiles(); //check if output/ already exists. If exists check for files and delete them try { if (dirName.isDirectory()) { //Check if files are in folder that need to be deleted if (files != null) { //delete files in folder for (File f : files) { f.delete(); } } //Delete the directory before before starting new run of program dirName.delete(); } } catch (Exception e) { e.printStackTrace(); System.out.println("Cannot delete output directory, please try again!"); System.exit(2); } //for loop to open and read each individual file for (String file : filesInFolder) { try { FileReader reader = new FileReader(directoryName + "\\" + file); br = new BufferedReader(reader); } catch (FileNotFoundException e1) { e1.printStackTrace(); } rf.readFromFile(chunkSize, br, numThreads, file); } //Call getResults method to start process of combining chunk files getResults(); //Call writeResults method to write results file writeResults(); //close any streams try { br.close(); } catch (IOException e) { e.printStackTrace(); System.out.println("br did not close!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void run()\n {\n\tString[] info = null;\n\tnumber = new Stack<String>();\n\totherNumber = new Stack<String>();\n\tScanner scan = new Scanner(System.in);\n\twhile(scan.hasNext())\n\t{\n\t info = scan.nextLine().trim().split(\"\\\\s+\");\n\t if(info.length == 2)\n\t {\n\t\tnum1 = isValid(info[0]);\n\t\tnum2 = isValid(info[1]);\n\t\tif(num1 != null && num2 != null)\n\t\t{\n\t\t generateLists();\n\t\t addition();\n\t\t outputData();\n\t\t clear();\n\t\t}\n\t\telse error();\n\t }\n\t else error();\n\t}\n }", "private void run()\r\n\t{\r\n\t\tboolean programLoop = true;\r\n\t\t\r\n\t\twhile(programLoop)\r\n\t\t{\r\n\t\t\tmenu();\r\n\t\t\tSystem.out.print(\"Selection: \");\r\n\t\t\tString userInput = input.nextLine();\r\n\t\t\t\r\n\t\t\tint validInput = -1;\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tvalidInput = Integer.parseInt(userInput);\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid selection.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tswitch(validInput)\r\n\t\t\t{\r\n\t\t\t\tcase 0: forInstructor();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1: addSeedURL();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: addConsumer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: addProducer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4: addKeywordSearch();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5: printStats();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t//case 10: debug(); //Not synchronized and will most likely cause a ConcurrentModificationException\r\n\t\t\t\t\t\t //break;\t//if multiple Producer and Consumer Threads are running.\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public void run() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Local IP: \"+InetAddress.getByAddress(simpella.connectIP));\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(\"Cannot resolve localhost name...exiting\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tSystem.out.println(\"Simpella Net Port: \"+simpella.serverPortNo);\n\t\tSystem.out.println(\"Downloading Port: \"+simpella.downloadPortNo);\n\t\tSystem.out.println(\"simpella version 0.6 (c) 2002-2003 XYZ\");\n\t\tinp=new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true)\n\t\t{\n\t\t\t\t\t\t\n\t\t\ttry {\n\t\t\t\tuserInput = inp.readLine();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t\tSystem.out.println(\"Invalid Input!!...Exiting\");\n\t\t\t\t//System.exit(1);\n\t\t\t}\n\t\t\tif(userInput.equalsIgnoreCase(\"quit\") || userInput.equalsIgnoreCase(\"bye\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Exiting....\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\telse if(userInput.startsWith(\"info\"))\n\t\t\t{\n\t\t\t\tString[] token=userInput.split(\" \");\n\t\t\t\tif(token.length==2)\n\t\t\t\t\tinfo(token[1]);\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"Usage: info [cdhnqs]\");\n\t\t\t}\n\t\t\telse if(userInput.startsWith(\"share\"))\n\t\t\t{\n\t\t\t\tString[] token=userInput.split(\" \");\n\t\t\t\tString argument=\"\";\n\t\t\t\tfor(int i=1;i<token.length;i++)\n\t\t\t\t\targument=argument + token[i] +\" \";\n\t\t\t\t//System.out.println(argument+\"len=\"+argument.length());\n\t\t\t\tshare(argument);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\telse if(userInput.startsWith(\"open\")){\n\t\t\t\t// Insert validation for input string\n\t\t\t\tString[] token=userInput.split(\" \");\n\t\t\t\tif(client.noOfConn<3)\n\t\t\t\topen(token[1]);\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"Client:SIMPELLA/0.6 503 Maximum number of connections reached. Sorry!\\r\\n\");\n\t\t\t}\n\t\t\t\n\t\t\telse if(userInput.equals(\"scan\")){\n\t\t\t\tscan();\n\t\t\t}\n\t\t\telse if(userInput.startsWith(\"download\")){\n\t\t\t\tString[] token=userInput.split(\" \");\n\t\t\t\ttry {\n\t\t\t\t\tdownload(Integer.parseInt(token[1]));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Usage: download <number>\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(userInput.equals(\"monitor\")){\n\t\t\t\ttry {\n\t\t\t\t\tmonitor();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(userInput.startsWith(\"clear\")){\n\t\t\t\tString[] token=userInput.split(\" \");\n\t\t\t\t//System.out.println(\"No of arguments=\"+token.length);\n\t\t\t\tif(token.length==1)\n\t\t\t\t\tclear(-1);\n\t\t\t\telse\n\t\t\t\t\tclear(Integer.parseInt(token[1]));\n\t\t\t}\n\t\t\telse if(userInput.equals(\"list\")){\n\t\t\t\ttry {\n\t\t\t\t\tint k=Connection.list_port.size();\n\t\t\t\t\tlist1(0, k);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(userInput.startsWith(\"find\")){\n\t\t\t\tString[] token=userInput.split(\" \");\n\t\t\t\tString argument=\"\";\n\t\t\t\tfor(int i=1;i<token.length;i++)\n\t\t\t\t\targument=argument + token[i] +\" \";\n\t\t\t\t//System.out.println(argument+\"len=\"+argument.length());\n\t\t\t\ttry {\n\t\t\t\t\tfind(argument);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(userInput.equals(\"update\")){\n\t\t\t\ttry {\n\t\t\t\t\tupdate();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"Client:Error calling update\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Invalid Command\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfinal MainScreenHandler mainScreen = new MainScreenHandler();\n\n\t\t// object to handle the CardFile\n\t\tfinal CardFileHandler card = new CardFileHandler();\n\n\t\t// object to handle the Beacon File\n\t\tfinal BeaconFileHandler beaconFile = new BeaconFileHandler();\n\n\t\t// object to handle the PIN File\n\t\tfinal PinFileHandler pinFile = new PinFileHandler();\n\n\t\t// object to handle the IMEI File\n\t\tfinal IMEIFileHandler imeiFile = new IMEIFileHandler();\n\n\t\t// object to handle the account validation\n\t\tfinal AccountValidater account = new AccountValidater();\n\n\t\t// object to handle the screen timeout\n\t\tfinal ScreenTimeOutHandler timeoutScreen = new ScreenTimeOutHandler();\n\n\t\tThread t = new Thread() {\n\n\t\t\tpublic void run() {\n\n\t\t\t\twhile (beaconFile.fileExists()) {\n\n\t\t\t\t\tint count1 = 20;\n\t\t\t\t\tint count2 = 20;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"SystemRunner.thread1:Thread error! \");\n\t\t\t\t\t}\n\t\t\t\t\tbeaconFile.read();\n\t\t\t\t\tbeaconFile.delete();\n\t\t\t\t\twhile (!card.fileExists() && count1 != 0) {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsleep(1000);\n\t\t\t\t\t\t\tcount1--;\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"SystemRunner.thread2:Thread error! \");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif (count1 != 0) {\n\n\t\t\t\t\t\tcard.read();\n\t\t\t\t\t\twhile (!pinFile.fileExists() && count2 != 0) {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tsleep(1000);\n\t\t\t\t\t\t\t\tcount2--;\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"SystemRunner.thread3:Thread error! \");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count2 != 0) {\n\n\t\t\t\t\t\t\tpinFile.read();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"SystemRunner.thread4:Thread error! \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taccount.validate();\n\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\ttimeoutScreen.display();\n\n\t\t\t\t\t} else\n\t\t\t\t\t\ttimeoutScreen.display();\n\t\t\t\t\tcard.delete();\n\t\t\t\t\timeiFile.delete();\n\t\t\t\t\tpinFile.delete();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"SystemRunner.thread5:Thread error! \");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"taskkill /F /IM chrome.exe\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"SystemRunner:Thread error! Could not kill the browser\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"SystemRunner.thread6:Thread error! \");\n\t\t\t\t\t}\n\t\t\t\t\tmainScreen.display();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"SystemRunner.thread0:Thread error! \");\n\t\t}\n\t\tmainScreen.display();\n\t\twhile (true)\n\t\t\tt.run();\n\t}", "public static void main(String[] args) throws Exception {\n\t\tLogConfig.execute();\n\t\tlogger.info(START);\n\t\tint endValue = 0;\n\t\ttry {\n\t\t\t//args check\n\t\t\targsValidation(args); \n\t\t\t//start logic\n\t\t\tendValue = SudokuFacade.build().executeSudokuValidation(new FileSystemContext(args[0]));\n\t\t} catch (Exception e) {\n\t\t\tendValue = 1;\n\t\t\tlogger.log(SEVERE, EXCEPTION, e);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tlogger.info(END);\n\t\t\tlogger.info(endValue == 0 ? SUCCESS : FAIL );\n\t\t}\n\t}", "public static void main(String args[]) {\n//\t (new PleaseInput()).start();\n\t (new randomNum()).start();\n\t }", "public static void main(String[] args){\n\t\ttry {\n\t\t\tConfigure.readConf();\n\t\t\t//first connect the socket\n\t\t\tconnect();\n\t\t} catch (IOException e2) {\n\t\t\tConfigure.logger.error(e2.getMessage());\n\t\t}\n\t\t//the pipe between get seting and sendto dev threads \n\t\ttry {\n\t\t\treader.connect(writer);\n\t\t\tset.setWriter(writer);\n\t\t\ts2dev.setReader(reader);\n\t\t} catch (IOException e2) {\n\t\t\tConfigure.logger.error(e2.getMessage());\n\t\t}\n\t\t\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner s = new Scanner(System.in);\n\t\tCLIParser cliparse = new CLIParser();\n\t\t\n\t\tbyte[] data2send = null;\n\t\t//auto join the appeui \n\t\ttry {\n\t\t\tauto_Join(cliparse);\n\t\t} catch (Exception e3) {\n\t\t\tConfigure.logger.error(\"auto join failed! \"+e3.getMessage());\n\t\t\tSystem.out.println(\"auto join failed!\");\n\t\t}\n\t\t\n\t\trg.setConn(conn);\n\t\ts2dev.setConn(conn);\n\t\t\n\t\trbk.setRg(rg);\n\t\trbk.setSettings(set);\n\t\trbk.setCalc(calcLo);\n\t\tset.setRg(rg);\n\t\t\n\t\tthread = new Thread(rg);\n\t\tthread.start();\n\t\t\n\t\tthreadRbk = new Thread(rbk);\n\t\tthreadRbk.start();\n\n\t\tthreadSet = new Thread(set);\n\t\tthreadSet.start();\n\n\t\tthreadDev = new Thread(s2dev);\n\t\tthreadDev.start();\n\t\t\n\t\tthreadCalcLo = new Thread(calcLo);\n\t\tthreadCalcLo.start();\n\t\twhile (true) {\n\t\t\tString line = s.nextLine();\n\n\t\t\tif (line.equals(\"exit\")) {\n\t\t\t\tif ((conn != null) && (!conn.isClosed())) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconn.disconnect();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t\t\t\t//System.out.println(e.getMessage());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tconn = null;\n\t\t\t\t} else {\n\t\t\t\t\tconn = null;\n\t\t\t\t}\n\n\t\t\t\trg.setConn(conn);\n\t\t\t\tthread.interrupt();\n\t\t\t\t\n\t\t\t\tthreadSet.interrupt();\n\t\t\t\ts2dev.setConn(conn);\n\t\t\t\tthreadDev.interrupt();\n\t\t\t\tthreadRbk.interrupt();\n\t\t\t\t \n\t\t\t\ttry {\n\t\t\t\t\tthreadSet.join();\t//等待exit前保存document\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\targs = line.split(\" \");\n\t\t\ttry {\n\t\t\t\tdata2send = cliparse.parseCmd(args);\n\t\t\t} catch (Exception e2) {\n\t\t\t\tConfigure.logger.error(e2.getMessage());\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\tif (!args[0].trim().equalsIgnoreCase(\"quit\")) {\n\t\t\t\tif ((conn == null) || (conn.isClosed())) {\n\t\t\t\t\tconn = connect();\n\t\t\t\t\trg = new RespGetter();\n\t\t\t\t\trg.setConn(conn);\n\t\t\t\t\t\n\t\t\t\t\ts2dev.setConn(conn);\n\t\t\t\t\t\n\t\t\t\t\tthread = new Thread(rg);\n\t\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((conn != null) && (!conn.isClosed())) {\n\t\t\t\t// server socket come data\n\t\t\t\ttry {\n\t\t\t\t\tconn.putData(data2send);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tif ((conn == null) || (conn.isClosed())) {\n\t\t\t\t\t\tInetAddress add;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tadd = Configure.getADDRESS();\n\t\t\t\t\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t\t\t\t\t\trg.setConn(conn);\n\t\t\t\t\t\t\ts2dev.setConn(conn);\n\t\t\t\t\t\t\tconn.putData(data2send);\n\t\t\t\t\t\t} catch (UnknownHostException e1) {\n\t\t\t\t\t\t\tConfigure.logger.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\"retry connect fail or connection problem, break out and restart the applicatoin\");\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\tthread.interrupt();\n\t\t\t\t\t\t\trg.setRunFlag(false);\n\t\t\t\t\t\t\tthread.interrupt();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthreadRbk.interrupt();\n\t\t\t\t\t\t\tthreadSet.interrupt();\n\t\t\t\t\t\t\tthreadDev.interrupt();\n\t\t\t\t\t\t\tthreadCalcLo.interrupt();\n\t\t\t\t\t\t\tif ((conn != null) || (!conn.isClosed())) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconn.disconnect();\n\t\t\t\t\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t\t\t\t\tConfigure.logger.error(e2.getMessage());\n\t\t\t\t\t\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconn = null;\n\t\t\t\t\t\t\t\trg.setConn(null);\n\t\t\t\t\t\t\t\ts2dev.setConn(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (data2send != null) {\n\t\t\t\t\tConfigure.cmdseq_counter = Configure.cmdseq_counter + 2;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t\tif (args[0].trim().equalsIgnoreCase(\"quit\")) {\n\t\t\t\t\tSystem.out.println(\"quit cmd has sent\");\n\t\t\t\t\tConfigure.cmdseq_counter = Configure.DEFAULT_CMDSEQ;\n\t\t\t\t\trg.setRunFlag(false);\n\t\t\t\t\tthread.interrupt();\n\t\t\t\t\t\n//\t\t\t\t\tthreadRbk.interrupt();\n//\t\t\t\t\tthreadSet.interrupt();\n//\t\t\t\t\tthreadDev.interrupt();\n\t\t\t\t\t\n\t\t\t\t\tif ((conn != null) || (!conn.isClosed())) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconn.disconnect();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconn = null;\n\t\t\t\t\t\trg.setConn(null);\n\t\t\t\t\t\ts2dev.setConn(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//In fact, if application runs, the connection must be kept, if closed, open again\n\t\t\t\tif ((conn == null) || (conn.isClosed())) {\n\t\t\t\t\t\n\t\t\t\t\tconn = connect();\n\t\t\t\t\trg.setConn(conn);\n\t\t\t\t\t\n\t\t\t\t\tthread = new Thread(rg);\n\t\t\t\t\trg.setRunFlag(true);\n\t\t\t\t\tthread.start();\n\n//\t\t\t\t\trbk.setRg(rg);\n//\t\t\t\t\tthreadRbk = new Thread(rbk);\n//\t\t\t\t\tthreadRbk.start();\n\t\t\t\t\t\n\t\t\t\t\t\n//\t\t\t\t\tset.setRg(rg);\n//\t\t\t\t\tthreadSet = new Thread(set);\n//\t\t\t\t\tthreadSet.start();\n//\t\t\t\t\t\n//\t\t\t\t\tthreadDev = new Thread(s2dev);\n//\t\t\t\t\tthreadDev.start();\n\t\t\t\t\t\n\t\t\t\t\tif (conn == null) {\n\t\t\t\t\t\tConfigure.logger.error(\"Acquire connection failed, connecting error\");\n\t\t\t\t\t\tSystem.out.println(\"Acquire connection failed, connecting error\");\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}", "private void run() \n{\n String answer;\t//console answer\n \tboolean error;\t//answer error flag\n \terror = false;\n \tdo {\t\t\t\t\t\t\t//get the right answer\n \t \t//Take user input\n \t \t//System.out.println(\"\\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\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\");\n \t\t\tSystem.out.println(\"Would you like to enter GUI or TIO?\");\n \t\t\tanswer = console.nextLine();\n \t \tif(answer.equals(\"GUI\"))\n \t\t\t{\n \t\t\t\terror = false;\n \t\t\t\tlaunchGUI();\n \t\t\t}else if(answer.equals(\"TIO\"))\n \t\t\t{\n \t\t\t\terror = false;\n \t\t\t\tlaunchTIO();\n \t\t\t}else\n \t\t\t{\n \t\t\t\t//Error: Not correct format\n \t\t\t\terror = true;\n \t\t\t\tSystem.out.println(\"I couldn't understand your answer. Please enter again \\n\");\n \t\t\t}\n \t\t}while (error == true);\n\n}", "@Override\r\n\tpublic void run() {\n\t\tEmployee employee = new Employee();\r\n\t\tboolean isContinue=true;\r\n\t\tboolean isContinue1 = true;\r\n\t\tboolean isContinue2 = true;\r\n\t\tboolean isContinue3 = true;\r\n\t\tboolean isContinue4 = true;\r\n\t\tboolean isContinue5 = true;\r\n\t\tboolean isContinue6 = true;\r\n\t\tboolean isContinue7 = true;\r\n\t\tboolean isContinue8 = true;\r\n\t\twhile(isContinue){\r\n\t\twhile (isContinue1) {\r\n\t\t\tSystem.out.println(\"Enter employee 3 digit payroll number:\");\r\n\t\t\tString entryOfEmployeeNo = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckEmploeeNo(entryOfEmployeeNo);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setEmployeeNo(entryOfEmployeeNo);\r\n\t\t\tisContinue1 = false;\r\n\t\t}\r\n\t\twhile (isContinue2) {\r\n\t\t\tSystem.out.println(\"Enter Phone Number (02-12345678):\");\r\n\t\t\tString entryOfTelephone = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckTelePhone(entryOfTelephone);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setTelephoneNumber(entryOfTelephone);\r\n\t\t\tisContinue2 = false;\r\n\t\t}\r\n\r\n\t\twhile (isContinue3) {\r\n\t\t\tSystem.out.println(\"Enter Last Name:\");\r\n\t\t\tString entryOfLastName = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckProperty(entryOfLastName, EmpPropetyType.LASTNAME);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setLastName(entryOfLastName);\r\n\t\t\tisContinue3 = false;\r\n\t\t}\r\n\r\n\t\twhile (isContinue4) {\r\n\t\t\tSystem.out.println(\"Enter First Name:\");\r\n\t\t\tString entryOfFirstName = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckProperty(entryOfFirstName, EmpPropetyType.FIRSTNAME);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setFirshName(entryOfFirstName);\r\n\t\t\tisContinue4 = false;\r\n\t\t}\r\n\r\n\t\twhile (isContinue5) {\r\n\t\t\tSystem.out.println(\"Enter Middle Init:\");\r\n\t\t\tString entryOfInitial = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckProperty(entryOfInitial, EmpPropetyType.INITIAL);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setInitial(entryOfInitial);\r\n\t\t\tisContinue5 = false;\r\n\t\t}\r\n\t\twhile(isContinue6){\r\n\t\t\tSystem.out.println(\"Enter Dept #:\");\r\n\t\t\tString entryOfDept = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckDepartMentNo(entryOfDept);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setDepartmentNumber(entryOfDept);\r\n\t\t\tisContinue6 = false;\r\n\t\t}\r\n\t\t\r\n\t\twhile(isContinue7){\r\n\t\t\tSystem.out.println(\"Enter Job Title:\");\r\n\t\t\tString entryOfJobTitle = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckProperty(entryOfJobTitle,EmpPropetyType.JOBTITLE);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setJobTitle(entryOfJobTitle);\r\n\t\t\tisContinue7 = false;\r\n\t\t}\r\n\t\t\r\n\t\twhile(isContinue8){\r\n\t\t\tSystem.out.println(\"Enter Date Hired (dd-mm-yyyy):\");\r\n\t\t\tString entryOfHireDate = SysBaseUtil.getEntry();\r\n\t\t\ttry {\r\n\t\t\t\tcheckDate(entryOfHireDate);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSysBaseUtil.pause(e.getMessage());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\temployee.setDateOfHiring(entryOfHireDate);\r\n\t\t\tisContinue8 = false;\r\n\t\t}\r\n\t\t//将员工信息存入到文件中\r\n\t\temployeeTxtDao.saveEmployee(employee);\r\n\t\tSystem.out.println(\"\\nRecord Saved\");\r\n\t\tSystem.out.println(\"Add another employee record? (y)es or (n)o:\");\r\n\t\tString entryOfYOrN = SysBaseUtil.getEntry();\r\n\t\tif(entryOfYOrN.equalsIgnoreCase(\"Y\")){\r\n\t\t\tisContinue1 = true;\r\n\t\t\t isContinue2 = true;\r\n\t\t\t isContinue3 = true;\r\n\t\t\tisContinue4 = true;\r\n\t\t\t isContinue5 = true;\r\n\t\t\t isContinue6 = true;\r\n\t\t\t isContinue7 = true;\r\n\t\t\t isContinue8 = true;\r\n\t\t\tcontinue;\r\n\t\t}else{\r\n\t\t\tisContinue=false;\r\n\t\t}\r\n\t\t\r\n\t\t}\r\n\t}", "public void run() {\n\n ui.startDuke();\n storage.readFile(lists, ui);\n\n Scanner reader = new Scanner(System.in);\n\n while (true) {\n\n String inp = reader.nextLine();\n parse.checkInstruction(inp, storage, ui, lists, tasks);\n }\n }", "public void run() {\n TasksCounter tc = new TasksCounter(tasks);\n new Window(tc);\n Ui.welcome();\n boolean isExit = false;\n Scanner in = new Scanner(System.in);\n while (!isExit) {\n try {\n String fullCommand = Ui.readLine(in);\n Command c = Parser.commandLine(fullCommand);\n c.execute(tasks, members, storage);\n isExit = c.isExit();\n } catch (DukeException e) {\n Ui.print(e.getMessage());\n }\n }\n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tTrafficLightThread mainThread = new TrafficLightThread(\"\");\n\t\t\n\t\tString endProgram = scan.nextLine();\n\t\t\n\t\tif(endProgram.isEmpty()) {\n\t\t\tTrafficLightThread.myStop();\n\t\t\tSystem.out.println(\"Traffic Light Simulator is Done!\");\n\t\t}\n\t}", "public void run() {\n\n ConfigFileURLResolver resolver = new ConfigFileURLResolver(); \n \n try {\n this._domainFile = resolver.getFileURL(this._domainFilename);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading login file: \"+sesEx.getMessage());\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //try to create login file instance\n try {\n _loginReader = new LoginFile();\n } catch (IOException ioEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading login file\");\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //try to create encrypter instance\n try {\n _encrypter = new PublicKeyEncrypter();\n } catch (IOException ioEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading encrypter\");\n //ioEx.printStackTrace();\n this._logger.trace(null, ioEx);\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //create reconnect throttle \n \n _throttle = new ReconnectThrottle();\n \n //--------------------------\n \n //install shutdown handler to hook\n //Runtime.getRuntime().addShutdownHook(new ShutDownHandler());\n \n //check action id\n if (this._actionId.equals(Constants.NOOPERATION)) {\n this._logger.error(ERROR_TAG + \"Unrecognized user operation: \"\n + this._userOperation);\n ++this._errorCount;\n return;\n }\n\n boolean parseError = false;\n\n try {\n //construct parser and parser\n this._parser.parse(this._actionId, this._args);\n } catch (ParseException pEx) {\n parseError = true;\n\n //if no arguments were provided and exception is missing args,\n //then just send message to debug and rely on help message\n if (this._args.length == 0 && \n pEx.getErrorOffset() == UtilCmdParser.CODE_MISSING_ARGUMENTS)\n this._logger.debug(ERROR_TAG + pEx.getMessage());\n else\n this._logger.error(ERROR_TAG + pEx.getMessage());\n this._logger.debug(null, pEx);\n } catch (Exception ex) {\n parseError = true;\n this._logger.error(ERROR_TAG + ex.getMessage());\n this._logger.debug(null, ex);\n }\n\n if (parseError) {\n //attempt to logout\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n }\n\n //-------------------------\n\n boolean help = parseError || \n (this._parser == null) || this._parser.printHelp();\n\n //if help is true, print usage and return\n if (help) {\n this._logger.info(this._getUsage());\n return;\n }\n\n \n //-------------------------\n\n// FileEventHandlerManager fehManager = new FileEventHandlerManager(\n// this._argTable, this._actionId); \n// this._fileEventHandlerSet = fehManager.getFileEventHandlers();\n \n //-------------------------\n\n this._using = (this._parser.getOptionsFilename() != null);\n\n try {\n //iterate over number of argument sets, processing each\n\n Hashtable argTable;\n this._parser.reset();\n int iterations = this._parser.iterations();\n for (int i = 0; i < iterations; ++i) {\n argTable = (Hashtable) this._parser.getCurrentArguments();\n \n try {\n _process(argTable);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n this._logger.debug(null, sesEx);\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n //return;\n }\n this._parser.advance();\n }\n\n //-------------------------\n\n //logout successfully\n this._logout();\n\n //-------------------------\n\n } catch (Exception ex) {\n this._logger.error(ERROR_TAG + ex.getMessage());\n this._logger.debug(null, ex);\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n return;\n }\n\n }", "public static void main(String[] args) {\n\t\tint num;\n\t\tArrayList<Thread> numbersThreads = new ArrayList<Thread>();\n\t\t\n\t\tnum = 0;\n\t\tScanner number = new Scanner(System.in);\n\t\tfor(int i = 0; i < 4; i++)\n\t\t{\n\t\t\tSystem.out.println(\"Put number \" + i + \": \");\n\t\t\tnum = number.nextInt();\n\t\t\tPrimeCalculator numRunnable = new PrimeCalculator(num);\n\t\t\tThread t1 = new Thread(numRunnable);\n\t\t\tnumbersThreads.add(t1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < numbersThreads.size(); i++)\n\t\t\tnumbersThreads.get(i).start();\n\t\tnumber.close();\n\t}", "public static void main(String[] args) {\n System.out.println(validateTask(true,6,5));\n\n }", "public static void main(String[] args) {\n\t\tProcessor p1=new Processor();\n\t\tProcessor p2=new Processor();\n\t\tp1.setName(\"thread p1\");\n\t\tp2.setName(\"thread p2\");\n\t\t\t\tp1.start(); // new thread spun\n\t\t\t\tp2.start();\n\t\t\n\t System.out.println(\"press enter\");\n\t Scanner input=new Scanner(System.in);\t\t\n\t input.nextLine();\n\t\t\t\t\n\t\tp1.running = false;\n\t\t\n\t\tSystem.out.println(\"press enter\");\n\t\t Scanner input1=new Scanner(System.in);\t\t\n\t\t input1.nextLine();\n\t\tp2.running = false;\n\t\t/*\n\t\t * calling shut down on main thread\n\t\t * and setting running value\n\t\t */\n\t\tSystem.out.println(\"main end , keepRunning set to false.\");\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) throws InterruptedException \n\t{\n\t\tAnalysis[] analytics = new Analysis[10];\n\t\tanalysisGUI a_gui = new analysisGUI();\n\t\tMainGUI main_gui = new MainGUI();\n\t\tGUIQueue gui_queue = new GUIQueue();\n\t\t\n\t\t//Initializing and Declaring the scanner class for taking the user input from console\n\t\t//Scanner in = new Scanner(System.in);\n\t\t\n\t\t//Taking input for time slice/quanta\n\t\t//System.out.println(\"Enter the time quantum:\");\t\n\t\t//int time_slice = in.nextInt();\n\t\t\n\t\t//Initialization and Declaration for 3 Linked lists(one for each new,ready and blocked queue)\n\t\tLinkedList<Process> ready_queue =new LinkedList<>();\n\t\tLinkedList<Process> block_queue =new LinkedList<>();\n\t\tLinkedList<Process> new_queue =new LinkedList<>();\n\t\t\n\t\t//Setting the GUI window visible\n\t\t//window.frame.setVisible(true);\n\t\t\n\t\t//Object creation and memory allocation for Process Creation ,Execution, long term and medium term classes\n\t\tExecution execute = new Execution(2,analytics,main_gui,gui_queue,a_gui);\n\t\t//In all the below listed classes the parameterized constructor implements the run function of Thread class by extending it\n\t\tProcessCreation pc = new ProcessCreation(block_queue,ready_queue,new_queue,execute,analytics,main_gui);\n\t\tlongterm lt = new longterm(block_queue,ready_queue,new_queue,execute,main_gui,gui_queue);\n\t\t\n\t\t//Starting the threads for process creation,long term scheduler and medium term scheduler\n\t\tpc.start();\n\t\tlt.start();\n\t\t\n\t\t//Joining the threads one by one for synchronized execution \n\t\tpc.join();\n\t\tlt.join();\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tProcess Process = new Process();\n\t\tScheduler Schedule = new Scheduler();\n\t\tString fileInput;\n\t\t//ReadyQue\n\t\t\n\t\t//test for single file\n\t\tSystem.out.println(\"Press 1 to choose a file \");\n\t\tSystem.out.println(\"Press 2 to choose multiple files \");\n\t\tint choiceInput = scan.nextInt();\n\t\t\tif(choiceInput == 1)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What file would you liked to use :\");\n\t\t\t\tfileInput = scan.next();\n\t\t\t\tProcess.runProgram(fileInput);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(choiceInput == 2)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"How many programs do you want to run\");\n\t\t\t\tint fileNumber = scan.nextInt();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int PS = 0; PS <= fileNumber; PS ++)\n\t\t\t\t{\n\t\t\t\t\tScheduler.positionofLL(PS);\n\t\t\t\t\t\n\t\t\t\t\tif(PS%2 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tfileInput = \"paint.txt\";\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfileInput = \"ide.txt\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tProcess.runProgram(fileInput);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Invalid Choice.\\n Please Run program again.\");\n\t\t\t}\n\t\n\t\t\n\t\t\n\t\tscan.close();\n\t\t\n\t\n\t}", "public void runProgram() {\n if (isSyntaxChecked()) {\n // panelDebugArea1.getTextArea().setText(\"\");\n this.setPause(false);\n try {\n // Precisa adicionar o Swingworker em uma nova thread para que ele execute!!\n // Vai entender.\n // Duas instâncias de Swingworker diferentes não estavam rodando ao mesmo mesmo. O código abaixo solucionou o problema.\n new Thread(this.getWorker()).start();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, this.errorWhileRunningText + \"\\n\" + ex);\n }\n }\n }", "private void launch() {\n\n boolean running = true;\n while (running) {\n System.out.println(\"What would you like to do?\");\n System.out.println(\"1 - Add a new patient file\");\n System.out.println(\"2 - Delete an existing patient file\");\n System.out.println(\"0 - Exit\");\n System.out.println(\"\\n >\");\n\n //Scanner reader = new Sca(System.in);\n // int input = reader.nextInt();\n\n try {\n String userInput = System.console().readLine();\n\n int userSelection = Integer.parseInt(userInput);\n\n switch (userSelection) {\n case 0:\n running = false;\n break;\n\n case 1:\n System.out.println(\"Please enter patient details.\");\n System.out.println(\"You selected option 1 : Enter first name:\");\n String name = System.console().readLine();\n System.out.println(\"Please Enter age:\");\n int age = Integer.parseInt(System.console().readLine());\n System.out.println(\"Please Enter illness:\");\n String illness = System.console().readLine();\n HospitalManager hm = new HospitalManager();\n Patient firstPatient = hm.getFirstPatient();\n hm.addPatient(firstPatient);\n System.out.println(\"\\n\");\n System.out.println(\"Name: \" + firstPatient.getName() + \" Age: \"\n + firstPatient.getAge() + \" illness :\" + firstPatient.getIllness());\n System.out.println(\"\\n\");\n break;\n\n case 2:\n break;\n\n default:\n System.out.println(\"Invalid option selected. Please try again.\");\n }\n } catch (NumberFormatException ex) {\n running = false;\n System.out.println(\"Please enter a valid integer. Error processing input.\");\n }\n }\n }", "public static void main(String[] args) {\n String line;\n Scanner Input = new Scanner(System.in);\n ui.showIntroMessage();\n try {\n loadFile();\n } catch (FileNotFoundException e) {\n ui.showToUser(\"File Not Found\", \"Creating new file...\");\n }\n line = Input.nextLine();\n boolean inSystem = !line.equals(\"bye\");\n while (inSystem) {\n String[] words = line.split(\" \");\n boolean isList = words[0].equals(\"list\");\n boolean isDone = words[0].equals(\"done\");\n boolean isTodo = words[0].equals(\"todo\");\n boolean isDeadline = words[0].equals(\"deadline\");\n boolean isEvent = words[0].equals(\"event\");\n boolean isDelete = words[0].equals(\"delete\");\n boolean isFind = words[0].equals(\"find\");\n try {\n validateInput(words);\n } catch (Exception e) {\n ui.showToUser(e.getMessage());\n line = Input.nextLine();\n inSystem = !line.equals(\"bye\");\n continue;\n }\n if (isList) {\n try {\n validateListInput(words);\n } catch (Exception e) {\n ui.showToUser(e.getMessage());\n line = Input.nextLine();\n inSystem = !line.equals(\"bye\");\n continue;\n }\n printList();\n } else if (isDone) {\n int taskNumber = Integer.parseInt(words[1]) - 1;\n Tasks.get(taskNumber).taskComplete();\n ui.showToUser(ui.DIVIDER, \"Nice! I've marked this task as done:\\n\" + \" \" + Tasks.get(taskNumber).toString(), ui.DIVIDER);\n } else if (isDelete) {\n int taskNumber = Integer.parseInt(words[1]) - 1;\n ui.showToUser(ui.DIVIDER, \"Noted. I've removed this task:\\n\" + Tasks.get(taskNumber).toString());\n Tasks.remove(taskNumber);\n ui.showToUser(\"Now you have \" + Tasks.size() + \" tasks in the list.\", ui.DIVIDER);\n } else if (isTodo) {\n try {\n validateToDoInput(words);\n } catch (Exception e) {\n ui.showToUser(e.getMessage());\n line = Input.nextLine();\n inSystem = !line.equals(\"bye\");\n continue;\n }\n line = line.replace(\"todo \", \"\");\n ToDo toDo = new ToDo(line);\n Tasks.add(toDo);\n printTaskAdded();\n } else if (isDeadline) {\n line = line.replace(\"deadline \", \"\");\n words = line.split(\"/by \");\n Deadline deadline = new Deadline(words[0], words[1]);\n Tasks.add(deadline);\n printTaskAdded();\n } else if (isEvent) {\n line = line.replace(\"event \", \"\");\n words = line.split(\"/at \");\n Event event = new Event(words[0], words[1]);\n Tasks.add(event);\n printTaskAdded();\n } else if (isFind) {\n line = line.replace(\"find \", \"\");\n findTask(line);\n }\n line = Input.nextLine();\n inSystem = !line.equals(\"bye\");\n }\n String file = \"tasks.txt\";\n try {\n saveFile(file);\n } catch (IOException e) {\n ui.showToUser(\"Something went wrong: \" + e.getMessage());\n }\n ui.showExitMessage();\n }", "public static void main(String[] args)\r\n\t{\n\t\tint n = Integer.parseInt(JOptionPane.showInputDialog(\"Please Enter Size Of Array:\"));\r\n\t\tint m = Integer.parseInt(JOptionPane.showInputDialog(\"Please Enter Number Of Threads:\"));\r\n\r\n\t\tint threadIndex = 0;\r\n\r\n\t\t//array of random numbers from 1-100\r\n\t\tint[] arr = new int[n];\r\n\r\n\t\t//ArrayList storage represent the storage of the elements from the array arr\r\n\t\tArrayList<Integer> storage = new ArrayList<>();\r\n\r\n\t\t//initialize object Controller that control and handling all threads methods\r\n\t\tController c = new Controller();\r\n\r\n\t\t//initialize random numbers into array arr with size of n\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t{\r\n\t\t\tarr[i] = 1 + (int) (Math.random() * 100);\r\n\t\t\t//uncomment line below to print numbers in array\r\n\t\t\t//System.out.println(arr[i]);\r\n\t\t}\r\n\r\n\t\t//adding elements from original array to storage\r\n\t\tfor (int i = 0; i < arr.length; i++)\r\n\t\t{\r\n\t\t\tstorage.add(arr[i]);\r\n\t\t}\r\n\r\n\t\t//creating m threads and start them (calling run() method)\r\n\t\twhile(storage.size()>1 && threadIndex < m) {\r\n\t\t\t(new ThreadSum(storage, c)).start();\r\n\t\t} \r\n\r\n\t\t//wait for all threads to finish their work\r\n\t\tc.waitForAll(); \r\n\r\n\t\t//print last element in storage which is the sum\r\n\t\tSystem.out.println(\"Sum is: \" + storage.get(0));\r\n\r\n\t}", "public void run() {\n\t\ttry {\n\t\t\ttryToConnect();\n\t\t\tif(!fromServer.equals(null) && fromServer.equals(\"VALIDATED\")){\n\t\t\t\tmsg(\"Connected Successfully and was Validated\");\n\t\t\t\tClient.updateConnectedClients(id);\n\t\t\t\tmsg(\"connectedClients array index = \" +id+ \" \" +Client.connectedClients[id]);\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmsg(\"Waiting for another session to connect\");\n\t\t\t\twhile(!fromServer.equals(\"VALIDATED\")) tryToConnect();\n\t\t\t}\n\t\t\t\n\t\t\t//validated threads should continue\n\t\t\tfromServer = in.readLine();\n\t\t\twhile(!fromServer.equals(null)){\n\t\t\t\tif(fromServer.equals(\"sorry\"))return; //it's the end of the day, go home\n\t\t\t\tif(fromServer.equals(\"MOVIEPLAYING\")){\n\t\t\t\t\tmsg(\"Am watching movie now.\");\n\t\t\t\t}\n\t\t\t\tif(fromServer.equals(\"done\"))return;\n\t\t\t\tfromServer = in.readLine();\n\t\t\t}\n\t\t\t\t\n\t\n\t\t}catch (UnknownHostException 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\t}", "public void run() {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString cmd;\r\n\t\tRequest.Type t = null;\r\n\t\tString fileName;\r\n\t\tString filePath;\r\n\t\tboolean badDirectory;\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Do you want to run with the error simulator? (y/n)\");\r\n\t\t\tString decision = in.next();\r\n\t\t\tif (decision.equalsIgnoreCase(\"y\"))\r\n\t\t\t{\r\n\t\t\t\tsendPort = ERRSIM_PORT;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse if (decision.equalsIgnoreCase(\"n\"))\r\n\t\t\t{\r\n\t\t\t\tsendPort = SERVER_PORT;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter y/Y or n/N.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t\t\r\n\t\t// Get the IP address or host name from user input\r\n\t\tfor (boolean validHost = false; validHost == false; ) {\r\n\t\t\tSystem.out.println(\"Please enter the IP address of the server:\");\r\n\t\t\tString host = in.next();\r\n\t\t\ttry {\r\n\t\t\t\tsendAddr = InetAddress.getByName(host);\r\n\t\t\t} catch(UnknownHostException e) {\r\n\t\t\t\tSystem.out.println(\"Invalid host name or IP address. Please try again.\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tvalidHost = true;\r\n\t\t}\r\n\t\t\r\n\t\t// Sets the directory for the client\r\n\t\tdo {\r\n\t\t\tbadDirectory = false;\r\n\t\t\tSystem.out.println(\"Please enter the directory that you want to use for the client files:\");\r\n\t\t\tdirectory = in.next();\r\n\t\t\tchar lastChar = directory.charAt(directory.length()-1);\r\n\t\t\tif (!TFTP.isDirectory(directory)) {\r\n\t\t\t\tSystem.out.println(\"Directory does not exist.\");\r\n\t\t\t\tbadDirectory = true;\r\n\t\t\t}\r\n\t\t\telse if (lastChar != '/' && lastChar != '\\\\')\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Valid directory must end with either a '/' or a '\\\\'\");\r\n\t\t\t\tbadDirectory = true;\r\n\t\t\t}\r\n\t\t} while (badDirectory);\r\n\t\tif (verbose) System.out.println(\"The directory you entered is: \" + directory + \"\\n\");\r\n\r\n\t\twhile (true) {\r\n\t\t\tboolean validCmd = false;\r\n\t\t\twhile(!validCmd) {\r\n\t\t\t\t// Get get command\r\n\t\t\t\tSystem.out.println(\"Please enter a command (read/write/exit):\");\r\n\t\t\t\tcmd = in.next();\r\n\t\t\t\t// Quit server if exit command given\r\n\t\t\t\tif (cmd.equalsIgnoreCase(\"exit\")) {\r\n\t\t\t\t\tin.close();\r\n\t\t\t\t\tSystem.out.println(\"Shutting down...\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t} else if (cmd.equalsIgnoreCase(\"read\")) {\r\n\t\t\t\t\tvalidCmd = true;\r\n\t\t\t\t\tt = Request.Type.READ;\r\n\t\t\t\t} else if (cmd.equalsIgnoreCase(\"write\")) {\r\n\t\t\t\t\tvalidCmd = true;\r\n\t\t\t\t\tt = Request.Type.WRITE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalidCmd = false;\r\n\t\t\t\t\tSystem.out.println(\"Invalid command. Valid commands are read, write, and exit.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Get file name\r\n\t\t\tdo {\r\n\t\t\t\tSystem.out.println(\"Please enter the name of the file to transfer:\");\r\n\t\t\t\tfileName = in.next();\r\n\t\t\t\tif (!TFTP.isPathless(fileName))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"File names must not contain a path. The directory that you designated for transfer is: \" + directory);\r\n\t\t\t\t}\r\n\t\t\t} while (!TFTP.isPathless(fileName));\r\n\t\t\tfilePath = directory + fileName;\r\n\t\t\t\r\n\t\t\t// Check if the file exists and file readable on client if WRITE request, otherwise continue loop\r\n\t\t\tif (t == Request.Type.WRITE) {\r\n\t\t\t\tif (TFTP.fileExists(filePath) && !TFTP.isDirectory(filePath)) {\r\n\t\t\t\t\tif (!TFTP.isReadable(filePath)) {\r\n\t\t\t\t\t\t// Echo error message for access violation\r\n\t\t\t\t\t\tSystem.out.println(\"File access violation.\\n\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Echo successful file found\r\n\t\t\t\t\t\tSystem.out.println(\"File found.\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Echo error message for file not found\r\n\t\t\t\t\tSystem.out.println(\"File not found.\\n\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t// For read requests, check if file already exists on the client\r\n\t\t\t} else if (t == Request.Type.READ) {\r\n\t\t\t\tif (TFTP.fileExists(filePath) && !TFTP.isDirectory(filePath)) {\r\n\t\t\t\t\t// Echo error message\r\n\t\t\t\t\tSystem.out.println(\"File already exists.\\n\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Newline\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Make sure packet buffer is clear before processing transfer\r\n\t\t\tif (verbose) System.out.println(\"Clearing socket receive buffer...\");\r\n\t\t\tDatagramPacket throwAwayPacket = TFTP.formPacket();\r\n\t\t\t// Receive packets until a timeout occurs\r\n\t\t\tdo {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsendReceiveSocket.receive(throwAwayPacket);\r\n\t\t\t\t} catch (SocketTimeoutException e) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t} while (true);\r\n\t\t\tif (verbose) System.out.println(\"Socket cleared.\\n\");\r\n\r\n\t\t\t// Send the request\r\n\t\t\ttry {\r\n\t\t\t\tswitch (t) {\r\n\t\t\t\t\tcase READ:\r\n\t\t\t\t\t\tSystem.out.println(\"Reading \" + filePath + \" from server...\");\r\n\t\t\t\t\t\tthis.read(sendAddr, filePath, \"netascii\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase WRITE:\r\n\t\t\t\t\t\tSystem.out.println(\"Writing \" + filePath + \" to server...\");\r\n\t\t\t\t\t\tthis.write(sendAddr, filePath, \"netascii\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid request type. Quitting...\");\r\n\t\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\t// Do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t// Set up Scanner object\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\t// Print welcome message\n\t\tSystem.out.println(\"Welcome to JGRAM.\");\n\t\t\n\t\t// Loop until the user indicates they wish to exit\n\t\tboolean keepGoing = true;\n\t\twhile (keepGoing) {\n\t\t\n\t\t\t// Post1 Task and secret prompt\n\t\t\tSystem.out.println(\"\\n---------------------------------[ INPUT ]--\"\n\t\t\t\t\t+ \"-----------------------------------\\n\");\n\t\t\tString task = prompt(TASK_SELECTION, keyboard);\n\t\t\t\n\t\t\t// Post3 Task execution\n\t\t\tswitch (task) {\n\t\t\t\t\n\t\t\t\t// New Document\n\t\t\t\tcase \"1\":\n\t\t\t\t\tTask newDocTask = new NewDocumentTask(keyboard);\n\t\t\t\t\tnewDocTask.performTask();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Evaluation\n\t\t\t\tcase \"2\":\n\t\t\t\t\tString evalSecret = prompt(GET_SECRET, keyboard);\n\t\t\t\t\tSystem.out.println(SECRET_REMINDER);\n\t\t\t\t\tTask evalTask = new EvaluationTask(evalSecret, keyboard);\n\t\t\t\t\tevalTask.performTask();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Tamper\n\t\t\t\tcase \"3\":\n\t\t\t\t\tString tamperSecret = prompt(GET_SECRET, keyboard);\n\t\t\t\t\tSystem.out.println(SECRET_REMINDER);\n\t\t\t\t\tTask tamperTask = new TamperTask(tamperSecret, keyboard);\n\t\t\t\t\ttamperTask.performTask();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// Report\n\t\t\t\tcase \"4\":\n\t\t\t\t\tTask assignmentReportTask = new AssignmentReportTask(keyboard);\n\t\t\t\t\tassignmentReportTask.performTask();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// Help\n\t\t\t\tcase \"5\":\n\t\t\t\t\thelp();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Exit\n\t\t\t\tcase \"6\":\n\t\t\t\t\tkeepGoing = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Invalid selection\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid selection. Please try again.\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t} // End switch\n\t\t\t\t\t\n\t\t\t\n\t\t} // End while\n\t\t\n\t\tkeyboard.close();\n\t\tSystem.out.println(\"Goodbye...\");\n\t}", "public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}", "@Override\n public void run() {\n try {\n while (this.getState() != Thread.State.TERMINATED) {\n IDataModel dataModel = myDataModelController.getCurrentModel();\n\n if ((dataModel != null) && (!dataModel.isModelChecked())) {\n runAllValidations(dataModel);\n }\n Thread.sleep(CYCLE_SLEEP_TIME);\n }\n } catch (InterruptedException e) {\n // state = Thread.State.TERMINATED;\n this.interrupt();\n }\n }", "private void run() {\n\t\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\t\tint l = sc.nextInt();\n\t\t\t\t\tString s = sc.next();\n\t\t\t\t\tStack<Character> stack = new Stack<>();\n\t\t\t\t\tboolean ok = true;\n\t\t\t\t\tfor(int j=0;j<l && ok;j++) {\n\t\t\t\t\t\tchar cur = s.charAt(j);\n\t\t\t\t\t\tif(isRight(cur)) {\n\t\t\t\t\t\t\tboolean matched = false;\n\t\t\t\t\t\t\twhile(!stack.isEmpty()) {\n\t\t\t\t\t\t\t\tchar a = stack.pop();\n\t\t\t\t\t\t\t\tif(!ispar(a)) continue;\n\t\t\t\t\t\t\t\tif(isMatch(cur, a)) { matched = true; break; }\n\t\t\t\t\t\t\t\telse { ok = false; break; }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!matched) { ok = false; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstack.push(cur);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!stack.isEmpty()) ok = false;\n\t\t\t\t\tif(ok) System.out.println(\"Valid\");\n\t\t\t\t\telse System.out.println(\"Invalid\");\n\t\t\t\t}\n }", "public void run() {\n stopCLI=false;\n if (state==GraphicsManager.State.ASKMAIN)\n {\n askForWhat=4;\n move=null;\n useTool=null;\n if (secondaryState==GraphicsManager.SecondaryState.MOVEACCEPTED)\n moveAccepted();\n if (secondaryState==GraphicsManager.SecondaryState.MOVEREFUSED)\n moveRefused();\n if (secondaryState==GraphicsManager.SecondaryState.TOOLACCEPTED)\n toolAccepted();\n if (secondaryState==GraphicsManager.SecondaryState.TOOLREFUSED)\n toolRefused();\n\n try {\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.getGameScene(threadUpdater.players, threadUpdater.draft, threadUpdater.track, privateObjective, pubObjs, threadUpdater.tools, threadUpdater.activePlayer, threadUpdater.me));\n printOut(cliToolsManager.printSpaces(width));\n printOut(printerMaker.round(threadUpdater.round, threadUpdater.players[threadUpdater.activePlayer].getName()));\n\n if (threadUpdater.disconnected!=null)\n {\n //disconnected Players\n printOut(printerMaker.disconnectedPlayers(threadUpdater.disconnected));\n }\n\n printOut(printerMaker.selectAction());\n readWithExceptions(0,2 );\n\n } catch (InvalidIntArgumentException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n askForWhat=Integer.parseInt(msgIN);\n }\n if(state==GraphicsManager.State.CLIMOVE)\n {\n move = new int[3];\n try {\n System.out.println();\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1, threadUpdater.draft.getSize());\n move[0]=Integer.parseInt(msgIN)-1;\n } catch (IOException e) {\n e.printStackTrace();\n }\n if(!stopCLI)\n {\n try{\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1, 4);\n move[1]=Integer.parseInt(msgIN)-1;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(!stopCLI)\n {\n try{\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1, 5);\n move[2]=Integer.parseInt(msgIN)-1;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }\n if(state==GraphicsManager.State.ASKTOOL6)\n {\n try {\n ToolCardSixEvent event = (ToolCardSixEvent) useTool;\n printOut(cliToolsManager.sceneInitializer(40));\n printOut(printerMaker.getGameScene(threadUpdater.players, threadUpdater.draft, threadUpdater.track, privateObjective, pubObjs, threadUpdater.tools, threadUpdater.activePlayer, threadUpdater.me));\n printOut(cliToolsManager.printSpaces(40));\n printOut(cliToolsManager.simpleQuestionsMaker(\"Il dado in posizione \" + Integer.toString(event.getIndex() + 1) + \" è stato tirato, nuovo valore \" + event.getNewValue(), 40, false));\n printOut(stringCreator.getString( StringCreator.State.FINALPOSX));\n if(!stopCLI) {\n readWithExceptions(1, 4);\n event.setX(Integer.parseInt(msgIN) - 1);\n }\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n if(!stopCLI) {\n readWithExceptions(1, 5);\n event.setY(Integer.parseInt(msgIN) - 1);\n }\n if(!stopCLI)\n useTool=event;\n } catch (InvalidIntArgumentException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(state==GraphicsManager.State.ASKTOOL11)\n {\n if(!stopCLI)\n {\n try{\n ToolCardElevenEvent event = (ToolCardElevenEvent)useTool;\n printOut(cliToolsManager.sceneInitializer(40));\n printOut(printerMaker.getGameScene(threadUpdater.players, threadUpdater.draft, threadUpdater.track, privateObjective, pubObjs, threadUpdater.tools, threadUpdater.activePlayer, threadUpdater.me));\n printOut(cliToolsManager.printSpaces(40));\n printOut(cliToolsManager.simpleQuestionsMaker(\"Dado ripescato, nuovo colore: \" + cliToolsManager.getColor(event.getNewColor()),40 ,false ));\n printOut(cliToolsManager.simpleQuestionsMaker(\"Scegli il nuovo valore del dado\", 40, true));\n\n if(!stopCLI) {\n readWithExceptions(1, 6);\n event.setNewValue(Integer.parseInt(msgIN));\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1, 4);\n event.setX(Integer.parseInt(msgIN) - 1);\n }\n if(!stopCLI) {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Scegli la colonna dove posizionare il dado\", 40, true));\n readWithExceptions(1, 5);\n event.setY(Integer.parseInt(msgIN) - 1);\n }\n if(!stopCLI)\n useTool = event;\n\n } catch (InvalidIntArgumentException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n if(state==GraphicsManager.State.CLITOOL)\n {\n try {\n printOut(stringCreator.getString(StringCreator.State.ASKTOOLCARD));\n readWithExceptionsToolsEdition();\n\n while((Integer.parseInt(msgIN)==5 || Integer.parseInt(msgIN)==12) && threadUpdater.round==0) {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Non puoi usare questo tool al primo round essendo la round track vuota\",40,false));\n readWithExceptionsToolsEdition();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n switch (Integer.parseInt(msgIN))\n {\n case 1:\n {\n if(!stopCLI)\n {\n try {\n ToolCardOneEvent event = new ToolCardOneEvent(1);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1, threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.TOOL1));\n readIt();\n event.setAction(msgIN.charAt(0));\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1, 4);\n event.setX(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1, 5);\n event.setY(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI)\n useTool=event;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 2:\n {\n if(!stopCLI)\n {\n try {\n ToolCardTwoThreeEvent event = new ToolCardTwoThreeEvent(2);\n printOut(stringCreator.getString(StringCreator.State.STARTPOSX));\n readWithExceptions(1, 4);\n event.setX0(Integer.parseInt(msgIN)-1);\n\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.STARTPOSY));\n readWithExceptions(1, 5);\n event.setY0(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1, 4);\n event.setX1(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1, 5);\n event.setY1(Integer.parseInt(msgIN)-1);\n }\n useTool=event;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 3:\n {\n if(!stopCLI)\n {\n try {\n ToolCardTwoThreeEvent event = new ToolCardTwoThreeEvent(3);\n printOut(stringCreator.getString(StringCreator.State.STARTPOSX));\n readWithExceptions(1, 4);\n event.setX0(Integer.parseInt(msgIN)-1);\n\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.STARTPOSY));\n readWithExceptions(1, 5);\n event.setY0(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1, 4);\n event.setX1(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI)\n {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1, 5);\n event.setY1(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI)\n useTool=event;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n break;\n }\n case 4: {\n if(!stopCLI) {\n try {\n\n ToolCardFourEvent event = new ToolCardFourEvent(4);\n printOut(stringCreator.getString(StringCreator.State.STARTPOS1X));\n readWithExceptions(1, 4);\n event.setX01(Integer.parseInt(msgIN)-1);\n\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS1Y));\n readWithExceptions(1, 5);\n event.setY01(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS2X));\n readWithExceptions(1, 4);\n event.setX02(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS2Y));\n readWithExceptions(1, 5);\n event.setY02(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS1X));\n readWithExceptions(1, 4);\n event.setX11(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS1Y));\n readWithExceptions(1, 5);\n event.setY11(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS2X));\n readWithExceptions(1, 4);\n event.setX22(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS2Y));\n readWithExceptions(1, 5);\n event.setY22(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n useTool = event;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n break;\n }\n case 5: {\n if(!stopCLI) {\n try {\n ToolCardFiveEvent event = new ToolCardFiveEvent(5);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1,threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.ROUND));\n readWithExceptions(1, threadUpdater.round);\n event.setTurn(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.ROUNDICE));\n readWithExceptions(1, threadUpdater.track.returnNTurnRoundDice(event.getTurn()).returnDim());\n event.setPos(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1,4 );\n event.setX(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1, 5);\n event.setY(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n useTool = event;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InvalidIntArgumentException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 6: {\n if(!stopCLI) {\n try {\n ToolCardSixEvent event = new ToolCardSixEvent(6);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1, threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n useTool=event;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 7: {\n if(!stopCLI) {\n ToolCardSevenEvent event = new ToolCardSevenEvent(7);\n useTool = event;\n }\n break;\n }\n case 8: {\n if(!stopCLI) {\n try {\n ToolCardEightNineTenEvent event = new ToolCardEightNineTenEvent(8);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1,threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1,4);\n event.setX(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1,5);\n event.setY(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n useTool = event;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 9: {\n if(!stopCLI) {\n try {\n ToolCardEightNineTenEvent event = new ToolCardEightNineTenEvent(9);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1,threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1,4);\n event.setX(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1,5);\n event.setY(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n useTool = event;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 10: {\n if(!stopCLI) {\n try {\n ToolCardEightNineTenEvent event = new ToolCardEightNineTenEvent(10);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1,threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSX));\n readWithExceptions(1,4);\n event.setX(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOSY));\n readWithExceptions(1,5);\n event.setY(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI)\n useTool = event;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 11: {\n if(!stopCLI) {\n try {\n ToolCardElevenEvent event = new ToolCardElevenEvent(11);\n printOut(stringCreator.getString(StringCreator.State.DRAFTPOS));\n readWithExceptions(1, threadUpdater.draft.getSize());\n event.setIndex(Integer.parseInt(msgIN)-1);\n if(!stopCLI)\n useTool = event;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n case 12: {\n if(!stopCLI) {\n try {\n ToolCardTwelveEvent event = new ToolCardTwelveEvent(12);\n printOut(stringCreator.getString(StringCreator.State.ROUNDTOOL12));\n readWithExceptions(1,threadUpdater.track.returnActualTurn());\n event.setTurn(Integer.parseInt(msgIN)-1);\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.ROUNDDICETOOL12));\n readWithExceptions(1,threadUpdater.track.returnNTurnRoundDice(event.getTurn()).returnDim());\n event.setPos(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS1X));\n readWithExceptions(1,4);\n event.setX01(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS1Y));\n readWithExceptions(1,5);\n event.setY01(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS1X));\n readWithExceptions(1,4);\n event.setX11(Integer.parseInt(msgIN)-1);\n }\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS1Y));\n readWithExceptions(1,5);\n event.setY11(Integer.parseInt(msgIN)-1);\n }\n\n if(!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.ASKSECONDDIE));\n readWithExceptions(1, 2);\n }\n\n if (Integer.parseInt(msgIN) == 2)\n event.setOnlyOne(true);\n\n else {\n if (!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS2X));\n readWithExceptions(1, 4);\n event.setX02(Integer.parseInt(msgIN) - 1);\n }\n if (!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.STARTPOS2Y));\n readWithExceptions(1, 5);\n event.setY02(Integer.parseInt(msgIN) - 1);\n }\n if (!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS2X));\n readWithExceptions(1, 4);\n event.setX22(Integer.parseInt(msgIN) - 1);\n }\n if (!stopCLI) {\n printOut(stringCreator.getString(StringCreator.State.FINALPOS2Y));\n readWithExceptions(1, 5);\n event.setY22(Integer.parseInt(msgIN) - 1);\n }\n }\n if(!stopCLI)\n useTool = event;\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InvalidIntArgumentException e) {\n e.printStackTrace();\n }\n }\n break;\n }\n }\n }\n }", "public static void main(String[] args) throws Exception {\n Boolean end = false;\n ArrayList<Room> rooms = new ArrayList<Room>();\n ArrayList<Meeting> meetings = new ArrayList<Meeting>();\n initializeLog();\n\n // To perform operations on RoomSchedular by selecting a case\n while (!end) {\n switch (mainMenu()) {\n case 1:\n logger.info(addRoom(rooms));\n break;\n case 2:\n logger.info(removeRoom(rooms));\n break;\n case 3:\n logger.info(scheduleRoom(rooms));\n break;\n case 4:\n logger.info(listSchedule(rooms));\n break;\n case 5:\n logger.info(listRooms(rooms));\n break;\n case 6:\n logger.info(saveRoomJSON(rooms));\n break;\n case 7:\n logger.info(saveScheduleJSON(rooms));\n break;\n case 8:\n // here i changed room to meeting because in method it is given\n // meeting\n logger.info(saveMeetingJSON(meetings));\n\n break;\n case 9:\n\n logger.info(importRoomJSON());\n\n break;\n case 10:\n logger.info(importScheduleJSON());\n break;\n case 11:\n logger.info(importMeetingJSON());\n break;\n\n default:\n logger.info(\"Invalid case selection\");\n break;\n }\n\n }\n\n }", "public static void main(String[] args) {\n for (int i = 0; i < 5; i++) {\n Thread thread = new Thread(threadGroup, searchTask);\n thread.start();\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n // CHECK THREAD GROUP INFO\n log.info(\"Active count: \" + threadGroup.activeCount());\n log.info(\"Active Group Count: \" + threadGroup.activeGroupCount());\n threadGroup.list();\n\n // THREAD ENUMERATE\n Thread[] threads = new Thread[threadGroup.activeCount()];\n threadGroup.enumerate(threads);\n for (Thread thread : threads) {\n log.info(thread.getName() + \" present state: \" + thread.getState());\n }\n String name = \"€\";\n\n // INTERRUPT THREADS\n //threadGroup.interrupt();\n\n // CHECK RESULT WHEN FINISH\n if(waitFinish(threadGroup)) {\n log.error(\"Result is: \" + result.getName()); //last thread name\n }\n\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\tlatch = new CountDownLatch(2);\r\n\t\tnew InitApp();\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e2) {\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tm = new MainWindow();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e3) {\r\n\t\t\te3.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tm.setVisible(true);\r\n\t\t// Abrimos la ventana principal\r\n\r\n\t\t\r\n\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tif (Main.numTaules == 0)\r\n\t\t\tnew ConfigTablesDialog(latch).setVisible(true);\r\n\t\telse\r\n\t\t\tlatch.countDown();\r\n\t\t\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tm.loadTickets();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tm.resetUIForUpdates();\r\n\t\tm.getTablesFrame().onTableNumChangeCreateButtons();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Abrimos el server\r\n\t\ttry {\r\n\t\t\tMainServer mS = new MainServer(m);\r\n\t\t} catch (ClassNotFoundException | IOException | SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void start(){\r\n\t\tThread cliThread = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tString line= \"1\";\r\n\t\t\t\twhile(!line.equals(\"exit\")) {\r\n\t\t\t\t\tSystem.out.println(\"\\n\");\r\n\t\t\t\t\tfor(String str: commandsSet.keySet())\r\n\t\t\t\t\t\tSystem.out.println(\"* \" + str);\r\n\t\t\t\t\tSystem.out.println(\"\\nEnter command\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tline=in.readLine();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tStringBuilder argusb= new StringBuilder();\r\n\t\t\t\t\t\tStringBuilder command=new StringBuilder();\r\n\t\t\t\t\t\tString[] split=line.split(\" \");\r\n\t\t\t\t\t\tint j=0;\r\n\t\t\t\t\t\tfor (int i =0;i<split.length;i++) {\r\n\t\t\t\t\t\t\tif (split[i].startsWith(\"<\")){\r\n\t\t\t\t\t\t\t\tsplit[i] = split[i].replace(\"<\",\"\");\r\n\t\t\t\t\t\t\t\tsplit[i] = split[i].replace(\">\", \"\");\r\n\t\t\t\t\t\t\t\tsplit[i]= split[i].toLowerCase();\r\n\t\t\t\t\t\t\t\targusb.append(split[i]);\r\n\t\t\t\t\t\t\t\targusb.append(\" \");\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\telse {\r\n\t\t\t\t\t\t\t\tcommand.append(\" \");\r\n\t\t\t\t\t\t\t\tcommand.append(split[i]);\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\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcommand.deleteCharAt(0);\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tcontroller.handleUserCommand(command.toString(),argusb.toString().split(\" \"));\r\n\t\t\t\t\t\t}catch (Exception e){\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\targusb=null;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//out.write(\"The Program closed Good Bye\");\r\n\t\t\t{ try {\r\n\t\t\t\tin.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"The In stream can't be close\");\r\n\t\t\t} \r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\t\r\n\t\t\tcliThread.start();\t\r\n\t\t}", "public static void main(String[] args) {\n\n\t SalesforceDesignTest solution = new SalesforceDesignTest();\n\t try(Scanner sc = new Scanner(System.in))\n\t {\n\t int n = sc.nextInt();\n\t for(int t = 0; t < n; t++) {\n\t String command = sc.nextLine();\n\t while (command.trim().isEmpty())\n\t {\n\t \tcommand = sc.nextLine();\n\t }\n\t \n\t solution.executeTask(command); \n\t }\t\n\t }\n}", "public static void main(String[] args) {\n\t\tnew Thread(new Digit()).start();\n\t\tnew Thread(new Lettre()).start();\n\t}", "public void valid()throws Exception\n\t{ \n\t\tString login=br.readLine();\n\t\tboolean alertlogin=true;\n\t\twhile(alertlogin)\n\t\t{\n\t\t\tif(login.equalsIgnoreCase(\"register\"))//if Client select register\n\t\t\t{\n\t\t\tString name=br.readLine();\n \n if(serve.nameandpass.containsKey(name))\n\t\t {\n\t\t \t//Push Notification\n\t\t \tSystem.out.println(\"Already Exist Try Another One\");\n\t\t }\t\n\t\t else\n\t\t {\n\t\t \t//Successfull Added\n\t\t \tString pass=br.readLine();\n\t\t \tserve.nameandpass.put(name,pass);\n\t\t \t\n\t\t // Push Notification \n\t\t \tSystem.out.println(\"Succesfull Register\");\n\t\t }\n\t\t\t}\n\n\n\t\t\telse if(login.equalsIgnoreCase(\"LogIn\"))//if client select old user\n\t\t\t{\n\t\t\tboolean validuser=true;\n\t\t\tboolean validpass=true;\n\t\t\t//Old User Chat Page\n\t\t\twhile(validuser)\n\t\t\t{\n\t\t\t String name=br.readLine();\n\t\t\t String pass=br.readLine();\n\n\t\t\t\tif(serve.nameandpass.containsKey(name))\n\t\t\t\t\t{ \n\t\t\t\t\t\tvaliduser=false;\n while(validpass){\n\t\t\t\t\t\t\t\t\t\tif(serve.nameandpass.get(name).equals(pass))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tvalidpass=false;\n alertlogin=false;\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Welcome Again\");\n\t\t\t\t\t\t\t\t\t\t\t\tMessage msg=new Message(s);\n\t\t\t\t\t\t\t\t\t\t\t\tmsg.run();\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t//Class Third Initate\n\t\t\t\t\t\t\t\t\t\t\t\t//Give A new Thread \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Enter Password Again\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tSystem.out.println(\"Not a valid username or not found in database\");\n\t\t\t }\n\t\t }\n\t\t\t}\n\n }\n\n\t}", "public void execute() {\n String input;\n boolean isInputValid;\n\n do {\n isInputValid = true;\n\n System.out.print(\"Please send me the numbers using space between them like \\\"1 2 3\\\": \");\n input = sc.nextLine();\n\n try {\n validateData(input);\n } catch (NumberFormatException e) {\n System.err.println(\"NumberFormatException \" + e.getMessage());\n isInputValid = false;\n }\n\n } while (!isInputValid);\n\n System.out.println(\"Result: \" + find(input));\n }", "void run() throws Exception {\n // you can alter this method if you need to do so\n IntegerScanner sc = new IntegerScanner(System.in);\n PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\n int TC = sc.nextInt(); // there will be several test cases\n while (TC-- > 0) {\n V = sc.nextInt();\n\n // clear the graph and read in a new graph as Adjacency List\n AdjList = new Vector < Vector < IntegerPair > >();\n for (int i = 0; i < V; i++) {\n AdjList.add(new Vector < IntegerPair >());\n\n int k = sc.nextInt();\n while (k-- > 0) {\n int j = sc.nextInt(), w = sc.nextInt();\n AdjList.get(i).add(new IntegerPair(j, w)); // edge (road) weight (in minutes) is stored here\n }\n }\n\n PreProcess(); // optional\n\n Q = sc.nextInt();\n while (Q-- > 0)\n pr.println(Query(sc.nextInt(), sc.nextInt(), sc.nextInt()));\n\n if (TC > 0)\n pr.println();\n }\n\n pr.close();\n }", "public static void main(String[] args) {\n\n ArrayList<String> lstNames = null;\n try {\n\n lstNames = readFromFile_getNamesList();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n\n\n CountDownLatch latch = new CountDownLatch(1);\n MyThread threads[] = new MyThread[1000];\n for(int i = 0; i<threads.length; i++){\n\n threads[i] = new MyThread(latch, lstNames);\n }\n for(int i = 0; i<threads.length; i++){\n threads[i].start();\n }\n latch.countDown();\n for(int i = 0; i<threads.length; i++){\n try {\n threads[i].join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n try {\n System.out.println(\"Sleeeeeeeping....\");\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n latch = new CountDownLatch(1);\n MyThread threads2[] = new MyThread[1000];\n for(int i = 0; i<threads2.length; i++){\n threads2[i] = new MyThread(latch, lstNames);\n }\n for(int i = 0; i<threads2.length; i++){\n threads2[i].start();\n }\n latch.countDown();\n }", "public static void main(String argv[]) throws NumberFormatException, IOException {\r\n IntConsumer printNumber = new IntConsumer();\r\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\r\n String line = null;\r\n while ((line = in.readLine()) != null) {\r\n int number = Integer.parseInt(line);\r\n ZeroEvenOdd thread012 = new ZeroEvenOdd(number);\r\n Thread t0 = new Thread() {\r\n public void run(){\r\n try {\r\n thread012.zero(printNumber);\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n };\r\n Thread t1 = new Thread() {\r\n public void run(){\r\n try {\r\n thread012.odd(printNumber);\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n };\r\n Thread t2 = new Thread() {\r\n public void run(){\r\n try {\r\n thread012.even(printNumber);\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n };\r\n t0.start();\r\n t1.start();\r\n t2.start();\r\n try {\r\n t0.join();\r\n t1.join();\r\n t2.join();\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\tint[] featuresRemoved = new int[]{14,15,0,3,7,8,9,13}; //removed age,education,relationship,race,sex,country\n\t\t\n\t\tCrossValidation.Allow_testSet_to_be_Appended = true;\n\t\tDataManager.SetRegex(\"?\");\n\t\tDataManager.SetSeed(0l); //debugging for deterministic random\n\t\t\n\t\tArrayList<String[]> dataSet = DataManager.ReadCSV(\"data/adult.train.5fold.csv\",false);\n\t\tdataSet = DataManager.ReplaceMissingValues(dataSet);\n\t\tDoubleMatrix M = DataManager.dataSetToMatrix(dataSet,14);\n\t\tList<DoubleMatrix> bins = DataManager.split(M, 15);\n\t\t//List<DoubleMatrix> bins = DataManager.splitFold(M, 5,true); //random via permutation debugging\n\t\t\n\t\tArrayList<String[]> testSet = DataManager.ReadCSV(\"data/adult.test.csv\",false);\n\t\ttestSet = DataManager.ReplaceMissingValues(testSet);\n\t\tDoubleMatrix test = DataManager.dataSetToMatrix(testSet,14);\n\t\tList<DoubleMatrix> testBins = DataManager.splitFold(test, 8, false);\n\t\t\n\t\t\n\t\t//initiate threads \n\t\tint threadPool = 16;\n\t\tExecutorService executor = Executors.newFixedThreadPool(threadPool);\n\t\tList<Callable<Record[]>> callable = new ArrayList<Callable<Record[]>>();\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis(); //debugging - test for optimisation \n\t\t\n\t\t\n\t\t\n\t\t//unweighted\n\t\tSystem.out.println(\"Validating Unweighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\t\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,false);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> unweightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tunweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\t\n\t\n\t\tcallable.clear();\n\t\t\n\t\t\n\t\t\n\t\t//weighted\n\t\tSystem.out.println(\"Validating Weighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,true);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> weightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find best parameter \n\t\tint bestKNN = 0;\n\t\tdouble bestAccuracy = 0;\n\t\tboolean weighted = false;\n\t\tint validationIndex = 0;\n\t\tfor(int i = 0; i < unweightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < unweightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ unweightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = unweightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy > bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = false;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : unweighted : \" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : unweighted : \" + currentAccuracy);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < weightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < weightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ weightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = weightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy >= bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = true;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : weighted :\" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : weighted :\" + currentAccuracy);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t\n\t\tList<Record[]> bestValidation = new ArrayList<Record[]>();\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tif(weighted) {\n\t\t\t\tbestValidation.add(new Record[]{ weightedRecords.get(i)[validationIndex]});\n\t\t\t} else {\n\t\t\t\tbestValidation.add(new Record[]{ unweightedRecords.get(i)[validationIndex]});\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Testing...\");\n\t\t\n\t\t//KNN on test set\n\t\tcallable.clear();\n\t\t\n\t\t//build worker threads\n\t\tfor(int i = 0; i < testBins.size(); i++) {\n\t\t\tCrossValidation fold = new CrossValidation(M, testBins.get(i),14,featuresRemoved,bestKNN,bestKNN,weighted);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\tList<Record[]> testRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\ttestRecords.add(recordFold.get());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tint[][] testM = DataManager.combineMat(testRecords);\n\t\tdouble testAccuracy = DataManager.getAccuracy(testM);\n\t\t//double teststd = DataManager.GetStd(testRecords);\n\t\t\n\t\t//print stuff\n\t\tSystem.out.println(bestKNN + \" : \"+ weighted + \" : \" + testAccuracy);\n\t\tSystem.out.println(testM[0][0] + \", \" + testM[0][1] +\", \" + testM[1][0] + \", \" + testM[1][1]);\n\t\t\n\t\t//delete all worker threads\n\t\texecutor.shutdownNow();\n\t\t\n\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tlong totalTime = endTime - startTime;\n\t\tSystem.out.println(\"Run time(millisecond): \" + totalTime );\n\t\tSystem.out.println(\"Thread pool: \" + threadPool );\n\t\tSystem.out.println(\"Cores: \" + Runtime.getRuntime().availableProcessors());\n\t\t\n\t\t//prints to file\n\t\tDataManager.saveRecord(\"data/grid.results.txt\", 14, featuresRemoved,\"<=50k\", bestKNN, weighted, bestValidation, testRecords, testRecords.get(0)[0].classType, 5, totalTime, threadPool);\n\t}", "public static void main(String []args) {\n\t\t/*\n\t\t * The user will be shown two options:\n\t\t * Exit from the system by pressing 0.\n\t\t * OR\n\t\t * Enabling user to enter credential information(Email Id and Password) by pressing 1.\n\t\t * If user enters any other key Invalid choice will be displayed and again user will be given two choices.\n\t\t * */\n\t\tboolean run = true;\n\t\twhile(run) {\n\t\t\tviewOptions();\n\t\t\ttry {\n\t\t\t\tint option = sc.nextInt();\n\t\t\t\tswitch(option) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t//If user enters 0 terminate the while loop by making run = false.\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t//Try to login into the system\n\t\t\t\t\t\tattemptToLogin();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tlog.error(\"Invalid Choice!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//If user tries to enter non numeric characters exception will be thrown and will caught below.\n\t\t\tcatch(InputMismatchException e){\n\t\t\t\tlog.error(\"Invalid Choice!\");\n\t\t\t}\t\t\n\t\t}\n\t}", "public void start() {\r\n\t\tboolean running = true;\r\n\t\twhile(running) {\r\n\t\t\t// Storage variable for user input\r\n\t\t\tString userInput = null;\r\n\t\t\tString[] systemOutput = null;\r\n\t\t\t\r\n\t\t\t// Check first input\r\n\t\t\tuserInput = getUserFirstInput(input);\r\n\t\t\t\r\n\t\t\t// If first prompt is valid, process accordingly\r\n\t\t\tif(userInput != null) {\r\n\t\t\t\tswitch(userInput) {\r\n\t\t\t\t\tcase \"0\": \r\n\t\t\t\t\t\tSystem.out.println(\"Thanks for using!\");\r\n\t\t\t\t\t\trunning = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"1\", null);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\tuserInput = getUserPartialOrFull(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"2\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"3\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"4\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"5\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"5\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"6\":\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"6\", null);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Print the output\r\n\t\t\t\tif(systemOutput != null) {\r\n\t\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\t\tSystem.out.println(\"BEGIN OUTPUT\");\r\n\t\t\t\t\tfor(String str : systemOutput) {\r\n\t\t\t\t\t\tSystem.out.println(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"END OUTPUT\");\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\tinput.close();\r\n\t}", "public void run() {\n\t\tboolean flag = true;\n\t\t\n\t\t//Testing if all the threads are initialized with some random value.\n\t\twhile(flag) {\n\t\t\tflag = false;\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tif(GlobalInfo.inputs[i]==-1)\n\t\t\t\t\tflag = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint[] snapshot = new int[10];\n\t\tint[] sortedSnapshot;\n\t\t\t\t\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\t//Checking if queue is empty or not\n\t\t\tif(GlobalInfo.pipeLine.peek() != null)\n\t\t\t{\n\t\t\t\tsnapshot = GlobalInfo.pipeLine.poll();\n\t\t\t\t\n\t\t\t\t//printing snapshot\n\t\t\t\tSystem.out.format(\"The snapshot is: \");\n\t\t\t\tfor (int i = 0; i < snapshot.length; i++) {\n\t\t\t\t\tSystem.out.format(\"%d,\", snapshot[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\tsortedSnapshot = Arrays.copyOf(snapshot, snapshot.length);\n\t\t\t\t\n\t\t\t\tSortHelper.sortForkAndJoin(sortedSnapshot);\n\t\t\t\t\n\t\t\t\t//printing sorted snapshot\n\t\t\t\tSystem.out.format(\"The sorted snapshot is: \");\n\t\t\t\tfor (int i = 0; i < sortedSnapshot.length; i++) {\n\t\t\t\t\tSystem.out.format(\"%d,\", sortedSnapshot[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\tGlobalInfo.completeThreads=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Performing fusion of data and validating results\n\t\t\t\tfuseAdd1 adder = new fuseAdd1(sortedSnapshot);\n\t\t\t\tThread adderThread = new Thread(adder);\n\t\t\t\tadderThread.start();\n\t\t\t\t\n\t\t\t\tfuseMultiply1 multiplier = new fuseMultiply1(sortedSnapshot);\n\t\t\t\tThread multiplierThread = new Thread(multiplier);\n\t\t\t\tmultiplierThread.start();\n\t\t\t\t\n\t\t\t\tfuseAverage1 averager = new fuseAverage1(sortedSnapshot);\n\t\t\t\tThread averagerThread = new Thread(averager);\n\t\t\t\taveragerThread.start();\n\t\t\t\t\n\t\t\t\twhile(GlobalInfo.completeThreads < 3){\n\t\t\t\t\t//wait for all three fusions to take place.\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\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\t\n\t\t}\n\t}", "@Override\n public void run() {\n\n\n\n System.out.println(\"run scheduled jobs.\");\n\n\n checkBlackOutPeriod();\n\n\n\n checkOfficeActionPeriod1();\n\n checkAcceptedFilings();\n\n checkNOAPeriod();\n checkFilingExtensions();\n\n\n\n }", "public static void run() {\n try {\n //recreating tables added to update csv data without application restart\n new SqlUtility().setConnection().dropAllTables().createPersonTable().createRecipientTable();\n new CsvPersonParser().run();\n new CsvReсipientParser().run();\n\n List<Person> list;\n list = new SqlUtility().setConnection().grubData();\n String result = \"\";\n result = ListToMessage.converter(list);\n if(!\"\".equals(result)) {\n NotificationSender.sender(result, email, pass, addressList);\n }\n } catch (ClassNotFoundException e){e.printStackTrace();}\n catch (SQLException ee){ee.printStackTrace();}\n catch (ParseException eee) {eee.printStackTrace();}\n\n }", "public static void main(String[] args)\n throws InterruptedException\n {\n // Defining threads to accept the jobs\n // ----------------------------------------------------------\n Thread thread1 = new Intermediate(10, \"INT01\");// Instantiate thread1\n Thread thread2 = new Intermediate(50, \"INT02\");// Instantiate thread2\n Thread thread3 = new CPUBound(60, \"CPU01\");// Instantiate thread3\n Thread thread4 = new CPUBound(70, \"CPU02\");// Instantiate thread4\n Thread thread5 = new IOBound(System.in, \"IO01\");// Instantiate thread5\n Thread thread6 = new IOBound(System.in, \"IO02\");// Instantiate thread6\n Thread thread7 = new Intermediate(82, \"INT03\");// Instantiate thread7\n Thread thread8 = new CPUBound(80, \"CPU03\");// Instantiate thread8\n\n // Creating a ArrayList of threads and adding the jobs to the ArrayList\n // ----------------------------------------------------------\n ArrayList<Thread> threadList = new ArrayList<Thread>();\n threadList.add(thread1);\n threadList.add(thread2);\n threadList.add(thread3);\n threadList.add(thread4);\n threadList.add(thread5);\n threadList.add(thread6);\n threadList.add(thread7);\n threadList.add(thread8);\n\n // Creating a FCFS object and running it with the created ArrayList\n // object\n // ----------------------------------------------------------\n FCFS fcfs = new FCFS(threadList);\n fcfs.run();\n\n // Displaying the results of the FCFS run\n // ----------------------------------------------------------\n\n System.out.println(\"----------------FCFS-----------------------------\");\n for (String key : fcfs.getRun_times().keySet())\n System.out.println(key + \" => \" + fcfs.getRun_times().get(key));\n System.out.println(\"-------------------------------------------------\");\n\n // Defining a Hash Map with key Long and value Thread. To pair\n // each unique time with a process\n // ----------------------------------------------------------\n Map<Long, Thread> threadList2 = new HashMap<Long, Thread>();\n threadList2.put(fcfs.getRun_times().get(thread1.getName()), thread1);\n threadList2.put(fcfs.getRun_times().get(thread2.getName()), thread2);\n threadList2.put(fcfs.getRun_times().get(thread3.getName()), thread3);\n threadList2.put(fcfs.getRun_times().get(thread4.getName()), thread4);\n threadList2.put(fcfs.getRun_times().get(thread5.getName()), thread5);\n threadList2.put(fcfs.getRun_times().get(thread6.getName()), thread6);\n threadList2.put(fcfs.getRun_times().get(thread7.getName()), thread7);\n threadList2.put(fcfs.getRun_times().get(thread8.getName()), thread8);\n\n // Creating a SJF object and running it with the created ArrayList\n // object\n // ----------------------------------------------------------\n SJF sjf = new SJF(threadList2);\n sjf.run();\n\n // Displaying the results of the SJF run\n // ----------------------------------------------------------\n System.out.println(\"-----------------SJF-----------------------------\");\n for (String key : sjf.getRun_times().keySet())\n System.out.println(key + \" => \" + sjf.getRun_times().get(key));\n System.out.println(\"-------------------------------------------------\");\n\n // Creating a RoundRobin object and running it with the previously\n // created ArrayList object holding our processes.\n // ----------------------------------------------------------\n RoundRobin roundRobin = new RoundRobin(threadList);\n roundRobin.run();\n\n // Displaying the results of the RoundRobin run\n // ----------------------------------------------------------\n System.out.println(\"-----------------Round Robin---------------------\");\n for (String key : roundRobin.getRun_times().keySet())\n System.out.println(key + \" => \" + sjf.getRun_times().get(key));\n System.out.println(\"-------------------------------------------------\");\n\n }", "public static void inputs() {\n Core.init(true);\n\n while (running) {\n String input = Terminal.readLine();\n String[] groups = REG_CMD.createGroups(input);\n String[] groupsAdmin = REG_ADMIN.createGroups(input);\n String[] groupsLogin = REG_LOGIN.createGroups(input);\n String arg;\n\n //Set the regex type depending on input\n if (groups[1] == null && groupsAdmin[1] != null && groupsLogin[1] == null)\n arg = groupsAdmin[1];\n else if (groups[1] == null && groupsAdmin[1] == null && groupsLogin[1] != null)\n arg = groupsLogin[1];\n else\n arg = groups[1];\n\n if (arg != null && (REG_CMD.isValid(input) || REG_ADMIN.isValid(input) || REG_LOGIN.isValid(input))) {\n if (Core.getSystem().adminActive()) {\n inputsLogin(arg, groups);\n } else {\n inputsNoLogin(arg, groups, groupsAdmin, groupsLogin);\n }\n }\n else {\n Terminal.printError(\"command does not fit pattern.\");\n }\n }\n }", "public static void main(String [] args){\n MainController run = new MainController();\n int value = run.filesExist();\n if (value == 0) {\n run.fileQUserMssgExists();\n }\n else if (value == 1) {\n run.fileQUserMssgRoomsExists();\n }\n else if (value == 2) {\n run.fileQAllExists();\n }\n run.run(value);\n }", "@Override\n\tpublic void run(){\n\t\twhile(keepGoing){\n\t\t\ttry {\n\t\t\t\tString data = input.readUTF();\n\t\t\t\tStringTokenizer st = new StringTokenizer(data);\n\t\t\t\tString cmd = st.nextToken();\n\t\t\t\tswitch(cmd){\n\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * Receive a File Sharing request\n\t\t\t\t\t */\n\t\t\t\t\tcase \"cmd_receiverequest_file\": // format: ([cmd_receiverequest_file] [from] [filename] [size]) \n\t\t\t\t\t\tgetReceiveFileRequest(st);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tJOptionPane.showMessageDialog(main, \"Unknown Command '\"+ cmd +\"' in MainThread\", \"Unknown\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(main, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tkeepGoing = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"MainThread was closed.!\");\n\t}", "public static void main(String[] args) {\n\n\t\tint t; // No. of test cases\n\t\tint n; // No. of students\n\t\tint k = 0; // cancellation threshold\n\t\tint numOfStudentsPresent = 0;\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tt = in.nextInt();\n\t\tboolean validNoOfTests = t >= 1 && t <= 10;\n\n\t\tif (validNoOfTests) {\n\t\t\tfor (int i = 0; i < t; i++) {\n\n\t\t\t\tn = in.nextInt();\n\t\t\t\tk = in.nextInt();\n\n\t\t\t\tboolean valid_n_k = n >= 1 && n <= 1000 && k >= 1 && k <= n;\n\t\t\t\tif (valid_n_k) {\n\t\t\t\t\tnumOfStudentsPresent = checkThresholds(in, n, k);\n\n\t\t\t\t}\n\n\t\t\t\tgetClassStatus(k, numOfStudentsPresent);\n\t\t\t}\n\n\t\t}\n\n\t\tin.close();\n\t\t\n\t\tprintStatus(cancelledStatus);\n\n\t}", "public static void main(String[] args) {\n int threadNum = 3;\n\n for (int i = 0; i < threadNum; i++) {\n\n// System.out.println(\"Please enter a topic for publisher \" + i + \" : \");\n// String topic = scan.nextLine();\n// System.out.println(\"Please enter a name for publisher \" + i + \" : \");\n// String name = scan.nextLine();\n// System.out.println(\"Please specify how many messages this publisher should send: \");\n// int messageNum = scan.nextInt();\n PubClientThread thread = new PubClientThread(\"Topic\" + i / 2, \"Pub\" + i, 10000);\n new Thread(thread).start();\n }\n }", "@Override\n\tpublic void run() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tSystem.out.println(\"Reading current input status message\");\n\n\t\t\tBufferedReader br = null;\n\t\t\tStatusInputMsg newMsg = new StatusInputMsg();\n\t\t\ttry {\n\n\t\t\t\tString currentLine;\n\t\t\t\tint inputType = 0;\n\n\t\t\t\tURL filePath = Producer.class.getResource(\"input.txt\");\n\t\t\t\tFile f = new File(filePath.getFile());\n\t\t\t\tbr = new BufferedReader(new FileReader(f));\n\t\t\t\t\n\t\t\t\twhile ((currentLine = br.readLine()) != null) {\n\t\t\t\t\tSystem.out.println(currentLine);\n\t\t\t\t\tif (\"# Section: Conveyor System\".equals(currentLine )) {\n\t\t\t\t\t\tif(!newMsg.isEmpty()){\n\t\t\t\t\t\t\tnewMsg.createFlightToGateMapping();\n\t\t\t\t\t\t\tStatusInputMsg pCopy = new StatusInputMsg();\n\t\t\t\t\t\t\tpCopy.copy(newMsg);\n\t\t\t\t\t\t\tqueue.put(pCopy);\n\t\t\t\t\t\t\tnewMsg.clear();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Following Sleep can be varied to see the effect of processing speed\n\t\t\t\t\t\t\t//on the input capacity planning. Basically we can vary the speed with which\n\t\t\t\t\t\t\t//input is coming.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinputType = 1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (\"# Section: Departures\".equals(currentLine )) {\n\t\t\t\t\t\tinputType = 2;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (\"# Section: Bags\".equals(currentLine )) {\n\t\t\t\t\t\tinputType = 3;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch(inputType){\n\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tString[] line1 = currentLine.split(\" \");\n\t\t\t\t\t\tPath path = new Path(line1[0], line1[1], Integer.parseInt(line1[2]));\n\t\t\t\t\t\tnewMsg.getCurrEdge().add(path);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tString[] line2 = currentLine.split(\" \");\n\t\t\t\t\t\tDepartureFlight dp = new DepartureFlight(line2[0], line2[1], line2[2], line2[3]);\n\t\t\t\t\t\tnewMsg.getCurrFlightStatus().add(dp);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tString[] line3 = currentLine.split(\" \");\n\t\t\t\t\t\tBaggage baggage = new Baggage(line3[0], line3[1], line3[2]);\n\t\t\t\t\t\tnewMsg.getCurrBaggage().add(baggage);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (br != null)br.close();\n\t\t\t\t\tif(!newMsg.isEmpty()){\n\t\t\t\t\t\tnewMsg.createFlightToGateMapping();\n\t\t\t\t\t\tStatusInputMsg pCopy = new StatusInputMsg();\n\t\t\t\t\t\tpCopy.copy(newMsg);\n\t\t\t\t\t\tqueue.put(pCopy);\n\t\t\t\t\t\tnewMsg.clear();\n\t\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void run() {\n\t\t\tString clientMessage;\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t// Read instruction\n\t\t\t\t\tclientMessage = reader.readLine();\n\t\t\t\t\taddText(clientMessage + \": \");\n\t\t\t\t\t\n\t\t\t\t\t// User input \n\t\t\t\t\tif(clientMessage.equals(\"User input\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tuserInput2 = reader.readLine();\n\t\t\t\t\t\taddText(userInput2);\n\t\t\t\t\t\t// Check whether all UserInput match\n\t\t\t\t if(!userInput2.equals(\"No word\"))// user must input\n\t\t\t\t {\n\t\t\t\t \tanswer.add(userInput2);// Add to answer pool\n\t\t\t\t \tif(answer.size() >= connectionPool.size())// All user has inputed, Check answer\n\t\t\t\t \t{\n\t\t\t\t \t\tboolean same = true;\n\t\t\t\t \t\tString s = answer.get(0);\n\t\t\t\t \t\tfor(String i : answer)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\tif(!s.equals(i))\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tsame = false;\n\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t\t// If all same , than correct\n\t\t\t\t \t\tif(same)\n\t\t\t\t \t\t\tcorrect(true);\n\t\t\t\t \t\telse\n\t\t\t\t \t\t\tcorrect(false);\n\t\t\t\t \t\t// Clear answer pool\n\t\t\t\t \t\tanswer.clear();\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n DrawCanvas canvas;\n TicTacToeGui ttgui = new TicTacToeGui();\n \n /**CUI prompt user information to save accounts\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Enter your username: \");\n String user = scanner.nextLine();\n System.out.print(\"Enter your password: \");\n String userpw = scanner.nextLine();\n Accounts users = ttgui.checkUser(user,userpw); **/\n \n }\n });\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Enter your action:\");\n\n\t\tSystem.out.println(\"1->Data Generation\" + \"\\n2->Commit Change Analysis and Import Full Log\"\n\t\t\t\t+ \"\\n3->Differential Log Analysis and Import\" + \"\\n4->Perform Fault Localization on Full Log\"\n\t\t\t\t+ \"\\n5->Perform Fault Localization on Differenttial Log\"\n\t\t\t\t+ \"\\n6->Perform Fault Localization on Differenttial Log + File Change\" + \"\\n7->For Logging\"\n\t\t\t\t+ \"\\n8->Log Fail Part Line Similarity Generator\"\n\t\t\t\t+ \"\\n9->Perform Fault Localization on Fail Part Log with Similarity Limit\"\n\t\t\t\t+ \"\\n10->Build Dependency Analysis\" + \"\\n11->Log Analysis\" + \"\\n12->ASTParser Checking\"\n\t\t\t\t+ \"\\n13->Analyze Result\" + \"\\n14->Generate Similarity on Build Dependency Graph\"\n\t\t\t\t+ \"\\n21->Param Tunning for DiffFilter\" + \"\\n22->Set Tunning Dataset Tag\"\n\t\t\t\t+ \"\\n23->Set Failing Type\"\n\t\t\t\t\n\t\t\t\t+ \"\\n31->Performance Analysis for Reverting File\" \n\t\t\t\t+ \"\\n32->Full Log Based\" \n\t\t\t\t+ \"\\n33->Full Log AST Based\"\n\t\t\t\t+ \"\\n34->Diff filter+Dependency+BoostScore\" \n\t\t\t\t+ \"\\n35->Diff filter+Dependency\"\n\t\t\t\t+ \"\\n36->Diff filter+BoostScore\" \n\t\t\t\t+ \"\\n37->Full Log+Dependency+BoostScore\"\n\t\t\t\t+ \"\\n38->Baseline(Saha et al){Fail Part Log+Java File Rank+Then Gradle Build Script}\"\n\t\t\t\t+ \"\\n39->All Evaluation Experiment\"\n\t\t\t\t+ \"\\n41->Strace Experiment\");\n\n\t\t// create an object that reads integers:\n\t\tScanner cin = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Enter an integer: \");\n\t\tint inputid = cin.nextInt();\n\n\t\tif (inputid == 1) {\n\t\t\tdataFiltering();\n\t\t} else if (inputid == 2) {\n\t\t\tcommitChangeAnalysis();\n\t\t} else if (inputid == 3) {\n\t\t\tgenDifferentialBuildLog();\n\t\t} else if (inputid == 4) {\n\t\t\tgenerateSimilarity();\n\t\t\t// generateSimilarityDifferentialLog();\n\t\t\t// genSimDifferentialLogOnChange();\n\t\t} else if (inputid == 5) {\n\t\t\tgenerateSimilarityDifferentialLog();\n\t\t} else if (inputid == 6) {\n\t\t\tgenSimDifferentialLogOnChange();\n\t\t} else if (inputid == 7) {\n\t\t\tgenSimDifferentialLogOnChangeForLogging();\n\t\t} else if (inputid == 8) {\n\t\t\tgenerateStoreFailPartSimValue();\n\t\t} else if (inputid == 9) {\n\t\t\tgenSimFailLogPartWithSimLimit();\n\t\t} else if (inputid == 10) {\n\t\t\tgenerateBuildDependencyTree();\n\t\t} else if (inputid == 11) {\n\t\t\tgenerateLogForAnalysis();\n\t\t} else if (inputid == 12) {\n\t\t\tastParserChecker();\n\t\t} else if (inputid == 13) {\n\t\t\tperformResultAnalysis();\n\t\t} else if (inputid == 14) {\n\t\t\tgenerateSimilarityWithDependency();\n\n\t\t}\n\t\t// this is for 6,8,9,13 menu runnning together for analysis\n\t\telse if (inputid == 21) {\n\t\t\tparameterTunningDiffFilter();\n\t\t} else if (inputid == 22) {\n\t\t\tTunningDTSetter dtsetter = new TunningDTSetter();\n\t\t\ttry {\n\t\t\t\tdtsetter.setTunningDataTags(100);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t;\n\n\t\t}\n\t\telse if(inputid==23)\n\t\t{\n\t\t\tGenerateTestFailType typesetobj=new GenerateTestFailType();\n\t\t\ttypesetobj.generateFailType();\n\t\t}\n\n\t\telse if (inputid == 31) {\n\t\t\tEvaluationMgr.FixWithBuildFailChangeEval();\n\t\t} else if (inputid == 32) {\n\t\t\tEvaluationMgr.FullLogFaultLocalizationEval();\n\t\t} else if (inputid == 33) {\n\t\t\tEvaluationMgr.FullLogASTFaultLocalizationEval();\n\t\t} else if (inputid == 34) {\n\t\t\tEvaluationMgr.DiffFilterDependencyWithBoostScoreSimEval();\n\t\t} else if (inputid == 35) {\n\t\t\tEvaluationMgr.DiffFilterDependencySimEval();\n\t\t} else if (inputid == 36) {\n\t\t\tEvaluationMgr.DiffFilterBoostScoreSimEval();\n\t\t} else if (inputid == 37) {\n\t\t\tEvaluationMgr.FullLogDependencyBoostScoreSimEval();\n\t\t} else if (inputid == 38) {\n\t\t\tEvaluationMgr.BaseLineForISSTA();\n\t\t} \n\t\telse if((inputid == 39))\n\t\t{\n\t\t\tEvaluationMgr.FixWithBuildFailChangeEval();\n\t\t\tEvaluationMgr.FullLogFaultLocalizationEval();\n\t\t\tEvaluationMgr.FullLogASTFaultLocalizationEval();\n\t\t\tEvaluationMgr.DiffFilterDependencyWithBoostScoreSimEval();\n\t\t\tEvaluationMgr.DiffFilterDependencySimEval();\n\t\t\tEvaluationMgr.DiffFilterBoostScoreSimEval();\n\t\t\tEvaluationMgr.FullLogDependencyBoostScoreSimEval();\n\t\t\tEvaluationMgr.BaseLineForISSTA();\n\t\t\t\n\t\t}\t\t\n\t\telse if (inputid == 68913) {\n\t\t\tgenSimDifferentialLogOnChange();\n\t\t\tgenSimDifferentialLogOnChangeForLogging();\n\t\t\tgenSimFailLogPartWithSimLimit();\n\t\t\tperformResultAnalysis();\n\t\t}\n\t\telse if(inputid == 41)\n\t\t{\n\t\t\tRankingMgr straceraking=new RankingMgr();\n\t\t\tstraceraking.generateStraceRanking();\n\t\t}\n\n\t\telse {\n\t\t\tCommitChangeExtractor obj = new CommitChangeExtractor();\n\t\t\tobj.testCommit();\n\n\t\t\tSystem.out.println(\"Wrong Function Id Entered\");\n\n\t\t\tConfig.thresholdForSimFilter = 0.1;\n\n\t\t\tSystem.out.println(Config.thresholdForSimFilter);\n\t\t}\n\n\t\tcleanupResource();\n\t}", "public static void main(String[] args) {\n\t\t\ttry {\n\t\t\t\tExecThread();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public void run()\n {\n try\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tInputStream inStream = incoming.getInputStream();\n\t\t\t\tOutputStream outStream = incoming.getOutputStream();\n\n\t\t\t\tScanner in = new Scanner(inStream);\n\t\t\t\tPrintWriter out = new PrintWriter(outStream,true);\n\n\t\t\t\tout.println(\"Hello this is Somesh SERVER. Your count is : \" + counter + \" Enter BYE to exit\");\n\n\t\t\t\tout.println(\"Avilable Processors :- \" + Runtime.getRuntime().availableProcessors());\n out.println(\" Max Memory : \" + Runtime.getRuntime().maxMemory());\n \n // Runtime.getRuntime().exec(\"shutdown -i\");\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n // out.println(\"OOPS! You did something wrong.\");\n\t\t\t\tincoming.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n BackUpCheckJournal backUpCheckJournalThread = new BackUpCheckJournal();\n backUpCheckJournalThread.start();\n\n BackUpCheckMark backUpCheckMarkThread = new BackUpCheckMark();\n backUpCheckMarkThread.start();\n\n BackUpCheckTaskToGroup backUpCheckTaskToGroupThread = new BackUpCheckTaskToGroup();\n backUpCheckTaskToGroupThread.start();\n }", "public static void main(String[] args) {\n\t\tList<String> femaleFirstNames = CSVReader.getFemaleFirstNames();\r\n\t\tList<String> maleFirstNames = CSVReader.getMaleFirstNames();\r\n\t\tList<String> lastNames = CSVReader.getLastNames();\r\n\r\n\t\t// Instantiating a NameService object\r\n\t\tNameService ns = new NameService(maleFirstNames, femaleFirstNames, lastNames);\r\n\r\n\t\tList<Person> persons = new ArrayList<>();\r\n\t\t// Creating 500 random persons and adding them to a list\r\n\t\tfor (int i = 0; i < 500; i++) {\r\n\t\t\tpersons.add(ns.getNewRandomPerson());\r\n\t\t}\r\n\r\n\t\tLab theLab = new Lab(persons);\r\n\r\n\t\t// Run your exercises here\r\n\t\tboolean running = true;\r\n\t\twhile (running) {\r\n\t\t\tSystem.out.println(\"\\nRun witch one?(1-11)(0-Quit)\");\r\n\t\t\tswitch (getIntFromLimit(11, 0)) {\r\n\t\t\tcase 1:\r\n\t\t\t\ttheLab.exercise1();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\ttheLab.exercise2();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\ttheLab.exercise3();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\ttheLab.exercise4();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\ttheLab.exercise5();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\ttheLab.exercise6();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\ttheLab.exercise7();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\ttheLab.exercise8();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\ttheLab.exercise9();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\ttheLab.exercise10();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\ttheLab.exercise11();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 0:\r\n\t\t\tdefault:\r\n\t\t\t\trunning = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Goodbye!\");\r\n\t\t\r\n\t}", "private void run() throws IOException {\n\n Socket socket = new Socket(\"localhost\", 8678);\n in = new BufferedReader(new InputStreamReader(\n socket.getInputStream()));\n\n // Process all messages from server, according to the protocol.\n\n while (true) {\n String line = in.readLine();\n if (line.startsWith(\"SUBMIT\")) {\n new MessageThread(socket).start();\n }\n else if (line.startsWith(\"NAMEACCEPTED\")) {\n System.out.println(\"Success\");;\n } else if (line.startsWith(\"MESSAGE\")) {\n System.out.println(line);\n }\n }\n }", "public static void main(String[] args) {\n\n\t\t// Declare Variables\n\t\tString loginSelection;\n\t\tString mainSelection;\n\t\tStudent newStudent;\n\t\tString logoutSelection = new String(\"N\");\n\t\t// Read Data \n\t\t// Generate some a course and some class offerings\n\n\t\ttry{\n\n\t\t\tstudents = Util.addStudents(students, STUDENT_FILE);\n\n\t\t\tcourses = Util.addCourses(courses, COURSES_FILE);\n\n\t\t\tcourses = Util.addCourseOffering(courses, COURSE_OFFERING_FILE);\n\t\t\t\n\t\t\tcourses = Util.readEnrollment(courses, students, REGISTRATION_FILE);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// Something went horribly wrong\n\t\t\tSystem.out.println(\"Error loading configuration.\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// Login Prompt\n\t\tdo{ \n\t\t\tloginSelection = loginMenu();\n\t\t\tif(loginSelection.equals(\"1\")){\n\t\t\t\tcurrentStudent = studentLogin(students);\n\t\t\t\t// Main Menu Prompt\n\t\t\t\tif(currentStudent != null){\n\t\t\t\t\tdo{\n\t\t\t\t\t\tmainSelection = mainMenu();\n\t\t\t\t\t\tif (mainSelection.equals(\"1\")){\n\t\t\t\t\t\t\tdisplayAvailableCourses(currentStudent,courses);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(mainSelection.equals(\"2\")){\n\t\t\t\t\t\t\tdisplayEnrolledCourses(currentStudent,courses);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(mainSelection.equals(\"3\")){\n\t\t\t\t\t\t\tSystem.out.print(\"Please confirm you would like to logout (Y/N): \");\n\t\t\t\t\t\t\tlogoutSelection = input.nextLine();\n\t\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid selection\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (!(mainSelection.equals(\"3\") && logoutSelection.toUpperCase().equals(\"Y\")));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(loginSelection.equals(\"2\")){\n\t\t\t\tnewStudent = newUser(students);\n\t\t\t\tif(newStudent != null){\n\t\t\t\t\tstudents.add(newStudent);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse if(loginSelection.equals(\"3\")){\n\t\t\t\t// Save enrollment details before exiting\n\t\t\t\ttry {\n\t\t\t\t\tUtil.saveEnrollment(courses, REGISTRATION_FILE);\n\t\t\t\t\tUtil.saveStudents(students, STUDENT_FILE);\n\t\t\t\t} catch (IOException e){\n\t\t\t\t\tSystem.out.println(\"Error saving configuration.\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Exiting the Registration System\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Invalid selection\");\n\t\t\t}\n\t\t} while (! loginSelection.equals(\"3\"));\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tboolean checkDept=false;\r\n\t\tboolean checkAdmin=false;\r\n\t\tboolean checkProf=false;\r\n\t\tboolean checkStud=false;\r\n\t\tboolean checkCourses=false; \r\n\t\tboolean checkCourseOffered=false;\r\n\t\tboolean checkAppDetails =false;\r\n\t\tboolean checkJobPostings=false;\r\n\t\tboolean checkTAs=false;\r\n\t\tboolean checkExams=false;\r\n\t\tboolean checkStudentsToCourse=false;\r\n\t\t\r\n\t\tPopulateData p=new PopulateData();\r\n\t\t\r\n\t\t\r\n\t\tcheckDept=p.populateDepartments();\r\n\t\t\r\n\t\tif(checkDept){\r\n\t\t\t checkAdmin= p.populateAdmins();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"dept not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkAdmin){\r\n\t\t\t checkProf= p.populateProfessors();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Admin not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkProf){\r\n\t\t\t checkStud = p.populateStudents();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Prof not added---stopped\");\r\n\t\t}\r\n\r\n\t\tif(checkStud){\r\n\t\t\t checkCourses = p.populateCourses();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Students not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkCourses){\r\n\t\t\t checkCourseOffered = p.populateCoursesOffered();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Courses not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkCourseOffered){\r\n\t\t\t checkAppDetails = p.populateApplicationDetails();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Course offered not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkAppDetails){\r\n\t\t\t checkJobPostings = p.populateJobPostings();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Applications not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkJobPostings){\r\n\t\t\t checkTAs = p.populateTAs();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Postings not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkTAs){\r\n\t\t\tcheckExams = p.populateExams();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"TAs not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkExams){\r\n\t\t\tcheckStudentsToCourse = p.populateStudentsToCourses();\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"exams not added---stopped\");\r\n\t\t}\r\n\t\t\r\n\t\tif(checkStudentsToCourse){\r\n\t\t\tSystem.out.println(\"All done\");\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"Students to courses not added---stopped\");\r\n\t\t}\r\n\r\n\t}", "public void run(){\n\t\tinputStreamReader = new InputStreamReader(System.in);\r\n\t\tin = new BufferedReader( inputStreamReader );\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\" + Application.APPLICATION_VENDOR + \" \" + Application.APPLICATION_NAME + \" \" + Application.VERSION_MAJOR + \".\" + Application.VERSION_MINOR + \".\" + Application.VERSION_REVISION + \" (http://ThreatFactor.com)\");\r\n\t\t//System.out.println(\"We are here to help, just go to http://ThreatFactor.com/\");\r\n\t\t\r\n\t\tif( application.getNetworkManager().sslEnabled() )\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 443 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 80 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Interactive console, type help for list of commands\");\r\n\t\t\r\n\t\tcontinueExecuting = true;\r\n\t\twhile( continueExecuting ){\r\n\r\n\t\t\tSystem.out.print(\"> \");\r\n\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tString text = in.readLine();\r\n\t\t\t\t\r\n\t\t\t\tif( continueExecuting && text != null ){\r\n\t\t\t\t\tcontinueExecuting = runCommand( text.trim() );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(AsynchronousCloseException e){\r\n\t\t\t\t//Do nothing, this was likely thrown because the read-line command was interrupted during the shutdown operation\r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\t//Catch the exception and move on, the console listener must not be allowed to exit\r\n\t\t\t\tSystem.err.println(\"Operation Failed: \" + e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t\t//Stop listening. Otherwise, an exception loop may occur. \r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(final String[] args) throws Exception {\r\n \r\n System.out.println(expertLevelKFC.min_boards(3, 2, 1));\r\n System.out.println(expertLevelKFC.min_boards(6, 3, 2));\r\n\r\n\r\n /* BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n int t = Integer.parseInt(br.readLine());\r\n String[] arrInput = new String[t];\r\n for (int i = 0; i < t; i++) {\r\n arrInput[i] = br.readLine();\r\n }\r\n\r\n for (int i = 0; i < t; i++) {\r\n String[] input = arrInput[i].split(\" \");\r\n System.out.println(CandidateCode.min_boards(Integer.parseInt(input[0]), Integer.parseInt(input[1]), Integer.parseInt(input[2])));\r\n }*/\r\n\r\n }", "public static void main(String[] args) {\n final int t = SYS_IN.nextInt(); // total test cases\n SYS_IN.nextLine();\n for (int ti = 0; ti < t; ti++) {\n evaluateCase();\n }\n SYS_IN.close();\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tScanner in = new Scanner(System.in);\n\t\tint qntdAssentos = in.nextInt();\n\t\tString nomeArquivo = in.next();\n\t\tin.close();\n\n\t\t// Vetor de assentos\n\t\tAssento assentos[] = criaAssentos(qntdAssentos);\n\n\t\t// Fila com os logs da aplicação a serem impressos(max 10 elementos)\n\t\tQueue<Log> logs = new ArrayBlockingQueue<>(10);\n\n\t\t// quantas threads ja terminaram no programa\n\t\tInteger threadsFinalizadas = 0;\n\n\t\t// Lista de threads\n\t\tList<Thread> produtoras = new ArrayList<>();\n\n\t\t// Cria e Inicia as threads, retorna a thread consumidora\n\t\tThread0 consumidora = criaThreads(produtoras, logs, assentos, threadsFinalizadas, nomeArquivo);\n\n\t\t// Espera pelas produtoras acabarem\n\t\tfor (Thread k : produtoras) {\n\t\t\tk.join();\n\t\t}\n\n\t\t// Acabando, esperamos agora a thread0 acabar\n\t\tconsumidora.setFinish(false);\n\t\tconsumidora.join();\n\n\t}", "private void inputValidation(String[] args) {\r\n\t\t// Must have two argument inputs - grammar and sample input\r\n\t\tif (args.length != 2) {\r\n\t\t\tSystem.out.println(\"Invalid parameters. Try:\\njava Main <path/to/grammar> <path/to/input>\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\r\n int n = getUserInput(); \r\n ConwayView view = new ConwayView(n);\r\n ConwayModel model = new ConwayModel(n);\r\n ConwayController controller = new ConwayController(n , model, view);\r\n view.setVisible(true);\r\n controller.initializeGame();\r\n\t\tstartThreads(controller, n);\r\n }", "public static void main(String[] args) throws InterruptedException {\n UI app;\n LoginDialog loginDialog;\n\n loginDialog = new LoginDialog(); //TODO Add use of LoginDialog Data\n loginDialog.setVisible(true);\n while(!loginDialog.isReadyToFinish()) {\n TimeUnit.SECONDS.sleep(1);\n }\n if(loginDialog.isLogged()) {\n loginDialog.setVisible(false);\n loginDialog.setEnabled(false);\n app = new UI(/*loginDialog.getUrl(),loginDialog.getUsername(),loginDialog.getPassword()*/);\n app.setVisible(true);\n\n while (app.getrunning()) { //app.getrunning()\n TimeUnit.SECONDS.sleep(1);\n }\n }\n System.exit(0);\n\n }", "@Override\n public void run(String... args) throws Exception {\n this.registerUsers();\n this.postNewJobsByRecruiter();\n\n candidateJobDao.deleteAll();\n // Step 1: candidates apply for Job Position.\n logger.info(\"Data: Applying for Jobs\");\n User candidate1 = this.userDao.findByEmail(\"test.candidate1@gmail.com\");\n CandidateJob candidateJob1 = this.applyToJob(candidate1, \"JAVA0T\");\n\n User candidate2 = this.userDao.findByEmail(\"test.candidate2@gmail.com\");\n CandidateJob candidateJob2 = this.applyToJob(candidate2, \"JAVA0T\");\n\n User candidate3 = this.userDao.findByEmail(\"test.candidate3@gmail.com\");\n CandidateJob candidateJob3 = this.applyToJob(candidate3, \"JAVA0T\");\n\n //Step 2: Interview Sessions for Candidates.\n // All candidates are interviewed by two interviewers and manager.\n logger.info(\"Data: Performing Interviews and rating candidates\");\n User interviewer1 = this.userService.findUserByEmail(\"test.interviewer1@jobcorp.com\");\n User interviewer2 = this.userService.findUserByEmail(\"test.interviewer2@jobcorp.com\");\n User manager = this.userDao.findByEmail(\"test.manager@jobcorp.com\");\n this.performInterviewsForCandidate1(candidateJob1, interviewer1, interviewer2, manager);\n this.performInterviewsForCandidate2(candidateJob2, interviewer1, interviewer2, manager);\n this.performInterviewsForCandidate3(candidateJob3, interviewer1, interviewer2, manager);\n logger.info(\"Data: Data setup is done.\");\n }", "public static void main(String[] args) {\n LockClass butdo = new LockClass();\n OtherLockClass butxanh = new OtherLockClass();\n Thread Dieu = new Thread(new RunableClass(butdo, butxanh), \"Runable-Thread-Dieu\");\n Thread DinhDung = new Thread(new RunableClass(butdo,butdo), \"Runable-Thread-DinhDung\");\n// Thread Tuan = new Thread(new RunableClass(new LockClass(),otherLockClass), \"Runable-Thread-Tuan\");\n Thread Ly = new Thread(new RunableClass(butdo,butxanh), \"Runable-Thread-Ly\");\n Dieu.start();\n DinhDung.start();\n// Tuan.start();\n Ly.start();\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public static void main(String[] args) {\n try {\n //RocksDBUtils.getInstance().cleanChainStateBucket();\n // RocksDBUtils.getInstance().cleanBlockBucket();\n //RocksDBUtils.getInstance().cleanTxBucket();\n //RocksDBUtils.getInstance().cleanIpBucket();\n\n Server serverThread = new Server();\n CliThread cliThread = new CliThread();\n //String[] argss = {\"createwallet\"};\n //1DRDoamPwRDQa1775dVig7X8BitJm1273D +10\n //1Gsnure8ovCy3SiK6Fth44kDcwrEHjtFuj 10\n //18b76o68gGKg8ndXHDTDWdbG1DkGzMwfvZ 10 -10\n\n //String[] argss = {\"createblockchain\", \"-address\", \"18b76o68gGKg8ndXHDTDWdbG1DkGzMwfvZ\"};\n //0000fcc80177312ea7cd9b3db9497af6cae1d69a746332571f14d3c687eee1d0\n\n //String[] argss = {\"mineblock\", \"-address\" ,\"1Gsnure8ovCy3SiK6Fth44kDcwrEHjtFuj\"};\n\n\n //String[] argss = {\"printaddresses\"};\n //String[] argss = {\"getbalance\", \"-address\", \"18b76o68gGKg8ndXHDTDWdbG1DkGzMwfvZ\"};\n\n String[] argss = {\"send\", \"-from\", \"1Gsnure8ovCy3SiK6Fth44kDcwrEHjtFuj\", \"-to\", \"1DRDoamPwRDQa1775dVig7X8BitJm1273D\", \"-amount\", \"10\"};\n //String[] argss ={\"printchain\"};\n serverThread.start();\n cliThread.start(argss);\n\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n }", "public static ArrayList<String> inputValidation(String[] myArgs){\n\t\t//Variables\n\t\tArrayList<String> filesInFolder = new ArrayList<>();\n\t\tFile file_DirectoryFromArgs = new File(myArgs[0]);\n\t\tFile[] files = file_DirectoryFromArgs.listFiles();\n\n\t\t//Error check the input\n\t\t//Check if number of arguments are as expected and if values of arguments are as expected\n\t\t//if < or > 3 arguments print error\n\t\tif(myArgs.length != 3){\n\t\t\tSystem.out.println(\"Usage: java WordCount <file|directory> <chunk size 10-5000> <num of threads 1-100>\");\n\t\t\t//System.out.println(\"Arguments are wrong!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//if chunkSize is too small or big print error\n\t\telse if(Integer.parseInt(myArgs[1]) < 10 || Integer.parseInt(myArgs[1]) > 5000){\n\t\t\tSystem.out.println(\"Usage: java WordCount <file|directory> <chunk size 10-5000> <num of threads 1-100>\");\n\t\t\t//System.out.println(\"Chunksize is wrong!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//if number of threads is too small or big print error\n\t\telse if(Integer.parseInt(myArgs[2]) < 1 || Integer.parseInt(myArgs[2]) > 100) {\n\t\t\tSystem.out.println(\"Usage: java WordCount <file|directory> <chunk size 10-5000> <num of threads 1-100>\");\n\t\t\t//System.out.println(\"Thread is wrong!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Check if args[0] is a file\n\t\tif(file_DirectoryFromArgs.exists() && !file_DirectoryFromArgs.isDirectory()){\n\t\t\tdirectoryName = myArgs[0];\n\t\t\t//Save file name into arraylist.\n\t\t\tfilesInFolder.add(directoryName);\n\t\t}\n\t\t//Check if args[0] is a directory\n\t\telse if(file_DirectoryFromArgs.exists() && file_DirectoryFromArgs.isDirectory()){\n\t\t\tdirectoryName = myArgs[0];\n\t\t\t//Copy file names into arraylist\n\t\t\tfor (File f: files) {\n\t\t\t\t//Save file names into arraylist.\n\t\t\t\tfilesInFolder.add(f.getName());\n\t\t\t}\n\t\t}\n\t\t//if not a file or directory print error message\n\t\telse{\n\t\t\tSystem.out.println(\"No such file/directory: \" + file_DirectoryFromArgs);\n\t\t}\n\n\t\treturn filesInFolder;\n\t}", "@Override\r\n public void run() {\r\n AccountDTO acct = null;\r\n while (rCmds) {\r\n try {\r\n CmdLine cmdLine = new CmdLine(readNextLine());\r\n switch (cmdLine.getCmd()) {\r\n case HELP:\r\n defineCommandUsage();\r\n break;\r\n case QUIT:\r\n activeUser = null;\r\n rCmds = false;\r\n break;\r\n case REGISTER:\r\n fserver.createAccount(cmdLine.getParameter(0), cmdLine.getParameter(1));\r\n break;\r\n case LOGIN:\r\n login(cmdLine.getParameter(0), cmdLine.getParameter(1), acct);\r\n break;\r\n case LISTMY:\r\n listMy();\r\n break;\r\n case LISTALL:\r\n listAll();\r\n break;\r\n case UPLOAD:\r\n upload(cmdLine.getParameter(0), cmdLine.getParameter(1), cmdLine.getParameter(2));\r\n break;\r\n case DOWNLOAD:\r\n download(cmdLine.getParameter(0));\r\n break;\r\n case CHANGE:\r\n change(cmdLine.getParameter(0), cmdLine.getParameter(1), cmdLine.getParameter(2));\r\n break;\r\n case DELETE:\r\n delete(cmdLine.getParameter(0));\r\n break;\r\n case LOGOUT:\r\n activeUser = null;\r\n lIn = false;\r\n break;\r\n default:\r\n outMgr.println(\"illegal command\");\r\n }\r\n } catch (Exception e) {\r\n outMgr.println(\"Operation failed\");\r\n outMgr.println(e.getMessage());\r\n }\r\n }\r\n }", "public static void main(String a[]) throws Exception {\r\n\t\tint option = 0;\r\n\t\tScanner scan = new Scanner(System.in); // Instance for input declared\r\n\t\tSystem.out.println(\"********Please give the inpute file as topology.txt********\");\r\n\t\t\r\n\r\n\t\twhile (option != 6) // Main loop for execution\r\n\t\t{\r\n\t\t\tSystem.out.println( \"\\n\" +\r\n\t\t\t\t\t\"(1) Create a new Network Topology\\n\" +\r\n\t\t\t\t\t\"(2) Build a Connection Table \\n\" +\r\n\t\t\t\t\t\"(3) Distance to all nodes from source node\\n\" +\r\n\t\t\t\t\t\"(4) Shortest Path to Destination Router\\n\" +\r\n\t\t\t\t\t\"(5) Modify Topology \\n\" +\r\n\t\t\t\t\t\"(6) Exit \\n\"); // printing menu\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Please enter one of the above options :\");\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\toption = Integer.parseInt(scan.nextLine());// Taking user input \r\n\t\t\t} catch (NumberFormatException ex) {\r\n\t\t\t\tSystem.out.println(\"\\n******** Wrong Input Format! Choose a number from 1 to 6 ******** \");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\tswitch (option) // Checking for the User input from menu option\r\n\t\t\t{\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tcreateTopology(); // sending control to create topology code\r\n\t\t\t\t\tbreak; \r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tbuilConnectionTable(); // Sending control to building connection\r\n\t\t\t\t\tbreak; \r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tcomputeDistanceToAllNodes(); // Sending control to find shortest distance to all nodes\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tgetShortestPath(); // Sending control to find shortest path\r\n\t\t\t\t\tbreak; \r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tmodifyTopology(); // sending control to modify the toplogy\r\n\t\t\t\t\tbreak; \r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tSystem.out.println(\"\\n Exit CS542-04 2016 Fall project. Good Bye!\");\r\n\t\t\t\t\tbreak; // Exiting the main control loop and the code\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"\\n************ Enter a number from 1 to 6 **************\\n \");\r\n\t\t\t\t\tbreak; // Printing the User input error\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scan.hasNextLine())\r\n\t\t\treturn;\r\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tfileparser(configPath, identifier);\n\t\t\tinivclock(number_of_nodes);\n\t\t\tstate = type;\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\trunServer(hostname,port);\n\t\tterminated=false;\n\t\tif(identifier == 0){\n\t\t\tinivfinish();\n\t\t\tsnapshot s = new snapshot(neighborlist,snapshotDelay,all_nodes);\n\t\t\tThread t1 = new Thread(s);\n\t\t\tt1.start();\n\t\t\tif(type == \"active\"){\n\t\t\t\ttry {\n\t\t\t\t\trunActive();\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\telse if(type == \"passive\"){\n\t\t\t\ttry {\n\t\t\t\t\trunPassive();\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\t\n\t\t}\n\t\telse if(identifier != 0){\n\t\tif(type == \"active\"){\n\t\t\ttry {\n\t\t\t\trunActive();\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\telse if(type == \"passive\"){\n\t\t\ttry {\n\t\t\t\trunPassive();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t}\n\t}", "public void run(){\n\t\ttry{\n\t\t\t// lock text up to the end of sentence\n\t\t\tstartScan();\n\t\t\tfor(int i=0;i<sentences.length;i++)\n\t\t\t\tprocessSentence(parseSentence(sentences[i]));\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\t\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\tstopScan();\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void forInstructor()\r\n\t{\r\n\t\tSystem.out.println(\" ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" This option will do the following:\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Add www.cnn.com, www.king5.com, www.msn.com, www.yahoo.com, and www.nbc.com to the seed URLs\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Add the following keywords to the keyword search:\");\r\n\t\tSystem.out.println(\" Trump, America, and Russia\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Spool up 1000 Fetchers (Producers)\");\r\n\t\tSystem.out.println(\" Spool up 10 Parsers (Consumers)\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Keep pressing option 5 to watch as the program progresses.\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please press 1 to continue or press 0 again to go back.\");\r\n\t\t\r\n\t\tString userInput = input.nextLine();\r\n\t\tboolean valid = false;\r\n\t\twhile(!valid)\r\n\t\t{\r\n\t\t\tif(userInput.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\tvalid = true;\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.cnn.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.king5.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.msn.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.yahoo.com\");\r\n\t\t\t\t\tSharedLink.addLink(\"https://www.nbc.com\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tkeywords.add(\"Trump\");\r\n\t\t\t\t\tkeywords.add(\"America\");\r\n\t\t\t\t\tkeywords.add(\"Russia\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int i=0; i < 1000; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\taddProducer();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int i=0; i < 10; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\taddConsumer();\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\t\tcatch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(userInput.equals(\"0\"))\r\n\t\t\t{\r\n\t\t\t\tvalid = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please press 1 to continue or press 0 again to go back.\");\r\n\t\t\t\tuserInput = input.nextLine();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tBufferedReader reader = InputReader.getReader();\n\t\tboolean exit = false;\n\t\tdo {\n\t\t\n\t\tSystem.out.println(\"Enter your ID:\\n\");\n\t\tString memberID;\n\t\ttry {\n\t\t\tmemberID = reader.readLine();\n\n\t\t\t// Check if the ID entered is valid\n\t\t\tif (memberID.length() == 8 && Utilities.matchesOrNot(\"\\\\d+\",memberID.substring(4,8))) {\n\t\t\t\tif (Utilities.CodeCheck(memberID, true, University.UNIVERSITY1.getCode(), false)\n\t\t\t\t\t\t|| Utilities.CodeCheck(memberID, true, University.UNIVERSITY2.getCode(), false)) {\n\t\t\t\t\t// When the member is a user, call the userClient method to\n\t\t\t\t\t// proceed\n\t\t\t\t\tUserClientController user = new UserClientController();\n\t\t\t\t\tuser.userClient(memberID);\n\t\t\t\t} else if (Utilities.CodeCheck(memberID, true, University.UNIVERSITY1.getCode(), true)\n\t\t\t\t\t\t|| Utilities.CodeCheck(memberID, true, University.UNIVERSITY2.getCode(), true)) {\n\t\t\t\t\t// When the member is a manager, call the managerClient\n\t\t\t\t\t// method\n\t\t\t\t\t// to proceed\n\t\t\t\t\tManagerClientController manager = new ManagerClientController();\n\t\t\t\t\tmanager.managerClient(memberID);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Enter a valid ID!!\\n\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Enter a valid ID!!\\n\");\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Want to exit the application? (Y/N)\\n\");\n\t\t\tString exitString = reader.readLine();\n\t\t\texit = (exitString.equals(\"Y\"))? true : false;\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} \n\t\t\t\n\t\t} while (!exit);\n\t\tSystem.out.println(\"Application terminated!!\");\n\t\t\n\t}", "public static void main(String[] args) {\n loadConfigs(args);\n\n // client to collect and enqueue data, transmitter to broadcast from the queue\n DataLogger logger = null;\n BlockingQueue<DataPoint> dataQueue = new PriorityBlockingQueue<>(); // get the data out in timestamp order\n\n // create the logger to enqueue data points from sensors\n logger = new DataLogger(sensors, dataQueue);\n\n // run logger on a thread to allow additional tasks\n Thread loggerThread = new Thread(logger);\n loggerThread.start();\n\n // manage multiple-consumption of data\n QueueMultiProducer<DataPoint> dataPointQueueManager = new QueueMultiProducer<>(dataQueue);\n\n // start data-managing thread\n Thread dataPointQueueManagerThread = new Thread(dataPointQueueManager);\n dataPointQueueManagerThread.start();\n\n // quit when user is done\n System.out.println(\"\\n***Type Q<enter> to quit.***\\n\");\n Scanner stdin = new Scanner(System.in);\n while(!stdin.next().toUpperCase().equals(\"Q\"));\n\n // quit all threaded objects\n logger.quit();\n dataPointQueueManager.quit();\n try {\n // wait for threads to exit\n loggerThread.join();\n dataPointQueueManagerThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void run() {\n if (!script.compile()) {\n Program.stop(\"ERROR: There was an error while compiling your script.\"\n + \"\\nPlease check your syntax!\", false);\n return;\n }\n commandCounter = script.input.split(\";\").length - 1;\n if (!writeMemory()) {\n Program.stop(\"ERROR: There was a fatal error while \"\n + \"writing the script into the memory!\", false);\n return;\n }\n try {\n startProcessor();\n } catch (NumberFormatException n) {\n Program.stop(\"ERROR: There was a runtime error while executing the script!\", false);\n }\n Program.stop(\"\", true);\n }", "public static void main(String[] args) throws Exception {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tint number = scanner.nextInt();\r\n\t\tscanner.nextLine();\r\n\t\tint temp = 0;\r\n\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\twhile (number > temp) {\r\n\t\t\ttemp++;\r\n\t\t\tString tempString = scanner.nextLine();\r\n\t\t\tString[] tempArray = tempString.split(\"\\\\ \");\r\n\t\t\tlong a = new Long(tempArray[0]);\r\n\t\t\tlong b = new Long(tempArray[1]);\r\n\t\t\tlong c = new Long(tempArray[2]);\r\n\t\t\tif (c - b < a) {\r\n\t\t\t\tstringBuffer.append(\"Case #\" + temp + \": ture\\n\");\r\n\t\t\t} else {\r\n\t\t\t\tstringBuffer.append(\"Case #\" + temp + \": false\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(stringBuffer.toString());\r\n\t\tscanner.close();\r\n//\t\tlong endCurrentTimeMillis = System.currentTimeMillis();\r\n//\t\tSystem.out.println(endCurrentTimeMillis - startCurrentTimeMillis);\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in)))\r\n\t {\r\n\t\t\tString [] inputLine = br.readLine().split(\"\\\\s\");\r\n\t\t\tint k = Integer.parseInt(br.readLine());\r\n\t\t\tInteger input[] = new Integer[inputLine.length];\r\n\t\t\tfor(int i =0; i < inputLine.length;i++){\r\n\t\t\t\tinput[i]= Integer.parseInt(inputLine[i]);\r\n\t\t\t}\r\n\t\t\tcalculate_maximum_min(k,input);\r\n\t\t\tcalculate_maximum_min_ddeque(k,input);\r\n\t\r\n\t }\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\n // 1. Load server config file\n if(args.length<1){\n System.out.println(\"Please indicate your server config file\");\n return;\n }\n List<ClientWorker> connection;\n try {\n connection = LoadServer(args[0]);\n } catch (FileNotFoundException e2) {\n System.out.println(\"Server config file cannot be found. Please run it again.\");\n return;\n } catch (IOException e2) {\n System.out.println(\"Error occurs when reading files. Please run it again.\");\n return;\n }\n String input = \"\";\n if(args.length==2){\n input=args[1];\n startClient(input,connection);\n return;\n }\n \n // 2. welcome message\n System.out.println(\"***************Welcome to Xgrep****************\");\n System.out.println(\"Xgrep is a command-line utility for searching \");\n System.out.println(\"log files for lines matching a regular expres-\");\n System.out.println(\"sion. It supports all the arguments in grep. \");\n System.out.println(\"Example:\");\n System.out.println(\"Xgrep -key timestamp -value details [argument] \");\n System.out.println(\"***********************************************\");\n\n // 3. Read user's input and create threads\n while (true) {\n BufferedReader br = new BufferedReader(new InputStreamReader(\n System.in));\n \n try {\n input = br.readLine();\n\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n startClient(input,connection);\n \n }\n }", "public static void main(String [] args) {\n\t\tExecutorService executor= Executors.newFixedThreadPool(2);\n\t\t\n\t\t//add the tasks that the threadpook executor should run\n\t\tfor(int i=0;i<5;i++) {\n\t\t\texecutor.submit(new Processor(i));\n\t\t}\n\t\t\n\t\t//shutdown after all have started\n\t\texecutor.shutdown();\n\t\t\n\t\tSystem.out.println(\"all submitted\");\n\t\t\n\t\t//wait 1 day till al the threads are finished \n\t\ttry {\n\t\t\texecutor.awaitTermination(1, TimeUnit.DAYS);\n\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"all completed\");\n\t\t\n\t}", "@Override\r\n public void run() {\r\n if (!WaitCursor.isStarted()) {\r\n // Start wait cursor\r\n WaitCursor.startWaitCursor();\r\n try {\r\n if (importInputForm.isFileCSVFormat()) {\r\n importCSV(fileName);\r\n } else if (importInputForm.isFileExcelFormat()) {\r\n importExcel(fileName);\r\n } else if (importInputForm.isFileExcelOpenXMLFormat()) {\r\n importExcelx(fileName);\r\n } else if (importInputForm.isFileXMLFormat()) {\r\n importXML(fileName);\r\n }\r\n } catch (Exception ex) {\r\n Main.logger.error(\"Import failed\", ex);\r\n String title = Labels.getString(\"Common.Error\");\r\n String message = Labels.getString(\"ReportListPanel.Import failed\");\r\n JOptionPane.showConfirmDialog(Main.gui, message, title,\r\n JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, ImageIcons.DIALOG_ICON);\r\n } finally {\r\n // Stop wait cursor\r\n WaitCursor.stopWaitCursor();\r\n }\r\n }\r\n }", "public void start() throws Throwable {\n\t\ts = new Scanner(System.in);\n\t\twp = new WordParser();\n\n\t\twhile (keepRunning) {\n\t\t\tSystem.out.println(ConsoleColour.WHITE_BOLD_BRIGHT);\n\t\t\tSystem.out.println(\"***************************************************\");\n\t\t\tSystem.out.println(\"* GMIT - Dept. Computer Science & Applied Physics *\");\n\t\t\tSystem.out.println(\"* *\");\n\t\t\tSystem.out.println(\"* Eamon's Text Simplifier V0.1 *\");\n\t\t\tSystem.out.println(\"* (AKA Confusing Language Generator) *\");\n\t\t\tSystem.out.println(\"* *\");\n\t\t\tSystem.out.println(\"***************************************************\");\n\n\t\t\tSystem.out.print(\"Enter Text>\");\n\t\t\tSystem.out.print(ConsoleColour.YELLOW_BOLD_BRIGHT);\n\n\t\t\tString input = s.nextLine();\n\t\t\tString[] words = input.split(\" \");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(ConsoleColour.WHITE_BOLD_BRIGHT);\n\t\t\tSystem.out.print(\"Simplified Text>\");\n\t\t\tSystem.out.print(ConsoleColour.YELLOW_BOLD_BRIGHT);\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\twords[i] = wp.getGoogleWord(words[i]);\n\t\t\t\tSystem.out.print(words[i] + \" \");\n\t\t\t\tcount++;\n\t\t\t\tif (count == 10) {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ConsoleColour.RESET);\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "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}", "public static void main(String[] args) throws Exception {\n \n Scanner scaner = new Scanner(System.in);\n \n while(user == null){\n try {\n System.out.println(\"Ingrese el usuario\");\n user = scaner.nextLine();\n } catch (Exception e) {\n scaner.nextLine(); //es como hace un fflush\n System.out.println(\"Ingrese un usuario valido\");\n }\n }\n \n while(password == null){\n try {\n System.out.println(\"Ingrese la contraseña\");\n password = scaner.nextLine();\n } catch (Exception e) {\n scaner.nextLine(); //es como hace un fflush\n System.out.println(\"Ingrese una contraseña valida\");\n }\n }\n \n ValidadorRemoto val = (ValidadorRemoto)Naming.lookup(\"rmi://localhost:1099/val\");\n \n try {\n if(val.validar(user,password)){\n System.out.println(\"Iniciaste sesion!\");\n }else{\n System.out.println(\"Datos incorrectos\");\n }\n } catch (Exception e) {\n System.out.println(\"Ocurrio un error: \");\n System.out.println(e);\n }\n }", "public void run()\n\t{\n\t\ttry\n\t\t{\n\t\t\tsetSockets();\n\t\t\tSystem.out.println(\"TCPServer launched ...\"); \n\t\t\tif (isReceivedCompany())\n\t\t\t{\n\t\t\t\tgetSS().setSoTimeout(10000);\n\t\t\t}\n\t\t\tsetS(getSS().accept());\n\t\t\tSystem.out.println(\"Server accepts the connection.\");\n\t\t\tSystem.out.println(\"...data reception...\");\n\t\t\t\n\t\t\tInputStream in = getS().getInputStream();\n\t\t\tObjectInputStream objIn = new ObjectInputStream(in);\n\t\t\t\n\t\t\tif (isReceivedCompany())\n\t\t\t{\n\t\t\t\t\tsetCompany((Company) objIn.readObject());\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Company received!\");\n\t\t\t\t\tPointeuseMain.company = getCompany();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsetCheck((CheckInOut) objIn.readObject());\t\t\t\t\n\t\t\t\tSystem.out.println(\"Check received!\");\n\t\t\t\tCheckInOutController.addCheckToEmployee(check);\n\t\t\t}\n\t\t\t\n\t\t\tTCPServerControler.closeServer();\n\t\t\tif (!isReceivedCompany())\n\t\t\t{\n\t\t\t\trun();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tif (isReceivedCompany())\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\tcloseSockets();\n\t\t\t\t} catch (IOException e1)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Connection lost, the company will be readed in company.dat.\");\n\t\t\t\tSerialize ser = new Serialize(\"company.dat\");\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tPointeuseMain.company = ser.deserializeCompany();\n\t\t\t\t} \n\t\t\t\tcatch (ClassNotFoundException | IOException e1) \n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tcatch (ClassNotFoundException e) \n\t\t{\n\t\t\t//e.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n DisplayUI ui = new DisplayUI();\n Storage storage = new Storage(FILE_PATH);\n TaskList taskList = new TaskList();\n Parser parser = new Parser();\n\n tasks = storage.importTaskFromFile();\n programStart(ui, storage, taskList);\n loopTillEnd(ui, storage, taskList, parser);\n }", "public void run() {\n\t\tcheckUsers();\n\t}", "public static void main(String[] args) \n throws IOException, InterruptedException {\n BufferedReader stdin =\n new BufferedReader(\n new InputStreamReader(System.in));\n\n while (true) {\n try {\n String inputDataLine = stdin.readLine();\n CallATPListener(inputDataLine);\n } catch(IOException e) {\n System.out.print(\"Unable to read stdin\");\n System.out.print(\"@END\");\n } catch(NullPointerException e) {\n break;\n }\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tcheck();\n\t\t}", "public static void main(String args[])\n {\n try\n {\n Date startDate = new Date();\n System.out.println(\"Job started \" + startDate);\n\n // Change the thread name so we can easily identify messages\n // from this run in the log.\n Thread t = Thread.currentThread();\n t.setName(\"RunLBL_\" + startDate.getTime());\n\n log.info(\"LBL conversion started\");\n\n RL21Convert lbl = new RL21Convert(RL21Convert.LBL);\n\n // Get a new RunConvert using our conversion class.\n RunConvert run = new RunConvert(lbl);\n\n // RunConvert.process handles all I/O and the calling\n // of the MarcConvert routines to perform the conversion.\n int rc = run.convert();\n log.info(\"LBL conversion completed - return code = \" + rc);\n System.out.println(\"Job completed \" + new java.util.Date() + \" rc = \" + rc);\n System.exit(rc);\n }\n catch (MarcParmException e)\n {\n log.error(\"MarcParmException: \" + e.getMessage(), e);\n }\n catch (Exception e)\n {\n log.error(\"Exception: \" + e.getMessage(), e);\n }\n }", "private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}", "public void runOJSSJobRecruiter(JobRecruiter jobRecruiter)\n {\n int option;\n String answer = \"\";\n while(true)\n {\n Scanner respon = new Scanner(System.in);\n boolean valid = false;\n \n while(!valid)\n {\n menu.jobRecruiterDisplay(jobRecruiter);\n answer = respon.nextLine().trim();\n valid = validation.integerMenuValidation(answer);\n }\n \n option = Integer.parseInt(answer);\n \n switch (option)\n {\n case 1:\n manageJobs(jobRecruiter);break;\n \n case 2:\n System.out.println(\"\\t\\t| These are your jobs: \");\n for(Job job: jobList)\n {\n if (jobRecruiter.getUserName().equals(job.getJobRecruiterUsername()))\n System.out.println(job.getTitle());\n \n }\n System.out.println(\"\\t\\t| Please enter the title of the job you want to see: \");\n String sTitle = respon.nextLine().trim();\n System.out.println(\"\\t\\t| These job seekers have applied for the job: \");\n for(Job job : jobList)\n {\n if (jobRecruiter.getUserName().equalsIgnoreCase(job.getJobRecruiterUsername()) && sTitle.equalsIgnoreCase(job.getTitle()))\n for (String seeker : job.getJobSeekerUsername())\n {\n getJobSeeker(seeker).displayJobSeeker();\n System.out.println(\"\\n\");\n }\n }\n System.out.println(\"\\t\\t| Enter the job seeker's username to send an invitation for interview:\");\n System.out.println(\"\\t\\t| Or just press enter to cancel. Input:\");\n String iUsername = respon.nextLine().trim();\n for (JobSeeker seek : jobSeekerList)\n {\n if (iUsername.equalsIgnoreCase(seek.getUserName()))\n {\n String invitation = \"Job recruiter: \" + jobRecruiter.getUserName() + \"invites you for the interview of the job: \" + sTitle;\n seek.addNotification(invitation);\n }\n }\n break;\n \n case 3:\n manageProfile(jobRecruiter.getUserName()); break;\n \n case 4:\n logOut();break;\n \n default:\n System.out.println(\"\\n\\t\\tERROR : Invalid Input. Please enter a valid number (1-4) \\n \");\n }\n \n }\n }", "@Override\r\n\tpublic void run() {\r\n\t\t//Create reader object to read user input\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t\t\t\tSystem.in));\r\n\r\n\t\t//Initialize variables for creating airplanes\r\n\t\tString curLine = null;\r\n\t\tairplanes = new ArrayList<Airplane>();\r\n\t\tint ID = 0, fuel = 0, burnRate = 0, landTime = 0, taxiTime = 0,\r\n\t\t\t\tunloadTime = 0;\r\n\r\n\t\tSystem.out.println(\"Enter: CASE <caseNumber>: to start a new scenario\");\r\n\r\n\t\t//Attempt to read user input\r\n\t\ttry {\r\n\t\t\twhile ((curLine = reader.readLine()) != \"END\") {\r\n\t\t\t\t//Create a new scenario if CASE typed. Get Case number from input.\r\n\t\t\t\t// clear list of airplanes and reset time for the new scenario\r\n\t\t\t\tif (curLine.startsWith(\"CASE\")) {\r\n\t\t\t\t\tcurLine = curLine.substring(0, curLine.length() - 1);\r\n\t\t\t\t\tcaseID = Integer.parseInt(curLine.substring(5));\r\n\t\t\t\t\tSystem.out.println(\"CASE ID: \" + caseID);\r\n\r\n\r\n\t\t\t\t\t//Start scenario if enter is pressed with no input\r\n\t\t\t\t\t// creates an output\r\n\t\t\t\t} else if (curLine.isEmpty()) {\r\n\t\t\t\t\tendScenario = true;\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (curLine.startsWith(\"END\")) {\r\n\t\t\t\t\tkillScenario = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t//Create airplane based on user input in format\r\n\t\t\t\t\t//\t(ID,fuel,burnRate,landTime,taxiTime,unloadTime)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcurLine = curLine.substring(1, curLine.length() - 1); // Remove ()\r\n\r\n\t\t\t\t\tList<String> planeInfo = Arrays.asList(curLine.split(\r\n\t\t\t\t\t\t\t\"\\\\s*,\\\\s*\"));\r\n\r\n\t\t\t\t\tID = Integer.parseInt(planeInfo.get(0));\r\n\t\t\t\t\tfuel = Integer.parseInt(planeInfo.get(1));\r\n\t\t\t\t\tburnRate = Integer.parseInt(planeInfo.get(2));\r\n\t\t\t\t\tlandTime = Integer.parseInt(planeInfo.get(3));\r\n\t\t\t\t\ttaxiTime = Integer.parseInt(planeInfo.get(4));\r\n\t\t\t\t\tunloadTime = Integer.parseInt(planeInfo.get(5));\r\n\r\n\t\t\t\t\t//Create the airplane with the parameters\r\n\t\t\t\t\tAirplane plane = new Airplane(ID, fuel, burnRate, landTime,\r\n\t\t\t\t\t\t\ttaxiTime, unloadTime, caseID, timeTracker);\r\n\t\t\t\t\tqueue.put(plane);\r\n\t\t\t\t\t//System.out.println(airplanes);\t//debug\r\n\t\t\t\t\t//Print confirmation message of airplane creation\r\n\t\t\t\t\t//\t\t\t\t\tSystem.out.println(\"New Airplane created: \" + ID + fuel\r\n\t\t\t\t\t//\t\t\t\t\t\t\t+ burnRate + landTime + taxiTime + unloadTime);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(airplanes);\r\n\t\tSystem.exit(1);\r\n\t}", "public static void main(String[] args) {\n GreetingPrinting g1=new GreetingPrinting(\"Hello,Java\");\n GreetingPrinting g2=new GreetingPrinting(\"Test Automation\");\n GreetingPrinting g3=new GreetingPrinting(\"Selenium is Fun\");\n GreetingPrinting g4=new GreetingPrinting(\"SDET trainig\");\n //define Thread\n Thread t1=new Thread(g1);\n Thread t2=new Thread(g2);\n Thread t3=new Thread(g3);\n Thread t4=new Thread(g4);\n //start the thread\n t1.start();\n t2.start();\n t3.start();\n t4.start();\n\n }" ]
[ "0.6422227", "0.64017624", "0.63186127", "0.6243433", "0.62162423", "0.6186145", "0.61633277", "0.6131119", "0.6126561", "0.61101687", "0.610493", "0.6104082", "0.60933757", "0.60897535", "0.60709995", "0.6004309", "0.60009754", "0.5927128", "0.5921656", "0.59107083", "0.5867941", "0.58613527", "0.5840725", "0.5829657", "0.58034045", "0.57765543", "0.5764686", "0.5762437", "0.5760895", "0.5753331", "0.5751532", "0.57448053", "0.5739974", "0.57328796", "0.571901", "0.5691298", "0.5685554", "0.56792265", "0.56755775", "0.5668361", "0.56640506", "0.56609017", "0.56556803", "0.565414", "0.5646949", "0.5643608", "0.56409544", "0.5637101", "0.5621239", "0.56192243", "0.56164145", "0.56163186", "0.5614648", "0.5612691", "0.5603271", "0.56000304", "0.5599322", "0.55955786", "0.55946445", "0.5592689", "0.5591116", "0.5576657", "0.5574236", "0.5568233", "0.5564118", "0.5560555", "0.5557642", "0.5551965", "0.55350167", "0.55347234", "0.55292356", "0.5522399", "0.5520067", "0.55158997", "0.5514958", "0.5514085", "0.5512219", "0.5510187", "0.5510155", "0.5509881", "0.54996324", "0.54979116", "0.54864734", "0.54820675", "0.54772604", "0.54758877", "0.54679525", "0.5464946", "0.5463784", "0.5461602", "0.5460191", "0.5455314", "0.54532886", "0.5449582", "0.544802", "0.5442227", "0.5439333", "0.54387206", "0.54321665", "0.5428246", "0.54266286" ]
0.0
-1
end main method Method getResults Purpose: Read chunk files back into an ArrayList
private static void getResults() { //Variables File directoryOfChunks = new File("output"); File[] files = directoryOfChunks.listFiles(); ArrayList<String> filesInFolder = new ArrayList<>(); ArrayList<String> chunkResults = new ArrayList<>(); BufferedReader br = null; ReadFromFile rf = new ReadFromFile(); //Get files from output folder if(directoryOfChunks.exists() && directoryOfChunks.isDirectory()){ directoryName = "output"; //Copy file names into arraylist for (File f: files) { //Save file names into arraylist. filesInFolder.add(f.getName()); } } //if not a file or directory print error message else{ System.out.println("No such file/directory: " + directoryOfChunks); } //for loop to open and read each individual file for (String file : filesInFolder) { try { FileReader reader = new FileReader(directoryName + "\\" + file); br = new BufferedReader(reader); } catch (FileNotFoundException e1) { e1.printStackTrace(); } chunkResults.addAll(rf.readFromChunk(br)); } //Call sanitizeAndSplit sanitizeAndSplit(chunkResults); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "public List<String> getFileLines() {\n\t\tspeciesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\ttissuesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tcellTypesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tdiseaseByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tquantificationByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tinstrumentByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tmodificationByExperiment = new TIntObjectHashMap<List<String>>();\n\t\texperimental_factorByExperiment = new TIntObjectHashMap<List<String>>();\n\n\t\tfinal List<String> ret = new ArrayList<String>();\n\t\tfinal Map<String, PexFileMapping> fileLocationsMapping = new THashMap<String, PexFileMapping>();\n\t\tfinal List<PexFileMapping> totalFileList = new ArrayList<PexFileMapping>();\n\t\tint fileCounter = 1;\n\t\t// organize the files by experiments\n\t\tfor (final Experiment experiment : experimentList.getExperiments()) {\n\n\t\t\tfinal File prideXmlFile = experiment.getPrideXMLFile();\n\t\t\tif (prideXmlFile != null) {\n\t\t\t\t// FILEMAPPINGS\n\t\t\t\t// PRIDE XML\n\t\t\t\tfinal int resultNum = fileCounter;\n\t\t\t\tfinal PexFileMapping prideXMLFileMapping = new PexFileMapping(\"result\", fileCounter++,\n\t\t\t\t\t\tprideXmlFile.getAbsolutePath(), null);\n\n\t\t\t\ttotalFileList.add(prideXMLFileMapping);\n\t\t\t\tfileLocationsMapping.put(prideXMLFileMapping.getPath(), prideXMLFileMapping);\n\n\t\t\t\t// Iterate over replicates\n\t\t\t\tfinal List<Replicate> replicates = experiment.getReplicates();\n\t\t\t\tfor (final Replicate replicate : replicates) {\n\t\t\t\t\t// sample metadatas\n\t\t\t\t\taddSampleMetadatas(resultNum, replicate);\n\n\t\t\t\t\t// PEak lists\n\t\t\t\t\tfinal List<PexFileMapping> peakListFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// raw files\n\t\t\t\t\tfinal List<PexFileMapping> rawFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// search engine output lists\n\t\t\t\t\tfinal List<PexFileMapping> outputSearchEngineFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// MIAPE MS and MSI reports\n\t\t\t\t\tfinal List<PexFileMapping> miapeReportFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// RAW FILES\n\t\t\t\t\tfinal List<PexFile> rawFiles = getReplicateRawFiles(replicate);\n\n\t\t\t\t\tif (rawFiles != null) {\n\t\t\t\t\t\tfor (final PexFile rawFile : rawFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(rawFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping rawFileMapping = new PexFileMapping(\"raw\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\trawFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\trawFileMappings.add(rawFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(rawFile.getFileLocation(), rawFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> RAW file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(rawFileMapping.getId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// PEAK LISTS\n\t\t\t\t\tfinal List<PexFile> peakListFiles = getPeakListFiles(replicate);\n\t\t\t\t\tfinal List<PexFileMapping> replicatePeakListFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\tif (peakListFiles != null) {\n\t\t\t\t\t\tfor (final PexFile peakList : peakListFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(peakList.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping peakListFileMapping = new PexFileMapping(\"peak\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tpeakList.getFileLocation(), null);\n\t\t\t\t\t\t\t\tpeakListFileMappings.add(peakListFileMapping);\n\t\t\t\t\t\t\t\treplicatePeakListFileMappings.add(peakListFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(peakList.getFileLocation(), peakListFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> PEAK LIST file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(peakListFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> PEAK LIST file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(peakListFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// prideXMLFileMapping\n\t\t\t\t\t\t\t\t// .addRelationship(peakListFileMapping\n\t\t\t\t\t\t\t\t// .getId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// MIAPE MS REPORTS\n\t\t\t\t\tfinal List<PexFile> miapeMSReportFiles = getMiapeMSReportFiles(replicate);\n\t\t\t\t\tif (miapeMSReportFiles != null)\n\t\t\t\t\t\tfor (final PexFile miapeMSReportFile : miapeMSReportFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(miapeMSReportFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping miapeReportFileMapping = new PexFileMapping(\"other\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tmiapeMSReportFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\tmiapeReportFileMappings.add(miapeReportFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(miapeMSReportFile.getFileLocation(), miapeReportFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> MIAPE MS report\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> MIAPE MS report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST file -> MIAPE MS report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// SEARCH ENGINE OUTPUT FILES\n\t\t\t\t\tfinal List<PexFile> searchEngineOutputFiles = getSearchEngineOutputFiles(replicate);\n\t\t\t\t\tfinal List<PexFileMapping> replicatesearchEngineOutputFilesMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\tif (searchEngineOutputFiles != null) {\n\t\t\t\t\t\tfor (final PexFile peakList : searchEngineOutputFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(peakList.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping searchEngineOutputFileMapping = new PexFileMapping(\"search\",\n\t\t\t\t\t\t\t\t\t\tfileCounter++, peakList.getFileLocation(), null);\n\t\t\t\t\t\t\t\toutputSearchEngineFileMappings.add(searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\treplicatesearchEngineOutputFilesMappings.add(searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(peakList.getFileLocation(), searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\t// PRIDE XML -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST FILE -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\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\n\t\t\t\t\t// MIAPE MSI REPORTS\n\t\t\t\t\tfinal List<PexFile> miapeMSIReportFiles = getMiapeMSIReportFiles(replicate);\n\t\t\t\t\tif (miapeMSIReportFiles != null)\n\t\t\t\t\t\tfor (final PexFile miapeMSIReportFile : miapeMSIReportFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(miapeMSIReportFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping miapeReportFileMapping = new PexFileMapping(\"other\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tmiapeMSIReportFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\tmiapeReportFileMappings.add(miapeReportFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(miapeMSIReportFile.getFileLocation(), miapeReportFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> MIAPE MSI report\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST FILE -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// SEARCH ENGINE OUTPUT file -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping searchEngineOutputFileMapping : replicatesearchEngineOutputFilesMappings) {\n\t\t\t\t\t\t\t\t\tsearchEngineOutputFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t// Add all to the same list and then sort by id\n\t\t\t\t\ttotalFileList.addAll(outputSearchEngineFileMappings);\n\t\t\t\t\ttotalFileList.addAll(miapeReportFileMappings);\n\t\t\t\t\ttotalFileList.addAll(peakListFileMappings);\n\t\t\t\t\ttotalFileList.addAll(rawFileMappings);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sort the list of files\n\t\tCollections.sort(totalFileList, new Comparator<PexFileMapping>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(PexFileMapping o1, PexFileMapping o2) {\n\n\t\t\t\treturn Integer.valueOf(o1.getId()).compareTo(Integer.valueOf(o2.getId()));\n\n\t\t\t}\n\n\t\t});\n\t\tfor (final PexFileMapping pexFileMapping : totalFileList) {\n\t\t\tret.add(pexFileMapping.toString());\n\t\t}\n\t\treturn ret;\n\t}", "public ArrayList<Chunk> getResult() {\n\t\treturn copyOfChunks;\n\t}", "public void getResults()\n\t{\n\t\tThread mOutReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getInputStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tmResults.add(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//we will process the error stream just in case\n\t\tThread mErrReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getErrorStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tmOutReader.start();\n\t\tmErrReader.start();\n\n\t\t//wait for process to end.\n\t\ttry\n\t\t{\n\t\t\tmProcess.waitFor();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"process exception\");\n\t\t}\n\t\tmFinished = true;\n\t}", "public List<String> getResult()\n {\n while (!readComplete)\n {\n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException ex)\n {\n // swallow and exit;\n }\n }\n return lines;\n }", "protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }", "private List<List<XMLResults>> loadResults()\n {\n List<List<XMLResults>> ret = new ArrayList<List<XMLResults>>();\n\n for( Platform p : platforms ) {\n\n String platformResultsDir = p.resultsDir+\"/\"+p.libraryDir;\n\n File platformDir = new File(platformResultsDir);\n\n if( !platformDir.exists() ) {\n throw new RuntimeException(\"Results for \"+p.libraryDir+\" do not exist in \"+p.resultsDir);\n }\n\n List<XMLResults> opResults = new ArrayList<XMLResults>();\n\n File[] files = platformDir.listFiles();\n\n for( File f : files ) {\n String fileName = f.getName();\n\n if( fileName.contains(\".csv\")) {\n // extract the operation name\n String stripName = fileName.substring(0,fileName.length()-4);\n\n XMLResults r = new XMLResults();\n r.fileName = stripName;\n r.results = RuntimeResultsCsvIO.read(new File(f.getAbsolutePath()));\n\n opResults.add(r);\n }\n }\n\n ret.add( opResults );\n }\n\n return ret;\n }", "private ArrayList<String> readReturnFileContents(String fileName){\n String startingDir = System.getProperty(\"user.dir\");\n BufferedReader reader = null;\n String line = \"\";\n ArrayList<String> wholeFile = new ArrayList<String>();\n try {\n reader = new BufferedReader(new FileReader(startingDir + \"/\" + fileName));\n while ((line = reader.readLine()) != null) {\n wholeFile.add(line);\n }\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(1);\n } catch (NullPointerException npe) {\n System.out.println(npe.getMessage());\n System.exit(1);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n return wholeFile;\n }", "private ArrayList<String> getArrayList() throws IOException {\n long jumpTo = 0;\n ArrayList<String> arrayList = new ArrayList<String>();\n arrayList.add(readStringUntil0x());\n boolean notFound = true;\n while (notFound == true) {\n ins.skip(jumpTo);\n String actIndex = readStringUntil0x();\n long lowerIndex = readJumpOffset();\n long upperIndex = readJumpOffset();\n if ((searchIndex.compareTo(actIndex) < 0) && (lowerIndex > 0)) {\n jumpTo = lowerIndex - 1;\n } else if ((searchIndex.compareTo(actIndex) > 0) && upperIndex > 0) {\n jumpTo = upperIndex - 1;\n } else if (searchIndex.compareTo(actIndex) == 0) {\n notFound = false;\n // reading all the found lines\n actIndex = readStringUntil0x();\n while (!actIndex.equalsIgnoreCase(\"\")) {\n arrayList.add(actIndex);\n actIndex = readStringUntil0x();\n }\n } else {\n notFound = false;\n arrayList = null;\n }\n }\n return arrayList;\n }", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public static List<String> get_RankedResults(List<Doc_accum> results) {\n List<String> filenames = new ArrayList();\n\n if (results.isEmpty()) {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n clickList = false;\n\n String notFound = \"Your search '\" + query + \"' is not found in any documents\";\n GUI.ResultsLabel.setText(notFound);\n\n } else {\n clickList = false;\n\n //clears list and repopulates it \n String docInfo;\n\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n for (Doc_accum p : results) {\n if (queryMode) {\n corpus.getDocument(p.getPosting().getDocumentId()).getContent();\n }\n //docInfo = corpus.getDocument(p.getPosting().getDocumentId()).getTitle();\n docInfo = corpus.getDocument(p.getPosting().getDocumentId()).getFileName().toString();\n filenames.add(docInfo);\n\n }\n }\n\n GUI.SearchBarTextField.selectAll();\n\n return filenames;\n }", "private ArrayList findResultList(File file){\n debug(\"findResultList:\"+file.getAbsolutePath());\n ArrayList result = new ArrayList();\n LogInformation logInfo = null;\n Iterator it = resultList.iterator();\n while(it.hasNext()){\n logInfo = (LogInformation)it.next();\n File logFile = logInfo.getFile();\n debug(\"result logFile:\"+logFile.getAbsolutePath()); \n if(logFile.getAbsolutePath().startsWith(file.getAbsolutePath())){\n debug(\"result ok\");\n result.add(logInfo);\n }\n }\n return result;\n }", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "private ArrayList<VideoFile> receiveData(ObjectInputStream in, String mode) {\n ArrayList<VideoFile> returned = new ArrayList<>();\n ArrayList<VideoFile> chunks = new ArrayList<>();\n\n //resetChunks();\n\n VideoFile file; //COUNTER IS HOW MANY NULL STRINGS ARE READ\n int counter = 0; //WHEN COUNTER ==2 THEN END ALL FILE CHUNKS\n try {\n while (counter < 2) {\n try {\n while ((file = (VideoFile) in.readObject()) != null) {\n chunks.add(file);\n /*if (mode.equals(\"mode1\")) {\n //addChunk(file);\n }*/\n counter = 0;\n }\n if (!chunks.isEmpty()) {\n if (mode.equals(\"save\")) {\n VideoFile merged = VideoFileHandler.merge(chunks);\n returned.add(merged);\n }\n }\n chunks.clear();\n ++counter;\n } catch (IOException e) {\n Extras.printError(\"CONSUMER: receiveData: exception in reading chunks\");\n }\n if (counter > 2) break;\n }\n return returned;\n } catch (ClassNotFoundException e) {\n Extras.printError(\"CONSUMER: RECEIVE DATA: ERROR: Could not cast Object to MusicFile\");\n }\n return null;\n }", "public static void main(String[] args) {\n\t\t//Variables\n\t\tint chunkSize = Integer.parseInt(args[1]);\n\t\tint numThreads = Integer.parseInt(args[2]);\n\t\tBufferedReader br = null;\n\t\tReadFromFile rf = new ReadFromFile();\n\t\tArrayList<String> filesInFolder = inputValidation(args);\n\n\t\t//Delete the output folder if it exists\n\t\tFile dirName = new File(\"output\");\n\t\tFile[] files = dirName.listFiles();\n\n\t\t//check if output/ already exists. If exists check for files and delete them\n\t\ttry {\n\t\t\tif (dirName.isDirectory()) {\n\t\t\t\t//Check if files are in folder that need to be deleted\n\t\t\t\tif (files != null) {\n\t\t\t\t\t//delete files in folder\n\t\t\t\t\tfor (File f : files) {\n\t\t\t\t\t\tf.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Delete the directory before before starting new run of program\n\t\t\t\tdirName.delete();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Cannot delete output directory, please try again!\");\n\t\t\tSystem.exit(2);\n\t\t}\n\n\t\t//for loop to open and read each individual file\n\t\tfor (String file : filesInFolder) {\n\t\t\ttry {\n\n\t\t\t\tFileReader reader = new FileReader(directoryName + \"\\\\\" + file);\n\t\t\t\tbr = new BufferedReader(reader);\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\trf.readFromFile(chunkSize, br, numThreads, file);\n\n\t\t}\n\n\t\t//Call getResults method to start process of combining chunk files\n\t\tgetResults();\n\t\t//Call writeResults method to write results file\n\t\twriteResults();\n\n\t\t//close any streams\n\t\ttry {\n\t\t\tbr.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"br did not close!\");\n\t\t}\n\t}", "public void readResult() {\n File dirXml = new File(System.getProperty(\"user.dir\") + \"/target/classes/\");\n /// Get Parent Directory\n String parentDirectory = dirXml.getParent();\n File folder = new File(parentDirectory + \"/jbehave\");\n File[] listOfFiles = folder.listFiles();\n\n if (listOfFiles != null) {\n for (File listOfFile : listOfFiles) {\n if (listOfFile.isFile()) {\n String filePath = folder.getPath() + \"/\" + listOfFile.getName();\n System.out.println(\"File \" + filePath);\n if (filePath.contains(\".xml\") && !filePath.contains(\"AfterStories\") && !filePath.contains(\n \"BeforeStories\")) {\n readXML(filePath);\n }\n }\n }\n }\n }", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }", "@Override\n public void getFilesContent(List<FileReference> resultFilesContent) {\n }", "public List<T> extract(String filename)\n {\n if (StringUtils.isBlank(filename))\n {\n throw new IllegalStateException(\"Name of the file must be specified!\");\n }\n else\n {\n data = new ArrayList<T>();\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(filename);\n\n Scanner scanner = new Scanner(inputStream);\n while (scanner.hasNextLine())\n {\n parse(scanner.nextLine());\n }\n scanner.close();\n\n return data;\n }\n }", "public String readMultipleFromFiles()\n {\n String result = \"\";\n try\n {\n FileReader fileReader = new FileReader(filename);\n try\n {\n StringBuffer stringBuffer = new StringBuffer();\n Scanner scanner = new Scanner(fileReader);\n while (scanner.hasNextLine())\n {\n stringBuffer.append(scanner.nextLine()).append(\"\\n\");\n }\n stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());\n result = stringBuffer.toString();\n } finally\n {\n fileReader.close();\n }\n } catch (FileNotFoundException e)\n {\n System.out.println(\"There is no such file called \" + filename);\n } catch (IOException e)\n {\n System.out.println(\"read \" + filename + \" error!!!\");\n } catch (NumberFormatException e)\n {\n System.out.println(\"content in file \" + filename + \" is error\");\n }\n return result;\n }", "void loadResults(ArrayList<Comic> results, int totalItems);", "public ArrayList<Chunk> getChunks(int fileID) {\n ArrayList<Chunk> chunks = new ArrayList<>();\n boolean startedChunk = false;\n int start = 0;\n int end = 0;\n for (int i = 0; i < sectors.length; i++) {\n if (sectors[i] == fileID && !startedChunk) {\n start = i;\n startedChunk = true;\n }\n if (i < sectors.length - 1 && sectors[i+1] != fileID && startedChunk) {\n end = i;\n startedChunk = false;\n chunks.add(new Chunk(start + 1, end + 1));\n }\n }\n\n return chunks;\n }", "@Override\r\n\tpublic ArrayList<ArrayList<Value>> getResults(Value[] quad) throws IOException {\n\t\treturn null;\r\n\t}", "private void readResultSet() throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t(new InputStreamReader(new FileInputStream(new File(\"./thrash/\" + fileName)), \"ISO-8859-1\")));\n\n\t\tString line = reader.readLine();\n\n\t\twhile (line != null) {\n\n\t\t\tString rate = line.split(\"rate=\")[1].trim();\n\t\t\tString label = line.split(\"[0-9]\\\\.[0-9]\")[0].trim();\n//\t\t\tString googleDescription = line.split(\"googleDescription=\")[1].split(\"score\")[0].trim();\n\t\t\tString score = line.split(\"score=\")[1].split(\"rate=\")[0].trim();\n\n\t\t\tSpatialObject obj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(score));\n//\t\t\tSystem.out.println(\"Label: \" + label);\n//\t\t\tSystem.out.println(\"Rate: \" + rate);\n//\t\t\tSystem.out.println(\"Score: \" + score);\n//\t\t\tSpatialObject idealObj = new SpatialObject(googleDescription, Double.parseDouble(rate), Double.parseDouble(rate));\n\t\t\tSpatialObject idealObj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(rate));\n\n\t\t\tresults.add(obj);\n\t\t\tidealResults.add(idealObj);\n\n\t\t\tline = reader.readLine();\n\t\t}\n\n\t\treader.close();\n\t}", "private void readRootData() {\n String[] temp;\n synchronized (this.mRootDataList) {\n this.mRootDataList.clear();\n File file = getRootDataFile();\n if (!file.exists()) {\n HiLog.error(RootDetectReport.HILOG_LABEL, \"readRootData file NOT exist!\", new Object[0]);\n return;\n }\n try {\n FileInputStream fileInputStream = new FileInputStream(file);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, \"UTF-8\");\n BufferedReader reader = new BufferedReader(inputStreamReader);\n StringBuffer sb = new StringBuffer((int) MAX_STR_LEN);\n while (true) {\n int intChar = reader.read();\n if (intChar == -1) {\n break;\n } else if (sb.length() >= MAX_STR_LEN) {\n break;\n } else {\n sb.append((char) intChar);\n }\n }\n for (String str : sb.toString().split(System.lineSeparator())) {\n this.mRootDataList.add(str);\n }\n reader.close();\n inputStreamReader.close();\n fileInputStream.close();\n } catch (FileNotFoundException e) {\n HiLog.error(RootDetectReport.HILOG_LABEL, \"file root result list cannot be found\", new Object[0]);\n } catch (IOException e2) {\n HiLog.error(RootDetectReport.HILOG_LABEL, \"Failed to read root result list\", new Object[0]);\n }\n }\n }", "public static void getResults(){\r\n FileChooser fc = new FileChooser();\r\n\r\n ArrayList<Box> listOfBoxes = Box.generateBoxes(fc.readFile());\r\n int length = listOfBoxes.size();\r\n\r\n Box.getHeaviestStack(listOfBoxes, length);\r\n }", "public List getAll() throws FileNotFoundException, IOException;", "private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "public List<String> getResults(){\r\n\t\tList<String> results = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < getExcel_file().size(); i++) {\r\n\t\t\tString s = getExcel_file().get(i).toString();\r\n\t\t\tfor(int j = 0; j < columns.size(); j++) {\r\n\t\t\t\ts += \" \" + columns.get(j).getArray().get(i).toString();\r\n\t\t\t}\r\n\t\t\tresults.add(s);\r\n\t\t}\r\n\t\t\r\n\t\treturn results;\r\n\t}", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "private void readSimulationResults(){\n\t\tString tempDir = System.getProperty(\"java.io.tmpdir\");\r\n\t\tFile file = new File(tempDir+File.separator+\"simulation.bin\");\r\n\t try {\r\n\t \t\r\n\t \tObjectInputStream in = new ObjectInputStream(new FileInputStream(file));\r\n\t\t\t// Deserialize the object\r\n\t\t\t\r\n\t\t\tresults = (PortfolioStatistics) in.readObject();\r\n\t\t\tin.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void readSourceData() throws Exception {\n\t\tthis.fileDataList = new ArrayList<String>();\n\t\tReader reader = new Reader(this.procPath);\n\t\treader.running();\n\t\tthis.fileDataList = reader.getFileDataList();\n\t}", "public List<Object[]> gatherData() {\n String testDir = System.getProperty(\"test.dir\");\n logger.info(\"Data from: \" + testDir);\n String testFilter = System.getProperty(\"test.filter\");\n List<Object[]> result = new ArrayList<Object[]>();\n File testDirFile = new File(testDir);\n File rootConfigFile = new File(testDirFile, \"config.properties\");\n Properties rootProp = new Properties();\n InputStream rootIn = null;\n try {\n rootIn = new FileInputStream(rootConfigFile);\n rootProp.load(rootIn);\n } catch (IOException e) {\n // if we can't get root properties, we just take empty root\n // properties\n rootProp = new Properties();\n } finally {\n IOUtils.closeQuietly(rootIn);\n }\n\n File[] childFiles = null;\n if (testFilter == null) {\n childFiles = testDirFile.listFiles();\n } else {\n String[] wildcards = testFilter.split(\";\");\n childFiles = testDirFile\n .listFiles((FilenameFilter) new WildcardFileFilter(\n wildcards));\n }\n int idx = 0;\n for (File child : childFiles) {\n if (child.isDirectory() && directoryContainsConfig(child)) {\n File configFile = new File(child, \"config.properties\");\n Properties prop = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(configFile);\n prop.load(in);\n \n String parent = prop.getProperty(PARENT_CFG);\n if(parent != null) {\n \tFile parentFile = new File(child, parent);\n \tif(parentFile.exists()) {\n \t\tprop.clear();\n \t\tprop.load(new FileInputStream(parentFile));\n \t\tprop.load(new FileInputStream(configFile));\n \t}\n }\n \n if (isSupportedTestType(prop)) {\n Object[] data = extractDataFromConfig(configFile,\n rootProp, prop);\n result.add(data);\n String testName = idx + \"-\" + data[1].toString();\n ((BaseSignatureTestData)data[2]).setUniqueUnitTestName(testName);\n idx++;\n }\n } catch (IOException e) {\n logger.warn(\n \"Could not run test with config:\"\n + configFile.getAbsolutePath(), e);\n } finally {\n if (in != null)\n IOUtils.closeQuietly(in);\n }\n }\n }\n return result;\n }", "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }", "protected abstract List<List<SearchResults>> processStream();", "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 }", "private List<File> getContents(String whichFiles) {\n List<File> result = new ArrayList<File>();\n Files f1 = mService.files();\n Files.List request = null;\n\n do {\n try { \n request = f1.list();\n // get the language folders from drive\n request.setQ(whichFiles);\n FileList fileList = request.execute();\n \n result.addAll(fileList.getItems());\n request.setPageToken(fileList.getNextPageToken());\n } catch (UserRecoverableAuthIOException e) {\n startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);\n } catch (IOException e) {\n e.printStackTrace();\n if (request != null) \n request.setPageToken(null);\n }\n } while ((request.getPageToken() != null) \n && (request.getPageToken().length() > 0));\n \n return result;\n }", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\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};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "public static List<String> getData(String fileNameLocation) {\n\t\tString fileName = fileNameLocation;\n\t\t// ArrayList r = new ArrayList();\n\t\tList<String> readtext = new ArrayList();\n\t\t// This will reference one line at a time\n\t\tString line = null;\n\t\ttry {\n\t\t\t// - FileReader for text files in your system's default encoding\n\t\t\t// (for example, files containing Western European characters on a\n\t\t\t// Western European computer).\n\t\t\t// - FileInputStream for binary files and text files that contain\n\t\t\t// 'weird' characters.\n\t\t\tFileReader fileReader = new FileReader(fileName);\n\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\tint index = 0;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\treadtext.add(line);\n\t\t\t\t// System.out.println(line);\n\t\t\t}\n\t\t\t// Always close files.\n\t\t\tbufferedReader.close();\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tSystem.out.println(\"Unable to open file '\" + fileName + \"'\");\n\t\t} catch (IOException ex) {\n\t\t\tSystem.out.println(\"Error reading file '\" + fileName + \"'\");\n\t\t\t// Or we could just do this: // ex.printStackTrace(); }\n\t\t}\n\t\t// System.out.println(\"Results after stored to array\" +\n\t\t// readtext..toString());\n\t\t// for (String string : readtext) {\n\t\t// System.out.println(string);\n\t\t// }\n\t\treturn readtext;\n\t}", "protected List<String> readFile()\n {\n // Base size 620 for Google KML icons. This might be slow for larger\n // sets.\n List<String> lines = New.list(620);\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(getClass().getResourceAsStream(myImageList), StringUtilities.DEFAULT_CHARSET)))\n {\n for (String line = reader.readLine(); line != null; line = reader.readLine())\n {\n lines.add(line);\n }\n }\n catch (IOException e)\n {\n LOGGER.warn(e.getMessage());\n }\n return lines;\n }", "java.util.List<entities.Torrent.ChunkInfo>\n getChunksList();", "private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }", "public ArrayList getChunks() {\n ArrayList tmp = new ArrayList();\n for (Iterator i = iterator(); i.hasNext(); ) {\n tmp.addAll(((Element) i.next()).getChunks());\n }\n return tmp;\n }", "List readFile(String pathToFile);", "public List< IJob > getJobs( int maxAmount )\n {\n String fileName;\n String refFileName;\n URI fileURI;\n byte[] referenceData = null;\n InputStream ISrefData = null;\n DocumentBuilderFactory docBuilderFactory;\n DocumentBuilder docBuilder = null;\n Document doc;\n \n docBuilderFactory = DocumentBuilderFactory.newInstance();\n try\n {\n docBuilder = docBuilderFactory.newDocumentBuilder();\n }\n catch( ParserConfigurationException pce )\n {\n log.error( pce.getMessage() );\n }\n doc = docBuilder.newDocument();\n \n List<IJob> list = new ArrayList<IJob>();\n for( int i = 0; i < maxAmount && iter.hasNext() ; i++ )\n {\n fileName = (String)iter.next();\n refFileName = fileName.substring( 0, fileName.lastIndexOf( \".\" ) ) + \".ref\";\n //System.out.println( String.format( \"created ref name %s for file %s\", refFileName, fileName ) );\n File refFile = FileHandler.getFile( refFileName );\n if ( refFile.exists() )\n {\n try\n {\n ISrefData = FileHandler.readFile( refFileName );\n }\n catch( FileNotFoundException fnfe )\n {\n log.error( String.format( \"File for path: %s couldnt be read\", refFileName ) );\n }\n try\n {\n doc = XMLUtils.getDocument( new InputSource( ISrefData ) );\n }\n catch( ParserConfigurationException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( SAXException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( IOException ex )\n {\n log.error( ex.getMessage() );\n }\n \n File theFile = FileHandler.getFile( fileName );\n \n list.add( (IJob) new Job( new FileIdentifier( theFile.toURI() ), doc ) );\n }\n else\n {\n log.warn( String.format( \"the file: %s has no .ref file\", fileName ) );\n i--;\n }\n }\n return list;\n \n }", "public abstract List<String> getFiles( );", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "public List<Task> readFile() throws FileNotFoundException, DukeException {\n List<Task> output = new ArrayList<>();\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n output.add(readTask(sc.nextLine()));\n }\n return output;\n }", "@Override\n\tpublic List<FileVO> getFile(int work_num) {\n\t\treturn workMapper.getFile(work_num);\n\t}", "List<T> getResults();", "@Override\n public void run() {\n try {\n File file;\n while ((file = queue.poll(100, TimeUnit.MILLISECONDS)) != null) {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.contains(searchString)) {\n // Synchronization requires because of many threads are writing into results.\n synchronized (results) {\n results.add(file.getAbsolutePath());\n break;\n }\n }\n }\n }\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n }", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "private void readFileList() throws IOException {\n\t\tint entries = metadataFile.readInt();\n\n\t\tfor (int i = 0; i < entries; i++) {\n\t\t\tint hash = metadataFile.readInt();\n\t\t\tlong dataOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tlong dataSize = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathListIndex = metadataFile.readInt();\n\n\t\t\tlong position = metadataFile.getPosition();\n\t\t\tmetadataFile.setPosition(pathListOffset + 8 + (pathListIndex * 8));\n\n\t\t\tlong pathOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathSize = metadataFile.readInt();\n\n\t\t\tmetadataFile.setPosition(pathListOffset + pathOffset);\n\t\t\tString path = metadataFile.readString(pathSize).trim();\n\n\t\t\tif (hash == hash(path)) \n\t\t\t\tfileEntries.add(new RAFFileEntry(dataOffset, dataSize, path));\n\t\t\telse\n\t\t\t\tthrow new IOException(\"Invalid hash for item '\" + path + \"'.\");\n\n\t\t\tmetadataFile.setPosition(position);\n\t\t}\n\t}", "public ArrayList<?> getItems(String filename){\n \n try {\n FileInputStream fis = new FileInputStream(filename);\n ObjectInputStream ois = new ObjectInputStream(fis);\n items = (ArrayList<?>) ois.readObject();\n ois.close();\n \n \n }catch(IOException e){\n System.out.println(e);\n }catch(ClassNotFoundException e){\n System.out.println(e);\n }\n \n return items;\n }", "java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> \n getEntryList();", "@Override\n\tprotected List<String> performScanning(String inputFilePath) {\n\t\tList<String> resultList = App.fileParser(inputFilePath);\n\t\treturn resultList;\n\t}", "private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "@Override\n protected List<String> doInBackground(Void... params) {\n File file = new File(getApplicationContext().getFilesDir(), FILENAME);\n BufferedReader reader = null;\n List<String> list = new ArrayList<>();\n try {\n reader = new BufferedReader(new FileReader(file));\n String s;\n int progress = 0;\n while ((s = reader.readLine()) != null) {\n list.add(s);\n Thread.sleep(250);\n progress += 10;\n publishProgress(progress);\n }\n }\n catch (IOException | InterruptedException ex) {\n Log.e(LOG_TAG, \"loadFile:\" + ex.toString());\n }\n finally {\n if (reader != null) {\n try {\n reader.close();\n }\n catch(IOException ex) {\n // do nothing\n }\n }\n }\n return list;\n }", "private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}", "public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }", "public List<AudioInformation> getAudioInformationFunction(String path){\n File folder = new File(path);\n File[] listOfFiles = folder.listFiles((FileFilter) null);// get all files in folder\n if(listOfFiles!=null){\n int size = listOfFiles.length;\n numberOfFilesToProcess = numberOfFilesToProcess + size;\n if(progressBar!=null) {\n progressBar.setFilesToProcess(numberOfFilesToProcess);\n }\n\n for (int count = 0; count < size; count++) {\n File file = listOfFiles[count];\n boolean read=false;\n if (!(file.getName().charAt(0) == exclude)) { // if starts with exclude charcter ignore\n if (file.isFile()) {\n boolean isAudioFile = utilities.isAudioFile(file); // check if file is audio file\n if (isAudioFile == true) {\n AudioInformation information=extractAudioInformation.extractAudioInformationFromFile(file);\n if(onCD==true) {\n information.setWriteFieldsToFile(false);\n }\n\n informationList.add(information);\n\n }\n else if(utilities.getExtensionOfFile(file).equalsIgnoreCase(\"cue\")){\n try {\n CueSheet cueSheet=extractAudioInformation.getCueSheet(file);\n List<AudioInformation> tracks=cueSheet.getTracks();\n informationList.addAll(tracks);\n } catch (CueSheetExeception cueSheetExeception) {\n cueSheetExeception.printStackTrace();\n errorMessages.add(cueSheetExeception.getMessage());\n }\n }\n numberOfFilesProcessed++;\n if(progressBar!=null) {\n progressBar.setFilesProcessed(numberOfFilesProcessed);\n }\n } else if (file.isDirectory()) {\n numberOfFilesProcessed++;\n if(progressBar!=null) {\n\n progressBar.setFilesProcessed(numberOfFilesProcessed);\n }\n\n getAudioInformationFunction(listOfFiles[count].getPath());\n }\n if(updateLabel!=null) {\n updateLabel.setText(numberOfFilesToProcess + \" of \" + numberOfFilesToProcess + \"Files Processed\");\n }\n\n }\n }\n }\n return informationList;\n }", "public List<File> getFileChunks(Context context, File file, final int chunkSize)\n throws IOException {\n final byte[] buffer = new byte[chunkSize];\n\n //try-with-resources to ensure closing stream\n try (final FileInputStream fis = new FileInputStream(file);\n final BufferedInputStream bis = new BufferedInputStream(fis)) {\n final List<File> buffers = new ArrayList<>();\n int size;\n while ((size = bis.read(buffer)) > 0) {\n buffers.add(writeToFile(context, Arrays.copyOf(buffer, size), file.getName(),\n getFileExt(file.getName())));\n }\n return buffers;\n }\n }", "public void readfiles1(String file_name){\n \n\n try{\n File fname1 = new File(file_name);\n Scanner sc = new Scanner(fname1);\n \n while (sc.hasNext()){\n String temp = sc.nextLine();\n String[] sts = temp.split(\" \");\n outs.addAll(Arrays.asList(sts));\n\n }\n\n // for (int i = 0;i<outs.size();i++){\n // System.out.println(outs.get(i));\n //}\n\n }catch(Exception ex){\n System.out.println(ex.getMessage());\n }\n }", "ds.hdfs.generated.FileMetadata getFiles(int index);", "List<F> getChunks();", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "static void getResults2(String root) throws IOException {\n\t\tint k = 1;\n\t\twhile (k <= 1) {\n\t\t\tint j = 1;\n\t\t\tString line;\n\t\t\tString multi = \"\";\n\t\t\tSystem.out.println(\"M\" + k);\n\n\t\t\twhile (j <= 10) {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(root\n\t\t\t\t\t\t+ \"M1/M1.1/Testbeds-\" + j + \"/Generated/PSL//test/Precision/multi.txt\")));\n\n\t\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\tmulti += line;\n\t\t\t\t\tSystem.out.print(line + \",\");\n\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}", "private static ArrayList<String> fetchSaved() {\n\t\tScanner s;\n\t\tint count = 0;\n\t\tArrayList<String> savedList = new ArrayList<String>();\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"saved.txt\"));\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tsavedList.add(s.next());\n\t\t\t\tcount += 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of converted urls fetched: \" + count);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn savedList;\n\t}", "public List<String> getFileContent() {\r\n\t\tTextFileProcessor proc = new TextFileProcessor();\r\n\t\tthis.processFile(proc);\r\n\t\treturn proc.strList;\r\n\t}", "private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}", "public ArrayList<String> read_file() {\n prog = new ArrayList<>();\n //Read file\n try {\n\n File myObj = new File(\"in3.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n if (data.charAt(0) != '.') {\n// System.out.println(data);\n prog.add(data);\n } else {\n continue;\n// data = data.substring(1);\n// System.out.println(\"{{ \" + data + \" }}\");\n }\n\n }\n myReader.close();\n\n } catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n return prog;\n }", "public File[] writeChunks(String save, int chunkSize) throws IOException {\n\t\tCollection<File> rtrn=new TreeSet<File>();\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(this.fastqFile)));\n\t\tString nextLine;\n\t\tFileWriter writer=new FileWriter(save+\".0.fq\");\n \tint i=0;\n while ((nextLine = reader.readLine()) != null && (nextLine.trim().length() > 0)) {\n \tif(nextLine.startsWith(\"@\")){\n \t\tif(i%chunkSize ==0){\n \t\t\twriter.close();\n \t\t\trtrn.add(new File(save+\".\"+(i/chunkSize)+\".fq\")); \n \t\t\twriter=new FileWriter(save+\".\"+(i/chunkSize)+\".fq\"); \n \t\t\tSystem.err.println(i);\n \t\t}\n \t\tString firstLine=nextLine;\n \t\tString secondLine=reader.readLine();\n \t\tString thirdLine=reader.readLine();\n \t\tString fourthLine=reader.readLine();\n \t\t\n \t\tFastqSequence seq=new FastqSequence(firstLine, secondLine, thirdLine, fourthLine);\n \t\t//String sequence=seq.getSequence();\n \t\twriter.write(seq.toFastq()+\"\\n\");\n \t\ti++;\n \t\tif(i % 100000 == 0){System.err.println(\"Iterating.. \"+ i);}\n \t}\n \t\n \t\n }\n this.numberOfSeq=i;\n File[] files=new File[rtrn.size()];\n int counter=0;\n for(File file: rtrn){files[counter++]=file;}\n\t\treturn files;\n\t}", "public static void read6() {\n List<String> list = new ArrayList<>();\n\n try (BufferedReader br = Files.newBufferedReader(Paths.get(filePath))) {\n\n //br returns as stream and convert it into a List\n list = br.lines().collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public abstract List<LocalFile> getAllFiles();", "public float[] accumulateDetailFiles(ArrayList<File> files){\r\n\t\tfloat[] values = new float[100];\r\n\t\tint counter = 0;\r\n\r\n\t for(File file:files){\t\t\r\n\t \tSystem.out.println(file.getName());\r\n\t \tcounter = 0;\r\n\t BufferedReader reader;\r\n\t try{\r\n\t reader = new BufferedReader(new FileReader(file));\r\n\t String line = reader.readLine(); \r\n\t while(line != null){\t\r\n\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t \t\tString[] values2 = line.split(\" \");\r\n\t \t\tvalues[counter] += Float.valueOf(values2[values2.length-1]);\r\n\t\t \tcounter++;\r\n\t \t}\r\n\t \tline = reader.readLine();\r\n\t }\r\n\t \r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t}\r\n\t }\r\n\r\n\t float[] returnValues = new float[counter];\r\n\t \r\n\t for(int j = 0; j < returnValues.length; j++) \treturnValues[j] = ((float)values[j]/files.size());\r\n\t\r\n\t \r\n \treturn returnValues;\r\n\t}", "IIndexFragmentFile[] getFiles(IIndexFileLocation location) throws CoreException;", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public List<ScorerDoc> get_results(){\n\t\tList<ScorerDoc> docs_array = new ArrayList<ScorerDoc>();\n\t\twhile (!queue.isEmpty())\n\t\t\tdocs_array.add(queue.poll());\n\t\t\n\t\tCollections.reverse(docs_array);\n\t\treturn docs_array;\n\t}", "@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }", "public getListFile_result(getListFile_result other) {\n if (other.isSetSuccess()) {\n List<String> __this__success = new ArrayList<String>(other.success);\n this.success = __this__success;\n }\n }", "public List<String> readFileContents(String filePath) throws APIException;", "int retrieve(FileInputSplit fileInputSplit);", "public List<String> readFileIntoList(String filepath) throws IOException;", "public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}", "private static List<Path> listChunkableFiles(FileSystem fs) throws IOException {\r\n\r\n List<Path> resultMediaPathList = new ArrayList<Path>();\r\n\r\n Path mediaFolderInsideZipPath = getMediaDirectoryPath(fs);\r\n // list the contents of the result /media/ folder\r\n try (DirectoryStream<Path> mediaDirectoryStream = Files.newDirectoryStream(mediaFolderInsideZipPath)) {\r\n // for every file in the result /media/ folder\r\n // note: NOT expecting any subfolders\r\n for (Path mediaFilePath : mediaDirectoryStream) {\r\n if (BMPUtils.CHUNKABLE_IMAGE_FILE_EXTENSIONS.contains(FileUtils.getFileExtension(mediaFilePath.toString()))) {\r\n resultMediaPathList.add(mediaFilePath);\r\n }\r\n }\r\n }\r\n\r\n return resultMediaPathList;\r\n }", "java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();", "@Override\n protected List<String> compute() {\n List<String> fileNames = new ArrayList<>();\n\n // FolderProcessor tasks to store the sub-tasks that are going to process the sub-folders stored inside folder.\n List<FolderProcessor> subTasks = new ArrayList<>();\n\n // Get the content of the folder.\n File file = new File(path);\n File content[] = file.listFiles();\n\n //For each element in the folder, if there is a subfolder, create a new FolderProcessor object\n //and execute it asynchronously using the fork() method.\n for (int i = 0; i < content.length; i++) {\n if (content[i].isDirectory()) {\n FolderProcessor task = new FolderProcessor(content[i].getAbsolutePath(), extension);\n task.fork();\n subTasks.add(task);\n } else {\n //Otherwise, compare the extension of the file with the extension you are looking for using the checkFile() method\n //and, if they are equal, store the full path of the file in the list of strings declared earlier.\n\n if (checkFile(content[i].getName())) {\n fileNames.add(content[i].getAbsolutePath());\n }\n }\n }\n\n //If the list of the FolderProcessor sub-tasks has more than 50 elements,\n //write a message to the console to indicate this circumstance.\n if (subTasks.size() > 50) {\n System.out.printf(\"%s: %d tasks ran.\\n\", file.getAbsolutePath(), subTasks.size());\n }\n\n // Add the results from the sub-tasks.\n addResultsFrommSubTasks(fileNames, subTasks);\n\n return fileNames;\n }", "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 }", "java.util.List<java.lang.Double> getFileList();", "List<DownloadChunk> mo54445j(int i);", "public List findOutputFiles(long _requestId) throws RequestManagerException, PersistenceResourceAccessException;", "private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }", "abstract public Entity[] getWorkDataFromFile(String filename)\n \tthrows IOException, InvalidStatusException;", "public List<File> getFiles();", "public ArrayList<String> createStringArray() throws Exception {\n ArrayList<String> stringsFromFile = new ArrayList<>();\n while (reader.hasNext()) {\n stringsFromFile.add(reader.nextLine());\n }\n return stringsFromFile;\n }" ]
[ "0.65348774", "0.6311678", "0.62003183", "0.6179356", "0.6166174", "0.61024266", "0.6045928", "0.5983536", "0.596552", "0.5926924", "0.5917928", "0.58939636", "0.5860449", "0.58398974", "0.5814752", "0.58136255", "0.5803285", "0.5774292", "0.5774292", "0.5772641", "0.57577795", "0.5734023", "0.56961006", "0.5690281", "0.56891185", "0.568877", "0.5674395", "0.5662235", "0.5652152", "0.56509674", "0.5612476", "0.5611153", "0.5604655", "0.55991083", "0.55961585", "0.55940986", "0.55830306", "0.55808246", "0.5578271", "0.55735075", "0.55589557", "0.555499", "0.5551513", "0.55360955", "0.55269545", "0.55224204", "0.5518746", "0.5512149", "0.5504905", "0.5504677", "0.55005354", "0.54997826", "0.5498818", "0.549149", "0.54805464", "0.5478655", "0.5478205", "0.5467905", "0.54678035", "0.54646444", "0.54642516", "0.5462772", "0.5458038", "0.54520684", "0.5448195", "0.54406214", "0.544054", "0.54405034", "0.54348195", "0.5430199", "0.5421561", "0.5421145", "0.5420481", "0.54134876", "0.5411479", "0.53893435", "0.5385681", "0.53826857", "0.5380908", "0.5377893", "0.5375251", "0.53746986", "0.537276", "0.5370374", "0.5370074", "0.5365862", "0.5365171", "0.53639644", "0.5358862", "0.5350919", "0.53499705", "0.5349484", "0.5343961", "0.53378063", "0.5337138", "0.533694", "0.5321099", "0.5318501", "0.53140515", "0.53090286" ]
0.82343173
0
end getResults method Method sanitizeAndSplit Purpose: Split the key value pairs back up and save into String Array Read in all chunk file into one StringArray and combine counts for like keys Save into a hashMap
public static void sanitizeAndSplit(ArrayList<String> myChunk){ //Variables String myStringArray[] = {}; try { //step through string array and put key value pairs into a string for(String temp : myChunk){ //Split the key and values as put into hashMap if(temp != null) { myStringArray = temp.split("\\s+"); Word word = hm.get(myStringArray[0]); if(word == null) { hm.put(myStringArray[0], new Word(myStringArray[0], Integer.parseInt(myStringArray[1]))); } else{ hm.get(myStringArray[0]).addToCount(Integer.parseInt(myStringArray[1])); } } } } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "public void reduce(IntWritable key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n HashMap<String, ArrayList<String>> hm = new HashMap<String, ArrayList<String>>();\n\n //ArrayList<String> tableS = new ArrayList<String>(); Trying to reduce memory\n ArrayList<String> tableT = new ArrayList<String>();\n\n //group the records in the iterator into table S and table T\n for(Text val : values){\n String record = val.toString();\n int i = record.indexOf(\" \");\n String tag = record.substring(0,i);\n String value = record.substring(i+1);\n\n if (tag.contentEquals(\"S\")) {\n //get the key-value information\n int j = value.indexOf(\" \");\n String tagKey = value.substring(0,j);\n String mapValue = value.substring(j+1);\n\n //if the key doesn't exist\n if (!hm.containsKey(tagKey)) {\n ArrayList<String> list = new ArrayList<String>();\n list.add(mapValue);\n hm.put(tagKey, list);\n } else {\n //same key exists, then add it to the array list\n hm.get(tagKey).add(mapValue);\n }\n } else if(tag.contentEquals(\"T\")) {\n tableT.add(value);\n }\n }\n\n// for (String s : tableS){\n// int i = s.indexOf(\" \");\n// String keyValue = s.substring(0, i);\n// //if the key doesn't exist\n// if (!hm.containsKey(keyValue)) {\n// ArrayList<String> list = new ArrayList<String>();\n// list.add(s.substring(i+1));\n// hm.put(keyValue, list);\n// } else {\n// //same key exists, then add it to the array list\n// hm.get(keyValue).add(s.substring(i+1));\n// }\n// }\n\n //then iterate through the other table to produce the result\n for (String t : tableT) {\n //check to see if there's a match\n int i = t.indexOf(\" \");\n String hashKey = t.substring(0, i);\n if (!hm.containsKey(hashKey)) {\n //no match and don't do anything\n } else {\n //match\n for (String s : hm.get(hashKey)) {\n String result = s + \" \" + hashKey + \":\" + t;\n context.write(key, new Text(result));\n }\n }\n }\n }", "public void splitData(String fullData){\n\t\t\n\t\tDictionary<String> strings = new Dictionary<>();\n\t\tDictionary<Float> floats = new Dictionary<>();\n\t\tDictionary<Boolean> booleans = new Dictionary<>();\n\t\t\n\t\tList<String> lines = new ArrayList<>(Arrays.asList(fullData.split(\"\\n\")));\n\t\t\n\t\tString[] labels = lines.get(0).split(\",\");\n\t\tlines.remove(0);\n\t\t\n\t\tfor(String line: lines){\n\t\t\tString[] data = line.split(\",\");\n\t\t\t\n\t\t\tfor(int i=0;i<data.length;i++){\n\t\t\t\t\n\t\t\t\t//placeholder since current data has no actual booleans\n\t\t\t\tif(labels[i].equals(\"autoBaselineGroup\") || labels[i].equals(\"autoGear\") || labels[i].equals(\"Did Climb\") || labels[i].equals(\"died\") || labels[i].equals(\"defense\")){\n\t\t\t\t\tif(data[i].equals(\"1\")){\n\t\t\t\t\t\tbooleans.add(labels[i], true);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tbooleans.add(labels[i], false);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check what type it is\n\t\t\t\tSystem.out.println(number);\n\t\t\t\ttry{\n\t\t\t\t\tswitch(labels[i]){\n\t\t\t\t\tcase \"Round\":\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tcase \"Date and Time Of Match\":\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tcase \"UUID\":\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfloats.add(labels[i], Float.parseFloat(data[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t} catch(NumberFormatException e){\n\t\t\t\t\t//not an int, check for bool\n\t\t\t\t\t\n\t\t\t\t\tif(data[i].toLowerCase().contains(\"true\")){\n\t\t\t\t\t\tbooleans.add(labels[i], true);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(data[i].toLowerCase().contains(\"false\")){\n\t\t\t\t\t\tbooleans.add(labels[i], false);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//must be string\n\t\t\t\t\tdata[i] = \"\\n\\t\"+data[i];\n\t\t\t\t\tdata[i] = data[i].replace(\"|c\", \",\").replace(\"|n\", \"\\n\\t\").replace(\"||\", \"|\").replace(\"|q\", \"\\\"\").replace(\"|;\", \":\");\n\t\t\t\t\tstrings.add(labels[i], data[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint matchNum = getMatchNum(line, labels);\n\t\t\t\n\t\t\tMatch r = new Match(number, matchNum, \"TIME\");\n\t\t\tr.setData(strings, floats, booleans);\n\t\t\tmatches.add(r);\n\t\t\t\n\t\t\tstrings = new Dictionary<>();\n\t\t\tfloats = new Dictionary<>();\n\t\t\tbooleans = new Dictionary<>();\n\t\t}\n\t}", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "private void readPhrases() {\n\t\tphrases = new HashMap<String, String>();\n\t\tcounter = new HashMap<String, Integer>();\n\n\t\tBufferedReader br = null;\n\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t\tfor (String line; (line = br.readLine()) != null;) {\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line, \"|\");\n\n\t\t\t\twhile (tokenizer.hasMoreTokens()) {\n\t\t\t\t\tString phrase = tokenizer.nextToken();\n\t\t\t\t\tString key = StringUtils.getMd5Hash(phrase);\n\n\t\t\t\t\tif (phrases.containsKey(key)) {\n\t\t\t\t\t\tint count = counter.get(key);\n\t\t\t\t\t\tcounter.put(key, ++count);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tphrases.put(key, phrase);\n\t\t\t\t\t\tcounter.put(key, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalAccessError(\"Error reading input [\"\n\t\t\t\t\t+ input.getName() + \"]\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t}", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public void processFile(File rootFile) throws IOException {\n\t\tBufferedReader bf=new BufferedReader(new FileReader(rootFile));\r\n\t\tString lineTxt = null;\r\n\t\tint pos=1;\r\n\t\twhile((lineTxt = bf.readLine()) != null){\r\n String[] line=lineTxt.split(\" \");\r\n// System.out.println(line[0]);\r\n String hscode=line[0];\r\n \r\n \r\n TreeMap<String,Integer> word=null;\r\n if(!map.containsKey(hscode)){\r\n word=new TreeMap<String,Integer>();\r\n for(int i=1;i<line.length;i++){\r\n \tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n }\r\n map.put(hscode, word);\r\n }\r\n else{\r\n //\tSystem.out.println(\"sss\");\r\n \tword = map.get(hscode);\r\n \tfor(int i=1;i<line.length;i++){\r\n \t\tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n \t}\r\n \t\r\n \tmap.put(hscode, word);\r\n \t\r\n }\r\n\t\t}\r\n\t\tbf.close();\r\n//\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n//// \tSystem.out.println(\"hscode:\"+entry.getKey());\r\n// \tTreeMap<String, Integer> value = entry.getValue();\r\n// \tfor(Entry<String,Integer> e:value.entrySet()){\r\n//// \tSystem.out.println(\"单词\"+e.getKey()+\" 词频是\"+e.getValue());\r\n// \t}\r\n// }\r\n\t}", "public static Map readingFilesMap(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n*/\n Map map = lines.collect(Collectors.toMap(\n line -> line.substring(line.lastIndexOf(\" \")),\n line -> line.substring(0, line.lastIndexOf(\" \"))\n ));//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n map.forEach((k, v) -> {\n System.out.println(\"key:\"+k+ \" Value=\"+v);\n } );\n return map;\n\n //set.forEach(System.out::print);\n\n\n }", "public void mergefiles()\n {\n LinkedHashMap<String, Integer> count = new LinkedHashMap<>();\n for(int i=0;i<files_temp.size();i++)\n {\n \t\t\n //System.out.println(\"here in merge files for\");\n \t//int index = files_temp.get(i).lastIndexOf(\"\\\\\");\n\t\t\t//System.out.println(index);\n \tSystem.out.println(files_temp.get(i));\n File file = new File(files_temp.get(i)+\"op.txt\");\n Scanner sc;\n try {\n //System.out.println(\"here in merge files inside try\");\n sc = new Scanner(file);\n sc.useDelimiter(\" \");\n while(sc.hasNextLine())\n {\n //System.out.println(\"Inwhile \");\n List<String> arr = new ArrayList<String>();\n arr=Arrays.asList(sc.nextLine().replaceAll(\"[{} ]\", \"\").replaceAll(\"[=,]\", \" \").split(\" \"));\n //System.out.println(arr.get(0));\n for(int j=0;j<arr.size()-1;j=j+2) \n {\n System.out.println(arr.get(j));\n if(arr.get(j).length()!=0 && arr.get(j+1).length()!=0)\n {\n if (count.containsKey(arr.get(j))) \n {\n int c = count.get(arr.get(j));\n count.remove(arr.get(j));\n count.put(arr.get(j),c + Integer.valueOf(arr.get(j+1)));\n }\n else \n {\n count.put(arr.get(j),Integer.valueOf(arr.get(j+1)));\n }\n }\n }\n }\n }\n catch(Exception E) \n {\n System.out.println(E);\n }\n }\n //System.out.println(count);\n count.entrySet()\n .stream()\n .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))\n .forEachOrdered(x -> sorted.put(x.getKey(), x.getValue()));\n System.out.println(sorted);\n PrintWriter writer;\n\t\ttry {\n\t\t\twriter = new PrintWriter(\"results.txt\", \"UTF-8\");\n\t\t\tIterator it = sorted.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tMap.Entry pairs = (Map.Entry) it.next();\n\t\t\t\t\twriter.println(pairs.getValue() + \" : \" + pairs.getKey());\n\t\t\t\t\tthis.result.println(pairs.getValue() + \" : \" + pairs.getKey());\n\t\t\t}\n\t\t writer.close();\n\t\t}\n catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n }", "public void processData() {\n\t\t SamReader sfr = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.LENIENT).open(this.inputFile);\n\t\t \n\t\t\t\n\t\t\t//Set up file writer\n\t\t SAMFileWriterFactory sfwf = new SAMFileWriterFactory();\n\t\t sfwf.setCreateIndex(true);\n\t\t SAMFileWriter sfw = sfwf.makeSAMOrBAMWriter(sfr.getFileHeader(), false, this.outputFile);\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\t//counters\n\t\t\tint totalReads = 0;\n\t\t\tint trimmedReads = 0;\n\t\t\tint droppedReads = 0;\n\t\t\tint dropTrimReads = 0;\n\t\t\tint dropMmReads = 0;\n\t\t\t\n\t\t\t//Containers\n\t\t\tHashSet<String> notFound = new HashSet<String>();\n\t\t\tHashMap<String, SAMRecord> mateList = new HashMap<String,SAMRecord>();\n\t\t\tHashSet<String> removedList = new HashSet<String>();\n\t\t\tHashMap<String,SAMRecord> editedList = new HashMap<String,SAMRecord>();\n\t\t\t\n\t\t\tfor (SAMRecord sr: sfr) {\n\t\t\t\t//Messaging\n\t\t\t\tif (totalReads % 1000000 == 0 && totalReads != 0) {\n\t\t\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Currently storing mates for %d reads.\",totalReads,trimmedReads,droppedReads,mateList.size()));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttotalReads += 1;\n\t\t\t\t\n\t\t\t\tString keyToCheck = sr.getReadName() + \":\" + String.valueOf(sr.getIntegerAttribute(\"HI\"));\n\t\t\t\n\t\t\t\t//Make sure chromsome is available\n\t\t\t\tString chrom = sr.getReferenceName();\n\t\t\t\tif (!this.refHash.containsKey(chrom)) {\n\t\t\t\t\tif (!notFound.contains(chrom)) {\n\t\t\t\t\t\tnotFound.add(chrom);\n\t\t\t\t\t\tMisc.printErrAndExit(String.format(\"Chromosome %s not found in reference file, skipping trimming step\", chrom));\n\t\t\t\t\t}\n\t\t\t\t} else if (!sr.getReadUnmappedFlag()) {\n\t\t\t\t\tString refSeq = null;\n\t\t\t\t\tString obsSeq = null;\n\t\t\t\t\tList<CigarElement> cigar = null;\n\t\t\t\t\t\n\t\t\t\t\t//Get necessary sequence information depending on orientation\n\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\trefSeq = this.revComp(this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd()));\n\t\t\t\t\t\tobsSeq = this.revComp(sr.getReadString());\n\t\t\t\t\t\tcigar = this.reverseCigar(sr.getCigar().getCigarElements());\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\trefSeq = this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd());\n\t\t\t\t\t\tobsSeq = sr.getReadString();\n\t\t\t\t\t\tcigar = sr.getCigar().getCigarElements();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Get alignments\n\t\t\t\t\tString[] alns = this.createAlignmentStrings(cigar, refSeq, obsSeq, totalReads);\n\t\t\t\t\t\n\t\t\t\t\t//Identify Trim Point\n\t\t\t\t\tint idx = this.identifyTrimPoint(alns,sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\n\t\t\t\t\t//Check error rate\n\t\t\t\t\tboolean mmPassed = false;\n\t\t\t\t\tif (mmMode) {\n\t\t\t\t\t\tmmPassed = this.isPoorQuality(alns, sr.getReadNegativeStrandFlag(), idx);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Create new cigar string\n\t\t\t\t\tif (idx < minLength || mmPassed) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsr.setAlignmentStart(0);\n\t\t\t\t\t\tsr.setReadUnmappedFlag(true);\n\t\t\t\t\t\tsr.setProperPairFlag(false);\n\t\t\t\t\t\tsr.setReferenceIndex(-1);\n\t\t\t\t\t\tsr.setMappingQuality(0);\n\t\t\t\t\t\tsr.setNotPrimaryAlignmentFlag(false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMateUnmapped(mateList.get(keyToCheck)));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tremovedList.add(keyToCheck);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tdroppedReads += 1;\n\t\t\t\t\t\tif (idx < minLength) {\n\t\t\t\t\t\t\tdropTrimReads += 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdropMmReads += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (idx+1 != alns[0].length()) {\n\t\t\t\t\t\ttrimmedReads++;\n\t\t\t\t\t\tCigar oldCig = sr.getCigar();\n\t\t\t\t\t\tCigar newCig = this.createNewCigar(alns, cigar, idx, sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\tsr.setCigar(newCig);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\t\tint newStart = this.determineStart(oldCig, newCig, sr.getAlignmentStart());\n\t\t\t\t\t\t\tsr.setAlignmentStart(newStart);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.verbose) {\n\t\t\t\t\t\t\tthis.printAlignments(sr, oldCig, alns, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMatePos(mateList.get(keyToCheck),sr.getAlignmentStart()));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\teditedList.put(keyToCheck,sr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(sr.getReadName());\n\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t//String rn = sr.getReadName();\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tif (editedList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMatePos(sr,editedList.get(keyToCheck).getAlignmentStart());\n\t\t\t\t\t\t\teditedList.remove(keyToCheck);\n\t\t\t\t\t\t} else if (removedList.contains(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMateUnmapped(sr);\n\t\t\t\t\t\t\tremovedList.remove(keyToCheck);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\t\tsfw.addAlignment(mateList.get(keyToCheck));\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmateList.put(keyToCheck, sr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Of the unmapped, %d were too short and %d had too many mismatches. Currently storing mates for %d reads.\",\n\t\t\t\t\ttotalReads,trimmedReads,droppedReads,dropTrimReads, dropMmReads, mateList.size()));\n\t\t\tSystem.out.println(String.format(\"Reads left in hash: %d. Writing to disk.\",mateList.size()));\n\t\t\tfor (SAMRecord sr2: mateList.values()) {\n\t\t\t\tsfw.addAlignment(sr2);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsfw.close();\n\t\t\ttry {\n\t\t\t\tsfr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\n\t}", "public HashMap<String, Integer> getHashMap(){\n\t\tHashMap <String, Integer> hm1 = new HashMap <String, Integer>();\n\t\t//get each line of the book and store it as an arrayList\n\t\twords = wordData.getLines();\n\t \n\t\tfor(int i =0; i<words.size(); i++){\n\t\t\t \n\t\t\tString[] aLine = words.get(i).split(\" \");\n\t\t\t\n\t\t\tfor(int j = 0; j<aLine.length; j++){\n\t\t\t\t\n\t\t\t\t// convert all upper case to lower case & remove all non-alphabetic symbols;\n\t\t\t\t\t\n\t\t\t\tsparsedWords.add(aLine[j].toLowerCase().replaceAll(\"[^\\\\w]\", \"\"));\n\t\t\t}\n\t\t}\n\t\t//put in key and value in hashmap\n\t\tfor(int key = 0; key < sparsedWords.size(); key++){\n\t\t\t\n\t\t\tif (hm1.containsKey(sparsedWords.get(key))){\n\t\t\t\tint count = hm1.get(sparsedWords.get(key));\n\t\t\t\thm1.put(sparsedWords.get(key), count + 1);\n\t\t\t}else{\n\t\t\t\thm1.put(sparsedWords.get(key), 1);\n\t\t\t}\n\t\t}\n\t\treturn hm1;\n\t\t \t\n\t\t}", "@Test\n\tpublic void testSplits() throws Exception {\n\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(IN));\n\t\tfor(int i = 0; i < 10000; i++) {\n\t\t\twriter.write(\"str1\" + \" \" + \"str2\" + \" \" + \"30\" + \" \" + \"4000\" + \"\\n\");\n\t\t}\n\t\twriter.close();\n\n\t\tSchema schema = new Schema(\"schema\", Fields.parse(\"a:string, b:string, c:int, d:long\"));\n\t\tInputFormat inputFormat = new TupleTextInputFormat(schema, false, false, ' ',\n\t\t TupleTextInputFormat.NO_QUOTE_CHARACTER, TupleTextInputFormat.NO_ESCAPE_CHARACTER,\n\t\t FieldSelector.NONE, TupleTextInputFormat.NO_NULL_STRING);\n\n\t\tConfiguration conf = getConf();\n\t\tconf.setLong(\"mapred.min.split.size\", 10 * 1024);\n\t\tconf.setLong(\"dfs.block.size\", 10 * 1024);\n\t\tconf.setLong(\"mapred.max.split.size\", 10 * 1024);\n\n\t\tFileSystem fS = FileSystem.get(conf);\n\t\tPath outPath = new Path(OUT);\n\n\t\tMapOnlyJobBuilder mapOnly = new MapOnlyJobBuilder(conf);\n\t\tmapOnly.addInput(new Path(IN), inputFormat,\n\t\t new MapOnlyMapper<ITuple, NullWritable, NullWritable, NullWritable>() {\n\n\t\t\t protected void map(ITuple key, NullWritable value, Context context) throws IOException,\n\t\t\t InterruptedException {\n\t\t\t\t Assert.assertEquals(\"str1\", key.get(\"a\").toString());\n\t\t\t\t Assert.assertEquals(\"str2\", key.get(\"b\").toString());\n\t\t\t\t Assert.assertEquals((Integer) 30, (Integer) key.get(\"c\"));\n\t\t\t\t Assert.assertEquals((Long) 4000l, (Long) key.get(\"d\"));\n\t\t\t\t context.getCounter(\"stats\", \"nlines\").increment(1);\n\t\t\t };\n\t\t });\n\n\t\tHadoopUtils.deleteIfExists(fS, outPath);\n\t\tmapOnly.setOutput(outPath, new HadoopOutputFormat(NullOutputFormat.class), NullWritable.class,\n\t\t NullWritable.class);\n\t\tJob job = mapOnly.createJob();\n\t\ttry {\n\t\t\tassertTrue(job.waitForCompletion(true));\n\t\t} finally {\n\t\t\tmapOnly.cleanUpInstanceFiles();\n\t\t}\n\n\t\tHadoopUtils.deleteIfExists(fS, new Path(IN));\n\n\t\tassertEquals(10000, job.getCounters().getGroup(\"stats\").findCounter(\"nlines\").getValue());\n\t}", "static void parseData(Map<String, Set<String>> sourceOutputStrings, Set<String> trueTuples) throws IOException{\n\t\tBufferedReader dataFile = new BufferedReader(new FileReader(DATAFILE));\n\t\t\n\t\tSet<String> bookSet = new HashSet<String>();\n\t\tSet<String> authorSet = new HashSet<String>();\n\t\tSet<String> tupleSet = new HashSet<String>();\n\t\tSet<String> sourceSet = new HashSet<String>();\n\t\t\n\t\tString s;\n\t\tSet<String> sourceBlackList = new HashSet<String>();\n\t\t// remove below books? increases isolated errors, although there should still be correlations between errors such as using first name\n\t\tsourceBlackList.add(\"A1Books\");\n\t\tsourceBlackList.add(\"Indoo.com\");\n\t\tsourceBlackList.add(\"Movies With A Smile\");\n\t\tsourceBlackList.add(\"Bobs Books\");\n\t\tsourceBlackList.add(\"Gunars Store\");\n\t\tsourceBlackList.add(\"Gunter Koppon\");\n\t\tsourceBlackList.add(\"Quartermelon\");\n\t\tsourceBlackList.add(\"Stratford Books\");\n\t\tsourceBlackList.add(\"LAKESIDE BOOKS\");\n\t\tsourceBlackList.add(\"Books2Anywhere.com\");\n\t\tsourceBlackList.add(\"Paperbackshop-US\");\n\t\tsourceBlackList.add(\"tombargainbks\");\n\t\tsourceBlackList.add(\"Papamedia.com\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\t\n\t\tPattern pattern = Pattern.compile(\"[^a-z]\", Pattern.CASE_INSENSITIVE);\n\t\twhile ((s = dataFile.readLine()) != null) {\n\t\t\tif (s.indexOf('\\t') == -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length != 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String sourceId = fields[0];\n\t\t\tif (sourceBlackList.contains(sourceId)) {\n\t\t\t\t//continue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[1];\n\t\t\tfinal String authorString = fields[3];\n\t\t\tList<String> authorList = parseAuthorString(authorString);\n\t\t\t\n\t\t\tbookSet.add(bookId);\n\t\t\tauthorSet.addAll(authorList);\n\t\t\tsourceSet.add(sourceId);\n\t\t\tif (!sourceOutputStrings.containsKey(sourceId)) {\n\t\t\t\tsourceOutputStrings.put(sourceId, new HashSet<String>());\n\t\t\t}\n\t\t\tfor (String author : authorList) {\n\t\t\t\tMatcher matcher = pattern.matcher(author.trim());\n\t\t\t\tif (matcher.find()) {\n\t\t\t\t\tcontinue; // Skip author names that have a special character, since they are likely a parsing error.\n\t\t\t\t}\n\t\t\t\tif (author.equals(\"\")) { // Sometimes, trailing commas result in empty author strings. \n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfinal String tuple = bookId + \"\\t\" + author.trim();\n\t\t\t\ttupleSet.add(tuple);\n\t\t\t\tsourceOutputStrings.get(sourceId).add(tuple);\n\t\t\t}\n\t\t}\n\t\tdataFile.close();\n\n\t\tBufferedReader labelledDataFile = new BufferedReader(new FileReader(ISBNLABELLEDDATAFILE));\t\t\n\t\twhile ((s = labelledDataFile.readLine()) != null) {\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[0];\n\t\t\tfinal String authorString = fields[1];\n\t\t\tString[] authors = authorString.split(\"; \");\n\t\t\tfor (int i = 0; i < authors.length; i++) {\n\t\t\t\tauthors[i] = canonicalize(authors[i].trim());\n\t\t\t\ttrueTuples.add(bookId + \"\\t\" + authors[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlabelledDataFile.close();\n\t}", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static Object[] putResultFileArray(String resultFile) {\r\n\t\tMap<Integer, String> map = new HashMap<Integer, String>();\r\n\t\t// reading the file\r\n\t\tFile file = new File(resultFile);\r\n\t\tBufferedReader reader;\r\n\t\t// Initializing an array to contain distinct values in result document\r\n\t\tString[] res = new String[4];\r\n\t\tfor (int v = 0; v < res.length; v++) {\r\n\t\t\tres[v] = \"a\";\r\n\t\t}\r\n\r\n\t\t// trying to read the file for information\r\n\t\ttry {\r\n\t\t\t// creating a new buffered reader\r\n\t\t\treader = new BufferedReader(new FileReader(file));\r\n\t\t\tString text = null;\r\n\t\t\tString[] lineArray = new String[2];\r\n\t\t\tint count = 0;\r\n\t\t\tint done = 0;\r\n\t\t\t// looping till there is a next line in file\r\n\t\t\twhile ((text = reader.readLine()) != null) {\r\n\t\t\t\t// Splitting line based on comma and storing those values in\r\n\t\t\t\t// array\r\n\t\t\t\tlineArray = text.split(\",\");\r\n\t\t\t\t// mapping values on a map\r\n\t\t\t\tmap.put(Integer.parseInt(lineArray[0]), lineArray[1]);\r\n\t\t\t\tcount = 0;\r\n\t\t\t\t// checking if the new Document classified option is already\r\n\t\t\t\t// stored as an option\r\n\t\t\t\tfor (int h = 0; h < res.length; h++) {\r\n\t\t\t\t\tif (!res[h].contains(lineArray[1])) {\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If not stored as an option, storing it as an option\r\n\t\t\t\tif (count == 4) {\r\n\r\n\t\t\t\t\tres[done] = lineArray[1];\r\n\t\t\t\t\tdone++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// adding file not found exception\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// adding catch block emphasised by console\r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Object[] { map, res };\r\n\t}", "@Override\n\tpublic Multimap<String, List<String>> fileRecordsIntoMap(List<String> list) {\n\t\tMultimap<String, List<String>> multimap = ArrayListMultimap.create();\n\t\tCollections.sort(list);\n\t\tfor(String key :list)\n\t\t{\n\t\t\tkey=key.trim().toLowerCase();\n\t\t\tif(!key.isEmpty())\n\t\t\t{\n\t\t\t\tspaceRemover(key);\n\t\t\t\tString withoutSort=key;\n\t\t\t\tkey=sortString(key);\n\t\t\t\tmultimap = putIntoMAP(key , withoutSort, multimap);\n\t\t\t}\n\t\t}\n\t\treturn multimap;\n\t}", "public static HashMap<String, String> readFromExcel() throws IOException, WriteException, BiffException {\n\t\t\t\tList<String> keyList = new ArrayList<String>(); \r\n\t\t\t\tList<String> list = new ArrayList<String>(); \r\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>(); \r\n\t\t\t\tString str = null;\r\n\t\t\t\r\n\t\t\t\ttry\r\n\t\t {\r\n\t\t File f1=new File(\"//ecs-9844/DoNotDelete/JenkinsData/input.xls\");\r\n\t\t //the excel sheet which contains data\r\n\t\t WorkbookSettings ws=new WorkbookSettings();\r\n\t\t ws.setLocale(new Locale(\"er\",\"ER\"));\r\n\t\t Workbook workbook=Workbook.getWorkbook(f1,ws);\r\n\t\t Sheet readsheet=workbook.getSheet(0);\r\n\t\t //Loop to read the KEYS from Excel i.e, 1st column of the Excel\r\n\t\t for(int i=0;i<readsheet.getColumns();i++) {\r\n\t\t \tstr=readsheet.getCell(i,0).getContents().toString();\r\n\t\t \tlist.add(str);\r\n\t\t }\r\n\t\t \tkeyList.addAll(list);\r\n\t\t \t// Hardcoding the first map (key, value) values \r\n\t\t \tmap.put(keyList.get(0), readsheet.getCell(0, 1).getContents().toString());\r\n\t\t \t// Loop to read TEST DATA from the Excel\r\n\t\t for(int i=1;i<readsheet.getRows();i++) {\r\n\t\t for(int j=1;j<readsheet.getColumns();j++) {\t\r\n\t\t str=readsheet.getCell(j,i).getContents().toString();\r\n\t\t list.add(str);\r\n\t\t System.out.println(str);\r\n\t\t map.put(keyList.get(j),str); \r\n\t\t \t}\r\n\t\t }\r\n\t\t //Print the map(key, value) \r\n\t\t System.out.println(\"Print map\");\r\n\t\t System.out.println(map);\r\n\t\t \r\n\t\t }\r\n\t\t catch(IOException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\t catch(BiffException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t } catch (Exception e) {\r\n\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t\t\t\treturn map;\r\n\t}", "public void populateDataStructure() {\n\t\tfp.initiateFileProcessing();\r\n\t\tint length=0,i=0;\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tstr=fp.readOneLine();\r\n\t\t\tif(str==null){\r\n\t\t\t\t//System.out.println(\"------\");\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(str);\r\n\t\t\t\tString[] line=str.split(\"\\\\s+\");\r\n\t\t\t\t\r\n\t\t\t\tfor(i=0;i<line.length;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\tif(line[i].length()>0){\r\n\t\t\t\t\t\tsbbst.insert(line[i]);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//length--;\r\n\t\t\t\t\t//i++;\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(line.length);\r\n\t\t\t\t//while((length=line.length)>0 & i<=length-1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(line[i]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*while(true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(true){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(line[i]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}*/\r\n\t\t\t\t\tlength--;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\t//System.out.println(length+\"\\n\"+i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Total Words: \"+ count);\r\n\t\t//sbbst.inorder();\r\n\t\t//System.out.println(\"Distinct Words: \"+ sbbst.distinctCount);\r\n\t\tfp.closeFiles();\r\n\t}", "public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException\n {\n String line = value.toString().toLowerCase();\n\n // Splitting into doc number and its text\n String document_split[] = line.split(\"\\t\",2);\n Text document_number = new Text(document_split[0]);\n\n // Replace all non alphabetic characters and non spaces with a space\n String document_content=document_split[1].replaceAll(\"[^ a-z]+\", \" \");\n\n String bigram_word_1=null;\n String bigram_word_2=null;\n // Tokenize into words\n StringTokenizer tokenizer = new StringTokenizer(document_content);\n int x=0;\n while(tokenizer.hasMoreTokens())\n {\n x+=1;\n if(x==1)\n {\n bigram_word_1=tokenizer.nextToken();\n }\n else\n {\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n break;\n }\n }\n while(tokenizer.hasMoreTokens())\n {\n bigram_word_1=bigram_word_2;\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n }\n }", "public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }", "@Override\n public String map(String value) throws Exception {\n String[] values=value.split(Constants.KEYSPLIT); // se obtiene en value cada row del data stream, y se le plica un split de acuerdo al\n //separador y se genera un array\n\n if(validateDataArray(values)){// se valida que el array cumpla con los valores necesarios\n dataTemp=values;// se le asigna el array valido al array_temporal\n generateParquet(dataTemp,Constants.PARQUETFILENAME,indexPostFileName,Constants.HDFSPATH,Constants.AVROSCHEMELOCATION,avroTagsNames);// es el metodo que genera los archivos parquet\n indexPostFileName++;\n }\n return Arrays.asList(dataTemp).toString();// se retorna el array_temporal el cual se va a imprimir en consola\n }", "private static HashMap<String, ArrayList<String>> parseKeyValueList(String keySpliter,String valueSpliter,String listSeperator, String strToParse) {\r\n\t\tHashMap<String, ArrayList<String>> key_ValuesList_Map = new HashMap<String, ArrayList<String>>();\r\n\t\tif (listSeperator== null)\r\n\t\t\tlistSeperator=\"\\n\"; // new line\r\n\t\t\t\r\n\t\tif (!strToParse.equals(\"\")) {\r\n\t\t\tString[] strs = strToParse.split(listSeperator);//default listSeperator=\"\\n\" is new line\r\n\r\n\t\t\tArrayList<String> local_values = null;\r\n\t\t\tString criteria = \"\";\r\n\t\t\tfor (String str_tmp : strs) { // str_tmp = enrollment:\r\n\t\t\t\t\t\t\t\t\t\t\t// uma_rob;uma_qa1;\r\n\t\t\t\tString[] strs_tmp = str_tmp.split(keySpliter);//keySpliter=\":\"\r\n\t\t\t\tcriteria = strs_tmp[0].trim();// enrollment or non-enrollment\r\n\t\t\t\tstrs_tmp[1]=strs_tmp[1].trim();\r\n\t\t\t\tif (key_ValuesList_Map.containsKey(criteria)) {\r\n\t\t\t\t\tlocal_values = key_ValuesList_Map.get(criteria);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlocal_values = new ArrayList<String>();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (Validate.isBlank(valueSpliter)){ // can also be blank, then pass null or \"\"\r\n\t\t\t\t\tlocal_values.add(strs_tmp[1]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tString[] values_tmp = strs_tmp[1].split(valueSpliter);//valueSpliter=\";\"\r\n\t\t\t\t\tfor (String value : values_tmp) {\r\n\t\t\t\t\t\tlocal_values.add(value.trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tkey_ValuesList_Map.put(criteria, local_values);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn key_ValuesList_Map;\r\n\t}", "public void readFile(String fileName)\r\n {\n String key = new String();\r\n String value = new String();\r\n\r\n boolean readInfo = false;\r\n String out =\"\";\r\n String infoTag = \"\";\r\n String infoTagContent = \"\";\r\n\r\n try{\r\n System.out.println(\"Readig file \"+fileName+\" ...\");\r\n BufferedReader filereader = new BufferedReader(new FileReader(fileName));\r\n\r\n String line = new String();\r\n line = filereader.readLine();\r\n\r\n while(line != null){\r\n infoTag = \"\";\r\n infoTagContent = \"\";\r\n\r\n if((line.indexOf(\"=\") != -1) && (line.indexOf(\"#\") == -1))\r\n {\r\n key = line.substring(0, line.indexOf(\"=\"));\r\n value = line.substring(line.indexOf(\"=\")+1);\r\n\r\n key = key.trim();\r\n value = value.trim();\r\n\r\n if(key.equals(\"PREFIX\")){\r\n this.tagPrefix = value;\r\n } else {\r\n value = tagPrefix+\".\"+value;\r\n tagHash.put(key, value);\r\n }\r\n\r\n readInfo = false;\r\n infoHash.put(key, out);\r\n out = \"\";\r\n }\r\n\r\n\r\n if((line.indexOf(\"#\") == 0) && (line.indexOf(\"@\") != -1) && (line.indexOf(\"=\") != -1))\r\n {\r\n readInfo = true;\r\n infoTag = line.substring(line.indexOf(\"@\"), line.indexOf(\"=\"));\r\n infoTag.trim();\r\n infoTagContent = line.substring(line.indexOf(\"=\")+1);\r\n if(infoTagContent.trim().length() > 0) infoTagContent = infoTagContent+NL;\r\n out = out+infoTag+\": \"+NL+infoTagContent;\r\n }else if((line.indexOf(\"#\") == 0) && readInfo){\r\n // alreadey reading a tagInfo, means NL between entries\r\n out = out+line.substring(line.indexOf(\"#\")+1)+NL;\r\n }\r\n\r\n line = filereader.readLine();\r\n }\r\n\r\n filereader.close();\r\n\r\n //System.out.println(tagHash);\r\n\r\n }catch (Exception e){\r\n System.out.println(\"Exception in readFile: \"+e);\r\n }\r\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n \n \n File textBank = new File(\"textbank/\");\n Hashtable<Integer,Integer> frequency;\n Hashtable<Integer, String> table;\n table = new Hashtable<>();\n frequency = new Hashtable<>();\n Scanner input = new Scanner(new File(\"stoplist.txt\"));\n int max=0;\n while (input.hasNext()) {\n String next;\n next = input.next();\n if(next.length()>max)\n max=next.length();\n table.put(next.hashCode(), next); //to set up the hashmap with the wordsd\n \n }\n \n System.out.println(max);\n \n Pattern p0=Pattern.compile(\"[\\\\,\\\\=\\\\{\\\\}\\\\\\\\\\\\\\\"\\\\_\\\\+\\\\*\\\\#\\\\<\\\\>\\\\!\\\\`\\\\-\\\\?\\\\'\\\\:\\\\;\\\\~\\\\^\\\\&\\\\%\\\\$\\\\(\\\\)\\\\]\\\\[]\") \n ,p1=Pattern.compile(\"[\\\\.\\\\,\\\\@\\\\d]+(?=(?:\\\\s+|$))\");\n \n \n \n wor = new ConcurrentSkipListMap<>();\n \n ConcurrentMap<String , Map<String,Integer>> wordToDoc = new ConcurrentMap<String, Map<String, Integer>>() {\n @Override\n public Map<String, Integer> putIfAbsent(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean remove(Object key, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean replace(String key, Map<String, Integer> oldValue, Map<String, Integer> newValue) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> replace(String key, Map<String, Integer> value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public int size() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean isEmpty() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsKey(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public boolean containsValue(Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> get(Object key) {\n return wor.get((String)key);//To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Map<String, Integer> put(String key, Map<String, Integer> value) {\n wor.put(key, value); // this saving me n \n //if(frequency.get(key.hashCode())== null)\n \n //frequency.put(key.hashCode(), )\n return null;\n }\n\n @Override\n public Map<String, Integer> remove(Object key) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void putAll(Map<? extends String, ? extends Map<String, Integer>> m) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public void clear() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<String> keySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Collection<Map<String, Integer>> values() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n @Override\n public Set<Map.Entry<String, Map<String, Integer>>> entrySet() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n totalFiles = textBank.listFiles().length;\n for (File textFile : textBank.listFiles()) {\n totalReadFiles++;\n //checking whether file has txt extension and file size is higher than 0\n if(textFile.getName().contains(\".txt\") && textFile.length() > 0){\n docName.add(textFile.getName().replace(\".txt\", \".stp\"));\n StopListHandler sp = new StopListHandler(textFile, table,System.currentTimeMillis(),p0,p1,wordToDoc);\n sp.setFinished(() -> {\n \n tmp++;\n \n if(tmp==counter)\n //printTable(counter);\n \n if(totalReadFiles == totalFiles)\n {\n printTable(counter);\n }\n \n });\n \n sp.start();\n counter ++;}\n \n \n }\n System.out.println(counter);\n //while(true){if(tmp==counter-1) break;}\n System.out.println(\"s\");\n \n }", "public Map<Integer,byte[]> divideFile(File f) throws Exception {\n byte[] buffer = new byte[this.MSS];\n Map<Integer,byte[]> file_map = new HashMap<>();\n\n SignFile.generatesignedFile(f,\"MyData/\" + f.getName());\n\n\n try (FileInputStream fis = new FileInputStream(\"MyData/\" + f.getName());\n BufferedInputStream bis = new BufferedInputStream(fis)) {\n\n int bytesAmount = 0;\n int segment = 0;\n while ((bytesAmount = bis.read(buffer)) > 0) {\n byte[] chunk = Arrays.copyOf(buffer,bytesAmount);\n file_map.put(segment,chunk);\n segment += 1024;\n }\n }\n return file_map;\n }", "static Map<Integer, Map<String, Object>> readTxt(BufferedReader in) throws IOException {\n\t\t\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\"\\t\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\tString[] val = valString.split(\"\\t\");\n\t\t\t\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t\t\n\t\t\t}\t//end for\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the outside container\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\t//end while\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "private static Map<String, List<List<String>>>[] splitYagoDataIntoDocumentSets(File yagoInputFile) {\r\n\t\tMap<String, List<List<String>>> trainData = new HashMap<String, List<List<String>>>();\r\n\t\tMap<String, List<List<String>>> testaData = new HashMap<String, List<List<String>>>();\r\n\t\tMap<String, List<List<String>>> testbData = new HashMap<String, List<List<String>>>();\r\n\t\t\r\n\t\tBufferedReader reader = FileUtil.getFileReader(yagoInputFile.getAbsolutePath());\r\n\t\ttry {\r\n\t\t\tString documentName = null;\r\n\t\t\tString documentSet = null;\r\n\t\t\tList<List<String>> documentLines = null;\r\n\t\t\tList<String> sentenceLines = null;\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tif (line.startsWith(\"-DOCSTART-\")) {\r\n\t\t\t\t\tif (documentSet != null) {\r\n\t\t\t\t\t\tif (documentSet.equals(\"train\"))\r\n\t\t\t\t\t\t\ttrainData.put(documentName, documentLines);\r\n\t\t\t\t\t\telse if (documentSet.equals(\"testa\"))\r\n\t\t\t\t\t\t\ttestaData.put(documentName, documentLines);\r\n\t\t\t\t\t\telse if (documentSet.equals(\"testb\"))\r\n\t\t\t\t\t\t\ttestbData.put(documentName, documentLines);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString docId = line.substring(\"-DOCSTART- (\".length(), line.length() - 1);\r\n\t\t\t\t\tString[] docIdParts = docId.split(\" \");\r\n\t\t\t\t\tdocumentName = docIdParts[0] + \"_\" + docIdParts[1];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (docIdParts[0].endsWith(\"testa\"))\r\n\t\t\t\t\t\tdocumentSet = \"testa\";\r\n\t\t\t\t\telse if (docIdParts[0].endsWith(\"testb\"))\r\n\t\t\t\t\t\tdocumentSet = \"testb\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tdocumentSet = \"train\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tdocumentLines = new ArrayList<List<String>>();\r\n\t\t\t\t\tsentenceLines = new ArrayList<String>();\r\n\t\t\t\t} else if (line.trim().length() == 0) {\r\n\t\t\t\t\tdocumentLines.add(sentenceLines);\r\n\t\t\t\t\tsentenceLines = new ArrayList<String>();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsentenceLines.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (documentSet.equals(\"train\"))\r\n\t\t\t\ttrainData.put(documentName, documentLines);\r\n\t\t\telse if (documentSet.equals(\"testa\"))\r\n\t\t\t\ttestaData.put(documentName, documentLines);\r\n\t\t\telse if (documentSet.equals(\"testb\"))\r\n\t\t\t\ttestbData.put(documentName, documentLines);\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tMap<String, List<List<String>>>[] returnData = new HashMap[3];\r\n\t\treturnData[0] = trainData;\r\n\t\treturnData[1] = testaData;\r\n\t\treturnData[2] = testbData;\r\n\t\t\r\n\t\treturn returnData;\r\n\t}", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "public void ArtistAndSource() throws IOException{\r\n List<String> ArrangersAndTheirSongs=new ArrayList<>();\r\n HashMap <String,Integer> SongCountMap= new HashMap<>();\r\n String allsongs=\"\";\r\n String sourcesong=\"\";\r\n for(int id: ArrangersMap.keySet()){\r\n String ArrangerName=ArrangersMap.get(id);\r\n for(String song:ArrangerLinesList){\r\n String perform[];\r\n perform=song.split(\"/\");\r\n int arrangeid=Integer.parseInt(perform[1]);\r\n if(id==arrangeid){\r\n int songid= Integer.parseInt(perform[0]);\r\n String songname=test.getsongName(songid);\r\n sourcesong=test.SongToSource(songname);\r\n allsongs+=sourcesong+\",\";\r\n if (SongCountMap.get(sourcesong) !=null){ \r\n SongCountMap.put(sourcesong, SongCountMap.get(sourcesong)+1);\r\n }\r\n else{\r\n SongCountMap.put(sourcesong, 1);\r\n }\r\n } \r\n }\r\n for(String song:SongCountMap.keySet()){\r\n //System.out.println(song);\r\n }\r\n HashMap <String,Integer> SortedMap= sortByValues(SongCountMap);\r\n SongCountMap.clear();\r\n String allsongs2=\"\";\r\n for(String song:SortedMap.keySet()){\r\n //System.out.println(\"Number\"+SortedMap.get(song)+\"The song is\"+song);\r\n allsongs2+=\"#occurences:\"+SortedMap.get(song)+\"The song is\"+song+\"\\n\";\r\n //System.out.println(\"Number of times:\"+SortedMap.get(song)+\"The song is\"+song);\r\n }\r\n //System.out.println(allsongs2);\r\n // ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are:\"+allsongs);\r\n ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are: \"\r\n + \"\"+allsongs2);\r\n allsongs=\"\";\r\n SortedMap.clear();\r\n allsongs2=\"\";\r\n }\r\n //method is broken\r\n writeListToTextFile(\"d:\\\\documents\\\\textfiles\\\\ArrangersAndTheirSources.txt\",ArrangersAndTheirSongs);\r\n System.out.println(\"The size of the list is:\"+ArrangersAndTheirSongs.size());\r\n System.out.println(\"Artist and Their Source Complete\");\r\n }", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "HashMap<String,Integer> mapCode(String[] splitwords){\n\t\t\tHashMap<String,Integer> wordsOfCode= new HashMap<String,Integer>();\n\t\t\tLovinsStemmer nonSuffixes=new LovinsStemmer();\n\t\t\t//PorterStemmer nonSuffixes=new PorterStemmer();\n\t\t\tint num=0;\n\t\t\tfor(int i=0; i<splitwords.length;i++) {\n\t\t\t\tString temp=nonSuffixes.stem(splitwords[i]);\n\t\t\t\tif(!totalWords.containsKey(temp)) {\n\t\t\t\t\ttotalWords.put(temp, num);\n\t\t\t\t\t\n\t\t\t\t\twordsOfCode.put(temp,num);\n\t\t\t\t\tnum++;\n\t\t\t\t}else if(!wordsOfCode.containsKey(temp)) {\n\t\t\t\t\twordsOfCode.put(temp,totalWords.get(temp));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wordsOfCode;\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n MapDictionary<String> dictionary = new MapDictionary<String>();\r\n dictionary.addEntry(new DictionaryEntry<String>(\"50 Cent\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"XYZ120 DVD Player\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"cent\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"dvd player\",\"\"));\r\n\r\n // build the dictionary-chunker:\r\n // dictionary, tokenizer factory, flag1, flag2\r\n // tokenizer will ignore thre blank space in the matching process\r\n // all matches flag:\r\n // sensitive flag: when case sensitivity is enabled, \r\n ExactDictionaryChunker dictionaryChunkerTT\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n true,true);\r\n\r\n ExactDictionaryChunker dictionaryChunkerTF\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n true,false);\r\n\r\n ExactDictionaryChunker dictionaryChunkerFT\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n false,true);\r\n\r\n ExactDictionaryChunker dictionaryChunkerFF\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n false,false);\r\n\r\n\r\n\r\n System.out.println(\"\\nDICTIONARY\\n\" + dictionary);\r\n \r\n String text = \"50 Cent is hard to distinguish from 50 cent and just plain cent without case.\";\r\n System.out.println(\"TEXT=\" + text);\r\n chunk(dictionaryChunkerFF,text);\r\n \r\n text = \"The product xyz120 DVD player won't match unless it's exact like XYZ120 DVD Player.\";\r\n System.out.println(\"TEXT=\" + text);\r\n chunk(dictionaryChunkerFF,text);\r\n\r\n }", "public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{\n\t\t//read File\n\t\t// go to letters directory\n\t\tString seriesLetterFolder = lettersInputFolder + File.separator + \"letters\";\n\t\tFile directory = new File(seriesLetterFolder); \n\t\tfileNames = directory.listFiles(new FileFilter() {\n\t\t @Override\n\t\t public boolean accept(File pathname) {\n\t\t String name = pathname.getName().toLowerCase();\n\t\t return name.endsWith(\".csv\") && pathname.isFile();\n\t\t }\n\t\t});\n\t\tfor (int i = 0; i < fileNames.length; i++) {\n\t\t\t\n\t\t\t// Overall structure is as follows:\n\t\t\t// On each row, for each word - we have a Map of String and List<Double> indicating a word\n\t\t\t// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.\n\t\t\t// the size of the list is 20. Eventually the global dictionary will be a List of such lists.\n\t\t\t// in case of sample data, the global dictionary is of 60 lists.\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(fileNames[i]));\n\t\t\t\n\t\t\t\n\t\t\t// for each document\n\t\t\tList<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>(); \n\t\t\t\n\t\t\tMap<String,List<Double>> wordMap = null; //per row \n\t\t\twhile(in.ready()) {\n\t\t\t\twordMap = new HashMap<String, List<Double>>(); //per rows\n\t\t\t\tString series = in.readLine();\n\t\t\t\tString letters[]= series.split(\",\");\n\t\t\t\tInteger lastLocationForRef = -1; // for padding\n\t\t\t\tdouble totalWordCountPerDocument = 0.0; \n\t\t\t\tfor (int curLineCharLocation = 0; curLineCharLocation < letters.length\n\t\t\t\t\t\t- wordLength + 1; curLineCharLocation = curLineCharLocation\n\t\t\t\t\t\t+ shiftLength) {\n\t\t\t\t\t// this for loop runs on each line and curLineCharLocation\n\t\t\t\t\t// indicates the current pointer\n\t\t\t\t\t// from which we should be forming the word\n\t\t\t\t\t// extract a word and move the shift length\n\t\t\t\t\tString currentWord = \"\";\n\t\t\t\t\tfor (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength\n\t\t\t\t\t\t\t+ curLineCharLocation; currentWordLocation++) {\n\t\t\t\t\t\t// this inner for loop denotes the current word to be\n\t\t\t\t\t\t// created\n\t\t\t\t\t\tcurrentWord = currentWord\n\t\t\t\t\t\t\t\t+ letters[currentWordLocation];\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, currentWord);\n\t\t\t\t\tlastLocationForRef = curLineCharLocation + shiftLength;\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t\t\t\t}\n\t\t\t\t// check to see if we have any leftover strings. If yes then pad that word using\n\t\t\t\t// the last character pointed by lastLocationForRef\n\t\t\t\tInteger difference = letters.length - lastLocationForRef;\n\t\t\t\tif (difference > 0) {\n\t\t\t\t\tString paddedWord = \"\";\n\t\t\t\t\tInteger extraPaddingSize = wordLength - difference;\n\t\t\t\t\twhile (difference > 0) {\n\t\t\t\t\t\t// this while loop will simply create the padded word \n\t\t\t\t\t\t// to be appended at the end\n\t\t\t\t\t\tpaddedWord = paddedWord + letters[lastLocationForRef];\n\t\t\t\t\t\tdifference = difference - 1;\n\t\t\t\t\t\tlastLocationForRef = lastLocationForRef + 1; //advance to next location\n\t\t\t\t\t}\n\t\t\t\t\twhile(extraPaddingSize > 0) {\n\t\t\t\t\t\t paddedWord = paddedWord + letters[lastLocationForRef-1];\n\t\t extraPaddingSize = extraPaddingSize - 1;\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, paddedWord);\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t }\n\t\t\t\twordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq\n\t\t\t\tmapPerGestureFile.add(wordMap);\t\t\t\t\n\t\t\t}\n\t\t\tgetTfMapArrayIDF().add(mapPerGestureFile);\n\t\t\t//count idf2 per document\n\t\t\tinitIDF2Map(mapPerGestureFile);\n\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\t\n\t\t//populate global map for IDF values List<LIst<Map>\n\t\t initIDFMap(getTfMapArrayIDF());\n\t\t //Generate IDF Files from Global Map * TF Values\n\t\t calculateIDFValues();\n\t\t //Generate IDF2 Files\n\t\t calculateIDF2Values();\n\t\t //normalize tfidf and tfidf2\n\t\t normalizeDictionary(); \n\t\t createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);\n\t}", "public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }", "@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }", "@Override\n\tprotected void map(LongWritable key, Text value,Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString line=value.toString();\n\t\t//String[] words=line.split(\" \");\n\t\tStringTokenizer tokenizer=new StringTokenizer(line); //another way better datastructure\n\t\twhile(tokenizer.hasMoreTokens()){\n\t\t\tString word = tokenizer.nextToken();\n\t\t\t\n\t\t\toutkey.set(word); //outkey value reset\n\t\t\tcontext.write(outkey,outvalue);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public Map<String,String> splitResult(String input) {\n Map<String,String> ret = new LinkedHashMap<>();\n StringBuilder key = new StringBuilder();\n StringBuilder value = new StringBuilder();\n StringBuilder currBuff = key;\n boolean inLiteral = false;\n for(int i = 0; i < input.length(); i++) {\n //still in middle of literal\n if(inLiteral && input.charAt(i) != '\"') {\n currBuff.append(input.charAt(i));\n continue;\n } else if(input.charAt(i) == delimiter.charAt(0)) {\n //new key and value\n ret.put(key.toString(),value.toString());\n key = new StringBuilder();\n value = new StringBuilder();\n //reset to key as default value\n currBuff = key;\n continue;\n }\n\n switch(input.charAt(i)) {\n //finished key\n case '=':\n currBuff = value;\n break;\n case '\"':\n //begin or end literal\n inLiteral = !inLiteral;\n break;\n default:\n currBuff.append(input.charAt(i));\n break;\n }\n }\n\n //put last value\n if(!key.toString().isEmpty() && !value.toString().isEmpty())\n ret.put(key.toString(),value.toString());\n\n return ret;\n }", "public String[] ProcessLine(int phraseId, int\tsentenceId, String[] parts,int\tsentimentS){\n int sentiment=sentimentS;\n //phraseStat=new StringStat(phraseS);\n\n\n\n //Count words (uni-grams)\n HashMap<String,Integer> wordcounts=new HashMap<String,Integer>();\n for (int i = 0; i < parts.length; i++) {\n Integer count=wordcounts.get(parts[i]);\n if(count==null){\n wordcounts.put(parts[i],1);\n }\n else{\n count++;\n wordcounts.put(parts[i],count);\n }\n }\n\n /* //Count words (bi-grams)\n for (int i = 0; i < parts.length-1; i++) {\n String bigram=parts[i]+\" \"+parts[i+1];\n Integer count=wordcounts.get(bigram);\n if(count==null){\n wordcounts.put(bigram,1);\n }\n else{\n count++;\n wordcounts.put(bigram,count);\n }\n }*/\n\n //Calculate the frequency for each word\n HashMap<String,Double> wordfequncies=new HashMap<String,Double>();\n Double maxFrequncy=0.0;\n Iterator<String> itr=wordcounts.keySet().iterator();\n while(itr.hasNext()){\n String word=itr.next();\n Double fr=((double)(wordcounts.get(word))/(double)parts.length);\n maxFrequncy=Math.max(maxFrequncy,fr);\n wordfequncies.put(word,fr);\n }\n\n //Add to the word frequency\n itr=wordfequncies.keySet().iterator();\n while(itr.hasNext()) {\n String word = itr.next();\n WordStat ws=wordStats.get(word);\n if(ws==null){\n ws=new WordStat(word);\n }\n else{\n wordStats.remove(word);\n }\n ws.updateStat(sentiment,(0.5*wordfequncies.get(word))/maxFrequncy);\n wordStats.put(word,ws);\n }\n return parts;\n\n }", "public static void main(String args[]) throws Exception\r\n {\r\n System.out.println(\"start\");\r\n final Map<String, LogData> timeInHoursMinsAndLogDataMap = new LinkedHashMap();\r\n final Scanner input = new Scanner(System.in);\r\n int totalRecords = 0;\r\n final List<String> keysToRemove = new ArrayList<>(2);\r\n Set<String> processed = new HashSet<>();\r\n\r\n while (input.hasNext())\r\n {\r\n System.out.println(\"while\");\r\n Long time = Long.parseLong(input.next());\r\n Double processingTime = Double.parseDouble(input.next());\r\n\r\n boolean process = true;\r\n final Date date = new Date(time * 1000);\r\n final String key = String.valueOf(date.getHours()) + \":\" + String.valueOf(date.getMinutes());\r\n if (processed.contains(key))\r\n continue;\r\n if (timeInHoursMinsAndLogDataMap.size() > 0)\r\n {\r\n keysToRemove.clear();\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n final int diffSeconds = getDiffBetweenCurrentAndMapSeconds(key, entry.getKey(), date.getSeconds(),\r\n entry.getValue().maxSeconds);\r\n if (diffSeconds > 60)\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n keysToRemove.add(entry.getKey());\r\n processed.add(entry.getKey());\r\n }\r\n else if (diffSeconds < -60)\r\n {\r\n process = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!process)\r\n continue;\r\n\r\n removeKeyFromMap(timeInHoursMinsAndLogDataMap, keysToRemove);\r\n\r\n LogData logData = timeInHoursMinsAndLogDataMap.get(key);\r\n if (logData == null)\r\n {\r\n logData = new LogData();\r\n logData.setTimeStamp(time);\r\n }\r\n logData.updateBuckets(processingTime);\r\n logData.updateMaxSeconds(date.getSeconds());\r\n timeInHoursMinsAndLogDataMap.put(key, logData);\r\n\r\n }\r\n\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n }\r\n \r\n System.out.println(\"end\");\r\n }", "@Override\r\n\t\tprotected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\r\n\r\n\t\t\tString[] split = value.toString().split(\",\");\r\n\r\n\t\t\toutKey.set(split);\r\n\r\n\t\t\tcontext.write(outKey, NullWritable.get());\r\n\t\t}", "public void InsertInfo(String Name) throws IOException{\r\n test.songMatch();\r\n test.sourceMatch();\r\n test.WordTable();\r\n test.doword2();\r\n \r\n String value=\"\";\r\n String Performer=\"\";// will hold either arrangers, vocalists, or circles\r\n int counter=0;\r\n List<String> ListLines=new ArrayList<>();\r\n List<String> ListInserts=new ArrayList<>();\r\n List<String> PerformerLinesList=new ArrayList<>();\r\n Map <Integer,String> Map=new HashMap<>();\r\n Map <Integer,String> TempMap=new HashMap<>();\r\n Map <Integer,Integer> LinesMap=new HashMap<>();\r\n for(String object:FileNames){\r\n try{\r\n \r\n MP3 mp3 = new MP3(object); \r\n Title=mp3.getTitle(); \r\n switch(Name){\r\n case \"Vocal\": value= \"Vocalists\";\r\n Performer=mp3.getComments().trim();//get comments AKA THE VOCALISTS \r\n break;\r\n case \"Arranger\": value= \"Arrangers\";\r\n Performer=mp3.getMusicBy().trim();//get comments AKA THE ARRANFERS \r\n break;\r\n case \"Circle\": value= \"Circles\";\r\n Performer=mp3.getBand().trim();//get comments AKA THE CIRCLES \r\n break;\r\n } \r\n String []perform; \r\n perform=Performer.split(\"/\"); \r\n for (String perform1 : perform) {\r\n perform1=perform1.trim();\r\n boolean check=true; \r\n TempMap.put(counter, perform1.toLowerCase()); \r\n for(int id:Map.keySet()){\r\n if(perform1.toLowerCase().hashCode()==Map.get(id).toLowerCase().hashCode()){\r\n // System.out.println(\"check is false\"+counter);\r\n check=false;\r\n break;\r\n }\r\n }\r\n if(!Map.containsValue(perform1)){\r\n if(check)\r\n Map.put(counter, perform1);\r\n counter++;\r\n }\r\n \r\n int id=0;\r\n for(int a:Map.keySet()){\r\n if(Map.get(a).toLowerCase().equals(perform1.toLowerCase())){ \r\n id=a;\r\n break;\r\n } \r\n }\r\n String nos=\"\";\r\n nos= value;\r\n nos= value.substring(0,nos.length()-1);\r\n \r\n //vocalist inserts for table \r\n ListInserts.add(\"Insert Into \" +value+ \" (\"+nos+\"_id,\"+nos+\"_Name) values(\"+id+\",\"+perform1+\");\");\r\n //System.out.println(\"Insert Into \" +value+ \" (\"+nos+\"_id,\"+nos+\"_Name) values(\"+id+\",\"+perform1+\");\");\r\n \r\n //vocalist lines inserts for vocalist lines table\r\n //System.out.println(\"Insert Into VocalistLines (Song_id,Vocalist_Id) values(\"+Title+perform1);//+Title.hashCode()+\",\"+id+\");\"); \r\n // System.out.println(\"Insert Into VocalistLines (Song_id,Vocalist_Id) values(\"+Title.hashCode()+\",\"+id+\");\");\r\n ListLines.add(\"Insert Into \" +value+\"Lines (Song_id,Vocalist_Id) values(\"+Title.hashCode()+\",\"+id+\");\");\r\n int songid=test.getsongid(test.getMap(\"T\"), Title);\r\n LinesMap.put(songid, id);\r\n PerformerLinesList.add(+songid+\"/\"+id);\r\n } \r\n \r\n }\r\n catch(IOException e){\r\n System.out.println(\"An error occurred while reading/saving the mp3 file.\");\r\n } \r\n }\r\n switch(Name){\r\n case\"Vocal\":\r\n VocalistsMap.putAll(Map);\r\n VocalistsLines.addAll(ListLines);\r\n VocalistsInsert.addAll(ListInserts); \r\n VocalLinesList.addAll(PerformerLinesList);\r\n break;\r\n case \"Arranger\":\r\n ArrangersMap.putAll(Map);\r\n ArrangersLines.addAll(ListLines);\r\n ArrangersInsert.addAll(ListInserts);\r\n ArrangerLinesList.addAll(PerformerLinesList);\r\n break;\r\n case\"Circle\":\r\n CirclesMap.putAll(Map); \r\n CirclesLines.addAll(ListLines);\r\n CirclesInsert.addAll(ListInserts);\r\n CircleLinesList.addAll(PerformerLinesList);\r\n break;\r\n }\r\n}", "@Override\n\t\tpublic void reduce(Text key,Iterable<Text> values,Context context)throws IOException,InterruptedException\n\t\t{\n\t\t\tfor(Text val:values)\n\t\t\t{\n\t\t\t\tString line = val.toString();\n\t\t\t\tString word = line.split(\",\")[0];\n\t\t\t\t//System.out.println(\"Word is:\"+word);\n\t\t\t\tString article = key.toString();\n\t\t\t\tdouble tf = Double.parseDouble(line.split(\",\")[1]);\n\t\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t\tdouble idf = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tdouble tfidf = Double.parseDouble(line.split(\",\")[3]);\n\t\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t\tString new_key = article+\",\"+word+\",\"+tf+\",\"+idf;\n\t\t\t\tmap.put(new_key, tfidf);\n\t\t\t}\n\t\t\tComparator<String> comparator1 = new StringValueComparator(map);\n\t\t\tTreeMap<String,Double> TopFive = new TreeMap<String,Double>(comparator1);\n\t\t\tTopFive.putAll(map);\n\t\t\t\n\t\t\tIterator<Entry<String,Double>> iter = TopFive.entrySet().iterator();\n\t\t\tEntry<String,Double> entry = null;\n\t\t\twhile(TopFive.size()>10)\n\t\t\t{\n\t\t\t\tentry = iter.next();\n\t\t\t\titer.remove();\n\t\t\t}\n\t\t\t//System.out.println(\"Size of HashMap:\"+map.size()+\"Size after deletion:\"+TopFive.size());\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tEntry<String,Double> temp = iter.next();\n\t\t\t\tString val = temp.getKey();\n\t\t\t\tdouble tfidf = temp.getValue();\n\t\t\t\tString word = val.split(\",\")[1];\n\t\t\t\tString article = val.split(\",\")[0];\n\t\t\t\tdouble tf = Double.parseDouble(val.split(\",\")[2]);\n\t\t\t\tdouble idf = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t\tString new_val = \"Word--->\"+word+\",Term Frequency--->\"+tf+\",IDF--->\"+idf+\",TFIDF--->\"+tfidf;\n\t\t\t\tcontext.write(new Text(article), new Text(new_val));\n\t\t\t}\n\t\t}", "public static String[][] ReadTestData(String pathToCSVfile) throws Exception{\n\t\t\t\n\t\t//\tHashMap<String,String> theMap = new HashMap<String,String>();\n\n\t\t \n //Create object of FileReader\n FileReader inputFile = new FileReader(pathToCSVfile);\n \n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n \n //Variable to hold one line data\n String line;\n int NumberOfLines = 0;\n \n String[][] data = new String[1000][25]; // set the max rows to 1000 and col to 100\n \n // Read file line by line and print on the console\n while ((line = bufferReader.readLine()) != null) {\n \t \n \t String[] lineArray = line.split(Pattern.quote(\",\")); //split the line up and save to array\n \t int lineSize = lineArray.length;\n \t int z;\n \t for (z = 0; z <= (lineSize-1);)\n \t {\n \t\t data[NumberOfLines][z] = lineArray[z].toString();\n \t\t z++;\n \t } \n \t \n \t if(z <= 25) // read in 25 cols to make sure the array does not have nulls that other areas of the code are looking in\n \t {\t \t\t \n \t\t while (z <= 24)\n\t \t {\t\t \n \t\t\t data[NumberOfLines][z] = \" \";\n\t \t\t z++;\n\t \t } \n \t }\n \t NumberOfLines++; \n \t \n }\n \n bufferReader.close();\n \n // for (int h=0; h< NumberOfLines; h++) {theMap.put(data[h][0],data[h][1]); }\n \n \n System.out.println(\"Test Data has been saved \"); \n \n \t \n return data;\n \n\t \n\t}", "void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }", "@Override\n protected void map(\n \t\tLongWritable key, // input key type\n Text value, // input value type\n Context context) throws IOException, InterruptedException {\n\n \t\t//Create array with the words from input, splitted by space character\n String[] words = value.toString().split(\"\\\\s+\");\n \n for (String string : words) {\n \t//Remove not alphabetic characters\n \tString cleanWord = string.replaceAll(\"[^\\\\p{Alpha}]\", \"\");\n \t//Export lowercased word along with the name of the file the word comes from \n \tif (!cleanWord.isEmpty()) {\n\t\t\t\t\tcontext.write(new Text(cleanWord.toLowerCase()),new Text(((FileSplit)context.getInputSplit()).getPath().getName()));\n\t\t\t\t}\n\t\t\t}\n }", "private void readKeyDataToIdentifyTransactions(){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(keyFile));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif((line.startsWith(\"#\")) || (line.equals(\"\")))\n\t\t\t\t\tcontinue;\n\t\t\t\telse{\n\t\t\t\t\tString transacName = line.split(\";\")[0];\n\t\t\t\t\tchar transacType = line.split(\";\")[1].charAt(0);\n\t\t\t\t\ttypeTransData.put(transacName,transacType);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! \"+ keyFile +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"Please try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t}", "public void analysisAndImport(File uploadedFile)\n {\n Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();\n\n try\n {\n String[] keyArr = null;\n String key = null;\n String strKey = null;\n String strValue = null;\n InputStream is;\n is = new FileInputStream(uploadedFile);\n BufferedReader bf = new BufferedReader(new InputStreamReader(is));\n Properties prop = new Properties();\n prop.load(bf);\n Enumeration enum1 = prop.propertyNames();\n while (enum1.hasMoreElements())\n {\n // The key profile\n strKey = (String) enum1.nextElement();\n key = strKey.substring(0, strKey.lastIndexOf('.'));\n keyArr = strKey.split(\"\\\\.\");\n // Value in the properties file\n strValue = prop.getProperty(strKey);\n Set<String> keySet = map.keySet();\n if (keySet.contains(key))\n {\n Map<String, String> valueMap = map.get(key);\n Set<String> valueKey = valueMap.keySet();\n if (!valueKey.contains(keyArr[2]))\n {\n valueMap.put(keyArr[2], strValue);\n }\n }\n else\n {\n Map<String, String> valueMap = new HashMap<String, String>();\n valueMap.put(keyArr[2], strValue);\n map.put(key, valueMap);\n }\n }\n // Data analysis\n analysisData(map);\n }\n catch (Exception e)\n {\n logger.error(\"Failed to parse the file\", e);\n }\n }", "public static void main(String args[]) throws Exception{\n Pattern patron = Pattern.compile(\"\\\\s+\");\n\n //leer todas las lineas del archivo\n Stream<String> lineas = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1);\n\n //eliminamos signos de puntuacion\n Stream<String> lineasProcesadas = lineas.map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\"));\n\n //trocear las lineas para tratar con palabras\n\n Stream<String> palabras = lineasProcesadas.flatMap(linea -> patron.splitAsStream(linea));\n\n //filtrar palabras vacias\n\n Stream<String> sinVacias = palabras.filter(palabra -> !palabra.isEmpty());\n\n // generar un diccionario con entradas tipo <palabra, numero de ocurrencias>\n // queremos que el diccionario sea tipo TreeMap\n\n TreeMap<String,Long> mapa = sinVacias.collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n //Ahora todo compactado\n\n TreeMap<String,Long> mapa2 = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1).\n map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\")).\n flatMap(linea -> patron.splitAsStream(linea)).\n filter(palabra -> !palabra.isEmpty()).\n collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n mapa2.forEach(\n (palabra, numero) -> System.out.println(palabra + \" : \" + numero)\n );\n\n //Con esto pedo crear un stream\n //mapa2.entrySet().stream().forEach();\n\n\n //agrupamiento por inicales, todas las palabras con dicha inicial y contadores\n\n TreeMap<Character, List<Map.Entry<String,Long>>> mapa3 = mapa2.\n entrySet().\n stream().\n collect(Collectors.groupingBy(entrada -> entrada.getKey().charAt(0),TreeMap::new,Collectors.toList()));\n\n mapa3.forEach((inicial,listaPalabras) -> {\n System.out.printf(\"%n%c%n\", inicial);\n listaPalabras.stream().forEach( entrada -> {\n System.out.printf(\"%13s: %d%n\", entrada.getKey(), entrada.getValue());\n });\n });\n\n\n\n\n }", "@Override\r\n\t\t//Reducer method\r\n\t\tpublic void reduce(Text key, Iterable<Text>values, Context c) throws IOException,InterruptedException{\n\t\t\tint count = 0;\r\n\t\t\t//for each time the particular key value pair occurs \r\n\t\t\t//Increase the count by 1\r\n\t\t\tfor(Text val:values){\r\n\t\t\t\tcount += 1;\r\n\t\t\t}\r\n\t\t\tString info = key.toString();\r\n String [] info_part = info.split(\"\\\\_\");\r\n\t\t\t\t\t\t//Create a list key value pairs \r\n\t\t\tc.write(new Text(info_part[0]+\",\"+info_part[1]+\",\"), new Text(\"\"+count));\t\r\n\r\n\t\t}", "MapBuilder<K,V> split(long split);", "public static void main(String[] args) {\n\t\tArrayList<String> Array1 = new ArrayList<String>();\n\t\tScanner read = null;\n\t\tScanner in = new Scanner(System.in);\n\t\tPrintWriter write = null;\n\t\tString numbers[]= {\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"};\n\t\tString letters[]= {\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n\t\tboolean containsNum = false;\n\t\tboolean containsLet = false;\n\t\tString store = null;\n\t\tchar c1='A';\n\t\ttry {\n\t //asking for user input \n\t\tSystem.out.println(\"write the name of the file you want to format into a subdictionnary:\");\n\t\tString input = in.nextLine();\n\t\tread = new Scanner(new FileInputStream(input));\n\t\twrite = new PrintWriter(new FileOutputStream(\"test1.txt\"));\n\t\t//while loop that parses each word and satisfies the conditions \n\t\twhile(read.hasNext()) {\n\t\t\tstore = read.next();\n\t\t\t// deleting the punctuation\n\t\t\tstore=store.replaceAll(\"[\\\\.$|,|;|!|?|:|=]\", \" \");\n\t\t\tstore=store.replaceAll(\"'s|'m\", \"\");\n\t\t\t//checks for letters\n\t\t\tfor(int j = 0 ; j<letters.length ; j++) {\n\t\t \tcontainsLet=store.equalsIgnoreCase(letters[j]);\n\t\t \tif(containsLet) {\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t\t\t//checks for numbers\n\t\t for(int i = 0 ; i<numbers.length ; i++) {\n\t\t \tcontainsNum=store.contains(numbers[i]);\n\t\t \tif(containsNum) {\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \t\n\t\t }\n\t\t\tif(containsNum || containsLet) {\n\t\t\t\tcontinue;\n\t\t\t}else {\n\t\t\t\tstore=store.toUpperCase();\n\t\t\t\tArray1.add(store);\n\t\t\t}\n\t\t}\n\t\t//adds it to the arraylist\n\t\tfor(int k = 0; k < Array1.size(); k++)\n\t\t{\n\t\t\twrite.println(Array1.get(k));\n\t\t}\n\t\tread.close();\n\t\twrite.close();\n\t\t//puts it in a temporary file \n\t\tread = new Scanner(new FileInputStream(\"test1.txt\"));\n\t\twrite = new PrintWriter(new FileOutputStream(\"SubDictionary.txt\"));\n\t\tArray1.clear();\n\t\t//removes any space between two words and makes them seperate \n\t\twhile(read.hasNext()) {\n\t\t\tstore = read.next();\n\t\t\t//checks for letters \n\t\t\tfor(int j = 0 ; j<letters.length ; j++) {\n\t\t \tcontainsLet=store.equalsIgnoreCase(letters[j]);\n\t\t \tif(containsLet) {\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t\t\t//checks for numbers \n\t\t for(int i = 0 ; i<numbers.length ; i++) {\n\t\t \tcontainsNum=store.contains(numbers[i]);\n\t\t \tif(containsNum) {\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \t\n\t\t }\n\t\t\tif(containsNum || containsLet) {\n\t\t\t\tcontinue;\n\t\t\t}else {\n\t\t\t\tstore=store.toUpperCase();\n\t\t\t\t\n\t\t\t}\n\t\t\tArray1.add(store);\n\t\t}\n\t\t//removes duplicates and sorts them by alphabetical order\n\t\tArray1=removeRepeating(Array1);\n\t\tArray1.sort(String::compareToIgnoreCase);\n\t\twrite.println(\"The document produced this sub-dictionary, which includes \" + Array1.size() + \" entries.\");\n\t\twrite.println();\n\t\twrite.println(c1);\n\t\twrite.println(\"==\");\n\t\t//checks the letters to start each specific letter section \n\t\tfor(int k = 0; k < Array1.size(); k++)\n\t\t{\n\t\t\tif(Array1.get(k).charAt(0)!=c1 ) {\n\t\t\t\tif(Array1.get(k).charAt(0)==++c1) {\n\t\t\t\twrite.println(c1);\n\t\t\t\twrite.println(\"==\");\n\t\t\t\t}else{\n\t\t\t\t\tchar temp=Array1.get(k).charAt(0);\n\t\t\t\t\tc1=temp;\n\t\t\t\t\twrite.println(c1);\n\t\t\t\t\twrite.println(\"==\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twrite.println(Array1.get(k));\n\t\t}\n\t\tSystem.out.println(\"SubDictionary.txt was created\");\n\t\t}\n\t\t//catch in the case of a filenotfound \n\t\tcatch(FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File was not found\");\n\t\t}\n\t\t//closes the scanner and printwriter\n\t\tfinally {\n\t\t\tread.close();\n\t\t\twrite.close();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n public void run() {\n Integer test = readLineAsInteger();\n for (int t = 1; t <= test; t++) {\n\n Integer n = readLineAsInteger();\n map.clear();\n int[][] new_table = new int[100][100];\n int[][] new_table2 = new int[100][100];\n \n ///For Input \n for (int i = 0; i < n; i++) {\n\n str[i] = readLine();\n str[i] = toLowerCase(str[i]);\n map.put(str[i], i);\n String str2 = readLine();\n String[] splitted3 = str2.split(\"[' ']\");\n row[i] = Integer.parseInt(splitted3[0]);\n col[i] = Integer.parseInt(splitted3[1]);\n String str3 = readLine();\n String[] splitted1 = str3.split(\"[' ']\");\n\n\n int l = 0;\n for (String split : splitted1) {\n // System.out.println(split);\n \n column[i][l] = split;\n column[i][l]=toLowerCase(column[i][l]);\n l += 1;\n \n \n\n }\n\n for (int j = 0; j < row[i]; j++) {\n String str4 = readLine();\n String[] splitte2 = str4.split(\"[' ']\");\n l = 0;\n\n for (String split : splitte2) {\n // System.out.println(split);\n\n table[i][j][l] = Integer.parseInt(split);\n l++;\n }\n }\n }\n int q;\n q = readLineAsInteger();\n String query;\n System.out.println(\"Test: \" + t);\n for (int m = 1; m <= q; m++) {\n String[] current = new String[100];\n\n map1.clear();\n\n query = readLine();\n// System.out.println(\"===> query: \" + query;\n int t1 = 0, found = 0;\n String[] splitted = query.split(\"[' ',]\");\n for (String split : splitted) {\n if (split.equals(\"Select\") || split.equals(\"select\") || split.equals(\"SELECT\")) {\n continue;\n }\n if (split.equals(\",\") || split.equals(\" \") || split.equals(\"=\")) {\n continue;\n }\n if (split.length() == 0) {\n continue;\n }\n if (split.equals(\"*\")) {\n found = 1;\n\n break;\n }\n current[t1] = split;\n t1 = t1 + 1;\n }\n\n String query1 = readLine();\n //System.out.println(\"query1: \" + query1);\n String[] second_part = query1.split(\"[' ',]\");\n int sec_part = -1, check = 0;\n for (String split : second_part) {\n check++;\n if (check == 1) {\n continue;\n }\n if (split.equals(\",\") || split.equals(\" \") || split.equals(\"=\") || split.equals(\"from\") || split.equals(\"FROM\")) {\n continue;\n }\n if (split.length() > 0) {\n\n if (sec_part == -1) {\n // printLine(split);\n\n sec_part = map.get(split);\n // printLine(sec_part);\n map1.put(split, sec_part);\n } else {\n map1.put(split, sec_part);\n }\n }\n\n }\n String query2 = readLine();\n // System.out.println(\" query2: \" + query2);\n int th_part = -1;\n check = 0;\n String[] third_part = query2.split(\"[' ',]\");\n for (String split : third_part) {\n check++;\n if (check == 1) {\n continue;\n }\n if (split.equals(\",\") || split.equals(\" \") || split.equals(\"=\") || split.equals(\"join\") || split.equals(\"JOIN\")) {\n continue;\n }\n if (split.length() > 0) {\n\n if (th_part == -1) {\n\n //printLine(th_part);\n //printLine(split);\n th_part = map.get(split);\n //printLine(th_part);\n\n map1.put(split, th_part);\n } else {\n map1.put(split, th_part);\n }\n }\n\n }\n\n String query3 = readLine();\n\n //System.out.println(\"query3: \" + query3); \n String[] list = query3.split(\"[' ',=]\");\n check = 0;\n int flag = 0;\n int[] ara1 = new int[10];\n int[] ara2 = new int[10];\n\n for (String split : list) {\n check++;\n if (check == 1) {\n continue;\n }\n if (split.equals(\",\") || split.equals(\" \") || split.equals(\"=\") || split.equals(\"on\") || split.equals(\"ON\")) {\n continue;\n }\n if (split.length() > 0) {\n\n find_id(split);\n ara1[flag] = a;\n ara2[flag] = b;\n flag = flag ^ 1;\n }\n }\n String c = readLine();\n\n int visited[] = new int[500];\n int p1 = ara1[0];\n int p3 = ara2[0];\n int p2 = ara1[1];\n int p4 = ara2[1];\n int r = 0;\n\n for (int i = 0; i < row[p1]; i++) {\n for (int j = 0; j < row[p2]; j++) {\n if (table[p1][i][p3] == table[p2][j][p4]) {\n\n for (int x = 0; x < col[p1]; x++) {\n new_table[r][x] = table[p1][i][x];\n }\n for (int x = 0; x < col[p2]; x++) {\n int p5 = x + col[p1];\n new_table[r][p5] = table[p2][j][x];\n }\n r = r + 1;\n }\n }\n }\n\n if (found != 0) {\n\n for (int i = 0; i < col[p1]; i++) {\n System.out.print(column[p1][i] + \" \");\n }\n for (int i = 0; i < col[p2]; i++) {\n System.out.print(column[p2][i] + \" \");\n }\n System.out.println();\n for (int i = 0; i < r; i++) {\n int check1 = 0;\n for (int j = i + 1; j < r; j++) {\n for (int k = 0; k < col[p1] + col[p2]; k++) {\n if (new_table[i][k] < new_table[j][k]) {\n break;\n }\n if (new_table[i][k] > new_table[j][k]) {\n check1 = 1;\n break;\n }\n\n }\n if (check1 == 0) {\n continue;\n }\n for (int p = 0; p < col[p1] + col[p1]; p++) {\n int t2 = new_table[p][i];\n new_table[i][p] = new_table[j][p];\n new_table[j][p] = t2;\n }\n }\n }\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < col[p1] + col[p2]; j++) {\n System.out.print(new_table[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println();\n\n continue;\n }\n\n \n int mn = 0;\n for (int i = 0; i < t1; i++) {\n find_id(current[i]);\n\n System.out.print(column[a][b] + \" \");\n int ans = b;\n if (a != p1) {\n ans = ans + col[p1];\n }\n for (int j = 0; j < r; j++) {\n new_table2[j][mn] = new_table[j][ans];\n }\n mn = mn + 1;\n\n }\n System.out.println();\n for (int i = 0; i < r; i++) {\n int check2 = 0;\n for (int j = i + 1; j < r; j++) {\n for (int k = 0; k < mn; k++) {\n if (new_table2[i][k] < new_table2[j][k]) {\n break;\n }\n if (new_table2[i][k] > new_table2[j][k]) {\n check2 = 1;\n break;\n }\n\n }\n if (check2 == 0) {\n continue;\n }\n for (int p = 0; p < mn; p++) {\n int t2 = new_table2[p][i];\n new_table2[i][p] = new_table2[j][p];\n new_table2[j][p] = t2;\n }\n }\n }\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < mn; j++) {\n System.out.print(new_table2[i][j] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n }\n }\n\n }", "public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "private void readFiles(File fileDir) {\n \t\n\t\tif(!fileDir.exists() || !fileDir.isDirectory()) {\n\t\t\treturn;\n\t\t}\n\t\tBufferedReader reader = null;\n\t\tString command = \"cat \";\n\t\tFile[] files = fileDir.listFiles();\n\t\tfor(File file : files) {\n\t\t\tcommand += file.getAbsolutePath();\n\t\t\tcommand += \" \";\n\t\t}\n\t\tcommand += \" | sort\";\n\t\tString[] cmd = {\n\t\t\t\t\"sh\",\n\t\t\t\t\"-c\",\n\t\t\t\tcommand\n\t\t\t\t};\n\t\tProcess p;\n\t\ttry {\n\t\t\tp = Runtime.getRuntime().exec(cmd);\n\t\t\treader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\tString line = null;\n\t\t\tString lastKey = null;\n\t\t\tList<String> values = new ArrayList<String>();\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\tString[] parts = line.split(\"\\\\t\");\n\t\t\t\tif (parts.length < 2) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString thisKey = parts[0].trim();\n\t\t\t\tString value = parts[1].trim();\n\t\t\t\thandler.onKVPairRead();\n\t\t\t\tif (lastKey != null && !thisKey.equals(lastKey)) {\n\t\t\t\t\tlines.add(new KVPair(lastKey, new ArrayList<String>(values)));\n\t\t\t\t\tvalues.clear();\n\t\t\t\t}\n\t\t\t\tlastKey = thisKey;\n\t\t\t\tvalues.add(value);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treduceComplete = true;\n }", "public void map(LongWritable key, Text value, OutputCollector <Text, Text> output, Reporter reporter) throws IOException {\n\n\t\tString valueString1 = value.toString();\n\t\tString valueString=valueString1.replaceAll(\"[\\\\n]\",\" \");\n\t\tString[] Data_raw = valueString.split(\"\\t\");\n\t\tif(Data_raw.length > 4)\n\t\t{\n\t\t\n\t\tString[] Data = Data_raw[4].split(\" |\\\\,|\\\\.|!|\\\\?|\\\\:|\\\\;|\\\\\\\"|\\\\(|\\\\)|\\\\<|\\\\>|\\\\[|\\\\]|\\\\#|\\\\$|\\\\=|\\\\-|\\\\/\");\n\t\tfor(String s: Data)\n\t\t{\n\t\t\toutput.collect(new Text(s.toString().toLowerCase()), new Text(Data_raw[0].toString()));\n\t\t}\n\t\t}\n\t}", "private static void readWordsIntoMap(SimpleReader in,\n Map<String, Integer> wordMap, char[] seps) {\n String line = \"\";\n wordMap.clear();\n\n while (!in.atEOS()) {\n line = in.nextLine();\n for (char sep : seps) {\n line = line.replace(sep, ':');\n }\n\n String[] words = line.split(\":\");\n\n for (String word : words) {\n if (!wordMap.hasKey(word) && word != \" \") {\n wordMap.add(word, 1);\n } else {\n int count = wordMap.value(word);\n count++;\n wordMap.replaceValue(word, count);\n }\n }\n }\n\n }", "public void test() throws IOException, SQLException\r\n\t{\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(\"src/result.txt\")));\r\n\t\tList<String> sents = new ArrayList<>();\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"src/test_tmp_col.txt\")));\r\n\t\tString line = \"\";\r\n\t\tString wordseq = \"\";\r\n\t\tList<List<String>> tokens_list = new ArrayList<>();\r\n\t\tList<String> tokens = new ArrayList<>();\r\n\t\twhile((line=br.readLine())!=null)\r\n\t\t{\r\n\t\t\tif(line.trim().length()==0)\r\n\t\t\t{\r\n\t\t\t\tsents.add(wordseq);\r\n\t\t\t\ttokens_list.add(tokens);\r\n\t\t\t\twordseq = \"\";\r\n\t\t\t\ttokens = new ArrayList<>();\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tString word = line.split(\"#\")[0];\r\n\t\t\t\twordseq += word;\r\n\t\t\t\ttokens.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tfor(String sent : sents)\r\n\t\t{\r\n\t\t\tString newsURL = null;\r\n\t\t\tString imgAddress = null;\r\n\t\t\tString newsID = null;\r\n\t\t\tString saveTime = null;\r\n\t\t\tString newsTitle = null;\r\n\t\t\tString placeEntity = null;\r\n\t\t\tboolean isSummary = false;\r\n\t\t\tPair<String, LabelItem> result = extractbysentence(newsURL, imgAddress, newsID, saveTime, newsTitle, sent, placeEntity, isSummary);\r\n\t\t\t\r\n\t\t\tif(result!=null)\r\n\t\t\t{\r\n\t\t\t\r\n//\t\t\t\tSystem.out.print(result.getSecond().eventType+\"\\n\");\r\n\t\t\t\tbw.write(sent+'\\t'+result.getSecond().triggerWord+\"\\t\"+result.getSecond().sourceActor+'\\t'+result.getSecond().targetActor+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tbw.write(sent+'\\n');\r\n\t\t\t}\r\n\t\t}\r\n\t\tbw.close();\r\n\t\t\r\n\t}", "public static HashMap<String, IRI> processCSVGoTHash(String path) throws FileNotFoundException {\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n String currentLine;\n int lineN = 0;\n String value=\"\";\n String term=\"\";\n HashMap<String, IRI> got = new HashMap<String, IRI>();\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n if(info.length==2) {\n value = info[0];\n term = info[1];\n }\n got.put(value, IRI.create(term));\n\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return got ;\n }", "public Map<String, Integer> processMapAndReduce(String inputFileName) {\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tMap<String, Integer> wordCountMap = null;\n\t\ttry {\n\t\t\tFile inputFile = new File(\n\t\t\t\t\t(this.getClass().getClassLoader()\n\t\t\t\t\t\t\t.getResource(inputFileName)).toURI());\n\t\t\tfr = new FileReader(inputFile);\n\t\t\t// URLConnection yc = oracle.openConnection();\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\tlong contentLength = inputFile.length();\n\t\t\t// Number of threads are determined from run time\n\t\t\tint numberOfThreads = Runtime.getRuntime().availableProcessors();\n\t\t\t// Thread pool executor initialized\n\t\t\tThreadPoolExecutor threadpoolExecutor = new ThreadPoolExecutor(\n\t\t\t\t\tnumberOfThreads, numberOfThreads, 10, TimeUnit.SECONDS,\n\t\t\t\t\tnew LinkedBlockingQueue<Runnable>());\n\t\t\t// Thread pool executor invoked\n\t\t\twordCountMap = invokeThreadExecutor(threadpoolExecutor,\n\t\t\t\t\tcontentLength, numberOfThreads, br);\n\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"IOException occured in WordCountProcessor:: processMapAndReduce\"\n\t\t\t\t\t+ e.toString());\n\t\t} catch (URISyntaxException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tlog.error(\"URISyntaxException occured in WordCountProcessor:: processMapAndReduce\"\n\t\t\t\t\t+ e.toString());\n\t\t}\n\n\t\tfinally {\n\t\t\tIOUtils.closeQuietly(br);\n\t\t\tIOUtils.closeQuietly(fr);\n\n\t\t}\n\t\treturn wordCountMap;\n\n\t}", "public int dissect(byte[] source, Map<String, Object> keyValueMap) {\n final Map<Field, ValueRef> fieldValueRefMap = createFieldValueRefMap();\n // here we take the bytes (from a Ruby String), use the fields list to find each delimiter and\n // record the indexes where we find each fields value in the fieldValueRefMap\n // note: we have not extracted any strings from the source bytes yet.\n int pos = dissectValues(source, fieldValueRefMap);\n // dissectValues returns the position the last delimiter was found\n ValueResolver resolver = new ValueResolver(source, fieldValueRefMap);\n // iterate through the sorted saveable fields only\n for (Field field : saveableFields) {\n // allow the field to append its key and\n // use the resolver to extract the value from the source bytes\n field.append(keyValueMap, resolver);\n }\n return pos;\n }", "@Override\n\tpublic void run() {\n\t\t\n//\t\tFor counting the occurences of each key.\n\t\tfor (String key : this.keys) {\n\t\t\tthis.keysCounts.put(key, 0);\n\t\t}\n\t\t\n//\t\tFor reading the input file.\n\t\tScanner inputReader = null;\n\t\t\n\t\ttry {\n\t\t\t\n//\t\t\tInitializes the reader.\n\t\t\tinputReader = new Scanner(new FileInputStream(this.inputFile));\n\t\t\t\n//\t\t\tWe loop for each line of the input file (each line contains a word).\n\t\t\tString wordRead = null;\n\t\t\tInteger matchingCount = 0;\n\t\t\twhile (inputReader.hasNextLine()) {\t\n\t\t\t\t\n//\t\t\t\tWe check if the word is a member of the keys set, and if so we increment its \n//\t\t\t\tcurrent count in the Map.\n\t\t\t\tif ((matchingCount = this.keysCounts.get(\n\t\t\t\t\t\twordRead = inputReader.nextLine().split(\" \")[0])) != null) {\n\t\t\t\t\tthis.keysCounts.put(wordRead, matchingCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\tNow the partial job is done, the main thread will do the rest of the reducing.\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tinputReader.close();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n StringBuffer sb1 = new StringBuffer();\n Map<String, Integer> map1 = new HashMap<String, Integer>();\n for(Text value:values){\n sb1 = new StringBuffer();\n String[] temp = sb1.append(value.toString()).reverse().toString().split(\":\"); // 倒转 防止前面有冒号\n String path = new StringBuffer(temp[1].split(\"/\")[0]).reverse().toString();\n int count = Integer.valueOf(temp[0]);\n System.out.println(\"readucepath!!!\"+path);\n System.out.println(count);\n if (map1.containsKey(path)){\n map1.put(path, map1.get(path) + count);\n }else{\n map1.put(path, count);\n }\n }\n sb1.delete(0, sb1.length() - 1);\n for(Map.Entry<String,Integer> entry :map1.entrySet()){\n sb1.append(entry.getKey()).append(\":\").append(entry.getValue());\n }\n outvalue.set(new Text(sb1.toString()));\n context.write(key,outvalue);\n }", "static Map.Entry<String, String> splitLine(String line) {\n // TODO: Make this method less gross!\n int count = 0;\n int cur = 0;\n do {\n cur = line.indexOf(' ', cur+1); // Move cursor to next space character.\n count++;\n } while (0 <= cur && count < 4);\n\n String key, value;\n if (0 <= cur && cur < line.length()) {\n // Don't include the separating space in either `key` or `value`:\n key = line.substring(0, cur); //\n value = line.substring(cur+1, line.length());\n } else {\n key = line;\n value = \"\";\n }\n\n return new Map.Entry<String, String>() {\n @Override public String getKey() {\n return key;\n }\n @Override public String getValue() {\n return value;\n }\n @Override public String setValue(String value) {\n throw new UnsupportedOperationException();\n }\n };\n }", "void parseWritable(final DataInputStream in) throws IOException {\n // First clear the map. Otherwise we will just accumulate entries every time this method is called.\n this.map.clear();\n // Read the number of entries in the map\n int entries = in.readInt();\n // Then read each key/value pair\n for (int i = 0; i < entries; i++) {\n byte[] key = Bytes.readByteArray(in);\n // We used to read a byte that encoded the class type. Read and ignore it because it is always byte [] in hfile\n in.readByte();\n byte[] value = Bytes.readByteArray(in);\n this.map.put(key, value);\n }\n }", "private String prepareText(Object[] fileObjectArray) {\n String fullString = \"\";\n\n HashMap<String, Integer> totalVoteHashMap = new HashMap<>();\n List<String> districtList = new ArrayList();\n for(Object o: fileObjectArray){\n String districtName = createDistrictName(o.toString().split(\",\")[1] + o.toString().split(\",\")[2].replace(\"\\\"\",\"\"));\n\n if(!districtList.contains(districtName)){\n districtList.add(districtName);\n totalVoteHashMap.put(districtName, Integer.parseInt(o.toString().split(\",\")[23]));\n }\n else{\n totalVoteHashMap.put(districtName, totalVoteHashMap.get(districtName) + Integer.parseInt(o.toString().split(\",\")[23]));\n }\n }\n\n for (Object o : fileObjectArray) {\n String[] lineArray = o.toString().replace(\"\\\"\",\"\").split(\",\");\n String party;\n String votes;\n String percentage;\n String name;\n String cycleId = \"\";\n String result;\n String district;\n\n //reset this for each file.\n String cycle = \"2016\";\n\n name = createName(lineArray[16] + \",\" + lineArray[17]);\n district = createDistrictName(lineArray[1] + \",\" + lineArray[2]);\n party = setPartyId(lineArray[19]);\n votes = lineArray[23];\n percentage = createPercentage(district, votes, totalVoteHashMap);\n\n if (Double.parseDouble(percentage) >= 50) {\n result = \"Won\";\n } else {\n result = \"Lost\";\n }\n\n\n //this sets the election cycle with the id associated with it in the database.\n switch (cycle) {\n case \"2016\":\n cycleId = \"1\";\n break;\n case \"2015\":\n cycleId = \"2\";\n break;\n case \"2014\":\n cycleId = \"3\";\n break;\n case \"2017\":\n cycleId = \"4\";\n break;\n case \"2013\":\n cycleId = \"5\";\n break;\n case \"2018\":\n cycleId = \"6\";\n break;\n case \"2019\":\n cycleId = \"7\";\n break;\n case \"2020\":\n cycleId = \"8\";\n break;\n }\n\n StringJoiner stringJoiner = new StringJoiner(\",\");\n stringJoiner.add(name.trim());\n stringJoiner.add(party.trim());\n stringJoiner.add(votes.trim());\n stringJoiner.add(percentage.trim());\n stringJoiner.add(district.trim());\n stringJoiner.add(result.trim());\n stringJoiner.add(cycleId.trim());\n //reset this for each file.\n stringJoiner.add(\"HI\");\n fullString += stringJoiner.toString() + \"\\n\";\n }\n return fullString;\n }", "private static Map<Integer, Map<String, List<String>>> importSummaries(\n String inputDir, String summarizer) {\n ObjectMapper mapper = new ObjectMapper();\n Map<Integer, Map<String, List<String>>> kToDocSummaries = new HashMap<>();\n for (int k : K_LIST) {\n Path summaryPath = Paths.get(inputDir, summarizer + \"_\" + String.valueOf(k) + \".json\");\n try (BufferedReader reader = Files.newBufferedReader(summaryPath)) {\n Map<String, List<String>> docToSummary = mapper.readValue(\n reader, new TypeReference<HashMap<String, List<String>>>() {\n });\n docToSummary.entrySet().removeIf(e -> e.getValue().size() < k);\n kToDocSummaries.put(k, docToSummary);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return kToDocSummaries;\n }", "@Override\n protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String inputLine = value.toString().trim();\n String[] fromPageToPages = inputLine.split(\"\\t\");\n if (fromPageToPages.length == 1 || fromPageToPages[1].trim().equals(\"\")) {\n return;\n }\n String from = fromPageToPages[0];\n String[] tos = fromPageToPages[1].split(\",\");\n for (String to : tos) {\n context.write(new Text(from), new Text(to + \"=\" + (double)1/tos.length));\n }\n }", "@Override\n public void decodeValueInto(BlockBuilder builder, Slice slice, int offset, int length)\n throws FileCorruptionException\n {\n KeyOnlyEntryDecoder keyDecoder = new KeyOnlyEntryDecoder();\n processEntries(slice, offset, length, keyDecoder);\n Block keyBlock = keyDecoder.getKeyBlock();\n\n // determine which keys are distinct\n boolean[] distinctKeys = distinctMapKeys.selectDistinctKeys(keyBlock);\n\n // add the distinct entries to the map\n ((MapBlockBuilder) builder).buildEntry((keyBuilder, valueBuilder) -> {\n DistinctEntryDecoder entryDecoder = new DistinctEntryDecoder(distinctKeys, keyBlock, keyBuilder, valueBuilder);\n processEntries(slice, offset, length, entryDecoder);\n });\n }", "public void loadTroubleMarker(HashMap<Integer, TroubleMarker> TroubleMarker_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"TroubleMarker.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(TroubleMarker_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n TroubleMarker troubleMarker = new TroubleMarker(-1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n troubleMarker.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n troubleMarker.setAreaNumber(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n TroubleMarker_HASH.put(troubleMarker.getId(), troubleMarker);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadTroubleMarker\");\r\n }\r\n \r\n }", "public static void getAllValidTickersWithExchangesAndSectors()\n {\n PrintWriter writer = null;\n HashMap<String,Integer> sec = new HashMap<>();\n HashMap<String,Integer> ex = new HashMap<>();\n int counter = 0;\n try {\n writer = new PrintWriter(\"data/validTickers.txt\", \"UTF-8\");\n BufferedReader br = new BufferedReader(new FileReader(\"data/tickers.csv\"));\n String sCurrentLine = null;\n while ((sCurrentLine = br.readLine()) != null) {\n counter++;\n String[] arr = sCurrentLine.split(\",\");\n String ticker = arr[0].substring(1, arr[0].length() - 1);\n int secIndex = arr.length - 1;\n int exIndex = arr.length - 3;\n if(arr[exIndex].equals(\"\") || arr[secIndex].equals(\"0\") || arr[secIndex].equals(\"\"))\n {\n continue;\n }\n System.out.println(counter+\" : \"+arr[exIndex]+\" : \"+ arr[secIndex]);\n String exchange = arr[exIndex].substring(1,arr[exIndex].length() -1);\n String sector = arr[secIndex];\n if(sec.containsKey(sector))\n {\n sector = sec.get(sector).toString();\n }\n else\n {\n sec.put(sector,sec.size()+1);\n sector = sec.get(sector).toString();\n }\n if(ex.containsKey(exchange))\n {\n exchange = ex.get(exchange).toString();\n }\n else\n {\n ex.put(exchange,ex.size()+1);\n exchange = ex.get(exchange).toString();\n }\n try {\n\n File f = new File(\"data/stockData/\" + ticker);\n if(f.exists() && !f.isDirectory()) {\n writer.println(ticker+\",\"+sector+\",\"+exchange);\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n }\n writer.close();\n\n System.out.println(\"Loading ExMap : \"+ ex.size()+\" & SectorMap : \"+sec.size());\n writer = new PrintWriter(\"data/exchangeMap.txt\", \"UTF-8\");\n for( String s : ex.keySet())\n {\n writer.println(s+\",\"+ex.get(s));\n }\n writer.close();\n writer = new PrintWriter(\"data/sectorMap.txt\", \"UTF-8\");\n for( String s : sec.keySet())\n {\n writer.println(s+\",\"+sec.get(s));\n }\n writer.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n if(writer != null)\n {\n writer.close();\n }\n }\n\n\n\n\n }", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n StringTokenizer tokenizer = new StringTokenizer(value.toString());\n while (tokenizer.hasMoreTokens()) {\n String word = tokenizer.nextToken();\n if (buffer.containsKey(word)) {\n buffer.put(word, buffer.get(word) + 1);\n } else {\n buffer.put(word, 1);\n }\n }\n }", "@Override\n public void map(Chunk cs[]) {\n _vocabHM = VOCABHM;\n\n for (Chunk chk : cs) if (chk instanceof CStrChunk) {\n ValueStringCount tmp = new ValueStringCount();\n for (int row = 0; row < chk._len; row++) {\n chk.atStr(tmp, row);\n ValueStringCount tmp2 = VOCABHM.get(tmp);\n if (tmp2 == null) {\n VOCABHM.put(tmp, tmp);\n tmp = new ValueStringCount();\n } else tmp2.inc();\n }\n } // silently ignores other column types\n }", "private static Map<String, String> parseInstanceValues(String data) {\r\n \t\tMap<String, String> responseMap = new HashMap<String, String>();\r\n \t\tif (data != null) {\r\n \t\t\tStringTokenizer strTok = new StringTokenizer(data, \",\\n\");\r\n \t\t\twhile (strTok.hasMoreTokens()) {\r\n \t\t\t\tString key = strTok.nextToken();\r\n \t\t\t\tString val = strTok.nextToken();\r\n \t\t\t\tString oldVal = responseMap.get(key);\r\n \t\t\t\tif (oldVal != null) {\r\n \t\t\t\t\tif (val != null) {\r\n \t\t\t\t\t\tif (oldVal.trim().length() < val.trim().length()) {\r\n \t\t\t\t\t\t\tresponseMap.put(key, val);\r\n \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\tresponseMap.put(key, val);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn responseMap;\r\n \t}", "public static void buildDictionary() throws IOException {\n\t\t\n \tSystem.out.println(\"Loading dictionary...\");\n \t\n \tBufferedReader input = new BufferedReader( new FileReader(entities) );\n \tMapDictionary<String> dictionary = new MapDictionary<String>();\t\n \tString aux = null;\n \t\n\t\twhile ((aux=input.readLine())!=null) {\t\t\t\n\t\t\tif (aux.length()==0)\n\t\t\t\tcontinue;\n\n\t\t\taux.replaceAll(\"([A-Z])\",\" $1\").trim();\t\t\t\n\t\t\tdictionary.addEntry(new DictionaryEntry<String>(aux,aux,CHUNK_SCORE));\n\t \n\t\t}\n\t\t\n chunker = new ExactDictionaryChunker(dictionary,IndoEuropeanTokenizerFactory.INSTANCE,true,true);\n System.out.println(\"Dictionary contains \" + dictionary.size() + \" entries.\");\n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "public static void main(String[] args) throws IOException {\n\t\tScanner read = new Scanner(new File(\"C:/Users/MoniRakesh/Desktop/ITU_Study/CapstoneProject/\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ \"mssweProjmaster/musicAnalyser/src/main/webapp/resources/chords/Track1.txt\"));\r\n\t\tread.useDelimiter(\",\");\r\n\t\tString str=null;\r\n ArrayList song = new ArrayList();\r\n ArrayList str3Song = new ArrayList();\r\n \tArrayList maxChords= new ArrayList();\r\n \tArrayList ary= new ArrayList();\r\n\t\tint found = 0;\r\n\t\tint a = 0;\r\n\t\tint counter=2;\r\n\t\tHashMap map = new HashMap<String, Integer>();\r\n\t\t\r\n\t\twhile(read.hasNext()){\r\n\t\t\tsong.add(read.next());\r\n\t\t }\r\n\t\t\r\n\t\t for (int k = 0; k < song.size()-counter; k+=1) {\r\n\t\t\t\t\r\n\t\t\t\tfor (int m = k; m < counter+k; m++) {\r\n\t\t\t\t\t// System.out.println(s.charAt(i)+\"\"+s.charAt(i+=1));\r\n\t\t\t\t\tstr3Song.add(song.get(m));\r\n\t\t\t\t}\r\n\t\t\tfor (int j = 0; j < song.size()-counter; j+=1) {\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = j; i < counter+j; i++) {\r\n\t\t\t\t\t ary.add(song.get(i));\r\n\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif(ary.equals(str3Song)){\r\n\t\t\t\t\t\t\t\tfound++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString ssSong3 = \"\";\r\n\t\t\t\tfor (int i = 0; i < str3Song.size(); i++) {\r\n\t\t\t\t\tssSong3 = ssSong3 + str3Song.get(i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmap.put(ssSong3, found);\t\t\t\t\r\n\t\t\t\tmaxChords.add(found);\r\n\t\t\t\tary.clear();\r\n\r\n\t\t\t}\r\n\r\n\t\t\tstr3Song.clear();\r\n\t\t\tfound=0;\r\n\r\n\t}\r\n\t\t\t//map.forEach((k,v)->System.out.println(\"Patterns : \" + k + \" Repeated : \" + v));\r\n\r\n\t\t Collection c = map.values();\r\n\t\t\tint maxChord = (int)Collections.max(c);\r\n\t\t\tPrintWriter outputfile = new PrintWriter(\"C:/Users/MoniRakesh/Desktop/ITU_Study/CapstoneProject/mssweProjmaster\"\r\n\t\t\t\t\t+ \"/musicAnalyser/src/main/webapp/resources/chords/Track1RepPat.html\");\r\n\t\t\t\r\n\t\t\tfor (Object o : map.keySet()) {\r\n\t\t\t if (map.get(o).equals(maxChord)) {\r\n\t\t\t System.out.println(\" Max Repeated Patterns = \" + o + \" for \" + maxChord );\r\n\t\t\t \t \r\n\t\t\t\t\t\t//replace your System.out.print(\"your output\");\r\n\t\t\t\t\t\toutputfile.print(\"Max Repeated Pattern : \" + o + \" Count : \" + maxChord+\"\\n\");\r\n\t\t\t\t\t\t//outputfile.close(); \r\n\t\t\t }\r\n\t\t\t}\r\n\t\t//System.out.println(Collections.max(maxChords));\r\n\t\t\t//replace your System.out.print(\"your output\");\r\n\t\t\tmap.forEach((k,v)->outputfile.append(\"Pattern \" + k + \" Repeated : \" + v+\"\\n\"));\r\n\t\t\toutputfile.close(); \r\n\t\t\r\n\t}", "public static void main(String[] args) {\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n BufferedReader fileReader = new BufferedReader(new FileReader(reader.readLine()))) {\n\n //add all strings from file to List\n ArrayList<String> strings = new ArrayList<>();\n while (fileReader.ready()) {\n String line = fileReader.readLine();\n for (String string : line.split(\" +\")) {\n strings.add(string);\n }\n }\n\n //check list for Pairs\n int length = strings.size();\n String firstString;\n String secondString;\n String reverseString;\n\n for (int i = 0; i < length - 1; i++) {\n firstString = strings.get(i);\n for (int y = i + 1; y < length; y++) {\n secondString = strings.get(y);\n reverseString = new StringBuilder(secondString).reverse().toString();\n if (firstString.equals(reverseString)) {\n Pair pair = new Pair();\n pair.first = firstString;\n pair.second = secondString;\n if (!result.contains(pair)) {\n result.add(pair);\n }\n }\n }\n }\n\n\n\n\n// for (Pair pair : result) {\n// System.out.println(pair);\n// }\n\n } catch (IOException e) {\n\n }\n\n }", "private Map<Key, Integer> mergeDuplicatedItemsAndDelte0(simpleRingBuffer<byte[]> buff2) {\n\t\t// TODO Auto-generated method stub\n\t\t//Iterator<byte[]> ier0 = buff2.iterator();\t \t\n \n//\t\tMap<Key, Integer> deduplicatedMap = Maps.newLinkedHashMap();\n// \t \t\n//\t\twhile(!buff2.isEmpty()){\n//\t\t\t//delete\n//\t\t\tbyte[] out = buff2.pop();\n//\t\t\t//push to the hash table\n//\t\t\tif(!deduplicatedMap.containsKey( out.key)){\n//\t\t\t\tdeduplicatedMap.put( out.key, out.counter);\t \n//\t\t\t}else{\n//\t\t\t\tdeduplicatedMap.replace(out.key, out.counter+deduplicatedMap.get(out.key));\n//\t\t\t}\n//\t\t}\n//\t\treturn deduplicatedMap;\n\t\treturn null;\n\t}", "private void processFileEntries(final File filePath, Map<String, Integer> bigramHistogramMap) {\n\n BufferedInputStream bis = null;\n FileInputStream fis = null;\n\n try {\n\n // create FileInputStream object\n fis = new FileInputStream(filePath);\n\n // create object of BufferedInputStream\n bis = new BufferedInputStream(fis);\n\n String stringLine;\n\n BufferedReader br = new BufferedReader(new InputStreamReader(bis));\n\n String previousWord = \"\";\n\n while ((stringLine = br.readLine()) != null) {\n previousWord = addBigramHistogramEntry(stringLine, previousWord, bigramHistogramMap);\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found - \" + e);\n } catch (IOException ioe) {\n System.out.println(\"Exception while reading file - \" + ioe);\n } catch (Exception e) {\n System.out.println(\"Unable to load: \" + filePath.getName());\n } finally {\n // close the streams using close method\n try {\n if (fis != null) {\n fis.close();\n }\n if (bis != null) {\n bis.close();\n }\n } catch (IOException ioe) {\n System.out.println(\"Error while closing stream : \" + ioe);\n }\n }\n }", "public HashMap readFile(String filePath, HashMap source){\n\t\tArrayList<String> temp1 = new ArrayList<String>();\n\t\tArrayList<String> temp2 = new ArrayList<String>();\n\t\tBufferedReader br = null;\n\t\t\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\t\n\t\t\t// \"Users/Jasmine/Documents/Eclipse/CacheDictionary/src/english.txt\"\n\t\t\tbr = new BufferedReader(new FileReader(filePath)); \n\t\t\t\n\t\t\t//str.matches(\".*\\\\d+.*\"); ==> string that contains numbers\n\t\t\t//.matches(\"[a-zA-Z]+\"); ==> string that only contains letter\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if the source file itself is not one word per line, we need to split the string\n\t\t\t\t * only letter(not single) will be stored in the array\n\t\t\t\t */\n\t\t\t\t//\n\t\t\t\tif(sCurrentLine.matches(\".*([ \\t]).*\")){ //check if the current line is a single word or not\n\t\t\t\t\ttemp1.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t\telse if(sCurrentLine.matches(\"[a-zA-Z]+\") && sCurrentLine.length()>1){\n\t\t\t\t\ttemp2.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t}// end of while loop\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(!temp1.isEmpty()){\n\t\t\tfor(int i = 0; i< temp1.size(); i++){\n\t\t\t\tString thisLine[] = temp1.get(i).split(\" \");\n\t\t\t\t//for each word in this line\n\t\t\t\tfor(int j = 0; j < thisLine.length; j++){\n\t\t\t\t\t//if it is a valid word\n\t\t\t\t\tif(thisLine[j].matches(\"[a-zA-Z]+\") && thisLine[j].length()>1 ){\n\t\t\t\t\t\tif( source.get(thisLine[j]) == null){\n\t\t\t\t\t\t\tsource.put(thisLine[j].toLowerCase(),thisLine[j].toLowerCase());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t} // end of if current word i valid\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // end of temp1\n\t\t\n\t\tif(!temp2.isEmpty()){\n\t\t\tfor(int i = 0; i< temp2.size(); i++){\n\t\t\t\tif(temp2.get(i).matches(\"[a-zA-Z]+\") && temp2.get(i).length()>1){\n\t\t\t\t\tif(source.get(temp2.get(i)) == null){\n\t\t\t\t\t\tsource.put(temp2.get(i).toLowerCase(),temp2.get(i).toLowerCase());\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn source;\n\t}", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\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}\t\t\r\n\t\treturn Map;\r\n}", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n Path ruta = Paths.get(\"archivoDescargado.csv\");\n String texto_del_archivoCSV = Files.readString(ruta, StandardCharsets.UTF_8);\n \n // Dividir un archivo CSV en líneas\n String[] lineas_del_texto_del_archivoCSV = texto_del_archivoCSV.split(\"\\n\");\n\n // Generar una tabla de hash con el contenido dividido en lineas\n HashMap<String,String> tabla_de_hash = new HashMap<String, String>();\n int i = 0;\n for (String linea : lineas_del_texto_del_archivoCSV ){\n \tif (i != 0){ // Descarta la primera línea, ok? \n String[] columnas = linea.split(\",\");\n String nombre_y_apellido = columnas[1]+\" \"+columnas[0];\n String telefono = columnas[3];\n tabla_de_hash.put(nombre_y_apellido, telefono);\n }\n i++;\n }\n\n // Guardar una tabla de hash en un archivo\n FileOutputStream fos = new FileOutputStream(\"diccionario.txt\");\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(tabla_de_hash);\n oos.close();\n fos.close();\n\n // Cargar una tabla de hash desde un archivo\n FileInputStream fis = new FileInputStream(\"diccionario.txt\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n tabla_de_hash = (HashMap<String,String>) ois.readObject();\n ois.close();\n fis.close();\n\n // Imprimir una tabla de hash\n for ( String nombre_y_apellido : tabla_de_hash.keySet() ) \n System.out.println( nombre_y_apellido + \" \" + tabla_de_hash.get(nombre_y_apellido));\n }", "protected void cleanup(OutputCollector<Text, IntWritable> output) throws IOException, InterruptedException {\n\t\t\tfor (String key : countMap.keySet()) {\r\n\t\t\t\t//word.set(key);\r\n\t\t\t\t//value.set(countMap.get(key));\r\n\t\t\t\toutput.collect(new Text(key), new IntWritable(countMap.get(key)));\r\n\t\t\t}\r\n\t\t}", "public static void splitFile() throws IOException{\n\t\tPath currentRelativePath = Paths.get(\"\");\n\t\tFile file = new File(currentRelativePath.toAbsolutePath().toString()+\"/\"+fileName);\n\n\t\t//fileChunks are of size windowSize\n\t\tint num = fileSize; \n\t\tint lastByteRead = 0;\n\t\tint start =0;\n\t\tint i= 0; //where we are in bitfield map\n\t\tbyte[] fileChunkArray = new byte[windowSize];\n\t\t//read in the file\n\t\ttry{\n\t\t\tFileInputStream fileInputStream = new FileInputStream(file);\n\t\t\twhile(num > 0){\n\t\t\t\tif (num <= 5){\n\t\t\t\t\twindowSize = num;\n\t\t\t\t}\n\t\t\t\t// byte[] fileChunkArray = new byte[windowSize];\n\t\t\t\t\n\t\t\t\tlastByteRead = fileInputStream.read(fileChunkArray,0,windowSize);\n\t\t\t\t\n\t\t\t\t// start = start +windowSize;\n\t\t\t\t\n\t\t\t\t// String s1 = new String(fileChunkArray);\n\t\t\t\tSystem.out.print(\"the chunkarray length is :\" + fileChunkArray.length);\n\t\t\t\tSystem.out.print(\"the lastbyte read is :\"+ lastByteRead);\n\t\t\t\t// System.out.print(\"the fileChunk array is :\"+ s1);\n\t\t\t\tbitfieldMap.put(lastByteRead,fileChunkArray);\n\t\t\t\ti++;\n\t\t\t\tdynamicName = fileName+ i;\n\t\t\t\tworkingDirectory = System.getProperty(\"user.dir\");\n\t\t\t\tabsoluteFilePath = workingDirectory + File.separator + dynamicName;\n\t\t\t\tnum = num - windowSize; \n\t\t\t\tFileOutputStream newFile = new FileOutputStream(absoluteFilePath);\n\t\t\t\tnewFile.write(fileChunkArray);\n\t\t\t\tnewFile.flush();\n\t\t\t\tnewFile.close();\n\n\t\t\t}\n\t\t\tfileInputStream.close();\t\n\t\t}catch(IOException ioe){\n\t\t\tSystem.out.println(\"Could not split file: \" + ioe);\n\t\t}\n\t}", "public static void main (String[] args) throws FileNotFoundException, IOException {\n\t\tFile fil1 = new File(\"C:\\\\Users\\\\Vasanth\\\\Desktop\\\\parse.txt\");\r\n\t\tHashMap<String, String> map = new HashMap<String, String>();\r\n\t\tString[] parts;\r\n\t\tScanner myReader = new Scanner(fil1);\r\n\t\twhile (myReader.hasNextLine())\r\n\t\t{\r\n\t\t\tString data = myReader.nextLine();\r\n\t\t\tif (!data.contains(\"record\"))\r\n\t\t\t{\r\n\t\t\t\tdata.replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\t\t\t\tparts = data.split(\" +\");\t\t\t\r\n\t\t\t\tString key = parts[0].trim();\r\n\t\t\t\tString value = parts[1].trim();\t\t\t\t\r\n\t\t\t\tmap.put(key, value);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Ignoring as it doesnt hold a key value pair\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Writing Hashmap to excel & csv\r\n\t\tXSSFWorkbook wb = new XSSFWorkbook();\r\n\t\tXSSFSheet sh = wb.createSheet(\"Test Data\");\r\n\t\tint rowno = 0;\t\r\n\t\tfor(Map.Entry entry:map.entrySet())\r\n\t\t{\r\n\t\t\tXSSFRow row = sh.createRow(rowno++);\r\n\t\t\trow.createCell(0).setCellValue((String)entry.getKey());\r\n\t\t\trow.createCell(1).setCellValue((String)entry.getValue());\r\n\t\t}\t\t\r\n\t\twb.write(new FileOutputStream(\".\\\\Datafiles\\\\hashtoexcel.xlsx\"));\r\n\t\twb.write(new FileOutputStream(\".\\\\Datafiles\\\\hashexcel.csv\")); \r\n\t\twb.close();\r\n\t\t}", "public void reduce(Text _key, Iterator<VIntArrayWritable> values,\n\t\t\tOutputCollector<Text, Text> output, Reporter reporter) throws IOException {\t\t\t\n\t\tList<VIntWritable[]> buf = new ArrayList<>(); //String representations of entity ids (URIs)\n\t\treporter.setStatus(\"Reducing block \"+_key);\n\t\twhile (values.hasNext()) {\n\t\t\tVIntArrayWritable e1Array = (VIntArrayWritable) values.next();\t\t\t\n\t\t\tVIntWritable[] e1 = (VIntWritable[]) e1Array.get();\t\t\t\n\t\t\treporter.progress();\n\t\t\t//System.out.println(\"Reducing...\"+e1);\n\t\t\tVIntWritable dID1 = e1[0]; //clean-clean ER\n\t\t\t//IntWritable eid1 = e1[1];\t\t\t\n\t\t\tVIntWritable[] e1Values = Arrays.copyOfRange(e1, 2, e1.length);\t\t\t\n\t\t\t\n\t\t\tfor (VIntWritable[] e2 : buf) {\t\t\t\n\t\t\t\t\n\t\t\t\treporter.progress();\n\t\t\t\tif (!e2[0].equals(dID1)){ //clean-clean ER\n\t\t\t\t\t//IntWritable eid2 = e2[1];\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//this is the main logic of the reducer!\n\t\t\t\t\tif (!doOverlapFast(e1Values,Arrays.copyOfRange(e2, 2, e2.length))) {\n\t\t\t\t\t\treporter.incrCounter(OutputData.UNIQUE_PAIRS, 1);\n\t\t\t\t\t\t//output.collect(new Text(e1.split(\";;;\")[1]), new Text(e2.split(\";;;\")[1]));\n\t\t\t\t\t} /*else {\n\t\t\t\t\t\treporter.incrCounter(OutputData.REDUNDANT_PAIRS, 1);\n\t\t\t\t\t}*/\n\t\t\t\t} //clean-clean ER\n\t\t\t}\t\t\t\n\t\t\tbuf.add(e1);\t\n\t\t}\n\t}", "@Override\n protected void cleanup(Context context) throws IOException, InterruptedException {\n for (String artistId: songStat.keySet()) {\n // count#-#artistID%%artistName%%count\n String outVal = \"count#-#\"+songStat.get(artistId).getCount();\n// context.write(new Text(songStat.get(artistId).getSongId()), new Text(outVal));\n context.write(new Text(artistId), new Text(outVal));\n }\n// HashMap<Double, ArrayList<String>> minUniqueness = artistUniqueness.getMinSimilarArtist();\n// if (minUniqueness.size() > 0) {\n// double tmpKey = minUniqueness.keySet().iterator().next();\n// for (String artist : minUniqueness.get(tmpKey)) {\n// context.write(new Text(\"similar\"), new Text(artist + \"%-%\" + tmpKey));\n// System.out.println(\"Similar Min Mapper: \" + artist + \" \" + tmpKey);\n//\n// }\n// }\n// HashMap<Double, ArrayList<String>> maxUniqueness = artistUniqueness.getMaxSimilarArtist();\n// if (maxUniqueness.size() > 0) {\n// double tmpKey = maxUniqueness.keySet().iterator().next();\n// for (String artist : maxUniqueness.get(tmpKey)) {\n// context.write(new Text(\"similar\"), new Text(artist + \"%-%\" + tmpKey));\n// System.out.println(\"Similar Max Mapper: \" + artist + \" \" + tmpKey);\n//\n// }\n// }\n artistUniqueness.sendFromMapperContext(context, \"similar\");\n\n }", "private void splitLevelDetails() {\n final int zero = 0;\n final int one = 1;\n // goes over all of the levels\n for (int i = 0; i < level.size(); i++) {\n // if the level.get(i) contains \":\"\n if (level.get(i).contains(\":\")) {\n // split the line\n String[] keyAndVal = level.get(i).trim().split(\":\");\n // put the key and the value in the map\n this.map.put(keyAndVal[zero], keyAndVal[one].trim());\n } else {\n break;\n }\n }\n }", "private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }", "private void readResultCVS(String filePath2, Set<String> b,\n\t\t\tSet<String> correctInB, Map<String, Integer> bFrequencyMap,\n\t\t\tList<Double> correctnessB, List<Double> timeB,\n\t\t\tList<Double> hyperVolumnB, List<Double> spreadB) {\n\t\tString line = \"\";\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(filePath2));\n\t\t\tline = in.readLine();\n int varLength= line.split(\",\").length -4;\n\t\t\tdo{\n\t\t\t\t//the actual format 38.53,-4,3,15,0...0\n\t\t\t\t// the wanted : Correctness=0.0, MissingFeature=39.0, NotUsedBefore=3.0, Defects=15.0, Cost=38.53, \n\t\t\t\tString[] objs = line.split(\",\");\n\t\t\t\tdouble cost = Double.parseDouble(objs[0]);\n\t\t\t\tcost = formatDouble2(cost);\n\t\t\t\tdouble missFeas = formatDouble2(Integer.parseInt(objs[1]) + varLength);\n\t\t\t\tdouble notUsedBefore = formatDouble2(Integer.parseInt(objs[2])) ;\n\t\t\t\tdouble defects = formatDouble2(Integer.parseInt(objs[3])) ;\n\t\t\t\tString key = \"0.0\"+\"_\"+missFeas+\"_\"+notUsedBefore+\"_\"+defects+\"_\"+cost+\"_\";\n\t\t\t\tb.add(key);\n\t\t\t\tcorrectInB.add(key);\n\t\t\t addToFrequencyMap(key,bFrequencyMap);\n\t\t\t line = in.readLine();\n\t\t\t}while (line != null);\n\t\t\tin.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace(); \n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "protected abstract void splitBAMs();", "private void createDicts(String inputFile){\n\t\tproductIds = new TreeMap<>();\n\t\ttokenDict = new TreeMap<>();\n\t\treviewIds = new TreeMap<>();\n\n\t\tDataParser dataParser = null;\n\t\ttry {\n\t\t\tdataParser = new DataParser(inputFile);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while reading the reviews input file.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tfor (int i = 0; i < dataParser.allReviews.size(); i++) {\n\t\t\taddProductId(dataParser.allReviews.get(i).get(\"productId\"), i + 1);\n\t\t\tint length = addReviewText(dataParser.allReviews.get(i).get(\"text\"), i + 1);\n\t\t\taddReviewId(dataParser.allReviews.get(i), i, length);\n\t\t}\n\t}", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "@Override\r\n\tprotected void process(List<String> chunks) {\r\n\t\tfor (String data: chunks) {\r\n\t\t\thandleData(data);\r\n\t\t}\r\n\t}", "public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}", "public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}" ]
[ "0.6178443", "0.6177328", "0.56115896", "0.5560277", "0.55490553", "0.5540764", "0.5531466", "0.5451072", "0.54373497", "0.539844", "0.5396529", "0.5394862", "0.5372515", "0.5353583", "0.53344095", "0.5284017", "0.5283196", "0.52382725", "0.5225148", "0.52207667", "0.5214945", "0.5207406", "0.51786715", "0.5177645", "0.51326823", "0.5117235", "0.51101327", "0.51023716", "0.5095746", "0.50857383", "0.5079718", "0.50757664", "0.5070484", "0.5068633", "0.50648206", "0.5064561", "0.5053807", "0.5052936", "0.50433826", "0.5043381", "0.50353175", "0.50332516", "0.5003037", "0.4998559", "0.4995841", "0.49916655", "0.4989674", "0.4986527", "0.49847326", "0.4982071", "0.4955418", "0.49498525", "0.49392414", "0.49326828", "0.4927095", "0.49159163", "0.48988503", "0.48975116", "0.4896777", "0.4892853", "0.48888028", "0.48837563", "0.48799458", "0.48699954", "0.4867198", "0.48631522", "0.48557776", "0.48527697", "0.48520753", "0.4851197", "0.48490417", "0.48456046", "0.48424223", "0.484095", "0.4840806", "0.48380888", "0.48375654", "0.48375186", "0.4833887", "0.4820702", "0.4811793", "0.48046678", "0.48023286", "0.47995982", "0.47974923", "0.4790815", "0.4785167", "0.4780508", "0.47754943", "0.47728258", "0.47725725", "0.4765548", "0.47644448", "0.47643992", "0.4749595", "0.4748912", "0.4744443", "0.47425354", "0.47412342", "0.4735689" ]
0.66840035
0
end sanitize method Method writeResults Purpose: Sort hashmap into a treeMap and write out to results.txt file
private static void writeResults() { //Sort hashMap before sending to file TreeSet<Word> mySet = new TreeSet<>(hm.values()); //Create result.txt file and write treeMap out to it Writer writer = null; try { //System.out.println("Here"); writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("output\\results.txt"))); for (Word word : mySet) { writer.write(word.getValue() + "\t" + word.getCount() + "\n"); } } catch (Exception e) { e.printStackTrace(); } finally { try { writer.close(); } catch (Exception e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void write(HashMap<String, List<String>> result, String filename) {\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(filename));\n\n\t\t\tfor (String word : result.keySet()) {\n\t\t\t\tbw.write(String.format(\"%s: %s\\n\", word, result.get(word)));\n\t\t\t}\n\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}", "private static void LOG() {\n if (!RESULTFILE.exists()) {\n\n if (!RESULTFILE.getParentFile().exists()) {\n RESULTFILE.getParentFile().mkdirs();\n }\n\n try {\n RESULTFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + RESULTFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(RESULTFILE, true));\n bw.write(\"rank\" + \"\\t\" + \"DBID\" + \"\\n\");\n bw.close();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(RESULTFILE));\n out.writeObject(RESULTS);\n out.close();\n\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n }\n\n /**\n * print also SQL query into a sql file\n *\n */\n if (!SQLFILE.exists()) {\n if (!SQLFILE.getParentFile().exists()) {\n SQLFILE.getParentFile().mkdirs();\n }\n try {\n SQLFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + SQLFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(SQLFILE, true));\n bw.write(UNKNOWN.getSortedQuery() + \"\\n\");\n bw.close();\n } catch (Exception e) {\n System.err.println(\"Konnte nicht in Datei \" + SQLFILE + \" schreiben!\");\n }\n }\n }", "public void searchAndWriteQueryResultsToOutput() {\n\n List<String> queryList = fu.textFileToList(QUERY_FILE_PATH);\n\n for (int queryID = 0; queryID < queryList.size(); queryID++) {\n String query = queryList.get(queryID);\n // ===================================================\n // 4. Sort the documents by the BM25 scores.\n // ===================================================\n HashMap<String, Double> docScore = search(query);\n List<Map.Entry<String, Double>> rankedDocList =\n new LinkedList<Map.Entry<String, Double>>(docScore.entrySet());\n Collections.sort(rankedDocList, new MapComparatorByValues());\n\n // ===================================================\n // 5. Write Query Results to output\n // =================================================== \n String outputFilePath =\n RANKING_RESULTS_PATH + \"queryID_\" + (queryID + 1) + \".txt\";\n StringBuilder toOutput = new StringBuilder();\n // display results in console\n System.out.println(\"Found \" + docScore.size() + \" hits.\");\n int i = 0;\n for (Entry<String, Double> scoreEntry : rankedDocList) {\n if (i >= NUM_OF_RESULTS_TO_RETURN)\n break;\n String docId = scoreEntry.getKey();\n Double score = scoreEntry.getValue();\n String resultLine =\n (queryID + 1) + \" Q0 \" + docId + \" \" + (i + 1) + \" \" + score + \" BM25\";\n toOutput.append(resultLine);\n toOutput.append(System.getProperty(\"line.separator\"));\n System.out.println(resultLine);\n i++;\n }\n fu.writeStringToFile(toOutput.toString(), outputFilePath);\n }\n }", "public static void exportScores(String filePath, Map<String, List<DenovoHit>> resultsMap) throws IOException {\r\n // Init the buffered writer.\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(new File(filePath)));\r\n try {\r\n\r\n int count = 1;\r\n\r\n // header\r\n writer.append(getScoreHeader());\r\n writer.newLine();\r\n\r\n for (String spectrum : resultsMap.keySet()) {\r\n\r\n for (DenovoHit denovoHit : resultsMap.get(spectrum)) {\r\n\r\n // Get the protein hit.\r\n writer.append(spectrum + SEP);\r\n writer.append(denovoHit.getIndex() + SEP);\r\n writer.append(denovoHit.getSequence() + SEP);\r\n writer.append(denovoHit.getLength() + SEP);\r\n writer.append(denovoHit.getCharge() + SEP);\r\n writer.append(denovoHit.getNTermGap() + SEP);\r\n writer.append(denovoHit.getCTermGap() + SEP);\r\n writer.append(denovoHit.getPepNovoScore() + SEP);\r\n writer.append(denovoHit.getRankScore() + SEP);\r\n writer.newLine();\r\n writer.flush();\r\n }\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n } finally {\r\n writer.close();\r\n }\r\n }", "@Override\n\tpublic void WriteToTextFile() {\n\t\t// Using Buffered Stream I/O\n\t\ttry (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFileStr, true))) {\n\t\t\tout.write((\"\\n\\nBufferSize: \" + bufferSize + \"\\n\").getBytes());\n\t\t\tfor (String key : searchResults.keySet()) {\n\t\t\t\tString keyName = \"KeyWord:\" + key + \"\\n\";\n\t\t\t\tout.write(keyName.getBytes());\n\n\t\t\t\tfor (String searchResult : searchResults.get(key)) {\n\t\t\t\t\tsearchResult = searchResult + \"\\n\\n\\n\";\n\t\t\t\t\tout.write(searchResult.getBytes());\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tout.write(\n\t\t\t\t\t(\"-------------------------------------------------------- END OF Search Result--------------------------------------------------------\")\n\t\t\t\t\t\t\t.getBytes());\n\t\t\telapsedTime = System.nanoTime() - startTime;\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void writeFile(HashMap<String, Float> results) throws IOException {\n for (Map.Entry<String, Float> entry : results.entrySet()) {\n writer.printf(\"%s %.2f\", entry.getKey(), entry.getValue());\n writer.println(\"%\");\n }\n writer.close();\n }", "public static void main(String[] args) throws IOException{\n Tree tree = new Tree(new DoubleString(0, \"M\"));\n \n for(int x = 0; x < fileCount; x ++) {\n \t//inserts every line from every input file into the tree\n \tBufferedReader input = new BufferedReader(new FileReader(x + \".txt\"));\n \t\n \tfor(int y = 0; y < 5; y ++) {\n \t\tinput.readLine();\n \t}\n \t\n \tString line = input.readLine();\n \t\n \twhile(line != null) {\n \t\tif(line.contains(\"----\")) {\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\ttree.insert(new DoubleString(Double.parseDouble(betweenPipes(line, 3).trim().substring(0, betweenPipes(line, 3).trim().length() - 1)), betweenPipes(line, 2).trim()));\n \t\tline = input.readLine();\n \t}\n \t\n \tinput.close();\n }\n \n //converts the tree into an array and sorts the array\n DoubleString[] array = Tree.toArray(tree);\n DoubleString.sort(array, true);\n //creates (or overwrites, if it's already created) the output file\n PrintWriter output = new PrintWriter(new BufferedWriter(new FileWriter(\"output.txt\")));\n output.println(\"[hide=\" + format + \" stats)][code]Combined usage for \" + format + \" stats)\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\\n\" + \n \t\t\"| Rank | Pokemon | Percent |\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\");\n \n for(int i = 0; i < array.length; i ++) {\n \t//divides every stat from the array by the number of months and prints it into the output file\n \tarray[i].divideEquals(fileCount);\n \toutput.print(\"| \");\n \tString rank = i + \"\";\n \t\n \twhile(rank.length() < 3) {\n \t\trank = ' ' + rank;\n \t}\n \t\n \toutput.print(rank + \" | \");\n \tString name = array[i].toString();\n \t\n \twhile(name.length() < 19) {\n \t\tname = name + ' ';\n \t}\n \t\n \toutput.print(name + \"| \");\n \tString integer = (array[i].getNumber() + \"\").substring(0, (array[i].getNumber() + \"\").indexOf('.'));\n \tString fraction = (array[i].getNumber() + \"000\").substring((array[i].getNumber() + \"\").indexOf('.')).substring(0, 4);\n \t\n \twhile(integer.length() < 2) {\n \t\tinteger = ' ' + integer;\n \t}\n \t\n \toutput.println(integer + fraction + \"% |\");\n }\n \n //line of code I have to include to prevent weird things\n output.close();\n\t}", "protected void saveGroupResults(TreeSet<SpatialObject> topK) throws IOException{\n\t\t\n\t\t/* Imprime 5 */\n\t\tWriter outputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"5\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\t\n\t\tIterator<SpatialObject> it = topK.descendingIterator();\n\t\t\n\t\tfor(int a = 1; a <= 5; a++){\n\t\t\tSpatialObject obj = it.next();\n\t\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\t}\n\t\t\n\t\toutputFile.close();\n\t\t\n\t\t/* Imprime 10 */\n\t\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"10\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\t\n\t\tit = topK.descendingIterator();\n\t\t\n\t\tfor(int a = 1; a <= 10; a++){\n\t\t\tSpatialObject obj = it.next();\n\t\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\t}\n\t\t\n\t\toutputFile.close();\n\t\t\n\t\t/* Imprime 15 */\n\t\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"15\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\t\n\t\tit = topK.descendingIterator();\n\t\t\n\t\tfor(int a = 1; a <= 15; a++){\n\t\t\tSpatialObject obj = it.next();\n\t\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\t}\n\t\t\n\t\toutputFile.close();\n\t\t\n\t\t/* Imprime 20 */\n\t\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"20\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\t\n\t\tit = topK.descendingIterator();\n\t\t\n\t\tfor(int a = 1; a <= 20; a++){\n\t\t\tSpatialObject obj = it.next();\n\t\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\t}\n\t\t\n\t\toutputFile.close();\n\t}", "protected void saveGroupResultsBN(TreeSet<SpatialObject> topK, String queryName) throws IOException{\n\t\n\t/* Imprime 5 */\n\tWriter outputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/\"+queryName+\"[\" + \"k=\" + \"5\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tIterator<SpatialObject> it = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 5; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n\t\n\t/* Imprime 10 */\n\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/\"+queryName+\"[\" + \"k=\" + \"10\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tit = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 10; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n\t\n\t/* Imprime 15 */\n\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/\"+queryName+\"[\" + \"k=\" + \"15\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tit = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 15; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n\t\n\t/* Imprime 20 */\n\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/\"+queryName+\"[\" + \"k=\" + \"20\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tit = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 20; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n}", "@Override\n\tpublic void WriteToTextFile() {\n\t\t// Using a programmer-managed byte-array\n\t\ttry (FileOutputStream out = new FileOutputStream(outFileStr, true)) {\n\t\t\tout.write((\"\\n\\nBufferSize: \" + bufferSize + \"\\n\").getBytes());\n\t\t\tfor (String key : searchResults.keySet()) {\n\t\t\t\tString keyName = \"KeyWord:\" + key + \"\\n\";\n\t\t\t\tout.write(keyName.getBytes());\n\n\t\t\t\tfor (String searchResult : searchResults.get(key)) {\n\t\t\t\t\tsearchResult = searchResult + \"\\n\\n\\n\";\n\t\t\t\t\tout.write(searchResult.getBytes());\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.write(\n\t\t\t\t\t(\"-------------------------------------------------------- END OF Search Result--------------------------------------------------------\")\n\t\t\t\t\t\t\t.getBytes());\n\t\t\telapsedTime = System.nanoTime() - startTime;\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public static void writeQuery(Path queryOutput, LinkedHashMap<String, List<SearchResult>> queryResults) {\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(queryOutput, Charset.forName(\"UTF-8\"))) {\n\t\t\twriter.write(\"{\");\n\t\t\twriter.newLine();\n\t\t\tif (!queryResults.keySet().isEmpty()) {\n\t\t\t\tIterator<String> key = queryResults.keySet().iterator();\n\t\t\t\tString firstKey = key.next();\n\t\t\t\twriteQueryWord(queryResults, firstKey, writer, 1);\n\n\t\t\t\twhile (key.hasNext()) {\n\t\t\t\t\tString nextKey = key.next();\n\t\t\t\t\twriter.write(\",\");\n\t\t\t\t\twriter.newLine();\n\t\t\t\t\twriteQueryWord(queryResults, nextKey, writer, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.newLine();\n\t\t\twriter.write(\"}\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error writing to output file, \" + queryOutput);\n\t\t}\n\t}", "private void writeResults() {\n File externalStorage = Environment.getExternalStorageDirectory();\n if (!externalStorage.canWrite()) {\n Log.v(TAG, \"sdcard is not writable\");\n return;\n }\n File resultFile = new File(externalStorage, RESULT_FILE);\n resultFile.setWritable(true, false);\n try {\n BufferedWriter rsWriter = new BufferedWriter(new FileWriter(resultFile));\n Log.v(TAG, \"Saved results in: \" + resultFile.getAbsolutePath());\n java.text.DecimalFormat df = new java.text.DecimalFormat(\"######.##\");\n\n for (int ct=0; ct < IPTestListJB.TestName.values().length; ct++) {\n IPTestListJB.TestName t = IPTestListJB.TestName.values()[ct];\n final float r = mResults[ct];\n float r2 = rebase(r, t);\n String s = new String(\"\" + t.toString() + \", \" + df.format(r) + \", \" + df.format(r2));\n rsWriter.write(s + \"\\n\");\n }\n rsWriter.close();\n } catch (IOException e) {\n Log.v(TAG, \"Unable to write result file \" + e.getMessage());\n }\n }", "private void output(FileWriter outputFile, Map<Query, List<Evaluation>> evalData, FactDatabase source, FactDatabase target) {\n\t\tPrintWriter out = new PrintWriter(outputFile, true);\n\t\tif(source != null && target != null){\n\t\t\tfor(Query rule: evalData.keySet()){\n\t\t\t\tfor(Evaluation eval: evalData.get(rule)){\n\t\t\t\t\tout.print(rule.getRuleString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.first);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.second);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.third);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tdetermineSource(eval, source, target);\n\t\t\t\t\tout.print(eval.source.toString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.println(eval.result.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tfor(Query rule: evalData.keySet()){\n\t\t\t\tfor(Evaluation eval: evalData.get(rule)){\n\t\t\t\t\tout.print(rule.getRuleString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.first);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.second);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.println(eval.fact.third);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tout.close();\n\t}", "private static void printResultsToJson (Map<String, Double> bestSuppliers, String outputJsonFile) throws IOException {\n\n\t\tint rank = 1;\n\t\tList<MatchingResult> scores = new LinkedList<MatchingResult>();\n\n\t\tfor (Entry<String, Double> e : bestSuppliers.entrySet()) {\n\t\t\tscores.add(new MatchingResult(rank, e.getKey(), e.getValue()));\n\t\t\trank++;\n\t\t}\n\n\t\tGson gson = new GsonBuilder().create();\n\n\t\tString json = gson.toJson(scores);\n\n\t\tFileWriter writer = new FileWriter(outputJsonFile);\n\t\twriter.write(json);\n\t\twriter.close();\n\n\t}", "@Override\n\tprotected void saveResults(){\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"_yyyy_MM_dd_HH:mm:ss\");\n\t\tDate date = new Date();\n\t\ttry(BufferedWriter bw=new BufferedWriter(new FileWriter(\"/home/daniel/results/\"+this.mAffinityType+\"/\"+this.getClass().getSimpleName()+\"/\"+MAX_TASK_AGE+\"/\"+mOutputFileName+dateFormat.format(date)))){\n\t\t\tbw.write(this.getClass().getSimpleName()+\" with max age=\"+MAX_TASK_AGE+\"\\n\");\n\t\t\tbw.write(\"Total processing time: \"+cycles+\" TU\\n\");\n\t\t\tint count=0;\n\t\t\tfor(Task t : mTasks){\n\t\t\t\tbw.write(++count + \":\");\n\t\t\t\tif(t.getmAge()>=MAX_TASK_AGE){\n\t\t\t\t\tbw.write(\"Aging used\\n\");\n\t\t\t\t}else{\n\t\t\t\t\tbw.write(\"Aging not used\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.write(\"###############################################################\\n\");\n\t\t\tfor(int i=0;i<Task.TYPES_OF_TASK_NUMBER;++i){\n\t\t\t\tfor(int j=0;j<Task.TYPES_OF_TASK_NUMBER;++j){\n\t\t\t\t\tfor(int k=0;k<Task.TYPES_OF_TASK_NUMBER;++k){\n\t\t\t\t\t\t DecimalFormat df = new DecimalFormat(\"0.0\");\n\t\t\t\t\t\tbw.write(\"[\"+df.format(AFFINITY3[i][j][k])+\"]\");\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"\\n\");\n\t\t\t\t}\n\t\t\t\tbw.write(\"###############################################################\\n\");\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void asSearchResult(Map<String, List<Search>> results,\n\t\t\tWriter writer, int level) throws IOException {\n\n\t\twriter.write(\"[\" + System.lineSeparator());\n\n\t\tIterator<String> itr = results.keySet().iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tString next = itr.next().toString();\n\t\t\tindent(level + 1, writer);\n\t\t\twriter.write(\"{\" + System.lineSeparator());\n\t\t\tindent(level + 2, writer);\n\t\t\tquote(\"queries\", writer);\n\t\t\twriter.write(\": \");\n\t\t\tquote(next, writer);\n\t\t\twriter.write(\",\" + System.lineSeparator());\n\t\t\tindent(level + 2, writer);\n\t\t\tquote(\"results\", writer);\n\t\t\twriter.write(\": [\" + System.lineSeparator());\n\n\t\t\tasNestedSearch(next, results, writer, level + 3);\n\n\t\t\tindent(level + 2, writer);\n\t\t\twriter.write(\"]\" + System.lineSeparator());\n\n\t\t\tif (itr.hasNext()) {\n\t\t\t\tindent(level + 1, writer);\n\t\t\t\twriter.write(\"},\" + System.lineSeparator());\n\t\t\t} else {\n\t\t\t\tindent(level + 1, writer);\n\t\t\t\twriter.write(\"}\" + System.lineSeparator());\n\t\t\t}\n\t\t}\n\t\twriter.write(\"]\");\n\t}", "public void writeResults() {\n gfmBroker.storeResults(this.responses, fileOutputPath);\n }", "@Override\n public void writeFile(String arg0, Map result) {\n\n // Initial variables\n ArrayList<HashMap> records;\n ArrayList<HashMap> recordT;\n ArrayList<HashMap> observeRecords; // Array of data holder for time series data\n BufferedWriter bwT; // output object\n StringBuilder sbData = new StringBuilder(); // construct the data info in the output\n HashMap<String, String> altTitleList = new HashMap(); // Define alternative fields for the necessary observation data fields; key is necessary field\n // P.S. Add alternative fields here\n HashMap titleOutput; // contain output data field id\n DssatObservedData obvDataList = DssatObservedData.INSTANCE; // Varibale list definition\n\n try {\n\n // Set default value for missing data\n setDefVal();\n\n // Get Data from input holder\n Object tmpData = getObjectOr(result, \"observed\", new Object());\n if (tmpData instanceof ArrayList) {\n records = (ArrayList) tmpData;\n } else if (tmpData instanceof HashMap) {\n records = new ArrayList();\n records.add((HashMap) tmpData);\n } else {\n return;\n }\n if (records.isEmpty()) {\n return;\n }\n\n observeRecords = new ArrayList();\n for (HashMap record : records) {\n recordT = getObjectOr(record, \"timeSeries\", new ArrayList());\n String trno = getValueOr(record, \"trno\", \"1\");\n if (!recordT.isEmpty()) {\n String[] sortIds = {\"date\"};\n Collections.sort(recordT, new DssatSortHelper(sortIds));\n for (HashMap recordT1 : recordT) {\n recordT1.put(\"trno\", trno);\n }\n observeRecords.addAll(recordT);\n }\n }\n\n // Initial BufferedWriter\n String fileName = getFileName(result, \"T\");\n if (fileName.endsWith(\".XXT\")) {\n String crid = DssatCRIDHelper.get2BitCrid(getValueOr(result, \"crid\", \"XX\"));\n fileName = fileName.replaceAll(\"XX\", crid);\n }\n arg0 = revisePath(arg0);\n outputFile = new File(arg0 + fileName);\n bwT = new BufferedWriter(new FileWriter(outputFile));\n\n // Output Observation File\n // Titel Section\n sbError.append(String.format(\"*EXP.DATA (T): %1$-10s %2$s\\r\\n\\r\\n\",\n fileName.replaceAll(\"\\\\.\", \"\").replaceAll(\"T$\", \"\"),\n getObjectOr(result, \"local_name\", defValBlank)));\n\n titleOutput = new HashMap();\n // TODO get title for output\n // Loop all records to find out all the titles\n for (HashMap record : observeRecords) {\n // Check if which field is available\n for (Object key : record.keySet()) {\n // check which optional data is exist, if not, remove from map\n if (obvDataList.isTimeSeriesData(key)) {\n titleOutput.put(key, key);\n\n } // check if the additional data is too long to output\n else if (key.toString().length() <= 5) {\n if (!key.equals(\"date\") && !key.equals(\"trno\")) {\n titleOutput.put(key, key);\n }\n\n } // If it is too long for DSSAT, give a warning message\n else {\n sbError.append(\"! Waring: Unsuitable data for DSSAT observed data (too long): [\").append(key).append(\"]\\r\\n\");\n }\n }\n // Check if all necessary field is available // P.S. conrently unuseful\n for (String title : altTitleList.keySet()) {\n\n // check which optional data is exist, if not, remove from map\n if (getValueOr(record, title, \"\").equals(\"\")) {\n\n if (!getValueOr(record, altTitleList.get(title), \"\").equals(\"\")) {\n titleOutput.put(title, altTitleList.get(title));\n } else {\n sbError.append(\"! Waring: Incompleted record because missing data : [\").append(title).append(\"]\\r\\n\");\n }\n\n } else {\n }\n }\n }\n\n // decompress observed data\n// decompressData(observeRecords);\n // Observation Data Section\n Object[] titleOutputId = titleOutput.keySet().toArray();\n Arrays.sort(titleOutputId);\n String pdate = getPdate(result);\n for (int i = 0; i < (titleOutputId.length / 39 + titleOutputId.length % 39 == 0 ? 0 : 1); i++) {\n\n sbData.append(\"@TRNO DATE\");\n int limit = Math.min(titleOutputId.length, (i + 1) * 39);\n for (int j = i * 39; j < limit; j++) {\n sbData.append(String.format(\"%1$6s\", titleOutput.get(titleOutputId[j]).toString().toUpperCase()));\n }\n sbData.append(\"\\r\\n\");\n\n for (HashMap record : observeRecords) {\n \n if (record.keySet().size() <= 2 && record.containsKey(\"trno\") && record.containsKey(\"date\")) {\n continue;\n }\n sbData.append(String.format(\" %1$5s\", getValueOr(record, \"trno\", \"1\")));\n sbData.append(String.format(\" %1$5s\", formatDateStr(getObjectOr(record, \"date\", defValI))));\n for (int k = i * 39; k < limit; k++) {\n\n if (obvDataList.isDapDateType(titleOutputId[k], titleOutput.get(titleOutputId[k]))) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(pdate, getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else if (obvDataList.isDateType(titleOutputId[k])) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else {\n sbData.append(\" \").append(formatNumStr(5, record, titleOutput.get(titleOutputId[k]), defValI));\n }\n\n }\n sbData.append(\"\\r\\n\");\n }\n }\n // Add section deviding line\n sbData.append(\"\\r\\n\");\n\n // Output finish\n bwT.write(sbError.toString());\n bwT.write(sbData.toString());\n bwT.close();\n } catch (IOException e) {\n LOG.error(DssatCommonOutput.getStackTrace(e));\n }\n }", "protected void saveGroupResultsBN(TreeSet<SpatialObject> topK) throws IOException{\n\t\n\t/* Imprime 5 */\n\tWriter outputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"5\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tIterator<SpatialObject> it = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 5; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n\t\n\t/* Imprime 10 */\n\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"10\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tit = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 10; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n\t\n\t/* Imprime 15 */\n\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"15\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tit = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 15; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n\t\n\t/* Imprime 20 */\n\toutputFile = new OutputStreamWriter(new FileOutputStream(\"skpq/SKPQ-LD [\" + \"k=\" + \"20\" + \", kw=\" + getKeywords() + \"].txt\"), \"ISO-8859-1\");\n\t\n\tit = topK.descendingIterator();\n\t\n\tfor(int a = 1; a <= 20; a++){\n\t\tSpatialObject obj = it.next();\n\t\toutputFile.write(\"-->[\" + a + \"] \" + \"[OSMlabel=\" + obj.getName() + \", lat=\" + obj.getLat() + \", lgt=\" + obj.getLgt() + \", score=\" + obj.getScore() + \"]\\n\");\n\t\toutputFile.write(\"[BN] \" + \"[OSMlabel=\" + obj.getBestNeighbor().getName() + \", lat=\" + obj.getBestNeighbor().getLat() + \", lgt=\"\n\t\t\t\t+ obj.getBestNeighbor().getLgt() + \", score=\" + obj.getBestNeighbor().getScore() + \"]\\n\");\n\t}\n\t\n\toutputFile.close();\n}", "private void writeToFiles(Context resultContext) throws IOException {\n\t\tMap<String, Map<Object, ArrayList<Object>>> keyValMappingByBaseOutputPath = resultContext.getKeyValMappingsByBaseOutputPath(); \n\t\t//Write key & value to each baseOutputPath's \n\t\tPath targetOutputDir = null;\n\t\tMap<Object, ArrayList<Object>> keyValMapping = null;\n\t\tPath finalOutputBaseDir = this.config.getFinalOutputDir();\n\t\tfor (String baseOutputPath: keyValMappingByBaseOutputPath.keySet()) {\n\t\t\tif (baseOutputPath.equals(\"\")) {\n\t\t\t\t//Regular output goes into the mapper output buffer directory.\n\t\t\t\ttargetOutputDir = this.config.getMapOutputBufferDir();\n\t\t\t}else {\n\t\t\t\t//Multiple output to a particular outputPath which was \n\t\t\t\t//specified by user goes into the final output directory. \n\t\t\t\ttargetOutputDir = Paths.get(finalOutputBaseDir.toString(), baseOutputPath);\n\t\t\t}\n\t\t\tkeyValMapping = keyValMappingByBaseOutputPath.get(baseOutputPath);\n\t\t\tthis.writeEachMapping(targetOutputDir, keyValMapping);\n\t\t};\n\t}", "public void knnCSV(Map<String, Integer> map, String output)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tFileWriter fw = null;\r\n\t\tFile[] files = null;\r\n\r\n\t\tfiles = folder.listFiles();\r\n\t\tfw = new FileWriter(\"src/\" + output, false);\r\n\r\n\t\tfor (File file : files) {\r\n\r\n\t\t\tString fileName = file.getName();\r\n\t\t\tMap<Map<String, Integer>, Integer> wordFreqClass = documents\r\n\t\t\t\t\t.get(fileName);\r\n\t\t\tInteger classification = ERROR;\r\n\r\n\t\t\t// Assign class to file\r\n\t\t\tfor (Integer type : wordFreqClass.values()) {\r\n\t\t\t\tclassification = type;\r\n\t\t\t}\r\n\r\n\t\t\t// Create a temporary map of all words and counts in each test file\r\n\t\t\tMap<String, Integer> tempMap = new HashMap<String, Integer>();\r\n\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\ttry {\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line);\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (tempMap.containsKey(word)) {\r\n\t\t\t\t\t\t\ttempMap.put(word, tempMap.get(word) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttempMap.put(word, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tbr.close(); // Close BufferedReader\r\n\t\t\t}\r\n\r\n\t\t\t// Print value of words in tempMap for each word in fullMap\r\n\t\t\t// separated by commas\r\n\t\t\tIterator<HashMap.Entry<String, Integer>> entries = map.entrySet()\r\n\t\t\t\t\t.iterator();\r\n\t\t\twhile (entries.hasNext()) {\r\n\t\t\t\tHashMap.Entry<String, Integer> entry = entries.next();\r\n\t\t\t\tString word = entry.getKey();\r\n\t\t\t\tif (tempMap.containsKey(word)) {\r\n\t\t\t\t\tfw.write(tempMap.get(word).toString());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfw.write(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (entries.hasNext()) {\r\n\t\t\t\t\tfw.write(\",\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfw.write(\",\");\r\n\t\t\t\t\tfw.write(classification.toString());\r\n\t\t\t\t\tfw.write(\"\\r\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfw.close();\r\n\r\n\t}", "public static void asSearchResult(Map<String, List<Search>> results, Path path) {\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {\n\t\t\tasSearchResult(results, writer, 0);\n\t\t} catch (IOException | NullPointerException e) {\n\t\t\tSystem.out.println(\"There was an issue finding the direcotry or file: \" + path);\n\t\t}\n\t}", "public static void printHashMapSS(Map<String, String> map) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/documentHash\");\n\t\tfor (Entry<String, String> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}", "void readWriteFile() throws IOException{\n\t\t\t\t\n\t\t// Sorting before writing it to the file\n\t Map<String, Double> sortedRank = sortByValues(PageRank); \n\t\t\n // below code is used for finding the inlinks count, Comment the probablity sum in below iterator if uncommenting this line\n\t\t//Map<String, Integer> sortedRank = sortByinlinks(inlinks_count);\n\t\t\n\n\t\t//Writing it to the file\n\t\tFile file = new File(\"C:/output.txt\");\n\t\tBufferedWriter output = new BufferedWriter(new FileWriter(file,true));\n\t\tIterator iterator = sortedRank.entrySet().iterator();\n\t\tdouble s = 0.0;\n\t\t\twhile(iterator.hasNext()){\n\t\t\t\tMap.Entry val = (Map.Entry)iterator.next();\n\t\t\t\toutput.write(val.getKey() +\"\\t\"+ val.getValue()+ \"\\n\");\t\t\t\t\n\t\t\t\ts= s+ (double)val.getValue(); //Adding the Probablity ; Comment this line if using Inlink calculation\n\t\t\t}\n\t\t\tSystem.out.println(\"Probablity Sum : \"+s); //After convergence should be 1; ; Comment this line if using Inlink calculation\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t}", "public static String generateJsonDataForReport(HashMap<String, Integer> data) {\n String jsonData = \"\";\n try {\n //First we need create the json and sort the values\n ObjectMapper mapper = new ObjectMapper();\n ArrayList<JsonNode> jsonList = new ArrayList<>();\n for (HashMap.Entry<String, Integer> entry : data.entrySet()) {\n String wordData = \"{\\\"name\\\":\\\"\" + entry.getKey() + \"\\\",\\\"weight\\\":\\\"\" + entry.getValue() + \"\\\"}\";\n jsonList.add(mapper.readTree(wordData));\n }\n\n jsonData = mapper.writeValueAsString(sortData(jsonList));\n } catch (IOException e) {\n System.out.println(\"Could not write the map to json. Show error message : \" + e.getMessage());\n }\n\n return jsonData;\n }", "private void writeTree() throws IOException {\n\t\ttry (final BufferedWriter writer = Files.newBufferedWriter(destinationFile, CHARSET)) {\n\t\t\tfinal char[] treeString = new char[512];\n\t\t\tint treeStringLength = 0;\n\t\t\tfor (final CharacterCode cur : sortedCodes) {\n\t\t\t\ttreeString[treeStringLength++] = cur.getChar();\n\t\t\t\ttreeString[treeStringLength++] = (char) cur.getCode().length();\n\t\t\t}\n\t\t\tif (treeStringLength > 0xff) { //tree length will not always be less than 255, we have to write it on two bytes\n\t\t\t\tfinal int msb = (treeStringLength & 0xff00) >> Byte.SIZE;\n\t\t\t\ttreeStringLength &= 0x00ff;\n\t\t\t\twriter.write(msb);\n\t\t\t} else {\n\t\t\t\twriter.write(0);\n\t\t\t}\n\t\t\twriter.write(treeStringLength);\n\t\t\twriter.write(treeString, 0, treeStringLength);\n\t\t}\n\t}", "private void writePhrasesToOutput() {\n\t\tBufferedWriter bw = null;\n\t\ttry {\n\t\t\tbw = new BufferedWriter(new FileWriter(output));\n\t\t\tfor (String key : result.keySet()) {\n\t\t\t\tString line = String.format(\"(%d)\\t\\t\\t %s\\n\", result.get(key), phrases.get(key));\n\t\t\t\tbw.write(line);\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new IllegalAccessError(ioe.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbw.close();\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void printResults() {\n resultMap.entrySet().stream().forEach((Map.Entry<File, String> entry) -> {\n System.out.println(String.format(\"%s processed by thread: %s\", entry.getKey(), entry.getValue()));\n });\n System.out.println(String.format(\"processed %d entries\", resultMap.size()));\n }", "protected List<OutputWriter.OutputRecord> prepareOutput(String queryNo, Map<String, Float> map){\n\t\tList<Entry<String, Float>> sortedMapList = sortByValue(map);\n\t\tList<OutputWriter.OutputRecord> result = new LinkedList<OutputWriter.OutputRecord>();\n\t\t\n\t\tLong i = 1L;\n\t\tfor(Entry<String, Float> e : sortedMapList){\n\t\t\tresult.add(new OutputWriter.OutputRecord(queryNo, e.getKey(), i++, e.getValue()));\n\t\t\t// Limit results to max results\n\t\t\tif(i>elasticClient.getMaxResults()) break;\n\t\t}\n\t\treturn result;\n\t}", "public static void writeQueryWord(LinkedHashMap<String, List<SearchResult>> queryResults, String key,\n\t\t\tBufferedWriter writer, int level) throws IOException {\n\t\twriter.write(indent(1) + quote(key) + \": [\");\n\t\tList<SearchResult> nextSearchResults = queryResults.get(key);\n\t\twriteQueryResults(nextSearchResults, writer, 1);\n\t\twriter.newLine();\n\t\twriter.write(indent(1) + \"]\");\n\t}", "public void write() throws IOException {\n // Find the domains that occur in the union of the top N domains for any month.\n SortedSet<String> topEntryNames = new TreeSet<>();\n Iterator<Map.Entry<String, DateEntry>> dateEntriesIterator = this.dateEntries.entrySet().iterator();\n while (dateEntriesIterator.hasNext()) {\n Map.Entry<String, DateEntry> dateEntry = dateEntriesIterator.next();\n topEntryNames.addAll(dateEntry.getValue().topNEntries(this.finalN()));\n }\n\n // Now sort them by their all-time total.\n // Collect totals.\n Map<String, Long> topDomainSums = new HashMap<>();\n for (Map.Entry<String, DateEntry> dateEntry : this.dateEntries.entrySet()) {\n Map<String, Long> domainEntries = dateEntry.getValue().getEntriesDictionary();\n\n for (String domain : topEntryNames) {\n topDomainSums.put(domain, topDomainSums.getOrDefault(domain, 0L) + domainEntries.getOrDefault(domain, 0L));\n }\n }\n\n // Sort domains by their totals.\n List<WeightedString> sortedDomains = new ArrayList<>();\n for (Map.Entry<String, Long> domainSum : topDomainSums.entrySet()) {\n sortedDomains.add(new WeightedString(domainSum.getKey(), domainSum.getValue()));\n }\n Collections.sort(sortedDomains, Collections.reverseOrder());\n\n // Write sorted domains header\n this.outputFile.write(\"Date\");\n this.outputFile.write(\",\");\n\n // Iterate over the domains sorted by total.\n Iterator<WeightedString> entryNamesIterator = sortedDomains.iterator();\n while(entryNamesIterator.hasNext()) {\n String entryName = entryNamesIterator.next().getValue();\n this.outputFile.write(entryName);\n\n if (entryNamesIterator.hasNext()) {\n this.outputFile.write(\",\");\n }\n }\n this.outputFile.write(\"\\n\");\n\n // Now write counts for only those top entry names for each date.\n dateEntriesIterator = this.dateEntries.entrySet().iterator();\n while (dateEntriesIterator.hasNext()) {\n Map.Entry<String, DateEntry> dateEntryName = dateEntriesIterator.next();\n String date = dateEntryName.getKey();\n DateEntry entry = dateEntryName.getValue();\n Map<String, Long> entryCounts = entry.getEntriesDictionary();\n \n this.outputFile.write(date);\n this.outputFile.write(\",\");\n\n entryNamesIterator = sortedDomains.iterator();\n while(entryNamesIterator.hasNext()) {\n String entryName = entryNamesIterator.next().getValue();\n\n Long count = entryCounts.get(entryName);\n if (count == null) {\n // System.err.format(\"ERROR failed to fetch %s on %s. Increase preN.\\n\", entryName, date);\n count = 0L;\n }\n \n this.outputFile.write(count.toString());\n\n if (entryNamesIterator.hasNext()) {\n this.outputFile.write(\",\");\n }\n }\n\n this.outputFile.write(\"\\n\");\n }\n }", "public static void outputAndStatistics(String inputName, String outputName) throws IOException {\r\n\t\tFileReader input = new FileReader(inputName);\r\n\t\tBufferedReader reader = new BufferedReader(input);\r\n\t\tStringBuilder output = new StringBuilder();\r\n\r\n\t\tint x;\r\n\r\n\t\twhile((x = reader.read()) != -1) {\r\n\t\t\tif(x < 256) {\r\n\t\t\t\toutput.append(map.get((char)x));\r\n\t\t\t}\r\n\t\t}\r\n\t\treader.close();\r\n\t\t\r\n\t\tFile file = new File(outputName);\r\n\t\tfile.createNewFile();\r\n\t\t\r\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\twriter.write(output.toString());\r\n\t\twriter.close();\r\n\t\t\r\n\t\tint sum = 0;\r\n\t\tfor(Character j : map.keySet()) {\r\n\t\t\tif(map.containsKey('j')) {\r\n\t\t\t\tsum += map.get('j').length() * freqArr[j].frequency;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble savings = (1.0 - ((sum / nodeArrList.get(0).frequency) / 8.0)) * 100.0;\r\n\t\t\r\n\t\tString statisticsString = \"Savings: \" + savings + \"% \\n \\n\" + map.toString();\r\n\t\t\r\n\t\tFile file2 = new File(\"huffmanStatistics.txt\");\r\n\t\tfile2.createNewFile();\r\n\t\tBufferedWriter writer2 = new BufferedWriter(new FileWriter(file2));\r\n\t\twriter2.write(statisticsString);\r\n\t\twriter2.close();\r\n\t\t\r\n\t\tSystem.out.println(statisticsString);\r\n\t}", "public void Report() throws IOException {\n\t\tFile outputFile = new File(outputPath);\n\n\t\tif(!outputFile.exists()) {\n\t\t\toutputFile.createNewFile();\n\t\t}\n\t\t\n\t\tFileWriter writer = new FileWriter(outputPath);\n\t\tLinkedHashMap<Word, Integer> sortedResult = sortByValue();\n\t\tfloat frequency;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(Map.Entry<Word, Integer> entry: sortedResult.entrySet()) {\n\t\t\tsb.setLength(0);\n\t\t\t\n\t\t\tfor(char c: entry.getKey().getCharacters()) {\n\t\t\t\tsb.append(c + \", \");\n\t\t\t}\n\t\t\t\n\t\t\tsb.delete(sb.length()-2, sb.length());\n\t\t\tfrequency = (float)entry.getValue()/(float)total_targets;\n\t\t\twriter.write(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\\n\");\n\t\t\t\n\t\t\tSystem.out.println(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\");\n\t\t}\n\t\tfrequency = (float)total_targets/(float)total;\n\t\t\n\t\tSystem.out.println(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\");\n\t\twriter.write(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\\n\");\n\t\t\n\t\twriter.close();\n\t}", "private static void writeScoreMap(Map<String, Integer> map, OutputStream os, Integer groupNo, boolean isHeader, TestSuite ts) throws IOException {\n String[] testSuite = ts.getTestSuite();\n String header = \"\";\n String scores = \"\";\n if (groupNo != null) {\n header += \"Group No,\";\n scores += groupNo + \",\";\n }\n\n for (int i = 0 ; i < testSuite.length ; ++i) {\n header += testSuite[i];\n scores += map.get(testSuite[i]);\n if (i + 1 < testSuite.length) {\n header += \",\";\n scores += \",\";\n }\n }\n\n // Print to screen\n System.out.println(header + \"\\n\" + scores);\n\n // Print to file\n if (isHeader) {\n os.write(header.getBytes());\n os.write(\"\\n\".getBytes());\n }\n os.write(scores.getBytes());\n os.write(\"\\n\".getBytes());\n }", "public void sortbykey(HashMap map1)\n {\n TreeMap<Integer, File> sorted = new TreeMap<>();\n\n // Copy all data from hashMap into TreeMap\n sorted.putAll(map1);\n\n // Display the TreeMap which is naturally sorted\n for (Map.Entry<Integer, File> entry : sorted.entrySet())\n System.out.println(\"Key = \" + entry.getKey() +\n \", Value = \" + entry.getValue());\n }", "public static void writeMap(Map<String, String> map) {\n String path = \"E:\\\\javaProjects\\\\java-tryouts\\\\file-read-tryout\\\\src\\\\main\\\\resources\\\\prepared.txt\";\n\n File prepared = new File(String.valueOf(path));\n\n try {\n FileWriter fileWriter = new FileWriter(prepared);\n BufferedWriter writer = new BufferedWriter(fileWriter);\n\n for (String s : map.keySet()) {\n System.out.println(s + \";\" + map.get(s));\n writer.write(s + \";\" + map.get(s));\n writer.newLine();\n }\n\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void exportMap(){\n\t\tString toSave = \"\";\r\n\t\tfor(int i=0;i<map.getH();i++){\r\n\t\t\tfor(int j=0;j<map.getL();i++){\r\n\t\t\t\tif(j == map.getL()-2)\r\n\t\t\t\t\ttoSave += map.getCase(i, j).toString();\r\n\t\t\t\telse\r\n\t\t\t\t\ttoSave += map.getCase(i, j).toString()+\"|\";\r\n\t\t\t}\r\n\t\t\ttoSave += \"\\n\";\r\n\t\t}\r\n\t\t//ecriture d'un fichier\r\n\t}", "public void mergefiles()\n {\n LinkedHashMap<String, Integer> count = new LinkedHashMap<>();\n for(int i=0;i<files_temp.size();i++)\n {\n \t\t\n //System.out.println(\"here in merge files for\");\n \t//int index = files_temp.get(i).lastIndexOf(\"\\\\\");\n\t\t\t//System.out.println(index);\n \tSystem.out.println(files_temp.get(i));\n File file = new File(files_temp.get(i)+\"op.txt\");\n Scanner sc;\n try {\n //System.out.println(\"here in merge files inside try\");\n sc = new Scanner(file);\n sc.useDelimiter(\" \");\n while(sc.hasNextLine())\n {\n //System.out.println(\"Inwhile \");\n List<String> arr = new ArrayList<String>();\n arr=Arrays.asList(sc.nextLine().replaceAll(\"[{} ]\", \"\").replaceAll(\"[=,]\", \" \").split(\" \"));\n //System.out.println(arr.get(0));\n for(int j=0;j<arr.size()-1;j=j+2) \n {\n System.out.println(arr.get(j));\n if(arr.get(j).length()!=0 && arr.get(j+1).length()!=0)\n {\n if (count.containsKey(arr.get(j))) \n {\n int c = count.get(arr.get(j));\n count.remove(arr.get(j));\n count.put(arr.get(j),c + Integer.valueOf(arr.get(j+1)));\n }\n else \n {\n count.put(arr.get(j),Integer.valueOf(arr.get(j+1)));\n }\n }\n }\n }\n }\n catch(Exception E) \n {\n System.out.println(E);\n }\n }\n //System.out.println(count);\n count.entrySet()\n .stream()\n .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))\n .forEachOrdered(x -> sorted.put(x.getKey(), x.getValue()));\n System.out.println(sorted);\n PrintWriter writer;\n\t\ttry {\n\t\t\twriter = new PrintWriter(\"results.txt\", \"UTF-8\");\n\t\t\tIterator it = sorted.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tMap.Entry pairs = (Map.Entry) it.next();\n\t\t\t\t\twriter.println(pairs.getValue() + \" : \" + pairs.getKey());\n\t\t\t\t\tthis.result.println(pairs.getValue() + \" : \" + pairs.getKey());\n\t\t\t}\n\t\t writer.close();\n\t\t}\n catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n }", "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 processFile(File rootFile) throws IOException {\n\t\tBufferedReader bf=new BufferedReader(new FileReader(rootFile));\r\n\t\tString lineTxt = null;\r\n\t\tint pos=1;\r\n\t\twhile((lineTxt = bf.readLine()) != null){\r\n String[] line=lineTxt.split(\" \");\r\n// System.out.println(line[0]);\r\n String hscode=line[0];\r\n \r\n \r\n TreeMap<String,Integer> word=null;\r\n if(!map.containsKey(hscode)){\r\n word=new TreeMap<String,Integer>();\r\n for(int i=1;i<line.length;i++){\r\n \tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n }\r\n map.put(hscode, word);\r\n }\r\n else{\r\n //\tSystem.out.println(\"sss\");\r\n \tword = map.get(hscode);\r\n \tfor(int i=1;i<line.length;i++){\r\n \t\tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n \t}\r\n \t\r\n \tmap.put(hscode, word);\r\n \t\r\n }\r\n\t\t}\r\n\t\tbf.close();\r\n//\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n//// \tSystem.out.println(\"hscode:\"+entry.getKey());\r\n// \tTreeMap<String, Integer> value = entry.getValue();\r\n// \tfor(Entry<String,Integer> e:value.entrySet()){\r\n//// \tSystem.out.println(\"单词\"+e.getKey()+\" 词频是\"+e.getValue());\r\n// \t}\r\n// }\r\n\t}", "private void writeStatsToFile() {\n\t\tString fileName = \"TypeaheadStats.dat\";\n\t\tString contents = \"Typeahead_Tasks,Index_Hits,Hit_Ratio,Avg_Time,Suffix_Time,Pruning\\n\";\n\t\tcontents += numOfSearchTasks + \n\t\t\t\t\",\" + numOfIndexHits + \n\t\t\t\t\",\" + 1.0 * numOfIndexHits / numOfSearchTasks + \n\t\t\t\t\",\" + totalTime / numOfSearchTasks +\n\t\t\t\t\",\" + suffixTreeTime / numOfSearchTasks + \n\t\t\t\t\",\" + pruningPercentage / numOfSearchTasks;\n\t\tFileManager.writeToFile(fileName, contents);\n\t}", "private void writeResults() {\n\t\tgetContext().writeName(\"searchResults\");\n\t // Open the Array of affectedParties\n\t TypeContext itemTypeContext = getContext().writeOpenArray();\n\t \n\t for(Person person : results){\n\t\t\t// Add a comma after each affectedParty object is written\n if (!itemTypeContext.isFirst()){\n \tgetContext().writeComma();\n }\n itemTypeContext.setFirst(false);\n\t\t\t\n // Open the affectedParty object and write the fields\n\t\t\tgetContext().writeOpenObject();\n\t\t\t\n\t\t\t// Write out the fields\n\t\t getContext().writeName(\"id\");\n\t\t getContext().transform(person.getId());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"name\");\n\t\t getContext().transform(person.getName());\n\t\t getContext().writeComma();\n\n\t\t getContext().writeName(\"sex\");\n\t\t getContext().transform(person.getSex());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dob\");\n\t\t getContext().transform(person.getDob() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDob()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dod\");\n\t\t getContext().transform(person.getDod() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDod()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfBirth\");\n\t\t getContext().transform(person.getPlaceOfBirth());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfDeath\");\n\t\t getContext().transform(person.getPlaceOfDeath());\n\t\t getContext().writeComma();\n \t getContext().writeName(\"href\");\n \t getContext().transform(url + \"/\" + person.getId());\n\t\t\t\n \t // Close the affectedParty object\n \t getContext().writeCloseObject();\n }\n\t\t// Close the Array of affectedParties\n getContext().writeCloseArray();\n\t}", "public static void main(String[] args) throws IOException\n {\n int numFiles = 13;\n for(int curFileIndex = 0; curFileIndex < numFiles; curFileIndex++)\n {\n String inputOutputNumber = \"\"+curFileIndex;\n if(inputOutputNumber.length()==1)\n inputOutputNumber = \"0\" + inputOutputNumber;\n long startTime = System.nanoTime();\n String fileName = \"Coconut-tree\".toLowerCase() + \"-testcases\";\n String pathToHackerrankTestingFolder = \"/Users/spencersharp/Desktop/HackerrankTesting/\";\n BufferedReader f = new BufferedReader(new FileReader(pathToHackerrankTestingFolder + fileName + \"/input/input\"+inputOutputNumber+\".txt\"));\n PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(pathToHackerrankTestingFolder + fileName + \"/testOutput/testOutput\"+inputOutputNumber+\".txt\")));\n //Comment the end comment after this line\n \n /*\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));\n */\n String output = \"\"; //Write all output to this string\n\n //Code here\n String line = f.readLine();\n StringTokenizer st = new StringTokenizer(line);\n \n int n = Integer.parseInt(st.nextToken());\n int v = Integer.parseInt(st.nextToken());\n int t = Integer.parseInt(st.nextToken())-1;\n \n //TreeSet<Double> vals = new TreeSet<Double>();\n \n double minEV = 0.0;\n \n int numPickedSoFar = 0;\n \n double total = 0.0;\n \n for(int i = 0; i < n; i++)\n {\n st = new StringTokenizer(f.readLine());\n \n int p = Integer.parseInt(st.nextToken());\n int c = Integer.parseInt(st.nextToken());\n int fallChance = Integer.parseInt(st.nextToken());\n \n double ev = ((c*v)*(((100-fallChance))/100.0))-(p*(fallChance/100.0));\n \n if(ev > 0.0)\n {\n if(numPickedSoFar < t)\n {\n if(ev < minEV || minEV == 0.0)\n minEV = ev;\n total += ev;\n numPickedSoFar++;\n }\n else if(ev > minEV)\n {\n //out.println(\"ELSE\"+minEV);\n total -= minEV;\n minEV = ev;\n total += ev;\n }\n }\n //out.println(total);\n }\n \n writer.println(total);\n \n writer.close();\n //Code here\n \n //Use open comment before this line\n long endTime = System.nanoTime();\n\n long totalTime = endTime - startTime;\n\n double totalTimeInSeconds = ((double)totalTime)/1000000000;\n\n if(totalTimeInSeconds >= 4.0)\n out.println(\"TIME LIMIT EXCEEDED\");\n else\n {\n boolean isTestOutputCorrect = true;\n BufferedReader correctOutputReader = new BufferedReader(new FileReader(pathToHackerrankTestingFolder + fileName + \"/output/output\"+inputOutputNumber+\".txt\"));\n BufferedReader testOutputReader = new BufferedReader(new FileReader(pathToHackerrankTestingFolder + fileName + \"/testOutput/testOutput\"+inputOutputNumber+\".txt\"));\n String correctOutputLine;\n String testOutputLine;\n\n while((correctOutputLine=correctOutputReader.readLine())!=null && (testOutputLine=testOutputReader.readLine())!=null)\n {\n Double d1 = Double.parseDouble(correctOutputLine);\n Double d2 = Double.parseDouble(correctOutputLine);\n if(Math.abs(d1-d2) > 0.0001)\n {\n isTestOutputCorrect = false;\n break;\n }\n }\n\n if(isTestOutputCorrect)\n out.println(\"TEST \" + inputOutputNumber + \" CORRECT - TIME: \" + totalTimeInSeconds);\n else\n out.println(\"TEST \" + inputOutputNumber + \" INCORRECT - TIME: \" + totalTimeInSeconds);\n }\n }\n //Use close comment after this line\n \n }", "public static void main(String[] args) throws IOException {\n List<String> lines = ResourcesFiles.readLinesInResources(\"wmpf.txt\");\r\n List<String> oneSet = ResourcesFiles.readLinesInResources(\"wmpf-single.txt\");\r\n\r\n Map<String, List<Word>> results = new TableMakeShort().makeSort(lines, oneSet);\r\n\r\n File outFile = new File(\"out\",\"wmff-out.txt\");\r\n List<Word> result = results.get(\"result\");\r\n writeTo(result, outFile);\r\n System.out.println(\"保存到:\" + outFile.getAbsolutePath());\r\n\r\n File outFullFile = new File(\"out\",\"wmff-full.txt\");\r\n List<Word> full = results.get(\"full\");\r\n writeTo(full, outFullFile);\r\n System.out.println(\"保存到:\" + outFullFile.getAbsolutePath());\r\n\r\n File outOtherFile = new File(\"out\",\"wmff-other.txt\");\r\n List<Word> sp = results.get(\"uncommon\");\r\n writeTo(sp, outOtherFile);\r\n System.out.println(\"保存到:\" + outOtherFile.getAbsolutePath());\r\n }", "public void storeMatchResults(HashMap<String, Integer> results) {\n\t\tSystem.out.println(\"Store Match Results!\");\n\t\tfor(Map.Entry<String, Integer> entry : results.entrySet()) {\n\t\t\tsynchronized(this.globalChart) {\n\t\t\t\tif(this.globalChart.containsKey(entry.getKey())) { // Se c'era già lo aggiorno\n\t\t\t\t\tthis.globalChart.replace(entry.getKey(), this.globalChart.get(entry.getKey()) + entry.getValue());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.globalChart.put(entry.getKey(), entry.getValue());\n\t\t\t\t\t// Perché suppongo che dentro la global chart abbia già tutta la classifica\n\t\t\t\t\t// (Diverso da prima)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Finito il for!\");\n\t\tSystem.out.flush();\n\t\t/* Poi aggiorno il file */\n\t\tthis.lock.lock();\n\t\ttry {\n\t\t\tthis.pendingUpdates.addLast(results);\n\t\t\tthis.waitOnQueue.signal(); // Wake up the ChartUpdater thread\n\t\t}\n\t\tfinally {\n\t\t\tthis.lock.unlock();\n\t\t}\n\t\t\n\t}", "public void printResults(String fileName) {\n\t\ttry {\n\t\t\tPrintWriter writer = new PrintWriter(fileName, \"UTF-8\");\n\t\t\tfor (int i = 0; i < results.size(); i++) {\n\t\t\t\twriter.println(results.get(i).toString());\n\t\t\t}\n\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"Error while writing to output file\");\n\t\t} finally {\n\t\t\t/*try {\n\t\t\t\twriter.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.err.println(\"Error while reading input file\");\n\t\t\t}*/\n\t\t}\t\t\n\t}", "public static void printHashMapSI(Map<String, Integer> map) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/allTermHash\");\n\t\tfor (Entry<String, Integer> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}", "@Override\n\tpublic void handleOutput(final List<RuleMatch> evaluationResults) throws IOException {\n\t\tthis.totalResults = evaluationResults.size();\n\t\tthis.uniqueFileSet = new HashSet<>();\n\t\tthis.perFileResults = new HashMap<>();\n\t\tthis.perFilePerRule = new HashMap<>();\n\n\t\tfor (final RuleMatch match : evaluationResults) {\n\t\t\tuniqueFileSet.add(match.getLogReference().getLogFile());\n\n\t\t\tList<RuleMatch> perFileList = perFileResults.get(match.getLogReference().getLogFile());\n\t\t\tif (perFileList == null) {\n\t\t\t\tperFileList = new ArrayList<>();\n\t\t\t}\n\t\t\tperFileList.add(match);\n\t\t\tperFileResults.put(match.getLogReference().getLogFile(), perFileList);\n\n\t\t\tMap<String, List<RuleMatch>> perRuleForFile = perFilePerRule.get(match.getLogReference().getLogFile());\n\t\t\tif (perRuleForFile == null) {\n\t\t\t\tperRuleForFile = new HashMap<>();\n\t\t\t}\n\t\t\tperFilePerRule.put(match.getLogReference().getLogFile(), perRuleForFile);\n\n\t\t\tList<RuleMatch> perTypeList = perRuleForFile.get(match.getMatchingRuleName());\n\t\t\tif (perTypeList == null) {\n\t\t\t\tperTypeList = new ArrayList<>();\n\t\t\t}\n\t\t\tperTypeList.add(match);\n\t\t\tperRuleForFile.put(match.getMatchingRuleName(), perTypeList);\n\n\t\t}\n\n\t\tthis.uniqueLogFilesAffected = uniqueFileSet.size();\n\t}", "public void write(FileWriter out) throws IOException {\n out.write(\"#\" + query + System.lineSeparator());\n yesTree.write(out);\n noTree.write(out);\n }", "private void writeAnalysisResults(Map<SillyBot, List<IntermediateResult>> analysisCallResults)\n\t\t\tthrows InterruptedException, ExecutionException {\n\t\tfor (SillyBot sillyBot : analysisCallResults.keySet()) {\n\t\t\tSystem.out.println(\"PRINT SILLY BOT ANALYZED RESULTS:\");\n\t\t\tfor (IntermediateResult botsAnalysisCall : analysisCallResults.get(sillyBot)) {\n\t\t\t\tProposal propsal;\n\t\t\t\tif (sillyBot instanceof PerformanceSillyBot) {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tpropsal = new PerformanceProposal(getResponseValue(botsAnalysisCall.analysisResult),\n\t\t\t\t\t\t\tbotsAnalysisCall.name);\n\t\t\t\t\tSystem.out.println(\"For Model \" + botsAnalysisCall.name + \" metric is \"\n\t\t\t\t\t\t\t+ getResponseValue(botsAnalysisCall.analysisResult));\n\t\t\t\t} else if (sillyBot instanceof ModifiabilitySillyBot) {\n\t\t\t\t\tpropsal = new ModifiabilityProposal(getResponseValue(botsAnalysisCall.analysisResult),\n\t\t\t\t\t\t\tbotsAnalysisCall.name);\n\t\t\t\t\tSystem.out.println(\"For Model \" + botsAnalysisCall.name + \" metric is \"\n\t\t\t\t\t\t\t+ getResponseValue(botsAnalysisCall.analysisResult));\n\t\t\t\t} else {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Unknown type of Silly Bot.\");\n\t\t\t\t}\n\n\t\t\t\tsillyBot.insertInOrder(propsal);\n\t\t\t}\n\t\t}\n\t}", "public void ArtistAndSource() throws IOException{\r\n List<String> ArrangersAndTheirSongs=new ArrayList<>();\r\n HashMap <String,Integer> SongCountMap= new HashMap<>();\r\n String allsongs=\"\";\r\n String sourcesong=\"\";\r\n for(int id: ArrangersMap.keySet()){\r\n String ArrangerName=ArrangersMap.get(id);\r\n for(String song:ArrangerLinesList){\r\n String perform[];\r\n perform=song.split(\"/\");\r\n int arrangeid=Integer.parseInt(perform[1]);\r\n if(id==arrangeid){\r\n int songid= Integer.parseInt(perform[0]);\r\n String songname=test.getsongName(songid);\r\n sourcesong=test.SongToSource(songname);\r\n allsongs+=sourcesong+\",\";\r\n if (SongCountMap.get(sourcesong) !=null){ \r\n SongCountMap.put(sourcesong, SongCountMap.get(sourcesong)+1);\r\n }\r\n else{\r\n SongCountMap.put(sourcesong, 1);\r\n }\r\n } \r\n }\r\n for(String song:SongCountMap.keySet()){\r\n //System.out.println(song);\r\n }\r\n HashMap <String,Integer> SortedMap= sortByValues(SongCountMap);\r\n SongCountMap.clear();\r\n String allsongs2=\"\";\r\n for(String song:SortedMap.keySet()){\r\n //System.out.println(\"Number\"+SortedMap.get(song)+\"The song is\"+song);\r\n allsongs2+=\"#occurences:\"+SortedMap.get(song)+\"The song is\"+song+\"\\n\";\r\n //System.out.println(\"Number of times:\"+SortedMap.get(song)+\"The song is\"+song);\r\n }\r\n //System.out.println(allsongs2);\r\n // ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are:\"+allsongs);\r\n ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are: \"\r\n + \"\"+allsongs2);\r\n allsongs=\"\";\r\n SortedMap.clear();\r\n allsongs2=\"\";\r\n }\r\n //method is broken\r\n writeListToTextFile(\"d:\\\\documents\\\\textfiles\\\\ArrangersAndTheirSources.txt\",ArrangersAndTheirSongs);\r\n System.out.println(\"The size of the list is:\"+ArrangersAndTheirSongs.size());\r\n System.out.println(\"Artist and Their Source Complete\");\r\n }", "@SuppressWarnings({ \"unchecked\", \"resource\" })\n\tprivate static void writeRatings(Object treasureMap, PrintWriter pw, File treasureFile, PrintWriter pwCategories) throws IOException {\n\t\tfor (Map.Entry<String, Object> treasure : ((Map<String, Object>) treasureMap).entrySet()) {\n\n\t\t\tString treasureName=treasure.getKey();\n\t\t\tObject userFeedbackMap= treasure.getValue(); // TREASURE\n\t\t\tfor(Entry<String, Object> userFeedback: ((LinkedHashMap<String, Object>) userFeedbackMap).entrySet())\n\t\t\t{\n\t\t\t\tString userName=userFeedback.getKey(); // USER\n\t\t\t\tObject userFeedbackObj=userFeedback.getValue();\n\t\t\t\tfor(Entry<String, Object> userFeedbackEntry: ((LinkedHashMap<String, Object>) userFeedbackObj).entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(userFeedbackEntry.getKey().equals(\"rating\")) // RATING\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(treasureName + \" \" + userName);\n\t\t\t\t\t\tString rating=userFeedbackEntry.getValue().toString();\n\t\t\t\t\t\t/* write to the csv file the the user + the treasure name + the rating */\n\t\t\t\t\t\tlong userNameDecoded = new BigInteger(userName.getBytes()).longValue();\n\t\t\t\t\t\tlong treasureNameDecoded = new BigInteger(treasureName.getBytes()).longValue();\n\n\n\t\t\t\t\t\tfloat ratingFloat = (float)Integer.parseInt(rating);\n\n\t\t\t\t\t\tpw.write(userNameDecoded+\",\"+treasureNameDecoded+\",\"+ratingFloat+\"\\n\");\n\n\t\t\t\t\t\t/* write to category csv file user + category + rating */\n\t\t\t\t\t\tFileReader fileReader=new FileReader(treasureFile);\n\t\t\t\t\t\tBufferedReader br = null;\n\t\t\t\t\t\tString line = \"\";\n\t\t\t\t\t\tString cvsSplitBy = \",\";\n\t\t\t\t\t\tbr = new BufferedReader(fileReader);\n\t\t\t\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\t\t\t\t// use comma as separator\n\t\t\t\t\t\t\tString[] treasureStr = line.split(cvsSplitBy);\n\t\t\t\t\t\t\tif(treasureStr[0]!=null&&Long.parseLong(treasureStr[0])==treasureNameDecoded)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(treasureStr[2]!=null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(userCategoryMap.get(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue())==null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tuserCategoryMap.put(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue(), 1.0);\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tdouble val=userCategoryMap.get(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue());\n\t\t\t\t\t\t\t\t\t\tuserCategoryMap.put(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue(), val+1.0);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(Entry<String,Double> entry: userCategoryMap.entrySet())\n\t\t{\n\t\t\tString usercategory=entry.getKey();\n\t\t\tString[] arr=usercategory.split(\",\");\n\t\t\tString userNameDecoded=arr[0];\n\t\t\tString categoryDecoded=arr[1];\n\t\t\tdouble numberOfVisits=entry.getValue();\n\t\t\tpwCategories.write(userNameDecoded+\",\"+categoryDecoded+\",\"+numberOfVisits+\"\\n\");\n\t\t}\n\t\tpwCategories.close();\n\t\tpw.close();\n\t}", "private void printResultsHelper(Map<String,Integer> results,int totalVotes){\n\t\tList<Map.Entry<String,Integer>> entryList = new ArrayList(results.entrySet());\n\t\tfor (int i = entryList.size()-1; i >= 0; i--) {\n\t\t\tMap.Entry me = entryList.get(i);\n\n\t\t\tString name = (String) me.getKey();\n\t\t\tString party = Candidates.getInstance().getCandidateWithName(name).getParty();\n\t\t\tint votes = results.getOrDefault(name,0);\n\t\t\tdouble percentage = (votes/(double)totalVotes)*100;\n\t\t\tif (name.equals(\"Ralph Nader\")){\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t}\n\t\t\tif(!(party.equals(\"???\") && votes == 0)) {\n\t\t\t\tSystem.out.printf(\"%-30s%-8s%5d%9.1f\\n\", name, party, votes, percentage);\n\t\t\t}\n\t\t}\n\t}", "public static void DumpLocationCoordinatestoKMLRevised(Places places) throws IOException{\n\n String filen = folder_path+\"loc2kmlRevised.txt\";\n File file = new File(filen);\n if (!file.exists()) {\n file.createNewFile();\n }\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n\n for(int i=0;i<places.places.size();i++){\n LocationCluster locationcls=places.places.get(i);\n output.write(locationcls.placeID+\"~\");\n\n List<UserPhoto> sublist=locationcls.getIdenticalsubLocations();\n if(sublist.size()>2){\n\n for(int j=0;j<sublist.size()-1;j++){\n\n output.write(sublist.get(j).geotag.lat+\",\"+sublist.get(j).geotag.lng);\n if(j<sublist.size()-2){\n output.write(\"|\");\n }\n }\n\n }\n else{\n\n GeoTag center =locationcls.GetCentriod();\n output.write(center.lat+\",\"+center.lng);\n }\n\n\n output.write(\"\\n\");\n\n\n\n\n }\noutput.flush();\n\n }", "private void writeMapFileOutput(RecordWriter<WritableComparable<?>, Writable> writer,\n TaskAttemptContext context) throws IOException, InterruptedException {\n describe(\"\\nWrite map output\");\n try (DurationInfo d = new DurationInfo(LOG,\n \"Writing Text output for task %s\", context.getTaskAttemptID());\n ManifestCommitterTestSupport.CloseWriter<WritableComparable<?>, Writable> cw =\n new ManifestCommitterTestSupport.CloseWriter<>(writer, context)) {\n for (int i = 0; i < 10; ++i) {\n Text val = ((i & 1) == 1) ? VAL_1 : VAL_2;\n writer.write(new LongWritable(i), val);\n }\n LOG.debug(\"Closing writer {}\", writer);\n writer.close(context);\n }\n }", "public String generateResultsReport(HashMap<String, Integer> data) throws IOException {\n Date today = new Date();\n\n String resultData = generateJsonDataForReport(data);\n String directoryPath = properties.getProperty(\"path.to.reports\");\n String fileLocation = directoryPath + \"dataTrendsResults\" + \"_\" + today.getTime() + \".html\";\n try {\n\n File directory = new File(directoryPath);\n if (!directory.exists()) {\n directory.mkdirs();\n }\n\n File report = new File(fileLocation);\n FileOutputStream os = new FileOutputStream(report);\n OutputStreamWriter osw = new OutputStreamWriter(os);\n Writer writer = new BufferedWriter(osw);\n writer.write(generatePageReportHtml(resultData));\n writer.close();\n } catch (IOException e) {\n System.out.println(\"There was a problem writing the report to \" + fileLocation + \", exception: \" + e.getMessage());\n }\n\n return fileLocation;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate static void writeTreasures(Object treasureMap,\n\t\t\tPrintWriter pwTreasures) {\n\t\tfor (Map.Entry<String, Object> treasure : ((Map<String, Object>) treasureMap).entrySet()) \n\t\t{\n\t\t\tString treasureName=treasure.getKey();\n\t\t\tlong treasureNameDecoded = new BigInteger(treasureName.getBytes()).longValue();\n\t\t\tObject treasureObj=treasure.getValue();\n\t\t\tfor(Entry<String, Object> treasureObjEntry: ((LinkedHashMap<String, Object>) treasureObj).entrySet())\n\t\t\t{\n\t\t\t\tif(treasureObjEntry.getKey().equals(\"category\")) // RATING\n\t\t\t\t{\n\t\t\t\t\tString category = treasureObjEntry.getValue().toString();\n\t\t\t\t\tlong categoryDecoded = new BigInteger(category.getBytes()).longValue();\n\n\t\t\t\t\tpwTreasures.write(treasureNameDecoded+\",\"+treasureName+\",\"+categoryDecoded+\",\"+category+\"\\n\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpwTreasures.close();\n\n\t}", "public static void printMap(Map<String, Double> map, String filename) throws FileNotFoundException, UnsupportedEncodingException{\n\t\t\t\n\t\t\tPrintWriter writer = new PrintWriter(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/IndexWithStoppingAndWithStemming/\"+filename, \"UTF-8\");\n\t for (Entry<String, Double> entry : map.entrySet()){\n\t \t \n\t \t\twriter.println(entry.getKey()+\" \"+entry.getValue()+\" Exp\");\n\t }\n\t writer.close();\n\t }", "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 }", "protected void write_results(String output) {\r\n\t\t// File OutputFile = new File(output_train_name.substring(1,\r\n\t\t// output_train_name.length()-1));\r\n\t\ttry {\r\n\t\t\tFileWriter file_write = new FileWriter(output);\r\n\r\n\t\t\tfile_write.write(IS.getHeader());\r\n\r\n\t\t\t// now, print the normalized data\r\n\t\t\tfile_write.write(\"@data\\n\");\r\n\t\t\tfor (int i = 0; i < ndatos; i++) {\r\n\t\t\t\tif (!filtered[i]) {\r\n\t\t\t\t\tfile_write.write(X[i][0]);\r\n\t\t\t\t\tfor (int j = 1; j < nvariables; j++) {\r\n\t\t\t\t\t\tfile_write.write(\",\" + X[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfile_write.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfile_write.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"IO exception = \" + e);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "private void writeResult(String testClassName, List<TestResult> results)\n throws IOException, ParserConfigurationException, TransformerException {\n // XML writer logic taken from:\n // http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp\n\n DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n doc.setXmlVersion(\"1.1\");\n\n Element root = doc.createElement(\"testcase\");\n root.setAttribute(\"name\", testClassName);\n doc.appendChild(root);\n\n for (TestResult result : results) {\n Element test = doc.createElement(\"test\");\n\n // name attribute\n test.setAttribute(\"name\", result.testMethodName);\n\n // success attribute\n boolean isSuccess = result.isSuccess();\n test.setAttribute(\"success\", Boolean.toString(isSuccess));\n\n // time attribute\n long runTime = result.runTime;\n test.setAttribute(\"time\", String.valueOf(runTime));\n\n // Include failure details, if appropriate.\n if (!isSuccess) {\n Failure failure = result.failure;\n String message = failure.getMessage();\n test.setAttribute(\"message\", message);\n\n String stacktrace = failure.getTrace();\n test.setAttribute(\"stacktrace\", stacktrace);\n }\n\n // stdout, if non-empty.\n if (result.stdOut != null) {\n Element stdOutEl = doc.createElement(\"stdout\");\n stdOutEl.appendChild(doc.createTextNode(result.stdOut));\n test.appendChild(stdOutEl);\n }\n\n // stderr, if non-empty.\n if (result.stdErr != null) {\n Element stdErrEl = doc.createElement(\"stderr\");\n stdErrEl.appendChild(doc.createTextNode(result.stdErr));\n test.appendChild(stdErrEl);\n }\n\n root.appendChild(test);\n }\n\n // Create an XML transformer that pretty-prints with a 2-space indent.\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer trans = transformerFactory.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n trans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n\n // Write the result to a file.\n File outputFile = new File(outputDirectory, testClassName + \".xml\");\n OutputStream output = new BufferedOutputStream(new FileOutputStream(outputFile));\n StreamResult streamResult = new StreamResult(output);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, streamResult);\n output.close();\n }", "private void printIndexMap(HashMap<String, HashSet<String>> hmap, boolean printToScreen, boolean printToFile){\n\t\t\n\t\ttry{\n\t\t\t//False overwrites old data\n\t\t\tFileWriter writer = new FileWriter(HUMAN_READABLE_INDEX, false); \n\t\t\n\t\t\t//creating output string\n\t\t\tString output = new String();\n\t for(String key: hmap.keySet()){\n\t\t \toutput = key + \" -> \" + String.join(\", \", hmap.get(key));\n\t\t \t\n\t\t //Printing to screen\n\t\t if(printToScreen)\n\t\t \tSystem.out.println(output);\n\t\t \n\t\t if(printToFile){\n\t\t\t\t\ttry {\n\t\t\t\t\t\twriter.write(output + \"\\n\");\n\t\t\t\t\t} catch (IOException e){}\t\n\t\t } \t\n\t }\n\t \n\t writer.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String test = value.toString();\n test = test.replaceAll(\"\\t\", \" \").replaceFirst(\" \", \"\\t\");\n\n double basePageRank = 0;\n boolean hasPageRank = false;\n double pageRank = 0;\n /**\n * Pattern to distinguish our inserted numbers from numbers in titles\n * is: _!(numbers.numbers)\n */\n Pattern pt = Pattern.compile(\"(_!\\\\d+.\\\\S+)\");\n Matcher mt = pt.matcher(test);\n if (mt.find()) {\n pageRank = Double.parseDouble(mt.group(1).substring(2));\n hasPageRank = true;\n }\n /**\n * If it's the first iteration, distribute 1/N among outLinks\n */\n if (!hasPageRank) {\n try {\n pageRank = 1d / (context.getConfiguration().getInt(\"N\", 0));\n } catch (ArithmeticException ae) {\n /**\n * Catch division by zero (if 'N' was not set)\n */\n Logger.getLogger(PageRankMapper.class.getName()).log(Level.SEVERE, ae.getMessage(), ae);\n }\n }\n /**\n * Split input line into key,value\n */\n String[] split = test.split(\"\\t\");\n /**\n * Emit this node's (1-d)/N and it's adjacency outGraph if not empty\n */\n // d = 0.85\n basePageRank = (1 - 0.85) / (context.getConfiguration().getInt(\"N\", 0));\n String output = \"\";\n output += \"_!\" + basePageRank;\n if (split.length > 1) {\n //split[1] => outlinks string \n String[] outlinks = split[1].split(\" \");\n for (int i = hasPageRank ? 1 : 0; i < outlinks.length; i++) {\n output += \" \" + outlinks[i];\n }\n }\n context.write(new Text(split[0]), new Text(output.trim()));\n /**\n * Emit pageRank/|outLinks| to all outLinks if not empty: Split on \\t to\n * get separate key(index 0) from values(index 1), Split values on space\n * to separate out links(ignore the first(index 0),the pageRank, unless\n * hasPageRank=false)\n */\n if (split.length > 1) {\n String[] outlinks = split[1].split(\" \");\n /**\n * Input has no outLinks, only has basePageRank, already taken care\n * of in previous emit, return\n */\n if (hasPageRank && outlinks.length == 1) {\n return;\n }\n /**\n * d = 0.85\n */\n pageRank *= 0.85;\n /**\n * Divide pageRank over number of outLinks\n */\n pageRank /= hasPageRank ? (outlinks.length - 1) : outlinks.length;\n for (int i = hasPageRank ? 1 : 0; i < outlinks.length; i++) {\n context.write(new Text(outlinks[i]), new Text(\"_!\" + pageRank));\n }\n }\n }", "public void writeFile(String[] results) {\n\t\ttry {\n\t\t\tFile file = new File(outputFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\tfor(int i = 0; i < results.length; i++) {\n\t\t\t\tString[] tuple = testTuples.get(i);\n\t\t\t\t// convert String[] to String\n\t\t\t\tString tupleString = \"\";\n\t\t\t\tfor(int j = 0; j < tuple.length; j++) {\n\t\t\t\t\ttupleString += tuple[j] + \",\";\n\t\t\t\t}\n\t\t\t\twriter.write(tupleString + results[i] + \"\\n\");\n\t\t\t}\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public /*TreeMap<String, Float>*/void getTopnTermsOverlapWithQuery() throws IOException, ParseException{\n\t\tString outputfile = \"./output/score/test3.txt\";\n\n\t\tFileOutputStream out = new FileOutputStream(outputfile);\n\t\tPrintStream ps = new PrintStream(out);\n\t\t/*-------------------------------------------------------------------------------*/\n\n\t\tTreeMap<String,Float> termsscoressorted = null;\n\t\tCollectionReader reader = new CollectionReader(indexDir); \n\t\tIndexReader ir = reader.getIndexReader();\t\t\n\n\t\tTopicsInMemory topics = new TopicsInMemory(\"data/CLEF-IP-2010/PAC_test/topics/PAC_topics-test2.xml\"/*omit-PAC-1094.xml\"*/);\n\t\tfor(Map.Entry<String, PatentDocument> topic : topics.getTopics().entrySet()){\n\t\t\tString qUcid = topic.getValue().getUcid();\n\t\t\tString queryid = topic.getKey();\n\t\t\tString queryName = topic.getKey() + \"_\" + topic.getValue().getUcid();\n\t\t\tString queryfile = topic.getKey() + \"_\" + topic.getValue().getUcid() + \".xml\";\n\n\t\t\t/*System.out.println(\"=========================================\");\n\t\t\tSystem.out.println(queryName);\n\t\t\tSystem.out.println(\"=========================================\");*/\n\t\t\t/*int docid = reader.getDocId(\"UN-EP-0663270\", PatentDocument.FileName);\n\t\t\tir.getTermVector(docid, field) getTermVectors(b);*/\n\n\t\t\tEvaluateResults er = new EvaluateResults();\n\t\t\tArrayList<String> tps = er.evaluatePatents(queryid, \"TP\");\n\t\t\tArrayList<String> fps = er.evaluatePatents(queryid, \"FP\");\n\t\t\tHashMap<String, Float> /*TFreqs*/ termsscores = new HashMap<>();\n\n\n\t\t\t/*--------------------------------- Query Words -------------------------------*/\n\t\t\t//\t\t\tHashMap<String, Integer> query_termsfreqspair = reader.gettermfreqpair(qUcid, PatentDocument.Description);\n\t\t\tHashSet<String> query_terms = reader.getDocTerms(qUcid, PatentDocument.Description);\n\t\t\t//\t\t\tSystem.out.println(query_termsfreqspair.size() +\"\\t\"+ query_termsfreqspair);\n//\t\t\tSystem.out.println(query_terms.size() + \"\\t\" + query_terms);\n\t\t\t/*-----------------------------------------------------------------------------*/\t\t\t\n\n\n\t\t\t//\t\t\tSystem.out.println(\"-----TPs----\");\n\t\t\tfor (String tp : tps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(tp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsTP = reader.gettermfreqpairAllsecs(\"UN-\" + tp);\n\n\t\t\t\tfor(Entry<String, Integer> tfTP:termsfreqsTP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(tfTP.getKey())){\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), termsscores.get(tfTP.getKey()) + (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//\t\t\t\t\t\tfloat test = (float)t.getValue()/tps.size();\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(test);\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\t\t\t\t\t\n\t\t\t}\n\n\t\t\t/*System.out.println();\n\t\t\tSystem.out.println(\"-----FNs----\");*/\n\t\t\tfor (String fp : fps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(fp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsFP = reader.gettermfreqpairAllsecs(\"UN-\" + fp);\n\n\t\t\t\tfor(Entry<String, Integer> t:termsfreqsFP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(t.getKey())){\n\t\t\t\t\t\ttermsscores.put(t.getKey(), termsscores.get(t.getKey()) - (float)t.getValue()/fps.size());\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\ttermsscores.put(t.getKey(), -(float)t.getValue()/fps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(TFreqs.size() + \" \" + TFreqs);\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\n\t\t\tValueComparator bvc = new ValueComparator(termsscores);\n\t\t\ttermsscoressorted = new TreeMap<String,Float>(bvc);\t\t\t\n\t\t\ttermsscoressorted.putAll(termsscores);\n\t\t\tSystem.out.println(queryid + \"\\t\"+ termsscoressorted.size() + \"\\t\" + termsscoressorted/*.keySet()*/);\n\t\t\tint overlap = 0;\n\t\t\tint i = 0;\n\t\t\tfor(Entry<String, Float> scoresorted:termsscoressorted.entrySet()){\n\t\t\t\ti++;\n\t\t\t\tif(i<=100){\n\t\t\t\t\tif(query_terms.contains(scoresorted.getKey())){\n\t\t\t\t\t\toverlap++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tSystem.out.println(queryName + \"\\t\"+overlap);\n//\t\t\tps.println(queryName + \"\\t\"+overlap);\n\t\t}\n\t}", "public static void writeHashtable(String filename, Map<String, String> hash) {\r\n try {\r\n FileWriter fw = new FileWriter(filename);\r\n\r\n Set<Entry<String, String>> entries = hash.entrySet();\r\n for (Entry<String, String> entry : entries) {\r\n String key = entry.getKey();\r\n String value = entry.getValue();\r\n String str = key + \"=\" + value;\r\n\r\n // if (value instanceof String) {\r\n // str += (String) value;\r\n // } else {\r\n // Vector v = (Vector) value;\r\n // int count = v.size();\r\n // for (int i = 0; i < count; i++) {\r\n // // str += (String)v.elementAt(i);\r\n // str += v.elementAt(i).toString();\r\n // if (i < count - 1) {\r\n // str += \",\";\r\n // }\r\n // } // endfor\r\n // } // endif\r\n fw.write(str);\r\n fw.write(\"\\r\\n\");\r\n } // endfor\r\n fw.close();\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n // ex.printStackTrace();\r\n } // endtry\r\n }", "private static void treeMapMap(Map<Integer, String> treeMapMap) {\n System.out.println(\"----------------------------- TreeMap ----------------------------\");\n System.out.println(\"To work with \\\"TreeMap\\\" we need to add \\\"Equals and HashCode\\\" and \\\"Comparable\\\" to the Person Class!\");\n System.out.println(\"\\\"TreeMap\\\" is ordered by key\");\n treeMapMap.put(7, \"Cristiano Ronaldo\");\n treeMapMap.put(10, \"Leo Messi\");\n treeMapMap.put(8, \"Avi Nimni\");\n treeMapMap.put(24, \"Kobi Brian\");\n PrintUtils.printMap(treeMapMap);\n System.out.println();\n // STEP 2 - set p3 name to \"Moshe\"\n System.out.println(\"Set the name of player number 8 to be \\\"Moshe\\\":\");\n treeMapMap.replace(8, \"Avi Nimni\", \"Moshe\");\n // if you use \"put\" instead of \"replace\" it will work to!\n PrintUtils.printMap(treeMapMap);\n System.out.println();\n // STEP 3 - add p5 to the end of the list using using ADD method\n System.out.println(\"Add p5 to the end of the list using ADD method:\");\n System.out.println(\"Not an option!\");\n System.out.println();\n // STEP 4 - add p6 to position 3 the end of the list using ADD method\n System.out.println(\"Add p6 to position 3 the end of the list using ADD method:\");\n System.out.println(\"Not an option, you can wright over it!\");\n System.out.println();\n // STEP 5 - remove p2 from the list\n System.out.println(\"Remove p2 from the list and printing the list using a static method in a utility class:\");\n treeMapMap.remove(10, \"Leo Messi\");\n PrintUtils.printMap(treeMapMap);\n System.out.println();\n }", "private static void writeResultToFile(FileWriter writer, NumberedQuery query,\n ScoreDoc result, Document doc, int rank) throws IOException {\n StringJoiner resultLine = new StringJoiner(\" \");\n resultLine.add( Integer.toString(query.getNumber()) ); // query-id\n resultLine.add( \"0\" ); // Q0\n resultLine.add( doc.get(DOCNO) ); // document-id\n resultLine.add( Integer.toString(rank) ); // rank\n resultLine.add( Float.toString(result.score) ); // score\n resultLine.add( \"STANDARD\\n\" ); // STANDARD\n writer.write(resultLine.toString());\n }", "public void getAccuracy() throws IOException {\n\t\tList<String> in = FileHelper.readFiles(Constants.outputpath);\r\n\t\tList<String> testhscode=FileHelper.readFiles(Constants.testpath);\r\n\t\tList<String> hslist=new ArrayList<String>();\r\n\t\tfor(String code:testhscode){\r\n\t\t\thslist.add(code.split(\" \")[0]);\r\n\t\t}\r\n\t\tList<TreeMap<String,Double>> finallist=new ArrayList<TreeMap<String,Double>>();\r\n\t\tString[] label = in.get(0).split(\" \");\r\n\t\t\r\n\t\tfor (int i=1;i<in.size();i++){\r\n\t\t\tString[] probability=in.get(i).split(\" \");\r\n\t\t\tTreeMap<String,Double> tm=new TreeMap<String,Double>();\r\n//\t\t\tString hscode = probability[0];\r\n//\t\t\tSystem.out.println(hscode);\r\n//\t\t\thslist.add(hscode);\r\n\t\t\tfor(int j=1;j<probability.length;j++){\r\n\t\t\t\tDouble p = Double.valueOf(probability[j]);\r\n\t\t\t\ttm.put(label[j]+\"\", p);\r\n//\t\t\t\tSystem.out.println(label[j]+\" \"+ p);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfinallist.add(tm);\r\n\t\t}\r\n\t\tList<String> outputlist=new ArrayList<String>();\r\n\t\tint right=0;\r\n\t\tfor(int j=0;j<finallist.size();j++){\r\n\t\t\tTreeMap<String, Double> m = finallist.get(j);\r\n\t\t\t\r\n\t\t\tString hs = hslist.get(j);\r\n//\t\t\tSystem.out.println(hs);\r\n//\t\t\tSystem.out.println(j);\r\n//\t\t\tString hscode = hs;\r\n//\t\t\tSystem.out.println(hscode);\r\n\t\t\tString hscode = changeToHSCode(hs);\r\n\t\t\tStringBuffer sb=new StringBuffer();\r\n\t\t\tsb.append(hscode+\" \");\r\n\t\t\tList<Map.Entry<String,Double>> list = new ArrayList<Map.Entry<String,Double>>(m.entrySet());\r\n //然后通过比较器来实现排序\r\n Collections.sort(list,new Comparator<Map.Entry<String,Double>>() {\r\n //升序排序\r\n \t\tpublic int compare(Entry<String, Double> o1,\r\n Entry<String, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }});\r\n\t\t\t \r\n\t\t\t \r\n\t\t\tint point=0;\r\n\t\t\tint flag=0;\r\n\t\t\t for(Map.Entry<String,Double> mapping:list){ \r\n \tflag++;\r\n \t\r\n \tif(hs.equals(mapping.getKey())){\r\n \t\tpoint=1;\r\n \t\tright++;\r\n \t} \r\n \tsb.append(changeToHSCode(mapping.getKey())+\" \"+mapping.getValue()+\" \");\r\n// System.out.println(mapping.getKey()+\":\"+mapping.getValue()); \r\n \tif(flag==5)\r\n \t\t{\r\n \t\tsb.append(\",\"+point);\r\n \t\tbreak;\r\n \t\t}\r\n } \r\n\t\t\toutputlist.add(sb.toString());\r\n\t\t}\r\n\t\tSystem.out.println(\"准确率\"+(double)right/finallist.size());\r\n\t\tFileHelper.writeFile(outputlist,Constants.finaloutputpath);\r\n\t}", "public static void writeQueryResultsWriter(SearchResult result, BufferedWriter writer, int level)\n\t\t\tthrows IOException {\n\t\twriter.newLine();\n\t\twriter.write(indent(level + 1) + \"{\\n\");\n\t\twriter.write(indent(level + 2) + quote(\"where\") + \": \" + quote(result.getPath()) + \",\\n\");\n\t\twriter.write(indent(level + 2) + quote(\"count\") + \": \" + result.getFrequency() + \",\\n\");\n\t\twriter.write(indent(level + 2) + quote(\"index\") + \": \" + result.getPosition() + \"\\n\");\n\t\twriter.write(indent(level + 1) + \"}\");\n\t}", "public void generateOutputFile(String inputFilePath) {\n \n String outputFile = properties.getProperty(\"output.directory\")\n + properties.getProperty(\"output.file.token.search.locations\");\n \n ArrayList<String> lines = new ArrayList<String>();\n \n try ( PrintWriter outputWriter =\n new PrintWriter(new BufferedWriter(new FileWriter(outputFile)))) {\n \n //using the map.entry for the key-value pair and to ensure we can work with the map entry. Entryset method will return the map entries\n // iterating over the entry set of the locations. key and value \n for (Map.Entry<String, List<Integer>> entry : getFoundLocations().entrySet()) {\n // If the key is empty - it gets ignored and continues on.\n if (entry.getKey().trim().length() < 1) {\n //found continue https://www.javatpoint.com/java-continue - was looking for a way to continue if the entry is less than 1\n continue;\n }\n //using the getKey method to fetch the set of entries\n String line = entry.getKey() + \" =\";\n // adding the line to the string arraylist\n lines.add(line);\n line = \"[\";\n // If the location list is empty we add the line and close off the locations. \n if (entry.getValue().size() == 0) {\n line += \"]\";\n lines.add(line);\n lines.add(\"\");\n } else {\n // loop through all the locations and keep line under 80 characters. Checking all the values and size\n for (int i = 0; i < entry.getValue().size(); i++) {\n //Declaring location as the value\n String location = \"\" + entry.getValue().get(i);\n // if i is equal to 0, then you are displaying the first of the positions in the list so you can append it to the position\n if (i == 0) {\n line += location;\n }\n //Added the else if if you are about to exceed 80 characters in your line, then you close the line and begin a new line\n else if (line.length() + location.length() + 2 > 80) {\n lines.add(line);\n line = location;\n }\n //Added the else if you are not at the beginning of the locations nor at the end of the line, you just append a comma and space and the location.\n else {\n line += \", \" + location;\n }\n //Checking to see if that was the last entry then close the bracket\n if (i == (entry.getValue().size() - 1)) {\n line += \"]\";\n lines.add(line);\n lines.add(\"\");\n }\n }\n }\n }\n for (String line : lines) {\n //Trying out this typechar character for automatic string conversion\n outputWriter.printf(\"%s\\n\", line);\n }\n outputWriter.println();\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "@Override\n public Map<String,Object> run(Map<String,Object> args) throws Exception {\n Path tmpFolder = new Path(getConf().get(\"mapred.temp.dir\", \".\")\n + \"stat_tmp\" + System.currentTimeMillis());\n\n numJobs = 1;\n currentJob = new NutchJob(getConf(), \"db_stats\");\n\n currentJob.getConfiguration().setBoolean(\"mapreduce.fileoutputcommitter.marksuccessfuljobs\", false);\n \n Boolean sort = (Boolean)args.get(Nutch.ARG_SORT);\n if (sort == null) sort = Boolean.FALSE;\n currentJob.getConfiguration().setBoolean(\"db.reader.stats.sort\", sort);\n\n DataStore<String, WebPage> store = StorageUtils.createStore(currentJob\n .getConfiguration(), String.class, WebPage.class);\n Query<String, WebPage> query = store.newQuery();\n\n //remove the __g__dirty field since it is not stored\n String[] fields = Arrays.copyOfRange(WebPage._ALL_FIELDS, 1,\n WebPage._ALL_FIELDS.length);\n query.setFields(fields);\n\n GoraMapper.initMapperJob(currentJob, query, store, Text.class, LongWritable.class,\n WebTableStatMapper.class, null, true);\n\n currentJob.setCombinerClass(WebTableStatCombiner.class);\n currentJob.setReducerClass(WebTableStatReducer.class);\n\n FileOutputFormat.setOutputPath(currentJob, tmpFolder);\n\n currentJob.setOutputFormatClass(SequenceFileOutputFormat.class);\n\n currentJob.setOutputKeyClass(Text.class);\n currentJob.setOutputValueClass(LongWritable.class);\n FileSystem fileSystem = FileSystem.get(getConf());\n\n try {\n currentJob.waitForCompletion(true);\n } finally {\n ToolUtil.recordJobStatus(null, currentJob, results);\n if (!currentJob.isSuccessful()) {\n fileSystem.delete(tmpFolder, true);\n return results;\n }\n }\n\n Text key = new Text();\n LongWritable value = new LongWritable();\n\n SequenceFile.Reader[] readers = org.apache.hadoop.mapred.SequenceFileOutputFormat\n .getReaders(getConf(), tmpFolder);\n\n TreeMap<String, LongWritable> stats = new TreeMap<String, LongWritable>();\n for (int i = 0; i < readers.length; i++) {\n SequenceFile.Reader reader = readers[i];\n while (reader.next(key, value)) {\n String k = key.toString();\n LongWritable val = stats.get(k);\n if (val == null) {\n val = new LongWritable();\n if (k.equals(\"scx\"))\n val.set(Long.MIN_VALUE);\n if (k.equals(\"scn\"))\n val.set(Long.MAX_VALUE);\n stats.put(k, val);\n }\n if (k.equals(\"scx\")) {\n if (val.get() < value.get())\n val.set(value.get());\n } else if (k.equals(\"scn\")) {\n if (val.get() > value.get())\n val.set(value.get());\n } else {\n val.set(val.get() + value.get());\n }\n }\n reader.close();\n }\n\n LongWritable totalCnt = stats.get(\"T\");\n if (totalCnt==null)totalCnt=new LongWritable(0);\n stats.remove(\"T\");\n results.put(\"total pages\", totalCnt.get());\n for (Map.Entry<String, LongWritable> entry : stats.entrySet()) {\n String k = entry.getKey();\n LongWritable val = entry.getValue();\n if (k.equals(\"scn\")) {\n results.put(\"min score\", (val.get() / 1000.0f));\n } else if (k.equals(\"scx\")) {\n results.put(\"max score\", (val.get() / 1000.0f));\n } else if (k.equals(\"sct\")) {\n results.put(\"avg score\",\n (float) ((((double) val.get()) / totalCnt.get()) / 1000.0));\n } else if (k.startsWith(\"status\")) {\n String[] st = k.split(\" \");\n int code = Integer.parseInt(st[1]);\n if (st.length > 2)\n results.put(st[2], val.get());\n else\n results.put(st[0] + \" \" + code + \" (\"\n + CrawlStatus.getName((byte) code) + \")\", val.get());\n } else\n results.put(k, val.get());\n }\n // removing the tmp folder\n fileSystem.delete(tmpFolder, true);\n \n return results;\n }", "public static void main(String[] args) {\n\t\tMap hashmap = new HashMap();\r\n\t\tMap treemap = new TreeMap();\r\n\t\t// JDK 1.4+ only\r\n\t\tMap linkedMap = new LinkedHashMap();\r\n\t\tSet s;\r\n\t\tIterator i;\r\n\t\t\r\n\t\t/// HASHMAP\r\n\t\thashmap.put(\"Three\", \"Three\");\r\n\t\thashmap.put(\"Three\", \"Three\"); // This entry overwrites the previous\r\n\t\thashmap.put(\"One\", \"One\");\r\n\t\thashmap.put(\"Two\", \"Two\");\r\n\t\thashmap.put(\"Six\", \"Six\");\r\n\t\thashmap.put(\"Seven\", \"Seven\");\r\n\t\t// Order is NOT guaranteed to be consistent; no duplicate keys\r\n\t\tSystem.out.println(\"Unordered Contents of HashMap:\");\r\n\t\t\r\n\t\t/*\r\n\t\t * To iterate over items in a Map, you must first retrieve a Set of all \r\n\t\t * of its keys. Then, iterate over the keys and use each key to retrieve \r\n\t\t * the value object from the Map.\r\n\t\t */\r\n\t\ts = hashmap.keySet();\r\n\t\t// A Map does not have an iterator, but a Set DOES ... why?\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\t// Example of how to retreive and view the key\r\n\t\t\tObject key = i.next();\r\n\t\t\tSystem.out.println( key );\r\n//\t\t\tSystem.out.println( \"Key: \" + key );\r\n\t\t\t// Now retrieve and view the Map value using that key\r\n//\t\t\tString value = (String)hashmap.get(key);\r\n//\t\t\tSystem.out.println( \"Value: \" + value );\r\n\t\t}\r\n\t\t\r\n\t\t/// LINKEDHASHMAP\r\n\t\tlinkedMap.put(\"Three\", \"Three\");\r\n\t\tlinkedMap.put(\"Three\", \"Three\"); // This entry overwrites the previous\r\n\t\tlinkedMap.put(\"One\", \"One\");\r\n\t\tlinkedMap.put(\"Two\", \"Two\");\r\n\t\tlinkedMap.put(\"Six\", \"Six\");\r\n\t\tlinkedMap.put(\"Seven\", \"Seven\");\r\n\t\t// Order IS guaranteed to be consistent (LRU - Entry order)\r\n\t\tSystem.out.println(\"\\nOrdered (Entry Order) Contents of LinkedHashMap:\");\r\n\t\ts = linkedMap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\r\n\t\t/// TREEMAP\r\n\t\ttreemap.put(\"Three\", \"Three\");\r\n\t\ttreemap.put(\"Three\", \"Three\");\r\n\t\ttreemap.put(\"Two\", \"Two\");\r\n\t\ttreemap.put(\"Seven\", \"Seven\");\r\n\t\ttreemap.put(\"One\", \"One\");\r\n\t\ttreemap.put(\"Six\", \"Six\");\r\n\t\t// Keys guaranteed to be in sorted order, no duplicate keys\r\n\t\tSystem.out.println(\"\\nOrdered (Sorted) Contents of TreeMap:\");\r\n\t\ts = treemap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t\t\r\n\t\t// Integer Object values\r\n\t\thashmap = new HashMap();\r\n\t\thashmap.put( \"Three\", new Integer(3) );\r\n\t\thashmap.put( \"Three\", new Integer(3) );\r\n\t\thashmap.put( \"One\", new Integer(1) );\r\n\t\thashmap.put( \"Two\", new Integer(2) );\r\n\t\thashmap.put( \"Six\", new Integer(6) );\r\n\t\thashmap.put( \"Seven\", new Integer(7) );\r\n\t\t\r\n\t\tSystem.out.println(\"\\nContents of HashMap:\");\r\n\t\ts = hashmap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t\t\r\n\t\t// Keys guaranteed to be in sorted order, no duplicate keys\r\n\t\ttreemap = new TreeMap();\r\n\t\ttreemap.put( \"Three\", new Integer(3) );\r\n\t\ttreemap.put( \"Three\", new Integer(3) );\r\n\t\ttreemap.put( \"Two\", new Integer(2) );\r\n\t\ttreemap.put( \"Seven\", new Integer(7) );\r\n\t\ttreemap.put( \"One\", new Integer(1) );\r\n\t\ttreemap.put( \"Six\", new Integer(6) );\r\n\t\t\r\n\t\tSystem.out.println(\"\\nContents of TreeMap:\");\r\n\t\ts = treemap.keySet();\r\n\t\ti = s.iterator();\r\n\t\t\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t}", "private static void printTree(HuffmanNode tree, String direction, FileWriter newVersion) throws IOException {\n\t\tif(tree.inChar != null) {\n\t\t\tnewVersion.write(tree.inChar + \": \" + direction + \" | \" + tree.frequency + System.getProperty(\"line.separator\"));\n\t\t\tresults[resultIndex][0] = tree.inChar;\n\t\t\tresults[resultIndex][1] = direction;\n\t\t\tresults[resultIndex][2] = tree.frequency;\n\t\t\tresultIndex++;\n\t\t}\n\t\telse {\n\t\t\tprintTree(tree.right, direction + \"1\", newVersion);\n\t\t\tprintTree(tree.left, direction + \"0\", newVersion);\n\t\t}\n\t}", "public void writeConvexHull() throws FileNotFoundException {\n Collections.sort(convexHull,new PointCompare());\n PrintWriter writer = new PrintWriter(\"results.txt\");\n for(int i = 0; i < convexHull.size(); i++){\n writer.println(convexHull.get(i).toString());\n System.out.println(convexHull.get(i).toString());\n }\n writer.close();\n }", "public static void mainx(String[] args) {\n\t\tPrintWriter outputFile = null;\r\n\t\t\r\nSystem.out.println(\"Test Teacher Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"teacherdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>ZAK_B\");\r\n\t\toutputFile.println(\"<NAME>Zakaria Baani\");\r\n\t\toutputFile.println(\"<EMAIL>zakb@debug.fakecentury.edu\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>MAH_E\");\r\n\t\toutputFile.println(\"<NAME>Mahmoud Eid\");\r\n\t\toutputFile.println(\"<EMAIL>mahe@debug.fakecentury.edu\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>BRI_J\");\r\n\t\toutputFile.println(\"<NAME>Brian Jenson\");\r\n\t\toutputFile.println(\"<EMAIL>brij@debug.fakecentury.edu\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\tTeacherDictionary teachers = new TeacherDictionary();\r\n\t\tSystem.out.println(teachers);\r\n\t\t\r\n\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"classdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\nSystem.out.println(\"Test Room Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"roomdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>W101\");\r\n\t\toutputFile.println(\"<NAME>West 101\");\r\n\t\toutputFile.println(\"<CAPACITY>25\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>E2213\");\r\n\t\toutputFile.println(\"<NAME>East 2213\");\r\n\t\toutputFile.println(\"<CAPACITY>45\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<ID>E1001\");\r\n\t\toutputFile.println(\"<NAME>East 1001\");\r\n\t\toutputFile.println(\"<CAPACITY>60\");\r\n\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\tRoomDictionary rooms = new RoomDictionary();\r\n\t\tSystem.out.println(rooms);\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * class\r\n\t\t * \r\n\t\t * <ENTRYSTART>\r\n\t\t * <TITLE>\r\n\t\t * <TEACHER>\r\n\t\t * <STUDENTCOUNT>\r\n\t\t * <STUDENTLIST>\r\n\t\t * <SCHEDULE>\r\n\t\t * <ENTRYEND>\r\n\t\t * \r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Test Class Dictionary write\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\toutputFile = new PrintWriter(new FileOutputStream(\"classdictionary.txt\"));\r\n\t\t}catch (FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Unable to open file.\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\toutputFile.println(\"<TITLE>MATH 2081_1\");\r\n\t\toutputFile.println(\"<TEACHER>BRIAN_J\");\r\n\t\toutputFile.println(\"<SCHEDULE>MATH 2081_1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTCOUNT>15\");\r\n\t\toutputFile.println(\"<STUDENTLIST>CATHY4\");\r\n\t\toutputFile.println(\"<STUDENTLIST>DAN5\");\r\n\t\toutputFile.println(\"<STUDENTLIST>EVE6\");\r\n\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\toutputFile.println(\"<TITLE>PHYS 1082_1\");\r\n\t\toutputFile.println(\"<TEACHER>MAHMOOD_E\");\r\n\t\toutputFile.println(\"<SCHEDULE>PHYS 1082_1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTCOUNT>20\");\r\n\t\toutputFile.println(\"<STUDENTLIST>FRANK7\");\r\n\t\toutputFile.println(\"<STUDENTLIST>GRACE8\");\r\n\t\toutputFile.println(\"<STUDENTLIST>HENRY9\");\r\n\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\t\toutputFile.println(\"<ENTRYSTART>\");\r\n\t\t\t\toutputFile.println(\"<TITLE>CSCI 1082_2\");\r\n\t\t\t\toutputFile.println(\"<TEACHER>ZACH_B\");\r\n\t\t\t\toutputFile.println(\"<SCHEDULE>CSCI 1082_2\");\r\n\t\t\t\t\t\toutputFile.println(\"<STUDENTCOUNT>15\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>AARON1\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>AMY2\");\r\n\t\t\t\toutputFile.println(\"<STUDENTLIST>BOB3\");\r\n\t\t\t\t\t\toutputFile.println(\"<ENTRYEND>\");\r\n\t\t\r\n\t\toutputFile.close();\r\n\t\t\r\n\t\t///\r\n\t\t//DictionaryFile testDictionary = new DictionaryFile(\"classdictionary.txt\",\"ClassDictionary\");\r\n\t\tClassDictionary testDictionary = new ClassDictionary();\r\n//\t\tSystem.out.println(testDictionary.getEntryCount());\r\n//\t\tSystem.out.println(testDictionary.getOpenStatus());\r\n//\t\tSystem.out.println(testDictionary.isValid());\r\n\t\tSystem.out.println(testDictionary);\r\n\t\t\r\n\t\tCalendar calendar = new GregorianCalendar();\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHH\");\r\n\t\tSystem.out.println(df.format(calendar.getTime()));\r\n\r\n\t}", "public static void exportPSMs(String filePath, TagSearchResult result) throws IOException {\r\n // Init the buffered writer.\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(new File(filePath)));\r\n try {\r\n\r\n int count = 1;\r\n\r\n // Peptide header.\r\n writer.append(getPSMHeader());\r\n writer.newLine();\r\n\r\n for (Entry e1 : result.getResultMap().entrySet()) {\r\n\r\n // Get the protein hit.\r\n ProteinFamilyHit proteinFamilyHit = (ProteinFamilyHit) e1.getValue();\r\n Set<Entry<String, ProteinHit>> proteins = proteinFamilyHit.getProteinHits().entrySet();\r\n\r\n for (Entry e2 : proteins) {\r\n ProteinHit proteinHit = (ProteinHit) e2.getValue();\r\n\r\n for (PeptideHit peptideHit : proteinHit.getPeptideHitList()) {\r\n\r\n // PSM results\r\n for (PeptideSpectrumMatch psm : peptideHit.getSpectrumMatchesList()) {\r\n writer.append(count++ + SEP);\r\n writer.append(psm.getSpectrumTitle() + SEP);\r\n writer.append(peptideHit.getSequence() + SEP);\r\n writer.append(proteinHit.getAccession() + SEP);\r\n writer.append(Formatter.roundDouble(psm.getIntensityScore(), 3) + SEP);\r\n writer.append(psm.getIntensityScore() + SEP);\r\n writer.append(psm.getMatchedPeaks() + SEP);\r\n writer.newLine();\r\n }\r\n }\r\n }\r\n writer.flush();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n } finally {\r\n writer.close();\r\n }\r\n }", "public void createCSVFromClusteringResult(final String outputPath, final Map<Double, List<Instance>> data)\n throws IOException {\n if (!data.isEmpty()) {\n final File file = new File(outputPath + \"/hierarchResults.csv\");\n\n // Creates the csv file.\n file.createNewFile();\n final BufferedWriter writer = Files.newBufferedWriter(file.toPath(), StandardOpenOption.CREATE);\n writer.append(\"# of cluster\");\n writer.append(',');\n writer.append(String.valueOf(data.size()));\n writer.append('\\n');\n\n // Write names of attributes to the file.\n final Enumeration attributeNames = data.entrySet().iterator().next().getValue().get(0)\n .enumerateAttributes();\n String attrNameString = \"\";\n while (attributeNames.hasMoreElements()) {\n String attrName = attributeNames.nextElement().toString();\n attrName = attrName.replace(\"@attribute '><\", \"\");\n attrName = attrName.replace(\"' numeric\", \"\");\n attrNameString += attrName;\n attrNameString += \", \";\n }\n writer.append(attrNameString);\n writer.append('\\n');\n\n // Write the different clusters and their assigned instances to the file.\n writer.append(\"ClusterID\");\n writer.append(',');\n writer.append(\"# of instances\");\n writer.append(',');\n writer.append(\"Assigned instances\");\n writer.append('\\n');\n for (final Entry<Double, List<Instance>> entry : data.entrySet()) {\n // Write cluster\n writer.append(String.valueOf(entry.getKey().intValue()));\n writer.append(',');\n // Write number of instances in this cluster\n writer.append(String.valueOf(entry.getValue().size()));\n writer.append(',');\n // Write list of instances which are assigned to this cluster.\n writer.append(\"[\");\n for (final Instance instance : entry.getValue()) {\n writer.append(\"[\");\n writer.append(String.valueOf(instance));\n writer.append(\"],\");\n }\n writer.append(\"]\");\n writer.append('\\n');\n }\n\n writer.flush();\n writer.close();\n }\n }", "private static void LogOverall() throws IOException {\n\t\tBufferedWriter out;\n\t\tIterator entries = allPatternOne.entrySet().iterator();\n\t\t\n\t\t out = new BufferedWriter(new FileWriter(singlePatternPath+\"allPatternOne.txt\"));\n\t\t int count1 = 0;\n\t\t entries = allPatternOne.entrySet().iterator();\n\t\t\twhile (entries.hasNext()) {\n\t\t\t Map.Entry entry = (Map.Entry) entries.next();\n\t\t\t Integer value = (Integer)entry.getKey();\n\t\t\t HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue();\n\t\t\t count1+=set.size();\n\t\t\t out.write(\"!size \" + value + \" \" + set.size() + \"\\n\");\n\t\t\t Iterator itr = set.iterator();\n\t\t\t while(itr.hasNext()) {\n\t\t\t \tSequencePair current = (SequencePair) itr.next();\n\t\t\t \t//System.out.println(\"[\" + current.firstSeq +\":\"+current.secondSeq +\"]\");\n\t\t\t out.write(\"[\" + current.firstSeq +\":\"+current.secondSeq +\"]\"+\"\\n\");\n\t\t\t }\n\t\t\t}\n\t\t\tout.write(\"! total \" + count1);\n\t\t\t//System.out.println(count2);\n\t\t\tif(out!=null)\n\t\t\t\tout.close();\n\t\t\n\t\n\t\t\n\t\t\n\t out = new BufferedWriter(new FileWriter(newSinglePatternPath+\"allPatternTwo.txt\"));\n\t int count2 = 0;\n\t entries = allPatternTwo.entrySet().iterator();\n\t\twhile (entries.hasNext()) {\n\t\t Map.Entry entry = (Map.Entry) entries.next();\n\t\t Integer value = (Integer)entry.getKey();\n\t\t HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue();\n\t\t count2+=set.size();\n\t\t out.write(\"!size \" + value + \" \" + set.size() + \"\\n\");\n\t\t Iterator itr = set.iterator();\n\t\t while(itr.hasNext()) {\n\t\t \tSequencePair current = (SequencePair) itr.next();\n\t\t \t\n\t\t out.write(\"[\" + current.firstSeq +\":\"+current.secondSeq +\"]\"+\"\\n\");\n\t\t }\n\t\t}\n\t\tout.write(\"! total \" + count2);\n\t\t//System.out.println(count2);\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t}", "public static void printHashMapIS(Map<Integer, String> map) throws IOException{\n\t\tPrintWriter writer = new PrintWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/finalCatalogHash\");\n\t\tfor (Entry<Integer, String> entry : map.entrySet())\n\t {\t \t\t\n\t \t\twriter.println(entry.getKey()+\":\"+entry.getValue());\n\t }\n\t writer.close();\n\t}", "public static void main(String[] args) throws IOException\n\t{\n\n\t\tMap<String, Double> pvals = getBestPValues();\n\t\tBufferedWriter writer = Files.newBufferedWriter(Paths.get(\"/home/babur/Documents/mutex/TCGA/PanCan/RankedGenes.txt\"));\n\t\twriter.write(\"Gene\\tMutSig\");\n\t\tpvals.keySet().stream().sorted((g1, g2) -> pvals.get(g1).compareTo(pvals.get(g2))).forEach(g ->\n\t\t\tFileUtil.lnwrite(g + \"\\t\" + pvals.get(g), writer));\n\t\twriter.close();\n\t}", "public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void output(File outputFile){\n try {\n BufferedWriter file = new BufferedWriter(new FileWriter(outputFile));\n file.write(hashTable.length + \"\\n\");\n file.write(space() + \"\\n\");\n file.write(loadFactor + \"\\n\");\n file.write(collisionLength() + \"\\n\");\n for (int i = 0; i < hashTable.length; i++){\n if (hashTable[i] != null){\n LLNodeHash ptr = hashTable[i];\n while (ptr.getNext() != null){\n file.write(\"(\" + ptr.getKey() + \",\" + ptr.getFreq() + \") \");\n ptr = ptr.getNext();\n }\n file.write(\"(\" + ptr.getKey() + \",\" + ptr.getFreq() + \") \");\n }\n }\n file.close();\n }\n catch (IOException e){\n System.out.println(\"Cannot create new file\");\n e.printStackTrace();\n }\n }", "public void writeOut(Map<String, Integer> wordCount) {\r\n Path file = Paths.get(filename + \"_word_count.txt\");\r\n Charset charset = Charset.forName(\"UTF-8\");\r\n try (BufferedWriter writer = Files.newBufferedWriter(file, charset)) {\r\n for (Map.Entry<String, Integer> entry : wordCount.entrySet())\r\n {\r\n writer.write(entry.getKey() + \" : \" + entry.getValue());\r\n writer.newLine();\r\n }\r\n } catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n }", "public static void main(String[] args) throws Exception {\n\t\tlong startTime, stopTime;\n\t\tdouble t_searchCache, t_storeCache;\n//\t\tMap<SmallGraph, SmallGraph> cache = new HashMap<SmallGraph, SmallGraph>(); // the cache\n\t\t// the index on the ploytrees stored in the cache\n\t\tMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>> cacheIndex = new HashMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>>();\n\t\tMap<SmallGraph, Pair<Integer, SmallGraph>> polytree2query = new HashMap<SmallGraph, Pair<Integer, SmallGraph>>();\n\n\t\t// reading the original data graph\n\t\tGraph originalDataGraph = new Graph(args[0]);\n\t\tif(args.length == 6)\toriginalDataGraph.buildParentIndex(args[5]);\n\n\t\t// reading all popular data graphs\n\t\tFile dirG = new File(args[1]);\n\t\tif(!dirG.isDirectory())\n\t\t\tthrow new Exception(\"The specified path for the candidate data graphs is not a valid directory\");\n\t\tFile[] graphFiles = dirG.listFiles();\n\t\tint nPopularGraphs = graphFiles.length;\n\t\tGraph[] graphs = new Graph[nPopularGraphs];\n\t\tfor(int i=0; i < nPopularGraphs; i++)\n\t\t\tgraphs[i] = new Graph(graphFiles[i].getAbsolutePath());\n\t\t\n\t\t// statistical result file\n\t\tFile file = new File(args[2]);\n\t\t// if file does not exists, then create it\n\t\tif (!file.exists()) file.createNewFile();\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\t\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\tbw.write(\"queryNo\\t querySize\\t degree\\t sourceNo\\t isPolytree\\t nHitCandidates\\t t_searchCache\\t isHit\\t hitQueryNo\\t hitQuerySize\\t t_storeCache\\n\");\n\t\tStringBuilder fileContents = new StringBuilder();\n\t\t\n\t\tint nSourceOptions = nPopularGraphs + 1; // number of sources for creating query\n\t\tRandom randSource = new Random();\n\t\tint[] querySizes = {20,22,24,26,28,30,32,34,36,38}; // different available sizes for queries\n\t\tRandom randQuerySize = new Random();\n//\t\tRandom randDegree = new Random();\n\t\tRandom randCenter = new Random();\n\t\t\t\t\n\t\tint requestedQueries = Integer.parseInt(args[4]);\n\t\tfor(int queryNo=0; queryNo < requestedQueries; queryNo++) { // main loop\n\t\t\tSystem.out.print(\"Processing Q\" + queryNo + \":\\t\");\n\t\t\tSmallGraph q;\n\t\t\tint querySize = 25;\n\t\t\tint degree = 5;\n\t\t\tint sourceNo = randSource.nextInt(nSourceOptions);\n\t\t\t// q is created\n\t\t\tif(sourceNo == nSourceOptions - 1) { // from the original data graph\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\t//degree = randDegree.nextInt(querySize/DEGREE_RATIO);\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tint center = randCenter.nextInt(originalDataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(originalDataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} else {\t// from popular data graphs\n\t\t\t\tGraph dataGraph = graphs[sourceNo];\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tif(degree == 0) continue;\n\t\t\t\t\tint center = randCenter.nextInt(dataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(dataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} //if-else\n\t\t\t\n\t\t\tfileContents.append(queryNo + \"\\t\" + q.getNumVertices() + \"\\t\" + degree + \"\\t\" + sourceNo + \"\\t\");\n\t\t\tSystem.out.print(\"N\" + q.getNumVertices() + \"D\" + degree + \"S\" + sourceNo + \",\\t\");\n\t\t\t\n\t\t\tint queryStatus = q.isPolytree();\n\t\t\tswitch (queryStatus) {\n\t\t\t\tcase -1: System.out.println(\"The query Graph is disconnected\");\n\t\t\t\t\tfileContents.append(\"-1\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 0: System.out.print(\"! polytree, \");\n\t\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: System.out.print(\"a polytree, \");\n\t\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: System.out.println(\"Undefined status of the query graph\");\n\t\t\t\t\tfileContents.append(\"2\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// searching in the cache\n\t\t\tPair<Integer, SmallGraph> hitPair = null;\n\t\t\tstartTime = System.nanoTime();\n\t\t\tboolean notInCache = true;\n\t\t\tSet<SmallGraph> candidateMatchSet = CacheUtils.getCandidateMatchSet(q, cacheIndex);\n\t\t\tint nHitCandidates = candidateMatchSet.size();\n\t\t\tSystem.out.print(\"nHitCandidates=\" + nHitCandidates + \", \");\n\t\t\tfileContents.append(nHitCandidates + \"\\t\");\n\t\t\t\n\t\t\tfor(SmallGraph candidate : candidateMatchSet) {\n\t\t\t\tif(CacheUtils.isDualCoverMatch(q, candidate)) {\n\t\t\t\t\tnotInCache = false;\n\t\t\t\t\tSystem.out.print(\"Hit the cache!, \");\n\n\t\t\t\t\thitPair = polytree2query.get(candidate);\n\t\t\t\t\t// use the cache content to answer the query\n//\t\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\t\tSmallGraph inducedSubgraph = cache.get(candidate);\n//\t\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(inducedSubgraph, queryGraph);\n//\t\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\t\tSystem.out.println(\"The time for tight simulation from cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t\tbreak; // the first match would be enough \n\t\t\t\t} //if\n\t\t\t} //for\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_searchCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.print(\"search: \" + t_searchCache + \", \");\n\t\t\tfileContents.append(t_searchCache + \"\\t\");\n\t\t\t\n\t\t\tif(! notInCache) { // found in the cache\n\t\t\t\t// hit query\n\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\tint hitQueryNo = hitPair.getValue0();\n\t\t\t\tSmallGraph hitQuery = hitPair.getValue1();\n\t\t\t\thitQuery.print2File(args[3] + \"/Q\" + hitQueryNo + \"_N\" + hitQuery.getNumVertices() + \".txt\");\n\t\t\t\tfileContents.append(hitQueryNo + \"\\t\" + hitQuery.getNumVertices() + \"\\t\");\n\t\t\t}\n\n\t\t\tstartTime = System.nanoTime();\n\t\t\tif(notInCache) { // Not found in the cache\n\t\t\t\tSystem.out.print(\"Not the cache!, \");\n\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\tfileContents.append(\"-1\\t-1\\t\");\n//\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(dataGraph, queryGraph);\n//\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\tSystem.out.println(\"The time for tight simulation without cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t// store in the cache\n\t\t\t\t// The polytree of the queryGraph is created\n\t\t\t\tint center = q.getSelectedCenter();\n\t\t\t\tSmallGraph polytree = GraphUtils.getPolytree(q, center);\n\t\t\t\t// The dualSimSet of the polytree is found\n\t\t\t\t// The induced subgraph of the dualSimSet is found\n\t\t\t\t// The <polytree, inducedSubgraph> is stored in the cache\n//\t\t\t\tcache.put(polytree, inducedSubgraph);\n\t\t\t\tSet<Pair<Integer, Integer>> sig = polytree.getSignature(); \n\t\t\t\tif (cacheIndex.get(sig) == null) {\n\t\t\t\t\tSet<SmallGraph> pltSet = new HashSet<SmallGraph>();\n\t\t\t\t\tpltSet.add(polytree);\n\t\t\t\t\tcacheIndex.put(sig, pltSet);\n\t\t\t\t} else\n\t\t\t\t\tcacheIndex.get(sig).add(polytree);\n\t\t\t\t\n\t\t\t\tpolytree2query.put(polytree, new Pair<Integer, SmallGraph>(queryNo, q)); // save the queries filling the cache\n\t\t\t} //if\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_storeCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.println(\"store: \" + t_storeCache);\n\t\t\tfileContents.append(t_storeCache + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tbw.write(fileContents.toString());\n\t\t\tfileContents.delete(0, fileContents.length());\n\t\t} //for\n\t\t\n\t\tbw.close();\n\t\t\n\t\tSystem.out.println(\"Number of signatures stored: \" + cacheIndex.size());\n\t\tSystem.out.println(\"Number of polytrees stored: \" + polytree2query.size());\n\t\tint maxSet = 0;\n\t\tfor(Set<SmallGraph> pt : cacheIndex.values()) {\n\t\t\tint theSize = pt.size();\n\t\t\tif(theSize > maxSet)\n\t\t\t\tmaxSet = theSize;\n\t\t} //for\n\t\tSystem.out.println(\"The maximum number of stored polytrees with the same signature: \" + maxSet);\n\t}", "public void report(List<Page> result) {\n\n\t\t// Print Pages out ranked by highest authority\n\t\tsortAuthority(result);\n\t\tSystem.out.println(\"AUTHORITY RANKINGS : \");\n\t\tfor (Page currP : result)\n\t\t\tSystem.out.printf(currP.getLocation() + \": \" + \"%.5f\" + '\\n', currP.authority);\n\t\tSystem.out.println();\n\t\t// Print Pages out ranked by highest hub\n\t\tsortHub(result);\n\t\tSystem.out.println(\"HUB RANKINGS : \");\n\t\tfor (Page currP : result)\n\t\t\tSystem.out.printf(currP.getLocation() + \": \" + \"%.5f\" + '\\n', currP.hub);\n\t\tSystem.out.println();\n\t\t// Print Max Authority\n\t\tSystem.out.println(\"Page with highest Authority score: \" + getMaxAuthority(result).getLocation());\n\t\t// Print Max Authority\n\t\tSystem.out.println(\"Page with highest Hub score: \" + getMaxAuthority(result).getLocation());\n\t}", "@Override\n\tpublic void printFilteredMap() {\n\t\tthis.result.forEach((k, v )-> v.forEach((ke,ve) -> ve.forEach((s) -> System.out.println(k + \" : \"+ ke + \" : \"+ s))));\n\n\t}", "private void writeTotalsToFile(PrintWriter writer) {\n Set set = tokenSizes.entrySet();\n String delimiter = \"\\t\";\n\n // Use of Iterator for the while loop that is no longer being used.\n // Iterator iterator = set.iterator();\n \n for(Map.Entry<Integer, Integer> entry : tokenSizes.entrySet()) {\n writer.println(entry.getKey() + delimiter + entry.getValue());\n } \n\n /**\n * This is a while loop I used in project 1 but Paula told me to use an \n * enhanced for loop instead. \n * \n * while (iterator.hasNext()) {\n * Map.Entry me = (Map.Entry) iterator.next();\n * writer.println(me.getKey() + \"\\t\" + me.getValue());\n * }\n */\n }", "private static void sortWordAndWriteFile(List<TextArray> textArrays) throws IOException {\n SORT_TOOL.addAll(textArrays); // Sort and remove duplicates\n\n Path sortedFilePath = createTempFile(TEMP_SORTED_WORD_FOLDER);\n\n // Save to a new file\n try (FileWriter outputStream = new FileWriter(sortedFilePath.toFile().getAbsolutePath())) {\n SORT_TOOL.forEach(a -> {\n try {\n a.write(outputStream);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n });\n } finally {\n SORT_TOOL.clear();\n }\n }", "public static void writeReport(Collection<HitsHunter> sorted) {\n List<String> resArr = new ArrayList<>(10);\n for (HitsHunter hunter : sorted) {\n var res = Printer.printTotalResult(hunter);\n resArr.add(res);\n }\n CSVWriter.writeInFile(resArr, true);\n }", "static void getResults2(String root) throws IOException {\n\t\tint k = 1;\n\t\twhile (k <= 1) {\n\t\t\tint j = 1;\n\t\t\tString line;\n\t\t\tString multi = \"\";\n\t\t\tSystem.out.println(\"M\" + k);\n\n\t\t\twhile (j <= 10) {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(root\n\t\t\t\t\t\t+ \"M1/M1.1/Testbeds-\" + j + \"/Generated/PSL//test/Precision/multi.txt\")));\n\n\t\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\tmulti += line;\n\t\t\t\t\tSystem.out.print(line + \",\");\n\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic Map<Integer, List> formatResultMap(Map<Integer, VendorAmountBean> vendorMap, Map<Integer, ArrayList<VendorAmountBean>> vendorW9HistoryMap) throws Exception {\r\n\r\n\t\t\r\n\t\tMap<Integer, List> resultMapArray = new HashMap();\r\n\t\t\r\n\t\t// The Cryptography constructor should be outside teh loop,\r\n\t\t// the constructor has db call. \r\n\t\tCryptography cryptography = new Cryptography();\r\n\r\n\t\tif (vendorMap != null) {\r\n\r\n\t\t\tint index = 0;\r\n\t\t\t\r\n\t\t\tfinal Collection c = vendorMap.values();\r\n\t\t\t\r\n\t\t\tfinal Iterator itr = c.iterator();\r\n\r\n\t\t\twhile (itr.hasNext()) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tVendorAmountBean vendorAmountBean = (VendorAmountBean)itr.next();\r\n\t\t\t\tif(vendorW9HistoryMap.containsKey(Integer.parseInt(vendorAmountBean.getVendor_id()))){\r\n\t\t\t\t\tCollections.reverse(vendorW9HistoryMap.get(Integer.parseInt(vendorAmountBean.getVendor_id())));\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(VendorAmountBean vendorHistBean : vendorW9HistoryMap.get(Integer.parseInt(vendorAmountBean.getVendor_id()))){\r\n\t\t\t\t\t\tif(Float.valueOf(vendorHistBean.getAmount()) > 0){\r\n\t\t\t\t\t\t\tfinal List<byte[]> resultList = new ArrayList<byte[]>();\r\n\r\n\t\t\t\t\t\t\t // Extract all the values from the vendor History Bean.\r\n\t\t\t\t\t\t\t extractValuesFromVendorBean(vendorHistBean, vendorAmountBean);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Please don't change the order in which the resultList is adding the elements (order in which methods\r\n\t\t\t\t\t\t\t // are being called to populate the resultlist).\r\n\t\t\t\t\t\t\t// The order has to be maintained because the data is written in file with same order.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Adds to the list the first four static values.\r\n\t\t\t\t\t\t\taddInitialStaticValuesToList(resultList);\r\n\t\t\t\t\t\t\t// Adds the middle values to result list.\r\n\t\t\t\t\t\t\taddToResultList(resultList);\r\n\t\t\t\t\t\t\t// Add more values to the list.\r\n\t\t\t\t\t\t\taddMoreToResultList(cryptography,resultList);\r\n\t\t\t\t\t\t\t// Add last remaining values to the list.\r\n\t\t\t\t\t\t\taddTailValuesToResultList(resultList);\r\n\r\n\t\t\t\t\t\t\t// Add the resultList to the next index in the Map.\r\n\t\t\t\t\t\t\tresultMapArray.put(Integer.valueOf(index), resultList);\r\n\r\n\t\t\t\t\t\t\tindex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfinal List<byte[]> resultList = new ArrayList<byte[]>();\r\n\r\n\t\t\t\t\t // Extract all the values from the vendor Bean.\r\n\t\t\t\t\t extractValuesFromVendorBean(vendorAmountBean, null);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Please don't change the order in which the resultList is adding the elements (order in which methods\r\n\t\t\t\t\t // are being called to populate the resultlist).\r\n\t\t\t\t\t// The order has to be maintained because the data is written in file with same order.\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Adds to the list the first four static values.\r\n\t\t\t\t\taddInitialStaticValuesToList(resultList);\r\n\t\t\t\t\t// Adds the middle values to result list.\r\n\t\t\t\t\taddToResultList(resultList);\r\n\t\t\t\t\t// Add more values to the list.\r\n\t\t\t\t\taddMoreToResultList(cryptography,resultList);\r\n\t\t\t\t\t// Add last remaining values to the list.\r\n\t\t\t\t\taddTailValuesToResultList(resultList);\r\n\r\n\t\t\t\t\t// Add the resultList to the next index in the Map.\r\n\t\t\t\t\tresultMapArray.put(Integer.valueOf(index), resultList);\r\n\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\treturn resultMapArray;\r\n\t}", "public static void exportProteins(String filePath, TagSearchResult result) throws IOException {\r\n // Init the buffered writer.\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(new File(filePath)));\r\n try {\r\n\r\n // Protein format.\r\n writer.append(getProteinHeader());\r\n writer.newLine();\r\n\r\n int count = 1;\r\n\r\n for (Entry e1 : result.getResultMap().entrySet()) {\r\n\r\n // Get the protein hit.\r\n ProteinFamilyHit proteinFamilyHit = (ProteinFamilyHit) e1.getValue();\r\n writer.append(count + SEP);\r\n writer.append(proteinFamilyHit.getName() + SEP);\r\n writer.append(proteinFamilyHit.getUniqueSpectralCount() + SEP);\r\n\r\n // Protein Index\r\n int proteinCount = 1;\r\n Set<Entry<String, ProteinHit>> proteins = proteinFamilyHit.getProteinHits().entrySet();\r\n\r\n for (Entry e2 : proteins) {\r\n ProteinHit proteinHit = (ProteinHit) e2.getValue();\r\n writer.append(proteinCount + SEP);\r\n writer.append(proteinHit.getAccession() + SEP);\r\n writer.append(proteinHit.getDescription() + SEP);\r\n writer.append(proteinHit.getSpecies() + SEP);\r\n writer.append(proteinHit.getMolWeight() + SEP);\r\n writer.newLine();\r\n if (proteins.size() != proteinCount) {\r\n writer.append(SEP);\r\n writer.append(SEP);\r\n writer.append(SEP);\r\n }\r\n proteinCount++;\r\n }\r\n count++;\r\n writer.flush();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n } finally {\r\n writer.close();\r\n }\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tMap<String, String> map1 = new HashMap<>();\n\t\t\n\t\t// Put items into map1\n\t\tmap1.put(\"Cuthbert\", \"14\");\n\t\tmap1.put(\"Hugh\", \"8\");\n\t\tmap1.put(\"Barney McGrew\", \"12\");\n\t\tmap1.put(\"Pugh\", \"31\");\n\t\t\n\t\tSystem.out.println(\"Map Elements\");\n\t\tSystem.out.println(\"\\t\" + map1);\n\t\tSystem.out.println(\"\\tOrdered by key hash\");\n\t\t\n\t\t// Demo 7.7 - TreeMaps\n\t\t// Provides efficient means of storing key/value pairs in sorted order\n\t\t// Allows rapid retrieval\n\t\tTreeMap<String, Double> treeMap = new TreeMap<>();\n\t\t\n\t\ttreeMap.put(\"Pugh\", new Double(4321.12));\n\t\ttreeMap.put(\"Pugh\", new Double(123.45));\n\t\ttreeMap.put(\"Barney McGrew\", new Double(7654.21));\n\t\ttreeMap.put(\"Cuthbert\", new Double(456.123));\n\t\t\n\t\tSystem.out.println(\"TreeMap Elements\");\n\t\tSystem.out.println(\"\\t\" + treeMap);\n\t\tSystem.out.println(\"\\tSorted by key\");\n\t\t\n\t\t// Demo 7.8 - Linked Hash Map\n\t\t// Extends HashMap but it maintains linked list of entries in the order inserted\n\t\tMap<String, String> map2 = new LinkedHashMap<>();\n\t\t\n\t\t// Put items into map1\n\t\tmap2.put(\"Cuthbert\", \"14\");\n\t\tmap2.put(\"Hugh\", \"8\");\n\t\tmap2.put(\"Barney McGrew\", \"12\");\n\t\tmap2.put(\"Pugh\", \"31\");\n\t\t\t\t\n\t\tSystem.out.println(\"LinkedHashMap Elements\");\n\t\tSystem.out.println(\"\\t\" + map2);\n\t\tSystem.out.println(\"\\tInsertion order preserved\");\n\t\t\n\t}", "protected void calculaterVSMforAllQuery(String type)\n {\n ArrayList<String> resultAll=new ArrayList<>();\n for(String qid: this.queryTFscore.keySet())\n {\n //System.out.println(qid+\"----------------------------------------------------------------------------------------------\"+this.maxLength+\" \"+this.minLength);\n HashMap<String, Double> queryInfo=this.queryTFscore.get(qid);\n System.out.println(qid+\" \"+queryInfo);\n HashMap <String, Double> finalResult=new HashMap<>();\n for(String docID:this.corpusTFscore.keySet())\n {\n HashMap<String, Double> docInfo=this.corpusTFscore.get(docID);\n double upperscore=this.calculateUpperPart(queryInfo, docInfo, docID);\n double lowerscore=this.calculateLowerPart(queryInfo, docInfo, docID);\n double score=0.0;\n \n //Calculate gTerms\n //Calculate Nx\n double Nx=0.0;\n if(this.LengthInfoMap.containsKey(docID)){\n Nx=(this.LengthInfoMap.get(docID)-this.minLength)/(this.maxLength-this.minLength);\n }\n \n //Calculate gTerms\n double gTerms=1/(1+Math.exp(-Nx));\n if(upperscore!=0&&lowerscore!=0) score=gTerms*(upperscore)/lowerscore;\n //if(upperscore!=0&&lowerscore!=0) score=(upperscore)/lowerscore;\n if(score>0) {\n //System.out.println(docID+\" = \"+score);\n finalResult.put(docID, score);\n }\n \n }\n HashMap<String, Double> normalizedAndSortedResult=doNormalization(finalResult);\n //HashMap<String, Double> sortedResult=MiscUtility.sortByValues(finalResult);\n //System.out.println(normalizedAndSortedResult);\n int count=0;\n for(String docID:normalizedAndSortedResult.keySet())\n {\n if(count>9) break;\n String fullPath=this.corpusMap.get(docID);\n resultAll.add(qid+\",\"+fullPath+\",\"+normalizedAndSortedResult.get(docID));\n count++;\n }\n }\n ContentWriter.writeContent(this.base+\"\\\\Result\\\\\"+this.corpus+\"_result\"+type+\".txt\", resultAll);\n }", "public void flush(){\n\n if (!entries.isEmpty()) {\n //write GeoKeyDirectory\n //first line (4 int) contain the version and number of keys\n //Header={KeyDirectoryVersion, KeyRevision, MinorRevision, NumberOfKeys}\n final int[] values = new int[4 + 4*entries.size()];\n values[0] = GEOTIFF_VERSION;\n values[1] = REVISION_MAJOR;\n values[2] = REVISION_MINOR;\n values[3] = entries.size();\n for (int i = 0, l = 4, n = entries.size(); i < n; i++, l += 4) {\n final KeyDirectoryEntry entry = entries.get(i);\n values[l] = entry.valueKey;\n values[l+1] = entry.valuelocation;\n values[l+2] = entry.valueNb;\n values[l+3] = entry.valueOffset;\n }\n\n final Node nGeoKeyDir = createTiffField(Tag.GeoKeyDirectory);\n nGeoKeyDir.appendChild(createTiffShorts(values));\n ifd.appendChild(nGeoKeyDir);\n }\n\n //write tagsets\n /*\n ifd.setAttribute(ATT_TAGSETS,\n BaselineTIFFTagSet.class.getName() + \",\"\n + GeoTIFFTagSet.class.getName());\n*/\n if (nPixelScale != null) ifd.appendChild(nPixelScale);\n\n if (!tiePoints.isEmpty()) {\n ifd.appendChild(createModelTiePointsElement(tiePoints));\n } else if (nTransform != null) {\n ifd.appendChild(nTransform);\n }\n\n if (minSampleValue != null) ifd.appendChild(minSampleValue);\n\n if (maxSampleValue != null) ifd.appendChild(maxSampleValue);\n\n if (!noDatas.isEmpty())\n for (Node nd : noDatas) ifd.appendChild(nd);\n\n if (date != null)\n ifd.appendChild(date);\n\n if (!doubleValues.isEmpty()) {\n final Node nDoubles = createTiffField(Tag.GeoDoubleParams);\n final Node nValues = createTiffDoubles(doubleValues);\n nDoubles.appendChild(nValues);\n ifd.appendChild(nDoubles);\n }\n\n if (asciiValues.length() > 0) {\n final Node nAsciis = createTiffField(Tag.GeoAsciiParams);\n final Node nValues = createTiffAsciis(asciiValues.toString());\n nAsciis.appendChild(nValues);\n ifd.appendChild(nAsciis);\n }\n }", "public static void main(String[] args) throws Exception {\r\n\r\n\t //All results in Phase K-1.\r\n\t List<ItemSet> itemSetsPrevPass = new ArrayList<>();\r\n\t \r\n\t //Results in Phase K.\r\n\t List<ItemSet> candidateItemSets = null;\r\n\t int passNum=3;\r\n\t //Index Structure in Phase K.\r\n\t Trie trie = null;\r\n\t \r\n\t\tString lastPassOutputFile = \"E:\\\\复旦小学的资料\\\\part-r-00000\";\t\r\n \r\n try {\r\n File fp = new File(lastPassOutputFile);\r\n BufferedReader p = new BufferedReader(new FileReader(fp));\r\n String currLine;\r\n while ((currLine = p.readLine()) != null) {\r\n currLine = currLine.replace(\"[\", \"\");\r\n currLine = currLine.replace(\"]\", \"\");\r\n String[] words = currLine.split(\"[\\\\s\\\\t]+\");\r\n if (words.length < 2) {\r\n continue;\r\n }\r\n\r\n String finalWord = words[words.length - 1];\r\n int support = Integer.parseInt(finalWord);\r\n ItemSet itemSet = new ItemSet(support);\r\n //Make {itemSetsPrevPass}\r\n for (int k = 0; k < words.length - 1; k++) {\r\n String csvItemIds = words[k];\r\n String[] itemIds = csvItemIds.split(\",\");\r\n for (String itemId : itemIds) {\r\n itemSet.add(Integer.parseInt(itemId));\r\n }\r\n }\r\n if(itemSet.size() ==(passNum-1))\r\n \titemSetsPrevPass.add(itemSet);\r\n }\r\n }\r\n catch (Exception e) {\r\n \tSystem.out.println(e);\r\n }\r\n\r\n \r\n System.out.println(\"OK1!\");\r\n //See annotation in file: utils/Funcs.java\r\n candidateItemSets = Funcs.getCandidateItemSets(itemSetsPrevPass, (passNum - 1));\r\n// File fout = new File(\"E:\\\\复旦小学的资料\\\\tri.txt\");\r\n// PrintWriter output = new PrintWriter(fout);\r\n// for(ItemSet s:candidateItemSets) {\r\n// \toutput.println(s);\r\n// }\r\n// output.close();\r\n System.out.println(\"OK2!\");\r\n \r\n trie = new Trie(passNum);\r\n\r\n int candidateItemSetsSize = candidateItemSets.size();\r\n for (int i = 0; i < candidateItemSetsSize; i++) {\r\n ItemSet itemSet = candidateItemSets.get(i);\r\n //System.out.println(itemSet);\r\n trie.add(itemSet);\r\n }\r\n \r\n \r\n File fp = new File(\"C:\\\\Users\\\\DELL6\\\\Desktop\\\\mul\");\r\n BufferedReader p = new BufferedReader(new FileReader(fp));\r\n String currLine;\r\n ArrayList<ItemSet> empt = new ArrayList<ItemSet>();\r\n while((currLine = p.readLine()) != null) {\r\n\t Transaction txn = Funcs.getTransaction(2, currLine);\r\n\t Collections.sort(txn);\r\n\t ArrayList<ItemSet> matchedItemSet = new ArrayList<>();\r\n\t trie.findItemSets(matchedItemSet, txn);\r\n\t if(!matchedItemSet.equals(empt)) {\r\n\t \tfor(ItemSet itemSet : matchedItemSet) \r\n\t\t \tSystem.out.println(itemSet);\r\n\t\t }\r\n\t }\r\n }", "public static void writeToCSV() {\n final String CSV_SEPARATOR = \",\";\n final String QUOTE = \"\\\"\";\n if (!Crawler.getKeyWordsHits().isEmpty()) {\n try (BufferedWriter bufferedWriter =\n new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\"results.csv\", true), StandardCharsets.UTF_8))) {\n\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> {\n String oneLine = QUOTE + keyWord + QUOTE +\n CSV_SEPARATOR +\n hitsNumber;\n try {\n bufferedWriter.write(oneLine);\n bufferedWriter.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n String lastLine = QUOTE + Crawler.getUrl() + QUOTE + CSV_SEPARATOR + Crawler.getTotalHits();\n bufferedWriter.write(lastLine);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Crawler.setKeyWordsHits(new HashMap<>());\n Crawler.setTotalHits(0);\n }", "public static void main(String[] args)\r\n {\r\n Map<Character, Integer> myMap = new TreeMap<>(); //initializes the map\r\n secondMap = new TreeMap<>(); //initializes the second map\r\n List<Character> myList = new ArrayList<>(); //creates the list\r\n\r\n //input validation loop to force the users to input an extension with .txt, also extracts the directoryPath\r\n //from the file path extension\r\n String filePath = \"\";\r\n String directoryPath = \"\";\r\n boolean keepRunning = true;\r\n Scanner myScanner = new Scanner(System.in);\r\n\r\n while (keepRunning)\r\n {\r\n System.out.println(\"Please provide the filepath to the file and make sure to include the '.txt' extension\");\r\n String z = myScanner.nextLine();\r\n\r\n //uses a substring to check the extension\r\n if (z.substring((z.length() - 4)).equalsIgnoreCase(\".txt\"))\r\n {\r\n filePath = z;\r\n\r\n for (int i = z.length()-1; i >= 0; i--)\r\n {\r\n if (z.charAt(i) == '\\\\')\r\n {\r\n directoryPath = z.substring(0, i);\r\n i = -1;\r\n }\r\n }\r\n\r\n //terminates the loop\r\n keepRunning = false;\r\n }\r\n else\r\n {\r\n System.out.print(\"Invalid Input! \");\r\n }\r\n }\r\n\r\n try\r\n {\r\n //makes the file\r\n File myFile = new File(filePath);\r\n FileInputStream x = new FileInputStream(myFile);\r\n\r\n //reads in from the file character by character\r\n while (x.available() > 0)\r\n {\r\n Character c = (char) x.read();\r\n myList.add(c);\r\n }\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n //loads all of the characters into a map with their respective frequency\r\n for (Character a : myList)\r\n {\r\n Integer value = myMap.get(a);\r\n\r\n if (!myMap.containsKey(a))\r\n {\r\n myMap.put(a, 1);\r\n }\r\n else\r\n {\r\n myMap.put(a, (value + 1));\r\n }\r\n }\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(myMap);\r\n\r\n PriorityQueue<Node> myQueue = new PriorityQueue<>();\r\n\r\n //creates a node for each Character/value in the map and puts it into the priority Queue\r\n for (Character a : myMap.keySet())\r\n {\r\n Node b = new Node(a, myMap.get(a));\r\n myQueue.add(b);\r\n }\r\n\r\n //removes and re-adds nodes to form the tree, remaining node is the root of the tree\r\n while (myQueue.size() > 1)\r\n {\r\n //removes first two nodes\r\n Node firstRemoved = myQueue.remove();\r\n Node secondRemoved = myQueue.remove();\r\n\r\n //the value for the new node being a sum of the first two removed node's respective frequencies\r\n int val = firstRemoved.frequency + secondRemoved.frequency;\r\n\r\n //creates the new node, set's its frequency to the value of the first two, then ties its left/right node values\r\n //to those originally removed nodes\r\n Node replacementNode = new Node();\r\n replacementNode.frequency = val;\r\n replacementNode.left = firstRemoved;\r\n replacementNode.right = secondRemoved;\r\n\r\n myQueue.add(replacementNode);\r\n }\r\n\r\n //does the recursion on the priorityQueue\r\n huffmanStringSplit(myQueue.peek(), \"\");\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(secondMap);\r\n\r\n //creates and writes to the .CODE file and the .HUFF file\r\n try\r\n {\r\n //PrintWriter for easily writing to a file\r\n String output = directoryPath + \"\\\\FILENAME.code\";\r\n PrintWriter myPrinter = new PrintWriter(output);\r\n\r\n //goes through the second map\r\n for (Character a : secondMap.keySet())\r\n {\r\n int ascii = (int) a;\r\n myPrinter.println(ascii);\r\n myPrinter.println(secondMap.get(a));\r\n }\r\n\r\n //closes printer\r\n myPrinter.close();\r\n\r\n //reopens the printer to the new file\r\n output = directoryPath + \"\\\\FILENAME.huff\";\r\n myPrinter = new PrintWriter(output);\r\n\r\n //outputs every value in the original list to the .huff file with the characters converted to huff code\r\n for (Character a : myList)\r\n {\r\n myPrinter.print(secondMap.get(a));\r\n myPrinter.flush();\r\n }\r\n\r\n //closes the printer after it's written\r\n myPrinter.close();\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }" ]
[ "0.63585144", "0.62688047", "0.624726", "0.61159664", "0.6055236", "0.59027755", "0.58866245", "0.5884582", "0.58828336", "0.58604187", "0.5860154", "0.5829848", "0.5701575", "0.5670339", "0.56695914", "0.56519204", "0.56481725", "0.564027", "0.56400466", "0.562276", "0.5604171", "0.5603021", "0.5602181", "0.55994177", "0.559271", "0.5573383", "0.55686307", "0.55671394", "0.5563466", "0.5537787", "0.5527897", "0.551045", "0.55051184", "0.54885346", "0.5485503", "0.5481973", "0.5476858", "0.543954", "0.54075795", "0.5403326", "0.53885967", "0.53881484", "0.53844094", "0.5373985", "0.5372236", "0.53713906", "0.53693765", "0.5369029", "0.53591007", "0.5358918", "0.5355809", "0.5347013", "0.5338812", "0.5332168", "0.53278714", "0.5313646", "0.5313137", "0.5298047", "0.5292383", "0.5289377", "0.52728945", "0.5270489", "0.5267837", "0.52661526", "0.5265057", "0.52562004", "0.5242627", "0.5234645", "0.522851", "0.5226216", "0.5226131", "0.52213496", "0.521092", "0.5207659", "0.5193358", "0.5177665", "0.51646054", "0.5159703", "0.51462746", "0.5140869", "0.5128392", "0.51243454", "0.51033324", "0.50937057", "0.5092115", "0.50853413", "0.50838625", "0.50814384", "0.50813204", "0.506754", "0.5065316", "0.5063672", "0.5062592", "0.5057427", "0.50501746", "0.5047654", "0.504384", "0.503922", "0.50287265", "0.5019371" ]
0.85719454
0
Spring Data repository for the MaterialDeExame entity.
@SuppressWarnings("unused") @Repository public interface MaterialDeExameRepository extends JpaRepository<MaterialDeExame, Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Repository\npublic interface RedeemRepo extends JpaRepository<Redeem , Long> {\n}", "public interface CategoriaMaterialData extends JpaRepository<CategoriaMaterial, Integer> {\n List<CategoriaMaterial> findByNomeContaining(String nome);\n}", "public interface ExpositionRepository extends JpaRepository<Exposition,Long> {\n\n}", "@Repository\npublic interface ModDao extends CrudRepository<Mod, Long>{\n\n}", "@Repository\npublic interface MedicalAidRepository extends JpaRepository<MedicalAid, String> {\n\n}", "@Repository\npublic interface EditorRepository extends JpaRepository<Editor, Long> {\n}", "public interface AttachmentRepository extends JpaRepository<Attachment,Long> {\n}", "public interface MaterialService extends Service<Material> {\n\n /**\n * 批量更新原材料编码的更新状态\n *\n * @param materialList\n * @return\n */\n int updateSyncStatus(String[] materialList);\n\n /**\n * 获取原材料同步时的全部数据\n * @param codes\n * @return\n */\n SyncMaterial getSyncMaterial(String[] codes);\n\n /**\n * 查找物料列表\n * @return\n */\n List<MaterialVO> findByQueryCondition(String materialNameOrNo);\n\n\n /**\n * 导出物料列表\n * @param list\n * @return\n */\n Workbook exportMaterialExExcel(List <MaterialVO> list);\n\n /**\n * 获取产品类别表数据\n * @return\n */\n List<Map<String,Object>> getCatalogList();\n\n /**\n * 获取物料类型列表\n * @return\n */\n List<Map<String,Object>> getMaterialTypeList();\n\n /**\n * 获取获取列表数据\n * @return\n */\n List<Map<String,Object>> getCurrencyList();\n}", "public interface MaterialDao {\n\n boolean createMaterial(Material material);\n\n boolean materialExists(Material material);\n\n Material getMaterial(String value, Constants.QUERYID isId);\n\n Material getMaterial(Material material);\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ModeEvacuationEauUseeRepository\n extends JpaRepository<ModeEvacuationEauUsee, Long>, JpaSpecificationExecutor<ModeEvacuationEauUsee> {}", "public interface MedicamentRepository extends JpaRepository< Medicament, Long > {\n\n List< Medicament > findByName( String name );\n\n}", "public interface EvenementRepository extends CrudRepository<Evenement, Integer> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface MedicalRepository extends JpaRepository<Medical, Long> {\n\n}", "@Repository\npublic interface ProducerRepository extends CrudRepository<Producer, Long>{\n public Producer save(Producer c);\n public void delete(Producer c);\n public Producer findOne(Long id);\n public Producer findByName(@Param(\"name\") String name);\n}", "public interface MediaTypeRepository extends JpaRepository<MediaType, Long> {\n}", "@Override\n\tpublic List<Material> findAll() {\n\t\treturn (List<Material>) materialRepository.findAll();\n\t}", "public interface AttachmentRepo extends CrudRepository<Attachment,Long> {\n}", "@Repository\npublic interface MpidRepository extends JpaRepository<Mpid, Integer> {\n \n Mpid findByHandle(String handle);\n\n List<Mpid> findByDealCode(String dealCode);\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface CommunityMediaRepository extends JpaRepository<CommunityMedia, Long> {\n\n}", "public interface ExamineDao extends CrudRepository<Examine,Integer>{\n public Examine findByCodeeAndIdtemplate(String codee, int idtemplate);\n public List<Examine> findByIdtemplate(int idtemplate);\n public List<Examine> findByCodee(String codee);\n}", "@Repository\npublic interface ProductRepository extends JpaRepository<Product, Long> {\n\n}", "public interface RepairRepository extends JpaRepository<Repair,Long> {\n\n}", "public interface OrderMasterRepository extends JpaRepository<OrderMaster,String> {\n\n\n\n\n\n}", "public interface PresupuestosExpedRepository\nextends CrudRepository<PresupuestosExped, PresupuestosExpedPK>, PresupuestosExpedRepositoryCustom {\n\t/**\n\t * UMESCI-713 Find PresupuestosExped by the parameters\n\t *\n\t * @param numExp\n\t * @param tipMovValue\n\t * @param billStatusActive\n\t * @return\n\t */\n\tPresupuestosExped findPresupuestosExpedByIdNumExpAndTipMovAndEstado(String numExp, String tipMovValue,\n\t\t\tString billStatusActive);\n\n\n}", "public interface RecipeRepository extends CrudRepository<Recipe,Long> {\n}", "public interface RepositoryLineMhc extends JpaRepository<LineMhc, Long> {\n\n\tpublic LineMhc findByOid( Long oid );\n\tpublic LineMhc findByName( String name );\n\n}", "@Repository\npublic interface MenuItemRepository extends JpaRepository<MenuItem, Integer> { }", "@Repository(\"emailLogRepository\")\npublic interface EmailLogRepository extends JpaRepository<EmailLogDB, Integer>{\n}", "@Repository\r\npublic interface AssignmentRepository extends CrudRepository<Assignment, String> {\r\n\r\n}", "@Repository\npublic interface EnterprisesRepository extends JpaRepository<Enterprises, Long> {\n\n Enterprises findById(Long id);\n\n/* @Query(\"SELECT e.id,e.entpName,e.contactPerson,e.createdDate FROM Enterprises e\")\n List<Enterprises> findAllEnterprises();*/\n\n @Query(\"SELECT e FROM Enterprises e where e.id = :id\")\n Enterprises findEnterprise(@Param(\"id\") Long id);\n}", "public interface LibraryMagazineEntryRepository extends CrudRepository<LibraryMagazineEntry, String> {\n LibraryMagazineEntry findBymagazineid(String magazineid);\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface TemaRepository extends JpaRepository<Tema, Long> {\n\t\n \n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface HrmsActionDisciplinaryRepository extends JpaRepository<HrmsActionDisciplinary, Long> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ReceiptItemRepository extends JpaRepository<ReceiptItem, Long> {\n\n}", "@Repository\npublic interface ProductRepository extends CrudRepository<Product, Integer> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LevelDressageHisRepository extends JpaRepository<LevelDressageHis, Long> {\n\n}", "public List<PedidoMaterialModel> findAll(){\n \n List<PedidoMaterialModel> pedidosM = new ArrayList<>();\n \n return pedidosM = pedidoMaterialConverter.entitiesToModels(pedidoMaterialRepository.findAll());\n }", "public interface LossRepository extends JpaRepository<Loss,Long> {\n\n}", "@Repository\npublic interface AhmsdttmMstclustypeDao extends JpaRepository<AhmsdttmMstclustype, Integer> {\n\n}", "@Repository\npublic interface IlceRepository extends JpaRepository<Ilce, Long> {\n\n Ilce findByKod(int kod);\n}", "@Repository\npublic interface ItemRepository extends JpaRepository<Item, Long>{\n\n}", "public interface ElectronicLongRepository extends JpaRepository<Tb_electronic_long, String> {\n\n Tb_electronic_long findByEleid(String eleid);\n\n List<Tb_electronic_long> findByEntryidOrderBySortsequence(String entryid);\n\n List<Tb_electronic_long> findByEleidInOrderBySortsequence(String[] eleids);\n\n Integer deleteByEntryidIn(String[] entryidData);\n\n List<Tb_electronic_long> findByEleidIn(String[] eleids, Sort sort);\n\n List<Tb_electronic_long> findByEntryid(String entryid,Sort sort);\n\n List<Tb_electronic_long> findByEntryid(String entryid);\n}", "public interface EmployeeRepository extends CrudRepository<Employee, Long>{\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface RefMatriceFluxRepository extends JpaRepository<RefMatriceFlux, Long> {\n\n}", "public interface MaintenanceDao extends JpaRepository<Maintenance, Long> {\n}", "@Repository\npublic interface ProdutoRepository extends JpaRepository<Produto, Integer>{\n \t\n}", "List<Material> findAllMaterials() throws ReadException;", "@Repository\npublic interface ItemPedidoRepository extends JpaRepository<ItemPedido, Integer> {\n}", "public interface DocketCodeRepository extends JpaRepository<DocketCode,Long> {\n\n}", "@Repository\npublic interface ModelAssignedResourcesRepository extends JpaRepository<ModelAssignedResources, ModelAssignedResourcesId> {\n\n\t@Modifying\n\t@Query(\"delete ModelAssignedResources MAR where MAR.id.modelId = :id\")\n\tint deleteByModelId(@Param(\"id\") Long id);\n\n\t/**\n\t * \n\t * This method returns ModelAssignedResources using model id.\n\t * \n\t * @param modelId\n\t * @return\n\t */\n\t@Query(\"SELECT MVL FROM ModelAssignedResources MVL WHERE MVL.id.modelId= :modelId\")\n\tList<ModelAssignedResources> findModelAssignedResourcesByModelId(@Param(\"modelId\") Long modelId);\n\t\n}", "public interface IModeratorProposalRepository extends JpaRepository<ModeratorProposal, Integer> {\n}", "public interface PurchaseRecordDetailRepository extends JpaRepository<PurchaseRecordDetail, Long> {\r\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface MMatchEnvironmentRepository extends JpaRepository<MMatchEnvironment, Long>, JpaSpecificationExecutor<MMatchEnvironment> {\n\n}", "public interface ModelColourDAO extends JpaRepository<ModelColour, String> {\n\t@Query(\"SELECT mdc FROM ModelColour mdc WHERE mdc.model.modelId = ?1 AND mdc.colourCode.newColourCode = ?2\")\n\tpublic ModelColour findByModelAndColourCode(Long modelId, String code);\t\t\n\t\n}", "@Repository\npublic interface EmployeeStoreRepository extends JpaRepository<EmployeeStore,String>{\n\n}", "public interface MedicalRecordRepository extends JpaRepository<MedicalRecordEntity, Integer> {\n\n Optional<MedicalRecordEntity> findByPatientId(int patientId);\n List<MedicalRecordEntity> findAllByPatientId(int patientId);\n Optional<MedicalRecordEntity> findByRecordId(int recordId);\n}", "@Repository\npublic interface RoomRepository extends JpaRepository<Room, Long> {\n\n\n}", "@Repository\npublic interface DBFileRepository extends JpaRepository<DBFile, Long> {\n\n}", "@Repository\npublic interface MarkJpaRepository extends JpaRepository<MarkPO, Integer> {\n List<MarkPO> findAllByStudentPO(StudentPO studentPO);\n\n MarkPO findByStudentPOAndAndSubjectPO(StudentPO studentPO, SubjectPO subjectPO);\n}", "public interface PanelRepository extends JpaRepository<Panel, Long> {\n\n /**\n * Finds a {@link Panel} by the given serial.\n *\n * @param serial The serial\n * @return {@link Panel}\n */\n Panel findBySerial(String serial);\n}", "public interface IRespuestaInformeRepository extends JpaRepository<RespuestaInforme, RespuestaInformeId> {\n \n /**\n * Recupera las respuestas de un informe dado.\n * \n * @param informe seleccionado\n * @return lista de respuestas\n */\n List<RespuestaInforme> findByInforme(Informe informe);\n \n}", "public interface StockFamilyRepository extends JpaRepository<StockFamily,Long> {\n\n}", "public interface ItemRepository extends CrudRepository<Item, Long> {\n}", "public interface DisasterRepository extends JpaRepository<Disaster,Integer> {\n\n}", "public interface SideEntityDao extends CrudRepository<SideEntity, Long> {\n\n\tSet<SideEntity> findAll();\n\n}", "public interface RimWideRepository extends JpaRepository<RimWide, Long> {\n}", "@Repository\r\npublic interface HaltestellenzuordnungRepository extends CrudRepository<Haltestellenzuordnung, Long> {\r\n\r\n /**\r\n * Gibt die Haltestellenzuordnungen zurück mit der übergebenen Fahrtstrecke\r\n * \r\n * @param fahrtstrecke\r\n * @return Iterable von Haltestellenzuordnungen\r\n */\r\n Iterable<Haltestellenzuordnung> findAllByFahrtstrecke(Fahrtstrecke fahrtstrecke);\r\n}", "public interface FileDetailRepository extends CrudRepository<FileDetail, Long> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface JefaturaRepository extends JpaRepository<Jefatura, Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface RefGeoCommuneRepository extends JpaRepository<RefGeoCommune, Long> {\n}", "public interface ModeloRepository extends CrudRepository<Modelo, Long> {\n}", "@Repository\npublic interface LandUriRepository extends CrudRepository<LandUri, Long>{\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ModulosRepository extends JpaRepository<Modulos,Long> {\n \n}", "@Repository\npublic interface DistrictRepository extends JpaRepository<District, Long> {}", "public interface StudentRepository extends JpaRepository<Student,Integer> {\n\n Student findAdminByNum(Long num);\n\n Student findAdminByName(String name);\n\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface RetencaoFonteRepository extends JpaRepository<RetencaoFonte, Long> {\n\n}", "@Repository\npublic interface RimsMmsLogRepository extends CrudRepository<RimsMmsLog, Long> {\n}", "@Repository\npublic interface MemberReadRepository extends JpaRepository<Member, String> {\n\tMember findById(String id);\n}", "public interface MaterialService {\n\n /**\n * 获取物资列表\n * @return 物资列表\n */\n public List<Material> getMyMaterial();\n\n /**\n * 删除物资\n * @param materailID 物资ID\n * @return ResultMsg\n */\n public ResultMsg deleteMaterial(int materailID);\n\n /**\n * 添加物资(跳出新的物资详情的界面进行编辑)\n * @param material 物资\n * @return ResultMsg\n */\n public ResultMsg addMaterail(Material material);\n\n /**\n * 编辑物资详情\n * @param material 物资\n * @return ResultMsg\n */\n public ResultMsg updateMaterail(Material material);\n\n /**\n * 将物资状态设置为可出租\n * @param materialID 物资ID\n * @return ResultMsg\n */\n public ResultMsg rent(int materialID);\n\n /**\n * 将物资状态设置为不可出租\n * @param materialID 物资ID\n * @return ResultMsg\n */\n public ResultMsg disrent(int materialID);\n\n /**\n * 获取所有团体可出租的物资列表\n * @return 可出租的物资列表\n */\n public List<Material> getAllMaterial();\n\n /**\n * 按关键字搜索物资\n * @param keyword 关键字\n * @return 物资列表\n */\n public List<Material> searchMaterial(String keyword);\n\n}", "@Repository\npublic interface AdminRepository extends JpaRepository<Admin, String> {\n}", "@Repository\npublic interface StudentRepository extends JpaRepository<Student,Long> {\n}", "public interface IssueCategoryRepository extends JpaRepository<IssueCategory,Long> {\n}", "@Repository\npublic interface QualityParameterRepository extends JpaRepository<QualityParameter, Integer> {\n\n}", "public interface EmployeeRepository extends JpaRepository<Employee, Integer> {\r\n\r\n}", "public interface MusicRepository extends CrudRepository<Music, Integer> {\n}", "public interface ActionRepository extends JpaRepository<Action, Integer> {\n\n}", "@Repository\npublic interface EmployeeRepository extends JpaRepository<Employee, Integer> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DetalleOrdenRepository extends CrudRepository<DetalleOrden, Long> {\n\n\tList<DetalleOrden> findByIdOrdenIdOrden(Integer idOrden);\n}", "public interface MedCheckDetSearchRepository extends ElasticsearchRepository<MedCheckDet, Long> {\n}", "public interface FormularRepository extends JpaRepository<Formular, Long>\n{\n Formular findById(Long id);\n Formular findByDate(Date dataDonare);\n}", "public interface AppExtraDao extends JpaRepository<AppExtra,Long> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface HelpFullRepository extends JpaRepository<HelpFull, Long> {\n \n}", "public interface FormDataRepository extends CrudRepository<FormData, Integer> {}", "@Repository\npublic interface TipPercentRepository extends CrudRepository<TipPercent, Long>{\n}", "@Repository\npublic interface ArticlePictureRepository extends JpaRepository<ArticlePicture, Long> {\n}", "public interface EmpSubAppraiseRepository extends IRepository<EmpSubAppraise,Long> {\n}", "public interface PostRepository extends CrudRepository<Post, Long> {\n}", "@Repository\npublic interface SuiteRepository extends JpaRepository<SuiteRoom, Integer> {\n}", "@Repository\npublic interface ReasonMissionDeclinedRepository extends CrudRepository<ReasonMissionDeclined, Long>{\n ReasonMissionDeclined findByMissionAndDriver(Mission mission, Driver driver);\n List<ReasonMissionDeclined> findByMission(Mission mission);\n}", "@Repository\npublic interface RespostaRepository extends CrudRepository<Resposta, Long> {}" ]
[ "0.6536988", "0.6487922", "0.60888255", "0.6053221", "0.6052317", "0.60188526", "0.5926171", "0.58688617", "0.58581716", "0.5841058", "0.5837459", "0.58210546", "0.5805219", "0.5801327", "0.579696", "0.5775582", "0.5770676", "0.5769646", "0.5764864", "0.5764808", "0.576012", "0.5754062", "0.57515883", "0.5731528", "0.5729941", "0.57286054", "0.57112586", "0.57095945", "0.5708648", "0.5705219", "0.56984615", "0.569551", "0.56873155", "0.5687087", "0.5683485", "0.5679994", "0.5675404", "0.56739354", "0.56672406", "0.5665505", "0.5661878", "0.5660204", "0.5635703", "0.56341225", "0.56307447", "0.5622474", "0.56212133", "0.561928", "0.56142074", "0.56044817", "0.56003076", "0.5598085", "0.5597969", "0.55938995", "0.55888015", "0.5565607", "0.5558675", "0.5554629", "0.5546849", "0.5539408", "0.55389977", "0.5536674", "0.5532974", "0.5530939", "0.5528528", "0.5527377", "0.55254984", "0.55230343", "0.55228776", "0.55227137", "0.5520044", "0.5516204", "0.5514524", "0.5514188", "0.55134195", "0.5512917", "0.55097747", "0.5507712", "0.550625", "0.55051726", "0.55040586", "0.5503718", "0.54968685", "0.5496658", "0.54961663", "0.5493929", "0.54913723", "0.5487418", "0.54857504", "0.54791045", "0.54742247", "0.5470935", "0.5465534", "0.5465431", "0.5465367", "0.5464637", "0.5464491", "0.54609805", "0.5451769", "0.5451461" ]
0.7284513
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_my_messge, container, false); TextView tv = rootView.findViewById(R.id.textMessage); tv.setText(Message); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Constructor for bounded size scalar array.
public BaseScalarBoundedArray(ScalarType elementType, int size) { super(Type.scalarArray); if (elementType==null) throw new NullPointerException("elementType is null"); if (size<=0) throw new IllegalArgumentException("size <= 0"); this.elementType = elementType; this.size = size; this.id = BaseScalar.idLUT[this.elementType.ordinal()] + "<" + size + ">"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GenericDynamicArray() {this(11);}", "public DynamicArray() {\n this(16);\n }", "public IntArrays()\n\t{\n\t\tthis(10);\n\t}", "public Array(int capacity)\n {\n array = new Object[capacity];\n }", "public ArrayQueue() {\n\t\tthis(Integer.MAX_VALUE);\n\t}", "public MyArray() {\n this.length = 10;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }", "public ArrayContainer() {\n this(DEFAULT_CAPACITY);\n }", "Object createArray(int capacity);", "public MyArray(int size) {\n this.length = size;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }", "public ArrayQueue() {\n this(10);\n }", "public SimpleArray(int size)\n\t{\n\t\tarray = new int[size];\n\t}", "ArrayADT() {\n this.size = 10;\n this.base = createArrayInstance(this.size);\n this.length = 0;\n }", "SAFEARRAY.ByReference SafeArrayCreate(VARTYPE vt, UINT cDims,\n\t\t\tSAFEARRAYBOUND[] rgsabound);", "public Hylle(int size) {\n a = (T[]) new Object[size];\n this.size = size;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrBag( int optionalCapacity )\n {\n theArray = (T[]) new Object[optionalCapacity ];\n count = 0; // i.e. logical size, actual number of elems in the array\n }", "public BoundedQueue(int size){\n queueArray = (T[]) new Object[size];\n tail = 0;\n }", "public CircularArray() {\n\t\tthis(DEFAULT_SIZE);\n\t}", "private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(int)length];\n }", "public CircularArrayQueue() {\n\t\tthis(QUEUESIZE);\t// constructs queue with default queue size\n\t}", "public MyArrayList(int n) throws IllegalArgumentException\n\t{\n\t\t// just to verify that the size is valid\n\t\tif (n<0)\n\t\t\tthrow new IllegalArgumentException();\n\t\tmyArray = new Object[n];\n\t}", "public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }", "public MutableArray(int paramInt, short[] paramArrayOfShort, ORADataFactory paramORADataFactory)\n/* */ {\n/* 144 */ this.sqlType = paramInt;\n/* 145 */ this.factory = paramORADataFactory;\n/* 146 */ this.isNChar = false;\n/* */ \n/* 148 */ setArray(paramArrayOfShort);\n/* */ }", "public Array()\n {\n assert DEFAULT_CAPACITY > 0;\n\n array = new Object[DEFAULT_CAPACITY];\n }", "public ArraySet() {\n\t\tthis(DEFAULT_CAPACITY);\n\t}", "public BaseArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }", "public SparseBooleanArray() {\r\n\t\tthis(10);\r\n\t}", "public FixedSizeArrayStack() {\r\n\t\tthis(CAPACITY);\r\n\t}", "public IntSequence(int capacity) {\n this.myValues = new int[capacity];\n }", "public MutableArray(ARRAY paramARRAY, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 155 */ this.length = -1;\n/* 156 */ this.elements = null;\n/* 157 */ this.datums = null;\n/* 158 */ this.pickled = paramARRAY;\n/* 159 */ this.pickledCorrect = true;\n/* 160 */ this.sqlType = paramInt;\n/* 161 */ this.old_factory = paramCustomDatumFactory;\n/* 162 */ this.isNChar = false;\n/* */ }", "@SuppressWarnings(value = \"unchecked\") // sem isto, dá warning!\n public DelayArray(int size, E init) {\n assert size >= 0;\n\n\tbuffer = (E[])(new Object[size]);\n\n\tfor (int i = 0; i < size; i++){\n\t\tbuffer[i] = init;\n\t}\n\n // Invariante:\n assert size()==size: String.format(\"Delay line size should be %d\", size);\n // Pós-condição:\n assert get(-size()).equals(init) && get(-1).equals(init): \"All samples should have the initial value\";\n }", "public ArrayValue( Object array )\n\t{\n\t\tthis( array, (byte) 0, null, 0 );\n\t}", "public TLongArray() {\n\t}", "public GenericArrayLocationCriterion() {\n this(null, null);\n }", "public ExpandableArray() {\n\n\t}", "private RubyArray(Ruby runtime, RubyClass klass, int length) {\n super(runtime, klass);\n values = new IRubyObject[length];\n }", "Array() {\n\t\tarray = new int[0];\n\t}", "public CircularQueueUsingArray() {\n\t\tarray = new int[size];\n\t}", "public NativeIntegerObjectArrayImpl()\n {\n }", "Array(int[] n) {\n\t\tarray = n;\n\t}", "public MutableArray(short[] paramArrayOfShort, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 224 */ this.sqlType = paramInt;\n/* 225 */ this.old_factory = paramCustomDatumFactory;\n/* 226 */ this.isNChar = false;\n/* */ \n/* 228 */ setArray(paramArrayOfShort);\n/* */ }", "public MutableArray(int paramInt, double[] paramArrayOfDouble, ORADataFactory paramORADataFactory)\n/* */ {\n/* 111 */ this.sqlType = paramInt;\n/* 112 */ this.factory = paramORADataFactory;\n/* 113 */ this.isNChar = false;\n/* */ \n/* 115 */ setArray(paramArrayOfDouble);\n/* */ }", "public HashArray(){\n this(10);\n }", "public GenericDynamicArray(int initialCapacity) {\n if (initialCapacity < 0) throw new IllegalArgumentException(\"Illegal array size: \" + initialCapacity);\n this.capacity = initialCapacity;\n genericArrayList = (T[]) new Object[initialCapacity];\n }", "public ZYArraySet(int initLength){\n if(initLength<0)\n throw new IllegalArgumentException(\"The length cannot be nagative\");\n elements = (ElementType[])new Object[initLength];\n }", "public MyArrayList(int capacity){\n if(capacity >= 0)\n elements = new Object[capacity];\n else\n throw new IllegalArgumentException(\"capacity: \" + capacity);\n }", "private RubyArray(Ruby runtime, IRubyObject[] vals, int begin) {\n super(runtime, runtime.getArray());\n this.values = vals;\n this.begin = begin;\n this.realLength = vals.length - begin;\n this.isShared = true;\n }", "public ArrayRingBuffer(int capacity) {\n first = 0;\n last = 0;\n fillCount = 0;\n this.capacity = capacity;\n rb = (T[]) new Object[this.capacity];\n // Create new array with capacity elements.\n // first, last, and fillCount should all be set to 0.\n // this.capacity should be set appropriately. Note that the local variable\n // here shadows the field we inherit from AbstractBoundedQueue, so\n // you'll need to use this.capacity to set the capacity.\n }", "public MyArray() {\n\t\tcapacity = DEFAULT_CAPACITY;\n\t\tnumElements = 0;\n\t\telements = (E[]) new Object[capacity];\n\t}", "public MyArray(int capacity) {\n\t\tthis.capacity = capacity;\n\t\tnumElements = 0;\n\t\telements = (E[]) new Object[capacity];\n\t}", "public MutableArray(int capacity) {\r\n\t\tif(capacity < 1)\r\n\t\t\tcapacity = 1;\r\n\t\tbackingArray = new Object[capacity];\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public ArrayQueue(int initialSize) {\n if (initialSize < 1) initialSize = INITIAL_SIZE;\n store = (T[]) new Object[initialSize];\n frontIndex = 0;\n count = 0;\n }", "public DoubleBoundedRangeModel()\n {\n this(0.0, 0.0, 0.0, 1.0, 10);\n }", "public BitArray(int size)\n\t{\n\t\tthis.bits = new long[(size - 1) / BITS_IN_LONG + 1];\n\t\tthis.size = size;\n\t}", "public ArrayIndexedCollection() {\n\t\tthis(defaultCapacity);\n\t}", "public StackClass(int ele[],int capacity){\n \tthis(ele); \n \tthis.capacity=capacity;\n\t}", "public MutableArray(int[] paramArrayOfInt, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 202 */ this.sqlType = paramInt;\n/* 203 */ this.old_factory = paramCustomDatumFactory;\n/* 204 */ this.isNChar = false;\n/* */ \n/* 206 */ setArray(paramArrayOfInt);\n/* */ }", "public MyArrayList(int capacity) {\n\t\tarray = new Object[capacity];\n\t}", "@SuppressWarnings(\"unchecked\")\n\tQueue(int size){\n\t\tarr = (T[]) new Object[size];\n\t\tcapacity = size;\n\t\tfront = 0;\n\t\trear = -1;\n\t\tcount = 0;\n\t}", "public ComparableArrayHolder(){\r\n this(DEF_CAP);\r\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayQueue(int capacity) {\n headLock = new ReentrantLock();\n tailLock = new ReentrantLock();\n data = (T[]) new Object[capacity+1];\n head = 0;\n tail = 0;\n }", "public VOIVector(int initialsize) {\r\n super(initialsize);\r\n }", "public MutableArray(int paramInt, int[] paramArrayOfInt, ORADataFactory paramORADataFactory)\n/* */ {\n/* 122 */ this.sqlType = paramInt;\n/* 123 */ this.factory = paramORADataFactory;\n/* 124 */ this.isNChar = false;\n/* */ \n/* 126 */ setArray(paramArrayOfInt);\n/* */ }", "ArrayValue createArrayValue();", "public ArrayStack() {\n this( DEFAULT_CAPACITY );\n }", "public SimpleArrayList(int size) {\n this.values = new Object[size];\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic HeapImp(int size){\n\t\tthis.arr = (T[]) new Comparable[size];\n\t}", "public MutableArray(int paramInt, float[] paramArrayOfFloat, ORADataFactory paramORADataFactory)\n/* */ {\n/* 133 */ this.sqlType = paramInt;\n/* 134 */ this.factory = paramORADataFactory;\n/* 135 */ this.isNChar = false;\n/* */ \n/* 137 */ setArray(paramArrayOfFloat);\n/* */ }", "public MultiArrayDimension() {\n\t\tthis(\"\", 0, 0);\n\t}", "public void initialize(int size);", "public ArrayContainer(int capacity) {\n this.capacity = (capacity > DEFAULT_CAPACITY) ? capacity : DEFAULT_CAPACITY;\n this.container = new Object[this.capacity];\n }", "public BinHeap()\n {\n // allocate heap to hold 100 items\n arr = (T[]) new Comparable[100];\n // set size of heap to 0\n size = 0;\n }", "void init(int size) {\n int numOfElements = size / MAX_BITS;\n if (size % MAX_BITS > 0)\n numOfElements++;\n\n values = new long[numOfElements];\n }", "private RubyArray(Ruby runtime, boolean objectSpace) {\n super(runtime, runtime.getArray(), objectSpace);\n }", "void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }", "public ArrayRingBuffer(int capacity) {\n Buffer_num = capacity;\n rb =(T[]) new Object[Buffer_num];\n fillCount = 0;\n first = 0;\n last = 0;\n }", "public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }", "public void setS0Capacity(double argS0Capacity) {\n s0Capacity = argS0Capacity;\n }", "public ArrayAccessor() {\r\n super(\"<array>\");\r\n }", "public MutableArray(int paramInt, Object[] paramArrayOfObject, ORADataFactory paramORADataFactory)\n/* */ {\n/* 100 */ this.sqlType = paramInt;\n/* 101 */ this.factory = paramORADataFactory;\n/* 102 */ this.isNChar = false;\n/* */ \n/* 104 */ setObjectArray(paramArrayOfObject);\n/* */ }", "public ArrBag()\n {\n count = 0; // i.e. logical size, actual number of elems in the array\n }", "Array createArray();", "public ArrayStack(int initialCapacity) {\n size = 0;\n this.backing = (T[]) new Object[initialCapacity];\n }", "private Range() {\n this.length = 0;\n this.first = 0;\n this.last = -1;\n this.stride = 1;\n this.name = \"EMPTY\";\n }", "OfPrimitiveArray(Object value, int operand) {\n this.value = value;\n this.operand = operand;\n }", "Range() {}", "public ArrayStack (int initialCapacity)\r\n {\r\n top = 0;\r\n stack = (T[]) (new Object[initialCapacity]);\r\n }", "public MyArrayList(int length) {\n data = new Object[length];\n }", "public ArrayStack() {\n this(INITIAL_CAPACITY);\n }", "PriorityQueueUsingArray(int size) {\n\t\tthis.array = new Nodes[size + 1];\n\t}", "public MyVector() {\n\t\tarr = new int[10];\n\t\tend = 0;\n\t}", "public Queue(int s)\n\t{\n\t\tsize = s;\n\t\tqueue = new int[s];\n\t}", "public ArrayIndexedCollection() {\n\t\tthis(DEFAULT_INITIAL_CAPACITY);\n\t}", "public Vector(float[] axis){ this.axis = axis;}", "public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }", "public MutableArray(double[] paramArrayOfDouble, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 191 */ this.sqlType = paramInt;\n/* 192 */ this.old_factory = paramCustomDatumFactory;\n/* 193 */ this.isNChar = false;\n/* */ \n/* 195 */ setArray(paramArrayOfDouble);\n/* */ }", "public BaseMpscLinkedArrayQueue(int initialCapacity)\r\n/* 20: */ {\r\n/* 21:184 */ RangeUtil.checkGreaterThanOrEqual(initialCapacity, 2, \"initialCapacity\");\r\n/* 22: */ \r\n/* 23:186 */ int p2capacity = Pow2.roundToPowerOfTwo(initialCapacity);\r\n/* 24: */ \r\n/* 25:188 */ long mask = p2capacity - 1 << 1;\r\n/* 26: */ \r\n/* 27:190 */ E[] buffer = CircularArrayOffsetCalculator.allocate(p2capacity + 1);\r\n/* 28:191 */ this.producerBuffer = buffer;\r\n/* 29:192 */ this.producerMask = mask;\r\n/* 30:193 */ this.consumerBuffer = buffer;\r\n/* 31:194 */ this.consumerMask = mask;\r\n/* 32:195 */ soProducerLimit(mask);\r\n/* 33: */ }", "public IntegerList(int size)\n {\n list = new int[size];\n }", "@SafeVarargs\n public Array(T... items)\n {\n this.array = items;\n this.next = items.length;\n }", "public IntervalSampler(double freq) {\n this(freq, Integer.MAX_VALUE);\n }", "public MinMaxAI(double[] d) {\n\t\tsuper(d);\n\t}" ]
[ "0.6240503", "0.61472404", "0.61023164", "0.60621583", "0.5969763", "0.5915769", "0.58843416", "0.5856291", "0.5763943", "0.5742988", "0.5741512", "0.573747", "0.5708769", "0.5688646", "0.5619242", "0.56162554", "0.55783474", "0.55397964", "0.5530074", "0.55277014", "0.5507953", "0.54881907", "0.54786646", "0.54777473", "0.54693866", "0.5464186", "0.5447034", "0.5423634", "0.5423345", "0.5420625", "0.5416406", "0.5409695", "0.54061407", "0.5402134", "0.53755677", "0.5359455", "0.5346541", "0.5337031", "0.53333265", "0.53302705", "0.53113693", "0.531088", "0.53088874", "0.5298881", "0.52986324", "0.52947694", "0.52852917", "0.52824426", "0.5271353", "0.5265491", "0.52588785", "0.5249904", "0.52452356", "0.52449334", "0.5244748", "0.5243522", "0.5230585", "0.52246916", "0.5221923", "0.5219644", "0.5205344", "0.5203092", "0.51877356", "0.518598", "0.5185785", "0.5179859", "0.5175775", "0.51711106", "0.5148564", "0.5148492", "0.5144217", "0.5140189", "0.51393807", "0.51393324", "0.5131997", "0.5131761", "0.5123859", "0.5123136", "0.51186645", "0.5113451", "0.51077676", "0.51057726", "0.5100212", "0.50983214", "0.50946", "0.5092782", "0.5086905", "0.50843656", "0.50808764", "0.50653917", "0.5061725", "0.50571907", "0.505716", "0.5052289", "0.503927", "0.5036664", "0.5036507", "0.5035558", "0.50350636", "0.5025126" ]
0.66541386
0
This Interface is used to notify the fragment about the connection of google fit.
public interface GooglefitCallback { /** * when google fir is connected this method is called. */ public void connect(); /** * when google fit is disconnected this method is callled. */ public void disconnect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onConnection();", "public abstract void onConnect();", "void onConnect();", "protected void onConnect() {}", "@Override\n public void gattConnected() {\n mConnected = true;\n updateConnectionState(R.string.connected);\n getActivity().invalidateOptionsMenu();\n }", "@Override\r\n protected void onConnected() {\n \r\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n\n Toast.makeText(getApplicationContext(), \"Connected\", Toast.LENGTH_LONG).show();\n }", "abstract void onConnect();", "protected abstract void onConnect();", "void onConnect( );", "public void onServiceConnected();", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }", "public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }", "public interface OnConnectListener {\n\n /**\n * Called when client connects.\n */\n void onConnect( );\n }", "public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }", "public interface OnAboutListener {\n public void onAbout();\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }", "public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }", "@Override\n public void onSearchInteractionListener() {\n loadFragment(new ConnectionsFragment());\n }", "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "@Override\n public void onConnected(Bundle bundle) {\n Wearable.DataApi.addListener(googleApiClient, this);\n }", "public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n void onNumPlotFragmentInteraction(Uri uri);\n }", "@Override\n public void onConnected(Bundle arg0) {\n\n Toast.makeText(getContext(),\"Connected\",Toast.LENGTH_LONG);\n }", "public void connected() {\n \t\t\tLog.v(TAG, \"connected(): \"+currentId);\n \t\t\tif(mCallback != null){\n \t\t\t\tmCallback.onServiceConnected();\n \t\t\t}\n \t\t\tloadPage(false, null);\n \t\t}", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }", "private void onConnected() {\n \tmMeshHandler.removeCallbacks(connectTimeout);\n hideProgress();\n\n mConnectTime = SystemClock.elapsedRealtime();\n mConnected = true;\n\n mNavListener = new SimpleNavigationListener(stActivity.getFragmentManager(), stActivity);\n if (mDeviceStore.getSetting() == null || mDeviceStore.getSetting().getNetworkKey() == null) {\n Log.d(\"TEST\", \"TEST\");\n }\n startPeriodicColorTransmit();\n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t\n\t}", "public interface OnMessagingServiceConnetcedListenner {\n void onServiceConnected();\n}", "public void OnConnectSuccess();", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "@Override\r\n\t\tpublic void onConnect(Connection connection) {\n\r\n\t\t}", "public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }", "protected void notifyConnection() {\n connectionListeners.forEach(listener-> listener.connectionChange(this, isConnected()));\n }", "protected void onConnectionChanged() {\n mConnectionChangedListener.didChange(mConnection);\n }", "void onConnected() {\n closeFab();\n\n if (pendingConnection != null) {\n // it'd be null for dummy connection\n historian.connect(pendingConnection);\n }\n\n connections.animate().alpha(1);\n ButterKnife.apply(allViews, ENABLED, true);\n startActivity(new Intent(this, ControlsActivity.class));\n }", "void connectionActivity(ConnectionEvent ce);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onUrlFragmentInteraction(String url);\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n //Requires a new thread to avoid blocking the UI\n new SendToDataLayerThread(\"/message_path\", message + \" \" + Calendar.getInstance()).start();\n Log.i(TAG, \"sent, onConnected\" + message);\n Toast.makeText(getApplicationContext(),message,Toast.LENGTH_SHORT).show();\n }", "public void onIceConnected();", "public interface NetworkConnectedCallback {\n void onNetworkConnected();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }", "public interface OnAboutForMeMessageUpdateListener {\r\n void onAboutForMeMessage(String text);\r\n}", "void onIceConnectionChange(boolean connected);", "public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // mHost=(NetworkDialogListener)context;\n }", "public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }", "public void onIBeaconServiceConnect();", "public interface OnNotificationsFragmentInteractionListener {\r\n void onNotificationsFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnConnectivityChangedListener {\n void onConnectivityChanged(NetworkMonitor.State state);\n}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }", "void onConnect(IServerConnection<_ATTACHMENT> connection);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }", "@Override\n\t\t\t\t\tpublic void onNotifyWifiConnected()\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.v(TAG, \"have connected success!\");\n\t\t\t\t\t\tLog.v(TAG, \"###############################\");\n\t\t\t\t\t}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }", "public void notifyChangementTour();", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}", "public interface Listener {\n void onConnected(CallAppAbilityConnection callAppAbilityConnection);\n\n void onDisconnected(CallAppAbilityConnection callAppAbilityConnection);\n\n void onReleased(CallAppAbilityConnection callAppAbilityConnection);\n }", "void onConnectToNetByIPSucces();", "void notifyConnected(MessageSnapshot snapshot);", "public interface ConnectionEventListener {\n /** \n * Called on all listeners when a connection is made or broken. \n */\n void connectionActivity(ConnectionEvent ce);\n}", "public void onConnectionEstablished() {\n\t\tviewPager.setCurrentItem(Tabs.SCARY_CREEPER.index);\n\t}", "public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}", "@Override\n public void onConnected(@Nullable Bundle bundle) {\n Log.d(TAG, \"onConnected\");\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }", "public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri); }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }", "public interface OnFragmentInteractionListener {\n\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }", "public interface OnFragmentInteractionListener {\n\n void onFragmentInteraction(Uri uri);\n }", "public interface ResponseListener {\n void onResponce(GoogleResponse response);\n}", "public interface OnServiceConnectionListener {\n}", "public interface IMyNewFirendView {\n\n public void onMyNewFirendGetFriendApplyListSuccess(List<ContactsFriend> datas);\n public void onMyNewFirendGetFriendApplyListFaile(String msg);\n\n public void onMyNewFirendConfirmApplySuccess(int confirm);\n public void onMyNewFirendConfirmApplyFaile(String msg, int confirm);\n\n}", "public interface GoogleInteractor {\n\n void notifyEmailChange();\n}", "public interface AboutUsNavigator {\n\n void onUpdateApp(String msg, String downloadUrl);\n}", "@Override\n public void onClick(View v) {\n mAndroidServer.listenForConnections(new AndroidServer.ConnectionCallback() {\n @Override\n public void connectionResult(boolean result) {\n if (result == true) {\n Toast.makeText(mActivity, \"SUCCESSFULLY CONNECTED TO A VIEWER\", Toast.LENGTH_LONG);\n }\n }\n });\n\n }", "void onHisNotify();", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }" ]
[ "0.67900246", "0.65705633", "0.6543745", "0.6542278", "0.6501899", "0.6494296", "0.6406355", "0.64043903", "0.63841015", "0.6301431", "0.62992555", "0.6268014", "0.6192264", "0.6185991", "0.61797094", "0.6174832", "0.6158322", "0.614188", "0.6116051", "0.6116051", "0.61106426", "0.6089679", "0.6069921", "0.6050249", "0.60491973", "0.60491073", "0.6048276", "0.6046335", "0.6042128", "0.6038042", "0.60353744", "0.6034233", "0.6028292", "0.60241246", "0.60241246", "0.60124624", "0.5994718", "0.599466", "0.5987244", "0.5983903", "0.597525", "0.5974389", "0.5968994", "0.59588206", "0.5953654", "0.5945224", "0.5940926", "0.5931833", "0.590375", "0.59008265", "0.58956844", "0.5894777", "0.58885", "0.58787847", "0.58787847", "0.58787847", "0.58687174", "0.58683646", "0.586672", "0.5866541", "0.58656085", "0.58595", "0.58481646", "0.58423936", "0.5841656", "0.5840064", "0.5840064", "0.5840064", "0.5840064", "0.5840064", "0.58396566", "0.5836901", "0.5834464", "0.5830079", "0.5821858", "0.58218044", "0.5821464", "0.5821269", "0.5820091", "0.5814769", "0.58072793", "0.58051014", "0.5804341", "0.5803373", "0.5803373", "0.5800996", "0.5799877", "0.5798783", "0.5795562", "0.57932204", "0.5787131", "0.57849824", "0.57827544", "0.57824755", "0.5777183", "0.57736856", "0.57736856", "0.57736856", "0.57736856", "0.57736856" ]
0.6969935
0
when google fir is connected this method is called.
public void connect();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected void onConnected() {\n \r\n }", "private void requestConnection() {\n getGoogleApiClient().connect();\n }", "protected void onConnect() {}", "@Override\n public void onConnected(Bundle bundle) {\n Wearable.DataApi.addListener(googleApiClient, this);\n }", "@Override\n public void onStart() {\n super.onStart();\n googleApiClient.connect();\n }", "@Override\n public void onStart() {\n mGoogleApiClient.connect();\n super.onStart();\n }", "@Override\n public void gattConnected() {\n mConnected = true;\n updateConnectionState(R.string.connected);\n getActivity().invalidateOptionsMenu();\n }", "public void connected() {\n \t\t\tLog.v(TAG, \"connected(): \"+currentId);\n \t\t\tif(mCallback != null){\n \t\t\t\tmCallback.onServiceConnected();\n \t\t\t}\n \t\t\tloadPage(false, null);\n \t\t}", "@Override\n public void onConnected(@Nullable Bundle bundle) {\n readPreviousStoredDataAPI();\n Wearable.DataApi.addListener(mGoogleApiClient, this);\n }", "void onConnected() {\n closeFab();\n\n if (pendingConnection != null) {\n // it'd be null for dummy connection\n historian.connect(pendingConnection);\n }\n\n connections.animate().alpha(1);\n ButterKnife.apply(allViews, ENABLED, true);\n startActivity(new Intent(this, ControlsActivity.class));\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.i(TAG, \"In onStart() - connecting...\");\n googleApiClient.connect();\n }", "@Override\r\n protected void onStart() {\n super.onStart();\r\n mGoogleApiClient.connect();\r\n }", "@Override protected void onResume() {\n super.onResume();\n locationClient.connect();\n }", "public interface GooglefitCallback {\n\n /**\n * when google fir is connected this method is called.\n */\n public void connect();\n\n /**\n * when google fit is disconnected this method is callled.\n */\n public void disconnect();\n}", "void onConnect();", "@Override\n protected void onStart() {\n super.onStart();\n if (!mGoogleApiClient.isConnected()) {\n mGoogleApiClient.connect();\n }\n }", "void onConnect( );", "@Override\n public void onStart() {\n super.onStart();\n try {\n if (mGoogleApiClient != null) {\n mGoogleApiClient.connect();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n //LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, REQUEST, this); // LocationListener\n }", "@Override\n public void onConnected(Bundle bundle) {\n Log.i(TAG, \"location service connected\");\n }", "@Override\n public void onDisconnected() {\n }", "public abstract void onConnect();", "@Override\n public void onConnected(Bundle arg0) {\n displayLocation();\n }", "protected abstract void onConnect();", "@Override public void onDisconnected() {\n }", "public void onConnection();", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}", "@Override\n\t\tpublic void onDeviceConnected() {\n\t\t\tDFUManager.log(TAG, \"onDeviceConnected()\");\n\t\t\tisDeviceConnected = true;\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n public void onDisconnected() {\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n }", "@Override\n\t\t\t\t\tpublic void onNotifyWifiConnected()\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.v(TAG, \"have connected success!\");\n\t\t\t\t\t\tLog.v(TAG, \"###############################\");\n\t\t\t\t\t}", "@Override\n public void onConnected(Bundle connectionHint) {\n\n Toast.makeText(getApplicationContext(), \"Connected\", Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void onDisconnected() {\n\n\t}", "protected void connect(){\n MediaBrowserCompat mediaBrowser = mediaBrowserProvider.getMediaBrowser();\n if (mediaBrowser.isConnected()) {\n onConnected();\n }\n }", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "public void onIceConnected();", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t\n\t}", "private void onConnected() {\n \tmMeshHandler.removeCallbacks(connectTimeout);\n hideProgress();\n\n mConnectTime = SystemClock.elapsedRealtime();\n mConnected = true;\n\n mNavListener = new SimpleNavigationListener(stActivity.getFragmentManager(), stActivity);\n if (mDeviceStore.getSetting() == null || mDeviceStore.getSetting().getNetworkKey() == null) {\n Log.d(\"TEST\", \"TEST\");\n }\n startPeriodicColorTransmit();\n }", "@Override\n public void onConnected(Bundle bundle) {\n\n if (mCurrentLocation == null) {\n mCurrentLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());\n updateUI();\n }\n\n if (mRequestingLocationUpdates) {\n startLocationUpdates();\n }\n\n if (addGeofence) {\n addGeofencesButtonHandler();\n }\n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n\n\n GoogleApiAvailability GMS_Availability = GoogleApiAvailability.getInstance();\n int GMS_CheckResult = GMS_Availability.isGooglePlayServicesAvailable(this);\n\n if (GMS_CheckResult != ConnectionResult.SUCCESS) {\n\n // Would show a dialog to suggest user download GMS through Google Play\n GMS_Availability.getErrorDialog(this, GMS_CheckResult, 1).show();\n }else{\n mGoogleApiClient.connect();\n }\n }", "public void connecting() {\n\n }", "public void connectApiClient()\n {\n googleApiClient.connect();\n }", "@Override\n\tpublic void onConnected(Bundle bundle) {\n\t\tmConnectionStatus.setText(R.string.connected);\n\n\n\t\tstartPeriodicUpdates();\n\t\tgetAddress();\n\t\tLocation currentLoc = mLocationClient.getLastLocation();\n\t\tLatLng locationNew = new LatLng(currentLoc.getLatitude(),currentLoc.getLongitude());\n\t\tCameraUpdate cameraup=CameraUpdateFactory.newLatLngZoom(locationNew,15);\n\t\tLocationUtils.mMap.animateCamera(cameraup);\n\n\t}", "@Override\n public void onConnect() {\n connected.complete(null);\n }", "@Override\n public void onCreate() {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n\n /*conectar al servicio*/\n Log.w(TAG, \"onCreate: Conectando el google client\");\n googleApiClient.connect();\n\n\n //NOTIFICACION\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n stateService = Constants.STATE_SERVICE.NOT_CONNECTED;\n\n }", "@Override\n\tpublic void onConnected(Bundle arg0) {\n\t\t Toast.makeText(context, \"Connected\", Toast.LENGTH_SHORT).show();\n\t\t mLocationClient.requestLocationUpdates(mLocationRequest,this);\n\t}", "abstract void onConnect();", "void onIceConnectionChange(boolean connected);", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(\"Feelknit\", \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnected(Bundle arg0) {\n\n Toast.makeText(getContext(),\"Connected\",Toast.LENGTH_LONG);\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n Log.i(TAG, \"Connected to GoogleApiClient\");\n\n if (mCurrentLocation == null) {\n mCurrentLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());\n updateUI();\n }\n\n if (mRequestingLocationUpdates) {\n startLocationUpdates();\n }\n }", "@Override\n\tpublic void onDisconnected() {\n\t\t// Display the connection status\n\t\tToast.makeText(this, \"Disconnected. Please re-connect.\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest,\n this);\n }", "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 }", "@Override\n public void onConnected(Bundle arg0) {\n setupMap();\n\n\n }", "public void onServiceConnected();", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\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 }", "@Override\n public void onConnected(Bundle connectionHint) {\n // Gets the best and most recent location currently available, which may be null\n // in rare cases when a location is not available.\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (mLastLocation != null) {\n if (!Geocoder.isPresent()) {\n Toast.makeText(rootView.getContext(), R.string.no_geocoder_available, Toast.LENGTH_LONG).show();\n return;\n }\n startIntentService();\n }\n }", "protected void onDisconnect() {}", "@Override\n public void onConnectionSuspended(int cause) {\n Log.e(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onClick(View arg0) {\n Log.i(\"\", \"google button is clicked\");\n if (cd.isConnectingToInternet()) {\n\n mGoogleApiClient.connect();\n signInWithGplus();\n } else {\n String connection_alert = getResources().getString(\n R.string.alert_no_internet);\n Constant.showAlertDialog(mContext, connection_alert, false);\n }\n }", "public void onDisconnected() {\n\n }", "public void onDisconnected() {\n\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tgotoConnectActivity();\n\t\t\t}", "private void connectGoogleApiAgain(){\n if (!mGoogleApiClient.isConnected()) {\n ConnectionResult connectionResult =\n mGoogleApiClient.blockingConnect(30, TimeUnit.SECONDS);\n\n if (!connectionResult.isSuccess()) {\n Log.e(TAG, \"DataLayerListenerService failed to connect to GoogleApiClient, \"\n + \"error code: \" + connectionResult.getErrorCode());\n }\n }\n }", "public void OnConnectSuccess();", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(getBaseContext(), R.string.google_api_client_connection_failed, Toast.LENGTH_LONG).show();\n googleApiClient.connect();\n }", "@Override\n protected void onStop() {\n if (null != googleClient && googleClient.isConnected()) {\n googleClient.disconnect();\n }\n super.onStop();\n }", "@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}", "@Override\n public void onConnected(@Nullable Bundle bundle) {\n Log.d(TAG, \"onConnected\");\n }", "void onDisconnect();", "void onDisconnect();", "public void onDisconnected() {\r\n // Display the connection status\r\n Toast.makeText(this, \"Disconnected. Please re-connect.\",\r\n Toast.LENGTH_SHORT).show();\r\n }", "void onConnectedAsServer(String deviceName);", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(DEBUG_TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "public void ondeviceConnected() {\n if(isAdded() && !isDetached()) {\n if (RELOAD_CARD_NUMBERS[0] == 1) {\n new DailyVerseFetcher(getActivity()).execute(true);\n }\n if (RELOAD_CARD_NUMBERS[1] == 1) {\n new HomeSermonFetcher(getActivity()).execute(true);\n }\n }\n }", "void onOpen();", "void onConnectDeviceComplete();", "@Override\r\n\tpublic void onOpened() {\n\r\n\t}", "public void onServiceConnected() {\r\n \t// Display the list of sessions\r\n\t\tupdateList();\r\n }", "public void onDisconnected() {\n\t\t\r\n\t}", "void firePeerConnected(ConnectionKey connectionKey);", "@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}", "@Override\n public void doWhenNetworkCame() {\n doLogin();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n\tprotected void onConnect() {\n\t\tLogUtil.debug(\"server connect\");\n\n\t}", "public void onConnected(Bundle dataBundle) {\r\n // Display the connection status\r\n Toast.makeText(this, \"Connected\", Toast.LENGTH_SHORT).show();\r\n Location location = mLocationClient.getLastLocation();\r\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\r\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 17);\r\n map.animateCamera(cameraUpdate);\r\n }", "@Override\n public void onConnected(@Nullable Bundle bundle) {\n Log.i(TAG, \"Location Services Connected\");\n requestLocationUpdates();\n }", "void connected();", "@Override public void onConnected() {\n new LostApiClientImpl(application, new TestConnectionCallbacks(),\n new LostClientManager(clock, handlerFactory)).connect();\n }", "private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }", "protected void onMediaControllerConnected() {\n }" ]
[ "0.6874185", "0.6787685", "0.6765211", "0.67629987", "0.6685005", "0.6684898", "0.6675886", "0.65558773", "0.65068674", "0.6504071", "0.6495644", "0.64528894", "0.64466614", "0.6414994", "0.63884985", "0.63111156", "0.63007414", "0.62939143", "0.62811667", "0.6253023", "0.6250897", "0.62505597", "0.6243556", "0.6217838", "0.62125325", "0.6193294", "0.61861753", "0.61861753", "0.61814094", "0.61774826", "0.6175712", "0.6171169", "0.61454487", "0.6144195", "0.6129142", "0.6127591", "0.611575", "0.611575", "0.611575", "0.6113908", "0.6106387", "0.61034805", "0.6095465", "0.6093294", "0.6093294", "0.60915905", "0.60885984", "0.6084532", "0.6082661", "0.6080152", "0.60640675", "0.6056176", "0.6048684", "0.6043444", "0.6042829", "0.6034706", "0.60142606", "0.60121864", "0.59954727", "0.5988299", "0.59697896", "0.59675145", "0.59659326", "0.59611046", "0.59611046", "0.59581226", "0.5956791", "0.59567654", "0.59526", "0.594181", "0.5935804", "0.5935804", "0.59283286", "0.59234214", "0.5915419", "0.590991", "0.59039533", "0.5902786", "0.58797956", "0.5865042", "0.5865042", "0.58554196", "0.5851074", "0.582999", "0.58269525", "0.5818256", "0.58096856", "0.58090025", "0.5802795", "0.57992804", "0.57921296", "0.5785621", "0.5784865", "0.57714957", "0.5770361", "0.5765682", "0.5754152", "0.575234", "0.57519656", "0.57295907", "0.5723354" ]
0.0
-1
when google fit is disconnected this method is callled.
public void disconnect();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void disconnected() {\n\t\t\tsuper.disconnected();\n\t\t}", "public void onDisconnected() {\n\t\t\r\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\t\t\n\t}", "@Override\n\tpublic void onDisconnected() {\n\n\t}", "@Override\n public void onDisconnected() {\n }", "@Override public void onDisconnected() {\n }", "@Override\n public void onDisconnected() {\n }", "void disconnect() {\n connector.disconnect();\n // Unregister from activity lifecycle tracking\n application.unregisterActivityLifecycleCallbacks(activityLifecycleTracker);\n getEcologyLooper().quit();\n }", "public void disconnect() {\r\n\t\tsuper.disconnect();\r\n\t}", "protected void onDisconnect() {}", "public void onDisconnected() {\n\n }", "public void onDisconnected() {\n\n }", "@Override\n\t\t\tpublic void disconnected() {\n\t\t\t\ttoast(\"IOIO disconnected\");\n\t\t\t}", "void onDisconnected();", "@Override\n protected void onStop() {\n if (null != googleClient && googleClient.isConnected()) {\n googleClient.disconnect();\n }\n super.onStop();\n }", "@Override\n\tprotected void onDestroy() {\n\t\n\t\t\tLog.d(\"collectData\", \"onDestroy\");\n\t\t\t((MyApp)getApplicationContext()).stopTryToConnect();\n\t\t\t\n\t\t\n\t\t\n\t\tsuper.onDestroy();\n\t}", "public void onServiceDisconnected(ComponentName className) {\n\t mBoundAutopilotService = null;\n\t //mCallbackText.setText(\"Disconnected.\");\n\t }", "@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "protected void onDisconnected(long hconv)\n {\n }", "@Override\n public void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }", "public void disconnect() {\n\t\tdisconnect(true);\n\t}", "protected void afterDisconnect() {\n // Empty implementation.\n }", "public void onServiceDisconnected(ComponentName className) {\n \timService = null;\r\n \r\n }", "@Override\n\tpublic void disconnect() {\n\n\t}", "@Override\n\tpublic void disconnect() {\n\n\t}", "@Override\n protected void onStop() {\n super.onStop();\n if (googleApiClient != null) {\n Log.i(TAG, \"In onStop() - disConnecting...\");\n googleApiClient.disconnect();\n }\n }", "@Override\n protected final void onDisconnected() {\n mPilotingItf.cancelSettingsRollbacks()\n .resetLocation()\n .updateCurrentTarget(ReturnHomePilotingItf.Target.TAKE_OFF_POSITION)\n .updateGpsFixedOnTakeOff(false);\n if (!isPersisted()) {\n mPilotingItf.unpublish();\n }\n super.onDisconnected();\n }", "public void disconnect() {\n\t\tdisconnect(null);\n\t}", "@Override\n public void disconnect() {\n\n }", "public void disconnect() {\n\t\t\n\t}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "public void disconnectSensor() {\n try {\n resultConnection.releaseAccess();\n } catch (NullPointerException ignored) {\n }\n }", "public void onServiceDisconnected(ComponentName className) {\n mBoundService = null;\n Log.i(TAG,\"Service DISconnected\");\n }", "public void disconnect() {\n if (this.mIsConnected) {\n disconnectCallAppAbility();\n this.mRemote = null;\n this.mIsConnected = false;\n return;\n }\n HiLog.error(LOG_LABEL, \"Already disconnected, ignoring request.\", new Object[0]);\n }", "@Override\n\t\t\t\t\tpublic void onDisconnected(Robot arg0) {\n\t\t\t\t\t\tmRobot = null;\n\t\t\t\t\t}", "@Override\n public void gattDisconnected() {\n mConnected = false;\n updateConnectionState(R.string.disconnected);\n mDataField.setText(R.string.no_data);\n getActivity().invalidateOptionsMenu();\n sCapSwitch.setChecked(false);\n sCapSwitch.setEnabled(false);\n }", "@Override\r\n protected void onStop() {\n super.onStop();\r\n if (mGoogleApiClient.isConnected()) {\r\n mGoogleApiClient.disconnect();\r\n }\r\n }", "public void onServiceDisconnected(ComponentName className) {\n mService = null;\n mBound = false;\n }", "public void onServiceDisconnected(ComponentName className) {\n mService = null;\n mBound = false;\n }", "@Override\n public void Disconnect() {\n bReConnect = true;\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n Toast.makeText(this, R.string.service_destoryed, Toast.LENGTH_LONG).show();\n\n // Disconnect Google Api to stop updating.\n mGoogleApiClient.disconnect();\n }", "public void onServiceDisconnected(ComponentName className) {\n\t\t\tmBoundService = null;\r\n\t\t\t// Toast.makeText(MainActivity.this, \"Service disconnected.\", Toast.LENGTH_SHORT).show();\r\n\t\t}", "@Override\n protected void onStop() {\n if (mGoogleApiClient.isConnected()) {\n mGoogleApiClient.disconnect();\n }\n\n super.onStop();\n }", "public void onServiceDisconnected(ComponentName className) {\n\t\t\t\tservice = null;\n\t\t\t\tLog.d(\"OpenXC binding\", \"openXC service disconnected\");\n\t\t\t}", "@Override\n\t\t\tpublic void onNetworkDisconnected() {\n\t\t\t\t\n\t\t\t}", "public void shutdown() {\n locationManager.removeUpdates(this);\n Log.i(TAG, \"GPS provider closed.\");\n }", "@Override\n public void onStop() {\n if(null!=mGoogleApiClient)\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "public void onServiceDisconnected(ComponentName className) {\n Log.e(\"Activity\", \"Service has unexpectedly disconnected\");\n wsService = null;\n }", "@Override\n public void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n //realm.close();\n }", "@Override\n\t\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t\t\t\n\t\t\t}", "public void onServiceDisconnected(ComponentName className) {\n \tmServiceMessenger = null;\r\n setIsBound(false);\r\n }", "public void shutdown(){\n\t\tAndroidSensorDataManagerSingleton.cleanup();\n\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n\n mBound = false;\n }", "protected void disconnected() {\n\t\tthis.model.setClient(null);\n\t}", "private void onLost() {\n // TODO: broadcast\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n \n }", "@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }", "@Override\n public void onDisconnected(CameraDevice camera) {\n Log.e(TAG, \"onDisconnected\");\n }", "public void disconnect()\n {\n isConnected = false;\n }", "public void disconnect(){ \r\n if (matlabEng!=null){ \r\n matlabEng.engEvalString (id,\"bdclose ('all')\");\r\n matlabEng.engClose(id);\r\n matlabEng=null;\r\n id=-1; \r\n }\r\n }", "abstract protected void onDisconnection();", "public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }", "void onDisconnect();", "void onDisconnect();", "protected void onServiceDisconnectedExtended(ComponentName className) {\n mAllowedToBind = false;\n\n }", "@Override\n protected void onCancelled(GamePlaySession gamePlaySession) {\n gameAsyncBlastObserver.updateGamePlaySession(null);\n }", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t\t\n\t\t}", "@Override\r\n\t\t\tpublic void onServiceDisconnected(ComponentName name)\r\n\t\t\t{\n\t\t\t\tSystem.out.println(\"disconnect\");\r\n\t\t\t}", "@Override\n public void onEmulatorDisconnected() {\n // Stop sensor event callbacks.\n stopSensors();\n }", "public void onServiceDisconnected(ComponentName className) {\n\t\t\tLog.i(LOG_TAG, \"onService connected......method\");\n\t\t\tmBoundService = null;\n\t\t\t// Toast.makeText(ChatActivity.this, \"Disconnected to service\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t}", "void onConnectionLost();", "@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}", "public void onServiceDisconnected(ComponentName className) {\n\t\t Log.e(MainActivity.ACTIVITY_TAG, \"Service has unexpectedly disconnected\");\n\t\t mIRemoteService = null;\n\t\t // 注意只有在极端的服务端crash的情况下,该函数才会被调用\n\t \t Log.v(MainActivity.ACTIVITY_TAG,\"kevin ---> client:ServiceDisconnect\"); \n\t }", "@Override\n public void disconnect() {\n getMvpView().showLoading();\n getDataManager().setSetupStatus(false);\n getDataManager().setIpAddress(\"\");\n getMvpView().setIpDetails(\"\", \"Disconnected\");\n\n new Handler().postDelayed(() -> {\n getMvpView().hideLoading();\n getMvpView().toSetupActivity();\n }, 1000);\n }", "protected void onDestroy(){\n\t\tsuper.onDestroy();\n\t\tJSONObject msg = new JSONObject();\n\t\t\ttry {\n\t\t\t\tmsg.put(\"type\", \"DISCONNECT_REQUEST\");\n\t\t\t\tmsg.put(\"source\", name);\n\t\t\t\tnew Write(msg).execute(\"\");\n\t\t\t\t\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public void disconnect() {\n try {\n theCoorInt.unregisterForCallback(this);\n theCoorInt = null;\n }\n catch (Exception e) {\n simManagerLogger.logp(Level.SEVERE, \"SimulationManagerModel\", \n \"closeSimManager\", \"Exception in unregistering Simulation\" +\n \"Manager from the CAD Simulator.\", e);\n }\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n public void connectionLost() {\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n\n }", "public void disconnect() {}", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t}", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "public void onServiceDisconnected(ComponentName className) {\n \t\t\tmService = null;\n \t\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n serviceBound = false; // Indicates that the service is no longer bound.\n }", "@Override\r\n public void onServiceDisconnected(ComponentName className) {\r\n isObdServiceBound = false;\r\n }", "public void disconnect()\n\t{\n\t\toriginal = null;\n\t\tsource = null;\n\t\tl10n = null;\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tmOtgReadClient.disconnectOtg();\r\n\t}", "@Override\r\n\t\t\tpublic void onClosed() {\n\t\t\t\t\r\n\t\t\t}", "public void disconnect() {\r\n\t\trunning = false;\r\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n if (googleApiClient != null) {\n googleApiClient.stopAutoManage(this);\n googleApiClient.disconnect();\n }\n }", "@Override\n public boolean disconnectFromSensor() {\n return false;\n }", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\n\t\t}" ]
[ "0.71668565", "0.711412", "0.70762366", "0.70762366", "0.70762366", "0.7072898", "0.7021448", "0.70086104", "0.69764996", "0.6692002", "0.66813844", "0.66735125", "0.66589475", "0.66589475", "0.6644223", "0.6594948", "0.65940726", "0.65918386", "0.65910894", "0.65138626", "0.65138626", "0.651174", "0.64950275", "0.64757913", "0.6466285", "0.6450476", "0.6425024", "0.6423593", "0.6423593", "0.64152396", "0.6400487", "0.6396847", "0.6395604", "0.63775843", "0.6355076", "0.6355076", "0.6353652", "0.6335629", "0.6335024", "0.63234335", "0.63185835", "0.63132334", "0.63113564", "0.63113564", "0.63103086", "0.6303693", "0.62998307", "0.62892205", "0.627419", "0.6273494", "0.6267293", "0.62665135", "0.6263207", "0.62619185", "0.62553585", "0.62529796", "0.6238549", "0.62361246", "0.6233578", "0.62305915", "0.62274224", "0.6227337", "0.62211514", "0.6216612", "0.6213737", "0.62105423", "0.6198128", "0.61979824", "0.61979824", "0.6192444", "0.6177482", "0.61662245", "0.61662245", "0.61653507", "0.6161292", "0.61578053", "0.6155644", "0.61552167", "0.61525834", "0.61503255", "0.61381745", "0.61363816", "0.61322993", "0.61322993", "0.61321676", "0.61239165", "0.61212265", "0.6103891", "0.6103891", "0.6085368", "0.6085368", "0.60827255", "0.60821754", "0.6079737", "0.60750437", "0.6072216", "0.60698134", "0.6061774", "0.60546017", "0.6053615", "0.60454637" ]
0.0
-1
Test if the list is logically empty.
public boolean isEmpty() { return header.next == null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public static boolean empty() {\n\n if (list.size() != 0){\n return false;\n }\n return true;\n }", "public boolean empty() {\n if (list.size() == 0) {\n return true;\n }\n else {\n return false;\n }\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "public boolean empty() {\n return list.isEmpty();\n }", "public boolean isEmpty()\n\t{\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public /*@ pure @*/ boolean isEmpty() {\n return the_list == null;\n }", "public boolean isEmpty() {\n return list.isEmpty();\n }", "public boolean isEmpty(){\n\t\tif(list.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isListRemainingEmpty();", "public synchronized boolean isEmpty () {\n return list.isEmpty();\n }", "public synchronized boolean isEmpty(){\n return list.isEmpty();\n }", "public boolean isEmpty(){\n return this.listSize == 0;\n }", "public boolean isEmpty() {\r\n\t\treturn al.listSize == 0;\r\n\t}", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "@Override\n\tpublic boolean isEmpty()\n\t{\n if (list.isEmpty())\n {\n return true;\n } \n else\n {\n return false;\n }\n\t}", "public boolean empty()\n {\n boolean result = (dataList.size() == 0) ? true : false;\n return result;\n }", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "boolean isEmpty(int list) {\n\t\treturn m_lists.getField(list, 0) == -1;\n\t}", "public void testIsEmpty() {\r\n assertTrue( list.isEmpty());\r\n list.add(\"A\");\r\n assertFalse(list.isEmpty());\r\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn data != null && data.list != null && data.list.isEmpty();\r\n\t}", "public boolean isEmpty() // true if list is empty\r\n\t{\r\n\t\treturn (first == null);\r\n\t}", "public boolean isEmpty() {\n return dataList.size() <= 0 || (dataList.size() == 1 && dataList.get(0).isEmpty());\n }", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }", "boolean isEmpty() {\n return this.myArrayList.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn allItems.size() == 0;\n\t}", "public boolean empty() {\r\n\r\n\t\tif(item_count>0)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public boolean empty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\r\n return NumItems == 0;\r\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn numItems == 0 ;\r\n\t}", "public boolean empty() {\n return size <= 0;\n }", "public boolean isEmpty() {\n\t\treturn (_items.size() == 0);\n\t}", "public boolean empty() {\n return size == 0;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn firstNode == null; // return true if List is empty\n\t}", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty(){\n\t\treturn firstNode == null; //return true if List is empty\n\t}", "public boolean isEmpty() {\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tStudent emptyChecker;\r\n\t\tint size = sizeOfList(list);\r\n\t\twhile (i < size) {\r\n\t\t\temptyChecker = list[i];\r\n\t\t\tif (emptyChecker != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tnumStudents = 0;\r\n\t return true;\r\n\t}", "public boolean isEmpty() {\n\n\t\tif (numItems == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t}", "public boolean isEmpty(){\n for(int i = 0; i < arrayList.length; i++) {\n if (arrayList[i] != null)\n return false;\n }\n return true;\n }", "public boolean isEmpty(){\n return(numItems == 0);\n }", "public boolean isEmpty()\n {\n //this method is used to check length\n //replacing head == null so I don't have to maintain a head\n //also error checks for null lists\n return (entryList == null || (entryList.size() == 0));\n //just doing .size() == 0 will raise a null pointer exception on occasion\n }", "public boolean isEmpty()\r\n {\r\n if (count > 0) return false;\r\n else return true;\r\n }", "public boolean isEmpty()\n {\n return elements.isEmpty();\n }", "private boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public static boolean isEmpty(List list){\n\n if(list == null){\n return true;\n }\n if(list.size() == 0){\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n return elements.isEmpty();\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty()\n {\n return ll.getSize()==0? true: false;\n }", "public boolean isEmpty() {\n \tif (numItems==0) {\n \t\treturn true;\n \t}\n \treturn false;\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn (count == 0);\r\n\t}", "public boolean isEmpty()\r\n {\r\n return (size() == 0);\r\n }", "public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean isEmpty(){\n return itemCount == 0;\n }", "@Override\n public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean isEmpty() {\r\n return items.isEmpty();\r\n }", "private boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n\t\treturn elements == 0;\n\t}", "public boolean isEmpty() {\n return elements == 0;\n }", "boolean isEmpty() {\n\t\treturn m_list_nodes.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}", "public static boolean isEmpty() \r\n\t{\r\n\t\treturn m_count == 0;\r\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty(){\n return (numItems==0);\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn count == 0;\r\n\t}", "public boolean isEmpty() {\r\n \r\n return size == 0;\r\n }", "public boolean isEmpty() {\n return (this.size == 0);\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn(size() == 0);\n\t}", "public boolean isEmpty() { return count == 0; }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\n return items.isEmpty();\n }", "public boolean isEmpty() {\n return items.isEmpty();\n }", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean isEmpty() {\n\t\treturn elements.isEmpty();\n\t}", "public boolean isEmpty()\n {\n return size == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\r\n return size == 0; \r\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n\t\tif (l.getHead() == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public boolean isEmpty() {\n return this.count() == 0;\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }" ]
[ "0.85714245", "0.85023427", "0.83950883", "0.8366544", "0.8366544", "0.8343574", "0.83216643", "0.83084595", "0.8279152", "0.8261107", "0.8257073", "0.82374734", "0.8214442", "0.8177673", "0.816518", "0.8161321", "0.8130502", "0.8103628", "0.80914176", "0.7968573", "0.7904299", "0.7881211", "0.7874598", "0.7855378", "0.782197", "0.7795295", "0.7789223", "0.7786163", "0.77778226", "0.7775553", "0.7769888", "0.7760835", "0.7747935", "0.77462655", "0.77442324", "0.7743872", "0.77368945", "0.7734928", "0.77299327", "0.7717153", "0.7717153", "0.7717153", "0.7703982", "0.77010363", "0.76946104", "0.76909673", "0.7690691", "0.7685025", "0.76846164", "0.7671059", "0.76707155", "0.7669918", "0.7667862", "0.76542264", "0.76460135", "0.76436955", "0.76417196", "0.7641538", "0.7638251", "0.76337355", "0.7633729", "0.7632973", "0.76240665", "0.7621345", "0.7619416", "0.7616979", "0.76157016", "0.76146287", "0.76136994", "0.76123905", "0.7609353", "0.7608889", "0.7607313", "0.7607313", "0.76067543", "0.7606172", "0.7606172", "0.7605005", "0.7602769", "0.76011807", "0.7597301", "0.75965", "0.7594387", "0.75904435", "0.75903344", "0.75901675", "0.75901675", "0.7589523", "0.7589471", "0.758665", "0.758521", "0.75844157", "0.75827485", "0.758222", "0.758222", "0.758222", "0.758222", "0.758222", "0.75810254", "0.7580242", "0.7580028" ]
0.0
-1
Make the list logically empty.
public void makeEmpty() { header.next = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}", "public void makeEmpty() {\n // remove Squares until empty\n while (!exploreList.isEmpty()) {\n exploreList.getNext();\n }\n }", "public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }", "public void makeEmpty() {\n for (int i = 0; i < buckets.length; i++) {\n buckets[i] = new SList();\n }\n size = 0;\n }", "@Override\n public void makeEmpty() {\n this.head = null;\n this.tail = null;\n }", "public void EmptyList(){\n BusStopSearcherPresenter.setListview(initList(emptylist));\n }", "public void makeEmpty( )\n {\n doClear( );\n }", "public void emptyList() {\n coursesTaken = new ArrayList<CourseTaken>();\r\n }", "public void makeEmpty(){\n front = null;\n numItems =0;\n }", "public void makeEmpty();", "public void makeEmpty();", "public void clearListNotIndex(){\n for(int z=0; z<list.length; z++){\n list [z] = 0;\n }\n }", "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 void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "public void empty() {\n _items.clear();\n }", "public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }", "public boolean empty() {\n if (list.size() == 0) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean empty() {\n return list.isEmpty();\n }", "public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }", "public void clear() {\n list = new Object[MIN_CAPACITY];\n n = 0;\n }", "public void clear() {\n lists = new TernarySearchTree<>();\n }", "public void makeEmpty() {\r\n\t\theader.next = null;\r\n\t\tlast = null;\r\n\t}", "public void clear() {\n size = 0;\n Arrays.fill(items, null);\n }", "List() {\n this.length = 0;\n }", "public void reset() {\n this.list.clear();\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 abstract void makeEmpty();", "public void clearList() {\n\t\thead = null;\n\t\tlength = 0;\n\t}", "public void makeEmpty( )\n {\n header.next = null;\n }", "public void empty() {\n int StartSize = stockList.size();\r\n // While array is not empty.\r\n while (stockList.size() > 0) {\r\n // For every item in the \"stockList\" array.\r\n for (int i = 0; i < StartSize; i++) {\r\n // Remove the beanBag object at the current position in the \"stockList\".\r\n stockList.remove(i);\r\n // Set the global int \"nextReservationNumber\" to 0.\r\n nextReservationNum = 0;\r\n }\r\n }\r\n }", "@Test\r\n\tpublic void testIsEmpty() {\r\n\t\tAssert.assertFalse(list.isEmpty());\r\n\t\tlist.clear();\r\n\t\tAssert.assertTrue(list.isEmpty());\r\n\t}", "private void updateEmptyLists() {\n \n for(int i = 0; i < this.allLists.size(); i++) {\n if(this.allLists.get(i).size() == 0) {\n for(int c = 0; c < this.dataTable.getRowCount(); c++) {\n this.allLists.get(i).add(\"\");\n }\n }\n }\n }", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public void clearList() {\n\t\tthis.head = null;\n\t\tthis.tail = null;\n\t\tlength = 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "@Override\n\tpublic boolean isEmpty()\n\t{\n if (list.isEmpty())\n {\n return true;\n } \n else\n {\n return false;\n }\n\t}", "@Test\n public void clearForEmptyList() {\n myList.clear();\n\n //then\n assertTrue(myList.isEmpty());\n assertEquals(\"[]\", myList.toString());\n }", "@Nonnull\n public static <T> PlayList<T> empty()\n {\n return new PlayList<>();\n }", "public Builder clearIsList() {\n bitField0_ = (bitField0_ & ~0x00000004);\n isList_ = false;\n onChanged();\n return this;\n }", "public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }", "public Builder clearIsList() {\n bitField0_ = (bitField0_ & ~0x00000008);\n isList_ = false;\n onChanged();\n return this;\n }", "public void Reset()\n {\n this.list1.clear();\n }", "public void testIsEmpty() {\r\n assertTrue( list.isEmpty());\r\n list.add(\"A\");\r\n assertFalse(list.isEmpty());\r\n }", "public void makeEmpty(){\n for(int element = set.length - 1; element >= 0; element--){\n remove(set[element]);\n }\n }", "public void clear() {\n this.entries = new Empty<>();\n }", "public static <T>\n LazyList<T> empty() {\n return EMPTY;\n }", "public void clear() {\n\t\tlists.clear();\n\t}", "public void doEmptyTableList() {\n tableList.deleteList();\n }", "public void clear() {\n\t\tthis.count = (emptyItem ? 1 : 0);\n\t\tpages.clear();\n\t}", "public boolean empty() {\r\n\r\n\t\tif(item_count>0)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void setEmpty() {\n\t\t\n\t}", "public boolean isEmpty(){\n return this.listSize == 0;\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 static boolean empty() {\n\n if (list.size() != 0){\n return false;\n }\n return true;\n }", "@Override\n public void clear() {\n size = 0;\n first = null;\n last = null;\n }", "public void clear() {\n for (int i = 0; i < size; i++) genericArrayList[i] = null;\n size = 0;\n }", "public boolean isEmpty(){\n\t\tif(list.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void clearList() {\n\t\tdeletedList.clear();\n\t}", "public void emptyArrayList_ListOfMiniCartItems() {\n ListOfMiniCartItems.clear();\n System.out.println(\" Clear Mini-Cart Item Array List: \" + ListOfMiniCartItems);\n }", "protected void clear() {\n\n\t\tthis.myRRList.clear();\n\t}", "@Test\n public void testIsEmpty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.clear();\n\n boolean expResult = true;\n boolean result = instance.isEmpty();\n assertEquals(expResult, result);\n }", "@Test\n public void testIsEmpty_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(3, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n instance.clear();\n\n boolean expResult = true;\n boolean result = instance.isEmpty();\n assertEquals(expResult, result);\n }", "@Test\n public void clearList(){\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n\n assertEquals(5,list.size());\n\n list.clear();\n\n assertEquals(0,list.size());\n }", "@Test\n public void testClear() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n instance.clear();\n\n assertTrue(instance.isEmpty());\n\n }", "void clear() {\n\t\t// Initialize new empty list, clearing out old data\n\t\tmNewsList = new ArrayList<>();\n\t}", "public boolean isEmpty() {\n return list.isEmpty();\n }", "@Test(timeout = TIMEOUT)\n public void testIsEmptyAndClear() {\n assertTrue(list.isEmpty());\n\n // Should not be empty after adding elements\n list.addAtIndex(0, \"0a\"); // 0a\n list.addAtIndex(1, \"1a\"); // 0a, 1a\n list.addAtIndex(2, \"2a\"); // 0a, 1a, 2a\n list.addAtIndex(3, \"3a\"); // 0a, 1a, 2a, 3a\n list.addAtIndex(4, \"4a\"); // 0a, 1a, 2a, 3a, 4a\n assertFalse(list.isEmpty());\n\n // Clearing the list should empty the array and reset size\n list.clear();\n assertTrue(list.isEmpty());\n assertEquals(0, list.size());\n assertArrayEquals(new Object[ArrayList.INITIAL_CAPACITY],\n list.getBackingArray());\n }", "public void clear()\r\n {\r\n phoneList = new ArrayList<String>();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "@SuppressWarnings(\"unchecked\")\n public void clear() {\n list = (E[])new Object[capacity];\n size = 0;\n }", "public TempList<T> clear() {\n chk();\n list.clear();\n return this;\n }", "@Test\n public void testClear_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n instance.clear();\n\n assertTrue(instance.isEmpty());\n\n }", "@Test\r\n\tvoid testClear() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tlist.clear();\r\n\t\tif (list.getSize() != 0 || list.getHead() != null || list.getTail() != null) {\r\n\t\t\tfail(\"Clear failed\");\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testIsEmpty() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\tassertTrue(testArray.isEmpty());\r\n\t\ttestArray.add(\"hi\");\r\n\t\tassertTrue(!testArray.isEmpty());\r\n\t}", "void clear() {\n\t\tfor (int list = getFirstList(); list != -1;) {\n\t\t\tlist = deleteList(list);\n\t\t}\n\t}", "@Test\n public void isEmpty() {\n assertTrue(myList.isEmpty());\n\n //given\n myList.add(0);\n\n //then\n assertFalse(myList.isEmpty());\n }", "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "@Override\n public void clear() {\n size = 0;\n }", "@Override\n public void clear() {\n size = 0;\n }", "@Override\n public void clear() {\n size = 0;\n }", "public ListMatcher empty() {\n\n\t\tnotNull();\n\t\t\n\t\tif (target.isEmpty()) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthrow getException(\"Expected an empty list but it was %s\", target);\n\t}", "public Builder clearItems() {\n items_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "@Override\n public boolean isEmpty() { return true; }", "public OccList reset()\n {\n size = 0;\n return this;\n }", "public static void emptyWishlist() {\n click(WISHLIST_UPPER_MENU);\n click(REMOVE_FROM_WISHLIST_BUTTON);\n }", "@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\telements[i] = null;\n\t\t}\n\n\t\tsize = 0;\n\t}", "void empty();", "public boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public void clear()\n {\n dessertList.clear();\n }", "public /*@ pure @*/ boolean isEmpty() {\n return the_list == null;\n }", "public void clear() {\n this.first = null;\n this.last = null;\n this.nrOfElements = 0;\n }", "public boolean isEmpty() {\r\n\t\treturn al.listSize == 0;\r\n\t}", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "public void ensureEmptied() {\n }", "public boolean empty();", "@Test\r\n\tpublic void testClear() {\r\n\t\tlist.clear();\r\n\t\tAssert.assertNull(list.getFirst());\r\n\t\tAssert.assertEquals(0, list.size());\r\n\t}" ]
[ "0.8347902", "0.77435076", "0.7662039", "0.7646384", "0.7630714", "0.737597", "0.73434687", "0.7301509", "0.7217419", "0.7193709", "0.7193709", "0.7175485", "0.7149702", "0.71272135", "0.7109339", "0.70930296", "0.701245", "0.7010303", "0.70054424", "0.699306", "0.69812185", "0.69613653", "0.6954523", "0.69474447", "0.6932501", "0.6927637", "0.6927474", "0.69126487", "0.69000924", "0.68981546", "0.68975407", "0.6849032", "0.6841772", "0.6841046", "0.6819412", "0.67982423", "0.67982423", "0.6771881", "0.67682034", "0.6759982", "0.67235625", "0.67133015", "0.6711879", "0.67065185", "0.6689666", "0.6664772", "0.6664239", "0.66582215", "0.664822", "0.6633635", "0.66232175", "0.66098076", "0.6602276", "0.6600787", "0.65939176", "0.65921193", "0.658597", "0.65809214", "0.6556006", "0.654383", "0.65375805", "0.6533153", "0.6532504", "0.6523552", "0.65177613", "0.65114975", "0.6510473", "0.6499265", "0.64968675", "0.6490432", "0.6482863", "0.64784735", "0.64730155", "0.6470025", "0.64655846", "0.64646447", "0.6464607", "0.6464584", "0.6462282", "0.6456443", "0.64555776", "0.64555776", "0.64555776", "0.64539087", "0.6452938", "0.6443023", "0.6437754", "0.64377284", "0.6431356", "0.6426924", "0.64198416", "0.64177537", "0.63999325", "0.63985336", "0.6395778", "0.6395406", "0.63833874", "0.6382405", "0.63815665", "0.6378758" ]
0.67279905
40
Return an iterator representing the header node.
public LinkedListIterator<AnyType> zeroth() { return new LinkedListIterator<AnyType>(header); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public ListIterator getHeaderNames() {\n ListIterator li = this.headers.listIterator();\n LinkedList retval = new LinkedList();\n while (li.hasNext()) {\n SIPHeader sipHeader = (SIPHeader) li.next();\n String name = sipHeader.getName();\n retval.add(name);\n }\n return retval.listIterator();\n }", "public ListIterator getHeaders(String headerName) {\n if (headerName == null)\n throw new NullPointerException\n (\"null headerName\");\n SIPHeader sipHeader= (SIPHeader)\n nameTable.get(headerName.toLowerCase());\n // empty iterator\n if (sipHeader == null) return new LinkedList().listIterator();\n if (sipHeader instanceof SIPHeaderList ) {\n return ((SIPHeaderList) sipHeader).listIterator();\n } else {\n return new HeaderIterator(this,sipHeader);\n }\n }", "public abstract Iterator getAllMimeHeaders();", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "@Override\n public RaftNode getHeader() {\n return allNodes.getHeader();\n }", "Rule Header() {\n // Push 1 HeaderNode onto the value stack\n return Sequence(\n FirstOf(\n Include(),\n CppInclude(),\n Namespace()),\n actions.pushHeaderNode());\n }", "public List<Header> getHeaderList() {\n return mHeaderList;\n }", "@Override\n public Iterator<Node<E>> heads() {\n return heads.iterator();\n }", "public Enumeration getAllHeaderLines() throws MessagingException {\n/* 504 */ if (this.headers == null)\n/* 505 */ loadHeaders(); \n/* 506 */ return this.headers.getAllHeaderLines();\n/* */ }", "@Override\r\n public boolean hasNext() {\n return returned.next != header;\r\n }", "public LinkedListItr zeroth( )\n {\n return new LinkedListItr( header );\n }", "public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "public HashMap<String, String> getHeaderList() {\n return headerList;\n }", "public RowIterator getPurchaseOrderHeaderEO()\n {\n return (RowIterator)getAttributeInternal(PURCHASEORDERHEADEREO);\n }", "public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}", "public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}", "List<Header> headers();", "public ElementHeader getElementHeader()\n {\n return elementHeader;\n }", "public List<VCFFilterHeaderLine> headerLines();", "public Map<String, String> getHeaderList() {\n return headerMap;\n }", "Collection<String> getHeaderNames();", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public List<Div> getHeaders()\n {\n if (headers == null)\n {\n headers = new ArrayList<>();\n }\n return headers;\n }", "List<? extends Header> getAllHeaders();", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "public Set<QName> getHeaders() {\n\t\treturn headers;\n\t}", "@Override\n public ElementHeader getElementHeader()\n {\n return elementHeader;\n }", "FHiterator() {\n\t\t\tmCurrentNode = mHead.next;\n\t\t\tmCurrentIndex = 0;\n\t\t}", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\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 Optional<List<Headers>> headers() {\n return Codegen.objectProp(\"headers\", TypeShape.<List<Headers>>builder(List.class).addParameter(Headers.class).build()).config(config).get();\n }", "@Override\n\t\tpublic Enumeration getHeaderNames() {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator<Key>() {\n\t\t\tNode temp = getFirstNode();\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn temp.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key next() {\n\t\t\t\tKey k = temp.next.key;\n\t\t\t\ttemp = temp.next;\n\t\t\t\treturn k;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean hasPrevious() {\n\t\t\t\treturn !temp.equals(getFirstNode());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key previous() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int nextIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int previousIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Key key) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void add(Key key) {\n\n\t\t\t}\n\t\t};\n\t}", "public String headerLine() {\n return headerLine;\n }", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "public Set<String> getHeaderNames() {\n return headers.keySet();\n }", "public Iterator nodeIterator() { return nodes.keySet().iterator(); }", "public void visit(Header n){\r\n\t\tif(tempNode.notifyNode().equals(\"Header\")){\r\n\t\t\ttempNode = nodeList.get(sequence);\r\n\t\t\tArrayList<Token> tokenList = tempNode.getTokenList();\r\n\t\t\tString tmp =\"\";\r\n\t\t\tfor(int i=0;i<tempNode.getTokenListSize();i++){\r\n\t\t\t\tvisit(tokenList.get(i));\r\n\t\t\t}\r\n\r\n\t\t\tif(tokenList.size()<1)\r\n\t\t\ttmp = \"<h\"+tempNode.htype+\">\"+\"</h\"+tempNode.htype+\">\";\r\n\t\t\telse\r\n\t\t\ttmp = \"<h\"+tempNode.htype+\">\"+line+\"</h\"+tempNode.htype+\">\";\r\n\t\t\tline = tmp;\r\n\t\t}\r\n\t }", "public Object getHeader() {\n return header;\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}", "public Class<?> header() {\n return header;\n }", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "public abstract Iterator getMatchingMimeHeaders(String names[]);", "private List readHeadings( PushbackInputStream stream ) throws IOException {\n List headings = new ArrayList();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n done = true;\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n headings.add( readString( stream ) );\n break;\n case END:\n done = true;\n break;\n default:\n stream.unread( c );\n headings.add( readToken( stream ) );\n }\n }\n return headings;\n }", "public List<Label> getHeaderLabels() {\r\n return headerLabels;\r\n }", "@Override\n\tpublic FileItemHeaders getHeaders()\n\t{\n\t\treturn headers;\n\t}", "public Enumeration getAllHeaders() throws MessagingException {\n/* 451 */ if (this.headers == null)\n/* 452 */ loadHeaders(); \n/* 453 */ return this.headers.getAllHeaders();\n/* */ }", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "Set<String> getHeaderNames();", "public ListIterator getUnrecognizedHeaders() {\n return this.unrecognizedHeaders.listIterator();\n }", "public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }", "public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }", "public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }", "public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public String getHeader() {\n\t\treturn _header;\n\t}", "E head() throws NoSuchElementException;", "public java.util.List<ConnectionHeaderParameter> getHeaderParameters() {\n return headerParameters;\n }", "public Map<String, Header> getHeaderMap() {\n return headerMap;\n }", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "@Nonnull @NonnullElements @NotLive @Unmodifiable public List<Pair<String,String>> getHeaders() {\n return headerList;\n }", "public Iterator<String> keyIterator() {\n \treturn new MapIter(first);\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public java.lang.String getHeaderName() {\r\n return headerName;\r\n }", "public final Iterator<PropertyDeclaration> getDeclarationIterator()\n {\n final Type superType = getSuperClass();\n\n return new FilterIterator(declarations.values().iterator(), new Predicate()\n {\n public boolean evaluate(Object object)\n {\n return superType.getProperty(((PropertyDeclaration)object).getName()) == null;\n }\n });\n }", "public Map<String, String> headers() {\n return this.header.headers();\n }", "org.apache.xmlbeans.XmlString xgetHeader();", "TupleHeader getHeader() {\n return header;\n }", "public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}", "public Map<String, AbstractHeader> getHeaders()\n\t{\n\t\treturn headers;\n\t}", "@Test\n public void getAllHeaders() {\n List<WebElement> headers = driver.findElements(By.xpath(\"(//div[@class='jXpA9e Ui5IUc']//table)[1]//th\"));\n System.out.println(\"headers.size() = \" + headers.size());\n\n for (WebElement header : headers) {\n System.out.println(header.getText());\n }\n\n }", "FS2ObjectHeaders getHeaders();", "public boolean getHeader() {\n return isHeader;\n }", "public Node getHeadNode();", "public Header getHeader() {\n\t\treturn this.header;\n\t}", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}", "public byte[] getHeader() {\n\treturn header;\n }", "@Override\r\n public Iterator<NamedTreeNode<T>> iterator()\r\n {\r\n return new Iterator<NamedTreeNode<T>>()\r\n {\r\n NamedTreeNode<T> n = (NamedTreeNode<T>)getLeftNode();\r\n @Override\r\n public boolean hasNext()\r\n {\r\n return n != null;\r\n }\r\n @Override\r\n public NamedTreeNode<T> next()\r\n {\r\n if( n == null ) {\r\n throw new NoSuchElementException();\r\n }\r\n NamedTreeNode<T> r = n;\r\n n = (NamedTreeNode<T>)n.getRightNode();\r\n return r;\r\n }\r\n @Override\r\n public void remove()\r\n {\r\n throw new UnsupportedOperationException();\r\n }\r\n };\r\n }", "public String getHeaderNames(){return header.namesText;}", "@Override\n\t\tpublic Enumeration getHeaders(String name) {\n\t\t\treturn null;\n\t\t}", "public NetFlowHeader getHeader() throws IOException {\n if (header == null) {\n header = prepareHeader();\n }\n\n return header;\n }", "public abstract Iterator getNonMatchingMimeHeaders(String names[]);", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "public VersionedMap getHeaders ()\n {\n return headers;\n }", "List<? extends Header> getHeaders(String name);", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public Map<String, HeaderInfo> getHeaders() {\n\t\treturn headers;\n\t}", "public HeaderSet getReceivedHeaders() throws IOException {\n ensureOpen();\n\n return replyHeaders;\n }", "ElementNode gethead(){\r\n\t\t\treturn this.head;\r\n\t\t}" ]
[ "0.7547807", "0.7223722", "0.6943666", "0.69106495", "0.6592624", "0.65584123", "0.64848894", "0.6247986", "0.61993086", "0.61544365", "0.60952926", "0.6058907", "0.60422957", "0.60001403", "0.5980112", "0.5969269", "0.5969007", "0.5959527", "0.5948375", "0.5946342", "0.5892751", "0.58871216", "0.58846545", "0.58612186", "0.5855851", "0.5852612", "0.5814908", "0.5798243", "0.57877564", "0.57836676", "0.57783335", "0.5772565", "0.5767228", "0.5759371", "0.57371986", "0.5736702", "0.57338446", "0.5727736", "0.5716543", "0.571338", "0.57102203", "0.57061416", "0.57058996", "0.56749135", "0.5660381", "0.56484306", "0.56323886", "0.56228817", "0.56112236", "0.55834234", "0.5567379", "0.5550024", "0.5528559", "0.5527123", "0.5527123", "0.5517888", "0.55044276", "0.54971355", "0.54966944", "0.5490658", "0.5488332", "0.547146", "0.5460058", "0.54587394", "0.54445654", "0.54415077", "0.54396355", "0.5435249", "0.542934", "0.54265106", "0.542395", "0.54169506", "0.54147995", "0.54115003", "0.5407022", "0.5397678", "0.53953546", "0.5389732", "0.53890544", "0.5388761", "0.53850996", "0.5383155", "0.5382613", "0.538188", "0.5380295", "0.53791404", "0.5376971", "0.5376726", "0.5376718", "0.5376218", "0.53560376", "0.53560233", "0.5353597", "0.53523153", "0.534241", "0.53361934", "0.53359044", "0.53358173", "0.53101355", "0.52931374" ]
0.612524
10
Return an iterator representing the first node in the list. This operation is valid for empty lists.
public LinkedListIterator<AnyType> first() { return new LinkedListIterator<AnyType>(header.next); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public StringListIterator first()\n {\n\treturn new StringListIterator(head);\n }", "public Iterator iterator() {\n\t\treturn theList.listIterator(0);\n\t}", "public ListIterator<E> listIterator()\r\n {\r\n return listIterator(0);\r\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "public ListIterator() {current=first.next;}", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public LinkedListNode<T> getFirstNode() {\n\t\t//return the head node of the list\n\t\treturn head;\t\t\n\t}", "public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n return toReturn == tail ? null: toReturn;\n }", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "Node firstNode() {\r\n\t\treturn first.next.n;\r\n\t}", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "public Node<T> getFirst() {\r\n\t\treturn first;\r\n\t}", "public E getFirst(){\n return head.getNext().getElement();\n }", "public ListNode getFirstNode(){\n\t\treturn firstNode;\n\t}", "public Object firstElement();", "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 Iterator iterator () {\n return new MyIterator (first);\n }", "public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn this.head;\n\t}", "public LinkedListIterator<AnyType> zeroth() {\n return new LinkedListIterator<AnyType>(header);\n }", "public final Node<N> first() {\n throw new UnsupportedOperationException();\n }", "public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn head;\n\t}", "@Override\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator<Key>() {\n\t\t\tNode temp = getFirstNode();\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn temp.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key next() {\n\t\t\t\tKey k = temp.next.key;\n\t\t\t\ttemp = temp.next;\n\t\t\t\treturn k;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean hasPrevious() {\n\t\t\t\treturn !temp.equals(getFirstNode());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key previous() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int nextIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int previousIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Key key) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void add(Key key) {\n\n\t\t\t}\n\t\t};\n\t}", "public LinkedListItr zeroth( )\n {\n return new LinkedListItr( header );\n }", "public Node getFirst()\n {\n return this.first;\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public Node getFirstNode() {\n\t return firstNode;\r\n\t }", "public E next()\r\n {\r\n E valueToReturn;\r\n\r\n if (!hasNext())\r\n throw new NoSuchElementException(\"The lister is empty\");\r\n \r\n // get the string from the node\r\n valueToReturn = cursor.getData();\r\n \r\n // advance the cursor to the next node\r\n cursor = cursor.getLink();\r\n \r\n return valueToReturn;\r\n }", "public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }", "@Override\r\n\tpublic Iterator<T> iterator() {\n\t\treturn new Iterator<T>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tnodo<T> sig = sentinel;\r\n\t\t\t\tsentinel = sentinel.getNext();\r\n\t\t\t\treturn (sentinel != null) ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic T next() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn sentinel.getValue();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t}", "@Override\r\n public T next() {\r\n if (hasNext()) {\r\n node = node.next();\r\n nextCalled = true;\r\n return node.getData();\r\n }\r\n else {\r\n throw new NoSuchElementException(\"Illegal call to next(); \"\r\n + \"iterator is after end of list.\");\r\n }\r\n }", "public Iterator<E> iterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public ListIterator<T> listIterator() {\n\t\treturn null;\n\t}", "public ListIterator listIterator() {\n\t\treturn null;\n\t}", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public ListIterator listIterator(int arg0) {\n\t\treturn null;\n\t}", "@Test\n public void whenAddOneToEmptyTreeThenIteratorHasNext() {\n tree.add(1);\n\n Iterator<Integer> iterator = this.tree.iterator();\n\n assertThat(iterator.next(), is(1));\n }", "@Override\n\tpublic ListIterator<T> listIterator() {\n\t\treturn null;\n\t}", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public ListIterator<T> listIterator(int arg0) {\n\t\treturn null;\n\t}", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "Node getFirst() {\n return this.first;\n }", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public E peekFirst();", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn peek();\r\n\t}", "public Iterator<S> iterator() {\n\t\t// ..\n\t\treturn null;\n\t}", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public ListIterator<E> listIterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "@Override\n public Iterator<Node> iterator() {\n return this;\n }", "public OSMNode firstNode() {\n return nodes.get(0);\n }", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "@Override\r\n\tpublic Iterator<Item> iterator() {\n\t\treturn null;\r\n\t}", "NodeIterable(Node firstChild) {\n next = firstChild;\n }", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\n\t\tNode tempRoot = root;\n\t\tinOrder(tempRoot);\n\t\treturn null;\n\t}", "public synchronized DoubleLinkedListNodeInt getFirst() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn head.getNext();\n\t}", "@Override \r\n\tpublic LLNode<T> next() throws NoSuchElementException{\r\n\t\tLLNode<T> node = nodeptr;\r\n\t\tif (nodeptr == null)\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\tnodeptr = nodeptr.getNext();\r\n\t\treturn node;\r\n\t}", "public Iterator<T> iterator() {\n\t\treturn list.iterator();\n\t}", "@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public E getFirst() {\n return peek();\n }", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "public Iterator<E> iterator()\n {\n return new CircularLinkedListIterator();\n }", "Iterator<E> iterator();", "Iterator<E> iterator();", "@Override\n public Iterator<Item> iterator() {\n class DequeIterator implements Iterator<Item> {\n private Node node = first;\n @Override\n public boolean hasNext() {\n return node != null;\n }\n\n @Override\n public Item next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n Item item = node.item;\n node = node.next;\n return item;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n }\n return new DequeIterator();\n }", "public Object front() {\n ListNode p = this.l.start;\n while(p.next!=null)\n {\n p = p.next;\n }\n\t\treturn (Object) p.item;\n\t}", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public Iterator<E> iterator()\r\n {\r\n return listIterator();\r\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 Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "@Override\r\n\tpublic T first() {\n\t\treturn head.content;\r\n\t}", "public Iterator<T> iterator()\n\t{\n\t\treturn new LinkedListIterator();\n\t}", "@Override\r\n\tpublic Iterator<E> iterator() {\n\t\treturn null;\r\n\t}", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic Iterator<ItemT> iterator() {\n\t\treturn null;\n\t}" ]
[ "0.7123867", "0.7111558", "0.7091444", "0.70593405", "0.70199674", "0.69903314", "0.69640404", "0.6933932", "0.69233686", "0.68605477", "0.67681044", "0.67280704", "0.67087966", "0.6613684", "0.66098034", "0.66000444", "0.6592002", "0.6579116", "0.65327555", "0.6486831", "0.6486125", "0.6479748", "0.6452088", "0.64428806", "0.6440356", "0.64395046", "0.643799", "0.64177036", "0.6399443", "0.63936245", "0.6389978", "0.6379795", "0.6360685", "0.63533384", "0.6348305", "0.6311335", "0.63101864", "0.62996787", "0.6282398", "0.6279656", "0.6271289", "0.6262673", "0.6249306", "0.6238445", "0.62364537", "0.62269145", "0.6226128", "0.62243444", "0.61967534", "0.61903226", "0.61895186", "0.6184891", "0.61710095", "0.61558276", "0.61521745", "0.6134525", "0.6125922", "0.61254233", "0.6125301", "0.6101144", "0.60993785", "0.6098928", "0.6097793", "0.60967827", "0.6089376", "0.60845435", "0.60747707", "0.6072969", "0.60698384", "0.6069538", "0.6063729", "0.6057454", "0.6057105", "0.6046654", "0.6046239", "0.60418624", "0.60365903", "0.6023172", "0.6013418", "0.6010268", "0.5990728", "0.59888786", "0.5988604", "0.5983886", "0.5982702", "0.5973701", "0.5973701", "0.5965484", "0.5951251", "0.5944964", "0.59407526", "0.5940006", "0.5939874", "0.5937162", "0.5936742", "0.59247494", "0.59097964", "0.5904058", "0.58864146", "0.58849716" ]
0.73012
0
Return iterator corresponding to the first node containing an item.
public LinkedListIterator<AnyType> find(AnyType x) { ListNode<AnyType> itr = header.next; while (itr != null && !itr.element.equals(x)) { itr = itr.next; } return new LinkedListIterator<AnyType>(itr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "public Item getFirst();", "public Item next() throws XPathException {\n curr = base.next();\n if (curr == null) {\n pos = -1;\n } else {\n pos++;\n }\n return curr;\n }", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "private Node getRefTo(T item){\n Node n = first;\n while(n != null && !n.value.equals(item))\n n = n.next;\n return n;\n }", "@Override\n public Iterator<Item> iterator() {\n class DequeIterator implements Iterator<Item> {\n private Node node = first;\n @Override\n public boolean hasNext() {\n return node != null;\n }\n\n @Override\n public Item next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n Item item = node.item;\n node = node.next;\n return item;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n }\n return new DequeIterator();\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public E find(E item){\n\t\tE found = find(item, root);\n\t\treturn found;\n\t}", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "@Override\n public Iterator<Item> iterator() {\n return new DequeIterator<Item>(first);\n }", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\n\t\tNode tempRoot = root;\n\t\tinOrder(tempRoot);\n\t\treturn null;\n\t}", "@Override\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator<Key>() {\n\t\t\tNode temp = getFirstNode();\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn temp.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key next() {\n\t\t\t\tKey k = temp.next.key;\n\t\t\t\ttemp = temp.next;\n\t\t\t\treturn k;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean hasPrevious() {\n\t\t\t\treturn !temp.equals(getFirstNode());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key previous() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int nextIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int previousIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Key key) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void add(Key key) {\n\n\t\t\t}\n\t\t};\n\t}", "public abstract TreeIter<T> iterator();", "public Iterator<Item> iterator() {\n RQIterator it = new RQIterator();\n return it;\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public Iterator<PartialTree> iterator() {\r\n \treturn new PartialTreeListIterator(this);\r\n }", "public BinaryTree<E> find(E item) \r\n\t{\r\n\t\treturn finderHelper(item, root);\r\n\t}", "public Iterator nodeIterator() { return nodes.keySet().iterator(); }", "@Override\r\n\tpublic Iterator<Item> iterator() {\n\t\treturn null;\r\n\t}", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "@Override\n public Iterator<Node> iterator() {\n return this;\n }", "@Nonnull\n public Optional<ENTITY> next()\n {\n currentItem = Optional.of(items.get(++index));\n update();\n return currentItem;\n }", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public Item next(){\n if(current==null) {\n throw new NoSuchElementException();\n }\n\n Item item = (Item) current.item;\n current=current.next;\n return item;\n }", "public Object firstElement();", "@Override\n\tpublic Iterator<ItemT> iterator() {\n\t\treturn null;\n\t}", "public Iterator iterator() {\n\t\treturn theList.listIterator(0);\n\t}", "public Item next()\n\t\t {\n\t\t\t if (!hasNext()) throw new NoSuchElementException();\n\t\t\t return items[indexs[i++]];\n\t\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 Iterator<Object> iterator()\r\n {\r\n return new MyTreeSetIterator(root);\r\n }", "@Test\n public void whenAddOneToEmptyTreeThenIteratorHasNext() {\n tree.add(1);\n\n Iterator<Integer> iterator = this.tree.iterator();\n\n assertThat(iterator.next(), is(1));\n }", "public Iterator<Item> iterator(){\n return this.doublyLinkedList.iterator();\n }", "Iterator<E> iterator();", "Iterator<E> iterator();", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn this.itemList.iterator();\n\t}", "public BSTNode<E> find (E item) {\r\n\t\tBSTNode<E> pointer = this;\r\n\t\twhile (pointer != null) {\r\n\t\t\tif (pointer.value.compareTo(item) == 0) {\r\n\t\t\t\treturn pointer;\r\n\t\t\t}\r\n\t\t\tif (pointer.value.compareTo(item) > 0) {\r\n\t\t\t\tpointer = pointer.left;\r\n\t\t\t}else if (pointer.value.compareTo(item) < 0) {\r\n\t\t\t\tpointer = pointer.right;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\r\n public Iterator<NamedTreeNode<T>> iterator()\r\n {\r\n return new Iterator<NamedTreeNode<T>>()\r\n {\r\n NamedTreeNode<T> n = (NamedTreeNode<T>)getLeftNode();\r\n @Override\r\n public boolean hasNext()\r\n {\r\n return n != null;\r\n }\r\n @Override\r\n public NamedTreeNode<T> next()\r\n {\r\n if( n == null ) {\r\n throw new NoSuchElementException();\r\n }\r\n NamedTreeNode<T> r = n;\r\n n = (NamedTreeNode<T>)n.getRightNode();\r\n return r;\r\n }\r\n @Override\r\n public void remove()\r\n {\r\n throw new UnsupportedOperationException();\r\n }\r\n };\r\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public Iterator<Item> iterator() {\n return new LinkedBagIterator();\n }", "@Override\n public Iterator<T> iterator() {\n return new UsedNodesIterator<>(this);\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public int indexOf(E item) {\r\n\t\tint count = 0;\r\n\t\tNode p = first;\r\n\t\tfor (count = 0; p.item != item; count++) {\r\n\t\t\tp = p.next;\r\n\t\t}\r\n\t\tif (p.item == item) return count;\r\n\t\telse return -1;\r\n\t}", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "@Override\n public Iterator<T> iterator() {\n return items.iterator();\n }", "public T item() throws IOException, NoSuchElementException;", "public Item next() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot retrieve item from empty deque\");\n }\n Item item = current.getItem(); //item = current item to be returned\n current = current.getNext();\n return item;\n }", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "public Node getFirst()\n {\n return this.first;\n }", "public LinkedListItr find( Object x )\n {\n ListNode itr = header.next;\n\n while( itr != null && !itr.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\tif (!hasNext()) {\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn queue[index[i++]];\r\n\t\t\t}\r\n\t\t}", "boolean nextItem();", "public Iterator<T> iterator() {\n return new SetIterator<T>(this.head);\n }", "public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }", "Iterator<T> iterator();", "public Node<T> getFirst() {\r\n\t\treturn first;\r\n\t}", "Node getFirst() {\n return this.first;\n }", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "NodeIterable(Node firstChild) {\n next = firstChild;\n }", "public Iterator<String> keyIterator() {\n \treturn new MapIter(first);\n }", "@Override\n public Spliterator<T> spliterator() {\n return items.spliterator();\n }", "Node firstNode() {\r\n\t\treturn first.next.n;\r\n\t}", "public Object getItem(Node itemNode) throws XmlRecipeException;", "public boolean contains(Item item){\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perfrom contains because the DList instance is empty!\");\n for(Node temp = first.next; temp.next!=null; temp=temp.next)\n if(temp.data.equals(item)) return true;\n return false; \n }", "private BinaryTreeNode findNode(T item) {\n\t\tif (item.equals(root.data)) {\n\t\t\treturn root;\n\t\t}\n\n\t\telse return findNodeRecursive(item, root);\n\t}", "@Override\n public Map.Entry<K, V> next() {\n if (iter.hasNext()) {\n \n lastItemReturned = iter.next();\n return lastItemReturned;\n } else {\n throw new NoSuchElementException();\n }\n }", "public boolean offerFirst(E item);", "public boolean contains(int item) {\n if (item == datum() ) return true; // true upon finding the item\n else if (next() == null) return false; // false if item not found until the end of list\n else return next.contains(item); \n }", "public StringListIterator first()\n {\n\treturn new StringListIterator(head);\n }", "Iterator<CtElement> descendantIterator();", "public Iterator<Item> iterator() {\n\t\treturn new ListIterator(); \n\t\t}", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "public Iterator<S> iterator() {\n\t\t// ..\n\t\treturn null;\n\t}", "private E find(E item, Node<E> root){\n\t\t/** item not found */\n\t\tif(root == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint comparison = item.compareTo(root.item);\n\t\t\n\t\t/** item found */\n\t\tif(comparison == 0){\n\t\t\treturn root.item;\n\t\t}\n\t\t/** item less than that of root */\n\t\telse if(comparison < 0){\n\t\t\treturn find(item, root.left);\n\t\t}\n\t\t/** item greater than that of root */\n\t\telse{\n\t\t\treturn find(item, root.right);\n\t\t}\n\t}", "public T iterator();", "public Iterator<Item> iterator() {\n return new ListIterator();\n\n }", "public Iterator<ResultItem> iterateItems() {\r\n\t\treturn items.iterator();\r\n\t}", "public RNode deleteFirstOccurrence(int item) {\n\tif (item == datum() ) return next;\n\telse {\n\t if (next != null) next = next.deleteFirstOccurrence(item);\n\t return this;\n\t}\n }", "@Override\r\n\tpublic Iterator<T> iterator() {\n\t\treturn new Iterator<T>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tnodo<T> sig = sentinel;\r\n\t\t\t\tsentinel = sentinel.getNext();\r\n\t\t\t\treturn (sentinel != null) ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic T next() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn sentinel.getValue();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t}" ]
[ "0.68406", "0.65867954", "0.6360681", "0.61710036", "0.614789", "0.6116339", "0.608013", "0.6047644", "0.6042532", "0.6041796", "0.60021615", "0.5966405", "0.5960213", "0.58645934", "0.5843374", "0.58330923", "0.5819942", "0.58177227", "0.5791457", "0.5789251", "0.5787441", "0.57672006", "0.57559097", "0.57465166", "0.57411784", "0.5704433", "0.56952775", "0.5691699", "0.56756335", "0.5642403", "0.5636147", "0.56250376", "0.56194544", "0.56181985", "0.56139344", "0.5610975", "0.56092286", "0.5596664", "0.55947757", "0.5578359", "0.5572231", "0.5537877", "0.5516592", "0.55098003", "0.5508231", "0.5500558", "0.549903", "0.54983836", "0.54983836", "0.54939127", "0.54934436", "0.54880303", "0.54780746", "0.54709965", "0.546701", "0.5465959", "0.545581", "0.5453376", "0.54515123", "0.5446151", "0.5443548", "0.5443546", "0.5437974", "0.5422054", "0.54086477", "0.53905237", "0.5386536", "0.5381316", "0.5369691", "0.5369375", "0.53659153", "0.5357927", "0.5344316", "0.53370684", "0.5335784", "0.5332886", "0.5328187", "0.5320146", "0.5311733", "0.53067297", "0.5305884", "0.53001726", "0.5295793", "0.5295493", "0.52930677", "0.5290382", "0.5288452", "0.5286154", "0.5286058", "0.527683", "0.527683", "0.527683", "0.52717227", "0.5266559", "0.5259346", "0.52585316", "0.5258453", "0.5258368", "0.52548724", "0.525191" ]
0.5298334
82
/ finds the last occurrence of x in a list
public LinkedListIterator<AnyType> findLast(AnyType x) { ListNode<AnyType> itr = header.next; ListNode<AnyType> lastitr = new ListNode<AnyType>(x); int counter = 0; int pos = 0; while (itr != null) { if (itr.element.equals(x)) { lastitr = itr; pos = counter; } itr = itr.next; counter++; } System.out.println("Last occurrence of element found in position: " + pos); return new LinkedListIterator<AnyType>(lastitr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int lastOccurrence(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\tint result = -1;\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\tif (a[mid] == x) {\n\t\t\t\tresult = mid;\n\t\t\t\tlow = mid + 1;\n\t\t\t} else if (x > a[mid]) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public int findLast (int[] x, int y) \n {\n for (int i = x.length - 1; i >= 0; i--) \n {\n if (x[i] == y)\n {\n return i;\n }\n }\n return -1;\n }", "public int lastIndexOf(Fraction x)\r\n\t{\r\n\t\tfor(int i=n-1;i>=0;i--)\r\n\t\t\tif(x.gettu()==a[i].gettu() && x.getmau()==a[i].getmau())\r\n\t\t\t\treturn i;\r\n\t\treturn -1;\t\t\t\t\t\r\n\t}", "public int lastIndexOf(Object elem, int index);", "public int lastIndexOf(Object elem);", "public static int lastIndex(int input[], int x) {\n return lastIndex(input, x, 0, -1);\n\t}", "public int lastIndexOf(Object o) {\n int index = -1;\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) index = i;\n }\n return index;\n }", "@Test\r\n\tpublic void testLastIndexOf() {\r\n\t\tAssert.assertTrue(list.lastIndexOf(null) == -1);\r\n\t\tAssert.assertEquals(2, list.lastIndexOf(new Munitions(2, 3, \"iron\")));\r\n\t\tlist.add(new Munitions(2, 3, \"iron\"));\r\n\t\tAssert.assertEquals(15, list.lastIndexOf(new Munitions(2, 3, \"iron\")));\r\n\t}", "@Test\n public void testLastIndexOf() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n Integer arg = 7;\n\n int result = instance.lastIndexOf(arg);\n int expResult = 3;\n\n assertEquals(expResult, result);\n\n }", "public abstract int lastIndexOf(E e);", "@Test\n public void testLastIndexOf_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n Integer arg = 7;\n\n int result = instance.lastIndexOf(arg);\n int expResult = 3;\n\n assertEquals(expResult, result);\n\n }", "public int lastIndexOf(Object o) {\n\t\treturn getLastOccurrence(o).index;\n\t}", "private static int findTheLastIndexInString(String s, char x){\n\n\t\tfor(int i=s.length()-1 ; i>=0; i--){\n\t\t\t\n\t\t\tif(s.charAt(i) == x)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "int getLast(int list) {\n\t\treturn m_lists.getField(list, 1);\n\t}", "E last() throws NoSuchElementException;", "public int lastIndexOf(Object arg0) {\n\t\treturn 0;\n\t}", "public static int lastIndexOfSubList(java.util.List arg0, java.util.List arg1)\n { return 0; }", "public int findNum(int x){\n\t\t\tif(this.list.length == 0){\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn findNumRec(x, 0, list.length-1);\n\t\t}", "public int findLast() {\n\t\tint result = 0;\n\t\twhile (!checkHaveThisNode(result))\n\t\t\tresult++;\n\n\t\treturn result;\n\t}", "public int lastIndexOfObject(Object obj);", "private int findIndexOfLastWord (ArrayList<String> parameters) {\n int indexOfLastWord = -1;\n for (int i = 0; i < parameters.size(); i++) {\n if (parameters.get(i).contains(\".\")) {\n indexOfLastWord = i;\n } \n }\n return indexOfLastWord;\n }", "@Override\n\tpublic int lastIndexOf(T searchItem) {\n\t\t// TODO Auto-generated method stub\n\t\tint result = -1;\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (searchItem.equals(data[i])) {\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic int lastIndexOf(Object o) {\n\t\treturn 0;\n\t}", "@Test\n public void elementLocationTestRecursive() {\n ReverseCount reverseCount = new ReverseCount();\n int elementNumber = 3;\n System.out.println(nthToLastReturnRecursive(list.getHead(), elementNumber, reverseCount).getElement());\n }", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "@Override\n\t\tpublic int lastIndexOf(Object o) {\n\t\t\treturn 0;\n\t\t}", "@Override\n public int lastIndexOf(Object o) {\n return indexOf(o);\n }", "public int lastIndexOf(String str) {\n/* 590 */ return this.m_str.lastIndexOf(str);\n/* */ }", "public int lastIndexOf(Object obj)\r\n {\r\n int index = this.size() - 1;\r\n ListIterator<E> itr = this.listIterator(this.size());\r\n while (itr.hasPrevious())\r\n {\r\n if (Utilities.nullSafeEquals(itr.previous(), obj))\r\n {\r\n return index;\r\n }\r\n --index;\r\n }\r\n return BAD_POSITION;\r\n }", "public int lastNonZero() {\n\t\tint i;\n\t\tfor(i=pointList.size()-1; i>=0; i--) {\n\t\t\tif (pointList.get(i).getY() > 0)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn 0;\n\t}", "public int last() throws XPathException {\n if (last == -1) {\n if (base instanceof LastPositionFinder) {\n last = ((LastPositionFinder)base).getLastPosition();\n }\n if (last == -1) {\n last = Count.count(base.getAnother());\n }\n }\n return last;\n }", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "public static int task4_last_occurence(int[] array, int target) {\n // key point: a[mid] == target, l = mid\n return -1;\n }", "private synchronized int search(Card card)\n {\n int i = cards.lastIndexOf(card);\n \n if (i >= 0)\n return cards.size() - i;\n else\n return -1;\n }", "public static <T> T last(ArrayList<T> lst) {\n return lst.get(lst.size() - 1);\n }", "public int lastIndexOf(String str)\n\t{\n\t\tint indexOf = recursiveLastIndexOf(firstC, length, 0, -1, str);\n\t\treturn indexOf;\n\t}", "@Starts(\"nothing\")\r\n@Override\r\n public int lastIndexOf(Object o) {\r\n int i=0;\r\n int last = -1;\r\n for (ConsCell<T> p = head; p != null; p = p.cdr, ++i) {\r\n if (equals(o,p.car)) last = i;\r\n }\r\n return last;\r\n }", "public static <T> T getLast(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(list.size() - 1) : null;\n\t}", "public int lastIndexOf(int number)\n\t{\n\t\tfor (int index = arraySize - 1; index >= 0; index--)\n\t\t{\n\t\t\tif (array[index] == number)\n\t\t\t{\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public Object last()throws ListExeption;", "private int getLastIndexInMarkers(List<String> identifiers) {\n if (this.progressMarkers != null) {\n for (int i = this.progressMarkers.size() - 1; i >= 0; i--) {\n if (identifiers.contains(progressMarkers.get(i))) {\n return i;\n }\n }\n }\n\n return -1;\n }", "private int lastNotNull() {\n\t\treturn (!this.checkEmpty()) ? findLast() : 0;\n\t}", "public static void main(String[] args) {\n ArrayList<String> arrlist = new ArrayList<String>(5);\n\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// use add() method to add values in the list\n arrlist.add(\"G\");\n arrlist.add(\"E\");\n arrlist.add(\"F\");\n arrlist.add(\"M\");\n arrlist.add(\"E\");\n\t\n System.out.println(\"Size of list: \" + arrlist.size());\n boolean f = arrlist.contains(\"F\");\n System.out.println(\"Arraylsit contains F in it :\"+f);\n\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// let us print all the values available in list\n int retval1=arrlist.indexOf(\"E\");\n System.out.println(\"The first occurrence of E is at index = \" + retval1);\n \n \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Retrieving the index of last occurrence of element \"E\"\n int retval2=arrlist.lastIndexOf(\"E\");\n System.out.println(\"The last occurrence of E is at index \" + retval2);\n }", "@Test\r\n\tvoid testLast() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.last();\r\n\t\tassertEquals(3, output);\r\n\t}", "public int lastIndexOf(Object o) {\n\t\tint index = -1;\r\n\t\tfor(int i = 0; i < size; i++) {\r\n\t\t\tif(getNode(i).getData().equals(o))\r\n\t\t\t\tindex = i;\r\n\t\t} return index;\r\n\t}", "@Override\n public int lastIndexOf(Object o) {\n for (int i = size - 1; i >= 0; i++) {\n if (o.equals(data[i])) {\n return i;\n }\n }\n return -1;\n }", "private Pair getLastOccurrence(Object o) {\n\t\tNode p, q = null;\n\t\tint k, qK = -1;\n\n\t\tif (o != null) {\n\n\t\t\tfor (k = 0, p = mHead.next; k < mSize; p = p.next, k++)\n\t\t\t\tif (o.equals(p.data)) {\n\t\t\t\t\tq = p;\n\t\t\t\t\tqK = k;\n\t\t\t\t}\n\t\t} else {\n\t\t\tfor (k = 0, p = mHead.next; k < mSize; p = p.next, k++)\n\t\t\t\tif (o.equals(p.data)) {\n\t\t\t\t\tq = p;\n\t\t\t\t\tqK = k;\n\t\t\t\t}\n\t\t}\n\n\t\treturn new Pair(q, qK);\n\n\t}", "public static String getLastWord(ArrayList<String> s) {\n int i = s.size();\n return s.get(i - 1);\n }", "static int findLastPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the last target from right\n if(mid==nums.length-1 ||nums[mid]<nums[mid+1])\n return mid;\n else{\n //there are more targets available at right\n left=mid+1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public int lastIndexOf(T obj) {\r\n Node<T> current = tail.previous();\r\n for (int i = size() - 1; i >= 0; i--) {\r\n if (current.getData().equals(obj)) {\r\n return i;\r\n }\r\n current = current.previous();\r\n }\r\n return -1;\r\n }", "public int lastIndexOf(Object o) {\n\t\tfor (int i = size - 1; i >= 0; i--) {\n\t\t\t// if o is null we check against null else use equals\n\t\t\tif (o == null ? array[i] == null : o.equals(array[i])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "protected int searchRight(double value) {\n int i = search(value);\n while (i < sequence.size() - 1 && value == sequence.get(i + 1)) {\n i += 1;\n }\n return i;\n }", "Position<T> last();", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "default T last(Predicate<? super T> predicate) {\n T result = null;\n for (T t : this) if (predicate.test(t)) result = t;\n return result;\n }", "public Object lastElement();", "public static int lastIndexOf(StringBuffer buf, String find)\r\n {\r\n return lastIndexOf(buf, find, buf.length() - 1);\r\n }", "public static <E2> E2 last (\n\t\tfinal List<E2> list)\n\t{\n\t\treturn list.get(list.size() - 1);\n\t}", "public static native long GetLast(long lpjFbxArrayVector2);", "@Test\r\n\tvoid testLast2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.last();\r\n\t\tassertEquals(-1, output);\r\n\t}", "static void find(int[] x) {\n\t\tint currentIndex = 0;\n\t\tint count = 1;\n\t\tint prevValue = x[0];\n\t\tint prevCount = 0;\n\t\t\n\t\tfor (int i = 0; i < x.length-1; i++) {\n\t\t\tif(x[i] == x[i+1]) {\n\t\t\t\tcount++;\n\t\t\t}else {\n\t\t\t\tif(count > prevCount) {\n\t\t\t\t\tprevCount = count;\n\t\t\t\t\tprevValue = x[i];\n\t\t\t\t\tcount = 1;\n\t\t\t\t}\n\n\t\t\t\tcurrentIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(count > prevCount) {\n\t\t\tprevCount = count;\n\t\t\tprevValue = x[currentIndex + 1];\n\t\t}\n\t\tSystem.out.println(String.format(\"\\nPhan tu %d xuat hien %d lan\", prevValue, prevCount));\n\t}", "public static String getLastMatch(String str) {\n String[] ls= str.split(\" \\\\- \",2);\n\n /* Matcher matcher = match_numbers.matcher(str);\n if (matcher.find()) {\n return matcher.group(1);\n }*/\n return ls[ls.length-1];\n }", "ZSkipListNode zslLastInLexRange(ZSkipList list) {\n\t\tif (!zslIsInLexRange(list)) {\n\t\t\treturn null;\n\t\t}\n\t\tZSkipListNode node = null;\n\n\t\tnode = list.getHeader();\n\t\tfor (int i = list.getLevel() - 1; i >= 0; i--) {\n\t\t\t/* Go forward while *OUT* of range. */\n\t\t\twhile (node.getLevels()[i].getForward() != null &&\n\t\t\t\t\t(zslLexValueLteMax(node.getLevels()[i].getForward().getObj()))) {\n\t\t\t\tnode = node.getLevels()[i].getForward();\n\t\t\t}\n\t\t}\n\n\t\tZSkipListNode forward = node.getLevels()[0].getForward();\n\t\tif (forward == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (!zslLexValueGteMin(forward.getObj())) {\n\t\t\treturn null;\n\t\t}\n\t\treturn node;\n\t}", "public int lastPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n start = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[end] == target) return end;\n if (nums[start] == target) return start;\n return -1;\n }", "public T removeLastOccurrence(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null \"\n + \"data in the structure.\");\n }\n int indextoremove = 0;\n int count = 0;\n boolean check = false;\n if (tail.getData().equals(data)) {\n return removeFromBack();\n }\n DoublyLinkedListNode<T> pointer = head;\n while (pointer != null) {\n if (pointer.getData().equals(data)) {\n indextoremove = count;\n check = true;\n }\n pointer = pointer.getNext();\n count += 1;\n }\n if (check) {\n return removeAtIndex(indextoremove);\n } else {\n throw new NoSuchElementException(\"That piece of data is \"\n + \"no where in the list.\");\n }\n\n }", "public int lastElement(Node node, int index) {\n\t\tListFunctions obj=new ListFunctions();\n\t\tint Node_Size=obj.calSize(node);\n\t\tif(index>Node_Size || index<=0) {\n\t\t\treturn -1;\n\t\t}\n\t\tNode current=node;\n\t\tNode runner=node;\n\t\twhile(index!=0) {\n\t\t\trunner=runner.next;\n\t\t\tindex--;\n\t\t}\n\t\t\n\t\twhile(runner!=null) {\n\t\t\tcurrent=current.next;\n\t\t\trunner=runner.next;\n\t\t}\n\t\t\n\t\treturn current.data;\n\t\t\n\t}", "public int getLastIndex() {\n return lastIndex;\n }", "public TypeHere getLast() {\n return items[size - 1];\n }", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "@Override\r\n\tpublic boolean removeLastOccurrence(Object arg0) {\n\t\treturn false;\r\n\t}", "public synchronized int search(Object arg)\n {\n int result = -1;\n for (int i=0; i<dataList.size(); i++)\n {\n Object testItem = dataList.get(i);\n if (arg.equals(testItem))\n {\n // calculate the 1-based index of the last item\n // in the List (the top item on the stack)\n result = i + 1;\n break;\n }\n }\n return result;\n }", "public int lastIndexOf(int ch) {\n/* 464 */ return this.m_str.lastIndexOf(ch);\n/* */ }", "public int getLastSubIndex() {\n\t\t\tint maxRVI = 0, subIndex = 0;\n\t\t\tfor (Map.Entry<Integer, Integer> entry : subIndices.entrySet()) {\n\t\t\t\tif (entry.getKey() < currentRVIndex) {\n\t\t\t\t\tif (entry.getKey() > maxRVI) {\n\t\t\t\t\t\tmaxRVI = entry.getKey();\n\t\t\t\t\t\tsubIndex = entry.getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn subIndex;\n\t\t}", "public int findFirstUniqueNumber (List<Integer> numberList) {\n\n ////// Solution 1:\n LinkedHashMap<Integer, Integer> occurMap = new LinkedHashMap<>();\n\n for (int number: numberList) { // O(n)\n if (occurMap.containsKey(number) && occurMap.get(number) != 0) {\n occurMap.replace(number, occurMap.get(number), 0);\n }\n occurMap.putIfAbsent(number, 1);\n }\n\n for (Map.Entry<Integer, Integer> entry: occurMap.entrySet()) {\n if (entry.getValue() == 1) {\n return entry.getKey();\n }\n }\n\n ////// Solution 2: O(n * n)\n// for (int n: numberList) {\n// if (numberList.indexOf(n) == numberList.lastIndexOf(n)) { // O(n * n)\n// return n;\n// }\n// }\n\n return -1;\n }", "public static native long RemoveLast(long lpjFbxArrayVector2);", "private nodeClass findLast(){\n nodeClass aux = pivot; \n do{\n aux=aux.next;\n }while (aux.next!=pivot);\n return aux; //esto te devuelve el ultimo nodo de la lista\n }", "public Item getLast();", "public int getLast() {\n\t\treturn last;\n\t}", "public boolean offerLast(E x) {\n\t\taddLast(x);\n\t\treturn true;\n\t}", "private int findEndIndex(){\n\t\tint end=models.size()-1;\n\t\tfor(int i=0;i<modelNames.size();i++){\n\t\t\tif(Integer.parseInt(modelNames.get(i).substring(0,8))>this.date_end)\n\t\t\t{end=i-1;break;}\n\t\t}\n\t\treturn end;\n\t}", "public static int lastIndexOf(char c, CharSequence seq) {\n int max = seq.length() - 1;\n for (int i = max; i >= 0; i--) {\n if (c == seq.charAt(i)) {\n return i;\n }\n }\n return -1;\n }", "public synchronized int lastEntryIndex() {\n return this.lastIndex;\n }", "private int getlastDistance(int x, int y) {\n\t\treturn Math.abs(lastx - x) + Math.abs(lasty - y);\n\t}", "private int findRealizerIndex (List<NodeRealizer> realizers, double y)\n {\n int index = 0;\n for (NodeRealizer nodeRealizer : realizers)\n {\n if ((nodeRealizer.getY () - GAP <= y) && (nodeRealizer.getY () + nodeRealizer.getHeight () + GAP >= y))\n {\n return index;\n }\n index++;\n }\n // not found => use first or last index\n if (y < realizers.get (0).getY ())\n {\n return 0;\n }\n else\n {\n return realizers.size () - 1;\n }\n }", "T last();", "private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }", "public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}", "public O after(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != size()-1) //is defined and not last\r\n return get(index+1);\r\n else return null;\r\n }", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "K last();", "int countDuplicateNo(int a[], int x) {\n\t\tint firstOccurrence = firstOccurrence(a, x);\n\t\tint lastOccurrence = lastOccurrence(a, x);\n\t\treturn (lastOccurrence - firstOccurrence) + 1;\n\t}", "public static <T> T getLastElement(final Iterable<T> elements) {\n\t\tT lastElement = null;\n\n\t\tfor (T element : elements) {\n\t\t\tlastElement = element;\n\t\t}\n\n\t\treturn lastElement;\n\t}", "@Test\n public void elementLocationTestIterative() {\n int elementNumber = 3;\n System.out.println(nthToLastReturnIterative(list.getHead(), elementNumber).getElement());\n }", "long getLastLogIndex();", "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 E pollLast();", "private int findLastIndex(int id) {\n\n NmpReportPoint point = DataSupport.where(\"remark <> 1 AND nmpreportdata_id = \" + id).findLast(NmpReportPoint.class);\n if (point != null) {\n int pointIndex = point.getPointIndex();\n return Math.abs(pointIndex % 10000);\n }\n\n return 0;\n }", "public synchronized int getLastTerm() {\n if(lastEntryIndex() <= 0) return 0;\n return getEntry(lastIndex).getTerm();\n }", "public String getLastItem();", "public static void main(String[] args) { \n\t\tString strOrig =\"Hello world,Hello Reader\";\n\t int lastIndex = strOrig.lastIndexOf(\"x\");\n\t \n\t if(lastIndex == - 1){\n\t System.out.println(\"Not found\");\n\t } else {\n\t System.out.println(\"Last occurrence of Hello is at index \"+ lastIndex);\n\t }\n\t\t\n\t}" ]
[ "0.7401948", "0.68629014", "0.6852278", "0.68385226", "0.6808231", "0.6706529", "0.66097647", "0.6502628", "0.64928794", "0.64901054", "0.6436059", "0.63688177", "0.6363594", "0.63626873", "0.6288935", "0.6256889", "0.6251982", "0.62164307", "0.62064207", "0.619172", "0.6190567", "0.6111506", "0.6093684", "0.60896546", "0.606578", "0.60579526", "0.60438865", "0.60278594", "0.59979576", "0.5978892", "0.5974054", "0.5941246", "0.5929276", "0.5903037", "0.5894453", "0.589252", "0.58774704", "0.58619547", "0.5844425", "0.582497", "0.5816766", "0.5816634", "0.5813216", "0.58120346", "0.5765816", "0.57568944", "0.5749686", "0.57424575", "0.57327694", "0.571452", "0.5689321", "0.56793666", "0.5654038", "0.56420267", "0.56400204", "0.56350183", "0.56308144", "0.5615516", "0.56150204", "0.5603342", "0.5594303", "0.55932623", "0.5588941", "0.55637926", "0.55395985", "0.54831105", "0.5476003", "0.54753405", "0.5468119", "0.5468062", "0.5466973", "0.5441106", "0.5433022", "0.5429218", "0.5422546", "0.5417158", "0.54148644", "0.5410411", "0.5402657", "0.5397283", "0.5391266", "0.5386727", "0.5381194", "0.5373706", "0.536951", "0.53623253", "0.5359556", "0.53511876", "0.53424996", "0.53402734", "0.53373945", "0.53357583", "0.53348213", "0.53321964", "0.5329292", "0.5318542", "0.53181154", "0.53150755", "0.5309624", "0.5308842" ]
0.72494125
1
Return iterator prior to the first node containing an item.
public LinkedListIterator<AnyType> findPrevious(AnyType x) { ListNode<AnyType> itr = header; while (itr.next != null && !itr.next.element.equals(x)) { itr = itr.next; } return new LinkedListIterator<AnyType>(itr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }", "OIterator<V> before();", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public Item next() throws XPathException {\n curr = base.next();\n if (curr == null) {\n pos = -1;\n } else {\n pos++;\n }\n return curr;\n }", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public LinkedListItr findPrevious( Object x )\n {\n ListNode itr = header;\n\n while( itr.next != null && !itr.next.element.equals( x ) )\n itr = itr.next;\n\n return new LinkedListItr( itr );\n }", "public Node findInOrderSuccessor() {\n\n return null;\n }", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "private Node getRefTo(T item){\n Node n = first;\n while(n != null && !n.value.equals(item))\n n = n.next;\n return n;\n }", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "public Iterator<DocTokenInf> getPrev(int vertex) {\n\t\tDocTokenLinkedList ll = list[vertex];\n\t\tif(ll == null)\n\t\t\treturn null;\n\t\treturn ll.iterator();\n\t}", "public Iterator<T> preorderIterator() { return new PreorderIterator(root); }", "public /*@ non_null @*/ JMLListEqualsNode<E> prepend(E item) {\n // cons() handles any necessary cloning\n return cons(item, this);\n }", "public static Node inorderSuccessor(Node x) {\n Node cursor = null;\n if (x == null) {\n return cursor;\n }\n\n if (x.right != null) {\n cursor = x.right;\n while (cursor != null) {\n cursor = cursor.left;\n }\n return cursor;\n } else {\n cursor = x.parent;\n while (cursor != null && cursor.val < x.val) {\n cursor = cursor.parent;\n }\n return cursor;\n }\n }", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "@Nonnull\n public Optional<ENTITY> next()\n {\n currentItem = Optional.of(items.get(++index));\n update();\n return currentItem;\n }", "private Node locatePrevNode(K key) { \n\t\tNode p = null; \n\t\tNode current = first; \n\t\twhile (current != null && current.getData().getKey().compareTo(key) < 0) {\n\t\t\tp = current; \n\t\t\tcurrent = current.getNext(); \n\t\t}\n\t\treturn p; \n\t}", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "@Override\n\tpublic Iterator<T> iteratorPreOrder() {\n\t\treturn null;\n\t}", "@Override\n public Iterator<Item> iterator() {\n return new DequeIterator<Item>(first);\n }", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "public IndexRecord getIteratorPrev() {\n iter = (iter == 0 ? -1 : iter - 1);\n return (iter == -1 ? null : data[iter]);\n }", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "public Item peek(){\n if(isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\n return first.item;\n }", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "@Override\n public Iterator<E> getPreorderIterator() {\n return new PreorderIterator();\n }", "public Item peek() {\r\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\r\n return first.item;\r\n }", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "public Iterator<PartialTree> iterator() {\r\n \treturn new PartialTreeListIterator(this);\r\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "private IAVLNode findPredecessor(IAVLNode node)\r\n\t{\r\n\t\t//minimum node has no predecessor\r\n\t\tif (node == minimum) \r\n\t\t\treturn null; \r\n\t\t\r\n\t\tif (node.getLeft().isRealNode()) \r\n\t\t\treturn maxPointer(node.getLeft()); \r\n\t\telse \r\n\t\t{\r\n\t\t\tIAVLNode parent = node.getParent();\r\n\t\t\twhile ((node == parent.getLeft())&&(parent != null)) \r\n\t\t\t{ \r\n\t\t\t\tnode = parent; \r\n \t\t\t\tparent = parent.getParent() ; \r\n\t\t\t}\r\n\t\t\treturn parent;\t\r\n\t\t}\r\n\t}", "@Override\n public Iterator<Item> iterator() {\n class DequeIterator implements Iterator<Item> {\n private Node node = first;\n @Override\n public boolean hasNext() {\n return node != null;\n }\n\n @Override\n public Item next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n Item item = node.item;\n node = node.next;\n return item;\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n\n }\n return new DequeIterator();\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\n\t\tNode tempRoot = root;\n\t\tinOrder(tempRoot);\n\t\treturn null;\n\t}", "public Item peek() throws NoSuchElementException\r\n {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n return heap[1]; // root siempre esta en la posicion 1\r\n }", "Iterator getPrecedingSiblingAxisIterator(Object contextNode) throws UnsupportedAxisException;", "public int getPrev(int iterator) {\n int block = iterator / (len << 1);\n iterator--;\n if (iterator < 2 * len * block) {\n block--;\n if (block < 0) return NO_ELEMENT;\n iterator = endOfBlock[block] - 1;\n }\n return iterator;\n }", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public Integer peek() {\n if (next != null) {\n return next;\n }\n\n if (iterator.hasNext()) {\n next = iterator.next();\n return next;\n }\n\n return null;\n }", "Iterable<T> followNode(T start) throws NullPointerException;", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public Node findPredecessor(int id) {\n\t\tNode n = this;\n\t\twhile (id <= n.getId() || id > n.getSuccessor().getId()) {\n\t\t\tn = n.closestPrecedingFinger(id);\n\t\t}\n\t\treturn n;\n\t}", "public Item getFirst();", "public Object getPrev() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.prev;\n\t\t} else {\n\t\t\tcurrent = start;\n\t\t}\n\t\treturn current == null ? null : current.item; //Ha nincs még start, akkor null adjon vissza\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public Item peek(){\n\t\tif(isEmpty()){\r\n\t\t\tthrow new NoSuchElementException(\"Stack Underflow\"); // if stack is empty , ,t throws an exception\r\n\t\t}\r\n\t\treturn first.item;\r\n\t}", "@Test public void preceding() {\n execute(new Add(NAME, FILE));\n query(\"(//ul)[last()]/preceding::ul\", \"\");\n query(\"(//ul)[1]/preceding::ul\", \"\");\n query(\"//ul/preceding::ul\", \"\");\n query(\"//li/preceding::li\", LI1 + '\\n' + LI1);\n }", "public void addfirst(Item item)\r\n {\r\n Node first = pre.next;\r\n Node x = new Node();\r\n x.item = item;\r\n x.prev = pre;\r\n x.next = first;\r\n pre.next = x;\r\n first.prev = x;\r\n n++;\r\n }", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public Item next() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot retrieve item from empty deque\");\n }\n Item item = current.getItem(); //item = current item to be returned\n current = current.getNext();\n return item;\n }", "boolean nextItem();", "private T getPredecessor (BSTNode<T> current) {\n\t\twhile(current.getRight() != null) {\n\t\t\tcurrent = current.getRight();\n\t\t}\n\t\treturn current.getData();\n\n\t}", "Iterable<T> followNodeAndSelef(T start) throws NullPointerException;", "private T getPredecessor(BSTNode<T> current) {\n while (current.getRight() != null) {\n current = current.getRight();\n }\n return current.getData();\n }", "public E peekFirst();", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "private\t\tMiContainerIterator getPreviousIterator()\n\t\t{\n\t\tif (startAtTop)\n\t\t\t{\n\t\t\twhile (++layerNum <= editor.getNumberOfLayers() - 1)\n\t\t\t\t{\n\t\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t\t{\n\t\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn(null);\n\t\t\t}\n\t\twhile (--layerNum >= 0)\n\t\t\t{\n\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t{\n\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t}\n\t\t\t}\n\t\treturn(null);\n\t\t}", "public Item next(){\n if(current==null) {\n throw new NoSuchElementException();\n }\n\n Item item = (Item) current.item;\n current=current.next;\n return item;\n }", "public O before(O a)\r\n {\r\n int index = indexOf(a);\r\n if (index != -1 && index != 0) //is defined and not first\r\n return get(index-1);\r\n else return null;\r\n }", "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 ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "public Iterator next() {\n return new FilterIterator(succ.iterator(), filter);\n }", "@Override\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator<Key>() {\n\t\t\tNode temp = getFirstNode();\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn temp.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key next() {\n\t\t\t\tKey k = temp.next.key;\n\t\t\t\ttemp = temp.next;\n\t\t\t\treturn k;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean hasPrevious() {\n\t\t\t\treturn !temp.equals(getFirstNode());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Key previous() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int nextIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int previousIndex() {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Key key) {\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void add(Key key) {\n\n\t\t\t}\n\t\t};\n\t}", "public Node getPredecessor(Node element) {\r\n\t\tNode predecessor = null;\r\n\t\tif (element.getLeftChild() != null) {\r\n\t\t\tpredecessor = element.getLeftChild();\r\n\t\t\tif (predecessor.getRightChild() == null) {\r\n\t\t\t\tpredecessor = element.getLeftChild();\r\n\t\t\t} else {\r\n\t\t\t\twhile (predecessor.getRightChild() != null) {\r\n\t\t\t\t\tpredecessor = predecessor.getRightChild();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No left sub tree\");\r\n\t\t\tif (element.isRoot()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tpredecessor = element;\r\n\t\t\tSystem.out.println(\"-- \" + element.getKey());\r\n\t\t\tNode rightChild = predecessor.getParent().getRightChild();\r\n\t\t\tif (rightChild == null) {\r\n\t\t\t\trightChild = predecessor.getParent();\r\n\t\t\t}\r\n\t\t\twhile (!predecessor.getParent().equals(root) && !rightChild.equals(predecessor)) {\r\n\t\t\t\tSystem.out.println(\"In loop\");\r\n\t\t\t\tpredecessor = predecessor.getParent();\r\n\t\t\t\trightChild = predecessor.getParent().getRightChild();\r\n\t\t\t\tif (rightChild == null) {\r\n\t\t\t\t\trightChild = predecessor.getParent();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (predecessor.getParent().getKey() < predecessor.getKey()) {\r\n\t\t\t\tpredecessor = predecessor.getParent();\r\n\t\t\t} else {\r\n\t\t\t\t// element is the smallest, no predecessor\r\n\t\t\t\tpredecessor = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn predecessor;\r\n\t}", "public Integer peek() {\n if (isPeeked)\n return peekedElement;\n else {\n if (!hasNext())\n return -1;\n peekedElement = iterator.next();\n isPeeked = true;\n return peekedElement;\n }\n }", "Node predecessor(T value) {\n Node x = search(value);\n if (x.value.compareTo(value) < 0) return x;\n else return predecessor(x);\n }", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn peek();\r\n\t}", "public T prev() {\n cursor = ((Entry<T>) cursor).prev;\n ready = true;\n return cursor.element;\n }", "public Integer peek() {\n List<Integer> temp = new ArrayList<>();\n \n while(iterator.hasNext()){\n \ttemp.add(iterator.next());\n }\n \n Integer result = null;\n if(temp.size() > 0){\n result = temp.get(0);\n }\n \n iterator = temp.iterator();\n return result;\n\t}", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "public Integer peek() {\n if (iter == null) {\n return null;\n }\n\n if (cur != null) {\n return cur;\n }\n\n if (iter.hasNext()) {\n cur = iter.next();\n return cur;\n } else {\n return null;\n }\n }", "HNode getPreviousSibling();", "public BSTNode<E> find (E item) {\r\n\t\tBSTNode<E> pointer = this;\r\n\t\twhile (pointer != null) {\r\n\t\t\tif (pointer.value.compareTo(item) == 0) {\r\n\t\t\t\treturn pointer;\r\n\t\t\t}\r\n\t\t\tif (pointer.value.compareTo(item) > 0) {\r\n\t\t\t\tpointer = pointer.left;\r\n\t\t\t}else if (pointer.value.compareTo(item) < 0) {\r\n\t\t\t\tpointer = pointer.right;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "public Item peek()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n return top.item;\n }", "public AIter next() {\n int p;\n return (p = start + 1) < size ? new Iter(p) : null;\n }", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "public Iterator<T> inorderIterator() { return new InorderIterator(root); }", "Node firstNode() {\r\n\t\treturn first.next.n;\r\n\t}", "public Integer peek() {\n if (hasNext()){\n if (list.isEmpty()){\n Integer next = iterator.next();\n list.add(next);\n return next;\n }else {\n return list.get(list.size()-1);\n }\n }else {\n return null;\n }\n }", "@Test(expected = NoSuchElementException.class)\n public void testPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.previous();\n }", "@Test\n public void whenAddOneToEmptyTreeThenIteratorHasNext() {\n tree.add(1);\n\n Iterator<Integer> iterator = this.tree.iterator();\n\n assertThat(iterator.next(), is(1));\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "@Override\n public T next() {\n if (nextItem == null)\n throw new NoSuchElementException();\n T item = nextItem;\n lastItem = nextItem;\n remainingItemCount.decrement();\n if (remainingItemCount.isZero())\n getNextReady();\n return item;\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "@Nonnull\n public Optional<ENTITY> previous()\n {\n currentItem = Optional.of(items.get(--index));\n update();\n return currentItem;\n }", "public\t\tMiPart\t\tgetPrevious()\n\t\t{\n\t\tMiPart obj = iterator.getPrevious();\n\t\twhile ((obj == null) || ((filter != null) && ((obj = filter.accept(obj)) == null)))\n\t\t\t{\n\t\t\tif (!hasLayers)\n\t\t\t\treturn(null);\n\t\t\tif (!iterateThroughAllLayers)\n\t\t\t\treturn(null);\n\t\t\tMiContainerIterator iter = getPreviousIterator();\n\t\t\tif (iter == null)\n\t\t\t\treturn(null);\n\t\t\titerator = iter;\n\t\t\tobj = iterator.getPrevious();\n\t\t\t}\n\t\treturn(obj);\n\t\t}", "public Item setFront(Item item) {\n // check if list is not empty:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to setFront, because DList is empty!\");\n // update the data of the first actual node (first itself is a sentinel node)\n Item oldValue = first.next.data;\n first.next.data = item;\n return oldValue;\n }", "public SequenceIterator getAnother() throws XPathException {\n return new FocusIterator((base.getAnother()));\n }", "protected Tuple fetchNext() throws NoSuchElementException, TransactionAbortedException, DbException {\n\t\t// some code goes here\n\t\tTuple ret;\n\t\twhile (childOperator.hasNext()) {\n\t\t\tret = childOperator.next();\n\t\t\tif (pred.filter(ret))\n\t\t\t\treturn ret;\n\t\t}\n\t\treturn null;\n\t}", "public StringListIterator first()\n {\n\treturn new StringListIterator(head);\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n first = new Node<Item>();\n first.item = item;\n last = first;\n } else {\n Node<Item> oldFrist = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFrist;\n oldFrist.prev = first;\n }\n N++;\n }\n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}" ]
[ "0.6534326", "0.61520994", "0.6139945", "0.60605454", "0.6060217", "0.6048254", "0.59793967", "0.58963525", "0.58615947", "0.58472884", "0.5841375", "0.5834266", "0.57981837", "0.5783341", "0.5735775", "0.57341254", "0.5718054", "0.56917167", "0.5689135", "0.56815726", "0.5621378", "0.5614751", "0.5610945", "0.56075734", "0.56035566", "0.5583113", "0.55805737", "0.5574478", "0.556723", "0.5558128", "0.55263275", "0.55174565", "0.5509792", "0.55081964", "0.55059445", "0.55056584", "0.5495797", "0.5492622", "0.5487483", "0.54829735", "0.5477846", "0.54703844", "0.54680073", "0.54600203", "0.54489714", "0.5448251", "0.54427963", "0.5442309", "0.5433416", "0.5432779", "0.5430846", "0.5425321", "0.54249775", "0.5423837", "0.541564", "0.5412755", "0.54124033", "0.541231", "0.5411563", "0.5409019", "0.53877056", "0.53873587", "0.5378649", "0.5375674", "0.5370793", "0.53688747", "0.53636396", "0.53577703", "0.5352041", "0.535038", "0.53472507", "0.5342872", "0.53425264", "0.5338177", "0.5336059", "0.5334812", "0.53173757", "0.5316943", "0.5307125", "0.5297338", "0.52940667", "0.52911323", "0.52859885", "0.528319", "0.52807385", "0.5275343", "0.5274136", "0.52712584", "0.52687305", "0.5262551", "0.52611667", "0.5258904", "0.5247704", "0.52430385", "0.52424175", "0.5238609", "0.5230718", "0.5230183", "0.52294564", "0.5220965" ]
0.579607
13
Remove the first occurrence of an item.
public void remove(AnyType x) { LinkedListIterator<AnyType> p = findPrevious(x); if (p.current.next != null) { p.current.next = p.current.next.next; // Bypass deleted node } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "Object removeFirst();", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public RNode deleteFirstOccurrence(int item) {\n\tif (item == datum() ) return next;\n\telse {\n\t if (next != null) next = next.deleteFirstOccurrence(item);\n\t return this;\n\t}\n }", "public T removeFirst();", "public E removeFirst();", "public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "public Item removeFirst() {\n if (first == null)\n throw new NoSuchElementException();\n \n final Item element = first.item;\n final Node<Item> next = first.next;\n first.item = null;\n first.next = null; // help GC\n first = next;\n if (next == null)\n last = null;\n else\n next.prev = null;\n size--;\n \n return element;\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public void removefirst()\r\n {\r\n Item item = pre.item;\r\n pre = pre.next;\r\n n--;\r\n }", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = first.item; // save item to return\n first = first.next; // delete first node\n if (first == null) {\n last = null;\n } else {\n first.previous = null;\n }\n size--;\n if (isEmpty()) {\n last = null;\n }\n assert check();\n return item; // return the saved item\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public T removeFirst() throws EmptyCollectionException;", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public Item removeLast();", "public T removeFirst() {\n return remove(sentinel.next);\n }", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Can not call removeFirst() on an empty deque\");\n }\n\n Item item = first.item;\n first = first.next;\n n--;\n if (isEmpty()) {\n last = null;\n }\n else {\n first.prev = null;\n }\n return item;\n\n }", "public E removeFirst() {\n\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public E removeFirst() {\n return pop();\n }", "public Item removeFirst() {\n //check if the DList is empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeFirst() bacause the DList instance is empty!\");\n Node oldFirst = first.next;\n Item item = oldFirst.data; \n\n // pointer re-wiring:\n Node newFirst = oldFirst.next; \n first.next = newFirst;\n newFirst.prev = first;\n oldFirst.next = null;\n oldFirst.prev = null;\n\n // check if last pointer has to be updated or not (paying the peiper):\n if(isEmpty()) {\n last.prev = first; // update the last sentinel node to point to the first sentinel node\n }\n\n // update the size: \n size--;\n\n return item;\n }", "public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }", "public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }", "public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }", "public Node removeFirst() {\r\n\t\treturn removeNode(0);\r\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "@Override\r\n\tpublic boolean removeFirstOccurrence(Object o) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}", "@Override\n public E deleteMin()\n {\n return list.removeFirst();\n }", "public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public Item removeStart() {\n if (size == 0) throw new NoSuchElementException(); // if there's no elements in circle\n else if (size == 1) return removeBreaker(); // if it's the last element\n else { // if there are two or more nodes in the circle\n Node temp = head; // saves the current head\n head = temp.next; // moves head marker\n temp.before.next = head;\n head.before = temp.before; // updates referances\n size--;\n return temp.item;\n }\n }", "public synchronized DoubleLinkedListNodeInt removeFirst() {\n\t\tDoubleLinkedListNodeInt node = getFirst();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "public U removeFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on first\r\n\t \treturn remove(0);\r\n\t }", "private E unlinkFirst(Node<E> f) {\r\n // assert f == first && f != null;\r\n final E element = f.item;\r\n final Node<E> next = f.next;\r\n f.item = null;\r\n f.next = null; // help GC\r\n first = next;\r\n if (next == null)\r\n last = null;\r\n else\r\n next.prev = null;\r\n size--;\r\n modCount++;\r\n return element;\r\n }", "default ItemStack removeOneItem() {\n return removeOneItem(StandardStackFilters.ALL);\n }", "@Override\n\tpublic T remove(T removeItem) {\n\t\t// TODO\n\t\tT item;\n\t\tint index=indexOf(removeItem);\n\t\tif (index == -1) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\titem = data[index];\n\t\t\tfor(int j=index;j<size-1;j++)\n\t\t\t\tdata[j] = data[j+1];\n\t\t\tsize--;\n\t\t\treturn item;\n\t\t}\n\t\t// Find the removeItem in the array\n\t\t// return null if not found\n\t\t// First, Store the item found in a variable\n\t\t// shift the sequence element to the blank(adjust the array)\n\t\t// decrease size by 1\n\t\t// return the stored item\n\n\t}", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "public String removeFirst() {\n\t\treturn removeAt(0);\n\t}", "public E removeFirst(){\r\n return null;\r\n }", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public void remove(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == item) {\n items[i] = null;\n return;\n }\n }\n }", "public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }", "public void removeFirst() {\n\t\t\thead = head.next;\n\t\t}", "public PersistentLinkedList<T> removeFirst() {\n return remove(0);\n }", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public T removeFirst() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currFirst = sentinel.next;\r\n Node<T> toBeFirst = currFirst.next;\r\n T currFirstVal = currFirst.getValue();\r\n toBeFirst.prev = sentinel;\r\n sentinel.next = toBeFirst;\r\n currFirst = null;\r\n size--;\r\n return currFirstVal;\r\n }", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "@Override\n public void deleteFirst() {\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = 0; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}", "protected int removeFirst() throws Exception {\n if (size > 0) {\n int temp = heap[1];\n heap[1] = heap[size];\n heap[size] = 0;\n size--;\n return temp;\n } else {\n throw new Exception(\"No Item in the heap\");\n }\n }", "public DataItem removeItem()\r\n\t{\r\n\t\tDataItem temp=itemArray[numItems-1];\r\n\t\titemArray[numItems-1]=null;\r\n\t\tnumItems--;\r\n\t\treturn temp;\r\n\t}", "public Card removeFirstCard()\n {\n return cards.remove(0);\n }", "public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }", "public DataItem removeItem()\n\t{\n\t\tDataItem temp = itemArray[numItems-1];\n\t\titemArray[numItems-1] = null;\n\t\tnumItems--;\n\t\treturn temp;\n\t}", "@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }", "synchronized public V removeOne() {\n int i = 0;\n for (; i < keys.length; i++) {\n if (keys[i] == null || keys[i] == skip) {\n continue;\n }\n break;\n }\n if (i == keys.length) {\n return null;\n }\n return (V) remove(keys[i]);\n }", "public Item deleteAtStart() { \t\n \tItem returnItem = head.item;\n \thead = head.next;\n \ttail.next = head;\n \tsize--;\n \treturn returnItem;\n }", "final void deleteFirst(int elt) {\n if (contents != null && n >= 0 && n <= contents.length){\n int[] new_contents;\n //@ loop_invariant (i <= n);\n for (int i = 0; i < n; i++) {\n if (contents[i] == elt) {\n n--;\n new_contents = new int[contents.length];\n arraycopy(contents, 0, new_contents, 0, i);\n arraycopy(contents, i+1, new_contents, i, n-i);\n contents = new_contents;\n return;\n }\n }\n }\n }", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "private T unlinkFirst(final int idx) {\r\n\t\tfinal T element = serializer.getRandomAccess(idx);\r\n\t\tfinal int next = getNextPointer(idx);\r\n\t\tfirst = next;\r\n\t\tif (next == -1) {\r\n\t\t\tlast = -1;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(next, -1);\r\n\t\t}\r\n\t\tdeleteElement(idx);\r\n\t\tsize--;\r\n\t\tmodCount++;\r\n\t\treturn element;\r\n\t}", "public void deleteFirst() {\r\n\t\tif(isEmpty()) return;\r\n\t\thead = head.next;\r\n\t}", "T removeFromHead() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromHead();\n }", "Node removeFirst() {\n\t\tNode tmp = head;\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public Item takeItem(int index) {\n return items.remove(index);\n }", "public E removeFirst() throws NoSuchElementException{\n if(size == 0)\n throw new NoSuchElementException();\n else{\n E removedElement = head.getNext().getElement();\n head.setNext(head.getNext().getNext());\n head.getNext().setPrevious(head);\n size--;\n return removedElement;\n }\n }", "public void removeFirst(){\r\n\t\tNode removedHead = head;\r\n\t\thead = head.next;\r\n\t\tremovedHead = null;\r\n\t}", "@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }", "default ItemStack removeOneItem(Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n ItemStack stack = im.removeItem(filter);\n if (!InvTools.isEmpty(stack))\n return stack;\n }\n return InvTools.emptyStack();\n }", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "@Override\n public void removeFirstObjectInAdapter() {\n Log.d(\"LIST\", \"removed object!\");\n rowItem.remove(0);\n arrayAdapter.notifyDataSetChanged();\n }", "public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public void popFirst() {\n this.head = this.head.next;\n this.length--;\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }", "public void deleteFirst() {\r\n\t\tif(isEmpty()) return;\r\n\t\t// if there is only element in the Deque, then deleting it will make front and rear point to invalid positions again\r\n\t\telse if( rear==front) front = rear = -1;\r\n\t\t// else increment the front pointer\r\n\t\telse front = (front+1)%maxSize;\r\n\t}", "@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }" ]
[ "0.8124812", "0.77813673", "0.7642432", "0.7637581", "0.75555396", "0.74784", "0.73648924", "0.73228943", "0.73153096", "0.72929865", "0.7280261", "0.7173665", "0.7112929", "0.7095792", "0.70660245", "0.7061142", "0.70455295", "0.70293605", "0.7020801", "0.7019287", "0.7018162", "0.69885844", "0.6962311", "0.6952167", "0.69414717", "0.69205064", "0.69153464", "0.6888899", "0.68809426", "0.68736273", "0.6873345", "0.68639904", "0.6855562", "0.6848966", "0.6823511", "0.6804492", "0.68043613", "0.68027943", "0.67712253", "0.67635274", "0.6748336", "0.66807663", "0.6667777", "0.6662952", "0.66575295", "0.6652652", "0.66344815", "0.66200006", "0.6606351", "0.65654105", "0.65371984", "0.65333796", "0.6506876", "0.6495856", "0.6481889", "0.6468966", "0.6457533", "0.6443458", "0.64428467", "0.6440611", "0.6421414", "0.64012337", "0.6392922", "0.63658726", "0.63216925", "0.63206726", "0.6315578", "0.63111246", "0.63011795", "0.62832177", "0.62801445", "0.6277679", "0.6271955", "0.62517625", "0.62452126", "0.6244223", "0.62335503", "0.6230991", "0.62292194", "0.6208788", "0.6201762", "0.6200839", "0.6198725", "0.619079", "0.61451507", "0.6140388", "0.61378974", "0.6128169", "0.61268157", "0.6120182", "0.6118692", "0.6117392", "0.6110761", "0.6104049", "0.6094724", "0.6086289", "0.60824776", "0.6069592", "0.60676754", "0.60581946", "0.60557765" ]
0.0
-1
Clone: replicate a list in another list.
public LinkedList<AnyType> clone() { LinkedList<AnyType> clone = new LinkedList<AnyType>(); LinkedListIterator<AnyType> itr = this.first(); LinkedListIterator<AnyType> cloneitr = clone.zeroth(); while (itr.current != null) { clone.insert(itr.current.element, cloneitr); itr.advance(); cloneitr.advance(); } return clone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<E> clone();", "public MultiList<R,S> copy(){\n MultiList<R,S> retVal = new MultiList<R,S>();\n retVal.putAll_forCopy(this);\n return retVal;\n }", "public static <T> List<T> clone(List<T> a) {\n\t\tList<T> newList = new ArrayList<T>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tnewList.add(elt);\n\t\t\n\t\treturn newList;\n\t}", "public ArrayList<E> clone() {\n ArrayList<E> temp = new ArrayList<E>();\n temp.size = this.size;\n temp.capacity = this.capacity;\n temp.list = Arrays.copyOf(this.list, this.list.length);\n return temp;\n }", "public static ArrayList<ItemStack> cloneList(ArrayList<ItemStack> list) {\r\n\t\tArrayList<ItemStack> cloned = new ArrayList<ItemStack>(list.size());\r\n\t\tfor(ItemStack is : list) {\r\n\t\t\tcloned.add(new ItemStack(is.getItem(), is.getCount()));\r\n\t\t}\r\n\t\treturn cloned;\r\n\t}", "public void cloneList(){\n Node insert = Head;\n while(insert != null){\n Node temp = new Node(insert.data);\n temp.next = insert.next;\n insert.next = temp;\n insert = temp.next;\n }\n\n //Adjusting arbitrary pointers\n\n Node move = Head;\n while(move != null){\n move.next.arbt = move.arbt;\n move = move.next.next;\n }\n\n //cloning linked list by removing copied nodes from original list\n\n copyList = Head.next;\n move = Head.next;\n while(move.next != null){\n move.next = move.next.next;\n move = move.next;\n }\n }", "ArrayList deepCopyShapeList(List aShapeList){\n ArrayList newList = new ArrayList();\r\n\r\n if (aShapeList.size() > 0) {\r\n Iterator iter = aShapeList.iterator();\r\n\r\n while (iter.hasNext())\r\n newList.add(((TShape)iter.next()).copy());\r\n }\r\n return\r\n newList;\r\n}", "Prototype makeCopy();", "private static void copy(List<? super Number> dest, List<? extends Number> src) {\n for (int i = 0; i < src.size(); i++) {\n dest.set(i, src.get(i));\n //dest.add(src.get(i));\n }\n }", "private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }", "@Override\n\tpublic NamedList<T> clone() {\n\t\tArrayList<Object> newList = new ArrayList<Object>(nvPairs.size());\n\t\tnewList.addAll(nvPairs);\n\t\treturn new NamedList<T>(newList);\n\t}", "public static void copy(java.util.List arg0, java.util.List arg1)\n { return; }", "public Object clone()\n {\n ElementInsertionList clone = new ElementInsertionList();\n\n for (int i = 0; i < list.size(); i++)\n {\n clone.addElementInsertionMap((ElementInsertionMap)list.elementAt(i));\n }\n\n return clone;\n }", "public ArrayList<Variable> deepCopy (ArrayList<Variable> forCopy){\n ArrayList<Variable> copy = new ArrayList<>();\n for (Variable var: forCopy){ // for all variables in the arrayList clone\n Variable newVar = var.clone();\n copy.add(newVar);\n }\n return copy;\n }", "public Function clone();", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "@Override\n\tpublic Object clone() {\n\t\tRemoteInfoList list = new RemoteInfoList();\n\t\tfor (RemoteInfo rInfo : rInfoList) {\n\t\t\tlist.add((RemoteInfo)rInfo.clone());\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tPrototype prototype=null;\n\t\t\n\t\tprototype=(Prototype)super.clone();\n//\t\tprototype.lists=(ArrayList<String>) this.lists.clone();\n\t\n\t\t\n\t\treturn prototype;\n\t}", "private ArrayList<Concert> cloneConcertList(){\n ArrayList<Concert> tempConcertList = new ArrayList<Concert>();\n tempConcertList.addAll(concertList);\n return tempConcertList;\n }", "@Override\n public IntArrayList clone() {\n try {\n /* */\n final IntArrayList cloned = (IntArrayList) super.clone();\n cloned.buffer = buffer.clone();\n return cloned;\n } catch (CloneNotSupportedException e) {\n throw new RuntimeException(e);\n }\n }", "public Object clone() throws CloneNotSupportedException\n\t{\n Playlist clone = new Playlist();\n for(int i = 0; i < numOfSongs; i++)\n {\n try\n {\n clone.addSong((SongRecord)this.getSong(i+1).clone(), i+1);\n } catch (IllegalArgumentException | FullPlaylistException | EmptyPlaylistException e)\n {\n e.printStackTrace();\n }\n }\n return clone;\n\t}", "public static <T> List<T> clone(List<T> list, PropertyFilter propertyFilter) {\n\t\tList<T> clonedList = new ArrayList<T>(list.size());\n\t\tcloneCollection(list, clonedList, propertyFilter);\n\t\treturn clonedList;\n\t}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static void main(String[] args) {\n\r\n\t\tLinkedList<String> ll = new LinkedList<String>();\r\n\t\tll.add(\"My\");\r\n\t\tll.add(\"name\");\r\n\t\tll.add(\"is\");\r\n\t\tll.add(\"Sumit\");\r\n\t\r\n\t\tSystem.out.println(\"fisrt List:\"+ll);\r\n\t\t\r\n\t\tLinkedList<String> ll_sec = new LinkedList<String>();\r\n\t\tll_sec = (LinkedList<String>) ll.clone();\r\n\t\tSystem.out.println(\"Second List After cloning:\"+ll_sec);\r\n\t}", "public java.util.ArrayList getClones();", "Object clone();", "Object clone();", "public Object clone() {\r\n//STUB BEGIN\r\n \t/*\r\n DoubleLinkedList clone = null;\r\n try { \r\n \tclone = (DoubleLinkedList) super.clone();\r\n } catch (CloneNotSupportedException e) { \r\n \tthrow new InternalError();\r\n }*/ //JBSE still does not implement Object.clone\r\n \tDoubleLinkedList clone = new DoubleLinkedList();\r\n//STUB END\r\n\r\n // Put clone into \"virgin\" state\r\n//INSTRUMENTATION BEGIN\r\n //clone.header = new Entry(null, null, null);\r\n clone.header = new Entry(null, null, null, clone);\r\n//INSTRUMENTATION END\r\n clone.header.next = clone.header.previous = clone.header;\r\n clone.size = 0;\r\n clone.modCount = 0;\r\n\r\n // Initialize clone with our elements\r\n for (Entry e = header.next; e != header; e = e.next)\r\n clone.add(e.element);\r\n\r\n return clone;\r\n }", "public static ArrayList<ConfigurableItemStack> copyList(List<ConfigurableItemStack> list) {\n ArrayList<ConfigurableItemStack> copy = new ArrayList<>(list.size());\n for(ConfigurableItemStack stack : list) {\n copy.add(new ConfigurableItemStack(stack));\n }\n return copy;\n }", "public d clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n c[] cVarArr = new c[size];\n for (int i = 0; i < size; i++) {\n cVarArr[i] = ((c) arrayList.get(i)).clone();\n }\n return new d(cVarArr);\n }", "private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter, String... patterns) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, patterns));\n\t\t}\n\t}", "public Object clone() throws CloneNotSupportedException\n {\n // shallow copy\n SongSublist newObject = (SongSublist)super.clone();\n // deep copy\n newObject.subs = (ArrayList<SongEntry>)subs.clone();\n\n return newObject;\n }", "private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tSet<Object> exploredEntities = new HashSet<Object>();\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, exploredEntities));\n\t\t}\n\t}", "@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-110),\n Long.valueOf(78),\n Order.getDefault(),\n \"08618abe-660a-4e54-bad6-818ca0dfef42\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = subtenantpolicygrouplistoptions1.clone();\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Override\n\tpublic SecuredRDFList copy();", "@SuppressWarnings(\"All\")\n public <T> void copy(MyList<? super T> to, MyList<? extends T> from) {\n\n System.out.println(\"from size \" + from.size);\n for (int i = 0; i < from.getSize(); i++) {\n to.add(from.getByIndex(i));\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tCustomerList mylist = (CustomerList) super.clone();\n\t\ttry {\n\t\t\n\t\t\tmylist.m_prodList = (HashMap<Product,Integer>) m_prodList.clone();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Clone problem\");\n\t\t}\n\t\t\t\n\t\treturn mylist;\n\t}", "public static Node CopyList(Node head)\n {\n Node current = head; // used to iterate over original list\n Node newList = null; // head of the new list\n Node tail = null; // point to last node in new list\n \n while (current != null)\n {\n // special case for the first new node\n if (newList == null)\n {\n newList = new Node(current.data, newList);\n tail = newList;\n }\n else\n {\n // add each node at tail\n tail.next = new Node(current.data, tail.next);\n \n // advance the tail to new last node\n tail = tail.next;\n }\n current = current.next;\n }\n \n return newList;\n }", "@Override\n\tpublic Spielfeld clone() {\n\t\tint[] mulden = new int[this.getMulden().length];\n\t\t\n\t\tfor(int i = 0; i < this.getMulden().length; i++) {\n\t\t\tmulden[i] = this.getMulden()[i];\n\t\t}\n\t\t\n\t\treturn new Spielfeld(mulden);\n\t}", "private static void shuffleJoinSwapAndcloneLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\n\t\tLinkedList<Integer> list1 = new LinkedList<Integer>();\n\t\tlist.add(60);\n\t\tlist.add(70);\n\t\tlist.add(80);\n\t\tlist.add(90);\n\t\tlist.add(100);\n\t\tSystem.out.println(\"LinkedList is : \" + list1);\n\n\t\t// clone the LinkedList\n\t\tSystem.out.println(\"shuffle the element in the LinkedList \" + list);\n\n\t\t// Shuffle all numbers in LinkedList\n\t\tCollections.shuffle(list);\n\t\tSystem.out.println(\"shuffle the element in the LinkedList \" + list);\n\n\t\t// swap two numbers in LinkedList\n\t\tCollections.swap(list, 01, 04);\n\t\tSystem.out.println(\"Swapping the element in the LinkedList \" + list);\n\n\t}", "public static ArrayList<String> copy(ArrayList<String> original) {\n\t\tArrayList<String> copy = new ArrayList<String>();\r\n\t\tfor (int i = 0; i < original.size(); i++) {\r\n\t\t\tcopy.add(original.get(i));\r\n\t\t}\r\n\t\treturn copy;\r\n\t}", "public abstract Object clone() ;", "public Vector clone()\r\n {\r\n Vector<O> v = new Vector<O>();\r\n \r\n VectorItem<O> vi = first;\r\n while (vi != null)\r\n {\r\n v.pushBack (vi.getObject());\r\n vi = vi.getNext();\r\n }\r\n \r\n return v;\r\n }", "public DoubleLinkedList clone() {\n\n\t\tDoubleLinkedList l = new DoubleLinkedList();\n\t\tDLNode n = head;\n\t\twhile (n != null) {\n\t\t\tif (n.val != Integer.MIN_VALUE) {\n\t\t\t\tl.pushBack(n.val);\n\t\t\t} else {\n\t\t\t\tl.pushBackRecursive(n.list.clone());\n\t\t\t}\n\t\t\tn = n.next;\n\t\t}\n\t\tl.elements = this.elements;\n\n\t\treturn l;\n\n\t}", "public abstract Object clone();", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public Object clone() throws CloneNotSupportedException {\r\n super.clone();\r\n return new JMSCacheReplicator(replicatePuts, replicateUpdates,\r\n replicateUpdatesViaCopy, replicateRemovals, replicateAsync, asynchronousReplicationInterval);\r\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "public LinkedList clone(){\n\t\tif(firstNode == null) return new LinkedList(null);\n\t\treturn new LinkedList(firstNode.clone());\n\t}", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "public void clone(ItemStack itemStack) {\n this.clone = true;\n cloneItem = itemStack.clone();\n }", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "private List<Flight> copyFlights(List<Flight> flights) {\n\t\tList<Flight> newList = new LinkedList<>();\n\t\tnewList.addAll(flights);\n\t\treturn newList;\n\t}", "@Override\n public ChainedKTypeList<KType> clone()\n {\n try\n {\n /* #if ($TemplateOptions.KTypeGeneric) */\n @SuppressWarnings(\"unchecked\")\n /* #end */\n final ChainedKTypeList<KType> cloned = (ChainedKTypeList<KType>) super.clone();\n cloned.buffers = buffers.clone();\n return cloned;\n }\n catch (CloneNotSupportedException e)\n {\n throw new RuntimeException(e);\n }\n }", "public Restaurant clone() {\r\n return new Restaurant(this);\r\n }", "@Test\n\tpublic void testCopy2() {\n\n\t\tint[] arr = { 1, 2, 3, 7, 8 }; // this list\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet copied = listObj2.copy();\n\t\tcopied.add(-1);\n\t\tString expectedObj2 = \"1, 2, 3, 7, 8\";\n\t\tString expectedCopied = \"-1, 1, 2, 3, 7, 8\";\n\t\tint expectedObj2Size = 5;\n\t\tint expectedCopiedSize = 6;\n\n\t\tassertEquals(expectedObj2Size, listObj2.getSize());\n\t\tassertEquals(expectedObj2, listObj2.toString());\n\n\t\tassertEquals(expectedCopiedSize, copied.getSize());\n\t\tassertEquals(expectedCopied, copied.toString());\n\n\t}", "@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece piece: row){\n rowOfPieceCopies.add(piece.copy());\n }\n pieceCopies.add(rowOfPieceCopies);\n }\n return new Board(pieceCopies,new ArrayList<>(myNeighborhoods),myEmptyState);\n }", "public Object clone()\n {\n IObserverList list = new IObserverList();\n \n for ( int i = 0; i < observers.size(); i++ )\n list.observers.addElement( observers.elementAt(i) );\n\n return list; \n }", "DataSource clone();", "public SinglyLinkedList<E> clone() throws CloneNotSupportedException{\n\t\tSinglyLinkedList<E> other = (SinglyLinkedList<E>) super.clone(); //This is a safe casting\n\t\tif(size > 0) {\n\t\t\tother.head = new Node<>(head.getElement(), null); //X\n\t\t\tNode<E> walk = head.getNext(); // Walk through remainfer of the original list\n\t\t\tNode<E> otherTail = other.head; //This remembers the most recently created node\n\t\t\t\n\t\t\twhile(walk != null) {\n\t\t\t\tNode<E> newest = new Node<>(walk.getElement(), null);\n\t\t\t\totherTail.setNext(newest);\n\t\t\t\totherTail = newest;\n\t\t\t\twalk = walk.getNext();\n\t\t\t}\n\t\t}\n\t\treturn other;\n\t}", "public INodo copy(){\n INodo copia = new FuncionMultiplicacion(getRaiz(), getNHijos());\n copia.setEtiqueta(getEtiqueta());\n for (INodo aux : getDescendientes()){\n copia.incluirDescendiente(aux.copy());\n }\n return copia;\n }", "private List<positionTicTacToe> deepCopyATicTacToeBoard(List<positionTicTacToe> board)\n\t{\n\t\tList<positionTicTacToe> copiedBoard = new ArrayList<positionTicTacToe>();\n\t\tfor(int i=0;i<board.size();i++)\n\t\t{\n\t\t\tcopiedBoard.add(new positionTicTacToe(board.get(i).x,board.get(i).y,board.get(i).z,board.get(i).state));\n\t\t}\n\t\treturn copiedBoard;\n\t}", "public SinglyLinkedList<E> clone() throws CloneNotSupportedException {\n SinglyLinkedList<E> other = (SinglyLinkedList<E>) super.clone(); // safe cast\n if (size > 0) { // we need independent chain of nodes\n other.head = new Node<>(head.getElement(), null);\n Node<E> walk = head.getNext(); // walk through remainder of original list\n Node<E> otherTail = other.head; // remember most recently created node\n while (walk != null) { // make a new node storing same element\n Node<E> newest = new Node<>(walk.getElement(), null);\n otherTail.setNext(newest); // link previous node to this one\n otherTail = newest;\n walk = walk.getNext();\n }\n }\n return other;\n }", "private static <T> List<List<T>> getSubsets( int indexToStart, int subSize, List<T> toClone, List<T> origList ) {\n List<List<T>> allSubsets = new ArrayList<List<T>>();\n for ( int i = indexToStart; i <= origList.size() - subSize; i++ ) {\n List<T> subset = new ArrayList<T>( toClone );\n subset.add( origList.get( i ) );\n if ( subSize == 1 ) {\n allSubsets.add( subset );\n } else {\n allSubsets.addAll( getSubsets( i + 1, subSize - 1, subset, origList ) );\n }\n }\n return allSubsets;\n }", "public DiceManager clone() {\n DiceManager cloneDiceList = new DiceManager();\n cloneDiceList.setDicesList(this.dicesList);\n return cloneDiceList;\n }", "public List<GraphNode> copy(List<GraphNode> graph) {\n Map<GraphNode, GraphNode> map = new HashMap<>();\n List<GraphNode> res = new ArrayList<>();\n for(GraphNode node : graph) {\n subCopy(node, map, res);\n }\n return res;\n }", "public List<GraphNode> copy(List<GraphNode> graph) {\n Map<GraphNode, GraphNode> map = new HashMap<>();\n List<GraphNode> res = new ArrayList<>();\n for(GraphNode node : graph) {\n subCopy(node, map, res);\n }\n return res;\n }", "public ArrayList <ChickenAbstract> getCloneChickens(ArrayList <ChickenAbstract> chickens){\n\n\t\tArrayList <ChickenAbstract> cloneChickens= new ArrayList <ChickenAbstract> ();\n\t\t//clones all the chickens including their eggs\n\t\tfor (int i=0; i <chickens.size(); i++){\n\t\t\tChickenAbstract chicken= chickens.get(i);\n\n\t\t\tcloneChickens.add(new ChickenAbstract (chicken.getX(),chicken.getY()));\n\t\t\tArrayList <EggAbstract> eggs = chickens.get(i).getEggs();\n\t\t\t//clones each chickens eggs \n\t\t\tfor(EggAbstract egg: eggs)\n\t\t\t{\n\t\t\t\tcloneChickens.get(i).addEgg(new EggAbstract (egg.getX(),egg.getY(),egg.getRadius(),egg.getVx(),egg.getVy()));\n\t\t\t}\n\n\n\t\t}\n\n\t\treturn cloneChickens;\n\t}", "@SuppressWarnings(\"unchecked\")\n public static <T extends Entity<?>> List<T> clone(Collection<T> entities) {\n if (entities == null) {\n return null;\n }\n List<T> result = new ArrayList<T>(entities.size());\n for (T entity : entities) {\n result.add((T) entity.clone());\n }\n return result;\n }", "public Vec clone();", "public Sequence cloneSequence() {\n Sequence sequence = new Sequence(getId());\n for (Itemset itemset : itemsets) {\n sequence.addItemset(itemset.cloneItemSet());\n }\n return sequence;\n }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Carta clone(){\n\t\treturn new Carta(palo, numero);\n\t}", "public Matrix copy() {\n Matrix m = new Matrix(rows, cols);\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n m.getMatrix().get(i)[j] = this.get(i, j);\n }\n }\n return m;\n }", "private static void copyRemainder(ArrayList<Integer> inputList, int inputIndex, ArrayList<Integer> outList, int outIndex) {\n while (inputIndex < inputList.size()) {\n outList.set(outIndex, inputList.get(inputIndex));\n\n inputIndex++;\n outIndex++;\n }\n }", "public void testCloning() throws CloneNotSupportedException {\n TaskSeries s1 = new TaskSeries(\"S1\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S2\");\n s2.add(new Task(\"T1\", new Date(33), new Date(44)));\n s2.add(new Task(\"T2\", new Date(55), new Date(66)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeriesCollection c2 = (TaskSeriesCollection) c1.clone();\n s1.add(new Task(\"T3\", new Date(21), new Date(33)));\n TaskSeries series = c2.getSeries(\"S1\");\n series.add(new Task(\"T3\", new Date(21), new Date(33)));\n }", "private Instances deepCopy(Instances data) {\n Instances newInst = new Instances(data);\n\n newInst.clear();\n\n for (int i = 0; i < data.size(); i++) {\n Instance ni = new DenseInstance(data.numAttributes());\n for (int j = 0; j < data.numAttributes(); j++) {\n ni.setValue(newInst.attribute(j), data.instance(i).value(data.attribute(j)));\n }\n newInst.add(ni);\n }\n\n return newInst;\n }", "public abstract Pessoa clone();", "public static LinkedList<Integer> copyR(ArrayList<Integer> orig, int start, LinkedList<Integer> myList) {\n if(orig.size() == 0 || start >= orig.size()) {\n return myList;\n } else {\n //if bigger, add the element at start into the LinkedList INCLUDE IN RETURN\n myList.addLast(orig.get(start));\n return copyR(orig, start + 1, myList);\n }\n }", "public Clone() {}", "@Override\n public MultiCache clone () {\n return new MultiCache(this);\n }", "@Override\n\tpublic MultiArrayDimension clone() {\n\t\treturn new MultiArrayDimension(this.label, this.size, this.stride);\n\t}", "public static void main(String[] args) throws CloneNotSupportedException\n {\n ArrayList<String> companies = new ArrayList<String>();\n companies.add(\"Baidu\");\n companies.add(\"Tencent\");\n companies.add(\"Ali\");\n WorkExprience workExprience = new WorkExprience(companies);\n String nameString = new String(\"Tom\");\n String genderString = new String(\"male\");\n Resume resume = new Resume(nameString, 23, genderString, workExprience);\n System.out.println(\"Source Resume\");\n resume.printResum();\n \n ArrayList<String> companies1 = new ArrayList<String>();\n companies1.add(\"Google\");\n companies1.add(\"Microsoft\");\n companies1.add(\"Oracle\");\n Resume copyResume = (Resume)resume.clone();\n String nameString1 = new String(\"Jerry\");\n String genderString1 = new String(\"Fmale\");\n copyResume.setName(nameString1);\n copyResume.setAge(20);\n copyResume.setGender(genderString1);\n copyResume.getWorkExprience().setCompanyArrayList(companies1);\n System.out.println();\n System.out.println(\"Source Resume\");\n resume.printResum();\n System.out.println();\n System.out.println(\"Copy Resume\");\n copyResume.printResum();\n }", "public List<Person> copyPersons() {\n\t\tList<Person> copyPersons = new ArrayList<Person>(personsOrig.size());\t// NOTE this is still an empty List with initial capacity of personsOrig size\r\n\t\t// unfortunately there isn't a clone or factory method in Collections. So have to create \"target\" collection with some garbage\r\n\t\tPerson p;\r\n\t\tfor (int i = 0; i < personsOrig.size(); i++) {\r\n\t\t\tp = new Person(\"\", 0);\r\n\t\t\tcopyPersons.add(p);\r\n\t\t}\r\n\t\tCollections.copy(copyPersons, personsOrig);\r\n\t\tSystem.out.println(\"persons copy:\" + copyPersons);\r\n\r\n\t\tCollections.sort(copyPersons);\r\n\t\tSystem.out.println(\"Sorted copy:\" + copyPersons);\r\n\r\n\t\tSystem.out.println(\"Original persons:\" + personsOrig);\r\n\t\treturn copyPersons;\r\n\t}", "public Object clone() {\n\t\tSubstrateNetwork s = new SubstrateNetwork(this.listNode, this.listLink);\n\t\treturn s;\n\t}", "public T cloneDeep();", "public Object clone() {\n return this.copy();\n }", "public Node clone02(Node head) {\n Node originNode = head, tmp = null;\n\n while (originNode != null) {\n tmp = originNode.next;\n originNode.next = new Node(originNode.data);\n originNode.next.next = tmp;\n originNode = tmp;\n }\n\n originNode = head;\n while (originNode != null) {\n originNode.next.random = originNode.random.next;\n originNode = originNode.next != null ? originNode.next.next : originNode.next;\n }\n\n originNode = head;\n tmp = head.next;\n Node cloneNode = tmp;\n\n while (originNode != null) {\n originNode.next = originNode.next != null ? originNode.next.next : originNode.next;\n originNode = originNode.next;\n\n tmp.next = tmp.next != null ? tmp.next.next : tmp.next;\n tmp = tmp.next;\n }\n\n return cloneNode;\n }", "public IVenda clone ();", "public Results copy()\n {\n Results copy = new Results();\n for(Object object : results) {\n copy.add( object );\n }\n return copy;\n }", "public static void copyContents(int [][] myOtherList, int[][] myDataGrid){\n\t\n\t\n\t\n\tfor(int i=0; i<3; i++){\n\t\tfor(int j=0; j<5; j++){\n\t\t\tmyOtherList[i][j] = myDataGrid[i][j];\n\t\t}\n\t}\n}", "private List<Cloudlet> cloneCloudlets(final Vm sourceVm) {\n final List<Cloudlet> sourceVmCloudlets = sourceVm.getCloudletScheduler().getCloudletList();\n final List<Cloudlet> clonedCloudlets = new ArrayList<>(sourceVmCloudlets.size());\n for (Cloudlet cl : sourceVmCloudlets) {\n clonedCloudlets.add(cloneCloudlet(cl, cl.getLength() - cl.getFinishedLengthSoFar()));\n }\n\n return clonedCloudlets;\n }", "public RandomListNode copyRandomList(RandomListNode head) {\n if (head == null) return null;\n\n // replicate next nodes\n RandomListNode p = head;\n while (p != null) {\n RandomListNode copy = new RandomListNode(p.label);\n copy.next = p.next;\n p.next = copy;\n p = copy.next;\n }\n\n // replicate random nodes\n p = head;\n while (p != null) {\n RandomListNode copy = p.next;\n if (p.random != null) copy.random = p.random.next;\n p = copy.next;\n }\n\n // decouple two lists\n p = head;\n RandomListNode newHead = head.next;\n while (p != null) {\n RandomListNode copy = p.next;\n p.next = copy.next;\n if (copy.next != null) copy.next = copy.next.next;\n p = p.next;\n }\n return newHead;\n }", "public void testCloning() throws CloneNotSupportedException {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = (XIntervalDataItem) item1.clone();\n }", "Component deepClone();" ]
[ "0.7271108", "0.68785596", "0.67550516", "0.6614276", "0.65419686", "0.6466117", "0.6462305", "0.6398051", "0.6389744", "0.6373206", "0.6365013", "0.63634056", "0.6347991", "0.6326754", "0.6319286", "0.6237317", "0.6231725", "0.6175381", "0.614144", "0.60948193", "0.6084246", "0.60674334", "0.5996884", "0.5996884", "0.5996884", "0.5996884", "0.59942335", "0.59822595", "0.5936919", "0.5936919", "0.59197277", "0.59111804", "0.5907134", "0.58852124", "0.5843932", "0.5841911", "0.5826541", "0.58229065", "0.5818418", "0.58069825", "0.5801055", "0.5795741", "0.5773488", "0.5764895", "0.5762799", "0.57479167", "0.570417", "0.56926227", "0.5676483", "0.5658092", "0.56557506", "0.5640632", "0.5640129", "0.5638954", "0.5635936", "0.5631113", "0.5626414", "0.56062484", "0.5597546", "0.5588003", "0.5583651", "0.55726504", "0.55554175", "0.55545175", "0.55448455", "0.5538904", "0.553108", "0.5529549", "0.55129415", "0.55083156", "0.55083156", "0.5503984", "0.55034643", "0.55031615", "0.550248", "0.54997104", "0.5495508", "0.5491385", "0.54895025", "0.54871815", "0.5487088", "0.54830724", "0.54775524", "0.54748315", "0.54600537", "0.5444902", "0.5444621", "0.5443733", "0.5437432", "0.5434319", "0.5418281", "0.54134655", "0.54127777", "0.54125786", "0.5407894", "0.5399256", "0.5397062", "0.53942245", "0.53896177", "0.53822434" ]
0.64547724
7
FindMinimum: find the smallest element in the list
public AnyType findMinimum(Comparator<AnyType> cmp) { LinkedListIterator<AnyType> itr = first(); AnyType minimum = itr.current.element; while (itr.current.next != null) { //System.out.println(front.element); if (cmp.compare(itr.current.next.element, minimum) < 0) { minimum = itr.current.next.element; } itr.advance(); } return minimum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int min(ArrayList<Integer> list) {\r\n int minValue = Integer.MAX_VALUE;\r\n\r\n for (int i : list) {\r\n if (i < minValue) {\r\n minValue = i;\r\n\r\n }\r\n\r\n }\r\n return minValue;\r\n }", "public T findMin();", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "public static int getMin(List<Integer> list) {\n int min = Integer.MAX_VALUE;\n for (int i = 0; i != list.size(); ++i) {\n if (list.get(i) < min)\n min = list.get(i);\n }\n return min;\n }", "public static void minEl1(List<Integer> list){\n int min = list.stream().reduce(Integer.MAX_VALUE, (x,y)->x<y ? x : y);\n System.out.println(min);\n }", "private static int getMinIndex(List<Integer> list) {\n return IntStream.range(0, list.size())\n .boxed()\n .min(Comparator.comparingInt(list::get)).\n orElse(list.get(0));\n }", "public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}", "int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}", "private static int findMin(ListNode[] lists) {\n\t\tint length = lists.length;\n\t\tint min = -1;\n\t\tif (length > 0) {\n\t\t\tmin = 0;\n\t\t\tfor (int i = 1; i < length; i++) {\n\t\t\t\tif (lists[i] != null && (lists[min] == null || lists[min].val > lists[i].val))\n\t\t\t\t\tmin = i;\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}", "private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}", "public int findMin()\n {\n if(isEmpty())\n {\n throw new NoSuchElementException(\"Underflow Exeption\");\n }\n return heap[0];\n }", "int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public int getMin() {\n int length = minList.size();\n int returnValue = 0;\n if (length > 0) {\n returnValue = minList.get(length - 1);\n }\n return returnValue;\n \n }", "int getMin( int min );", "int min();", "public int minMinValue(List<List<Integer>> positions) {\n int value = Integer.MAX_VALUE;\n for (final List<Integer> values : positions) {\n final int temp = Collections.min(values).intValue();\n if (temp < value) {\n value = temp;\n }\n }\n return value;\n }", "public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public int findSmallest() {\n\t/*\n\t Cases:\n\t If last or only node, return datum\n\n\t Otherwise:\n\t Return whatever is smaller: \n\t The datum of the current node,\n\t or the datum of the next node \n\t*/ \n\tif (next == null) return datum; \n\telse {\n\t int nextDatum = next.findSmallest();\n\t if (nextDatum < datum) return nextDatum;\n\t else return datum;\n\t}\n }", "public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}", "public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "public AnyType findMin() {\n\t\treturn elementAt(findMin(root));\n\t}", "private static int indexOfSmallest(int[] a, int start) {\n int minNum = a[start];\n int minIndex = start;\n for(int i=start; i<a.length; i++){\n if(a[i]<minNum){\n minNum = a[i];\n minIndex = i;\n }\n\n }\n return minIndex;\n }", "static <E> int minPos( List<E> list, Comparator<E> fn ) {\n if ( list.isEmpty() ) {\n return -1;\n }\n E eBest = list.get( 0 );\n int iBest = 0;\n for ( int i = 1; i < list.size(); i++ ) {\n E e = list.get( i );\n if ( fn.compare( e, eBest ) < 0 ) {\n eBest = e;\n iBest = i;\n }\n }\n return iBest;\n }", "public int extractMinimum() {\n \n //O(log_2(w))\n int min = minimum();\n\n if (min == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(min);\n \n return min;\n }", "public int getMin(ArrayList<Integer> values) {\r\n int min = 10000;\r\n for (int i = 0; i < values.size(); i++) {\r\n if (values.get(i) < min) {\r\n min = values.get(i);\r\n }\r\n }\r\n return min;\r\n }", "public static <V extends Comparable<? super V>> V minValueKey(List<V> list)\n\t{\n\t\tCollections.sort(list);\n\t\treturn list.get(0);\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public AnyType findMin() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMin(root).element;\r\n\t}", "@Test\n\tpublic void testMin() {\n\t\tList<Integer> tempList = new ArrayList<Integer>();\n\t\ttempList.add(50);\n\t\ttempList.add(20);\n\t\ttempList.add(60);\n\t\tInteger result = SWE619A.min(tempList);\n\t\tassertEquals(new Integer(20), result);\n\t\t\n\t}", "private void regularMinDemo() {\n int min = numbers[0];\n for(int i = 1; i < numbers.length; i++) {\n if (numbers[i] < min) min = numbers[i];\n }\n System.out.println(min);\n }", "int Smallest()throws EmptyException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyException();\n\t\t}\n\t\tNode curr = head;\n\t\tint min = curr.data;\n\t\twhile (curr.next != null) {\n\t\t\tif (curr.next.data < min) {\n\t\t\t\tmin = curr.next.data;\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn min;\n\t}", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "public Integer findSmallestNumber() {\r\n\t\t// take base index element as smallest number\r\n\t\tInteger smallestNumber = numArray[0];\r\n\t\t// smallest number find logic\r\n\t\tfor (int i = 1; i < numArray.length; i++) {\r\n\t\t\tif (numArray[i] != null && numArray[i] < smallestNumber) {\r\n\t\t\t\tsmallestNumber = numArray[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// return smallest number from the given array\r\n\t\treturn smallestNumber;\r\n\t}", "public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }", "int findMin(int[] arr){\n\t\tint minimum=1000;\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i]<minimum) {\n\t\t\t\tminimum=arr[i];\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "public T min();", "private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}", "int getMin() \n\t{ \n\t\tint x = min.pop(); \n\t\tmin.push(x); \n\t\treturn x; \n\t}", "Object getMinimumValue(Object elementID) throws Exception;", "public int findSmallest(){\n\tint smallest = 0;\n\tint smallestVal = 0;\n\tint place = 0;\n\tif (size > 0){\n\t place = head+1;\n\t if (place == nums.length){\n\t\tplace = 0;\n\t }\n\t smallest = place;\n\t smallestVal = nums[place];\n\t if (place <= tail){\n\t\twhile (place <= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t }else{\n\t\twhile(place >= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t\tbreak;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t\twhile (place <= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t }\n\t}\n return smallest;\n }", "static int findMin0(int[] nums) {\r\n \r\n // **** sanity check ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[nums.length - 1] > nums[0])\r\n return nums[0];\r\n\r\n // **** loop looking for the next smallest value ****\r\n for (int i = 0; i < nums.length - 1; i++) {\r\n if (nums[i] > nums[i + 1])\r\n return nums[i + 1];\r\n }\r\n\r\n // **** min not found ****\r\n return -1;\r\n }", "public E findMin(){\n if(!isEmpty()){\n AvlNode<E> node = findMin(root);\n return (E)node.value;\n } else {\n return null;\n }\n }", "private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }", "static int findMin(int[] nums) {\r\n \r\n // **** sanity check(s) ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** initialization ****\r\n int left = 0;\r\n int right = nums.length - 1;\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[right] > nums[left])\r\n return nums[left];\r\n\r\n // **** binary search approach ****\r\n while (left < right) {\r\n\r\n // **** compute mid point ****\r\n int mid = left + (right - left) / 2;\r\n\r\n // **** check if we found min ****\r\n if (nums[mid] > nums[mid + 1])\r\n return nums[mid + 1];\r\n\r\n if (nums[mid - 1] > nums[mid])\r\n return nums[mid];\r\n\r\n // **** decide which way to go ****\r\n if (nums[mid] > nums[0])\r\n left = mid + 1; // go right\r\n else\r\n right = mid - 1; // go left\r\n }\r\n\r\n // **** min not found (needed to keep the compiler happy) ****\r\n return 69696969;\r\n }", "private Node findMinimum(Node current)\r\n\t{\r\n\t\t// Current Node is the minimum\r\n\t\tif(current.getLeftChild() == null)\r\n\t\t{\r\n\t\t\treturn current;\r\n\t\t}\r\n\t\t// Current Node is not the minimum so keep traversing the left subtree of current Node\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn findMinimum(current.getLeftChild());\r\n\t\t}\r\n\t}", "public static int findPosMin(List<Integer> values, int start) {\r\n int bestGuessSoFar = start;\r\n for (int i = start + 1; i < values.size(); i++) {\r\n if (values.get(i) < values.get(bestGuessSoFar)) {\r\n bestGuessSoFar = i;\r\n } // if\r\n } // for\r\n return bestGuessSoFar;\r\n }", "int min(int... args) {\n\n if (args.length == 0) {\n throw new IllegalArgumentException(\"too few arguments\");\n }\n\n int min = args[0];\n\n for (int arg : args) {\n if (arg < min) {\n min = arg;\n }\n }\n return min;\n }", "public static double findMin(double[] da) {\n\n\t\t// fjern = \"0.0\" når metoden implementeres for ikke få forkert minimum\n\t\tdouble min = da[0];\n\t\t\n\t\t// TODO\n\t\t// OPPGAVE - START\n\t\tfor(double d : da) {\n\t\t\tif(d < min) {\n\t\t\t\tmin = d;\n\t\t\t}\n\t\t}\n\t\t// OPPGAVE - SLUT\n\t\treturn min;\n\t}", "public int extractMinimum() {\n if (size == 0) {\n return Integer.MIN_VALUE;\n }\n if (size == 1) {\n size--;\n return arr[0];\n }\n\n MathUtil.swap(arr, 0, size - 1);\n size--;\n minHeapify(0);\n return arr[size];\n }", "public AnyType findMin() {\n if (isEmpty())\n throw new UnderflowException();\n return root.element;\n }", "public static void minWithSort(List<Integer> list){\n Optional<Integer> max = list.stream().sorted().reduce((x, y)->x);\n System.out.println(max);\n }", "public static int findMinimum(int[] array) {\n if (array == null || array.length == 0) {\n return Integer.MIN_VALUE;\n }\n int left = 0;\n int right = array.length -1;\n int element = findPivot(array, left, right);\n return element;\n }", "public static int findMin (int [] A, int startIndex) {\n if (startIndex == A.length - 1) {\n return A[startIndex];\n } else {\n return Math.min(A[startIndex],\n findMin(A, startIndex + 1));\n }\n }", "static int min(int a, int b) { return a < b ? a : b; }", "public static int min(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n if( m > a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}", "private AvlNode<E> findMin(AvlNode<E> node){\n if(node.left == null){\n return node;\n } else {\n return findMin(node.left);\n }\n }", "int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }", "private int getMinIndex(List<Integer> cost) {\n int min = cost.get(0);\n int index = 0;\n for (int i = 1; i < cost.size(); i++) {\n if (cost.get(i) < 0) {\n continue;\n }\n if (cost.get(i) < min) {\n min = cost.get(i);\n index = i;\n }\n }\n return index;\n }", "public int findMin(int[] nums) {\n int n = nums.length;\n int l = 0;\n int r = n - 1;\n int m;\n while (l + 1 < r) {\n m = (l + r) / 2;\n if (nums[m] > nums[l]) {\n l = m;\n }\n else if (nums[m] < nums[r]) {\n r = m;\n }\n }\n \n return Math.min(nums[0], Math.min(nums[l], nums[r]));\n }", "public AVLNode findMin() {\n\t\tif (this.empty()) {\n\t\t\treturn null;\n\t\t}\n\t\tAVLNode min = (AVLNode) this.root;\n\t\twhile (min.getLeft().getHeight() != -1) {\n\t\t\tmin = (AVLNode) min.getLeft();\n\t\t}\n\t\treturn min;\n\t}", "private static int findMin(int startPos,int[] x){\n\t\tint result = startPos;\n\t\tfor(int i= startPos;i<x.length;i++){\n\t\t\tif(x[i]<x[result]){\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "public AnyType findMin( ) throws Exception\r\n\t{\r\n\t\tif( isEmpty( ) )\r\n\t\t\tthrow new Exception( );\r\n\t\treturn findMin( root ).element;\r\n\t}", "public int findMin(int[] num) {\n \t\n \tif (num.length == 1) {\n \t return num[0];\n \t}\n \t\n \tint up = num.length - 1,\n \t low = 0,\n \t mid = (up + low) / 2;\n \twhile (up > low) {\n \t if (mid + 1 < num.length && mid - 1 >= 0 && num[mid] < num[mid - 1] && num[mid] < num[mid + 1]) {\n \t return num[mid];\n \t }\n \t if (num[mid] > num[up]) {\n \t low = mid + 1;\n \t } else {\n \t up = mid - 1;\n \t }\n \t \n \t mid = (up + low) / 2;\n \t}\n \treturn num[mid];\n\t}", "private static Key min(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey min = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(min) < 0) {\n\t\t\t\tmin = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "private static int getMin(int[] original) {\n int min =original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] < min) min = original[i];\n }\n return min;\n }", "@Test\n public void min() {\n assertEquals(2103, SuggestionUtil.min(2103, 2103, 2103));\n\n // EP: two numbers same and one different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2103));\n\n // EP: all three numbers different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2105));\n }", "private int findMin(int[] nums) {\n if (nums == null || nums.length == 0) return -1;\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] >= nums[left] && nums[mid] > nums[right]) {\n left = mid + 1;\n } else if (nums[mid] == nums[right]) {\n while (mid < right && nums[mid] == nums[right]) {\n right--;\n }\n } else {\n right = mid;\n }\n }\n return nums[left];\n }", "public ArrayList<Integer> min(int index)\n\t{\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tif(4*index + 3 >= size)\n\t\t{\n\t\t\tarray2.add(0, 0) ;\n\t\t\treturn array2;\n\t\t}\n\t\tint smallerIndex;\n\t\tint smallerIndex2;\n\t\tint smallest = 0;\n\n\t\tif(4*index + 6 < size)\n\t\t{\n\t\t\tif(array[4*index+6] != null)\n\t\t\t{\n\n\t\t\t\tsmallerIndex = grandChildMin(4*(index)+3, 4*index + 4);\n\t\t\t\tsmallerIndex2 = grandChildMin(4*(index)+5, 4*index + 6);\n\t\t\t\tsmallest = grandChildMin(smallerIndex, smallerIndex2);\n\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\t\t\t}\n\t\t}\n\t\tif(4*index+5 < size)\n\t\t{\n\t\t\tif(array[4*index+5] != null && array[4*index+6] == null)\n\t\t\t{\n\n\t\t\t\tsmallerIndex = grandChildMin(4*(index)+3, 4*index + 4);\n\t\t\t\tsmallest = grandChildMin(smallerIndex, 4*index+5);\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\n\n\t\t\t}\n\t\t}\n\t\tif(4*index+4 < size)\n\t\t{\n\t\t\tif(array[2*index + 2] != null )\n\t\t\t{\n\n\t\t\t\tsmallerIndex = grandChildMin(4*(index)+3, 4*(index)+4);\n\t\t\t\tsmallest = grandChildMin(smallerIndex, 2*index+2);\n\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\tarray2.add(1, 0);\n\t\t\t\treturn array2;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsmallest = grandChildMin(4*(index)+3, 4*index + 4);\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\t\t\t}\n\t\t}\n\n\n\t\tif(4*index+3 < size)\n\t\t{\n\n\t\t\tif(array[2*index + 2] != null)\n\t\t\t{\n\n\t\t\t\tsmallest = grandChildMin(4*index+3, 2*index + 2);\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\tarray2.add(1, 0);\n\t\t\t\treturn array2;\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tsmallest = 4*index +3;\n\t\t\t\tarray2.add(0, smallest) ;\n\t\t\t\treturn array2;\n\t\t\t}\n\n\n\t\t}\n\t\t\n\t\treturn array2;\n\n\t}", "public final boolean searchMinimum(){\r\n\t\tif (!initialized()) minimum=true;\r\n\t\treturn minimum;\r\n\t}", "private Node findSmallest(Node curr) {\n Node prev = null;\n while(curr != null && !curr.isNull) {\n prev = curr;\n curr = curr.left;\n }\n return prev != null ? prev : curr;\n }", "public void testFindMin() {\r\n assertNull(tree.findMin());\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n assertEquals(\"act\", tree.findMin());\r\n tree.remove(\"act\");\r\n assertEquals(\"apple\", tree.findMin());\r\n }", "Double getMinimumValue();", "public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public int findMinimum(int[] numbers, int length)\n {\n }", "public E extractMin() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tE minVal = heap.get(0);\n\t\t\theap.set(0, heap.get(heap.size() - 1)); // Move last to position 0\n\t\t\theap.remove(heap.size() - 1);\n\t\t\tminHeapify(heap, 0);\n\t\t\treturn minVal;\n\t\t}\n\t}", "public double getMinimumDistance() {\n double l = Double.POSITIVE_INFINITY;\n int stop = getDistanceEnd();\n\n calculateDistances();\n\n for (int i = 0; i < stop; i++) {\n l = Math.min(l, distances[i]);\n }\n\n return l;\n }", "public E extractMin() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tE minVal = heap.get(0);\n\t\t\theap.set(0, heap.get(heap.size()-1)); // Move last to position 0\n\t\t\theap.remove(heap.size()-1);\n\t\t\tminHeapify(heap, 0);\n\t\t\treturn minVal;\n\t\t}\n\t}", "public int findMin(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n if (nums.length == 1) {\n return nums[0];\n }\n int l = 0;\n int r = nums.length - 1;\n while (l < r) {\n int m = (l + r) / 2;\n if (m > 0 && nums[m] < nums[m - 1]) {\n return nums[m];\n }\n if (nums[l] <= nums[m] && nums[m] > nums[r]) {\n l = m + 1;\n } else {\n r = m - 1;\n }\n }\n return nums[l];\n }", "private int smallestF(){\r\n int smallest = 100000;\r\n int smallestIndex = 0;\r\n int size = _openSet.size();\r\n for(int i=0;i<size;i++){\r\n int thisF = _map.get_grid(_openSet.get(i)).get_Fnum();\r\n if(thisF < smallest){\r\n smallest = thisF;\r\n smallestIndex = i;\r\n }\r\n }\r\n return smallestIndex;\r\n }", "public int peekMin() \n {\n\tfor ( int i = 0; i < queue.size(); i++ ) {\n\t if ( queue.get( i + 1 ) == null ) {\n\t\treturn (int) queue.get(i);\n\t }\n\t}\n\t\n\t//nothing to peek at!\n\tif ( queue.isEmpty() ) {\n\t throw new NoSuchElementException();\n\t}\n\n\treturn 0;\n }", "private static <T extends Comparable <? super T>> int findMinPos(List <T> list, int from, int to){\r\n\t\tif (list.isEmpty()) return -1;\r\n\t\tif (from < 0 || to > list.size()) throw new IllegalArgumentException();\r\n\t\tT currentMin = list.get(from);\r\n\t\tint currentMinPos = from;\r\n\t\tfor (int i = from; i < to; i++){\r\n\t\t\tif (list.get(i).compareTo(currentMin) < 0){\r\n\t\t\t\tcurrentMin = list.get(i);\r\n\t\t\t\tcurrentMinPos = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentMinPos;\r\n\t}", "public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public T getMin() {\n\t\tif (heapSize > 0) {\n\t\t\treturn lstEle.get(0);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int min()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tint minNumber = array[0];\n\t\t\tfor (int index = 0; index < arraySize; index++) \n\t\t\t{\n\t\t\t\tif (array[index] < minNumber)\n\t\t\t\t{\n\t\t\t\t\tminNumber = array[index];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn minNumber;\n\t\t}\n\t\tSystem.out.println(\"Syntax error, array is empty.\");\n\t\treturn -1;\n\n\t}", "public E findMin() {\n Node<E> temp = root;\n // while loop will run until there is no longer a node that has a left child.\n // temp is then assigned to the next node in the left child and will return\n // the node with the minimum value in the BST. The node that does not have a left\n // child will be the minimum value.\n while(temp.left != null){\n temp = temp.left;\n }\n return temp.getInfo();\n }", "private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}", "private double min(double[] vector){\n if (vector.length == 0)\n throw new IllegalStateException();\n double min = Double.MAX_VALUE;\n for(double e : vector){\n if(!Double.isNaN(e) && e < min)\n min = e;\n }\n return min;\n }", "double getMin();", "double getMin();", "public static int min(int[] theArray) {\n\n //sets a starting value is used if use the alternative code.\n int smallest = theArray[0];\n\n //Converts the array to a list\n List<Integer> values = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n\n Collections.min(values);\n\n //get the smallest by streaming the list and using min which gets the min value by using the Integer Comparator.comparing().\n //which means it will loop through the array and compare all the values for the smallest values\n smallest = values.stream().min(Integer::compare).get();\n\n ////Alternative code does the same thing.\n// for (int number : theArray) {\n//\n// if (smallest > number) {\n// smallest = number;\n// }\n// }\n\n return smallest;\n\n }", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }", "private <T extends Number> T computeMin(final Collection<T> inputCollection) {\n\r\n\t\tT res = null;\r\n\r\n\t\tif (!inputCollection.isEmpty())\r\n\t\t\tfor (final T t : inputCollection)\r\n\t\t\t\tif (res == null || t.longValue() < res.longValue())\r\n\t\t\t\t\tres = t;\r\n\r\n\t\treturn res;\r\n\t}", "public static int min(int[] a) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n int min = a[0];\n \n if (a.length > 1) {\n for (int i = 1; i < a.length; i++) {\n if (a[i] < min) {\n min = a[i];\n }\n }\n }\n return min;\n }" ]
[ "0.79499006", "0.78106", "0.76992613", "0.7679457", "0.7636719", "0.7585943", "0.7490005", "0.741718", "0.7406841", "0.7405406", "0.7383102", "0.7322413", "0.7319519", "0.73173", "0.7266102", "0.7258135", "0.7251738", "0.7240444", "0.7205912", "0.7187289", "0.71789455", "0.7151536", "0.71500576", "0.71360236", "0.71015394", "0.7086335", "0.7046281", "0.7037161", "0.7033906", "0.7022315", "0.7022021", "0.70084196", "0.7007485", "0.69954985", "0.69928926", "0.6991685", "0.69867736", "0.6986289", "0.696086", "0.6954664", "0.6954054", "0.6953046", "0.69376886", "0.6923747", "0.69163114", "0.69117755", "0.6905854", "0.68905854", "0.6888919", "0.6888822", "0.688139", "0.68778515", "0.6851219", "0.68491304", "0.68476754", "0.6835637", "0.68352026", "0.683448", "0.67928773", "0.6789904", "0.6781711", "0.67618454", "0.6758585", "0.6757449", "0.6755611", "0.67551005", "0.67539144", "0.674663", "0.6745319", "0.67394716", "0.6734483", "0.67343515", "0.67283607", "0.67042416", "0.67030156", "0.6701974", "0.6698939", "0.668999", "0.66894066", "0.66890633", "0.6687731", "0.6687419", "0.6685625", "0.6682411", "0.66750926", "0.6670385", "0.6669849", "0.6668148", "0.666498", "0.66566306", "0.6656341", "0.6654739", "0.66540086", "0.6652102", "0.66517234", "0.66517234", "0.6638946", "0.6633637", "0.6630276", "0.66292113" ]
0.7129497
24
In this routine, LinkedList and LinkedListIterator are the classes written in Section 17.2.
public static <AnyType> int listSize(LinkedList<AnyType> theList) { LinkedListIterator<AnyType> itr; int size = 0; for (itr = theList.first(); itr.isValid(); itr.advance()) { size++; } return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LinkedListIterator(){\n position = null;\n previous = null; \n isAfterNext = false;\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<T> iterator()\n\t{\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<E> iterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "@Test\n public void testListIteratorHasNext(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n assertFalse(\"testing with no next element\", list1It.hasNext());\n list1It.add(1);\n list1It.previous();\n assertTrue(\"testing with a next element\", list1It.hasNext());\n assertEquals(new Integer(1), list1It.next());\n }", "public interface ListIterator extends Iterator<Object> {\n /**\n * Checks if the previous element exists.\n *\n * @return true if this list iterator has more elements when traversing\n * the list in the reverse direction.\n */\n boolean hasPrevious();\n\n /**\n * Returns the previous element in the list and\n * moves the cursor position backwards.\n *\n * @return the previous element in the list\n */\n Object previous();\n\n /**\n *\n * @param e replaces the last element returned by next or\n * previous with the specified element.\n */\n void set(Object e);\n\n /**\n * Removes the last element returned by next or\n * previous with the specified element.\n */\n void remove();\n\n\n}", "public ListIterator<E> listIterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public Iterator<Item> iterator(){\n return this.doublyLinkedList.iterator();\n }", "public ListIterator() {current=first.next;}", "public interface LinkedListIntereface<T> {\n\n //methods used in LinkedList\n\n int getCurrentSize();\n boolean isFull();\n boolean isEmpty();\n boolean add(T newEntry);\n T remove();\n boolean remove(T anEntry);\n void clear();\n int getFrequencyOf(T anEntry);\n boolean contains(T anEntry);\n T[] toArray(Class c);\n\n}", "public interface LinkedList<T> {\n \n T getFirst();\n \n void add(T element);\n \n /**\n * Get element with the according index from a linked list.\n * @param index - index of an element in a linked list.\n * @return element with the according index from a linked list.\n */\n T get(int index);\n \n /**\n * Remove element with the according index from a linked list.\n * @param index - index of an element in a linked list\n * @return element with the according index from a linked list.\n */\n T remove(int index);\n \n T removeFirst();\n \n int size();\n \n boolean isEmpty();\n}", "public Iterator<Type> iterator() {\n return new LinkedListIterator(first);\n }", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "private LinkedList_base getLinkedList() {\n\t\treturn new LinkedList_DLLERR4();\n\t}", "public LinkedList(){\n this.size = 0;\n first = null;\n last = null;\n }", "public static void main(String[] args) {\n\t LinkedList<String> list1, list2, list3;\n\t ListIterator<String> mark;\n\n\t // construct a list\n \t list1 = new LinkedList<String>();\n \t list1.add(\"The\");\n \t list1.add(\"woman\");\n \t list1.add(\"ran\");\n \t list1.add(\"quickly\");\n \t System.out.println(\"List #1: \"+list1);\n\n\t // PART 1 -- Access and Iterators\n System.out.println(\"\\nPART 1:\");\n mark = list1.listIterator();\n\n // access first element\n System.out.println(\"First element: \"+mark.next());\n // access second element:\n System.out.println(\"Second element: \"+mark.next());\n // go backwards: second element again:\n System.out.println(\"Second element again: \"+mark.previous());\n // go backwards: first element again:\n System.out.println(\"First element again: \"+mark.previous());\n // access third element:\n mark.next(); // pass first\n mark.next(); // pass second\n\t System.out.println(\"Third element: \"+mark.next());\n\n // reset iterator to start of list:\n mark = list1.listIterator();\n\n\t // print elements in this order: first, third, second, second, first\n\t // FILL IN\n\n System.out.println(\"\\n** MY CODE **\");\n System.out.println(\"First element: \"+mark.next()); //First: The\n mark.next(); //Second: woman\n System.out.println(\"Third element: \"+mark.next()); //Third: ran\n mark.previous(); // Third: ran\n System.out.println(\"Second element: \"+mark.previous()); //Second: woman\n System.out.println(\"Second element again: \"+mark.next()); // 2nd: woman\n mark.previous();\n System.out.println(\"First element: \"+mark.previous()+\"\\n\"); // First: The\n\n // reset iterator to end of list:\n mark = list1.listIterator(list1.size());\n\t // access last element\n\t System.out.println(\"Last element: \"+mark.previous());\n\t // access second-to-last element:\n\t System.out.println(\"Second-to-last element: \"+mark.previous());\n\n\t // print elements in this order: third-to-last, third-to-last,\n // second-to-last.\n\t // FILL IN\n // mark = list1.listIterator();\n mark = list1.listIterator(list1.size());\n System.out.println(\"\\n** ANOTHER PART OF MY CODE **\");\n //mark.next();\n //mark.next();\n mark.previous();\n System.out.println(\"Third-to-last element: \"+mark.previous()); //3rd-to-last, ran\n System.out.println(\"Third-to-last element again: \"+mark.next());\n mark.previous();\n System.out.println(\"Second-to-last element: \"+mark.previous());\n\n\t // PART 2 -- Modification\n System.out.println(\"\\n\\nPART 2:\");\n\n \t // make some copies\n \t List<String> list2a;\n\n \t list2 = list1; // reference copy\n \t list2a = list1.subList(0,list1.size()); // shallow copy\n \t list3 = new LinkedList<String>(list1); // deep copy\n\n // add some elements\n list1.add(\"to\");\n list1.add(\"the\");\n list2.add(\"store\");\n list3.add(\"backwards\");\n \tSystem.out.println(\"List #1: \"+list1);\n \tSystem.out.println(\"List #2: \"+list2);\n \t// Lines below will generate an exception. Why?\n \t// When you have figured it out, comment out the lines and continue.\n \t//System.out.println(\"Prepare for something exceptional...\");\n \t//System.out.println(\"List #2a: \"+list2a);\n \tSystem.out.println(\"List #3: \"+list3);\n\n // reset iterator to start of list:\n mark = list1.listIterator();\n\n \t// change third element using iterator:\n \tmark.next(); // pass first\n mark.next(); // pass second\n mark.next(); // pass third\n mark.set(\"hopped\"); // change third\n\t System.out.println(\"List #1: \"+list1);\n\n // add new element between first and second\n mark.previous(); // reverse past third\n mark.previous(); // reverse past second\n mark.add(\"clever\");\n\t System.out.println(\"List #1: \"+list1);\n\n // remove fifth element\n mark.next(); // pass third (formerly second)\n mark.next(); // pass fourth\n mark.next(); // pass fifth\n mark.remove();\n\t System.out.println(\"List #1: \"+list1);\n\n // reset iterator to end of list:\n mark = list1.listIterator(list1.size());\n\n \t// change third-to-last element to \"over\" and print list:\n \t// FILL IN\n System.out.println(\"\\n** MY CODE **\");\n mark.previous(); //last element\n mark.previous(); //2nd to last element\n mark.previous(); //3rd to last element\n mark.remove(); // remove 3rd to last element\n mark.add(\"over\"); //add \"over\" as 3rd to last element\n System.out.println(\"List #1: \"+list1);\n\n \t// insert \"book\" in second-to-last position and print list:\n \t// FILL IN\n mark.next();\n mark.add(\"book\");\n System.out.println(\"List #1: \"+list1);\n\n \t// remove last element via iterator and print list:\n \t// FILL IN\n mark.next();\n mark.remove();\n System.out.println(\"List #1: \"+list1);\n\n\n\t // PART 3 -- List Processing\n System.out.println(\"\\n\\nPART 3:\");\n\n // make several copies of new list from an array\n Integer[] arr = {7, 3, 5, 1, 2, 9, 4, 6, 8};\n \tLinkedList<Integer> list4 = new LinkedList<Integer>(Arrays.asList(arr));\n \tLinkedList<Integer> list5 = new LinkedList<Integer>(Arrays.asList(arr));\n \tLinkedList<Integer> list6 = new LinkedList<Integer>(Arrays.asList(arr));\n ListIterator<Integer> mark2;\n System.out.println(\"List 4: \"+list4);\n\n \t// traverse list #4 -- find sum using for-each loop\n \tSystem.out.println(\"Summing list #4: \");\n int sum = 0; // sum of elements seen so far\n \tfor (Integer n:list4) {\n \t sum += n;\n \t}\n \tSystem.out.println(\"Sum is \"+sum);\n\n \t// traverse list #4 -- find product using for-each loop\n \t// FILL IN\n System.out.println(\"\\n** MY CODE **\");\n System.out.println(\"Producting list #4: \");\n int product = 1; // product of elements seen so far\n for (Integer n:list4) {\n product *= n;\n }\n System.out.println(\"Product is \"+product+\"\\n\");\n\n\n \t// traverse list #4 -- find index of minimum element using iterators\n \tSystem.out.println(\"Finding minimum of list #4: \");\n int min = Integer.MAX_VALUE; // minimum value seen so far\n // System.out.println(\"MIN VALUE SO FAR: \"+Integer.MAX_VALUE);\n int imin = -1; // index of value above\n\t for (mark2 = list4.listIterator(); mark2.hasNext(); ) {\n\t int n = mark2.next();\n if (n <= min) {\n min = n;\n imin = mark2.previousIndex();\n }\n\t}\n \tSystem.out.println(\"Minimum element \"+min+\" appears at index \"+imin);\n\n \t// traverse list -- find index of maximum element using iterators\n \t// FILL IN\n System.out.println(\"\\n** MY CODE **\");\n\n System.out.println(\"Finding maximum of list #4: \");\n int max = Integer.MIN_VALUE; //minimum value seen so far\n // System.out.println(\"MAX VALUE SO FAR: \"+ max);\n int imax = -1;\n for (mark2 = list4.listIterator(); mark2.hasNext(); ){\n int n = mark2.next();\n if (n >= max){\n max = n;\n imax = mark2.previousIndex();\n }\n }\n\n System.out.println(\"Maximum element \"+max+\" appears at index \"+imax);\n\n \t// traverse list #4 -- remove elements less than 5 using iterators\n\n \tfor (mark2 = list4.listIterator(); mark2.hasNext(); ) {\n \t int n = mark2.next();\n if (n < 5) {\n mark2.remove();\n }\n\t }\n \t// System.out.println(\"List 4: \"+list4);\n\n \t// traverse list #5 -- multiply each element x2 using iterators & set()\n \t// FILL IN\n System.out.println(\"Multiplying each element x2 in list #5: \");\n for (mark2 = list5.listIterator(); mark2.hasNext(); ) {\n int n = mark2.next();\n mark2.remove();\n n = n*2;\n mark2.add(n);\n }\n\n \tSystem.out.println(\"List 5: \"+list5);\n // Should be [14, 6, 10, 2, 4, 18, 8, 12, 16]\n\n \t// traverse list #6 -- prior to each element, insert the same value +1\n \t// FILL IN\n // Be careful -- if you do this wrong, it could end up in an\n // infinite loop and eventually run out of memory. If it does,\n // hit CTRL-C in the terminal window to kill the program.\n System.out.println(\"Prior to each element, insert the same value +1 in list #6:\");\n for (mark2 = list6.listIterator(); mark2.hasNext(); ) {\n if (list6.size() < 18){\n int n = mark2.next();\n // System.out.println(n); // n = 7\n n = n+1;\n mark2.previous();\n mark2.add(n);\n mark2.next();\n\n }\n }\n\n\t System.out.println(\"List 6: \"+list6);\n // Should be [8, 7, 4, 3, 6, 5, 2, 1, 3, 2, 10, 9, 5, 4, 7, 6, 9, 8]\n\n\n }", "public ListIterator iterator(){\n\t\treturn new ListIterator(tail.next);\n\t}", "@Test\n public void testListIterator() {\n DoubleLinkedList<Integer> list = new DoubleLinkedList<Integer>();\n for (int i = 5; i > 0; i--)\n list.addToFront(i);\n \n /* checking that we get out what we put it */\n int i = 1;\n for (Integer x: list)\n assertEquals(\"Testing value returned by iterator\", new Integer(i++), x);\n \n if (i != 6)\n fail(\"The iterator did not run through all the elements of the list\");\n }", "public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }", "@Test\n public void test6() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1352,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test6\");\n LinkedList<String> linkedList0 = new LinkedList<String>();\n SingletonListIterator<LinkedList<String>> singletonListIterator0 = new SingletonListIterator<LinkedList<String>>(linkedList0);\n Iterator<Object> iterator0 = IteratorUtils.peekingIterator((Iterator<?>) singletonListIterator0);\n assertEquals(true, iterator0.hasNext());\n }", "@Test\n public void testListIteratorAdd() {\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n list1It.add(1);\n assertEquals(\"Testing add to an empty list\", new Integer(1), list1.getBack().getElement());\n list1It.add(2);\n assertEquals(\"Testing add to list with one element\", new Integer(2), list1.getBack().getElement());\n //move cursor back two spaces\n list1It.previous();\n list1It.previous();\n list1It.next();\n list1It.add(3);\n assertEquals(\"Testing add to list with two elements\", new Integer(3), list1.getFront().getNext().getElement());\n }", "private void linkedListDemo() {\n LinkedList list = new LinkedList();\n \n // Add elements to the LinkedList\n list.add(\"Two\");\n list.add(\"Three\");\n list.add(\"Four\");\n list.add(\"Five\");\n list.add(\"Six\");\n \n // Iterate through the list\n ListIterator iterator = list.listIterator();\n \n System.out.println(\"Before adding new elements:\");\n \n while (iterator.hasNext()) {\n \n System.out.println(iterator.next());\n \n }\n \n // Add to beginning and end of existing list\n System.out.println(\"Add 'One' to the beginning and 'Seven' to the end of the list\");\n list.addFirst(\"One\");\n list.addLast(\"Seven\");\n \n // Iterate through new list\n System.out.println(\"After adding new elements:\");\n \n iterator = list.listIterator();\n \n while (iterator.hasNext()) {\n \n System.out.println(iterator.next());\n \n }\n \n // Attempt to add a new value\n System.out.println(\"Add a new value...where will it go?\");\n list.add(\"Zero\");\n \n System.out.println(list); // \"Zero\" gets added to the end of the list, unless you specify that it be inserted first\n \n // Add \"Zero,\" but to the beginning\n System.out.println(\"Add 'Zero' to the beginning of the list\");\n list.addFirst(\"Zero\");\n \n System.out.println(list);\n \n // What happens when you remove \"Zero\" if the value occurs multiple times?\n System.out.println(\"Remove 'Zero'...but which one will be removed?\");\n list.remove(\"Zero\");\n \n // It automatically removes the first occurence of the word \"Zero.\" Let's add it back to the beginning and try to get rid of the last occurence\n list.addFirst(\"Zero\");\n \n System.out.println(list);\n \n System.out.println(\"It removed the first occurrence of 'zero,' so let's add it back in and then remove the last iteration of 'Zero'\");\n list.removeLastOccurrence(\"Zero\");\n \n System.out.println(list);\n \n // Attempt to add an Integer\n System.out.println(\"Does an exception get thrown when we try to add an integer to a list of strings?\");\n list.add(1);\n \n System.out.println(list);\n \n }", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public static void main(String[] args) {\n\t\tLinkedList<Integer> linkedlist = new LinkedList<Integer>();\n\t\tlinkedlist.add(1);\n\t\tlinkedlist.add(3);\n\t\tlinkedlist.add(5);\n\t\tlinkedlist.add(7);\n\t\tlinkedlist.addFirst(0);\n\t\tlinkedlist.addLast(6);\n\t\tSystem.out.println(linkedlist);//[0, 1, 3, 5, 7, 6]\n\t\t\n\t\tlinkedlist.removeFirst();\n\t\tSystem.out.println(linkedlist);//[1, 3, 5, 7, 6]\n\t\t\n\t\tlinkedlist.removeLast();\n\t\tSystem.out.println(linkedlist);//[1, 3, 5, 7]\n\t\t\n\t\tlinkedlist.poll();\n\t\tSystem.out.println(linkedlist);//[3, 5, 7]\n\t\t\n\t\tlinkedlist.pollLast();\n\t\tSystem.out.println(linkedlist);//[3, 5]\n\t\t\n\t\tlinkedlist.add(1);\n\t\tlinkedlist.add(3);\n\t\tlinkedlist.add(2);\n\t\tlinkedlist.add(1);\n\t\t\n\t\tSystem.out.println(linkedlist);//[3, 5, 1, 3, 2, 1]\n\t\t\n\t\tlinkedlist.removeFirstOccurrence(3);\n\t\tSystem.out.println(linkedlist);//[5, 1, 3, 2, 1]\n\t\t\n\t\tlinkedlist.removeLastOccurrence(1);\n\t\tSystem.out.println(linkedlist);//[5, 1, 3, 2]\n\t\t\n\t\t//Using simple for loop\n\t\tfor(int i =0;i<linkedlist.size();i++) {\n\t\t\tSystem.out.println(\"Iterate using simple for loop \" + linkedlist.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//Using for each loop\n\t\tfor (Integer integer : linkedlist) {\n\t\t\tSystem.out.println(\"Iterate using for each loop \" + integer);\t\t\n\t\t}\n\t\t\n\t\t//Using While loop\n\t\tint i=0;\n\t\twhile(i<linkedlist.size()) {\n\t\t\tSystem.out.println(\"Iterate using for while loop \" + linkedlist.get(i));\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//Using Iterator\n\t\tIterator<Integer> iterator1 = linkedlist.iterator();\n\t\twhile(iterator1.hasNext()) {\n\t\t\tSystem.out.println(\"Iterate using for Iterator \" + iterator1.next());\n\t\t}\n\t\t\n\t\tListIterator<Integer> iterator2 = linkedlist.listIterator();\n\t\twhile(iterator2.hasNext()) {\n\t\tSystem.out.println(\"ListIterate using for Iterator \" + iterator2.next());\t\n\t\t}\n\n\t}", "public BasicListIterator<E> basicListIterator(){\n return new BasicLinkedListIterator();\n }", "public LinkedListIterator(LLNode<T> firstNode) {\r\n\t\tnodeptr = firstNode;\r\n\t}", "public Iterator begin()\n\t{\n\t\treturn new LinkedListIterator(head); \n\t}", "public ListIterator<T> listIterator() { return new DLLListIterator(); }", "private static void iterateAllELementInLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\n\t\tfor (Integer i : list)\n\t\t\tSystem.out.println(i);\n\n\t}", "public DLListIterator() {\r\n node = head;\r\n nextCalled = false;\r\n }", "public LinkedList(){\n count = 0;\n front = rear = null;\n }", "@Test\n public void test18() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1338,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test18\");\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n ResettableListIterator<Integer> resettableListIterator0 = IteratorUtils.loopingListIterator((List<Integer>) linkedList0);\n assertEquals(false, resettableListIterator0.hasPrevious());\n }", "public DoublyLinkedListIterator<T> dllIterator() {\n return new DLLIterator();\n }", "public Iterator<E> iterator()\n {\n return new CircularLinkedListIterator();\n }", "@Test\n public void testListIteratorHasPrevious(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n assertFalse(\"testing with no previous element\", list1It.hasPrevious());\n list1It.add(1);\n assertTrue(\"testing with a previous element\", list1It.hasPrevious());\n }", "@Test\n public void testListIteratorNext(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n try{\n list1It.next();\n fail(\"expected a NoSuchElementException to be thrown\");\n }\n catch(NoSuchElementException error){\n assertEquals(error.getMessage(), \"There is no next element in the list\");\n }\n list1It.add(1);\n list1It.previous();\n assertEquals(\"testing with an element in the next spot\", new Integer(1), list1It.next());\n }", "public LinkedList()\r\n {\r\n front = null;\r\n rear = null;\r\n numElements = 0;\r\n }", "public LinkedList() {\n\t\tfirst = null;\n\t}", "public Iterator<Item> iterator() { return new ListIterator(); }", "public LinkedList(){\n\t\thead = null;\n\t\ttail = null;\n\t}", "public CS228LinkedList() {\r\n\t\thead = new Node();\r\n\t\ttail = new Node();\r\n\t\thead.next = tail;\r\n\t\ttail.prev = head;\r\n\r\n\t\t// TODO - any other initialization you need\r\n\t}", "@Test\n\tpublic void test1() {\n\t\t// toArray()\n\t\tDoubleLinkedList dll = new DoubleLinkedList(getList(10));\n\t\tObject[] a = new Object[] {21, 22, 23, 24, 25};\n\t\tassertArrayEquals(dll.toArray(a), getList(10).toArray());\n\t\t\n\t\tdll = new DoubleLinkedList(getList(4));\n\t\tassertEquals(dll.toArray(a)[4], null);\n\t\t\n\t\t// addBefore()\n\t\tdll.addBefore(101, dll.header);\n\t\t\n\t\t// remove()\n\t\ttry{\n\t\t\tdll.remove(dll.header);\n\t\t}catch(NoSuchElementException e){\n\t\t\tassertEquals(e.getMessage(), null);\n\t\t}\n\t\t\n\t\tdll.remove(dll.header.next);\n\t\t\n\t\t\n\t}", "public LinkedList () {\n\t\tMemoryBlock dummy;\n\t\tdummy = new MemoryBlock(0,0);\n\t\ttail = new Node(dummy);\n\t\tdummy = new MemoryBlock(0,0);\n\t\thead = new Node(dummy);\n\t\ttail.next = head;\n\t\thead.previous = tail;\n\t\tsize = 2;\n\t}", "public static void main(String[] args) {\n LinkedList<String> ll = new LinkedList<String>();\n\n //adding a string using the reference variable\n ll.add(\"test\");\n ll.add(\"QTP\");\n ll.add(\"selenium\");\n ll.add(\"RPA\");\n ll.add(\"RFT\");\n\n //to print:\n System.out.println(\"content of LinkedList: \" +ll);\n\n //addFirst: you want to add / introduce first element\n ll.addFirst(\"Naveen\");\n\n //addLast: you want to add last element that is pointing to null\n ll.addLast(\"Automation\");\n //printing the new values\n System.out.println(\"content of LinkedList: \" +ll);\n\n\n //how to get and set values?\n System.out.println(ll.get(0)); //now its Naveen because of addFirst method. This is get value\n\n //set value\n ll.set(0, \"Tom\"); //before 0 index = Naveen, now 0 index = Tom\n System.out.println(ll.get(0)); //will print new set value. first we set and then get the value.\n\n //remove first and last element\n ll.removeFirst();\n ll.removeLast();\n System.out.println(\"linked list content: \"+ll); //will remove first and last elements. removed naveen and automation.\n\n //to remove from a specific position\n ll.remove(2);\n System.out.println(\"linked list content: \" +ll); //selenium = index 2 will be removed.\n\n System.out.println(\"*****************************\");\n /*how to iterate / print all the values of LinkedList?\n => 1. using For Loop\n 2. using advance For Loop\n 3. using iterator\n 4. using while loop\n */\n\n //using for loop\n System.out.println(\"using For loop\");\n for(int i=0; i<ll.size(); i++){\n System.out.println(ll.get(i)); //printing all the values using For loop\n }\n\n //using advance for loop : also called for each loop\n System.out.println(\"using Advance For loop\");\n for(String str : ll) { //we know all our values are String type so String, str = String reference variable, ll = linkedList object.\n System.out.println(str); //print string variables in ll object using str reference variable.\n }\n\n //using iterator\n System.out.println(\"******using iterator\");\n Iterator<String> it = ll.iterator();\n while (it.hasNext()){ //hasNext = if the next element is available\n System.out.println(it.next()); //next method will print.\n }\n\n //using while loop\n System.out.println(\"using while loop\");\n int i = 0;\n while (ll.size()>i){\n System.out.println(ll.get(i));\n i++; //if not increased it will give infinite values\n }\n\n }", "public LinkedListDemo() {\r\n }", "public LinkedList() {\n\t\titems = lastNode = new DblListnode<E>(null);\n\t\tnumItems=0;\n\t}", "@Test (expected = NoSuchElementException.class)\n public void whenSaveIntegerInSimpleLinkedList() {\n SimpleLinkedList<Integer> list = new SimpleLinkedList<>();\n list.add(2);\n list.add(4);\n list.add(6);\n assertThat(list.get(0), is(2));\n assertThat(list.get(1), is(4));\n assertThat(list.get(2), is(6));\n Iterator<Integer> iterator = list.iterator();\n assertTrue(iterator.hasNext());\n assertTrue(iterator.hasNext());\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(4));\n assertThat(iterator.next(), is(6));\n assertFalse(iterator.hasNext());\n iterator.next();\n }", "public SinglyLinkedList()\n {\n first = null; \n last = null;\n }", "@Test\n public void testLinkedList(){\n LinkedListMethods testList = new LinkedListMethods();\n testList.addItem(1);\n testList.addItem(2);\n testList.addItem(3);\n Assertions.assertEquals(3,testList.count());\n\n //Test of deletion of node\n testList.remove( 1);\n Assertions.assertEquals(2,testList.count());\n\n //Test of size lo the list\n Assertions.assertEquals(2,testList.count());\n\n //Test of add node at particular index.\n testList.addItem(1,2);\n testList.addItem(8,3);\n Assertions.assertEquals(3,testList.count());\n }", "public static void main(String[] args) {\n\t LinkedList<String> linkedlist = new LinkedList<String>();\r\n\t \r\n\t // Step2: Add elements to LinkedList\r\n\t linkedlist.add(\"Tim\");\r\n\t linkedlist.add(\"Rock\");\r\n\t linkedlist.add(\"Hulk\");\r\n\t linkedlist.add(\"Rock\");\r\n\t linkedlist.add(\"James\");\r\n\t linkedlist.add(\"Rock\");\r\n\t \r\n\t //Searching first occurrence of element\r\n\t int firstIndex = linkedlist.indexOf(\"Rock\");\r\n\t System.out.println(\"First Occurrence: \" + firstIndex);\r\n\t \r\n\t //Searching last occurrence of element\r\n\t int lastIndex = linkedlist.lastIndexOf(\"Rock\");\r\n\t System.out.println(\"Last Occurrence: \" + lastIndex);\r\n\t \r\n\t // Getting First element of the List\r\n\t Object firstElement = linkedlist.getFirst();\r\n\t System.out.println(\"First Element is: \"+firstElement);\r\n\t \t \r\n\t \r\n\t // Displaying LinkedList elements\r\n\t System.out.println(\"LinkedList elements:\");\r\n\t Iterator it= linkedlist.iterator();\r\n\t while(it.hasNext()){\r\n\t System.out.println(it.next());\r\n\t }\r\n\t \r\n\t \r\n\t // Obtaining Sublist from the LinkedList -- sublist of LinkedList using subList(int startIndex, int endIndex)\r\n\t List sublist = linkedlist.subList(2,5);\r\n\t \r\n\t // Displaying SubList elements\r\n\t System.out.println(\"\\nSub List elements:\");\r\n\t Iterator subit= sublist.iterator();\r\n\t while(subit.hasNext()){\r\n\t System.out.println(subit.next());\r\n\t }\r\n\t \r\n\t sublist.remove(\"Item4\");\r\n\t System.out.println(\"\\nLinkedList elements After remove:\");\r\n\t Iterator it2= linkedlist.iterator();\r\n\t while(it2.hasNext()){\r\n\t System.out.println(it2.next());\r\n\t }\r\n\t \r\n\t \r\n\t}", "@Test\r\n public void testRemove() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException\r\n {\r\n DoublyLinkedList<Integer> list = new DoublyLinkedList<Integer>();\r\n testLinks(list);\r\n list.insertTail(2);\r\n testLinks(list);\r\n list.insertHead(1);\r\n testLinks(list);\r\n list.insertTail(3);\r\n testLinks(list);\r\n list.insertTail(4);\r\n testLinks(list);\r\n\r\n Iterator<Integer> itr = list.iterator();\r\n assertEquals(4, list.size());\r\n assertEquals(\"[1, 2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n itr.remove();\r\n assertEquals(4, list.size());\r\n assertEquals(\"[1, 2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(1, (int)itr.next());\r\n itr.remove();\r\n assertEquals(3, list.size());\r\n assertEquals(\"[2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n itr.remove();\r\n assertEquals(3, list.size());\r\n assertEquals(\"[2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(2, (int)itr.next());\r\n itr.remove();\r\n assertEquals(2, list.size());\r\n assertEquals(\"[3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(3, (int)itr.next());\r\n itr.remove();\r\n assertEquals(1, list.size());\r\n assertEquals(\"[4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(4, (int)itr.next());\r\n itr.remove();\r\n assertEquals(0, list.size());\r\n assertEquals(\"[]\", list.toString());\r\n testLinks(list);\r\n itr.remove();\r\n assertEquals(0, list.size());\r\n assertEquals(\"[]\", list.toString());\r\n assertEquals(false, itr.hasNext());\r\n testLinks(list);\r\n }", "public ListIterator(Node node) {\n\t\tcurrent = node;\n\t}", "public LinkedListStructureofaSinglyLinkedListClass() {\n\t\theadNode=null;\n\t\tsize=0;\n\t\t\n\t}", "void operateLinkedList() {\n\n List linkedList = new LinkedList();\n linkedList.add( \"syed\" );\n linkedList.add( \"Mohammed\" );\n linkedList.add( \"Younus\" );\n System.out.println( linkedList );\n linkedList.set( 0, \"SYED\" );\n System.out.println( linkedList );\n linkedList.add( 0, \"Mr.\" );\n System.out.println( linkedList );\n\n\n }", "@Test\n public void testListIteratorSet(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n for (int i = 5; i > 0; i--)\n list1.addToFront(i);\n ListIterator<Integer> list1It = list1.iterator();\n try{\n list1It.set(99);\n fail(\"expected IllegalStateException to be thrown\");\n }\n catch(IllegalStateException exception){}\n assertEquals(new Integer(1), list1It.next());\n list1It.set(91);\n assertEquals(\"testing set after calling next()\", new Integer(91), list1It.previous());\n assertEquals(new Integer(91), list1It.next());\n assertEquals(new Integer(2), list1It.next());\n assertEquals(new Integer(3), list1It.next());\n assertEquals(new Integer(3), list1It.previous());\n list1It.set(93);\n assertEquals(\"testing set after calling previous()\", new Integer(93), list1It.next());\n list1It.add(4);\n try{\n list1It.set(94);\n fail(\"expected IllegalStateException to be thrown\");\n }\n catch(IllegalStateException exception){}\n }", "public SinglyLinkedList(){\n this.first = null;\n }", "@Test (expected = NoSuchElementException.class)\n public void whenSaveStringInSimpleLinkedList() {\n SimpleLinkedList<String> list = new SimpleLinkedList<>();\n list.add(\"1\");\n list.add(\"3\");\n list.add(\"5\");\n assertThat(list.get(0), is(\"1\"));\n assertThat(list.get(1), is(\"3\"));\n assertThat(list.get(2), is(\"5\"));\n Iterator<String> iterator = list.iterator();\n assertTrue(iterator.hasNext());\n assertTrue(iterator.hasNext());\n assertThat(iterator.next(), is(\"1\"));\n assertThat(iterator.next(), is(\"3\"));\n assertThat(iterator.next(), is(\"5\"));\n assertFalse(iterator.hasNext());\n iterator.next();\n }", "public GenLinkedList() {\r\n\t\thead = curr = prev = null;\r\n\t}", "@Override\n public ListIterator<E> iterator() {\n return new DequeueIterator();\n }", "public Linkable next();", "public MySinglyLinkedList() { }", "public static void main(String[] args) {\n\n LinkedList<String> object = new LinkedList<String>();\n object.add(\"A\");\n object.add(\"B\");\n object.addLast(\"C\");\n object.addFirst(\"D\");\n object.add(2, \"E\");\n object.add(\"F\");\n object.add(\"G\");\n System.out.println(\"Linked list : \" + object);\n\n object.remove(\"B\");\n object.remove(3);\n object.removeFirst();\n object.removeLast();\n System.out.println(\"Linked list after deletion: \" + object);\n boolean status = object.contains(\"E\");\n\n if(status)\n System.out.println(\"List contains the element 'E' \");\n else\n System.out.println(\"List doesn't contain the element 'E'\");\n\n\n\n Iterator<String> it=object.descendingIterator();\n System.out.println(object);\n while (it.hasNext())\n {\n System.out.println(it.next());\n }\n\n System.out.println(object.element());\n\n\n\n //retrive first element.\n\n //Linked List\n\n //descendingIterator give you iteratore in reverse order.\n\n\n\n\n }", "public LinkedList() {\n this.head = null;\n this.tail = null;\n }", "public Iterator<Item> iterator() { \n return new ListIterator(); \n }", "@Override\n public Iterator<Item> iterator(){return new ListIterator();}", "public MyListIterator()\n {\n forward = true;\n canRemove = false;\n left = head;\n right = head.next;\n idx = 0;\n }", "@Test\n public void testListIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "public LinkedList() {\n head = null;\n numElement = 0;\n }", "public Iterator<K> iterator()\n {\n\treturn new SkipListIterator<K>(this.head);\n }", "public ListIterator listIterator() {\n\t\treturn new ItrListaDE();\n\t}", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public WCLinkedList(){\n size=0;\n head = null;\n tail = null;\n }", "public MyLinkedList() \n\t{\n\t\t\n\t}", "@Test\n public void test6() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(581,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test6\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n iIOMetadataNode0.insertBefore((Node) iIOMetadataNode0, (Node) iIOMetadataNode0);\n NodeListIterator nodeListIterator0 = new NodeListIterator((NodeList) iIOMetadataNode0);\n assertEquals(true, nodeListIterator0.hasNext());\n \n nodeListIterator0.next();\n assertEquals(false, nodeListIterator0.hasNext());\n }", "public LinkedList()\r\n {\r\n head = null;\r\n tail = null;\r\n }", "public SinglyLinkedList() {\n this.len = 0;\n }", "public Iterator<T> iterator() { return new DLLIterator(); }", "@Override\n public Iterator<Node> iterator() {\n return this;\n }", "public LinkedList(){\n this.head = null;\n this.numNodes = 0;\n }", "public SinglyLinkedList() {\n this.head = null; \n }", "public DoubleLinkedList() {\r\n header.next = header.previous = header;\r\n//INSTRUMENTATION BEGIN\r\n //initializates instrumentation fields for concrete objects\r\n _initialSize = this.size;\r\n _minSize = 0;\r\n//INSTRUMENTATION END\r\n }", "public LinkedList() \n\t{\n\t\thead = null;\n\t\ttail = head;\n\t}", "public DoublyLinkedList() {\r\n\t\tinitializeDataFields();\r\n\t}", "public LinkedList()\n {\n head = null;\n tail = null;\n }", "public static void main(String[] args) {\n\t LinkedList<String> linkedList=new LinkedList<>();\n\t \n\t //add an element to the linkedlist\n\t linkedList.add(\"b\");\n\t \n\t //add an element to the first location of the linkedlist\n\t linkedList.addFirst(\"a\");\n\t \n\t //add an element to the end of the linkedlist\n\t linkedList.addLast(\"d\");\n\t \n\t //add an element to any location of the linkedlist\n\t linkedList.add(2, \"c\");\n\t \n\t System.out.println(linkedList);\n\t \n\t //check if the element is present in the linkedlist or not\n\t boolean isPresent=linkedList.contains(\"a\");\n\t System.out.println(\"Is 'a' present in the linkedList: \" +isPresent);\n\t isPresent=linkedList.contains(\"f\");\n\t System.out.println(\"Is 'f' present in the linkedList\" +isPresent);\n\t \n\t //get the index of a element in the list\n\t int index=linkedList.indexOf(\"c\");\n\t System.out.println(\"Index of 'f' in the list is\" +index);\n\t \n\t //get an elemnt of a particular index\n\t String element=linkedList.get(3);\n\t System.out.println(\"Element present in the index 3 is: \" +element);\n\t \n\t //get the size of the list\n\t int size=linkedList.size();\n\t System.out.println(\"size of the linked list is: \"+size);\n\t \n\t //remove one element from the list\n\t linkedList.remove(\"d\");\n\t \n\t System.out.println(linkedList);\n\t \n }", "public LinkedList () {\n\t\thead = null;\n\t\tcount = 0;\n\t}", "void next();", "@Override\n public Iterator<Item> iterator() {\n return new ListIterator();\n }", "public Iterator<LayoutNode> nodeIterator() {\n\treturn nodeList.iterator();\n }", "public LinkedList() {\n size = 0;\n head = new DoublyLinkedNode<E>(null);\n tail = new DoublyLinkedNode<E>(null);\n\n head.setNext(tail);\n tail.setPrevious(head);\n }", "public Iterator<E> iterator()\n {\n return new MyListIterator();\n }", "public static void main(String args[]) {\r\n\t\tLinkedList<String> list = new LinkedList<String>();\r\n\r\n\t\t/**\r\n\t\t * The constructor LinkedList<String>(int) is undefined\r\n\t\t */\r\n\t\t/**\r\n\t\t * Exception in thread \"main\" java.lang.Error: Unresolved compilation problems:\r\n\t\t * List cannot be resolved to a type The constructor LinkedList<String>(int) is\r\n\t\t * undefined\r\n\t\t * \r\n\t\t * at\r\n\t\t * com.collections.linkedList.LinkedListLearning.main(LinkedListLearning.java:17)\r\n\t\t */\r\n\t\t// List<String> arraylist = new LinkedList<String>(10);\r\n\r\n\t\t// Adding elements to the LinkedList\r\n\t\tlist.add(\"Harry\");\r\n\t\tlist.add(\"Ajeet\");\r\n\t\tlist.add(\"Tom\");\r\n\t\tlist.add(\"Steve\");\r\n\t\tlist.add(\"John\");\r\n\t\tlist.add(\"Tom\");\r\n\r\n\t\t// Displaying LinkedList elements\r\n\t\tSystem.out.println(\"LinkedList elements: \\n\" + list);\r\n\r\n\t\t// Adding element to the specified index\r\n\t\tlist.add(2, \"Harry\");\r\n\t\tSystem.out.println(\"After adding elements: \\n\" + list);\r\n\r\n\t\t// Adding value at the beginning\r\n\t\tlist.addFirst(\"Raj\");\r\n\t\tSystem.out.println(\"Added value at the beginning: \\n\" + list);\r\n\r\n\t\t// Adding value at the end of the list\r\n\t\tlist.addLast(\"Jerry\");\r\n\t\tSystem.out.println(\"Added value at the end of the list: \\n\" + list);\r\n\r\n\t\t// Adding element to front of Linked List(Head)\r\n\t\tlist.offerFirst(\"AddHead\");\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nAdded value at the front of the list and returns boolean value if Insertion is successful: \"\r\n\t\t\t\t\t\t+ list.offerFirst(\"AddHead\"));\r\n\r\n\t\tSystem.out.println(\"List: \" + list);\r\n\t\t// Removing first element\r\n\t\tSystem.out.println(\"Removes first value of the list: \" + list.removeFirst());\r\n\t\tSystem.out.println(\"After removing first element from the list: \" + list);\r\n\r\n\t\t// Removing Last element\r\n\t\tSystem.out.println(\"Removes last value of the list: \" + list.removeLast());\r\n\t\tSystem.out.println(\"After removing last element from the list: \" + list);\r\n\r\n\t\t// Removing element from specified index\r\n\t\tlist.remove(2);\r\n\t\tSystem.out.println(\"After removing an element from index position 2: \" + list);\r\n\r\n\t\t// Removing an element from the list\r\n\t\tlist.remove(\"Harry\");\r\n\t\tSystem.out.println(\"After removing value 'Harry' from the list: \" + list);\r\n\r\n\t\t// Removes all the elements from the list\r\n\t\tlist.clear();\r\n\t\tSystem.out.println(\"After clear() method: \" + list);\r\n\r\n\t\t// Adding elements to the LinkedList\r\n\t\tlist.add(\"Harry\");\r\n\t\tlist.add(\"Ajeet\");\r\n\t\tlist.add(\"Tom\");\r\n\t\tlist.add(\"Steve\");\r\n\t\tlist.add(\"John\");\r\n\t\tlist.add(\"Tom\");\r\n\r\n\t\tLinkedList<String> newList = new LinkedList<String>();\r\n\t\tnewList.add(\"\");\r\n\t\tnewList.add(\"Test\");\r\n\t\tnewList.add(\"\");\r\n\t\tnewList.add(\"Bella\");\r\n\t\tSystem.out.println(\"\\nThe values of newList are: \" + newList);\r\n\r\n\t\t// Adding values of List2 to List1\r\n\t\tlist.addAll(newList);\r\n\t\tSystem.out.println(\"Values appended to List1: \" + list);\r\n\r\n\t\tlist.removeAll(newList);\r\n\t\tSystem.out.println(\"Values of List2 removed from List1: \" + list);\r\n\r\n\t\t// Adding values of List2 to List1 from specified index\r\n\t\tlist.addAll(2, newList);\r\n\t\tSystem.out.println(\"Values appended to List1: \" + list);\r\n\r\n\t\t// To replace a value\r\n\t\tlist.set(2, \"Chan\");\r\n\t\tSystem.out.println(\"After replacing a value: \" + list);\r\n\r\n\t\t// To check the value is existing in list or not\r\n\t\tSystem.out.println(\"contains(\\\"Chaan\\\"): \" + list.contains(\"Chaan\"));\r\n\t\tSystem.out.println(\"contains(\\\"Chan\\\"): \" + list.contains(\"Chan\"));\r\n\t}", "public void setIterator(Iterator iterator) {\n/* 96 */ this.iterator = iterator;\n/* */ }", "public LinkedList() {\r\n front = new ListNode(null);\r\n back = new ListNode(null, front, null);\r\n front.next = back;\r\n size = 0;\r\n }", "@Test\r\n\tpublic void testListIterator() {\r\n\t\tListIterator<Munitions> iter = list.listIterator();\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tAssert.assertNotNull(iter.next());\r\n\t\t}\r\n\t\twhile (iter.hasPrevious()) {\r\n\t\t\tAssert.assertNotNull(iter.previous());\r\n\t\t}\r\n\t}", "public MyLinkedList() {\n \thead = null;\n \ttail = null;\n }", "@Override \r\n\tpublic LLNode<T> next() throws NoSuchElementException{\r\n\t\tLLNode<T> node = nodeptr;\r\n\t\tif (nodeptr == null)\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\tnodeptr = nodeptr.getNext();\r\n\t\treturn node;\r\n\t}", "@Override\n public String toString() {\n return \"LinkedList{\"\n + \"head=\" + head\n + \", numElement=\" + numElement\n + '}';\n }", "public DoubleLinkedList(){\n this.head = null;\n this.tail = null;\n this.size = 0;\n this.selec = null;\n }", "private static void iterator() {\n\t\t\r\n\t}" ]
[ "0.7574821", "0.7442649", "0.7177548", "0.6982175", "0.67684", "0.6636765", "0.66136765", "0.6612276", "0.6603501", "0.6599473", "0.65815043", "0.6578796", "0.6575678", "0.65133405", "0.64347154", "0.64268136", "0.64212567", "0.6407822", "0.6344436", "0.6335413", "0.63292646", "0.6320904", "0.63183546", "0.630223", "0.62918216", "0.62896866", "0.6261406", "0.6234764", "0.6233482", "0.62195456", "0.61830574", "0.6170521", "0.6169348", "0.61581844", "0.6138498", "0.61082685", "0.60982007", "0.6078557", "0.6078108", "0.6057725", "0.60559547", "0.6044588", "0.60438234", "0.60268676", "0.6010474", "0.60080147", "0.60022", "0.59954566", "0.5976336", "0.5970907", "0.59394485", "0.59386843", "0.5931663", "0.5922215", "0.5915579", "0.5912042", "0.5887271", "0.5886689", "0.5879157", "0.587885", "0.5864214", "0.58580595", "0.5857488", "0.5854619", "0.5852871", "0.5851273", "0.5850131", "0.58349186", "0.58302855", "0.5820317", "0.5819408", "0.58122283", "0.5812174", "0.5800891", "0.57875913", "0.57866734", "0.5783948", "0.5781369", "0.57786727", "0.5777615", "0.5775615", "0.5771067", "0.5771016", "0.5769856", "0.5761254", "0.5758067", "0.5756942", "0.57541174", "0.57492304", "0.57419676", "0.57383746", "0.5732762", "0.57299244", "0.5726972", "0.5719421", "0.5717329", "0.5710104", "0.57050264", "0.57016546", "0.56944424", "0.5693853" ]
0.0
-1
properties // constructors //
private CostHelper() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Properties(){\n\n }", "public Property()\r\n {\r\n }", "public Property() {}", "private ReadProperty()\r\n {\r\n\r\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public Property() {\n this(0, 0, 0, 0);\n }", "public void setupProperties() {\n // left empty for subclass to override\n }", "Property createProperty();", "public Property() {\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\t}", "public Propuestas() {}", "private PropertyHolder() {\n }", "public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}", "public DimensionProperties() {\n }", "private PropertySingleton(){}", "public\n YutilProperties()\n {\n super(new Properties());\n }", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "private mxPropertiesManager()\n\t{\n\t}", "private PropertiesUtils() {}", "protected NodeProperties() {\r\n }", "public PropertyCriteria() {\n\t\tsuper();\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public ApplicationResourceProperties() {\n }", "public CustomerPolicyProperties() {\n }", "Properties getProperties();", "public PSBeanProperties()\n {\n loadProperties();\n }", "public void init(Properties props) ;", "@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}", "public AbstractWorkspacebaseproperty()\n {\n }", "private PropertiesGetter() {\n // do nothing\n }", "private ConfigProperties() {\n\n }", "private DatabaseValidationProperties() {}", "public TestProperties() {\n\t\tthis.testProperties = new Properties();\n\t}", "public ManagedHsmProperties() {\n }", "private PropertySetFactory() {}", "public ApplicationDefinitionProperties() {\n }", "@Override\n\tpublic void setProperties(Properties p) {\n\t\t\n\t}", "public abstract Properties getProperties();", "public EntityPropertyBean() {}", "public Property(String name) {\n super(SOME, NONE);\n this.name = name;\n }", "public LogProfileProperties() {\n }", "public ACLPropertyList() {\n try {\n jbInit();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "private DiffProperty() {\n\t\t// No implementation\n\t}", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "public abstract AbstractProperties getProperties();", "@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}", "private StaticProperty() {}", "PropertyRealization createPropertyRealization();", "public KeyVaultProperties() {\n }", "public PropertyRefs(Properties p) {\n props = p;\n }", "public Property(Property p) {\r\n\t\tpositive = Arrays.copyOf(p.positive, p.positive.length);\r\n\t\tnegative = Arrays.copyOf(p.negative, p.negative.length);\r\n\t\tstop = Arrays.copyOf(p.stop, p.stop.length);\r\n\t\tscoringmethod = p.scoringmethod;\r\n\t\tmindistance = p.mindistance;\r\n\t}", "public Properties getProperties() { return props; }", "public PropertiesWriter() {\r\n }", "public SpotPropertyManager() {\r\n\t\tsuper();\r\n\t}", "public ApplyUpdateProperties() {\n }", "public Constructor(){\n\t\t\n\t}", "private GestionnaireLabelsProperties() {\r\n\t\tsuper();\r\n\t}", "public FileServicePropertiesProperties() {\n }", "public MarkersViewPropertyTester() {\n }", "public ViewProperty() {\n initComponents();\n }", "public LoadTestProperties() {\n }", "protected List getProperties() {\n return null;\n }", "@Override\r\n\tpublic void setProperties(Properties properties) {\n\t\t\r\n\t}", "public void setProperties(Properties properties);", "PropertyCallExp createPropertyCallExp();", "public MaintenanceWindowsProperties() {\n }", "private TerminalProperties() {\n this(new TerminalPropertiesBuilder());\n }", "@Override\n protected void updateProperties() {\n }", "public DiskRestorePointProperties() {\n }", "EProperties getProperties();", "public void init(java.util.Properties props) {\r\n }", "public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}", "public Property(Property p) {\n\t\tcity=p.getCity();\n\t\towner=p.getOwner();\n\t\tpropertyName=p.getPropertyName();\n\t\trentAmount=p.getRentAmount();\n\t\tplot= new Plot(p.plot);\n\t}", "private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}", "private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}", "public PropertiesQDoxPropertyExpander() {\n super();\n }", "public Properties getProperties()\n {\n return this.properties;\n }", "public Property(int xLength, int yWidth, int xLeft, int yTop) {\n this(xLength, yWidth, xLeft, yTop, DEFAULT_REGNUM);\n }", "@Override\n public void init() {\n\n }", "public PrimitivePropertyTest(String testName)\n {\n super(testName);\n }", "public Property(int xLength, int yWidth, int xLeft, int yTop, int regNum) {\n setXLength(xLength);\n setYWidth(yWidth);\n setXLeft(xLeft);\n setYTop(yTop);\n setRegNum(regNum);\n }", "@Override\n public void init() {\n }", "private PropertiesHelper() {\n throw new AssertionError(\"Cannot instantiate this class\");\n }", "Properties getProps()\n {\n return props;\n }", "@Override\n void init() {\n }", "private GetProperty(Builder builder) {\n super(builder);\n }", "public void initProperties() {\n propAssetClass = addProperty(AssetComponent.PROP_CLASS, \"MilitaryOrganization\");\n propAssetClass.setToolTip(PROP_CLASS_DESC);\n propUniqueID = addProperty(AssetComponent.PROP_UID, \"UTC/RTOrg\");\n propUniqueID.setToolTip(PROP_UID_DESC);\n propUnitName = addProperty(AssetComponent.PROP_UNITNAME, \"\");\n propUnitName.setToolTip(PROP_UNITNAME_DESC);\n propUIC = addProperty(PROP_UIC, \"\");\n propUIC.setToolTip(PROP_UIC_DESC);\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "Property[] getProperties();", "private SystemProperties() {}", "public DPropertyElement() {\n super(null, null);\n }", "PropertyRule createPropertyRule();", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Articulo(){\r\n\t\t\r\n\t}", "@Override\n public void updateProperties() {\n // unneeded\n }", "public Properties getProperties();", "public Property getProperty() {\n\treturn commonproperty;\r\n}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}" ]
[ "0.7945789", "0.77341944", "0.77177525", "0.7467753", "0.7385593", "0.7223875", "0.7101025", "0.70992255", "0.70787", "0.70332557", "0.7028856", "0.69796103", "0.69681823", "0.6890184", "0.68743634", "0.68084824", "0.67338204", "0.6717554", "0.6686516", "0.66792303", "0.6624467", "0.66044545", "0.65764135", "0.65732545", "0.65430236", "0.652797", "0.652724", "0.6523262", "0.6521987", "0.6509956", "0.64909166", "0.6482544", "0.648203", "0.6459405", "0.64513713", "0.6450737", "0.64355755", "0.64260215", "0.6420508", "0.64179647", "0.6405421", "0.63855076", "0.63820225", "0.6372728", "0.63644654", "0.6362557", "0.6350794", "0.63491505", "0.63437486", "0.63323075", "0.6323798", "0.6281691", "0.62713426", "0.6255461", "0.6248964", "0.62405175", "0.6232821", "0.6206938", "0.6206795", "0.6201207", "0.618294", "0.6181659", "0.6181182", "0.6178153", "0.617402", "0.61725694", "0.6169533", "0.6168719", "0.6162732", "0.6145844", "0.6140694", "0.61319166", "0.6128036", "0.6128036", "0.60944885", "0.6083181", "0.6079688", "0.6076526", "0.60689557", "0.60672617", "0.606392", "0.60609543", "0.6060351", "0.605336", "0.6046479", "0.6045876", "0.6040666", "0.6040666", "0.60374516", "0.6033752", "0.60323125", "0.60320103", "0.6027248", "0.6022964", "0.6020051", "0.60185456", "0.6018367", "0.60177463", "0.6016093", "0.60142285", "0.60142285" ]
0.0
-1
/ After becoming famous, the CodeBots decided to move into a new building together. Each of the rooms has a different cost, and some of them are free, but there's a rumour that all the free rooms are haunted! Since the CodeBots are quite superstitious, they refuse to stay in any of the free rooms, or any of the rooms below any of the free rooms. Given matrix, a rectangular matrix of integers, where each value represents the cost of the room, your task is to return the total sum of all rooms that are suitable for the CodeBots (ie: add up all the values that don't appear below a 0). / Declared as a static method just to facilitate test. To call it at main just type: System.out.println(MatrixElementsSum.exerciseEightSolution(matriz)); You have to pass a matrix as argument My solution (Using Java)
public static int exerciseEightSolution(int[][] matrix) { int sum = 0; /*Populate the matrix with random values between 0 and maxNumber and print the *generated matrix. Just to facilitate test. Not a part of the given problem. * *If you want to use your own values just change or comment these lines. */ int maxNumber = 5; Random randNumber = new Random(); for(int i = 0; i < matrix.length; i++) { for (int j = 0; j < matrix[0].length; j++) { matrix[i][j] = randNumber.nextInt(maxNumber); System.out.print(matrix[i][j] + " "); } System.out.println(); } System.out.println(); //My solution for the problem. //Iterate through the matrix. If a 0 is found, all the "rooms" below it receive 0. for(int i = 0; i < matrix.length; i++){ for(int j = 0; j < matrix[i].length; j++){ if(matrix[i][j] == 0){ int aux = i; while(aux < matrix.length){ matrix[aux][j] = 0; aux += 1; } } } } //Store the sum of valid room values. for(int i = 0; i < matrix.length; i++){ for(int j = 0; j < matrix[i].length; j++){ sum += matrix[i][j]; } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void findMaxSumMatrix(int[][] matrix) {\n int maxSum = Integer.MIN_VALUE;\n int row = 0;\n int col = 0;\n for (int rows = 0; rows <matrix.length - 2; rows++) {\n for (int column = 0; column <matrix[rows].length - 2; column++) {\n int currentItem = matrix[rows][column];\n int neighborItem = matrix[rows][column + 1];\n int nextNeighborItem = matrix[rows][column + 2];\n\n int currentDownNeighborItem = matrix[rows + 1][column];\n int downNeighborItem = matrix[rows + 1][column + 1];\n int nextDownNeighborItem = matrix[rows + 1][column + 2];\n\n int lastItem = matrix[rows + 2][column];\n int lastNeighborItem = matrix[rows + 2][column + 1];\n int nextLastNeighborItem = matrix[rows + 2][column + 2];\n\n int sum = getSum(currentItem, neighborItem, nextNeighborItem, currentDownNeighborItem, downNeighborItem, nextDownNeighborItem, lastItem, lastNeighborItem, nextLastNeighborItem);\n\n if(maxSum <=sum){\n maxSum = sum;\n row = rows;\n col = column;\n }\n }\n }\n System.out.println(\"Sum = \" + maxSum);\n System.out.printf(\"%s %s %s\\n\",matrix[row][col], matrix[row][col + 1],matrix[row][col + 2]);\n System.out.printf(\"%s %s %s\\n\",matrix[row + 1][col],matrix[row + 1][col + 1], matrix[row + 1][col + 2]);\n System.out.printf(\"%s %s %s\",matrix[row + 2][col], matrix[row + 2][col + 1], matrix[row + 2][col + 2]);\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static void main(String[] args) {\n int[][] array = new int[6][6];\n int sum=0, result=0, sub=0;\n Scanner sc = new Scanner(System.in);\n //System.out.println(\"Enter array elements\")\n for(int x=0 ; x < 6; x++){\n for( int y=0; y < 6; y++) {\n array[x][y]= sc.nextInt();\n }\n }\n //System.out.println(\"Desired Sum : \")\n for( int k=0; k < 4; k++){\n for( int m=0; m < 4; m++){\n for ( int i=k; i < k+3; i++ ){\n int j=0; \n for ( j=m; j < m+3; j++){\n if( i != k+1){\n sum += array[i][j];\n }\n else{\n sum += array[i][j+1];\n break;\n }\n }\n }\n result = Math.max(result, sum);\n sum = 0; \n }\n }\n System.out.println(result);\n \n }", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "public static int BlockSumMatrix(ArrayList<BlockObject> objects)\n\t{\n\t\tint sum = 0;\n\t\tint increment = 1;\n\t\tint min = 0;\n\t\tint max = 2;\n\t\tint iterations = 0;\n\t\twhile(iterations <= 7)\n\t\t{\n\t\t\t//Sets the values based on what\n\t\t\t//iteration it is.\n\t\t\tswitch (iterations)\n\t\t\t{\n\t\t\t\t//First row horizontal\n\t\t\t\tcase 0:\n\t\t\t\t\tbreak;\n\t\t\t\t//Second row horizontal\n\t\t\t\tcase 1:\n\t\t\t\t\tmin = 3;\n\t\t\t\t\tmax = 5;\n\t\t\t\t\tbreak;\n\t\t\t\t//Third row horizontal\n\t\t\t\tcase 2:\n\t\t\t\t\tmin = 6;\n\t\t\t\t\tmax = 8;\n\t\t\t\t\tbreak;\n\t\t\t\t//First row vertical\n\t\t\t\tcase 3:\n\t\t\t\t\tmin = 0;\n\t\t\t\t\tmax = 6;\n\t\t\t\t\tincrement = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t//Second row vertical\n\t\t\t\tcase 4:\n\t\t\t\t\tmin = 1;\n\t\t\t\t\tmax = 7;\n\t\t\t\t\tincrement = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t//Third row vertical\n\t\t\t\tcase 5:\n\t\t\t\t\tmin = 2;\n\t\t\t\t\tmax = 8;\n\t\t\t\t\tincrement = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t//First row diagonal\n\t\t\t\tcase 6:\n\t\t\t\t\tmin = 0;\n\t\t\t\t\tmax = 8;\n\t\t\t\t\tincrement = 4;\n\t\t\t\t\tbreak;\n\t\t\t\t//Second row diagonal\n\t\t\t\tcase 7:\n\t\t\t\t\tmin = 2;\n\t\t\t\t\tmax = 6;\n\t\t\t\t\tincrement = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//---------------------------------------------------\n\t\t\t//Gets the sum of the board.\n\t\t\tfor(int i = min; i <= max; i += increment)\n\t\t\t{\n\t\t\t\tif(objects.get(i).playerColor == 10 || objects.get(i).playerColor == 9 ) //if black or white\n\t\t\t\t\tsum += objects.get(i).playerColor; //add sum.\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Return sum if someone won.\n\t\t\tif(sum == 27 || sum == 30)\n\t\t\t\treturn sum;\n\t\t\t\n\t\t\t//Start the process again...\n\t\t\tsum = 0;\n\t\t\titerations++;\n\t\t}\n\t\treturn sum;\n\t}", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}", "public void checkSum() {\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < sudoku.length; i++)\n\t\t\tsum +=sudoku[row][i];\n\t\tif(sum != 45) {\n\t\t\tvalue = false;\n\t\t\tSystem.out.println(\"The sum in row \" + row + \" is \" + sum);\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.print(\"Unesite velicinu n x n matrice: \");\r\n\t\tint n = input.nextInt(); // unos n x n matrice n = broj redova i kolona matrice\r\n\r\n\t\tint[][] matrix = new int[n][n];\r\n\t\tArrayList<Integer> maxR = new ArrayList<>();\r\n\t\tArrayList<Integer> maxK = new ArrayList<>();\r\n\r\n\t\tSystem.out.println(\"Matrica: \");\r\n\t\tfor(int i=0; i<matrix.length; i++) {\r\n\t\t\tfor(int j=0; j<matrix[0].length; j++) {\r\n\t\t\t\tmatrix[i][j] = (int)(Math.random()*2); // punjenje matrice integerima 0 i 1\r\n\t\t\t\tSystem.out.print(matrix[i][j] + \" \"); // ispis matrice u konzolu\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\tint sumaR = 0, sumaK = 0, totalSumaR, totalSumaK, nula = 0;\r\n\t\t\r\n\t\tfor(int j=0; j<matrix[0].length; j++) {\r\n\t\t\tsumaR += matrix[0][j]; // suma reda matrice\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0; i<matrix.length; i++) {\r\n\t\t\tsumaK += matrix[i][0]; // suma kolona matrice\r\n\t\t}\r\n\t\tfor(int i=0; i<matrix.length; i++) { // za sve elemente matrice\r\n\t\t\ttotalSumaR = 0;\r\n\t\t\ttotalSumaK = 0;\r\n\t\t\tfor(int j=0; j<matrix[i].length; j++) {\r\n\t\t\t\ttotalSumaR += matrix[i][j]; // suma svih redova matrice\r\n\t\t\t\ttotalSumaK += matrix[j][i]; // suma svih kolona matrice\r\n\t\t\t\tif(totalSumaR > sumaR) { // ako bilo koji red matrice ima vecu sumu od sume prvog reda matrice\r\n\t\t\t\t\tsumaR = totalSumaR; // taj red postaje red sa najvecom sumom\r\n\t\t\t\t\tmaxR.clear(); // brisu se stare pozicije redova sa najvecom sumom\r\n\t\t\t\t\tmaxR.add(i); // ubacivanje broja indexa reda sa najvecom sumom u listu\t\r\n\t\t\t\t} else if(totalSumaR == sumaR) { // ako je ukupna suma zadnjeg reda jednak najvecoj sumi reda\r\n\t\t\t\t\t//maxR.clear(); brisu se ostale pozicije redova sa najvecom sumom u listi (ako trazimo samo zadnji red sa najvise 1)\r\n\t\t\t\t\tmaxR.add(i); // dodaje se krajnja pozicija najvece sume reda u listi\r\n\t\t\t\t}\r\n\t\t\t\tif(totalSumaK > sumaK) { // ako bilo koja kolona matrice ima vecu sumu od sume prve kolone matrice\r\n\t\t\t\t\tsumaK = totalSumaK; // ta kolona postaje kolona sa najvecom sumom\r\n\t\t\t\t\tmaxK.clear(); // brisu se stare pozicije kolone sa najvecom sumom\r\n\t\t\t\t\tmaxK.add(i); // ubacivanje broja indexa kolone sa najvecom sumom u listu\r\n\t\t\t\t} else if(totalSumaK == sumaK) { // ako je ukupna suma zadnje kolone jednaka najvecoj sumi kolone\r\n\t\t\t\t\t//maxK.clear(); brisu se ostale pozicije kolona sa najvecom sumom u listi (ako trazimo samo zadnju kolonu sa najvise 1)\r\n\t\t\t\t\tmaxK.add(i); // dodaje se krajnja pozicija najvece sume kolone u listi\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(maxR.isEmpty()) { // ako je lista prazna\r\n\t\t\tmaxR.add(nula); // ubaci u listu 0\r\n\t\t}\r\n\t\tSystem.out.print(\"Redovi sa najvise jedinica su: \");\r\n\t\tfor(int i=0; i<maxR.size(); i++) {\r\n\t\t\tSystem.out.print(maxR.get(i) + \" \"); // ispis pozicija najvece sume redova iz liste\r\n\t\t}\r\n\t\tif(maxK.isEmpty()) { // ako je lista prazna\r\n\t\t\tmaxK.add(nula); // ubaci u listu 0\r\n\t\t}\r\n\t\tSystem.out.print(\"\\nKolone sa najvise jedinica su: \");\r\n\t\tfor(int i=0; i<maxK.size(); i++) {\r\n\t\t\tSystem.out.print(maxK.get(i) + \" \"); // ispis pozicija najvece sume kolona iz liste\r\n\t\t}\r\n\t\t\r\n\t\tinput.close();\r\n\t}", "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 ShadowSumMatrix(ArrayList<ShadowObject> objects)\n\t{\n\t\tint sum = 0;\n\t\tint increment = 1;\n\t\tint min = 0;\n\t\tint max = 2;\n\t\tint iterations = 0;\n\t\twhile(iterations <= 7)\n\t\t{\n\t\t\t//Sets the values based on what\n\t\t\t//iteration it is.\n\t\t\tswitch (iterations)\n\t\t\t{\n\t\t\t\t//First row horizontal\n\t\t\t\tcase 0:\n\t\t\t\t\tbreak;\n\t\t\t\t//Second row horizontal\n\t\t\t\tcase 1:\n\t\t\t\t\tmin = 3;\n\t\t\t\t\tmax = 5;\n\t\t\t\t\tbreak;\n\t\t\t\t//Third row horizontal\n\t\t\t\tcase 2:\n\t\t\t\t\tmin = 6;\n\t\t\t\t\tmax = 8;\n\t\t\t\t\tbreak;\n\t\t\t\t//First row vertical\n\t\t\t\tcase 3:\n\t\t\t\t\tmin = 0;\n\t\t\t\t\tmax = 6;\n\t\t\t\t\tincrement = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t//Second row vertical\n\t\t\t\tcase 4:\n\t\t\t\t\tmin = 1;\n\t\t\t\t\tmax = 7;\n\t\t\t\t\tincrement = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t//Third row vertical\n\t\t\t\tcase 5:\n\t\t\t\t\tmin = 2;\n\t\t\t\t\tmax = 8;\n\t\t\t\t\tincrement = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t//First row diagonal\n\t\t\t\tcase 6:\n\t\t\t\t\tmin = 0;\n\t\t\t\t\tmax = 8;\n\t\t\t\t\tincrement = 4;\n\t\t\t\t\tbreak;\n\t\t\t\t//Second row diagonal\n\t\t\t\tcase 7:\n\t\t\t\t\tmin = 2;\n\t\t\t\t\tmax = 6;\n\t\t\t\t\tincrement = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//---------------------------------------------------\n\t\t\t//Gets the sum of the board.\n\t\t\tfor(int i = min; i <= max; i += increment)\n\t\t\t{\n\t\t\t\tif(objects.get(i).color == 10 || objects.get(i).color == 9 ) //if the object is black or white.\n\t\t\t\t\tsum += objects.get(i).color; //add sum\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Return sum if someone won.\n\t\t\tif(sum == 27 || sum == 30)\n\t\t\t\treturn sum;\n\t\t\t\n\t\t\t//Start the process again...\n\t\t\tsum = 0;\n\t\t\titerations++;\n\t\t}\n\t\treturn sum;\n\t}", "public int minPathSum(int[][] grid) {\n\t\treturn 0;\r\n }", "private static int totalNumberOfWays(int[] coins, int sum) {\n\t\tif(coins.length == 0 || sum <=0) {\n\t\t\treturn 0;\n\t\t}\n\t\t// find the length of total denomination\n\t\tint numberOfCoins = coins.length;\n\t\t//create a matrix\n\t\tint [][]arr = new int[numberOfCoins][sum+1];\n\t\tfor(int i = 0; i < numberOfCoins; i++) {\n\t\t\tarr[i][0] = 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < numberOfCoins; i++) {\n\t\t for(int j = 1; j <= sum; j++) {\n\t\t \n\t\t int includingCurrentCoin = 0;\n\t\t int excludingCurrentCoin = 0;\n\t\t \n\t\t if(coins[i] <= j) {\n\t\t includingCurrentCoin = arr[i][j - coins[i]];\n\t\t }\n\t\t \n\t\t if(i > 0) {\n\t\t excludingCurrentCoin = arr[i - 1][j];\n\t\t }\n\t\t \n\t\t arr[i][j] = includingCurrentCoin + excludingCurrentCoin;\n\t\t }\n\t\t } \n\t\treturn arr[numberOfCoins - 1][sum];\n\t}", "public int sumOfEvenNumbers()\n {\n // TODO: Return the sum of all the numbers which are even\n int sum = 0;\n for (int i =0; i< matrix.length; i++){\n for (int j = 0; j< matrix[0].length; j++){\n if(matrix[i][j]%2==0){\n sum+= matrix[i][j];\n }\n }\n }\n return sum;\n }", "public List<int[][]> evaluate(IBoard board){\n\n int area = board.getHeight() * board.getWidth();\n\n int[][] newArray = new int[area][2];\n\n int k = 0;\n\n while (k < newArray.length) {\n for (int i = 0; i < board.getHeight(); i++) {\n for (int j = 0; j < board.getWidth(); j++) {\n newArray[k][0] = i;\n newArray[k][1] = j;\n k++;\n }\n }\n }\n\n List<int[][]> Allmoves = new ArrayList<>();\n\n int res = newArray.length / board.getHeight();\n\n /*For rows*/\n int q = 0;\n int w = res;\n\n for (int i = 0; i < res; i++) {\n int[][] arr = new int[res][2];\n\n int e = 0;\n\n for (int j = q; j < w; j++) {\n arr[e][0] = newArray[j][0];\n arr[e][1] = newArray[j][1];\n e++;\n }\n\n w += res;\n q += res;\n\n Allmoves.add(arr);\n\n }\n\n /*For columns*/\n int r = 0;\n for (int i = 0; i < res; i++) {\n\n int[][] arr = new int[res][2];\n int e = 0;\n\n for (int j = 0; j < res; j++) {\n arr[e][0] = newArray[r][0];\n arr[e][1] = newArray[r][1];\n\n r += res;\n e++;\n }\n r = 0;\n r += i + 1;\n\n Allmoves.add(arr);\n }\n\n /*For diagonal - 1*/\n int[][] arr = new int[res][2];\n int d1 = res + 1;\n int d = 0;\n int e = 0;\n for (int i = 0; i < res; i++) {\n arr[e][0] = newArray[d][0];\n arr[e][1] = newArray[d][1];\n d += d1;\n e++;\n }\n\n Allmoves.add(arr);\n\n int[][] arr1 = new int[res][2];\n int d2 = res - 1;\n int D = res - 1;\n int p = 0;\n for (int i = 0; i < res; i++) {\n arr1[p][0] = newArray[D][0];\n arr1[p][1] = newArray[D][1];\n D += d2;\n p++;\n }\n\n Allmoves.add(arr1);\n\n return Allmoves;\n\n }", "public int numSolutions(int N, int M) {\n HashMap<Integer, Integer> dp = new HashMap<Integer, Integer>();\n dp.put(0, 1);\n for (int i = 0; i < N; ++i) {\n for (int j = 0; j < M; ++j) {\n HashMap<Integer, Integer> nDp = new HashMap<Integer, Integer>();\n for (Integer key : dp.keySet()) {\n int leftCell = getCell(key, j - 1);\n int upCell = getCell(key, j);\n int count = dp.get(key);\n if (upCell != 0) {\n // This is the last chance to fulfill upCell.\n if (upCell == 1 || upCell == 3) {\n // Don't paint this cell.\n int newKey = setCell(key, j, 0);\n addValue(nDp, newKey, count);\n } else {\n // Paint this cell.\n int current = 2 + (leftCell == 0 ? 0 : 1);\n int newKey = setCell(key, j, current);\n if (leftCell != 0) {\n newKey = setCell(newKey, j - 1, leftCell + 1);\n }\n addValue(nDp, newKey, count);\n }\n } else {\n // Don't paint this cell.\n int newKey = setCell(key, j, 0);\n addValue(nDp, newKey, count);\n // Paint this cell.\n if (leftCell == 0) {\n newKey = setCell(key, j, 1);\n } else {\n newKey = setCell(key, j - 1, leftCell + 1);\n newKey = setCell(newKey, j, 2);\n }\n addValue(nDp, newKey, count);\n }\n }\n dp = nDp;\n }\n }\n int result = 0;\n for (Integer key : dp.keySet()) {\n boolean valid = true;\n for (int i = 0; i < M; ++i) {\n int current = getCell(key, i);\n if (current == 2 || current == 4) {\n valid = false;\n break;\n }\n }\n if (valid) {\n result = (result + dp.get(key)) % MOD;\n }\n }\n return result;\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[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\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 }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "public static int sumOfElements(int[][] number) {\n\t\t\n\t\tint sum = number[0][0];\n\t for (int o= 0; o < number.length; o++) {\n\t \tfor(int l=0;l<number[o].length;l++){\n\t \t\t if (number[o][l] < sum) {\n\t \t sum += number[o][l];\n\t \t }\n\t \t }\t\n\t \t}\n\t \n\t return sum;\n\t}", "static int countOfSubsetsOfSum(int[] arr,int sum){\n int n = arr.length;\n int[][] dp = new int[n + 1][sum + 1];\n\n for (int j = 0;j<=sum; j++){\n dp[0][j] = 0;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public static int minPathSum(int[][] grid) {\n return 0;\n }", "public static void main(String[] args) {\n int[] row1 = new int[]{3, 5, 1, 1};\n int[] row2 = new int[]{2, 3, 3, 2};\n int[] row3 = new int[]{5, 5};\n int[] row4 = new int[]{4, 4, 2};\n int[] row5 = new int[]{1, 3, 3, 3};\n int[] row6 = new int[]{1, 1, 6, 1, 1};\n\n //create a hashmap to hold keys(sums), and values(number of times the wall has rows that add up to that sum)\n HashMap<Integer, Integer> hashMap = new HashMap<>();\n\n //iterate over a row, each time a sum is reached replace the value at key sum, with an incremented value\n int sum = 0;\n for (int i = 0; i < row1.length - 1; i++) {\n\n sum += row1[i];\n if (hashMap.containsKey(sum)) {\n int var = hashMap.get(sum) + 1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n //print out the contents of the keySet, which sums have been reached, and the values aka how many times each sum has been reached\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n //Do this for every row in the wall\n sum = 0;\n for(int i = 0; i < row2.length-1; i++) {\n\n sum += row2[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row3.length-1; i++) {\n\n sum += row3[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row4.length-1; i++) {\n\n sum += row4[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row5.length-1; i++) {\n\n sum += row5[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row6.length-1; i++) {\n\n sum += row6[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n //now that every row has been covered, the key associated with the highest value will be where you should make your cut\n System.out.println(\"To cut through the least amount of bricks, you should make the cut at: \");\n int max = 0;\n for(int i : hashMap.values()) {\n if(i > max) {\n max = i;\n }\n }\n for(Map.Entry<Integer, Integer> entry : hashMap.entrySet()) {\n if(entry.getValue() == max) {\n System.out.println(entry.getKey());\n }\n }\n //and the # of bricks to cut through will be the amount of rows minus how many times the sum was reached\n System.out.println(\"The least amount of rows to cut through is \");\n System.out.println(6 - max);\n\n }", "public void wallsAndGates(int[][] rooms) {\n if (rooms == null || rooms.length == 0 || rooms[0] == null || rooms[0].length == 0)\n return;\n\n Queue<int[]> queue = new LinkedList<>();\n\n for (int i = 0; i < rooms.length; i++) {\n for (int j = 0; j < rooms[0].length; j++) {\n if (rooms[i][j] == 0)\n queue.add(new int[]{i,j});\n }\n }\n\n while (!queue.isEmpty()) {\n int[] top = queue.remove();\n int row = top[0];\n int col = top[1];\n if (row > 0 && rooms[row - 1][col] == Integer.MAX_VALUE) {\n rooms[row - 1][col] = rooms[row][col] + 1;\n queue.add(new int[]{row - 1, col});\n }\n if (row < rooms.length - 1 && rooms[row + 1][col] == Integer.MAX_VALUE) {\n rooms[row+1][col] = rooms[row][col] + 1;\n queue.add(new int[]{row + 1, col});\n }\n if (col > 0 && rooms[row][col - 1] == Integer.MAX_VALUE){\n rooms[row][col -1] = rooms[row][col] + 1;\n queue.add(new int[]{row, col - 1});\n }\n if (col < rooms[0].length - 1 && rooms[row][col + 1] == Integer.MAX_VALUE) {\n rooms[row][col +1] = rooms[row][col] + 1;\n queue.add(new int[]{row, col + 1});\n }\n }\n\n }", "public int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\t\tif (n < m) {\n\t\t\tint[] dp = new int[n];\n\t\t\tdp[n-1] = grid[m-1][n-1];\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[m-1][i] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tfor(int j = n-1; j >= 0; j--) {\n\t\t\t\t\tif(j == n-1) {\n\t\t\t\t\t\tdp[j] += grid[i][j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[i][j] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t} else {\n\t\t\tint[] dp = new int[m];\n\t\t\tdp[m-1] = grid[m-1][n-1];\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[i][n-1] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tfor(int j = m-1; j >= 0; j--) {\n\t\t\t\t\tif(j == m-1) {\n\t\t\t\t\t\tdp[j] += grid[j][i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[j][i] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t}\n\t}", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "public static int[][] verticalSums(int[][] a, int sumToFind){\r\n\t\tint b[][]=new int[a.length][a[0].length];\r\n\t\tboolean verify[][]=new boolean[a.length][a[0].length];\r\n\t\tfor (int c=0;c<a[0].length;c++){\r\n\t\t\tint r=0; \r\n\t\t\tint confirm=0;\r\n\t\t\tint sum=0;\r\n\t\t\twhile(r<a.length){\r\n\t\t\t\r\n\t\t\t\tif(sum<sumToFind){\r\n\t\t\t\t\tsum+=a[r][c];\r\n\t\t\t\t\t\r\n\t\t\t\t\tr++; \r\n\t\t\t\t}\r\n\t\t\t\tif(sum>sumToFind){\r\n\t\t\t\t\tconfirm++;\r\n\t\t\t\t\tr=confirm;\r\n\t\t\t\t\tsum=0; \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (sum==sumToFind){\r\n\t\t\t\t\tfor(int x=confirm;x<r;x++){\r\n\t\t\t\t\t\tverify[x][c] = true;\r\n\t\t\t\t\tconfirm++;\r\n\t\t\t\t\tr=confirm;\r\n\t\t\t\t\tsum=0;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\t\tfor(int j=0;j<a.length;j++){\r\n\t\t\t\t\tif (verify[i][j]){\r\n\t\t\t\t\t\tb[i][j]=a[i][j]; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\tb[i][j]=0 ;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\r\n}\r\n\t\treturn b;\r\n}", "private int getCost(Game game) {\n\n // Represents the sum of each tile value multiplied by its column index (Gives a tendency to move to the left)\n int weightedSum = 0;\n\n // Represents the number of diagonal pairs of matching value on the board.\n int diagCount = 0;\n\n // The number of tiles on the grid\n int tileCount = 0;\n\n Tile[][] tiles = game.tiles;\n\n for (int x = 0; x < BOARD_X; x++) {\n for (int y = 0; y < BOARD_Y; y++) {\n Tile tile = tiles[x][y];\n\n // Skip empty squares\n if (tile == null) {\n continue;\n }\n\n // Increment the weighted sum with product of the row index and the tile's value\n weightedSum += x * tile.getValue();\n tileCount++;\n\n // If all squares are occupied, return an arbitrarily large value such that this option is not picked.\n if (tileCount == maxTileCount) {\n return 100000;\n }\n\n // Since only up right and down right diagonals are computed, ignore the last row as this would push\n // index's out of range.\n if (x == BOARD_X - 1) {\n continue;\n }\n\n // Retrieve the upper right tile and updates the diagonal counter\n if (y > 0) {\n Tile ur = tiles[x + 1][y - 1];\n if (ur != null) {\n diagCount += (ur.getValue() == tile.getValue()) ? 1 : 0;\n }\n }\n\n // Retrieve the lower right tile and updates the diagonal counter\n if (y < BOARD_Y - 1) {\n Tile dr = tiles[x + 1][y + 1];\n if (dr != null) {\n if (dr.getValue() == tile.getValue()) {\n diagCount += (dr.getValue() == tile.getValue()) ? 1 : 0;\n }\n }\n }\n }\n }\n\n return weightedSum + diagCount;\n }", "public static void main(String[] arg) {\r\n \r\n int[][] filledSudoku = { \r\n { 11, 2, 5, 7, 4, 10, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { 12, 15, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { 6, 11, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n \r\n int[][] oneEmptyCell = { \r\n { 11, 2, -1, 7, 4, 10, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { 12, 15, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { 6, 11, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n \r\n int[][] oneEmptyCellSolution = { \r\n { 11, 2, 5, 7, 4, 10, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { 12, 15, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { 6, 11, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n\r\n int[][] fourEmptyCells = { \r\n { 11, 2, 5, 7, 4, 10, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { -1, -1, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { -1, -1, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n \r\n int[][] fourEmptyCellsSolution = { \r\n { 11, 2, 5, 7, 4, 10, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { 12, 15, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { 6, 11, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n \r\n int[][] invalidRow = { \r\n { 11, 2, 5, 7, 4, 1, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { 12, 15, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { 6, 11, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n\r\n int[][] invalidColumn = { \r\n { 11, 2, 5, 7, 4, 10, 9, 15, 6, 14, 0, 1, 12, 3, 8, 13 },\r\n { 14, 4, 0, 9, 11, 8, 2, 12, 13, 5, 3, 10, 15, 1, 7, 6 },\r\n { 1, 10, 15, 12, 6, 13, 7, 3, 4, 9, 8, 2, 11, 5, 14, 0 },\r\n { 13, 8, 6, 3, 5, 14, 1, 0, 11, 7, 15, 12, 10, 9, 4, 2 },\r\n { 0, 7, 14, 2, 8, 11, 4, 9, 1, 6, 10, 5, 13, 12, 3, 15 },\r\n { 3, 5, 9, 1, 10, 12, 14, 7, 2, 4, 13, 15, 8, 0, 6, 11 },\r\n { 1, 15, 10, 13, 2, 1, 3, 6, 8, 11, 14, 0, 7, 4, 5, 9 },\r\n { 6, 11, 8, 4, 0, 15, 5, 13, 7, 12, 9, 3, 14, 2, 10, 1 },\r\n { 2, 14, 1, 15, 3, 7, 11, 4, 5, 10, 6, 9, 0, 13, 12, 8 },\r\n { 7, 6, 12, 8, 9, 2, 10, 5, 0, 13, 1, 11, 4, 14, 15, 3 },\r\n { 4, 9, 3, 5, 14, 0, 13, 8, 15, 2, 12, 7, 6, 11, 1, 10 },\r\n { 10, 13, 11, 0, 15, 6, 12, 1, 3, 8, 4, 14, 9, 7, 2, 5 },\r\n { 9, 1, 2, 14, 7, 4, 0, 11, 10, 15, 5, 6, 3, 8, 13, 12 },\r\n { 8, 3, 7, 10, 13, 9, 6, 2, 12, 1, 11, 4, 5, 15, 0, 14 },\r\n { 15, 0, 4, 11, 12, 5, 8, 10, 14, 3, 2, 13, 1, 6, 9, 7 },\r\n { 5, 12, 13, 6, 1, 3, 15, 14, 9, 0, 7, 8, 2, 10, 11, 4 } };\r\n \r\n int[][] example1 = {\r\n { -1, 15, -1, 1, -1, -1, 14, 8, 13, 3, -1, -1, -1, 12, -1, 0 },\r\n { 2, 13, -1, -1, -1, -1, -1, 5, 0, 11, -1, 10, -1, -1, -1, 1 },\r\n { -1, 4, -1, -1, -1, 13, 1, 0, 15, -1, -1, 7, -1, -1, -1, -1 },\r\n { -1, 6, 12, -1, 15, -1, -1, 9, -1, -1, 14, -1, 8, -1, -1, -1 },\r\n { 8, -1, 1, 15, -1, -1, -1, 10, 3, -1, 9, -1, 14, -1, -1, -1 },\r\n { 11, -1, 4, -1, -1, -1, 8, -1, 6, 1, -1, -1, -1, -1, 12, -1 },\r\n { -1, -1, 3, 13, -1, -1, 4, -1, -1, 15, -1, -1, 2, -1, 8, -1 },\r\n { 10, -1, -1, -1, 2, -1, -1, -1, -1, 0, -1, -1, -1, 7, -1, -1 },\r\n { -1, -1, 15, -1, -1, -1, 5, -1, -1, -1, -1, 2, -1, -1, -1, 4 },\r\n { -1, 5, -1, 4, -1, -1, 7, -1, -1, 9, -1, -1, 15, 10, -1, -1 },\r\n { -1, 10, -1, -1, -1, -1, 6, 3, -1, 12, -1, -1, -1, 13, -1, 5 },\r\n { -1, -1, -1, 6, -1, 1, -1, 4, 7, -1, -1, -1, 3, 9, -1, 2 },\r\n { -1, -1, -1, 12, -1, 8, -1, -1, 2, -1, -1, 3, -1, 4, 5, -1 },\r\n { -1, -1, -1, -1, 7, -1, -1, 12, 9, 6, 4, -1, -1, -1, 0, -1 },\r\n { 5, -1, -1, -1, 13, -1, 3, 6, 11, -1, -1, -1, -1, -1, 15, 14 },\r\n { 4, -1, 6, -1, -1, -1, 2, 15, 12, 5, -1, -1, 9, -1, 13, -1 }, };\r\n \r\n int[][] emptySudoku = {\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },\r\n { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, };\r\n \r\n \r\n testSudoku(\"filledSudoku\", filledSudoku, filledSudoku);\r\n System.out.println(\"Number of Recursion calls: \" + HexadecimalSudoku.numOfRecursionCalls);\r\n System.out.println();\r\n\r\n testSudoku(\"oneEmptyCell\", oneEmptyCell, oneEmptyCell);\r\n System.out.println(\"Number of Recursion calls: \" + HexadecimalSudoku.numOfRecursionCalls);\r\n System.out.println();\r\n\r\n testSudoku(\"fourEmptyCells\", fourEmptyCells, fourEmptyCellsSolution);\r\n System.out.println(\"Number of Recursion calls: \" + HexadecimalSudoku.numOfRecursionCalls);\r\n System.out.println();\r\n \r\n testSudoku(\"invalidRow\", invalidRow, null);\r\n System.out.println(\"Should print out: sudoku row 0 has 1 at both positions 5 and 11\");\r\n System.out.println();\r\n \r\n testSudoku(\"invalidColumn\", invalidColumn, null);\r\n System.out.println(\"Should print out: sudoku column 0 has 1 at both positions 2 and 6\");\r\n System.out.println();\r\n\r\n testSudoku(\"emptySudoku\", emptySudoku, emptySudoku);\r\n System.out.println(\"Number of Recursion calls: \" + HexadecimalSudoku.numOfRecursionCalls);\r\n System.out.println(\"Number of Iterations: \" + HexadecimalSudoku.numOfIterations);\r\n System.out.println();\r\n \r\n// int ex1Count = 0;\r\n// for (int i = 0; i < 16; i++) {\r\n// for (int j = 0; j < 16; j++) {\r\n// if (example1[i][j] == -1) {\r\n// ex1Count++;\r\n// } \r\n// }\r\n// }\r\n// \r\n// testSudoku(\"example1\", example1, null);\r\n// System.out.println(\"Number of Recursion calls: \" + HexadecimalSudoku.numOfRecursionCalls);\r\n// System.out.println();\r\n }", "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 }", "static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public static int calculate(int[][] matrix) {\n if (matrix.length == 0) {\n return 0;\n }\n\n int[] temp = new int[matrix[0].length];\n int maxArea = 0;\n\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n\n if (matrix[i][j] != 0) {\n temp[j] += matrix[i][j];\n } else {\n temp[j] += 0;\n }\n }\n\n int area = LargestRectangle.calculate(temp);\n if (maxArea < area) {\n maxArea = area;\n }\n }\n\n return maxArea;\n }", "public static int minPathSum(int[][] grid) {\n if (grid == null || grid.length == 0 || grid[0].length == 0)\n return 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0 && j == 0) {\n } else if (i == 0 && j > 0)\n grid[i][j] += grid[i][j-1];\n else if (j == 0 && i > 0)\n grid[i][j] += grid[i-1][j];\n else \n grid[i][j] += Math.min(grid[i][j-1], grid[i-1][j]);\n }\n }\n return grid[grid.length-1][grid[0].length-1];\n }", "public static List<List<Integer>> findMatrix(List<List<Integer>> a) {\n List<List<Integer>> res = new ArrayList<>();\n for (int i = 0; i < a.size(); i++) {\n List<Integer> rowi = a.get(i);\n List<Integer> temp = new ArrayList<>();\n int prev = 0;\n for (int j = 0; j < rowi.size(); j++) {\n if (i == 0) {\n int curr = rowi.get(j);\n temp.add(prev + curr);\n prev += curr;\n } else {\n int curr = rowi.get(j);\n int lastSum = res.get(i - 1).get(j);\n temp.add(prev + curr + lastSum);\n prev += curr;\n }\n }\n res.add(temp);\n }\n return res;\n }", "public void wallsAndGates(int[][] rooms) {\n if (rooms.length == 0 || rooms[0].length == 0) return;\n Queue<int[]> queue = new LinkedList<>();\n for (int i = 0; i < rooms.length; i++) {\n for (int j = 0; j < rooms[0].length; j++) {\n if (rooms[i][j] == 0) queue.add(new int[]{i, j});\n }\n }\n while (!queue.isEmpty()) {\n int[] top = queue.remove();\n int row = top[0], col = top[1];\n if (row > 0 && rooms[row - 1][col] == Integer.MAX_VALUE) {\n rooms[row - 1][col] = rooms[row][col] + 1;\n queue.add(new int[]{row - 1, col});\n }\n if (row < rooms.length - 1 && rooms[row + 1][col] == Integer.MAX_VALUE) {\n rooms[row + 1][col] = rooms[row][col] + 1;\n queue.add(new int[]{row + 1, col});\n }\n if (col > 0 && rooms[row][col - 1] == Integer.MAX_VALUE) {\n rooms[row][col - 1] = rooms[row][col] + 1;\n queue.add(new int[]{row, col - 1});\n }\n if (col < rooms[0].length - 1 && rooms[row][col + 1] == Integer.MAX_VALUE) {\n rooms[row][col + 1] = rooms[row][col] + 1;\n queue.add(new int[]{row, col + 1});\n }\n }\n }", "public int minPathSum(int[][] grid) {\n if (grid==null || grid.length==0)\n return 0;\n int m = grid.length;\n int n = grid[0].length;\n for (int i=0; i<m; i++) {\n for (int j=0; j<n; j++) {\n if (i==0 && j==0)\n continue;\n int up = i > 0 ? grid[i-1][j] : Integer.MAX_VALUE;\n int left = j > 0 ? grid[i][j-1] : Integer.MAX_VALUE;\n grid[i][j] += (left > up ? up : left);\n }\n }\n return grid[m-1][n-1];\n }", "public void calculaMatrizCostes() {\n int i, j;\n double xd, yd;\n costes = new int[n][n];\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n xd = vx[i] - vx[j];\n yd = vy[i] - vy[j];\n costes[i][j] = (int) Math.round(Math.sqrt((xd * xd) + (yd * yd)));\n }\n }\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int formingMagicSquare(List<List<Integer>> s) {\r\n // Write your code here\r\n int cost[] = {0,0,0,0,0,0,0,0};\r\n int t[][] = \r\n {\r\n {4,9,2,3,5,7,8,1,6},\r\n {4,3,8,9,5,1,2,7,6},\r\n {2,9,4,7,5,3,6,1,8},\r\n {2,7,6,9,5,1,4,3,8},\r\n {8,1,6,3,5,7,4,9,2},\r\n {8,3,4,1,5,9,6,7,2},\r\n {6,7,2,1,5,9,8,3,4},\r\n {6,1,8,7,5,3,2,9,4},\r\n };\r\n\r\n for(int i=0;i<8;i++)\r\n { \r\n cost[i] = Math.abs(t[i][0]-s.get(0).get(0)) + Math.abs(t[i][1]-s.get(0).get(1)) + Math.abs(t[i][2]-s.get(0).get(2));\r\n cost[i] = cost[i] + Math.abs(t[i][3]-s.get(1).get(0)) + Math.abs(t[i][4]-s.get(1).get(1)) + Math.abs(t[i][5]-s.get(1).get(2));\r\n cost[i] = cost[i] + Math.abs(t[i][6]-s.get(2).get(0)) + Math.abs(t[i][7]-s.get(2).get(1)) + Math.abs(t[i][8]-s.get(2).get(2));\r\n } \r\n\r\n Arrays.sort(cost);\r\n return cost[0];\r\n\r\n }", "public void solve() {\n for (int i = 0; i < rowsCount; i++) {\n for (int j = 0; j < colsCount; j++) {\n\n // if the current Cell contains a mine, let's skip this iteration.\n if (this.cells[i][j].hasMine()) continue;\n\n // for all non-mine cells, set the default value to 0\n cells[i][j].setValue('0');\n\n // let's get all Cells surrounding the current Cell,\n // checking if the other Cells have a mine.\n // if there is a mine Cell touching the current Cell,\n // proceed to update the value of the current Cell.\n Cell topCell = get_top_cell(i, j);\n if (topCell != null && topCell.hasMine() == true) update_cell(i, j);\n\n Cell trdCell = get_top_right_diagnoal_cell(i, j);\n if (trdCell != null && trdCell.hasMine() == true) update_cell(i, j);\n\n Cell rightCell = get_right_cell(i, j);\n if (rightCell != null && rightCell.hasMine() == true) update_cell(i, j);\n\n Cell brdCell = get_bottom_right_diagnoal_cell(i, j);\n if (brdCell != null && brdCell.hasMine() == true) update_cell(i, j);\n\n Cell bottomCell = get_bottom_cell(i, j);\n if (bottomCell != null && bottomCell.hasMine() == true) update_cell(i, j);\n\n Cell bldCell = get_bottom_left_diagnoal_cell(i, j);\n if (bldCell != null && bldCell.hasMine() == true) update_cell(i, j);\n\n Cell leftCell = get_left_cell(i, j);\n if (leftCell != null && leftCell.hasMine() == true) update_cell(i, j);\n\n\n Cell tldCell = get_top_left_diagnoal_cell(i, j);\n if (tldCell != null && tldCell.hasMine() == true) update_cell(i, j);\n }\n }\n\n // print the solution to System out\n print_solution();\n }", "private static void sum(int[][] first, int[][] second) {\r\n\t\tint row = first.length;\r\n\t\tint column = first[0].length;\r\n\t\tint[][] sum = new int[row][column];\r\n\r\n\t\tfor (int r = 0; r < row; r++) {\r\n\t\t\tfor (int c = 0; c < column; c++) {\r\n\t\t\t\tsum[r] = first[r] + second[r];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of Matrices:\\n\");\r\n\t\tprint2dArray(sum);\r\n\t}", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int arr[][] = new int[6][6];\n for(int i=0; i < 6; i++){\n for(int j=0; j < 6; j++){\n arr[i][j] = in.nextInt();\n }\n }\n int ans=maxSum(arr);\n System.out.printf(\"%d\",ans);\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int c1=0; c1<cols; c1++){\n for(int r2=r1; r2<rows; r2++){\n for(int c2=c1; c2<cols; c2++){\n int sec=areas[r2][c2];\n if(r1>0) sec-=areas[r1-1][c2];\n if(c1>0) sec-=areas[r2][c1-1];\n if(r1>0 && c1>0) sec+= areas[r1-1][c1-1];\n if(sec<=k) res=Math.max(sec, res);\n }\n }\n }\n }\n return res;\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int r2=r1; r2<rows; r2++){\n TreeSet<Integer> set=new TreeSet<Integer>();\n set.add(0);\n for(int c=0; c<cols; c++){\n int sec=areas[r2][c];\n if(r1>0) sec-= areas[r1-1][c];\n Integer ceiling=set.ceiling(sec-k);\n if(ceiling!=null)\n res=Math.max(res, sec-ceiling);\n set.add(sec);\n }\n }\n }\n return res;\n }", "public static int[][] horizontalSums(int[][] a, int sumToFind){\r\n\t\tint [][]b = new int[a.length][a[0].length] ;\r\n\t\tfor (int r=0;r<a.length;r++) {\r\n\t\t\tfor(int c=0;c<a[0].length;c++){\r\n\t\t\tint sum=0;\r\n\t\t\t//int temp=0;\r\n\t\t\tint temp;\r\n\t\t\t\r\n\t\t\t//int column=0;\r\n\t\t\tfor (temp=c; temp<a[r].length && sum!=sumToFind;temp++){\r\n\t\t\t\tsum=sum+a[r][temp] ; \r\n\t\t\t}\r\n\t\t\tif(sum==sumToFind){\r\n\t\t\t\tfor (int i=c; i<temp;i++) {\r\n\t\t\t\t\tb[r][i]=a[r][i] ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\treturn b ;\r\n\t}", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public static void bestApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\t//Taking two variables for storing status of first row and column\n\t\tboolean firstRow = false;\n\t\tboolean firstColumn = false;\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tif(i == 0) firstRow == true;\n\t\t\t\t\tif(j == 0) firstColumn == true;\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 1;i<m;i++){\n\t\t\t\n\t\t\tfor(int j = 1;j<n;j++){\n\t\t\t\t//based on first row and first column making the entire column and row as zero\n\t\t\t\tif(matrix[0][j] == 0 || matrix[i][0] == 0){\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Making every column value to 0 in first row\n\t\tif(firstRow){\n\t\t\t\n\t\t\tfor(int j = 0;j <n;j++){\n\t\t\t\tmatrix[0][j] = 0;\n\t\t\t}\n\t\t}\n\t\t//Making every row value to 0 in first column\n\t\tif(firstColumn){\n\t\t\t\n\t\t\tfor(int i = 0;i <m;i++){\n\t\t\t\tmatrix[i][0] = 0;\n\t\t\t}\n\t\t}\n\t}", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "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 }", "public int utility(Board board) {\n \tint sum = getResult(board.getScore(), board.getListOfPosition().size(), score(board));\n \tint [][]b = board.board;\n \tfor (int i = 0; i < b.length; i++) {\n \t\tfor (int j = 0; j < b[0].length; j++) {\n \t\t\tsum += weight[i * b.length + j] * b[i][j];\n \t\t}\n \t}\n \treturn sum;\n }", "int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public static void main(String[] args) throws IOException {\n sc = new Reader();\n //out = new Printer(\"./src/answer.txt\");\n out = new Printer();\n int testCases, n, m, k;\n long c;\n long[][] matrix, rsum, csum, oddLastCalc, evenLastCalc;\n// boolean flag;\n testCases = sc.nextInt();\n while (testCases-- > 0) {\n n = sc.nextInt();\n m = sc.nextInt();\n k = sc.nextInt();\n matrix = new long[n][m];\n rsum = new long[n+1][m+1];\n csum = new long[n+1][m+1];\n oddLastCalc = new long[n][m];\n evenLastCalc = new long[n][m];\n c = 0l;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n matrix[i][j] = sc.nextLong();\n oddLastCalc[i][j] = matrix[i][j];\n if(matrix[i][j]>=k)\n c++;\n }\n }\n\n for (int i = 0; i < n; i++) {\n rsum[i][m-1] = matrix[i][m-1];\n }\n for (int i = 0; i < m; i++) {\n csum[n-1][i] = matrix[n-1][i];\n }\n for (int i = 0; i < n; i++) {\n for (int j = m-2; j >=0; j--) {\n rsum[i][j] = rsum[i][j+1] + matrix[i][j];\n }\n }\n for (int i = 0; i < m; i++) {\n for (int j = n-2; j >=0; j--) {\n csum[j][i] = csum[j+1][i] + matrix[j][i];\n }\n }\n PRINT.ArrayMatrix(rsum);\n PRINT.ArrayMatrix(csum);\n System.out.println(\"-------------------------------------------------------\");\n\n for (int size = 2; size <= n; size++) {\n// flag = false;\n for (int i = n-size; i >= 0; i--) {\n for (int j = m - size; j >= 0; j--) {\n if(size%2==0){\n evenLastCalc[i][j] = matrix[i][j]\n + oddLastCalc[i+1][j+1]\n + csum[i+1][j] - csum[i+size][j]\n + rsum[i][j+1] - rsum[i][j+size];\n if(1.0*evenLastCalc[i][j]/(size*size)<k){\n// flag = true;\n break;\n }\n } else {\n oddLastCalc[i][j] = matrix[i][j]\n + evenLastCalc[i+1][j+1]\n + csum[i+1][j] - csum[i+size][j]\n + rsum[i][j+1] - rsum[i][j+size];\n if(1.0*oddLastCalc[i][j]/(size*size)<k){\n// flag = true;\n break;\n }\n }\n System.out.println(size + \"\\t\" + i + \"\\t\" + j);\n PRINT.ArrayMatrix(oddLastCalc);\n PRINT.ArrayMatrix(evenLastCalc);\n System.out.println(\"-------------------------------------------------------\");\n c++;\n }\n// if(flag)\n// break;\n }\n }\n System.out.println(c);\n }\n\n out.close();\n }", "public int[][] sumOfMatrices(int row, int col, int array1[][], int array2[][]) {\n int[][] sum = new int[row][col];\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n sum[i][j] = array1[i][j] + array2[i][j];\n }\n }\n return sum;\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }", "public int updateBoard() {\n clearTemporaryData();\n setUsedValuesbyRow();\n setUsedValuesByColumns();\n setUsedValueInBoxes();\n findUniqueInBoxes();\n updateValues();\n\n return numbers.stream()\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList()).size();\n }", "static int numAdjMines(int[][] mineBoard, int row, int col) {\n int numMines = 0;\n\n for(int dr = -1; dr <= 1; dr ++) {\n for(int dc = -1; dc <= 1; dc++) {\n if(row + dr >= 0 && row + dr < mineBoard.length &&\n col+ dc >= 0 && col + dc < mineBoard[0].length) {\n if(mineBoard[row+dr][col+dc] == Mine ||\n mineBoard[row+dr][col+dc] == FlaggedMine) {\n numMines++;\n }\n }\n }\n }\n return numMines;\n }", "public int fillingOfMatrix(){\n int count=0;\n for (int i=0;i<m;i++)\n count+=matrix[i].size();\n return count;\n }", "static int getFitness(double[][] matrix, Chromosome ch){\n int fitness = 0,\n tmpInd = 0;\n\n for (int i = 0; i < ch.size(); i++) {\n if (ch.getGene(i) == 1){\n fitness += matrix[tmpInd][i];\n tmpInd = i;\n }\n }\n return fitness;\n }", "int solve() {\n dp[0][0] = 1;\n IntStream.rangeClosed(1, m).forEach(i ->\n IntStream.rangeClosed(0, n).forEach(j ->\n dp[i][j] = j - i >= 0 ?\n (dp[i - 1][j] + dp[i][j - i]) % M :\n dp[i - 1][j]));\n return dp[m][n];\n }", "public static void wallsAndGates(int[][] rooms) {\n if (rooms.length == 0 || rooms[0].length == 0) {\n return;\n }\n\n int m = rooms.length;\n int n = rooms[0].length;\n\n Queue<int[]> queue = new LinkedList();\n boolean[][] visited = new boolean[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (rooms[i][j] == 0) {\n queue.add(new int[] {i, j});\n }\n }\n }\n\n int level = 1;\n while (!queue.isEmpty()) {\n int size = queue.size();\n for (int i = 0; i < size; i++) {\n int[] cur = queue.poll();\n int currow = cur[0];\n int curcol = cur[1];\n\n int row;\n int col;\n\n //up\n row = currow-1;\n col = curcol;\n if (row >= 0) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //down\n row = currow+1;\n if (row < m) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //left\n row = currow;\n col = curcol-1;\n if (col >= 0) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //right\n row = currow;\n col = curcol + 1;\n if (col < n) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n }\n level++;\n }\n\n }", "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int diagonalSum(int[][] mat) {\r\n\r\n int rows = mat.length;\r\n int cols = mat[0].length;\r\n int sum = 0;\r\n for (int r = 0; r < rows; r++) {\r\n //sum of right diagonal\r\n sum += mat[r][cols - r - 1];\r\n for (int c = 0; c < cols; c++) {\r\n //sum of left diagonal\r\n if (r == c) {\r\n sum += mat[r][c];\r\n }\r\n }\r\n }\r\n //If N is odd, deduct the duplicate count\r\n return rows % 2 == 1 ? sum - mat[rows / 2][cols / 2] : sum;\r\n }", "public static boolean solve(int[][] board) {\nfor (int x=0; x<9; x++) {\n for (int y=0; y<9; y++) {\nif (board[x][y] == 0) {\n \n // Try each possibile value in this space\n // and see if the rest of the puzzle can be filled in.\n for (board[x][y]=1; board[x][y]<=9; board[x][y]++) {\n if (isLegal(board) && solve(board)) {\n return true;\n }\n }\n \n // There is no value that we can put in the first\n // empty space that was found, so the puzzle is\n // unsolvable given the values put in up to this\n // point.\n board[x][y] = 0;\n return false;\n}\n }\n}\n \n// There were no empty spaces to fill in, so the\n// puzzle must be solved.\nreturn true;\n }", "private static void findSum(Node node, int sum, int[] buffer, int level) {\n if (node == null)\n return;\n\n buffer[level] = node.value;\n int t = 0;\n for (int i = level; i >= 0; i--) {\n t += buffer[i];\n\n if (t == sum)\n print(buffer, i, level);\n }\n\n findSum(node.left, sum, buffer, level + 1);\n findSum(node.right, sum, buffer, level + 1);\n }", "public Matrix add(Matrix matrix) {\n if (check(matrix)) {\n Matrix sum = new Matrix(this.getWidth(), this.getHeight());\n for (int i = 0; i < this.getHeight(); i++) {\n for (int j = 0; j < this.getWidth(); j++) {\n sum.setEntry(j, i, this.getEntry(j, i) + matrix.getEntry(j, i));\n }\n }\n return sum;\n } else {\n return null;\n }\n }", "void iniciaMatriz() {\r\n int i, j;\r\n for (i = 0; i < 5; i++) {\r\n for (j = 0; j <= i; j++) {\r\n if (j <= i) {\r\n m[i][j] = 1;\r\n } else {\r\n m[i][j] = 0;\r\n }\r\n }\r\n }\r\n m[0][1] = m[2][3] = 1;\r\n\r\n// Para los parentesis \r\n for (j = 0; j < 7; j++) {\r\n m[5][j] = 0;\r\n m[j][5] = 0;\r\n m[j][6] = 1;\r\n }\r\n m[5][6] = 0; // Porque el m[5][6] quedo en 1.\r\n \r\n for(int x=0; x<7; x++){\r\n for(int y=0; y<7; y++){\r\n // System.out.print(\" \"+m[x][y]);\r\n }\r\n //System.out.println(\"\");\r\n }\r\n \r\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n //System.out.println(N);\n int[][] array = new int[N][N];\n for(int i = 0 ; i < N ; i++){\n for(int j =0 ; j < N; j++){\n int val = in.nextInt();\n array[i][j] = val; \n } \n }\n int sum1 = 0;\n for(int i = 0 ; i < N ; i++){\n sum1+= array[i][i];\n }\n //System.out.println(sum1);\n int sum2 = 0;\n int tempCol =N-1;\n for(int i =0 ; i < N ; i++){\n sum2+= array[i][tempCol];\n tempCol--;\n }\n //System.out.println(sum2);\n sum1 = Math.abs(sum1-sum2);\n System.out.println(sum1);\n }", "public int numMagicSquaresInside(int[][] grid) {\n //排除不够3X3的数组矩阵\n if (grid.length < 3){\n return 0;\n }\n int sum = 0;\n //找九宫格中间的数字\n for (int i = 1;i < grid.length - 1;i++){\n for (int j = 1;j < grid.length - 1;){\n //上述 条件1&&条件2\n if (grid[i][j] == 5&&isLawfulNum(grid,j,i)){\n sum ++;\n //如果当前九宫格满足条件意味着:\n // 向右移动一位的九宫格中间的数字不是5\n // 自己脑补一下把....\n j += 2;\n }else {\n j ++;\n }\n }\n }\n return sum;\n }", "private static int sum(List<Integer> L, int i,int j) {\n\t\tSystem.out.println(L+\"\\n\"+\"index i = \"+i+\"\\n\"+\"index j = \"+j);\n\t\tList<Integer> subListToSum = new ArrayList<Integer>();\n\t\t\n\t\tif (i <= j) { //make sure that i is less than j so we have a sublist of at least one\n\t\t\tsubListToSum.addAll(L.subList(i, j));\n\t\t\t\n\t\t}\n\t\t\n\t\telse if (i > j) { //print out a error so the user knows what they did wrong\n\t\t\tSystem.out.println(\"index 'i' is more than index 'j'\");\n\t\t}\n\t\t\n\t\tint sizeList = L.size(); //only reaches here if i <= j\n\t\tSystem.out.println(\"size of list is: \" + sizeList);\n\t\tif (j <= sizeList & i <= sizeList) { //check to account for out of bounds and negatives\n\t\t\tint result = 0;\n\t\t\t\n\t\t\tfor (int allInts : subListToSum) {\n\t\t\t\tresult += allInts;\n\t\t\t};\n\t\t\t\n\t\t\tSystem.out.println(\"Sum(\" + i + \", \" + j + \")\" + \" = \" + result);\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public int maxKilledEnemies(char[][] grid) {\n if( grid.length == 0 ) return 0;\n \n int m = grid.length, n = grid[0].length;\n \n MyNode[][] dp = new MyNode[m][n];\n \n //initialize matrix\n for(int i = 0; i < m; i++){\n for(int j = 0; j < n; j++){\n dp[i][j] = new MyNode();\n }\n }\n \n //scan the input and update matrix\n //read values from top left\n for(int i = 0; i < m; i++){\n for(int j = 0; j < n; j++){\n //skip walls\n if( grid[i][j] == 'W' ) continue;\n //accumulate enemys\n if( grid[i][j] == 'E' ){\n dp[i][j].top = 1;\n dp[i][j].left = 1;\n }\n //accumulate enemys from top\n dp[i][j].top += i > 0? dp[i-1][j].top : 0;\n //accumulate enemys from left\n dp[i][j].left += j > 0? dp[i][j-1].left : 0;\n }\n }\n \n int result = 0;\n \n //scan the input and update matrix\n //read values from bot right\n for(int i = m-1; i >= 0; i--){\n for(int j = n-1; j >= 0; j--){\n //skip walls\n if( grid[i][j] == 'W' ) continue;\n //accumulate enemys\n if( grid[i][j] == 'E' ){\n dp[i][j].bot = 1;\n dp[i][j].right = 1;\n }\n //accumulate enemys from bot\n dp[i][j].bot += i + 1 < m? dp[i+1][j].bot : 0;\n //accumulate enemys from right\n dp[i][j].right += j + 1 < n? dp[i][j+1].right : 0;\n \n //update result if possible \n if(grid[i][j] == '0') result = Math.max(result, dp[i][j].top + dp[i][j].bot + dp[i][j].left + dp[i][j].right );\n }\n } \n \n return result;\n }", "private static void findLevelSums(Node node, Map<Integer, Integer> sumAtEachLevelMap, int treeLevel){\n if(node == null){\n return;\n }\n //get the sum at current \"treeLevel\"\n Integer currentLevelSum = sumAtEachLevelMap.get(treeLevel);\n //if the current level was not found then we put the current value of the node in it\n //if it was was found then we add the current node value to the total sum currently present\n sumAtEachLevelMap.put(treeLevel, (currentLevelSum == null) ? node.data : currentLevelSum+node.data);\n \n //goes through all nodes in the tree\n findLevelSums(node.left, sumAtEachLevelMap, treeLevel+1);\n findLevelSums(node.right, sumAtEachLevelMap, treeLevel+1);\n \n }", "public static void bruteForceSolution(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\tint aux[][] = new int [m][n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\taux[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\t// if found 0 in main array making row and column in the auxilary row and column as 0\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\t\n\t\t\t\t\tfor(int k = 0;k<m;k++){\n\t\t\t\t\t\taux[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 0;k<n;k++){\n\t\t\t\t\t\taux[i][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//copying elements back to main array\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tmatrix[i][j] = aux[i][j];\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tint i,j,m,n,sum=0;\n\t\tint a[]=new int[20];\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"\\n enter the rows of matrix\");\n\t\tn=sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"\\n enter the \" + (n)+ \" values\");\n\t\tfor(i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n the values of matrix are\");\n\t\t\n\t\tfor(i=0;i<n;i++) {\n\t\t\tsum+=a[i];\n\t\t\tSystem.out.println(sum);\n\t\t}\n\n}", "private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c = 0; c < col; c++) {\n\t\t\t\tsum[r][c] = a[r][c] + b[r][c]; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br= new BufferedReader(new InputStreamReader (System.in));\n\t\tBufferedWriter bw= new BufferedWriter(new OutputStreamWriter(System.out));\n\t\tString[] str;\n\t\tstr=br.readLine().split(\" \");\n\t\tint n=Integer.parseInt(str[0]);\n\t\tint m=Integer.parseInt(str[1]);\n\t\tint[][] num=new int[n][n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tstr=br.readLine().split(\" \");\n\t\t\tfor(int j=0;j<n;j++) {num[i][j]=Integer.parseInt(str[j]);}\n\t\t}\n\t\tint [][] loc=new int[4][m];\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tstr=br.readLine().split(\" \");\n\t\t\tloc[0][i]=Integer.parseInt(str[0])-1;\n\t\t\tloc[1][i]=Integer.parseInt(str[1])-1;\n\t\t\tloc[2][i]=Integer.parseInt(str[2])-1;\n\t\t\tloc[3][i]=Integer.parseInt(str[3])-1;\n\t\t}\n\t\tint[][] sumDP=new int[n][n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<n;j++) {\n\t\t\t\tif(i==0) {\n\t\t\t\t\tif(j==0) sumDP[i][j]=num[i][j];\n\t\t\t\t\telse sumDP[i][j]=num[i][j]+sumDP[i][j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(j==0) sumDP[i][j]=num[i][j]+sumDP[i-1][j];\n\t\t\t\t\telse{\n\t\t\t\t\t\tsumDP[i][j]=num[i][j]+sumDP[i-1][j]+sumDP[i][j-1]-sumDP[i-1][j-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint x1=loc[0][i];\n\t\t\tint y1=loc[1][i];\n\t\t\tint x2=loc[2][i];\n\t\t\tint y2=loc[3][i];\n\t\t\tint ans;\n\t\t\tif(x1==0&&y1==0) ans=sumDP[x2][y2];\n\t\t\telse if(x1==0) ans=sumDP[x2][y2]-sumDP[x2][y1-1];\n\t\t\telse if(y1==0) ans=sumDP[x2][y2]-sumDP[x1-1][y2];\n\t\t\telse ans=sumDP[x2][y2]-sumDP[x1-1][y2]-sumDP[x2][y1-1]+sumDP[x1-1][y1-1];\n\t\t\tbw.write(String.valueOf(ans)+\"\\n\");\n\t\t}\n\t\t\n\t\tbr.close();\n\t\tbw.close();\n\t}", "public int getSum(int table, int index) {\n if (table >= TABLE_MIN && table <= TABLE_MAX) {\n if (index >= TABLE_MIN && index <= TABLE_MAX) {\n return timesTables[table][index];\n }\n else {\n System.out.println(index + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n }\n else {\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n return -1;\n }\n }", "public static int[][] verticalSums(int[][] a, int sumToFind) {\n\t\tint[][] verticalSums = copyArray(a);\n\t\tfor(int column = 0; column < verticalSums[0].length; column++) {\n\t\t\tint sum = 0;\n\t\t\tint start = 0;\n\t\t\tint indexToKeep = -1;\n\t\t\tfor (int row = 0; row < verticalSums.length; row++) {\n\t\t\t\tsum += verticalSums[row][column];\n\t\t\t\tif (sum == sumToFind) {\n\t\t\t\t\tindexToKeep = row;\n\t\t\t\t\tstart++;\n\t\t\t\t\trow = start - 1;\n\t\t\t\t\tsum = 0;\n\t\t\t\t}\n\t\t\t\telse if (sum > sumToFind) {\n\t\t\t\t\tif (start > indexToKeep) {\n\t\t\t\t\t\tverticalSums[start][column] = 0;\n\t\t\t\t\t}\n\t\t\t\t\tstart++;\n\t\t\t\t\trow = start - 1;\n\t\t\t\t\tsum = 0;\n\t\t\t\t}\n\t\t\t\telse if (sum < sumToFind && row == verticalSums.length - 1) {\n\t\t\t\t\tif (start > indexToKeep) {\n\t\t\t\t\t\tfor (int i = start; i < verticalSums.length; i++) {\n\t\t\t\t\t\t\tverticalSums[i][column] = 0;\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\tstart++;\n\t\t\t\t\t\trow = start - 1;\n\t\t\t\t\t\tsum = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn verticalSums;\n\n\t}", "public static int fittnes(int [] tablero){ \n int cantidadchoques=0; // si hay dos numeros iguales,suma un choque\n for(int i=0;i<tablero.length;i++){ \n for(int j=0;j<tablero.length;j++){\n if((i-tablero[i]==j-tablero[j])||(i+tablero[i])==j+tablero[j]){\n cantidadchoques++;\n }\n }\n } \n cantidadchoques=Math.abs(cantidadchoques-tablero.length);\n return cantidadchoques;\n }", "public static void main(String[] args) {\n System.out.println(\"Enter the 4 x 4 matrix: \");\n Scanner input = new Scanner(System.in);\n double[][] matrix = new double[4][4];\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 4; j++) {\n matrix[i][j] = input.nextDouble();\n }\n }\n\n // Invoke the sumColumn method\n double sum = sumMajorDiagonal(matrix);\n\n // Output the result\n System.out.println(\"The sum of the diagonal is \" + sum);\n }", "public static int calculateOpjectiveFunction(char[][] matrix ) {\n\n\n\n return (int)countNumberOfEmptyPosition(matrix)+countNmberOfCameras( matrix); \n\n}", "public int maximumSquareSubMatrix(int[][] matrix) {\n int m = matrix.length;\n if (m < 1) return 0;\n\n int n = matrix[0].length;\n\n int[][] dp = new int[m+1][n+1];\n for (int i = 1; i <= m; i++) {\n for (int j = 1; j <= n; j++) {\n if (matrix[i-1][j-1] == 1) {\n dp[i][j] = Math.min(dp[i-1][j], Math.min(dp[i][j-1], dp[i-1][j-1]))+1;\n }\n }\n }\n\n return dp[m][n];\n }", "public void diagonalSum()\r\n {\r\n // Queue which stores tree nodes\r\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n // Map to store sum of node's data lying diagonally\r\n Map<Integer, Integer> map = new TreeMap<>();\r\n \r\n root.vd = 0;\r\n queue.add(root);\r\n \r\n while (!queue.isEmpty())\r\n {\r\n \tNode current = queue.remove();\r\n int vd = current.vd;\r\n \r\n while (current != null)\r\n {\r\n map.put(vd, map.getOrDefault(vd, 0)+current.data);\r\n \r\n if (current.leftChild != null)\r\n {\r\n current.leftChild.vd = vd+1;\r\n queue.add(current.leftChild);\r\n }\r\n \r\n current = current.rightChild;\r\n }\r\n }\r\n \r\n System.out.println(\"Diagonal sum : \");\r\n for(int val: map.values())\r\n {\r\n \tSystem.out.println(val);\r\n }\r\n }", "int maxPathSum(int tri[][], int m, int n)\n {\n // loop for bottom-up calculation\n //i是row,j是column\n for (int i = m - 1; i >= 0; i--)\n {\n for (int j = 0; j <= i; j++)\n {\n // for each element, check both\n // elements just below the number\n // and below right to the number\n // add the maximum of them to it\n if (tri[i + 1][j] > tri[i + 1][j + 1])\n tri[i][j] += tri[i+1][j];\n else\n tri[i][j] += tri[i + 1][j + 1];\n }\n }\n\n // return the top element\n // which stores the maximum sum\n return tri[0][0];\n }", "private List<Integer> availableValues(int[][] mat, int i, int j) {\n\t\t\tboolean[] vals = new boolean[10];\n\t\t\t// check column\n\t\t\tfor (int m = 0; m < mat[i].length; m++) {\n\t\t\t\t markValIfFound(mat[i][m], vals);\n\n\t\t\t\t markValIfFound(mat[m][j], vals);\n\t\t\t}\n\n\t\t\tSpace p = getSquareCoordinates(i, j);\n\t\t\tfor (int m = 0; m < 3; m++) {\n\t\t\t\t for (int n = 0; n < 3; n++) {\n\t\t\t\t\t\tmarkValIfFound(mat[p.i + m][p.j + n], vals);\n\t\t\t\t }\n\t\t\t}\n\n\t\t\tif (i == j) {\n\t\t\t\t for (int m = 0; m < 10; m++) {\n\t\t\t\t\t\tmarkValIfFound(mat[m][m], vals);\n\t\t\t\t }\n\t\t\t} else if (i + j == 9) {\n\t\t\t\t for (int m = 0; m < 10; m++) {\n\t\t\t\t\t\tmarkValIfFound(mat[m][9 - m], vals);\n\t\t\t\t }\n\t\t\t}\n\n\t\t\tList<Integer> ret = new LinkedList<Integer>();\n\t\t\tfor (int m = 1; m < vals.length; m++) {\n\t\t\t\t if (!vals[m])\n\t\t\t\t\t\tret.add(m);\n\t\t\t}\n\n\t\t\tif (ret.size() == 0)\n\t\t\t\t return null;\n\t\t\telse \n\t\t\t\t return ret;\n\t }", "public int sum()\n {\n return sum(0,0,size);\n }", "private static int evaluateBoard(final int[][] givenBoard) {\n final int[][] board = cloneBoard(givenBoard);\n\n final int numRows = givenBoard.length;\n final int numCols = givenBoard[0].length;\n\n \n // If the game is complete\n if (!Utils.hasMove(board)) {\n // Find largest absolute move value for player and opponent\n int playerScore = 0;\n int opponentScore = 0;\n for (final int[] row : board) {\n for (final int val : row) {\n if (val > playerScore) playerScore = val;\n if (val < opponentScore) opponentScore = val;\n } \n }\n // Give a big reward + the ammount we won the game by\n return WIN_REWARD + playerScore + opponentScore;\n }\n boardsEvaluated++;\n\n \n // If the game is incomplete, return the diference between the average \n // distance that the player and opponent are from each empty square\n int[][] playerDistances = distanceGrid(board);\n int[][] opponentDistances = distanceGrid(flipBoard(board));\n \n int totalPlayerDistance = 0;\n int totalOpponentDistance = 0;\n \n int maxPlayerDistance = 0;\n int maxOpponentDistance = 0;\n \n \n int largestPlayerMove = 0;\n int smallestOpponentMove = 0;\n \n int numEmptySpaces = 0;\n \n for (int r = 0; r < numRows; r++) {\n for (int c = 0; c < numCols; c++) {\n if (playerDistances[r][c] > 0) {\n totalPlayerDistance += playerDistances[r][c];\n numEmptySpaces++;\n }\n if (opponentDistances[r][c] > 0) {\n totalOpponentDistance += opponentDistances[r][c];\n }\n \n int boardVal = board[r][c];\n if (largestPlayerMove < boardVal) largestPlayerMove = boardVal;\n if (smallestOpponentMove > boardVal) smallestOpponentMove = boardVal;\n \n } \n }\n int averageDistanceDifference = totalOpponentDistance - totalPlayerDistance;\n\n int largestMoveDifference = largestPlayerMove + smallestOpponentMove;\n\n\n return averageDistanceDifference + largestMoveDifference;\n }", "private int checkCorners(int[] arr, int[] availableMoves) {\n for (int i = 0; i <= 6; i += 6) {\n int sum = arr[i] + arr[i + 1] + arr[i + 2];\n System.out.println(sum);\n if (sum == -1 && contains(availableMoves,i)) { \n return i;\n } \n }\n\n // Check verticals\n for (int i = 0; i < 3; i+=2) {\n int sum = arr[i] + arr[i + 3] + arr[i + 6];\n System.out.println(sum);\n if (sum == -1 && contains(availableMoves,i)) {\n return i;\n } \n }\n \n return -1;\n }", "public static void main(String[] args) {\n MinimumMeetingRooms solution = new MinimumMeetingRooms();\n\n // [(30, 75), (0, 50), (60, 150)]\n // return 2\n int[][] intervals = new int[][] {{30, 75}, {0, 50}, {60, 150}};\n System.out.println(solution.numRooms(intervals));\n\n // [(30, 75), (0, 50), (60, 150), (40, 170)]\n // return 3\n intervals = new int[][] {{30, 75}, {0, 50}, {60, 150}, {40, 170}};\n System.out.println(solution.numRooms(intervals));\n\n // [(30, 55), (0, 20), (60, 150), (160, 170)]\n // return 1\n intervals = new int[][] {{30, 55}, {0, 20}, {60, 150}, {160, 170}};\n System.out.println(solution.numRooms(intervals));\n }", "public int matrixScore(int[][] A) {\n int n = A.length, m = A[0].length, ans = 0;\n for (int i = 0; i < n; ++i) {\n if (A[i][0] == 0) {\n flipRow(A, i);\n }\n }\n for (int j = 1; j < m; ++j) {\n int cnt = 0;\n for (int i = 0; i < n; ++i) {\n cnt += A[i][j];\n }\n if (cnt * 2 < n) {\n flipCol(A, j);\n }\n }\n for (int i = 0; i < n; ++i) {\n int cur = 0;\n for (int j = 0; j < m; ++j) {\n cur = (cur << 1) + A[i][j];\n }\n ans += cur;\n }\n return ans;\n}", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "public static int sumWays(int sum, int[] nums) {\n if (sum == 0)\n return 0;\n //find sum for all the numbers from 0- sum\n int[] sumCount = new int[sum + 1];\n for (int i = 0; i < sumCount.length; i++) {\n sumCount[i] = -1;\n }\n // assuming nums in sum are ordered\n // number of ways to sum the smallest number is num is 1.\n sumCount[nums[0]] = 1;\n for (int currSum = nums[0] + 1; currSum <= sum; currSum++) {\n int currSumCnt = 0;\n for (int i = 0; i < nums.length; i++) {\n // number of ways to sum the number nums[i] is sumCount[nums[i]]\n // number of ways to sum the number sum - nums[i] is sumCount[sum- nums[i]]\n int diff = currSum - nums[i];\n if ((diff > 0) && (diff < sum) && (sumCount[diff]) > 0) {\n currSumCnt += sumCount[diff];\n }\n }\n sumCount[currSum] = currSumCnt;\n }\n System.out.println(\"Num of ways: \");\n printArr(sumCount, \"Ways to get %d is %d\");\n return sumCount[sum];\n }", "public static void findSubarrays(int[] arr, int sum)\n {\n for (int i = 0; i < arr.length; i++)\n {\n int sum_so_far = 0;\n \n // consider all sub-arrays starting from i and ending at j\n for (int j = i; j < arr.length; j++)\n {\n // sum of elements so far\n sum_so_far += arr[j];\n \n // if sum so far is equal to the given sum\n if (sum_so_far == sum) {\n print(arr, i, j);\n }\n }\n }\n }", "public int evaluate(int[][] gameBoard) {\n for (int r = 0; r < 3; r++) {\n if (gameBoard[r][0] == gameBoard[r][1] && gameBoard[r][1] == gameBoard[r][2]) {\n if (gameBoard[r][0] == ai)\n return +10;\n else if (gameBoard[r][0] == human)\n return -10;\n }\n }\n // Checking for Columns for victory.\n for (int c = 0; c < 3; c++) {\n if (gameBoard[0][c] == gameBoard[1][c] && gameBoard[1][c] == gameBoard[2][c]) {\n //gameLogic.getWinType();\n if (gameBoard[0][c] == ai)\n return +10;\n else if (gameBoard[0][c] == human)\n return -10;\n }\n }\n // Checking for Diagonals for victory.\n if (gameBoard[0][0] == gameBoard[1][1] && gameBoard[1][1] == gameBoard[2][2]) {\n if (gameBoard[0][0] == ai)\n return +10;\n else if (gameBoard[0][0] == human)\n return -10;\n }\n if (gameBoard[0][2] == gameBoard[1][1] && gameBoard[1][1] == gameBoard[2][0]) {\n if (gameBoard[0][2] == ai)\n return +10;\n else if (gameBoard[0][2] == human)\n return -10;\n }\n // Else if none of them have won then return 0\n return 0;\n }" ]
[ "0.70809174", "0.6879698", "0.68571377", "0.6238069", "0.6187121", "0.609984", "0.6096749", "0.604917", "0.6034185", "0.5997336", "0.5781629", "0.57420313", "0.5730133", "0.57282573", "0.56888175", "0.5666347", "0.56595343", "0.5655266", "0.5651733", "0.5647619", "0.5640412", "0.56149477", "0.56144285", "0.5608198", "0.5597897", "0.55786073", "0.5573937", "0.5572415", "0.55565774", "0.5547896", "0.5534473", "0.55337566", "0.5524719", "0.55235016", "0.55131555", "0.5511755", "0.5500996", "0.5482656", "0.5478805", "0.5464992", "0.5464735", "0.54524827", "0.54472905", "0.54444367", "0.5441707", "0.5440852", "0.5439877", "0.5430325", "0.54206127", "0.5409569", "0.54087216", "0.5399655", "0.5375961", "0.5374945", "0.53715116", "0.5368506", "0.53684115", "0.53683895", "0.53505415", "0.5349822", "0.5343984", "0.53322273", "0.53321505", "0.5331888", "0.532266", "0.5309286", "0.5309237", "0.5297438", "0.5294016", "0.529093", "0.52881867", "0.52873725", "0.5287344", "0.5282379", "0.5276013", "0.5267874", "0.5257122", "0.52511585", "0.5248756", "0.5242745", "0.5238142", "0.52371424", "0.5234195", "0.5227948", "0.5224786", "0.5218438", "0.52127767", "0.5212319", "0.52059746", "0.519693", "0.5193383", "0.51873857", "0.51844007", "0.518062", "0.5176991", "0.51752067", "0.5174799", "0.5173987", "0.5173609", "0.51724124" ]
0.7700112
0
TODO from preferences Set up the sync adapter
public SyncAdapter(Context context, boolean autoInitialize) { super(context, autoInitialize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void sync(){\n }", "public void sync()\n {\n setAutoSync(false);\n // simply send sync command\n super.executionSync(Option.SYNC);\n }", "public void setSync(boolean sync) {\n this.sync = sync;\n }", "private SYNC(String strSyncMode) {\n this.strSynMode = strSyncMode;\n }", "@Override\r\n\tpublic void onPerformSync(Account account, Bundle extras, String authority,\r\n\t\t\tContentProviderClient provider, SyncResult syncResult) {\r\n\t\t \r\n\r\n\t}", "public SyncAdapter(Context context, boolean autoInitialize) {\r\n super(context, autoInitialize);\r\n contentResolver = context.getContentResolver();\r\n }", "public SyncAdapter(Context context, boolean autoInitialize) {\n super(context, autoInitialize);\n /*\n * If your app uses a content resolver, get an instance of it\n * from the incoming Context\n */\n mContentResolver = context.getContentResolver();\n }", "public void localToRemoteRatingSync()\r\n {\r\n Uri uri = DataBaseContract.Rating.URI_CONTENT;\r\n int results = ratingModel.changeToSync(uri,contentResolver);\r\n Log.i(TAG, \"Ratings puestos en cola de sincronizacion:\" + results);\r\n\r\n ArrayList<Rating> ratingsPendingForInsert = ratingModel.getRatingsForSync();\r\n Log.i(TAG, \"Se encontraron \" + ratingsPendingForInsert.size() + \" ratings para insertar en el servidor\");\r\n\r\n syncRatingsPendingForInsert(ratingsPendingForInsert);\r\n }", "@Override\n public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {\n\n Log.d(NewsSyncAdapter.class.getCanonicalName(), \"Starting sync...\");\n\n //testing\n ContentValues values = new ContentValues();\n values.put(DatabaseHelper.NEWS_COL_HEADLINE, \"Aliens are attacking; seek shelter\");\n\n Uri uri = NewsContentProvider.CONTENT_URI;\n mContentResolver.insert(uri, values);\n }", "private synchronized void syncData() {\n try {\n // pulling data from server\n pullData();\n\n // pushing local changes to server\n// recordStatus=2\n pushData();\n// recordStatus=1\n// pushData1();\n } catch (Throwable throwable) {\n Log.d(TAG, \"doWork: \" + throwable.getMessage());\n }\n // Toast.makeText(getApplicationContext(), \".\", Toast.LENGTH_SHORT).show();\n }", "public void setSyncStatus(int syncStatus);", "public void initial_list_sync(){\n \tFile file = new File(sync_directory_conf);\n \tif(file.exists()){\n \t\tArrayList<String> sync_directory_list = new ArrayList<String>();\n sync_directory_list = read_from_file.readFromFile(sync_directory_conf);\n text_sync_directory_path.setText(sync_directory_list.get(0));\n \t}else{\n \t\treturn;\n \t}\n \t\t\n }", "public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {\r\n super(context, autoInitialize, allowParallelSyncs);\r\n contentResolver = context.getContentResolver();\r\n }", "private void sync() {\n new AsyncTask<Void, Void, Void>() {\n ProgressDialog progressDialog;\n\n @Override\n protected void onPreExecute() {\n progressDialog = ProgressDialog.show(\n PostActivity.this, \"\", getString(R.string.loading));\n }\n\n @Override\n protected Void doInBackground(Void... params) {\n try {\n new PostBusiness().updateAll();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n progressDialog.dismiss();\n postFragment.updateList();\n }\n }.execute();\n }", "public void start(){\n\t\tboolean isMasterSyncEnabled = ContentResolver.getMasterSyncAutomatically();\n\t\tif(isMasterSyncEnabled)\n\t\t{\n\t\t\tboolean noRespNoti = SharedPref.getMainBool(SharedPref.Keys.NO_RESP_NOTI, curContext);\n\t\t\tboolean noAcceptNoti = SharedPref.getMainBool(SharedPref.Keys.NO_ACCEPT_NOTI, curContext);\n\t\t\t\n\t\t\tif( !noRespNoti || !noAcceptNoti ){\n\t\t\t\tNoti noti = null;\n\t\t\t\ttry {\n\t\t\t\t\tnoti = new DownloadNoti(curContext).execute().get();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tLogAdp.e(getClass(), \"start()\", \"error during downloading noti\", e);\n\t\t\t\t\tnoti = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(noti != null){\n\t\t\t\t\t\n\t\t\t\t\tif(noti.isNewResp == null){\n\t\t\t\t\t\t//if user turn off respNoti on other device sync this setting\n\t\t\t\t\t\tif(!noRespNoti){\n\t\t\t\t\t\t\tSharedPref.setMain(SharedPref.Keys.NO_RESP_NOTI, true, curContext);\n\t\t\t\t\t\t\tnoRespNoti = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!noRespNoti && noti.isNewResp){\n\t\t\t\t\t\tstartNotify(R.string.resp_noti_title, R.string.resp_noti_description, NotiEnum.RESPOND);\n\t\t\t\t\t}\n\t\t\t\t\tif(noti.isNewAccept == null){\n\t\t\t\t\t\t//if user turn off respAccept on other device sync this setting\n\t\t\t\t\t\tif(!noAcceptNoti){\n\t\t\t\t\t\t\tnoRespNoti = true;\n\t\t\t\t\t\t\tSharedPref.setMain(SharedPref.Keys.NO_ACCEPT_NOTI, true, curContext);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!noAcceptNoti && noti.isNewAccept){\n\t\t\t\t\t\tstartNotify(R.string.accept_noti_title, R.string.accept_noti_description, NotiEnum.ACCEPT);\n\t\t\t\t\t}\n\t\t\t\t\t//if sync settings turn off getting noti\n\t\t\t\t\tif(noRespNoti && noAcceptNoti)\n\t\t\t\t\t\tnew Schedule(curContext).cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onPerformSync(Account account, Bundle extras, String authority,\n\t\t\tContentProviderClient provider, SyncResult syncResult) {\n\t\tsyncItems();\n\t\tsyncRentals();\n\t\t\n\t}", "public SyncAdapter(\n Context context,\n boolean autoInitialize,\n boolean allowParallelSyncs) {\n super(context, autoInitialize, allowParallelSyncs);\n /*\n * If your app uses a content resolver, get an instance of it\n * from the incoming Context\n */\n mContentResolver = context.getContentResolver();\n }", "private void syncNext() {\n Log.d(TAG, \"syncNext +++++\");\n mCurrentSyncRequest = mSyncRequestQueue.getFirstRequest();\n if (mCurrentSyncRequest != null) {\n mIsSyncing = true;\n mCurrentSyncRequest.notifyState(SyncRequest.SyncNotify.SYNC_STATE_START);\n switch (mCurrentSyncRequest.mSyncType) {\n case SyncRequest.SYNC_BACKUP:\n mEngine.sync(ContactsSyncEngine.SYNC_MODE_BACKUP);\n break;\n case SyncRequest.SYNC_RESTORE:\n mEngine.sync(ContactsSyncEngine.SYNC_MODE_RESTORE);\n break;\n case SyncRequest.CHECK_RESTORE_RESULT:\n mEngine.sync(ContactsSyncEngine.SYNC_MODE_CHECK_RESTORE);\n break;\n default:\n break;\n }\n } else {\n Log.d(TAG, \"SyncRequestQueue is empty !\");\n }\n Log.d(TAG, \"syncNext -----\");\n }", "@Override\n\tpublic void notifySettingChanged() {\n\t}", "@Override\n protected void onPostExecute(final Void aVoid) {\n userSettings.getDataset().synchronize(new Dataset.SyncCallback() {\n @Override\n public void onSuccess(Dataset dataset, List<Record> updatedRecords) {\n Log.d(LOG_TAG, \"onSuccess - dataset updated\");\n }\n\n @Override\n public boolean onConflict(Dataset dataset, List<SyncConflict> conflicts) {\n Log.d(LOG_TAG, \"onConflict - dataset conflict\");\n return false;\n }\n\n @Override\n public boolean onDatasetDeleted(Dataset dataset, String datasetName) {\n Log.d(LOG_TAG, \"onDatasetDeleted - dataset deleted\");\n return false;\n }\n\n @Override\n public boolean onDatasetsMerged(Dataset dataset, List<String> datasetNames) {\n Log.d(LOG_TAG, \"onDatasetsMerged - datasets merged\");\n return false;\n }\n\n @Override\n public void onFailure(DataStorageException dse) {\n Log.e(LOG_TAG, \"onFailure - \" + dse.getMessage(), dse);\n }\n });\n }", "public void fullSync() {\n if (checkboxRepository.findOne(1).isCheckboxState()) {\n now = LocalDateTime.now();\n\n logger.info(\"De sync start\");\n long startTime = System.nanoTime();\n try {\n fillLocalDB.fillDb();\n smartschoolSync.ssSync();\n } catch (IOException e) {\n e.getStackTrace();\n logger.error(\"Error bij het uitvoeren van de sync\");\n } catch (MessagingException e) {\n logger.error(\"Error bij het verzenden van een mail tijdens de sync\");\n }\n logger.info(\"De sync is voltooid\");\n Statistic statistic = statisticRepository.findOne(1);\n statistic.setAantal(informatService.getTotaalAantalServerErrors());\n statisticRepository.save(statistic);\n informatService.setTotaalAantalServerErrors(0L);\n long endTime = System.nanoTime();\n long duration = (endTime - startTime) / 1000000; //milliseconds\n Statistic statisticDuration = statisticRepository.findOne(3);\n statisticDuration.setAantal(duration);\n statisticRepository.save(statisticDuration);\n Statistic statisticLastSync = statisticRepository.findOne(4);\n statisticLastSync.setError(String.valueOf(now));\n statisticRepository.save(statisticLastSync);\n }\n }", "public static void syncImmediately(Context context) {\n Bundle bundle = new Bundle();\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\n ContentResolver.requestSync(getSyncAccount(context),\n context.getString(R.string.content_authority), bundle);\n }", "@Override\n public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {\n SyncUtilities.sendContactsSync(mContext, \"3465\", \"+254720893982\");\n Log.i(\"inPerformSync\", \"Synching\");\n }", "private void reloadAdapter() {\n new ContactAsync().execute();\n }", "static public void setSyncEnabled(Context context, boolean enabled) {\n ContentValues values = new ContentValues();\n values.put(KEY, KEY_SYNC_ENABLED);\n values.put(VALUE, enabled ? 1 : 0);\n context.getContentResolver().insert(CONTENT_URI, values);\n }", "void syncItem() {\n\t\t\n\t\t\n\t\tHashMap<String, String> hm = new HashMap<String, String>();\n\t\thm.put(\"id\", \"2\");\n\t\thm.put(\"name\", \"食品\");\n\t\thm.put(\"test\", \"测试\");\n\t\t\n\t\tList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();\n\t\tlist.add(hm);\n\t\tString xml = getSyncXML(\"item\", list);\n\t\tSystem.out.println(xml);\n\t\tsendXMLToServer4Sync(xml);\n\t}", "@Override\r\n\tpublic ISyncAdapter createSyncAdapter(ISchema schema, String baseDirectory, FeedRef feedRef) {\n\t\treturn null;\r\n\t}", "public int getSyncType() {\n return syncType;\n }", "public void syncChannel() {\r\n\t\tarrChannels.clear(); // I want to make sure that there are no leftover data inside.\r\n\t\tfor(int i = 0; i < workChannels.size(); i++) {\r\n\t\t\tarrChannels.add(workChannels.get(i));\r\n\t\t}\r\n\t}", "@Override\n\tpublic void sync() throws IOException {\n\t\t\n\t}", "@Override\n public void sync(Context context) {\n context.setCandidateSet(Database.getCandidateSet());\n context.setVoterSet(Database.getVoterSet());\n context.setLogins(Database.getLogins());\n context.setCommissionerSet(Database.getCommissionerSet());\n }", "@Override\n\t\t\tpublic void syncDateChange(Map<String, Set<DbxRecord>> mMap) {\n\t\t\t\tToast.makeText(this, \"Dropbox sync successed\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tif (attachFragment != null ) {\n\t\t\t\t\t OnSyncFinishedListener onSyncFinishedListener = (OnSyncFinishedListener)attachFragment;\n\t\t\t\t\t onSyncFinishedListener.onSyncFinished();\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private SyncState() {}", "public void sync() {\n new Thread(new Runnable() {\n public void run() {\n\n try {\n syncWeatherData();\n } catch (IOException e) {\n Log.i(\"sync\", \"error syncing weather data\");\n e.printStackTrace();\n }\n try {\n syncEnergyData();\n } catch (IOException e) {\n Log.i(\"sync\", \"error syncing energy data\");\n e.printStackTrace();\n }\n\n Date now = new Date();\n lastUpdated = now.getTime();\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor e = sharedPref.edit();\n e.putLong(\"lastUpdated\", lastUpdated);\n e.commit();\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n\n Log.i(\"sync\", \"consumption \" + getLiveDemand());\n Log.i(\"sync\", \"windmill1 \" + getLiveProduction(1));\n Log.i(\"sync\", \"temp \" + getCurrentTemperature());\n Log.i(\"sync\", \"wind \" + getCurrentWindSpeed());\n }\n }).start();\n\n }", "public static void syncImmediately(Context context) {\n Bundle bundle = new Bundle();\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\n ContentResolver.requestSync(getSyncAccount(context), MovieDbContract.CONTENT_AUTHORITY, bundle);\n }", "public void setSyncFlag(Boolean syncFlag) {\n this.syncFlag = syncFlag;\n }", "public void setSyncFlag(Boolean syncFlag) {\n this.syncFlag = syncFlag;\n }", "public void setMasterSyncAutomatically(boolean sync) {\n ContentResolver.setMasterSyncAutomatically(sync);\n }", "public void setSyncOption(SyncOption SyncOption) {\n this.SyncOption = SyncOption;\n }", "@Override\n public void callSync() {\n\n }", "public Synchronization(Context context) {\n\t\tprgDialog = new ProgressDialog(context);\n\t\tprgDialog\n\t\t\t\t.setMessage(\"Synching SQLite Data with Remote MySQL DB. Please wait...\");\n\t\tprgDialog.setCancelable(false);\n\t\tthis.context = context;\n\t}", "public void startSync() {\n mLogger.d(\"Starting silent sync\");\n startSync(new IMediaSyncListener() {\n @Override\n public void step() {\n\n }\n\n @Override\n public void onFinish(int total, int ok, int ko) {\n mLogger.d(\"Silent sync finished, killing the service\");\n SyncService.this.onDestroy();\n }\n });\n }", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n //showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading settings from datastore...\", \"\");\n //simpleWaitDialog.setCancelable(true);\n\n lstsettingdtos = new ArrayList<>();\n _settingslistadapter = new settingslistadapter(getApplicationContext(), lstsettingdtos);\n _settingslistadapter.notifyDataSetChanged();\n\n super.onPreExecute();\n }", "@Override public void onPerformSync(\n Account account,\n Bundle extras,\n String authority,\n ContentProviderClient provider,\n SyncResult syncResult) {\n broadcastSyncStatus(SyncManager.STARTED);\n\n Intent syncFailedIntent =\n new Intent(getContext(), SyncManager.SyncStatusBroadcastReceiver.class);\n syncFailedIntent.putExtra(SyncManager.SYNC_STATUS, SyncManager.FAILED);\n\n Intent syncCanceledIntent =\n new Intent(getContext(), SyncManager.SyncStatusBroadcastReceiver.class);\n syncCanceledIntent.putExtra(SyncManager.SYNC_STATUS, SyncManager.CANCELED);\n\n // If we can't access the Buendia API, short-circuit. Before this check was added, sync\n // would occasionally hang indefinitely when wifi is unavailable. As a side effect of this\n // change, however, any user-requested sync will instantly fail until the HealthMonitor has\n // made a determination that the server is definitely accessible.\n if (App.getInstance().getHealthMonitor().isApiUnavailable()) {\n LOG.e(\"Abort sync: Buendia API is unavailable.\");\n broadcastSyncStatus(SyncManager.FAILED);\n return;\n }\n\n try {\n checkCancellation(\"before work started\");\n } catch (CancellationException e) {\n broadcastSyncStatus(SyncManager.CANCELED);\n return;\n }\n\n // Decide which phases to do. If FULL_SYNC is set or no phases\n // are specified, do them all.\n Set<SyncPhase> phases = new HashSet<>();\n for (SyncPhase phase : SyncPhase.values()) {\n if (extras.getBoolean(phase.name())) {\n phases.add(phase);\n }\n }\n boolean fullSync = phases.isEmpty() || extras.getBoolean(SyncOption.FULL_SYNC.name());\n if (fullSync) {\n Collections.addAll(phases, SyncPhase.values());\n }\n\n LOG.i(\"Requested phases are: %s\", phases);\n broadcastSyncProgress(0, R.string.sync_in_progress);\n TimingLogger timings = new TimingLogger(LOG.tag, \"onPerformSync\");\n\n BuendiaProvider buendiaProvider = (BuendiaProvider) provider.getLocalContentProvider();\n try (DatabaseTransaction tx = buendiaProvider.startTransaction(SYNC_SAVEPOINT_NAME)) {\n try {\n if (fullSync) {\n storeFullSyncStartTime(provider, Instant.now());\n }\n\n float progressIncrement = 100.0f/phases.size();\n int completedPhases = 0;\n for (SyncPhase phase : SyncPhase.values()) {\n if (phases.contains(phase)) {\n LOG.i(\"--- Begin %s ---\", phase);\n checkCancellation(\"before \" + phase);\n broadcastSyncProgress((int) (completedPhases * progressIncrement), phase.message);\n phase.runnable.sync(mContentResolver, syncResult, provider);\n timings.addSplit(phase.name() + \" phase completed\");\n completedPhases++;\n }\n }\n broadcastSyncProgress(100, R.string.completing_sync);\n\n if (fullSync) {\n storeFullSyncEndTime(provider, Instant.now());\n }\n } catch (CancellationException e) {\n LOG.i(e, \"Sync canceled\");\n tx.rollback();\n // Reset canceled state so that it doesn't interfere with next sync.\n broadcastSyncStatus(SyncManager.CANCELED);\n return;\n } catch (OperationApplicationException e) {\n LOG.e(e, \"Error updating database during sync\");\n tx.rollback();\n syncResult.databaseError = true;\n broadcastSyncStatus(SyncManager.FAILED);\n return;\n } catch (Throwable e) {\n LOG.e(e, \"Error during sync\");\n tx.rollback();\n syncResult.stats.numIoExceptions++;\n broadcastSyncStatus(SyncManager.FAILED);\n return;\n }\n }\n timings.dumpToLog();\n broadcastSyncStatus(SyncManager.COMPLETED);\n LOG.i(\"onPerformSync completed\");\n }", "public void syncMessages() {\n\t\tArrayList<ChatEntity> nonSyncedChatEntities = new ArrayList<>();\n\t\tnonSyncedChatEntities.addAll(chatViewModel.loadChatsWithSyncStatus(false, nameID));\n\n\t\tif (nonSyncedChatEntities.size() > 0) {\n\t\t\tfor (int i = 0; i < nonSyncedChatEntities.size(); i++) {\n\t\t\t\tChatEntity chatEntity = nonSyncedChatEntities.get(i);\n\t\t\t\tchatEntity.setSynced(true);\n\t\t\t\tchatViewModel.updateSource(chatEntity);\n\t\t\t\tgetChatResult(nonSyncedChatEntities.get(i).getMessage());\n\t\t\t}\n\t\t}\n\t}", "public static void requestManualSync(Context context) {\n requestManualSync(AccountUtils.getActiveAccount(context));\n }", "public SyncManager getSyncManager() {\n return sync;\n }", "private void syncWithServer() {\n if (!mIsActivityResumedFromSleep) {\n LogHelper\n .log(TAG, \"Activity is not resuming from sleep. So service initialization will handle xmpp login.\");\n return;\n }\n RobotCommandServiceManager.loginXmppIfRequired(getApplicationContext());\n }", "public void sync_notifications() {\n Log.i(TAG,\"********** sync_notifications\");\n\n if (NotifierConfiguration.cfg_notifier_paused) {\n Log.i(TAG, \"Notifier paused. Ignoring...\");\n return;\n }\n\n sync_in_progress = true;\n /**\n * Initially mark everything in notifications table as inactive\n */\n ntfcn_items.markAllInactive();\n\n for (StatusBarNotification asbn : getActiveNotifications()) {\n StatusBarNotification sbn = asbn.clone();\n\n String condensed_string = ntfcn_items.getCondensedString(sbn);\n\n Log.i(TAG,\"Condensed string: \" + condensed_string);\n\n try {\n PackageManager pm = getPackageManager();\n String app_name = (String) pm.getApplicationLabel(\n pm.getApplicationInfo(sbn.getPackageName(), PackageManager.GET_META_DATA));\n\n Log.i(TAG,\"ID :\" + sbn.getId() + \"\\t\" + sbn.getNotification().tickerText +\n \"\\t\" + sbn.getPackageName());\n\n Log.i(TAG,\"App name :\" + app_name + \"\\n\");\n\n HashSet<String> exclusion_list = NotifierConfiguration.excluded_packages;\n if (exclusion_list.contains(sbn.getPackageName())) {\n Log.i(TAG, \"Pkg: \" + sbn.getPackageName() + \" in exclusion list. Ignoring.\");\n continue;\n }\n\n /** skip group headers */\n if ( ((sbn.getNotification().flags & Notification.FLAG_GROUP_SUMMARY) != 0)) {\n Log.i(TAG, \"skippiing group header key: \" + sbn.getKey());\n continue;\n }\n\n /** Add a new active notification entry or\n * just mark it as active if it already exists\n */\n addActiveSBN(sbn);\n\n\n /**\n if (sbn.getNotification().extras.get(NotificationCompat.EXTRA_TEMPLATE).equals(\n \"android.app.Notification$MessagingStyle\")\n ) {\n\n Log.e(TAG, \"Messaging\");\n Log.i(TAG, \"Extra Messages: \" +\n sbn.getNotification().extras.get(NotificationCompat.EXTRA_MESSAGES).toString());\n\n Log.i(TAG, \"Extra Messages History: \" +\n sbn.getNotification().extras.get(Notification.EXTRA_HISTORIC_MESSAGES));\n\n Log.i(TAG, \"Extra conversation title: \" +\n sbn.getNotification().extras.get(NotificationCompat.EXTRA_CONVERSATION_TITLE));\n }\n\n\n Log.i(TAG, \"Flags: \" +\n ((sbn.getNotification().flags & Notification.FLAG_GROUP_SUMMARY) != 0));\n\n Log.i(TAG, \"Title :\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TITLE) + \"\\n\");\n Log.i(TAG, \"Text :\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TEXT) + \"\\n\");\n Log.i(TAG, \"Extra conv titles: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_CONVERSATION_TITLE));\n\n Log.i(TAG, \"Extra info text: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_INFO_TEXT));\n Log.i(TAG, \"Extra Messages: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_MESSAGES));\n\n Log.i(TAG, \"Extra big text lines\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_BIG_TEXT));\n Log.i(TAG, \"Extra text lines\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TEXT_LINES));\n Log.i(TAG, \"Extra sub text \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_SUB_TEXT));\n Log.i(TAG, \"Extra summary text \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_SUMMARY_TEXT));\n\n Log.i(TAG, \"Extra title big: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TITLE_BIG));\n\n\n Log.i(TAG, \"SBN group? \" + sbn.isGroup());\n Log.i(TAG, \"Clearable? \" + sbn.isClearable());\n Log.i(TAG, \"Posted at \" + DateUtils.getRelativeTimeSpanString(sbn.getPostTime()));\n Log.i(TAG, \"Group key \" + sbn.getGroupKey());\n Log.i(TAG, \"SBN key \" + sbn.getKey());\n Log.i(TAG, \"TAG \" + sbn.getTag());\n Log.i(TAG, \"Click Action :\" + sbn.getNotification().contentIntent.toString());\n\n Log.i(TAG, \"Delete Action :\" + sbn.getNotification().deleteIntent.toString());\n\n for (Notification.Action action : sbn.getNotification().actions) {\n Log.i(TAG, \"Action :\" + action.title + \" Intent: \" + action.actionIntent.toString() + \"\\n\");\n }\n */\n } catch(Exception e) {\n Log.e(TAG, \"Exception occurred while syncing notifications: \" + e.getMessage());\n }\n }\n\n /**\n * If there are entries previously marked inactive, but doesn't have its cleared time set,\n * Set its cleared time to now\n */\n ntfcn_items.update_cleared_time_if_zero();\n this.num_active = ntfcn_items.getActiveCount();\n sync_in_progress = false;\n\n /** Update active notifications count in persistent notification */\n pnotif_builder.setContentText(\"Tap to open Notifications Center\");\n\n if (NotifierConfiguration.cfg_svc_notification_enabled) {\n show_notification();\n }\n\n /**\n * TODO: if needed, remove all inactive applications at this point\n * if NotifierConfiguration.cfg_cache_notifications_enabled is false\n */\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.manual_sync:\n if (ECardUtils.isNetworkAvailable(this)) {\n // check sharedpreferences\n final SharedPreferences prefs = getSharedPreferences(\n AppGlobals.MY_PREFS_NAME, MODE_PRIVATE);\n SharedPreferences.Editor prefEditor = prefs.edit();\n // sync history, Supposely not critical, so don't need to wait on it\n final AsyncTasks.SyncDataTaskHistory syncHistory = new AsyncTasks.SyncDataTaskHistory(\n this, currentUser, prefs, prefEditor, true);\n syncHistory.execute();\n Handler handlerHistory = new Handler();\n handlerHistory.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n if (syncHistory.getStatus() == AsyncTask.Status.RUNNING) {\n Toast.makeText(getApplicationContext(), \"Sync History Timed Out\",\n Toast.LENGTH_SHORT).show();\n syncHistory.cancel(true);\n }\n }\n }, HISTORY_TIMEOUT);\n\n Thread timerThread = new Thread() {\n\n public void run() {\n while (syncHistory.getStatus() == AsyncTask.Status.RUNNING) {\n try {\n sleep(500);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n populateListView();\n }\n };\n timerThread.start();\n\n } else {\n Toast.makeText(getApplicationContext(), \"No network ...\",\n Toast.LENGTH_SHORT).show();\n }\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public void onFinish() {\n EventBus.getDefault().post(new SyncContactsFinishedEvent());\n //to prevent initial sync contacts when the app is launched for first time\n SharedPreferencesManager.setContactSynced(true);\n stopSelf();\n }", "Boolean autoSync();", "@Override\n\tpublic void sync() throws IOException\n\t{\n\n\t}", "public boolean needsSync() {\n return myNeedsSync;\n }", "@Override\n public void onSettingChanged(ListPreference pref) {\n }", "static public boolean isSyncEnabled(Context context) {\n Cursor cursor = null;\n try {\n cursor = context.getContentResolver().query(CONTENT_URI, new String[] { VALUE },\n KEY + \"=?\", new String[] { KEY_SYNC_ENABLED }, null);\n if (cursor == null || !cursor.moveToFirst()) {\n return false;\n }\n return cursor.getInt(0) != 0;\n } finally {\n if (cursor != null) cursor.close();\n }\n }", "@Override\r\n protected void onResume() {\n long lastSync = Utilities.getLastSyncTime(this);\r\n long currentTime = Utilities.getCurrentTime();\r\n\r\n long syncInterval = currentTime - lastSync;\r\n if (syncInterval > SIX_HOURS_IN_SECONDS * 1000 && !connectivityRegistered && !isConnected) {\r\n // If the database was last synced over six hours ago and the user is not connected to a\r\n // network, register a ConnectivityListener to listen for changes in network state\r\n registerConnectivityListener();\r\n }\r\n\r\n mNavigationView.getMenu().getItem(0).setChecked(true);\r\n super.onResume();\r\n }", "public void syncWithRTInfo() {\n new rtLocation(locationValueString).execute();\n new rtTemp(tempValueString).execute();\n new rtHumidity(humidityValueString).execute();\n new rtCondition(conditionValueString).execute();\n }", "@Override\n\tpublic void startSync() throws Exception {\n\t}", "public SyncOption getSyncOption() {\n return this.SyncOption;\n }", "@Override\n\t\tpublic void onStatusChanged(int which) {\n\t\t\tgetActivity().runOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\n\t\t\t\t\tboolean syncActive = ContentResolver.isSyncActive(\n\t\t\t\t\t\t\tOdooAccountManager.getAccount(getActivity(), OUser\n\t\t\t\t\t\t\t\t\t.current(getActivity()).getAndroidName()),\n\t\t\t\t\t\t\tsyncOberserverModel.authority());\n\t\t\t\t\tboolean syncPending = ContentResolver.isSyncPending(\n\t\t\t\t\t\t\tOdooAccountManager.getAccount(getActivity(), OUser\n\t\t\t\t\t\t\t\t\t.current(getActivity()).getAndroidName()),\n\t\t\t\t\t\t\tsyncOberserverModel.authority());\n\t\t\t\t\tboolean refreshing = syncActive | syncPending;\n\t\t\t\t\tif (!refreshing) {\n\t\t\t\t\t\tscope.main().refreshDrawer(drawer_tag);\n\t\t\t\t\t}\n\t\t\t\t\tmSyncStatusObserverListener.onStatusChange(refreshing);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public Boolean getSyncFlag() {\n return syncFlag;\n }", "public Boolean getSyncFlag() {\n return syncFlag;\n }", "public static void sync(Context context) {\n\t\t//Initialise the Manager\n\t\tIpGetter_manager manager = GetInstance(context);\n\t\t\n\t\t//Try to get the openudid from local preferences\n\t\tip = manager.mPreferences.getString(PREF_IP_KEY, null);\n\t\tcity = manager.mPreferences.getString(PREF_CITY_KEY, null);\n\t\tnetSSID = manager.mPreferences.getString(PREF_SSID_KEY, null);\n\t\tnetMac = manager.mPreferences.getString(PREF_NMAC_KEY, null);\n\t\tlocalMac = manager.mPreferences.getString(PREF_LMAC_KEY, null);\n\t\tif (ip == null) //Not found\n\t\t{\n\t\t\t//Get the list of all OpenUDID services available (including itself)\n\t\t\tgetIpInfo(manager.mContext.get());\n\t\t\n\t\t} else {//Got it, you can now call getOpenUDID()\n\t\t\tif (LOG) Log.d(TAG, \"OpenIp: \" + ip);\n\t\t\tgetIpInfo(context);\n\t\t}\n\t}", "public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n if (extras != null) {\n extras.size();\n }\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() start \" + authority + WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER + account + WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER + extras);\n }\n try {\n SyncContext syncContextClient = new SyncContext(syncContext);\n Account threadsKey = AbstractThreadedSyncAdapter.this.toSyncKey(account);\n synchronized (AbstractThreadedSyncAdapter.this.mSyncThreadLock) {\n boolean alreadyInProgress;\n if (AbstractThreadedSyncAdapter.this.mSyncThreads.containsKey(threadsKey)) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \" alreadyInProgress\");\n }\n alreadyInProgress = true;\n } else {\n if (AbstractThreadedSyncAdapter.this.mAutoInitialize && extras != null) {\n if (extras.getBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, false)) {\n try {\n if (ContentResolver.getIsSyncable(account, authority) < 0) {\n ContentResolver.setIsSyncable(account, authority, 1);\n }\n syncContextClient.onFinished(new SyncResult());\n } catch (Throwable th) {\n syncContextClient.onFinished(new SyncResult());\n }\n }\n }\n SyncThread syncThread = new SyncThread(AbstractThreadedSyncAdapter.this, \"SyncAdapterThread-\" + AbstractThreadedSyncAdapter.this.mNumSyncStarts.incrementAndGet(), syncContextClient, authority, account, extras, null);\n AbstractThreadedSyncAdapter.this.mSyncThreads.put(threadsKey, syncThread);\n syncThread.start();\n alreadyInProgress = false;\n }\n }\n } catch (Throwable th2) {\n try {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() caught exception\", th2);\n }\n throw th2;\n } catch (Throwable th3) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() finishing\");\n }\n }\n }\n }", "@Override\n public IBinder onBind(Intent intent) {\n IBinder ret = null;\n ret = getSyncAdapter().getSyncAdapterBinder();\n return ret;\n }", "public void setSyncIndex(int index) {\n }", "void syncGroup();", "public interface SynchronizeContract {\n Cursor getCursorFromMediastore();\n Observable<Cursor> getCursorObservable(Cursor cursor);\n void synchronizeByAddModel(Cursor cursor);\n void synchronizeByDelModel(Cursor delCursor);\n Cursor getDelCursor(Cursor currentMediaCursor);\n Cursor getAddCursor(Cursor currentMediaCurrsor);\n}", "private void syncListFromTodo() {\r\n DefaultListModel<String> dlm = new DefaultListModel<>();\r\n for (Task task : myTodo.getTodo().values()) {\r\n if (!task.isComplete() || showCompleted) {\r\n String display = String.format(\"%1s DueDate: %10s %s %3s\", task.getName(), task.getDueDate(),\r\n task.isComplete() ? \" Completed!\" : \" Not Completed\", task.getPriority());\r\n dlm.addElement(display);\r\n list.setFont(new Font(\"TimesRoman\", Font.PLAIN, 15));\r\n }\r\n }\r\n list.setModel(dlm);\r\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n try {\n\n File root = new File(Environment.getExternalStorageDirectory(), \"Notes\");\n if (!root.exists()) {\n root.mkdirs();\n }\n File gpxfile = new File(root, Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID)\n + \"_\" + new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date())\n + \"_\" + ListingContract.ListingEntry.TABLE_NAME);\n FileWriter writer = new FileWriter(gpxfile);\n\n Collection<ListingContract> listing = appInfo.getDbHelper().getUnsyncedListings();\n if (listing.size() > 0) {\n JSONArray jsonSync = new JSONArray();\n for (ListingContract fc : listing) {\n jsonSync.put(fc.toJSONObject());\n }\n\n writer.append(String.valueOf(jsonSync));\n writer.flush();\n writer.close();\n\n if (listing.size() < 100) {\n Thread.sleep(3000);\n }\n }\n } catch (JSONException | IOException | InterruptedException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "Update withAutoSync(Boolean autoSync);", "public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {\n super(context, autoInitialize, allowParallelSyncs);\n }", "void sync()throws IOException;", "void syncGroup(Context context);", "protected void setIntermidiateSyncBundle(Bundle b) {\n\t\tb.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\n\t\tb.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);\n\t}", "public static void syncInsurances(Context context) {\n StringRequest stringRequest = new StringRequest( Request.Method.GET, URL_SYNC_INSURANCE,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONArray jsonArray = new JSONArray( response );\n parseInsertData(\n jsonArray,\n InsurancesEntry.CONTENT_URI,\n InsurancesEntry.TABLE_NAME,\n InsurancesEntry.COLUMN_INSURANCE_ID,\n InsurancesEntry.COLUMN_INSURANCE_NAME_EN,\n InsurancesEntry.COLUMN_INSURANCE_NAME_AR\n );\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e( TAG, \"message :\" + error );\n }\n } );\n Mysingletone.getInstance( context ).addRequestQueue( stringRequest );\n }", "interface SyncColumns extends BaseSyncColumns {\n /**\n * The name of the account instance to which this row belongs, which when paired with\n * {@link #ACCOUNT_TYPE} identifies a specific account.\n * <P>Type: TEXT</P>\n */\n public static final String ACCOUNT_NAME = \"account_name\";\n\n /**\n * The type of account to which this row belongs, which when paired with\n * {@link #ACCOUNT_NAME} identifies a specific account.\n * <P>Type: TEXT</P>\n */\n public static final String ACCOUNT_TYPE = \"account_type\";\n\n /**\n * String that uniquely identifies this row to its source account.\n * <P>Type: TEXT</P>\n */\n public static final String SOURCE_ID = \"sourceid\";\n\n /**\n * Version number that is updated whenever this row or its related data\n * changes.\n * <P>Type: INTEGER</P>\n */\n public static final String VERSION = \"version\";\n\n /**\n * Flag indicating that {@link #VERSION} has changed, and this row needs\n * to be synchronized by its owning account.\n * <P>Type: INTEGER (boolean)</P>\n */\n public static final String DIRTY = \"dirty\";\n\n /**\n * The time that this row was last modified by a client (msecs since the epoch).\n * <P>Type: INTEGER</P>\n */\n public static final String DATE_MODIFIED = \"modified\";\n }", "public void startSyncing(){\n Log.i(TAG,\"in start Syncing\");\n Intent intent = new Intent(mContext,SyncerService.class);\n if(!SyncerService.IsRunning) {\n intent.putExtra(\"SyncStarted\", MainActivity.SYNC_STARTED);\n intent.putExtra(\"SyncComplete\", MainActivity.SYNC_COMPLETE);\n }\n if(!SyncerService.IsRunning) {\n mContext.startService(intent);\n // Toast.makeText(mContext, \"Service will be started!!\", Toast.LENGTH_SHORT).show();\n }\n else{\n // Toast.makeText(mContext, \"Syncing in progress already!!\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public static void syncItems() {\n ArrayList<Contest> keep = null;\n if (contestItems.size() > CONTEST_LIST_SIZE) {\n keep = new ArrayList<>(contestItems.subList(0, CONTEST_LIST_SIZE));\n keep = removeDups(keep);\n // sort and redraw\n Collections.sort(keep, new ContestComparator());\n adapter.clear();\n adapter.addAll(keep);\n //adapter = new ContestItemsAdapter(mCtx, keep);\n }\n\n adapter.notifyDataSetChanged();\n }", "public void sync () throws java.io.SyncFailedException, ObjectStoreException\n {\n }", "public void setSyncType(int tmp) {\n this.syncType = tmp;\n }", "public void notifySyncCompleted(PropertyList syncCompletedEvent);", "public void synced() {\n Preconditions.checkNotNull(state);\n state.setState(ENodeState.Synced);\n }", "public void notifySyncStarted(PropertyList syncStartedEvent);", "protected void populateList() {\n\n\t\tif (inTruckMode) {\n\t\t\t// issue #37 fix(block 2 users from punch-in)\n\t\t\t// Doing force sync for Vehicles table\n\t\t\t// if (com.operasoft.snowboard.dbsync.Utils.isOnline(this)) {\n\t\t\t// System.out.println(\"Sw_LoginScreenActivity.populateList():vehicle sync start\");\n\t\t\t// AbstractPeriodicSync vehiclesPeriodicSync = new AnonymousPeriodicSync(\"Vehicle\", new\n\t\t\t// VehiclesDao());\n\t\t\t// vehiclesPeriodicSync.fetchData(this);\n\t\t\t// }\n\n\t\t\tString vehicleId = mSP.getString(Config.VEHICLE_ID_KEY, \"\");\n\t\t\tString lastVehicleId = mSP.getString(Config.LAST_VEHICLE_KEY, \"\");\n\t\t\tvehiclesDao = new VehiclesDao();\n\n\t\t\t// issue #37 fix(block 2 users from punch-in)\n\t\t\t// VehicleListController vehicleListController = new VehicleListController();\n\t\t\t// vehiclesArray = vehicleListController.listVehicles(this);//vehiclesDao.listSorted();\n\t\t\tvehiclesArray = vehiclesDao.listSorted();\n\t\t\tvehiclesNameArray = new ArrayList<String>();\n\t\t\tint selectedIndex = -1;\n\n\t\t\tfor (int i = 0; i < vehiclesArray.size(); i++) {\n\t\t\t\tVehicle vehicles = vehiclesArray.get(i);\n\t\t\t\tvehiclesNameArray.add(vehicles.getName());\n\t\t\t\t// Check if the user is already connected to a vehicle\n\t\t\t\tif (vehicles.getId().equals(vehicleId)) {\n\t\t\t\t\tvehicle = vehicles;\n\t\t\t\t\tselectedIndex = i;\n\t\t\t\t}\n\t\t\t\t// Else check if it is his preferred one\n\t\t\t\tif ((selectedIndex == -1) && (vehicles.getId().equals(lastVehicleId))) {\n\t\t\t\t\tvehicle = vehicles;\n\t\t\t\t\tselectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((selectedIndex == -1) && (!vehiclesArray.isEmpty())) {\n\t\t\t\t// The user is not currently connected to any vehicle and has no\n\t\t\t\t// preferred one\n\t\t\t\tvehicle = vehiclesArray.get(0);\n\t\t\t\tselectedIndex = 0;\n\t\t\t}\n\n\t\t\t// Update the session with the vehicle currently selected\n\t\t\tSession.setVehicle(vehicle);\n\n\t\t\ttruckList.setAdapter(new TruckListAdapter(this, vehiclesNameArray, selectedIndex));\n\t\t} else {\n\n\t\t\t// Sites are not supported yet. Enable this code once they become\n\t\t\t// supported\n\t\t\t// SiteDao siteDao = new SiteDao();\n\t\t\t// sitesArray = siteDao.listAllValid();\n\t\t\t// sitesNameArray = new ArrayList<String>();\n\t\t\t//\n\t\t\t// for (Site site : sitesArray)\n\t\t\t// sitesNameArray.add(site.getName());\n\n\t\t\ttruckList.setAdapter(new TruckListAdapter(this, sitesNameArray, 0));\n\t\t}\n\n\t\tsetLoginMarker();\n\t}", "public void init() {\n viewModel = SharedViewModel.getInstance();\n\n sharedpreferences = getApplicationContext().getSharedPreferences(mypreference, Context.MODE_PRIVATE);\n sharedpreferences = getSharedPreferences(mypreference, Context.MODE_PRIVATE);\n\n if(!viewModel.isUserLoggedIn()) {\n if (sharedpreferences.contains(\"email\") && sharedpreferences.contains(\"password\")){\n loadSharedPreferences();\n String email = viewModel.getDBUser().getEmail();\n int atIndex = email.indexOf(\"@\");\n email = email.substring(0, atIndex);\n getSupportActionBar().setTitle(\"Notas de \" + email);\n viewModel.refreshNotes();\n }\n else{\n this.finish();\n goToLoginActivity();\n String email = viewModel.getDBUser().getEmail();\n int atIndex = email.indexOf(\"@\");\n email = email.substring(0, atIndex);\n getSupportActionBar().setTitle(\"Notas de \" + email);\n viewModel.refreshNotes();\n }\n }\n\n String email = viewModel.getDBUser().getEmail();\n int atIndex = email.indexOf(\"@\");\n email = email.substring(0, atIndex);\n getSupportActionBar().setTitle(\"Notas de \" + email);\n viewModel.refreshNotes();\n\n parentContext = this.getBaseContext();\n mActivity = this;\n noteListAdapter = new NoteListAdapter(viewModel.getNoteList(), this, this);\n noteRecyclerView = findViewById(R.id.noteRView);\n noteRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n noteRecyclerView.setAdapter(noteListAdapter);\n viewModel.setNoteListAdapter(noteListAdapter);\n viewModel.setParentContext(parentContext);\n }", "public static Intent openSyncSettings(Context context) {\n // Bug 721760 - opening Sync settings takes user to Battery & Data Manager\n // on a variety of Motorola devices. This work around tries to load the\n // correct Intent by hand. Oh, Android.\n Intent intent = openVendorSyncSettings(context, MOTO_BLUR_PACKAGE, MOTO_BLUR_SETTINGS_ACTIVITY);\n if (intent != null) {\n return intent;\n }\n\n // Open default Sync settings activity.\n intent = new Intent(Settings.ACTION_SYNC_SETTINGS);\n // Bug 774233: do not start activity as a new task (second run fails on some HTC devices).\n context.startActivity(intent); // We should always find this Activity.\n return intent;\n }", "@Override\n protected String doInBackground(String... params) {\n Map<String, String> payload = new HashMap<String, String>();\n DBHelper db = new DBHelper(context);\n List<Channel> channels = db.getAllChannels();\n String channelString = \"[\";\n for (Channel ch: channels) {\n if(sharedPreferences.getBoolean(\"channel_\"+ch.id,false)){\n channelString += \"\"+ch.id+\",\";\n }\n }\n if(!channelString.equals(\"[\"))\n channelString = channelString.substring(0,channelString.length()-1);\n\n channelString += \"]\";\n Log.d(TAG,channelString);\n // get device IMEI number\n TelephonyManager mngr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n String IMEI = \"UNKNOWN\";\n try {\n IMEI = mngr.getDeviceId();\n }catch(Exception e){\n Log.d(TAG,\"Unable to get IMEI\");\n }\n\n payload.put(\"channels\", channelString);\n payload.put(\"IMEI\", IMEI);\n payload.put(\"token\", sharedPreferences.getString(NoticeBoardPreferences.GCM_TOKEN,\"NULL\"));\n String url = NoticeBoardPreferences.URL_SYNC_DB;\n\n NetworkHandler nh = new NetworkHandler(payload, url);\n String result = nh.callServer();\n if(result.equals(\"No response\")){\n pd.dismiss();\n this.cancel(true);\n }\n Log.d(TAG, result);\n\n JSONHandler json = new JSONHandler(result);\n if(json.jsonObject == null){\n Toast.makeText(context,\"Server Error!!!\",Toast.LENGTH_LONG).show();\n cancel(true);\n }\n\n notices = new ArrayList<Notice>();\n channels = new ArrayList<Channel>();\n JSONArray notes = json.getArray(\"notices\");\n\n for (int i = 0; i < notes.length(); i++) {\n try {\n notices.add(new JSONHandler(notes.getString(i)).getNotice());\n } catch (JSONException e) {\n Log.d(TAG, \"JSONException > \" + notes.toString());\n }\n }\n\n JSONArray chans = json.getArray(\"channels\");\n for (int i = 0; i < chans.length(); i++) {\n try {\n channels.add(new JSONHandler(chans.getString(i)).getChannel());\n } catch (JSONException e) {\n Log.d(TAG, \"JSONException > \" + chans.toString());\n }\n }\n\n db.onUpgrade(db.getWritableDatabase(), 1, 1);\n\n for (Notice n : notices) {\n db.insertNotice(n);\n }\n\n for (Channel ch : channels) {\n if(firstRun){\n ch.getAndSetImage(context);\n }\n db.insertChannel(ch);\n }\n\n NoticeBoardPreferences.channels = channels;\n Collections.reverse(notices);\n\n return null;\n }", "@Override\r\n protected void onPreExecute() {\n if( progressDialog == null ) {\r\n progressDialog = ProgressDialog.show( context, context.getString(R.string.pref_sync_callings_now_title),\"\");\r\n }\r\n }", "@Override\n protected List<settingdto> doInBackground(Void... param) {\n Log.e(TAG, \"doInBackground\");\n\n db = new DatabasehelperUtilz(settingslistactivity.this);\n db.openDataBase();\n lstsettingdtos = db.getallsettings();\n db.close();\n\n Collections.reverse(lstsettingdtos);\n\n return lstsettingdtos;\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n //set the driver name and track variables using methods below, which are also called from onSharedPreferencesChanged\n setDriver(sharedPreferences);\n setTrack(sharedPreferences);\n }", "@Override\n public void onDataSetChanged() {\n final long identityToken = Binder.clearCallingIdentity();\n mPresenter.getStocksData();\n Binder.restoreCallingIdentity(identityToken);\n }", "@Override\n\t\t\t\t\t\tpublic void onSyncSuccess() {\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tif(dbHelper.InsertItem(listResult))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSharedPreferences sharedPrefer = getSharedPreferences(getResources().getString(R.string.information_string), Context.MODE_PRIVATE);\r\n\t\t\t\t\t\t \tSharedPreferences.Editor sharedEditor = sharedPrefer.edit();\r\n\t\t\t\t\t\t \tsharedEditor.putString(getResources().getString(R.string.masterversion), Common.serverTime);\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \tsharedEditor.commit();\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\t\t\t\t\tmsg.obj = \"ProductItemSave\";\r\n\t\t\t\t\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "@Override\n public void run() {\n final Listing editingListing = new SharedPreferenceHelper(AddListingView.this).getListingFromSharedPrefs();\n if (editingListing != null) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n prepareEdit(editingListing, pd);\n }\n });\n }\n }", "@Override\n protected List<settingdto> doInBackground(Void... param) {\n Log.e(TAG, \"doInBackground\");\n\n db = new DatabasehelperUtilz(settingslistactivity.this);\n db.openDataBase();\n List<settingdto> lstdtos = db.getallsettings();\n db.close();\n\n Collections.reverse(lstdtos);\n\n return lstdtos;\n }", "public void sync() {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (useMmap) {\n\t\t\tsyncAllMmaps();\n\t\t}\n\t\tif (fileChannel != null) {\n\t\t\ttry {\n\t\t\t\tfileChannel.force(false);\n\t\t\t} catch (Exception ign) {\n\t\t\t}\n\t\t}\n\t\tif (callback != null) {\n\t\t\tcallback.synched();\n\t\t}\n\t}", "@Override /* PopulationAutoSynchronizer -- Make sure BasicQueryModePanel has the latest Population */\n\tpublic void autoSyncPopulations()\n\t{\n\t\tif (this.myBasicModePanel.getPopulationTimestamp() > this.myTemporalModePanel.getPopulationTimestamp())\n\t\t{\n\t\t\tthis.myTemporalModePanel.getPopulationControlPanel().syncTo( this.myBasicModePanel );\n\t\t\tthis.myTemporalModePanel.getPopulationControlPanel().loadPopulation( this.myBasicModePanel.getPopulation() );\n\t\t}\n\t\telse // make sure BasicModePanel has the latest Population information \n\t\t{\n\t\t\tthis.myBasicModePanel.syncTo( this.myTemporalModePanel.getPopulationControlPanel() );\n\t\t\tthis.myBasicModePanel.loadPopulation( myTemporalModePanel.getPopulation() );\n\t\t}\n\t}", "@Override\r\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\r\n if (somethingIsBeingProcessed) {\r\n return;\r\n }\r\n if (onSharedPreferenceChanged_busy || !MyPreferences.isInitialized()) {\r\n return;\r\n }\r\n onSharedPreferenceChanged_busy = true;\r\n \r\n try {\r\n String value = \"(not set)\";\r\n if (sharedPreferences.contains(key)) {\r\n try {\r\n value = sharedPreferences.getString(key, \"\");\r\n } catch (ClassCastException e) {\r\n try {\r\n value = Boolean.toString(sharedPreferences.getBoolean(key, false));\r\n } catch (ClassCastException e2) {\r\n value = \"??\";\r\n }\r\n }\r\n }\r\n MyLog.d(TAG, \"onSharedPreferenceChanged: \" + key + \"='\" + value + \"'\");\r\n \r\n // Here and below:\r\n // Check if there are changes to avoid \"ripples\": don't set new\r\n // value if no changes\r\n \r\n if (key.equals(MyAccount.Builder.KEY_ORIGIN_NAME)) {\r\n if (state.getAccount().getOriginName().compareToIgnoreCase(mOriginName.getValue()) != 0) {\r\n // If we have changed the System, we should recreate the\r\n // Account\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(mOriginName.getValue(),\r\n state.getAccount().getUsername()).toString(),\r\n TriState.fromBoolean(state.getAccount().isOAuth()));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_OAUTH)) {\r\n if (state.getAccount().isOAuth() != mOAuth.isChecked()) {\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(mOriginName.getValue(),\r\n state.getAccount().getUsername()).toString(),\r\n TriState.fromBoolean(mOAuth.isChecked()));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_USERNAME_NEW)) {\r\n String usernameNew = mEditTextUsername.getText();\r\n if (usernameNew.compareTo(state.getAccount().getUsername()) != 0) {\r\n boolean isOAuth = state.getAccount().isOAuth();\r\n String originName = state.getAccount().getOriginName();\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(originName, usernameNew).toString(),\r\n TriState.fromBoolean(isOAuth));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(Connection.KEY_PASSWORD)) {\r\n if (state.getAccount().getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n state.builder.setPassword(mEditTextPassword.getText());\r\n showUserPreferences();\r\n }\r\n }\r\n } finally {\r\n onSharedPreferenceChanged_busy = false;\r\n }\r\n }" ]
[ "0.6604015", "0.6405529", "0.6284443", "0.6280184", "0.6255137", "0.62215656", "0.60931766", "0.60523146", "0.6031033", "0.60179824", "0.60144955", "0.60082906", "0.5995546", "0.5978868", "0.59371895", "0.59011835", "0.58740306", "0.58576035", "0.5826042", "0.57975304", "0.5780359", "0.57451195", "0.5738784", "0.5728891", "0.56982434", "0.56817174", "0.5665907", "0.5649222", "0.5641373", "0.56320816", "0.5631333", "0.562296", "0.5613669", "0.56111044", "0.5600317", "0.5596296", "0.5596296", "0.5593573", "0.5583601", "0.55790174", "0.55699044", "0.5567944", "0.5551259", "0.5549125", "0.5546572", "0.5539128", "0.55140936", "0.55097735", "0.54664207", "0.54628825", "0.5460499", "0.54567033", "0.5446721", "0.54341245", "0.5432489", "0.5425722", "0.5421761", "0.5400572", "0.5398459", "0.53983045", "0.5393358", "0.5376632", "0.5376632", "0.5375922", "0.53620976", "0.5354664", "0.5348946", "0.5338207", "0.5326439", "0.5324648", "0.53166324", "0.5316018", "0.5306476", "0.5296176", "0.5292391", "0.5290961", "0.52899265", "0.52789414", "0.52715147", "0.5262369", "0.5240341", "0.5239218", "0.5238428", "0.52364594", "0.5232898", "0.52185106", "0.51920086", "0.5190609", "0.5190281", "0.51897764", "0.51790124", "0.5176167", "0.5175594", "0.51698273", "0.51684326", "0.5154894", "0.515485", "0.5153925", "0.51522297", "0.515128" ]
0.57845145
20
Set up the sync adapter. This form of the constructor maintains compatibility with Android 3.0 and later platform versions
public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) { super(context, autoInitialize, allowParallelSyncs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SyncAdapter(Context context, boolean autoInitialize) {\n super(context, autoInitialize);\n /*\n * If your app uses a content resolver, get an instance of it\n * from the incoming Context\n */\n mContentResolver = context.getContentResolver();\n }", "public SyncAdapter(Context context, boolean autoInitialize) {\r\n super(context, autoInitialize);\r\n contentResolver = context.getContentResolver();\r\n }", "public SyncAdapter(Context context, boolean autoInitialize) {\n super(context, autoInitialize);\n }", "public SyncAdapter(\n Context context,\n boolean autoInitialize,\n boolean allowParallelSyncs) {\n super(context, autoInitialize, allowParallelSyncs);\n /*\n * If your app uses a content resolver, get an instance of it\n * from the incoming Context\n */\n mContentResolver = context.getContentResolver();\n }", "public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {\r\n super(context, autoInitialize, allowParallelSyncs);\r\n contentResolver = context.getContentResolver();\r\n }", "private void initializeAdapter() {\n }", "public MyAdapter(List<Track> myDataset, Activity activity) {\n values = myDataset;\n this.activity = activity;\n }", "public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n if (extras != null) {\n extras.size();\n }\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() start \" + authority + WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER + account + WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER + extras);\n }\n try {\n SyncContext syncContextClient = new SyncContext(syncContext);\n Account threadsKey = AbstractThreadedSyncAdapter.this.toSyncKey(account);\n synchronized (AbstractThreadedSyncAdapter.this.mSyncThreadLock) {\n boolean alreadyInProgress;\n if (AbstractThreadedSyncAdapter.this.mSyncThreads.containsKey(threadsKey)) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \" alreadyInProgress\");\n }\n alreadyInProgress = true;\n } else {\n if (AbstractThreadedSyncAdapter.this.mAutoInitialize && extras != null) {\n if (extras.getBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, false)) {\n try {\n if (ContentResolver.getIsSyncable(account, authority) < 0) {\n ContentResolver.setIsSyncable(account, authority, 1);\n }\n syncContextClient.onFinished(new SyncResult());\n } catch (Throwable th) {\n syncContextClient.onFinished(new SyncResult());\n }\n }\n }\n SyncThread syncThread = new SyncThread(AbstractThreadedSyncAdapter.this, \"SyncAdapterThread-\" + AbstractThreadedSyncAdapter.this.mNumSyncStarts.incrementAndGet(), syncContextClient, authority, account, extras, null);\n AbstractThreadedSyncAdapter.this.mSyncThreads.put(threadsKey, syncThread);\n syncThread.start();\n alreadyInProgress = false;\n }\n }\n } catch (Throwable th2) {\n try {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() caught exception\", th2);\n }\n throw th2;\n } catch (Throwable th3) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() finishing\");\n }\n }\n }\n }", "abstract public void setUpAdapter();", "private BLESyncConnection() {\n mContext = null;\n mBluetoothDevice = null;\n }", "public SongGridAdapter(Activity activity) {\n this.activity = activity;\n }", "private SYNC(String strSyncMode) {\n this.strSynMode = strSyncMode;\n }", "private void initShare() {\n // Create ShareHelper\n mShareHelper = new ShareHelper(mContext);\n }", "private ModuleSyncHelper() {\n //Private constructor to avoid instances for this helper.\n }", "public SongAdapter(Context context, ArrayList<Song> songs) {\n super(context, 0, songs);\n }", "public RecyclerTransactionAdaptor(List<Transaction> myDataset) {\n mDataset = myDataset;\n }", "private void setAdapter() {\n\n\t\tathleteCheckInAdapter = new AthleteStickyHeaderCheckInAdapter(getActivity(), athleteAttendanceList);\n\n\t}", "private void initRvAdapter() {\n mRvHistoryAdapter = new HistoryRvAdapter(mContext,\n null,\n this);\n\n }", "private MyPlayerAdapter(){\n if (playerAdapter != null){\n throw new RuntimeException(\n \"Use getInstance() method to get the single instance of this class.\"\n );\n }\n if (mContext == null) {\n mContext = MyApplication.context();\n }\n if( mSession == null ) {\n initMediaSession();\n }\n\n\n mPlayer = getMediaPlayer();\n }", "public CoverFlowAdapter(ArrayList<MediaObject> myDataset, MainActivity activity, MyApplication application) {\n mDataset = myDataset;\n this.activity = activity;\n this.application = application;\n }", "private void setupComparisonAdapter() {\n comparisonCompaniesAdapter = new CompanyListAdapter(this, new ArrayList<>());\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n\n comparisonCompaniesRecyclerView.setLayoutManager(layoutManager);\n comparisonCompaniesRecyclerView.setItemAnimator(new DefaultItemAnimator());\n comparisonCompaniesRecyclerView.setAdapter(comparisonCompaniesAdapter);\n\n // setup swiping left or right to delete item\n setUpItemTouchHelper();\n }", "public TransactionsDbAdapter(SQLiteDatabase db) {\n super(db);\n mSplitsDbAdapter = new SplitsDbAdapter(db);\n }", "public MyAdapter(Context context, ArrayList<String> dataset) {\n mContext = context;\n mDataset = dataset;\n setHasStableIds(true);\n }", "private void setUpBookingAdapter() {\n// mBinding.swipeRefresh.setRefreshing(false);\n if (null == mRequestAdapter) {\n mRequestAdapter = new RequestAdapter(mThis, mRequestModelList, this);\n mBinding.requestRv.setAdapter(mRequestAdapter);\n } else {\n mRequestAdapter.setmBooking_itemModelList(mRequestModelList);\n mRequestAdapter.notifyDataSetChanged();\n }\n }", "public void setAdapter() {\n binding.RvwalletAmount.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n binding.RvwalletAmount.setHasFixedSize(true);\n WalletAdapter kyCuploadAdapter = new WalletAdapter(getActivity(), getListWallet(), this);\n binding.RvwalletAmount.setAdapter(kyCuploadAdapter);\n }", "public SyncMigrationFragment()\n {\n super();\n }", "private void init() {\n mCacheUtil = ExoPlayerCacheUtil.getInstance(this);\n\n //Lets put our array of URLs into a simple array adapter to display to the user\n ListView choicesListView = findViewById(R.id.lv_choices);\n mChoicesAdapter = new MediaListAdapter(this,\n R.layout.media_list_item, Arrays.asList(TestStreams.getHlsArray()));\n choicesListView.setAdapter(mChoicesAdapter);\n choicesListView.setOnItemClickListener(this);\n\n //The below code are just dummy fillers to provide a header and footer divider\n LayoutInflater inflater = getLayoutInflater();\n TextView tvEmptyHeader = (TextView) inflater.inflate(R.layout.choice_list_item, null);\n TextView tvEmptyFooter = (TextView) inflater.inflate(R.layout.choice_list_item, null);\n choicesListView.addHeaderView(tvEmptyHeader);\n choicesListView.addFooterView(tvEmptyFooter);\n\n LogTrace.d(TAG, \"Initialization complete.\");\n }", "public DataAdapter() {\n }", "public MyAdapter(Context mContext, List<Matches> mModelList1) {\n this.mContext = mContext;\n this.mModelList = mModelList1;\n }", "public MyAdapter(ArrayList<Pair<String, String>> myDataset) {\n mDataset = myDataset;\n }", "private void initializeSpecificationsAdapter() {\n mSpecificationsAdapter = new SpecificationsAdapter(mSpecialitiesList, TRUE);\n mBinding.rvPdpSpecifications.setAdapter(mSpecificationsAdapter);\n }", "public BaseRecyclerListAdapter() {\n }", "public void setupAdapter() {\n recyclerAdapter = new PhotosAdapter(this);\n recyclerViewPhotos.setAdapter(recyclerAdapter);\n }", "private void setupAccountSpinnerAdapter(){\n String conditions = \"(\" + DatabaseSchema.AccountEntry.COLUMN_HIDDEN + \" = 0 )\";\n\n if (mAccountCursor != null) {\n mAccountCursor.close();\n }\n mAccountCursor = mAccountsDbAdapter.fetchAccountsOrderedByFavoriteAndFullName(conditions, null);\n\n mAccountCursorAdapter = new QualifiedAccountNameCursorAdapter(getActivity(), mAccountCursor);\n }", "public DBAdapter(Context ctx) {\n this.context = ctx;\n myDBHelper = new DatabaseHelper(context);\n }", "public CustomAdapterTracks(ArrayList<TopTrack> myDataset, Context context) {\n mDataset = myDataset;\n mContext = context;\n }", "@Override\r\n\tpublic ISyncAdapter createSyncAdapter(ISchema schema, String baseDirectory, FeedRef feedRef) {\n\t\treturn null;\r\n\t}", "protected void init() {\n\n List<ApplicationEntry> result;\n //we want to exclude duplicate apps by using ApplicationEntry#hashCode() and we don't care about sorting\n Set<ApplicationEntry> setOfItems = new HashSet<>();\n\n //we have a hacky hashcode implementation for ApplicationEntry\n //so that ApplicationEntry for the same app is only added ONCE.\n // some ApplicationEntries have the same app, but different action, so we want to avoid duplicates.\n // that is implementation specific - you may solve the problem of duplicate apps the other way.\n //so just notice this: mail sharing actions are added first.\n setOfItems.addAll(mailSharingActions.getMailActions());\n setOfItems.addAll(messengerSharingActions.getMessengerActions());\n\n\n result = new ArrayList<>(setOfItems);\n adapter.setItems(result);\n }", "private void setupAdapter() {\n FullWidthDetailsOverviewRowPresenter detailsPresenter;\n if (isIncomingRequest || isOutgoingRequest) {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactRequestDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n } else {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n }\n\n detailsPresenter.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.grey_900));\n detailsPresenter.setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_HALF);\n\n // Hook up transition element.\n Activity activity = getActivity();\n if (activity != null) {\n FullWidthDetailsOverviewSharedElementHelper mHelper = new FullWidthDetailsOverviewSharedElementHelper();\n mHelper.setSharedElementEnterTransition(activity, TVContactActivity.SHARED_ELEMENT_NAME);\n detailsPresenter.setListener(mHelper);\n detailsPresenter.setParticipatingEntranceTransition(false);\n prepareEntranceTransition();\n }\n\n detailsPresenter.setOnActionClickedListener(action -> {\n if (action.getId() == ACTION_CALL) {\n presenter.contactClicked();\n } else if (action.getId() == ACTION_DELETE) {\n presenter.removeContact();\n } else if (action.getId() == ACTION_CLEAR_HISTORY) {\n presenter.clearHistory();\n } else if (action.getId() == ACTION_ADD_CONTACT) {\n presenter.onAddContact();\n } else if (action.getId() == ACTION_ACCEPT) {\n presenter.acceptTrustRequest();\n } else if (action.getId() == ACTION_REFUSE) {\n presenter.refuseTrustRequest();\n } else if (action.getId() == ACTION_BLOCK) {\n presenter.blockTrustRequest();\n }\n });\n\n ClassPresenterSelector mPresenterSelector = new ClassPresenterSelector();\n mPresenterSelector.addClassPresenter(DetailsOverviewRow.class, detailsPresenter);\n mPresenterSelector.addClassPresenter(ListRow.class, new ListRowPresenter());\n mAdapter = new ArrayObjectAdapter(mPresenterSelector);\n setAdapter(mAdapter);\n }", "private void setListAdapter(ListAdapter adapter) {\n\n\t\t}", "public DataBaseAdapter(Context context) {\r\n\t\tmDbHelper = new DataBaseHelper(context);\r\n\t\tthis.c = context;\r\n\t}", "private void Init(Context context){\n\n if(adapter == null){\n adapter = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_1);\n }\n\n this.setAdapter(adapter);\n }", "public Synchronization(Context context) {\n\t\tprgDialog = new ProgressDialog(context);\n\t\tprgDialog\n\t\t\t\t.setMessage(\"Synching SQLite Data with Remote MySQL DB. Please wait...\");\n\t\tprgDialog.setCancelable(false);\n\t\tthis.context = context;\n\t}", "@Override\n protected void initData() {\n this.classes = new ArrayList<>();\n this.classes.add(SmartRouterSampleActivity.class);\n this.classes.add(CustomRouterActivity.class);\n this.classes.add(RouterCenterActivity.class);\n this.adapter = new MenuRecyclerViewAdapter();\n this.adapter.setList(classes);\n this.recyclerView.setAdapter(adapter);\n }", "public void initialiseRecycler(ArrayList<String> deviceID, ArrayList<String>deviceNames){\r\n\r\n\r\n RecyclerView recyclerView = findViewById(R.id.recyclerView);\r\n\r\n\r\n adapterDevices= new MyDevicesAdapterView(this, deviceID, deviceNames);\r\n\r\n recyclerView.setAdapter(adapterDevices);\r\n\r\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\r\n\r\n\r\n }", "private void init() {\n mEventBus = new AsyncEventBus(new HandlerExecutor());\n mEventBus.register(this);\n }", "public CommunicationCommentsAdapter(ArrayList<Comment> myDataset) {\n mDataset = myDataset;\n mImageLoader = Requester.getInstance().getImageLoader();\n }", "@Override\n public void init() {\n logger.info(\"Initializing Sample TAL adapter\");\n\n // In order to get ticket updates from Symphony adapter must subscribe to this explicitly here\n // After subscription is done, all updates will come to this adapter instance via calls to syncTalTicket method\n talProxy.subscribeUpdates(accountId, this);\n\n try {\n // obtain adapter configuration\n setConfig(talConfigService.retrieveTicketSystemConfig(accountId));\n } catch (Exception e) {\n throw new RuntimeException(\"SampleTalAdapterImpl was unable to retrieve \" +\n \"configuration from TalConfigService: \" + e.getMessage(), e);\n }\n\n // subscribe for getting adapter configuration updates\n talConfigService.subscribeForTicketSystemConfigUpdate(accountId,\n (ticketSystemConfig) -> setConfig(ticketSystemConfig));\n }", "public StoreAdapter(StoreActivity activity) {\n mActivity = activity;\n mTotalItemsChangedListener = activity;\n mCurrency = Currency.getInstance(\"CAD\");\n mQuantityOrdered = new int[EMOJI_DOLLARSIGN.length];\n }", "private void iniAdapter(List<Task> tasks) {\n presAdapter = new TaskAdapter(tasks, this, 1);\n// recyclerView.setAdapter(presAdapter);\n }", "public FeedRecyclerAdapter() {\n super();\n }", "public LeDeviceListAdapter() {\n super();\n mLeDevices = new ArrayList<BluetoothDevice>();\n mInflater = DeviceScanActivity.this.getLayoutInflater();\n }", "public TallyDeviceConnectionStatusActivity()\n {\n\n layoutResID = R.layout.activity_tally_device_connection_status;\n\n LOG_TAG = \"TallyDeviceConnectionStatusActivity\";\n\n messenger = new Messenger(new IncomingHandler(this));\n\n }", "public ModelRecyclerAdapter(Context context, ArrayList<Model> myDataset) {\n mDataset = myDataset;\n mContext = context.getApplicationContext();\n mInflater = LayoutInflater.from(context);\n }", "private void init() {\r\n\r\n analyticsManager = new xxxxAnalytics(getApplicationContext());\r\n\r\n analyticsSender = new AnalyticsSender(this);\r\n\r\n provider = FeedProviderImpl.getInstance(this);\r\n\r\n feedId = getIntent().getExtras().getInt(Constants.FEED_ID);\r\n if (provider != null) {\r\n friendFeed = provider.getFeed(feedId);\r\n }\r\n\r\n unifiedSocialWindowView = findViewById(R.id.linearLayoutForUnifiedSocialWindow);\r\n\r\n\r\n // Get member contacts.\r\n memberContacts = provider.getContacts(feedId);\r\n\r\n lastDiffs = new LinkedBlockingDeque<Integer>();\r\n }", "public TaskAdapter(List<Task> taskList) {\n this.taskList = taskList;\n }", "private SyncState() {}", "@Override\n public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {\n\n Log.d(NewsSyncAdapter.class.getCanonicalName(), \"Starting sync...\");\n\n //testing\n ContentValues values = new ContentValues();\n values.put(DatabaseHelper.NEWS_COL_HEADLINE, \"Aliens are attacking; seek shelter\");\n\n Uri uri = NewsContentProvider.CONTENT_URI;\n mContentResolver.insert(uri, values);\n }", "public PendingSharedEventsRecyclerViewAdapter(ArrayList<CustomPendingShared> myDataset, OnSharedEventListener mOnNotificationListener) {\n this.mDataset = myDataset;\n this.mOnSharedEventListener = mOnNotificationListener;\n }", "public NetworkMonitorAdapter( Adapter adapter )\r\n {\r\n super( adapter );\r\n }", "@Override\n public void onCreate() {\n super.onCreate();\n super.setNeedAutoReConnect(NEED_AUTO_RECONNECT);\n super.setNeedConnectStatusBroadcast(NEED_CONNECT_STATUS_BROADCAST);\n Log.e(TAG, \"oncreat\");\n mCommunciation = new CommunciationImp(this);\n mProtocol = new ProtocolConfig(this);\n }", "public MyAdapter(ArrayList<MyData> myDataset) {\n\n mDataset = myDataset;\n }", "public MoreVersionsAdapter(List<ParseObject> data, Activity context) {\n mData = data;\n appcontext = context;\n }", "public ResourceCursorAdapter(Context context, int layout, Cursor c, boolean autoRequery) {\n/* 67 */ super((Context)null, (Cursor)null); throw new RuntimeException(\"Stub!\");\n/* */ }", "public CDAdapter(List<CDAlbum> myCollection, Activity something) {\n this.myCollection = myCollection;\n main = something;\n }", "@Override\n public void onCreate (Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_data_sync_step_1);\n\n\n //등장애니..\n overridePendingTransition(R.anim.push_left_in_fast, R.anim.push_left_out_half);\n\n MAC = getIntent().getStringExtra(EXTRA_KEY_MACADDRESS);\n DATA = new BeaconItemDto ();\n DATA.sticker = JobProcessController.getInstance(mActivity, this).getStickerForService(MAC);\n DATA.MAC = MAC;\n DATA.min_temperature_limit = 0;\n DATA.max_temperature_limit = 0;\n\n mLogger = new LoggerData();\n mLoggerNew = new LoggerDataNew();\n\n initBluetoothAdapter ();\n setLayout ();\n initData ();\n }", "public OrderAdapter() {\n super(new ArrayList<MultiItemEntity>());\n addItemType(TYPE_HEAD, R.layout.item_order_head);\n addItemType(TYPE_CONTENT, R.layout.item_order_content);\n addItemType(TYPE_FOOTER, R.layout.item_order_foot);\n }", "public void initializeUsageHelper() {\n if (mUsageHelper == null) {\n mUsageHelper = new PermissionUsageHelper(mContext);\n }\n }", "public MultimediaSuggestionsAdapter(Context context) {\n this.context = context;\n\n }", "public ConfigureSpinnerAdapter(Context context, Spinner spinner, String[] buildKeys) {\n super(context, 0, buildKeys);\n mContext = context;\n mSpinner = spinner;\n mBuildKeys = buildKeys;\n }", "public DirectoryAdapter(Activity context, ArrayList<String> data, SharedPreferences sharedPreferences) {\r\n inflater = LayoutInflater.from(context);\r\n this.data = data;\r\n this.sharedPreferences = sharedPreferences;\r\n this.context = context;\r\n }", "private void initializeVariantsAdapter() {\n mPdpVariantsAdapter = new PdpVariantsAdapter(mVariantsData, this);\n mBinding.rvPdpVariants.setAdapter(mPdpVariantsAdapter);\n }", "private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }", "public BillingManager(Activity _activity) {\n mActivity = _activity;\n connectBillingClient();\n }", "private void setupChat() {\n Log.d(TAG, \"setupChat()\");\n\n // Initialize the array adapter for the conversation thread\n mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message);\n\n mConversationView.setAdapter(mConversationArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n\n // Initialize the send button with a listener that for click events\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(getActivity(), mhandler);\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n switchForFileSaved.setOnCheckedChangeListener(switchListener) ;\n }", "public MyAdapter(ArrayList<String> myDataset) {\n mDataset = myDataset;\n }", "private void setupCursorAdapter() {\n // Column data from cursor to bind views from\n String[] uiBindFrom = {ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.PHOTO_URI};\n // View IDs which will have the respective column data inserted\n int[] uiBindTo = {R.id.contact_name };\n// int[] uiBindTo = {R.id.contact_name, R.id.contact_image};\n // Create the simple cursor adapter to use for our list\n // specifying the template to inflate (item_contact),\n adapter = new SimpleCursorAdapter(\n mContext, R.layout.contact_item,\n null, uiBindFrom, uiBindTo,\n 0);\n }", "public EntityAdapter(List<String> entityList, Context mContext){\n this.entityList = entityList;\n this.mContext = mContext;\n }", "private void init() {\n listView = (ListView) findViewById(R.id.listView);\n listView.setOnItemClickListener(this);\n activityListAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, 0);\n listView.setAdapter(activityListAdapter);\n }", "private void initCarsListView() {\n mCarsRecyclerView.setHasFixedSize(true);\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);\n mCarsRecyclerView.setLayoutManager(mLayoutManager);\n getExecutor().submit(new ListCarsDbAction(getApp()));\n }", "public FavoriteSongAdapter(ArrayList<Song> mListSongAdapter, MainActivity context) {\n this.mainActivity = context;\n this.mListFavoriteSongAdapter = mListSongAdapter;\n this.mInflater = LayoutInflater.from(context);\n }", "public ThingAdapter(Context context) {\n mInflater = LayoutInflater.from(context);\n this.context = context;\n }", "@Override\n\tpublic void startSync() throws Exception {\n\t}", "public AlbumAdapter(@NonNull Context context, ArrayList<Album> albums) {\n super(context, 0, albums);\n }", "protected EntriesBaseAdapter(Context context, ArrayList<String> sortedFilesArrList, ArrayList<String> tag1ArrList, ArrayList<String> tag2ArrList, ArrayList<String> tag3ArrList,\n ArrayList<Boolean> favArrList, CustomAttributes userUIPreferences) {\n super(context, userUIPreferences);\n // transfers all the info from the calling activity to this adapter.\n this.sortedFilesArrList = new ArrayList<>(sortedFilesArrList);\n this.tag1ArrList = new ArrayList<>(tag1ArrList);\n this.tag2ArrList = new ArrayList<>(tag2ArrList);\n this.tag3ArrList = new ArrayList<>(tag3ArrList);\n this.favArrList = new ArrayList<>(favArrList);\n\n setupData();\n }", "public TorrentsAdapter(Context context, List<Torrent> torrents) {\n mTorrents = torrents;\n mContext = context;\n }", "public ListViewAdapter(List<SongModel> songs) {\n this.list = songs;\n }", "public SyncDevice(String id) {\n this.id = id;\n this.displayName = id;\n }", "public QueueAdapter() {\n list = new ArrayList<>();\n }", "private void initThings() {\n\t\tmyApp = (MyApp) getApplicationContext();\n\t\tnextIntent = new Intent(this, AnimActivity2.class);\n\t\t// nextIntent = new Intent(this, SelectEventActivity.class);\n\t\tnextIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\t\tuserDAO = new UserDAO(this);\n\t\tdialog = new CreateDialog(this);\n\t\tprogressDialog = dialog.createProgressDialog(null, \"Logging In\", false,\n\t\t\t\tnull, false);\n\t\ttypeface = myApp.getTypefaceRegular();\n\n\t\t// <<<<<<< HEAD\n\t\t//\n\t\t// GsonBuilder builder = new GsonBuilder();\n\t\t// gson = builder.create();\n\t\t//\n\t\t// queue = Volley.newRequestQueue(this);\n\t\t// =======\n\t\t// >>>>>>> parent of 48afbfc... setup android again\n\t}", "public MyAdapter(ArrayList<MyClassesActivity.MyPair> myDataset) {\n courselist = myDataset;\n }", "public DataManager(AppTemplate initApp) throws Exception {\r\n\t// KEEP THE APP FOR LATER\r\n\tapp = initApp;\r\n List list = new ArrayList();\r\n items = FXCollections.observableList(list);\r\n name = new SimpleStringProperty();\r\n owner = new SimpleStringProperty();\r\n nameString = \"\";\r\n ownerString = \"\";\r\n }", "public SpinnerAdapter(Context mContext) {\n this.mContext = mContext;\n Resources res = mContext.getResources();\n this.values = res.getStringArray(R.array.checklist_values);\n\n }", "public ItemsAdapter() {\n\n\n }", "private void init() {\n if (getSupportActionBar() != null &&\n (presenter.getRepositoryName() != null && !presenter.getRepositoryName().isEmpty())) {\n getSupportActionBar().setTitle(presenter.getRepositoryName());\n }\n\n rcvItems.setLayoutManager(new LinearLayoutManager(this));\n\n if (presenter.getPullRequests() != null && presenter.getPullRequests().size() != 0) {\n setupList();\n }\n pgbLoading.setVisibility(View.GONE);\n tvwNoData.setVisibility(presenter.getPullRequests() != null && presenter.getPullRequests().size() != 0 ? View.GONE : View.VISIBLE);\n }", "private void initComponent(){\n recyclerView = findViewById(R.id.noti_recycler_view);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n\n notifAdapter = new NotificationAdapter(this, notifications, currentUser);\n recyclerView.setAdapter(notifAdapter);\n\n ItemTouchHelper.Callback callback = new SwipeItemTouchHelper(notifAdapter);\n itemTouchHelper = new ItemTouchHelper(callback);\n itemTouchHelper.attachToRecyclerView(recyclerView);\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void initialize() {\n\t\tbookCarSavedData = getSharedPreferences(\n\t\t\t\tgetResources().getString(R.string.bookedCarSharedPreference),\n\t\t\t\tMODE_PRIVATE);\n\n\t\tgson = new Gson();\n\n\t\teditor = bookCarSavedData.edit();\n\n\t\tString bookedCar = bookCarSavedData.getString(\"bookedCars\", null);\n\n\t\tif (bookedCar != null) {\n\n\t\t\tType type2 = new TypeToken<ArrayList<BookedCar>>() {\n\t\t\t}.getType();\n\n\t\t\tObject obj = gson.fromJson(bookedCar, type2);\n\n\t\t\tbookedCars = (ArrayList<BookedCar>) obj;\n\n\t\t\tcarList = (ListView) findViewById(R.id.bookedCarList);\n\t\t\tadapter = new BookedCarListAdapter(BookedCarsActivity.this,\n\t\t\t\t\tR.layout.booked_car_list_item, bookedCars);\n\n\t\t\tcarList.setAdapter(adapter);\n\n\t\t}\n\n\t}", "public void setSyncStatus(int syncStatus);", "public MusicClientApp() {\n\n tlm = new TrackListModel(new RecordDto());\n rcm = new RecordComboBoxModel(new MusicCollectionDto());\n scm = new PlayerComboBoxModel(new ArrayList<>());\n sercm = new ServerComboBoxModel(new ArrayList<>());\n\n initComponents();\n\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n StartMusicClient smc = new StartMusicClient(MusicClientApp.this);\n new Thread(smc).start();\n }\n });\n }", "public MyAdapter(ArrayList<GpsData> myDataset) {\r\n dataset = myDataset;\r\n }" ]
[ "0.72511625", "0.71979177", "0.7173795", "0.6999782", "0.69307554", "0.6650295", "0.59665793", "0.58177984", "0.58041143", "0.57923037", "0.57108724", "0.56942976", "0.5684242", "0.5656644", "0.5634655", "0.5631552", "0.5625187", "0.55347496", "0.5521022", "0.55140877", "0.551298", "0.55073655", "0.5504411", "0.54820925", "0.5481059", "0.54763776", "0.54500777", "0.5447003", "0.5446688", "0.5444803", "0.5438841", "0.5416426", "0.5415741", "0.5408254", "0.53790426", "0.53631437", "0.5357332", "0.53538877", "0.535341", "0.53417444", "0.53386915", "0.53325737", "0.532154", "0.53107077", "0.5304667", "0.5292304", "0.5291992", "0.52902776", "0.5289725", "0.5282461", "0.5282213", "0.527797", "0.5274638", "0.52711153", "0.52619886", "0.5256886", "0.5256566", "0.52564454", "0.5254376", "0.5236362", "0.5236001", "0.5234084", "0.52337134", "0.5231526", "0.52238345", "0.52182823", "0.52178043", "0.5212817", "0.5205182", "0.5204125", "0.52040434", "0.52040106", "0.51991034", "0.51982844", "0.5193326", "0.51926845", "0.51913464", "0.51728505", "0.517103", "0.5163244", "0.51513886", "0.51491314", "0.51384634", "0.5122568", "0.51224697", "0.5113896", "0.5106928", "0.51054305", "0.5104103", "0.5102045", "0.5099417", "0.50992274", "0.5089123", "0.50848085", "0.50774777", "0.5077357", "0.50744885", "0.5073716", "0.50735253", "0.50697786" ]
0.66475505
6
Don't use it when you need Interstitial Ads
@Override public void onInterstitialRewarded(FluteInterstitial fluteInterstitial, String s, int i) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onInterstitialDisplayed(Ad ad) {\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n }", "private void loadInterstitial() {\n AdRequest adRequest = new AdRequest.Builder()\n .setRequestAgent(\"android_studio:ad_template\").build();\n mInterstitialAd.loadAd(adRequest);\n }", "@Override\n public void onAdNotAvailable(AdFormat adFormat) {\n interstitialIntent = null;\n Log.d(TAG, \"IS: No ad available\");\n Toast.makeText(MainActivity.this, \"IS: No ad available\", Toast.LENGTH_SHORT).show();\n }", "private void loadInterstitial() {\n AdRequest adRequest = new AdRequest.Builder()\n .setRequestAgent(\"android_studio:ad_template\").build();\n mInterstitialAd.loadAd(adRequest);\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n Log.e(\"onInterstitialDisplayed\",\"\"+ad);\n }", "@Override\r\n public void onAdLoaded()//When interstitial is ready to be shoved\r\n {\r\n mInterstitial.showAd();\r\n }", "private void showInterstitial(){\n if (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n Toast.makeText(getContext(), \"Ad did not load\", Toast.LENGTH_SHORT).show();\n tellJoke();\n }\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n Log.e(TAG, \"Interstitial ad displayed.\");\n // pd.cancel();\n // showDialog(\"Success!\", \"Adfly earning has been activated successfully. You will see Adfly ads when you click links in articles.\");\n }", "@Override\n public void onAdAvailable(Intent intent) {\n interstitialIntent = intent;\n Log.d(TAG, \"IS: Offers are available\");\n Toast.makeText(MainActivity.this, \"IS: Offers are available\", Toast.LENGTH_SHORT).show();\n showOW.setEnabled(false);\n }", "private void interstitialAds() {\n Log.d(TAG, \"interstitialAds invoked\");\n final RequestCallback requestCallback = new RequestCallback() {\n @Override\n public void onAdAvailable(Intent intent) {\n // Store the intent that will be used later to show the interstitial\n interstitialIntent = intent;\n Log.d(TAG, \"IS: Offers are available\");\n Toast.makeText(MainActivity.this, \"IS: Offers are available\", Toast.LENGTH_SHORT).show();\n showOW.setEnabled(false);\n }\n\n @Override\n public void onAdNotAvailable(AdFormat adFormat) {\n // Since we don't have an ad, it's best to reset the interstitial intent\n interstitialIntent = null;\n Log.d(TAG, \"IS: No ad available\");\n Toast.makeText(MainActivity.this, \"IS: No ad available\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onRequestError(RequestError requestError) {\n // Since we don't have an ad, it's best to reset the interstitial intent\n interstitialIntent = null;\n Log.d(TAG, \"IS: Something went wrong with the request: \" + requestError.getDescription());\n Toast.makeText(MainActivity.this, \"IS: Something went wrong with the request: \", Toast.LENGTH_SHORT).show();\n }\n };\n\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n InterstitialRequester.create(requestCallback)\n .request(MainActivity.this);\n Log.d(TAG, \"Interst Request: added delay of 5 secs\");\n }\n }, 5000);\n }", "public void initInterstitialAds(){\n interstitialAd = new InterstitialAd(getContext(), getString(R.string.fb_test_ad)+\n getString(R.string.fb_interstitial_placement_id));\n // Set listeners for the Interstitial Ad\n interstitialAd.setAdListener(new InterstitialAdListener() {\n @Override\n public void onInterstitialDisplayed(Ad ad) {\n // Interstitial ad displayed callback\n Log.e(TAG, \"Interstitial ad displayed.\");\n // pd.cancel();\n // showDialog(\"Success!\", \"Adfly earning has been activated successfully. You will see Adfly ads when you click links in articles.\");\n }\n\n @Override\n public void onInterstitialDismissed(Ad ad) {\n // Interstitial dismissed callback\n Log.e(TAG, \"Interstitial ad dismissed.\");\n }\n\n @Override\n public void onError(Ad ad, AdError adError) {\n // Ad error callback\n Log.e(TAG, \"Interstitial ad failed to load: \" + adError.getErrorMessage());\n //pd.cancel();\n //showDialog(\"Error! \"+adError.getErrorCode(), \"AD loading failed! Please try again later.\");\n }\n\n @Override\n public void onAdLoaded(Ad ad) {\n // Interstitial ad is loaded and ready to be displayed\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n //pd.cancel();\n interstitialAd.show();\n }\n\n @Override\n public void onAdClicked(Ad ad) {\n // Ad clicked callback\n Log.d(TAG, \"Interstitial ad clicked!\");\n }\n\n @Override\n public void onLoggingImpression(Ad ad) {\n // Ad impression logged callback\n Log.d(TAG, \"Interstitial ad impression logged!\");\n }\n });\n\n // For auto play video ads, it's recommended to load the ad\n // at least 30 seconds before it is shown\n //interstitialAd.loadAd();\n }", "@Override\n public void onAdLoaded() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n Log.d(\"TAG\", \"The interstitial wasn't loaded yet.\");\n }\n }", "private void initAd() {\n\t\tmInterstitialAd = new InterstitialAd(mcq.this);\n\t\t// Defined in values/strings.xml\n\t\tmInterstitialAd.setAdUnitId(\"ca-app-pub-9971154848057782/1986029758\");\n\t}", "public interface InterstitialAdsRequester {\n \n /**\n * Registers interstitial ads display in the activity that requires this.\n * @param display \n */\n void registerInterstitialAdDisplay (InterstitialAdDisplay display);\n \n /**\n * This called when interstitial ad closed by the user or failed to open.\n * This allows activity to proceed what it planned to do after ad displayed.\n */\n void onInterstitialAdFinished();\n}", "private void showInterstitial() {\n if (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n }\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n //pd.cancel();\n interstitialAd.show();\n }", "@Override\n public void run() {\n interstitial.setAdUnitId(AdmodData.Admod.interstial_ap_id);\n // Request for Ads\n AdRequest adRequest = new AdRequest.Builder().addTestDevice(\"E4195931F1BE473915004D979ED94A8E\").build();\n //AdRequest adRequest = new AdRequest.Builder().build();\n interstitial.loadAd(adRequest);\n\n\n // Prepare an Interstitial Ad Listener\n\n interstitial.setAdListener(new AdListener() {\n public void onAdLoaded() {\n\n displayInterstitial();\n }\n\n @Override\n public void onAdFailedToLoad(int errorCode) {\n Log.e(\"Full\", \"Full ADS Error\" + errorCode);\n super.onAdFailedToLoad(errorCode);\n\n }\n\n });\n\n\n }", "public String showInterstitial() {\n\t\tif(mYoyoBridge != null) {\t \t\t\t\n\t\t\tmYoyoBridge.showInterstitial();\t\t\t \n\t }\t\t\t\t\t\t\t \n\t\treturn \"\";\n\t}", "@Override\n public void onAdLoaded(Ad ad) {\n interstitialAd.show();\n enableButton();\n }", "@Override\n public void onLoggingImpression(Ad ad) {\n Log.d(TAG, \"Interstitial ad impression logged!\");\n }", "@Override\n public void onLoggingImpression(Ad ad) {\n Log.d(TAG, \"Interstitial ad impression logged!\");\n }", "@Override\n public void onLoggingImpression(Ad ad) {\n Log.d(TAG, \"Interstitial ad impression logged!\");\n }", "@Override\n public void onLoggingImpression(Ad ad) {\n Log.d(TAG, \"Interstitial ad impression logged!\");\n }", "public void displayInterstitial() {\n if (interstitial.isLoaded()) {\n Log.e(\"Full\", \"Full ADS \");\n interstitial.show();\n }\n }", "private void requestNewInterstitial() {\n mInterstitialAd = new InterstitialAd(this);\n mInterstitialAd.setAdUnitId(getString(R.string.interstitial_ad_unit_id));\n mInterstitialAd.setAdListener(new AdListener() {\n @Override\n public void onAdClosed() {\n requestNewInterstitial();\n Toast.makeText(getApplicationContext(),\"Ad Closed\",Toast.LENGTH_LONG).show();\n goToNextActivity();\n }\n\n @Override\n public void onAdLoaded() {\n super.onAdLoaded();\n Toast.makeText(getApplicationContext(),\"Ad Loaded\",Toast.LENGTH_LONG).show();\n }\n });\n AdRequest adRequest = new AdRequest.Builder().build();\n mInterstitialAd.loadAd(adRequest);\n }", "public void requestNewInterstitial() {\n AdRequest adRequest = new AdRequest.Builder().build();\n\n mInterstitialAd.loadAd(adRequest);\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n Log.e(TAG, \"Interstitial ad displayed.\");\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n Log.e(TAG, \"Interstitial ad displayed.\");\n }", "@Override\n public void onInterstitialDisplayed(Ad ad) {\n Log.e(TAG, \"Interstitial ad displayed.\");\n }", "public void FBInterstitialAdsINIT(){\n interstitialAd = new InterstitialAd(this, getResources().getString(R.string.fb_placement_interstitial_id));\n // Set listeners for the Interstitial Ad\n interstitialAd.setAdListener(new InterstitialAdListener() {\n @Override\n public void onInterstitialDisplayed(Ad ad) {\n // Interstitial ad displayed callback\n Log.e(TAG, \"Interstitial ad displayed.\");\n }\n\n @Override\n public void onInterstitialDismissed(Ad ad) {\n // Interstitial dismissed callback\n Log.e(TAG, \"Interstitial ad dismissed.\");\n }\n\n @Override\n public void onError(Ad ad, AdError adError) {\n // Ad error callback\n\n }\n\n @Override\n public void onAdLoaded(Ad ad) {\n // Interstitial ad is loaded and ready to be displayed\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n\n }\n\n @Override\n public void onAdClicked(Ad ad) {\n // Ad clicked callback\n Log.d(TAG, \"Interstitial ad clicked!\");\n }\n\n @Override\n public void onLoggingImpression(Ad ad) {\n // Ad impression logged callback\n Log.d(TAG, \"Interstitial ad impression logged!\");\n }\n });\n\n interstitialAd.loadAd();\n }", "private void showIntAdd() {\n if (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n finish();\n }\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n interstitialAd.show(context);\n\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n// interstitialAd.show();\n }", "private void loadInterstitial(AdRequest adRequest) {\n mInterstitialAd.loadAd(adRequest);\n }", "@Override\n public void onAdClosed() {\n mInterstitialAd.loadAd(new AdRequest.Builder().build());\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.d(TAG, \"onAdLoaded\" + mInterstitialAd);\n showAdsInterstitial();\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }", "public static void initAd(Context context) {\n mInterstitialAd = new InterstitialAd(context,\"488896505197015_488906218529377\");\n requestNewInterstitial();\n loadNativeAd(context);\n }", "public interface C12872g {\n void onInterstitialAdClicked(String str);\n\n void onInterstitialAdClosed(String str);\n\n void onInterstitialAdLoadFailed(String str, C12799b bVar);\n\n void onInterstitialAdOpened(String str);\n\n void onInterstitialAdReady(String str);\n\n void onInterstitialAdShowFailed(String str, C12799b bVar);\n\n void onInterstitialAdShowSucceeded(String str);\n}", "@Override\n public void onExpiring(AdColonyInterstitial ad) {\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n // Show the ad\n\n }", "private void ads(View view){\n String ID = \"95b9dd1c47e6407db176bc2398bda2c8323030f814183567\" ;\n\n Appodeal.initialize((Activity)view.getContext(),ID,Appodeal.INTERSTITIAL);\n Appodeal.show((Activity)view.getContext(), Appodeal.INTERSTITIAL);\n Appodeal.isLoaded(Appodeal.INTERSTITIAL);\n\n }", "public void showInterstitial() {\r\n if (mInterstitial.isReady) {\r\n mInterstitial.showAd();\r\n }\r\n }", "@Override\n public void onAdClosed() {\n mInterstitialAd.loadAd(new AdRequest.Builder().build());\n }", "@Override\n public void onAdClosed() {\n mInterstitialAd.loadAd(new AdRequest.Builder().build());\n }", "private boolean showInterstitial() {\n if (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n return false;\n }\n return true;\n }", "@Override\n public void run() {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n }\n }", "@Override\n public void onAdLoaded(Ad ad) {\n Log.d(TAG, \"Interstitial ad is loaded and ready to be displayed!\");\n\n }", "public static void LoadIntertitialAdmob(Activity activity, String selectAdsBackup, String idIntertitial, String idIntertitialBackup, String Hpk1,\n String Hpk2, String Hpk3, String Hpk4, String Hpk5 ) {\n Bundle extras = new AppLovinExtras.Builder()\n .setMuteAudio(true)\n .build();\n AdRequest request = new AdRequest.Builder().addKeyword(Hpk1).addKeyword(Hpk2)\n .addKeyword(Hpk3).addKeyword(Hpk4).addKeyword(Hpk5)\n .addNetworkExtrasBundle(ApplovinAdapter.class, extras)\n .build();\n InterstitialAd.load(activity, idIntertitial, request,\n new InterstitialAdLoadCallback() {\n @Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n // The mInterstitialAd reference will be null until\n // an ad is loaded.\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }\n\n @Override\n public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {\n // Handle the error\n Log.i(TAG, loadAdError.getMessage());\n mInterstitialAd = null;\n }\n });\n\n switch (selectAdsBackup) {\n case \"APPLOVIN-M\":\n if (idIntertitialBackup.equals(\"\")){\n interstitialAd = new MaxInterstitialAd(\"qwerty12345\", activity);\n interstitialAd.loadAd();\n } else {\n interstitialAd = new MaxInterstitialAd(idIntertitialBackup, activity);\n interstitialAd.loadAd();\n }\n\n break;\n case \"MOPUB\":\n mInterstitial = new MoPubInterstitial(activity, idIntertitialBackup);\n mInterstitial.load();\n break;\n case \"APPLOVIN-D\":\n AdRequest.Builder builder = new AdRequest.Builder().addKeyword(Hpk1).addKeyword(Hpk2)\n .addKeyword(Hpk3).addKeyword(Hpk4).addKeyword(Hpk5);\n Bundle interstitialExtras = new Bundle();\n interstitialExtras.putString( \"zone_id\", idIntertitialBackup );\n builder.addCustomEventExtrasBundle( AppLovinCustomEventInterstitial.class, interstitialExtras );\n\n AppLovinSdk.getInstance(activity).getAdService().loadNextAd(AppLovinAdSize.INTERSTITIAL, new AppLovinAdLoadListener() {\n @Override\n public void adReceived(AppLovinAd ad) {\n loadedAd = ad;\n }\n\n @Override\n public void failedToReceiveAd(int errorCode) {\n // Look at AppLovinErrorCodes.java for list of error codes.\n }\n });\n interstitialAdlovin = AppLovinInterstitialAd.create(AppLovinSdk.getInstance(activity), activity);\n break;\n\n }\n }", "public interface AdActivity {\n InterstitialAd[] mInterstitialAds = new InterstitialAd[]{null};\n RewardedAd[] mRewardedAds = new RewardedAd[]{null};\n}", "public void displayInterstitial() {\n if (interstitial.isLoaded()) {\n interstitial.show();\n }\n }", "@Override\n public void onAdClosed() {\n mInterstitialAd = new InterstitialAd(CreationActivity.this);\n mInterstitialAd.setAdUnitId(Credentials.test_interstial_ID);\n //mInterstitialAd.setAdUnitId(\"ca-app-pub-1081175552825381/4683358349\");\n mInterstitialAd.loadAd(new AdRequest.Builder().addTestDevice(Credentials.device_huwawi_P10Lite_ID).build());\n //Toast.makeText(Main3Activity.this, \"Ad Closed!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void adNotDisplayed(Ad arg0) {\n\n }", "@Override\n public void adNotDisplayed(Ad arg0) {\n\n }", "@Override\n public void onAdClosed() {\n mInterstitialAd.loadAd(new AdRequest.Builder().build());\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(TAG, \"onAdLoaded\");\n }", "@Override\n protected Void doInBackground(Void... params) {\n if(mIsAdmobVisible) {\n // Create an ad request\n if (Utils.IS_ADMOB_IN_DEBUG) {\n adRequest = new AdRequest.Builder().\n addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();\n } else {\n adRequest = new AdRequest.Builder().build();\n }\n\n // When interstitialTrigger equals ARG_TRIGGER_VALUE, display interstitial ad\n interstitialAd = new InterstitialAd(ActivityStopWatch.this);\n interstitialAd.setAdUnitId(ActivityStopWatch.this.getResources()\n .getString(R.string.interstitial_ad_unit_id));\n interstitialTrigger = Utils.loadPreferences(Utils.ARG_TRIGGER,\n ActivityStopWatch.this);\n if(interstitialTrigger == Utils.ARG_TRIGGER_VALUE) {\n if(Utils.IS_ADMOB_IN_DEBUG) {\n interstitialAdRequest = new AdRequest.Builder()\n .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)\n .build();\n }else {\n interstitialAdRequest = new AdRequest.Builder().build();\n }\n Utils.savePreferences(Utils.ARG_TRIGGER, 0, ActivityStopWatch.this);\n }else{\n Utils.savePreferences(Utils.ARG_TRIGGER, (interstitialTrigger+1),\n ActivityStopWatch.this);\n }\n }\n return null;\n }", "public void displayInterstitial() {\n\t\tif (interstitial.isLoaded()) {\r\n\t\t\tinterstitial.show();\r\n\t\t}\r\n\t}", "@Override\n public void onInterstitialDismissed(Ad ad) {\n if (i == 1) {\n Intent intent = new Intent(AdSpaceActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }else if (i == 2){\n Intent intent = new Intent(AdSpaceActivity.this, BlogActivity.class);\n startActivity(intent);\n finish();\n }else if (i == 3){\n Intent intent = new Intent(AdSpaceActivity.this, WebsiteActivity.class);\n startActivity(intent);\n finish();\n }\n }", "@Override\n public void onAdClosed() {\n startActivity(new Intent(MainActivity.this,new InterstitialActivity().getClass()));\n mInterstitialAd.loadAd(new AdRequest.Builder().build());\n }", "@Override\n public void onAdClosed() {\n vInterstitialAdEntertainingFactActivity.loadAd(new AdRequest.Builder().build());\n }", "boolean hasGoogleAds();", "void onInterstitialAdFinished();", "void showSignInInterstitial();", "public void displayInterstitial() {\n if (interstitial.isLoaded()) {\n interstitial.show();\n }\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n Log.i(\"TAG\", \"onAdLoaded\");\n }", "private void startGame() {\n if (!interstitialAd.isLoading() && !interstitialAd.isLoaded()) {\n AdRequest adRequest = new AdRequest.Builder().build();\n interstitialAd.loadAd(adRequest);\n }\n\n // retryButton.setVisibility(View.INVISIBLE);\n\n }", "@Override\n public void onAdNotAvailable(AdFormat adFormat) {\n offerwallIntent = null;\n Log.d(TAG, \"OW: No ad available\");\n Toast.makeText(MainActivity.this, \"OW: No ad available\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onAdLoaded(Ad ad) {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\n public void onAdLoaded() {\n }", "public interface AdController {\n void setupAds();\n RelativeLayout setBannerOnView(View gameView);\n void showBannedAd();\n void hideBannerAd();\n boolean isWifiConnected();\n void showInterstellarAd(Runnable then);\n void showInterstellar();\n void setInterstitialCount(int countInterstitial);\n void hideInterstellarAd(Runnable then);\n InterstitialAd getInterstitialAd();\n}", "public void mo1663d() {\n if (this.f9849a.f9856g != null) {\n this.f9849a.f9856g.onInterstitialDisplayed(this.f9849a);\n }\n }", "@Override\r\n public void onAdLoaded() {\n }", "private void initBannerAdmob() {\n }", "@Override\n public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {\n mInterstitialAd = interstitialAd;\n mInterstitialAd.show(ShareChatActivity.this);\n\n }", "void registerInterstitialAdDisplay (InterstitialAdDisplay display);", "@Override\n public void onAdImpression() {\n Log.d(TAG, \"Ad recorded an impression.\");\n }", "private void displayAd() {\n\t\tif (mInterstitialAd != null && mInterstitialAd.isLoaded()) {\n\t\t\tmInterstitialAd.show();\n\t\t} else {\n\t\t\t// Toast.makeText(MainActivity.this, \"Ad did not load\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t// LoadAdd();\n\t\t\t/*\n\t\t\t * if (!mInterstitialAd.isLoaded()) { Toast.makeText(mcq.this,\n\t\t\t * \"not load\", Toast.LENGTH_SHORT).show(); } else {\n\t\t\t * Toast.makeText(mcq.this, \" not \", Toast.LENGTH_SHORT) .show(); }\n\t\t\t */\n\t\t}\n\t}", "@Override\n\tpublic void onRealClickAd() {\n\t}", "@Override\n public void onAdOpened() {\n }", "public String loadInterstitialView(double autoShowOnLoad) {\n\t\tif(mYoyoBridge != null) {\t \n boolean autoshow = false;\n\t\t\tif((int)autoShowOnLoad > 0) {\n\t\t\t\tautoshow = true;\n\t\t\t}\t\t\t\t\n\t\t\tmYoyoBridge.loadInterstitialAd(autoshow);\t\t\t \n\t }\t\t\t\t\t\t\t \n\t\treturn \"\";\n\t}", "@Override\n public void onAdLoaded(Ad ad) {\n }", "@Override\n public void onAdClicked() {\n }", "public void m4566a() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.facebook.ads.interstitial.impression.logged:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.displayed:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.dismissed:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.clicked:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.error:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.activity_destroyed:\" + this.f4211a);\n LocalBroadcastManager.getInstance(this.f4212b).registerReceiver(this, intentFilter);\n }", "@Override\n public void onAdLoaded() {\n }", "@Override\r\n\tpublic void onAdClick() {\n\r\n\t}", "public void load() {\n a.G().a(this.context, this, getPlacementID(), new d.a() {\n public final <T> void a(T t) {\n AppnextAd appnextAd;\n try {\n appnextAd = a.G().a(Interstitial.this.context, (ArrayList<AppnextAd>) (ArrayList) t, Interstitial.this.getCreative(), (Ad) Interstitial.this);\n } catch (Throwable unused) {\n if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(AppnextError.NO_ADS);\n }\n appnextAd = null;\n }\n if (appnextAd != null) {\n if (Interstitial.this.getOnAdLoadedCallback() != null) {\n Interstitial.this.getOnAdLoadedCallback().adLoaded(appnextAd.getBannerID(), appnextAd.getCreativeType());\n }\n } else if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(AppnextError.NO_ADS);\n }\n }\n\n public final void error(String str) {\n if (Interstitial.this.getOnAdErrorCallback() != null) {\n Interstitial.this.getOnAdErrorCallback().adError(str);\n }\n }\n }, getCreative());\n }", "@Override\n public void onAdNotAvailable(AdFormat adFormat) {\n rewardedVideoIntent = null;\n Log.d(TAG, \"RV: No ad available \");\n Toast.makeText(MainActivity.this, \"RV: No ad available \", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View view) {\n if (mInterstitialAd.isLoaded()) {\n mInterstitialAd.show();\n } else {\n goToNextActivity();\n }\n }", "@Override\n public void onAdLoaded() {\n Log.d(\"TAG\",\"Ad loaded\");\n }", "private void requestNewBanner(){\n AdView mAdView = (AdView) findViewById(R.id.adView);\n AdRequest adRequest = new AdRequest.Builder().build();\n mAdView.loadAd(adRequest);\n }", "@Override\n\t\t\tpublic void onAdClosed() {\n\t\t\t\tmInterstitialAd.loadAd(adRequest);\n\t\t\t}", "private void LoadAdd() {\n\t\tAdRequest adRequest = new AdRequest.Builder().build();\n\t\tmInterstitialAd.loadAd(adRequest);\n\t\t// Toast.makeText(MainActivity.this, \"loading\",\n\t\t// Toast.LENGTH_SHORT).show();\n\t}" ]
[ "0.7526264", "0.7526264", "0.7310152", "0.7191705", "0.71367335", "0.7062655", "0.70289195", "0.70258033", "0.70008236", "0.6910964", "0.68681896", "0.6864014", "0.6800984", "0.67867255", "0.6786036", "0.6785094", "0.67603886", "0.6740797", "0.6718219", "0.6667522", "0.66454303", "0.66454303", "0.66454303", "0.66454303", "0.6644949", "0.66207194", "0.6619846", "0.660249", "0.660249", "0.660249", "0.6571437", "0.6548992", "0.65128744", "0.65020347", "0.64756715", "0.6462507", "0.64589286", "0.6457023", "0.64490366", "0.6444896", "0.64316005", "0.6423407", "0.6409992", "0.6390133", "0.6387456", "0.6387456", "0.6380121", "0.6361904", "0.6340063", "0.63223904", "0.63031405", "0.63024664", "0.627874", "0.62770253", "0.62770253", "0.62670285", "0.6265706", "0.6246406", "0.62417", "0.6239832", "0.6231151", "0.62186104", "0.6216843", "0.6203555", "0.6194866", "0.6179393", "0.61647385", "0.6161439", "0.61480373", "0.6137595", "0.6114031", "0.6114031", "0.6114031", "0.6114031", "0.6114031", "0.6114031", "0.6114031", "0.6114031", "0.6102803", "0.6093266", "0.60876936", "0.6072693", "0.6063217", "0.6061084", "0.60496956", "0.6048582", "0.6044155", "0.6041763", "0.6028196", "0.6024513", "0.6004078", "0.59859526", "0.5984541", "0.5981638", "0.59779483", "0.5977854", "0.5961552", "0.59557384", "0.5955129", "0.5941945", "0.5906659" ]
0.0
-1
Maximum size of echo datagram
public static void main(String[] args) throws IOException { if (args.length != 1) // Test for correct argument list throw new IllegalArgumentException("Parameter(s): <Port>"); int servPort = Integer.parseInt(args[0]); // Create a selector to multiplex client connections. Selector selector = Selector.open(); DatagramChannel channel = DatagramChannel.open(); channel.configureBlocking(false); channel.socket().bind(new InetSocketAddress(servPort)); channel.register(selector, SelectionKey.OP_READ, new ClientRecord()); while (true) { // Run forever, receiving and echoing datagrams // Wait for task or until timeout expires if (selector.select(TIMEOUT) == 0) { System.out.print("."); continue; } // Get iterator on set of keys with I/O to process Iterator<SelectionKey> keyIter = selector.selectedKeys().iterator(); while (keyIter.hasNext()) { SelectionKey key = keyIter.next(); // Key is bit mask // Client socket channel has pending data? if (key.isReadable()) handleRead(key); // Client socket channel is available for writing and // key is valid (i.e., channel not closed). if (key.isValid() && key.isWritable()) handleWrite(key); keyIter.remove(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPayloadLength() {\n return buffer.limit() - 12;\n }", "int getServerPayloadSizeBytes();", "private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }", "private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }", "long getFullMessageLength();", "public int getMaxSize(){\n\t\treturn ds.length;\n\t}", "Long payloadLength();", "public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}", "public int getMaxSize() {\n return maxSize_;\n }", "public int getMaxBufferSize() {\r\n return maxBufferSize;\r\n }", "public abstract long getMaxSize();", "public int getMaxBufferSize() {\n return maxBufferSize;\n }", "public int getMaxSize(){\n return maxSize;\n }", "public int getMaxSize() {\n return maxSize_;\n }", "public int getMaxSize() {\n return maxSize_;\n }", "public int getMaxResponseSize() {\n return maxResponseSize;\n }", "public int getMaxSize() {\n return maxSize;\n }", "public int getMaxSize() {\n return maxSize;\n }", "public int getMaxSize() {\n return maxSize;\n }", "protected abstract int getMaxDesiredSize();", "int getMaxSize();", "public int getMaxSize() {\n return maxSize_;\n }", "public int getMaximumSize() {\n return maximumSize;\n }", "public int getReceiveBufferSize() {\n return soRcvBuf;\n }", "public int getMaxSize()\n {\n return m_MaxSize;\n }", "public long maxSize() {\n\t\treturn maxSize;\n\t}", "int getMaxPackLen()\n {\n return configfile.max_pack_len;\n }", "@Override\n public int getMaxCapacity() {\n return 156250000;\n }", "public long maxResponseLength() {\n return get(MAX_RESPONSE_LENGTH);\n }", "public void setMaxBufferSize(int value) {\n this.maxBufferSize = value;\n }", "public int maxSize()\n {\n return maxSize;\n }", "public int getMaxLength() {\n return maxLength;\n }", "public int getServerPayloadSizeBytes() {\n return serverPayloadSizeBytes_;\n }", "public int getPacketSize(){\r\n\t\treturn 8 + data.length;\r\n\t}", "public int getMaxLength() {\r\n return _maxLength;\r\n }", "long getMaxFileSizeBytes();", "public int maximumSizeInBytes() {\n return maximumSizeInBytes;\n }", "public int getSize() {\n return this.serialize().limit();\n }", "public abstract int getMaxIntermediateSize();", "@Override\n\tpublic long maxSize() {\n\t\treturn Main.chunkStoreAllocationSize;\n\t}", "public native static int getMaximumMTU() throws IOException,IllegalArgumentException;", "public static int size_reply() {\n return (8 / 8);\n }", "public int getServerPayloadSizeBytes() {\n return serverPayloadSizeBytes_;\n }", "private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }", "public int getMaxLength() {\r\n return MAX_LENGTH;\r\n }", "public int getReceiveBufferSize()\r\n/* 99: */ {\r\n/* 100: */ try\r\n/* 101: */ {\r\n/* 102:131 */ return this.javaSocket.getReceiveBufferSize();\r\n/* 103: */ }\r\n/* 104: */ catch (SocketException e)\r\n/* 105: */ {\r\n/* 106:133 */ throw new ChannelException(e);\r\n/* 107: */ }\r\n/* 108: */ }", "public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}", "public int getMaxLength(){\n return this.maxLength;\n }", "public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}", "public void setMaxLength(int maxLength) {\r\n _maxLength = maxLength;\r\n }", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public void setMaxSize(int c) {\n maxSize = c;\n }", "public abstract int getMessageSize();", "public int getOutgoingQueueSize();", "public void setMaxSize(int maxSize) {\n this.maxSize = maxSize;\n }", "public int getSizeLimit() {\n\t\treturn sizeLimit;\n\t}", "int getBufferSize();", "public int getMaxLength();", "public int getMessageIdBufferSize() {\r\n\t\treturn msgIdBufferSize;\r\n\t}", "public static int size_max() {\n return (8 / 8);\n }", "protected void setMaxSize(int size) {\n maxSize = size;\n }", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }", "long countMessageLengthTill(long maxLength) throws IllegalStateException;", "public void setMaxFileSize(int sINGLESIZE) {\n\t\t\r\n\t}", "@java.lang.Override\n public long getMaxEnvelopeQueueSize() {\n return maxEnvelopeQueueSize_;\n }", "protected int getPayloadLength() {\n if (data == null) {\n return 0;\n } else {\n return data.length;\n }\n }", "public static int size_p_sendts() {\n return (32 / 8);\n }", "public Builder setMaxEnvelopeQueueSize(long value) {\n \n maxEnvelopeQueueSize_ = value;\n onChanged();\n return this;\n }", "public int getMaximalSize() {\n return maximalSize;\n }", "public Integer getMaxLength() { \n\t\treturn getMaxLengthElement().getValue();\n\t}", "int getMaxCharSize();", "public int getSendBufferSize()\r\n/* 111: */ {\r\n/* 112: */ try\r\n/* 113: */ {\r\n/* 114:140 */ return this.javaSocket.getSendBufferSize();\r\n/* 115: */ }\r\n/* 116: */ catch (SocketException e)\r\n/* 117: */ {\r\n/* 118:142 */ throw new ChannelException(e);\r\n/* 119: */ }\r\n/* 120: */ }", "public void setMaxLength(int value) {\n this.maxLength = value;\n }", "@java.lang.Override\n public long getMaxEnvelopeQueueSize() {\n return maxEnvelopeQueueSize_;\n }", "public Dimension getMaximumSize()\n {\n return new Dimension(32767, 32767);\n }", "@Override\n public long estimateSize() { return Long.MAX_VALUE; }", "@Test\n public void testMaxMessageLength() throws Exception {\n int maxMessageLength = 10;\n CountDownLatch latch = new CountDownLatch(1);\n EventStreamClosedClient eventListener = new EventStreamClosedClient(latch);\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"), 0, 0,\n maxMessageLength, eventListener)) {\n latch.await(30, TimeUnit.SECONDS);\n Assert.assertTrue(streamEvents.isEventStreamClosed());\n Assert.assertEquals(CloseCodes.TOO_BIG.getCode(),\n eventListener.closeCode);\n String message = \"Message length exceeded the configured maximum (\" +\n maxMessageLength + \" characters)\";\n Assert.assertEquals(message, eventListener.closePhrase);\n }\n }", "public Integer maxLength() {\n return this.maxLength;\n }", "public int getMaxLength() {\r\n\t\treturn fieldMaxLength;\r\n\t}", "public int getProtocolDelimitedLength();", "public int getPacketSize() {\n\t\treturn 14;\n\t}", "int getTransactionLogMaxSize() {\n\t\treturn transactionLog.getMaxSize();\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public int getBufferSize() {\n return this.response.getBufferSize();\n }", "public int getBufferSize() {\n\t\treturn 0;\n\t}", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "public abstract int getMaxLength();", "public void setMaxBufferSize(int maxBufferSize) {\r\n this.maxBufferSize = maxBufferSize;\r\n }", "public final int getDefaultMaxResponseSize( ) {\r\n\t\treturn this.defaultMaxResponseSize;\r\n\t}", "protected static long getMaxUploadSize() {\n return maxUploadSize;\n }", "@Override\n protected int getExpectedOutgoingMessageSize() {\n return 256;\n }", "public final int getMessageSize() {\n if (length == UNKNOWN_LENGTH) {\n throw new ProtocolException();\n }\n\n return length;\n }", "public native long getReceivedByteCount()\n throws IOException, IllegalArgumentException;", "int getWriterMaxQueueSize();", "public int size() { return buffer.length; }", "boolean hasMaxSize();", "@Override\n\tpublic int getMaxSizeZ()\n\t{\n\t\treturn 200;\n\t}", "public int getMaxListLength();", "private int getLength() throws IOException {\n\n int i = in.read();\n if ( i == -1 ) {\n throw new IOException( BaseMessages\n .getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthMissing\" ) );\n }\n\n // A single byte short length\n if ( ( i & ~0x7F ) == 0 ) {\n return i;\n }\n\n int num = i & 0x7F;\n\n // We can't handle length longer than 4 bytes\n if ( i >= 0xFF || num > 4 ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERFieldTooBig\", i ) );\n }\n\n byte[] bytes = new byte[num];\n int n = in.read( bytes );\n if ( n < num ) {\n throw new IOException(\n BaseMessages.getString( MQTTPublisherMeta.PKG, \"MQTTClientSSL.Error.InvalidDERLengthTooShort\" ) );\n }\n\n return new BigInteger( 1, bytes ).intValue();\n }", "@Override\n public long estimateSize() {\n return Long.MAX_VALUE;\n }" ]
[ "0.66174996", "0.65733016", "0.65664566", "0.65664566", "0.65339947", "0.6466071", "0.645116", "0.6440086", "0.63859874", "0.6385126", "0.63721603", "0.6348405", "0.6302085", "0.6258907", "0.6258907", "0.6256472", "0.6242429", "0.6242429", "0.6242429", "0.6236503", "0.6168759", "0.6157685", "0.61278474", "0.6122955", "0.6115151", "0.6101725", "0.6099493", "0.6022922", "0.60228026", "0.6006049", "0.59982634", "0.5989955", "0.59735364", "0.5960489", "0.5957114", "0.5955955", "0.5920398", "0.5918001", "0.591445", "0.5899465", "0.5891911", "0.5877051", "0.5867727", "0.5853171", "0.5848707", "0.5847909", "0.5841754", "0.5840706", "0.5798483", "0.5785881", "0.5783938", "0.5743249", "0.57397884", "0.57123363", "0.5709885", "0.5696424", "0.569404", "0.5673768", "0.5670676", "0.5650224", "0.5644437", "0.56242734", "0.56236184", "0.5614325", "0.56129795", "0.56116986", "0.5599863", "0.558987", "0.5589614", "0.5588892", "0.55819464", "0.55755234", "0.5575198", "0.5570293", "0.55692035", "0.55587125", "0.5556145", "0.5552479", "0.5546544", "0.55464727", "0.553019", "0.55268294", "0.55067587", "0.5504583", "0.5501529", "0.54959995", "0.5492927", "0.54869455", "0.54710907", "0.54696107", "0.5465707", "0.54653144", "0.54606205", "0.5455882", "0.54519725", "0.54496443", "0.54482913", "0.5445232", "0.5427836", "0.5426299", "0.542022" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Mint.initAndStartSession(this, "e45fc306"); setContentView(R.layout.local_song_list_dialog); db = new SongsTable(this); pref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); Boolean isFirst = pref.getBoolean("album", true); listMap = new HashMap<>(); list = new ArrayList<>(); tempList = new ArrayList<>(); makedbList(); }
{ "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 protected void onResume() { super.onResume(); //makeList(); TextView text = findViewById(R.id.local_songTitle); text.setText("Folder"); //text.setBackground(null); ImageView search = findViewById(R.id.local_music_search); search.setVisibility(View.INVISIBLE); ImageView back = findViewById(R.id.local_music_back); back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub finish(); } }); ListView listview = findViewById(R.id.local_music_list); adap = new artistListAdapter(folderActivity.this, listMap, list); listview.setAdapter(adap); listview.setOnItemClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent = new Intent(folderActivity.this, MyDialogFragment.class); ArrayList<SongInfo> item = listMap.get(list.get(position)); intent.putExtra("abcd",item); startActivity(intent); }
{ "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
Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The first three athletes got the top three highest scores, so they got "Gold Medal", "Silver Medal" and "Bronze Medal". For the left two athletes, you just need to output their relative ranks according to their scores.
public static void main(String[] args) { for( String s : findRelativeRanks(new int[]{5,4,3,2,1})){ System.out.println(s); } for( String s : findRelativeRanksPriorityQueue(new int[]{5,4,3,2,1})){ System.out.println(s); } for( String s : findRelativeRanksTreeMap(new int[]{5,4,3,2,1})){ System.out.println(s); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n\t\tint[] ranks = new int[scores.length];\n\t\tint[] aliceRanks = new int[alice.length];\n\n\t\tint endIndex = -1;\n\t\tint currentElement = Integer.MIN_VALUE;\n\n\t\tfor (int i = 0; i < ranks.length; i++) {\n\t\t\tif (currentElement != scores[i]) {\n\t\t\t\tranks[++endIndex] = scores[i];\n\t\t\t\tcurrentElement = scores[i];\n\t\t\t}\n\t\t}\n\n\t\tint aliceEndIndex = -1;\n\t\tfor (int i = 0; i < aliceRanks.length; i++) {\n\t\t\tint currScore = alice[i];\n\t\t\t\n\t\t\tint globalRankApprox = binarySearch(ranks, alice[i], 0, endIndex);\n\t\t\t\n\t\t\tif (currScore >= ranks[globalRankApprox]) {\n\t\t\t\taliceRanks[++aliceEndIndex] = globalRankApprox+1;\n\t\t\t}else{\n\t\t\t\taliceRanks[++aliceEndIndex] = globalRankApprox+1+1;\n\t\t\t}\n\t\t}\n\n\t\treturn aliceRanks;\n\t}", "public List<Integer> findTopGenesByRanking( Integer n ) throws DAOException;", "private Artist[] getTop10(List<User> users){\n\t\tArtist[] top=new Artist[10];\n\t\tHashMap<Artist, Integer> rank=new HashMap<Artist,Integer>();\n\t\tfor(User u:users) {\n\t\t\tfor(int i=0;i<u.artists.size();i++) {\n\t\t\t\tArtist a=u.artists.get(i);\n\t\t\t\tInteger weight=rank.getOrDefault(a, 0);\n\t\t\t\trank.put(a, weight+u.artistsWeights.get(i));\n\t\t\t}\n\t\t}\n\t\tArrayList<Artist>ranking=new ArrayList<Artist>();\n\t\tranking.addAll(rank.keySet());\n\t\tranking.sort((a1,a2)->rank.get(a2)-rank.get(a1));\n\t\tfor(int i=0;i<10;i++) {\n\t\t\ttop[i]=ranking.get(i);\n\t\t}\n\t\treturn top;\n\t\t\n\t}", "int getRanking();", "public String findHighestScorers() {\n ArrayList<String> names = new ArrayList<String>();\n String theirNames = \"\";\n int highest = findHighestScore();\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) == 0) {\n //note that each quiz taker's arraylist of scores is already sorted in descending order post-constructor\n boolean alreadyThere = false;\n for(String name: names) {\n if(name.equals(allQuizTakers.get(i).getName())) {\n alreadyThere = true;\n }\n }\n if (!alreadyThere) {\n theirNames += allQuizTakers.get(i).getName() + \" \";\n names.add(allQuizTakers.get(i).getName());\n }\n }\n }\n return theirNames;\n }", "public static String[] displayleader(boolean[] ineligible, String[] name, float []top3, float[] stat, int numberofplayer)\n {\n\n String top1name,top2name,top3name;\n top1name = top2name = top3name = \"\"; // initialize null value of all names \n int top1counter,top2counter,top3counter;\n top1counter = top2counter = top3counter = 0; // initialize 0 to all counters\n String top1namearray[] = new String[50]; // arrays to hold top3 names\n String top2namearray[] = new String[50];\n String top3namearray[] = new String[50];\n int a,b,c;\n a=b=c= 0;\n for (int i=0;i<numberofplayer;i++)\n {\t\n if (top3[0]==stat[i] && ineligible[i] != true) { // if the value of top1 equals the stat of player\n if (top1counter < 1) { // if the first place is only one person\n \ttop1namearray[a]=name[i]; // putting in array to sort\n top1name=name[i]; // assign name to top1name array\n a++;\n } else {\n top1namearray[a]=name[i]; // if there is more than one person with the top1 value\n top1name = top1name + \", \" + name[i];//if there is more than one leader, it prints out the names of the leader with comma between.\n a++;\n }\n top1counter++;\n }\n if (top3[1]==stat[i] && ineligible[i] != true) { // if the value of top2 equals the stat of player\n if (top2counter < 1) {\n \ttop2namearray[b]=name[i];\n top2name=name[i];\n b++;\n } else {\n \ttop2namearray[b]=name[i];\n top2name = top2name + \", \" + name[i];//if there is more than one leader, it prints out the names of the leader with comma between.\n b++;\n }\n top2counter++;\n }\n if (top3[2]==stat[i] && ineligible[i] != true) {// if the value of top1 equals the stat of player\n if (top3counter < 1) {\n \ttop3namearray[c]=name[i];\n top3name=name[i];\n c++;\n } else {\n \ttop3namearray[c]=name[i];\n top3name = top3name + \", \" + name[i];//if there is more than one leader, it prints out the names of the leader with comma between.\n c++;\n }\n top3counter++;\n }\n }\n sortname(top1namearray);// sorting the names of top1players in alphabetical order\n sortname(top2namearray);// sorting the names of top2players in alphabetical order\n sortname(top3namearray);// sorting the names of top3players in alphabetical order\n int q =1;\n if(top1counter >1) { top1name = top1namearray[0];} // reassigning name of top 1 value in alphabetical order if there is more than one\n while (top1namearray[q]!=null&&top1counter!=1) { // while there is more than 1 player with top1value and while top1name is not null\n \ttop1name = top1name + \", \" + top1namearray[q]; //inserting comma between names\n \tq++;\n }\n q=1;\n if(top2counter >1) { top2name = top2namearray[0];}// reassigning name of top 1 value in alphabetical order if there is more than one\n while (top2namearray[q]!=null&&top2counter!=1) { // while there is more than 1 player with top2value and while top2name is not null\n \ttop2name = top2name + \", \" + top2namearray[q]; //inserting comma between names\n \tq++;\n }\n q=1;\n if(top3counter >1) { top3name = top3namearray[0];}// reassigning name of top 1 value in alphabetical order if there is more than one\n while (top3namearray[q]!=null&&top3counter!=1) { // while there is more than 1 player with top3value and while top3name is not null\n \ttop3name = top3name + \", \" + top3namearray[q]; //inserting comma between names\n \tq++;\n }\n if(numberofplayer ==1) {top2name = null; top3name = null;} // if there is only one player top2 and top3 does not exist\n else if (numberofplayer==2&&top1counter<2) {top3name =null;} // if there is only 2 players top3 is null\n else if(numberofplayer==2&&top1counter>1) {top2name =null;top3name=null;} // if there is 2 players but 2players have tie value then top2 and top3 is null\n else if(top1counter>2) {top2name=null;top3name=null;} // if there is more than 2 ties with top1value, top2 and top3 does not exist\n else if(top2counter>1||top1counter>1) {top3name=null;} // if there is more than one top1 or top2, then top3 does not exist\n String []top3names = {top1name,top2name,top3name};\n return top3names;\n }", "public static String[] findRelativeRanks(int[] nums) {\r\n\t\tint[][] ranks = new int[nums.length][2];\r\n\t\tfor ( int i = 0; i < ranks.length; ++i ) {\r\n\t\t\tranks[i][0] = nums[i];\r\n\t\t\tranks[i][1] = i;\r\n\t\t}\r\n\t\t\r\n\t\tArrays.sort(ranks, (a, b) -> b[0]-a[0]);\r\n\t\t\r\n\t\tString[] relativeRanks = new String[ranks.length];\r\n\t\tfor ( int i = 0; i < ranks.length; ++i ) {\r\n\t\t\tif ( i < 3 ) {\r\n\t\t\t\tif ( i == 0 ) relativeRanks[ranks[i][1]] = \"Gold Medal\";\r\n\t\t\t\telse if ( i == 1 ) relativeRanks[ranks[i][1]] = \"Silver Medal\";\r\n\t\t\t\telse relativeRanks[ranks[i][1]] = \"Bronze Medal\";\r\n\t\t\t} else relativeRanks[ranks[i][1]] = \"\" + (i+1);\r\n\t\t}\r\n\t\treturn relativeRanks;\r\n\t}", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n \tal = new ArrayList<Integer>();\n \tint len = scores.length;\n \tranks = new int[len];\n \tal.add(scores[0]);\n \tranks[0]=1;\n \tfor(int i=1;i<len;++i)\n \t{\n \t\tal.add(scores[i]);\n \t\tif(scores[i]==scores[i-1])\n \t\t\tranks[i]=ranks[i-1];\n \t\telse\n \t\t\tranks[i]=ranks[i-1]+1;\n \t}\n \tint len2=alice.length;\n \tint[] ranksArr= new int[len2];\n \tfor(int i=0;i<len2;++i)\n \t{\n \t\tint binarySearch = Collections.binarySearch(al,alice[i],Collections.reverseOrder());\n \t\tif(binarySearch>=0)\n \t\t\tranksArr[i]=ranks[binarySearch];\n \t\telse\n \t\t{\n \t\t\tbinarySearch+=1;\n \t\tbinarySearch=-binarySearch;\n \t\t\tif(binarySearch==len)\n \t\t\t{\n \t\t\t\tbinarySearch-=1;\n \t\t\t\tranksArr[i]=ranks[binarySearch]+1;\n \t\t\t}\n \t\t\telse\n \t\t\t\tranksArr[i]=ranks[binarySearch];\n \t\t\t\n \t\t}\n \t\t\t\n \t}\n \treturn ranksArr;\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n /*\n * Write your code here.\n */\n List<Integer> ranks = new ArrayList<>();\n int i=0;\n while(i<scores.length-1) {\n ranks.add(scores[i]);\n int j=i+1;\n while(j<scores.length && scores[i]==scores[j]) {\n j+=1;\n }\n i=j;\n }\n ranks.add(scores[scores.length-1]);\n int[] aliceRank = new int[alice.length];\n for (int j=0; j< alice.length; j++) {\n int index = Collections.binarySearch(ranks, alice[j],Comparator.reverseOrder());\n aliceRank[j] = index > 0 ? index + 1 : index == 0 ? 1 : Math.abs(index);\n }\n return aliceRank;\n }", "private static List<String> getTopNCompetitors(int numCompetitors,\n int topNCompetitors, \n List<String> competitors,\n int numReviews,\n List<String> reviews) {\n\t\t\n\t\t HashMap<String, Integer> map = new HashMap<>();\n\t\t for(String comp : competitors){\n\t map.put(comp.toLowerCase(),0);\n\t }\n\t\t\n\t for(String sentence : reviews){\n\t String[] words = sentence.split(\" \"); // get all the words in one sentence and put them in a String array \n\t for(String word : words){\n\t if(map.containsKey(word.toLowerCase())) { // check if map has any of the words (competitor name). if yes increase its value\n\t map.put(word.toLowerCase(), map.get(word.toLowerCase()) + 1);\n\t }\n\t }\n\t }\n\t \n\t PriorityQueue<String> pq =new PriorityQueue<>((String i1,String i2)->{ \n\t return map.get(i1)-map.get(i2); \n\t });\n\t for(String key:map.keySet()){\n\t pq.add(key);\n\t if(pq.size()>topNCompetitors) pq.poll();\n\t }\n\t List<String> result=new ArrayList<>();\n\t while(!pq.isEmpty())\n\t result.add(pq.poll());\n\t \n\t Collections.reverse(result);\n\t \n\t return result; \n\t \n}", "public static float[] Findingleader(boolean[] ineligible,float[] stat, int numberofplayer)\n {\n float first,second,third; // initializing to negative number, so even a zero can be the leader value\n first=second=third = -100;\n for (int a = 0; a<numberofplayer; a++) // loops till a is less than numofplayer\n {\n\n if ((first<stat[a]||first==stat[a])&& ineligible[a] != true)// if stat is higher or same as first, and the stat is not empty\n {\tif(first==stat[a]) { // ignore the tie because the second value will be same as the first value\n \t}\n \telse {\n third = second; // previous second value becomes third \n second = first; // previous fisrt value becomes second now\n first = stat[a]; // replace the first value with stat[a]\n \t}\n }\n else if((second<stat[a]||second==stat[a])&& ineligible[a] != true) { // if stat is higher than or equal to second value\n \tif(second==stat[a]) { // ignoring the tie \n \t}\n \telse {\n \tthird = second; // previous second value is now assigned to third\n \tsecond = stat[a]; // second is replaced by the value of stat[a]\n \t}\n }\n else if((third<stat[a]||third==stat[a])&& ineligible[a] != true) { // if stat is higher than or equal the third value\n \tif(third==stat[a]) { // ignoring the tie value\n \t}\n \telse {\n \tthird = stat[a]; // third value is now replaced by the stat[a]\n \t}\n }\n }\n float []top3value = {first,second,third}; // using array to return more than 1 value\n return top3value; // top3value array\n }", "void showRanking(String winner, String rank);", "public void determineRank(){\r\n //ranks highcard 0, pair 1, twopair 2, three of a kind 3, straight 4, flush 5,\r\n //full house 6, four of a kind 7 , straight flush 8, royal flush 9\r\n //I should start top down.\r\n\r\n //Royal Flush\r\n if(isRoyalFlush())\r\n setRank(9);\r\n //Straight flush\r\n else if(isFlush() && isStraight())\r\n setRank(8);\r\n //four of a kind\r\n else if(isFourOfAKind())\r\n setRank(7);\r\n //full house\r\n else if( isFullHouse())\r\n setRank(6);\r\n //flush\r\n else if(isFlush())\r\n setRank(5);\r\n //straight\r\n else if(isStraight())\r\n setRank(4);\r\n //three of a kind\r\n else if(isThreeOfAKind())\r\n setRank(3);\r\n //twoPair\r\n else if(isTwoPair())\r\n setRank(2);\r\n //pair\r\n else if(isPair())\r\n setRank(1);\r\n //highcard\r\n else\r\n setRank(0);\r\n\r\n }", "public static void main(String[] args) {\n int l1=1000, l2=1000;\n int[] a1=new int[l1];\n int[] a2=new int[l2];\n int[] combine = new int[l1+l2];\n\n Random r = new Random();\n for (int i=0; i<a1.length; ++i){\n a1[i]=r.nextInt(a1.length*3);\n combine[i]=a1[i];\n }\n\n for (int i=0; i<a2.length; ++i){\n a2[i]=r.nextInt(a2.length*3);\n combine[l1+i]=a2[i];\n }\n\n Arrays.sort(a1);\n Arrays.sort(a2);\n Arrays.sort(combine);\n\n cnt=0;\n int m = findByRank(a1, 0, a1.length, a2, 0, a2.length, (a1.length+a2.length)/2);\n int m2 = combine[combine.length/2-1];\n\n System.out.printf(\"m=%d, m2=%d, cnt=%d\", m, m2, cnt);\n\n\n\n }", "List<Ranking> calculateOutcomeRanks(List<Instruction> instructions);", "public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"Enter Runs Scored\");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString numbers = sc.nextLine();\r\n\r\n\t\tString s[] = numbers.split(\" \");\r\n\r\n\t\tTreeMap<String, Integer> playerScores = new TreeMap<String, Integer>();\r\n\r\n\t\tfor (String ps : s) {\r\n\r\n\t\t\tplayerScores.put(ps.split(\"-\")[0], Integer.parseInt(ps.split(\"-\")[1]));\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Players who batted\");\r\n\r\n\t\tfor (String i : playerScores.keySet()) {\r\n\r\n\t\t\tSystem.out.println(i);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Scores by Players\");\r\n\r\n\t\tfor (String i : playerScores.keySet()) {\r\n\r\n\t\t\tSystem.out.println(i + \" : \" + playerScores.get(i));\r\n\r\n\t\t}\r\n\r\n\t\tint sum = 0;\r\n\r\n\t\tfor (int i : playerScores.values()) {\r\n\r\n\t\t\tSystem.out.println(i);\r\n\r\n\t\t\tsum += i;\r\n\r\n\t\t}\r\n\r\n\t\tint highestScore = 0;\r\n\r\n\t\tString player = null;\r\n\r\n\t\tfor (String i : playerScores.keySet()) {\r\n\r\n\t\t\tif (playerScores.get(i) > highestScore) {\r\n\t\t\t\tplayer = i;\r\n\t\t\t\thighestScore = playerScores.get(i);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Name of highest scorer : \" + player);\r\n\r\n\t\tSystem.out.println(\"Runs scored by Dhoni : \" + playerScores.get(\"Dhoni\"));\r\n\t\tSystem.out.println(\"Total Score : \" + sum);\r\n\r\n\t}", "private int getRank(DiceModel playerToRank) {\n\t\tint rank = 1;\n\t\tint ph; // placeholder\n\t\tint d1 = playerToRank.getDie1();\n\t\tint d2 = playerToRank.getDie2();\n\t\tint d3 = playerToRank.getDie3();\n\t\t\n\t\t// sorting them in ascending order\n\t\t// switch the 2nd number into first position if it is bigger\n\t\tif (d2 > d1) {\n\t\t\tph = d1;\n\t\t\td1 = d2;\n\t\t\td2 = ph;\n\t\t} // switch the 3rd number into second position if it is bigger\n\t\tif (d3 > d2) {\n\t\t\tph = d2;\n\t\t\td2 = d3;\n\t\t\td3 = ph;\n\t\t} // switch the 2nd number into first position if it is bigger\n\t\tif (d2 > d1) {\n\t\t\tph = d1;\n\t\t\td1 = d2;\n\t\t\td2 = ph;\n\t\t}\n\t\t\n\t\t// now to get their ranking\n\t\t// check for 4,2,1\n\t\tif (d1 == 4 && d2 == 2 && d3 == 1) {\n\t\t\trank = 4;\n\t\t} else if (d1 == d2 && d1 == d3) { // checks for triples\n\t\t\trank = 3;\n\t\t} else if ((d1 == d2 && d1 != d3) || d2 == d3) { // pairs\n\t\t\trank = 2;\n\t\t} else {\n\t\t\trank = 1;\n\t\t}\n\t\t\n\t\treturn rank;\n\t}", "public static void findScores(TrigonalPlayer[] players) {\r\n int[] scores = new int[MAX_NUM_PLAYERS];\r\n int firstTrigOfHexOwner = 0;\r\n boolean sampleNotTaken;\r\n hexagonsLoop:\r\n for (Trigon[] hexagon : hexagons) {\r\n sampleNotTaken = true;\r\n for (Trigon trig : hexagon) {\r\n if (sampleNotTaken) { // Taking fist non-null trig's user ID as sample\r\n if (trig != null) {\r\n firstTrigOfHexOwner = trig.getOwnerId();\r\n sampleNotTaken = false;\r\n }\r\n }\r\n if (trig == null || trig.getOwnerId() != firstTrigOfHexOwner || trig.getOwnerId() == 0) {\r\n // null is possibility as intended\r\n continue hexagonsLoop;\r\n }\r\n }\r\n scores[firstTrigOfHexOwner - 1] += BASIC_HEXAGON_SCORE;\r\n }\r\n for (int i = 0; i < MAX_NUM_PLAYERS; i++) { // Setting Players' scores to those calculated\r\n players[i + 1].setScore(scores[i]);\r\n }\r\n }", "public void sortScores(){\r\n // TODO: Use a single round of bubble sort to bubble the last entry\r\n // TODO: in the high scores up to the correct location.\r\n \tcount=0;\r\n \tfor(int i=Settings.numScores-1; i>0;i--){\r\n \t\tif(scores[i]>scores[i-1]){\r\n \t\t\tint tempS;\r\n \t\t\ttempS=scores[i];\r\n \t\t\tscores[i]=scores[i-1];\r\n \t\t\tscores[i-1]=tempS;\r\n \t\t\t\r\n \t\t\tString tempN;\r\n \t\t\ttempN=names[i];\r\n \t\t\tnames[i]=names[i-1];\r\n \t\t\tnames[i-1]=tempN;\r\n \t\t\tcount++;\r\n \t\t}\r\n \t}\r\n }", "private void findIdealSuitAndRank() {\n Map<Card.Suit, Integer> suitsInHand = new HashMap<Card.Suit, Integer>();\n Map<Card.Rank, Integer> ranksInHand = new HashMap<Card.Rank, Integer>();\n\n // Use the enumerable methods in Card class to put all the keys in the HashMaps\n for (Card.Suit suit : Card.Suit.values()) {\n suitsInHand.put(suit, 0);\n }\n for (Card.Rank rank : Card.Rank.values()) {\n ranksInHand.put(rank, 0);\n }\n\n // Place all cards played in their respective locations in the HashMap\n for (Card card : cardsInHand) {\n suitsInHand.put(card.getSuit(), suitsInHand.get(card.getSuit()) + 1);\n ranksInHand.put(card.getRank(), ranksInHand.get(card.getRank()) + 1);\n }\n /**\n * The following for loop was derived from\n * https://stackoverflow.com/questions/5911174/finding-key-associated-with-max-value-in-a-java-map\n * for finding the key with the max value in a HashMap.\n */\n Map.Entry<Card.Suit, Integer> maxEntrySuit = null;\n for (Map.Entry<Card.Suit, Integer> entry : suitsInHand.entrySet()) {\n if (maxEntrySuit == null || entry.getValue().compareTo(maxEntrySuit.getValue()) > 0) {\n maxEntrySuit = entry;\n }\n }\n idealSuit = maxEntrySuit.getKey();\n\n Map.Entry<Card.Rank, Integer> maxEntryRank = null;\n for (Map.Entry<Card.Rank, Integer> entry : ranksInHand.entrySet()) {\n if (maxEntryRank == null || entry.getValue().compareTo(maxEntryRank.getValue()) > 0) {\n maxEntryRank = entry;\n }\n }\n idealRank = maxEntryRank.getKey();\n }", "@Test\n public void testGetMyBestRank() {\n int result1 = this.scoreBoard.getMyBestRank(new Record(4, 5, \"@u1\", \"ST\"));\n assertEquals(1, result1);\n int result2 = this.scoreBoard.getMyBestRank(new Record(3, 15, \"@u3\", \"ST\"));\n assertEquals(3, result2);\n\n }", "public ArrayList<CollegeFootballTeam> rankTeams();", "public void calculateHighscores(){\n if((newPlayer.getScore() > (getRecord())) && (newPlayer.getScore() > getRecord2()) && (newPlayer.getScore() > getRecord3())){\n setRecord3(getRecord2());\n setRecord2(getRecord());\n setRecord(newPlayer.getScore());\n newPlayer.resetScore();\n }\n if((newPlayer.getScore() > getRecord2()) && (newPlayer.getScore() > getRecord3()) && (newPlayer.getScore() < getRecord())){\n setRecord3(getRecord2());\n setRecord2(newPlayer.getScore());\n newPlayer.resetScore();\n }\n if((newPlayer.getScore() > getRecord3()) && newPlayer.getScore() < getRecord2()){\n setRecord3(newPlayer.getScore());\n newPlayer.resetScore();\n }else{\n newPlayer.resetScore();\n\n }\n }", "public static float[] FindingKleader(boolean[] ineligible, float[] kstat, int numberofplayer)\n {\n float first,second,third;\n first=second=third = Float.POSITIVE_INFINITY; // assigned positive infinity so any integer lower than infinity can be assigned to leader value\n for (int a = 0; a<numberofplayer; a++) // for number of players\n {\n\n if ((first>kstat[a]||first==kstat[a]) && ineligible[a] != true)// if stat exists and the stat is equal to or greater than first \n {\tif(first==kstat[a]) { // do nothing if the stat is same fisrt value\n \t}\n \telse { // if not tie\n third = second; // previous second value is assigned to third \n second = first; // previous first value is now assigned to second\n first = kstat[a]; // value of the stat is now assigned to first\n \t}\n }\n else if((second>kstat[a]||second==kstat[a]) && ineligible[a] != true) {\n \tif(second==kstat[a]) {\n \t}\n \telse {\n \tthird = second;// previous second value is assigned to third\n \tsecond = kstat[a]; // value of second is stat \n \t}\n \t}\n \telse if((third>kstat[a]||third==kstat[a]) && ineligible[a] != true) {\n \t\tif(third==kstat[a]) {\n \t}\n \telse {\n \tthird = kstat[a]; // value of third is replace by the value of stat\n \t}\n }\n }\n float[] top3kleader = {first,second,third};\n return top3kleader;\n }", "public int getRank(int score) {\n int i = 0;\n for (i = 0; i < scoreInfoList.size(); i++) {\n if (score > scoreInfoList.get(i).getScore()) {\n break;\n }\n }\n System.out.println(\"rank \" + (i + 1));\n return i + 1;\n }", "public void getRankingData(ArrayList<RankingItem> arrayList,int persusernr){\n int persRank = 0;\n for(int i=0;i<arrayList.size();i++){\n if(persusernr == arrayList.get(i).getUsernr()){\n persRank = arrayList.get(i).getRank();\n }\n }\n rankingData.clear();\n if(persRank>3){\n rankingData.add(arrayList.get(0));\n rankingData.add(arrayList.get(1));\n rankingData.add(arrayList.get(2));\n rankingData.add(arrayList.get(persRank-2));\n rankingData.add(arrayList.get(persRank-1));\n if(persRank != arrayList.size()){\n rankingData.add(arrayList.get(persRank));\n }\n\n }else{\n for(int i=0;i<6;i++){\n rankingData.add(arrayList.get(0));\n }\n }\n }", "public static void topAwards(MongoDatabase db){\n\t\tAggregateIterable<Document> query3=db.getCollection(\"bios\")\n\t\t\t\t.aggregate(Arrays.asList(\n\t\t\t\t\t\tnew Document(\"$unwind\",\"$awards\"),\n\t\t\t\t\t\tnew Document(\"$group\", new Document(\"_id\", new Document(\"name\",\"$name.first\").append(\"lastname\", \"$name.last\")).append(\"premios\", new Document(\"$sum\",1))),\n\t\t\t\t\t\tnew Document(\"$sort\", new Document(\"premios\",-1)),\n\t\t\t\t\t\tnew Document(\"$project\", new Document(\"_id\",\"$_id\").append(\"Total_Premios\", \"$premios\"))\n\t\t\t\t\t\t));\n\t\t\n\t\tSystem.out.println(\"Ranking de premios recibidos\");\n\t\tfor(Document d3: query3){\n\t\t\tSystem.out.println(d3);\n\t\t}\n\t}", "public void sortHighScores(){\n for(int i=0; i<MAX_SCORES;i++){\n long score = highScores[i];\n String name= names[i];\n int j;\n for(j = i-1; j>= 0 && highScores[j] < score; j--){\n highScores[j+1] = highScores[j];\n names[j+1] = names[j];\n }\n highScores[j+1] = score;\n names[j+1] = name;\n }\n }", "long getRank();", "public List<T> mostliked();", "public int getRank();", "public int getRank();", "public ArrayList<Double> getFiveHighestScore() {\n int size = scoreList.size();\n ArrayList<Double> fiveHighestList = new ArrayList<>();\n if (size <= 5) {\n for (Double score: scoreList) {\n fiveHighestList.add(score);\n }\n } else {\n for (int i = 0; i < 5; i++)\n fiveHighestList.add(scoreList.get(i));\n }\n return fiveHighestList;\n }", "public void rankMatches();", "public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }", "public void winner() {\n\t\tList<String> authors = new ArrayList<String>(scores_authors.keySet());\n\t\tCollections.sort(authors, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_authors.get(o1).compareTo(scores_authors.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des auteurs :\");\n\t\tfor(String a :authors) {\n\t\t\tSystem.out.println(a.substring(0,5)+\" : \"+scores_authors.get(a));\n\t\t}\n\t\t\n\t\tList<String> politicians = new ArrayList<String>(scores_politicians.keySet());\n\t\tCollections.sort(politicians, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\treturn scores_politicians.get(o1).compareTo(scores_politicians.get(o2));\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Score des politiciens :\");\n\t\tfor(String p :politicians) {\n\t\t\tSystem.out.println(p.substring(0,5)+\" : \"+scores_politicians.get(p));\n\t\t}\n\t}", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "public static String randomRank() {\r\n\t\tString[] rank = {\"assistant\",\"associate\",\"full\"};\r\n\t\treturn rank[(int)(Math.random() * 3)];\r\n\t}", "long getToRank();", "public void summariseScore(Athletes[] competitors, Game gam) {\n\t\tint min = Integer.MAX_VALUE;\n\t\tAthletes winner1 = null;\n\t\tAthletes winner2 = null;\n\t\tAthletes winner3 = null;\n\t\t/* choosing the first winner and giving him his points */\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\twinner1 = competitors[i];\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner1(winner1);\n\t\twinner1.setPoints(5);\n\n\t\t/* choosing the second winner and giving him his points */\n\t\tmin = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tif (competitors[i] != winner1) {\n\t\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\t\twinner2 = competitors[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner2(winner2);\n\t\twinner2.setPoints(3);\n\n\t\t/* choosing the last winner and giving him his points */\n\t\tmin = Integer.MAX_VALUE;\n\t\tfor (int i = 0; i < competitors.length; i++) {\n\t\t\tif (competitors[i] != null) {\n\t\t\t\tif (competitors[i].getTime() < min) {\n\t\t\t\t\tif (competitors[i] != winner1 && competitors[i] != winner2) {\n\t\t\t\t\t\tmin = competitors[i].getTime();\n\t\t\t\t\t\twinner3 = competitors[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgam.setWinner3(winner3);\n\t\twinner3.setPoints(1);\t\n\t\t\n\t\tsortCompetitors(competitors);\n\t}", "Score getScores(int index);", "public int getIdeaRanked(int rank) {\n\t\tif (rank < 1 || rank > NUM_RANKED)\n\t\t\tthrow new IllegalArgumentException(\"Invalid idea rank: \" + rank);\n\t\treturn topIdeas[rank - 1];\n\t}", "@Override\r\n\tpublic float getRank() {\r\n\t\tfloat rank = 0;\r\n\t\tif( players != null && !players.isEmpty() ) {\r\n\t\t\tfloat totalAbility = 0;\r\n\t\t\tfor (Player player : players) {\r\n\t\t\t\ttotalAbility += player.getAbility();\r\n\t\t\t}\r\n\t\t\trank = totalAbility / players.size();\r\n\t\t}\r\n\t\t\r\n\t\treturn rank;\r\n\t}", "public String getHighscores(){\r\n\t\tString returnString = \"\";\r\n\t\tList<Score> allScores = database.getAllScores(\"hard\");\r\n\t\t\r\n\t\t//loop through top 4 entries of table as obtained in the allScores list\r\n\t\tfor(int i = allScores.size()-1, j = 3; i>=0 && j>=0; j--, i--){\r\n\t\t\treturnString += String.valueOf(allScores.get(i).score + \" | \" + allScores.get(i).time + \"\\n\");\r\n\t\t}\r\n\t\treturn returnString;\r\n\t}", "private static ArrayList<MP> rankSimilarMPs(ArrayList<MP> pSelectedMPs)\n\n\t{\n\t\t// HashMap is used to provide an easy way to keep only the highest score for each MP.\n\t\tHashMap<String, Double> ratedMPsMap = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tempRatedMPs;\n\t\tArrayList<RatedMP> sortedMPsArray = new ArrayList<RatedMP>(); // will be used to sort the MPs by their rating.\n\t\tfor (MP mp : pSelectedMPs)\n\t\t{\n\t\t\ttempRatedMPs = getSimilarMPs(mp);\n\t\t\tfor (String key : tempRatedMPs.keySet())\n\t\t\t{\n\t\t\t\t// if this is the first MP we look at, put all the MPs into the hashmap\n\t\t\t\tif (!ratedMPsMap.containsKey(key))\n\t\t\t\t{\n\t\t\t\t\tratedMPsMap.put(key, tempRatedMPs.get(key));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// otherwise, keep only the lowest (best) similarity score for any MP.\n\t\t\t\t\tif (ratedMPsMap.get(key) > tempRatedMPs.get(key))\n\t\t\t\t\t{\n\t\t\t\t\t\tratedMPsMap.put(key, tempRatedMPs.get(key));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (String key : ratedMPsMap.keySet())\n\t\t{\n\t\t\t// Convert the hashmap into an ArrayList.\n\t\t\tsortedMPsArray.add(new RatedMP(Capone.getInstance().getParliament().getMP(key), ratedMPsMap.get(key)));\n\t\t}\n\t\tCollections.sort(sortedMPsArray); // sort the MPs by their ratings.\n\t\t// return the MPs in sorted order - without the MPs in the original parameter list.\n\t\treturn removeOverlap(convertToRatedMPList(sortedMPsArray), pSelectedMPs);\n\t}", "public String toRankedTable() {\r\n TreeSet<Team> teamTree = this.getTeamTreeFromMatchTree();\r\n String medal;\r\n int i = 1;\r\n String[] str = new String[teamTree.size() + 1];\r\n List<Team> unorderedTeams = new LinkedList<>();\r\n int currentRank = 0;\r\n int nextMedal = 0;\r\n \r\n //Add all the teams to the list\r\n unorderedTeams.addAll(teamTree);\r\n \r\n //Sort the list with the ranking comparator\r\n Collections.sort(unorderedTeams, rankingComparator);\r\n \r\n //Add the columns headings\r\n str[0] = String.format(\"%15s%10s%10s%10s%10s%10s%10s%10s%10s%10s%n\",\r\n this.centerAlign(\"Team\", 15),\r\n this.centerAlign(\"Rank\", 10),\r\n this.centerAlign(\"Won\", 10),\r\n this.centerAlign(\"Drawn\", 10),\r\n this.centerAlign(\"Lost\", 10),\r\n this.centerAlign(\"For\", 10),\r\n this.centerAlign(\"Against\", 10),\r\n this.centerAlign(\"Points\", 10),\r\n this.centerAlign(\"Diff\", 10),\r\n this.centerAlign(\"Medal\", 10));\r\n \r\n for (Team t : unorderedTeams) {\r\n //Get medal if any\r\n //If the team has a different ranking from the previous ones\r\n if (t.getRank() != currentRank){\r\n //Get the ranking of the current team\r\n currentRank = t.getRank();\r\n //Get the next medal\r\n nextMedal++;\r\n if (nextMedal == 1){\r\n medal = \"Gold\";\r\n }\r\n else if (nextMedal == 2){\r\n medal = \"Silver\";\r\n }\r\n else if (nextMedal == 3){\r\n medal = \"Bronze\";\r\n }\r\n else {\r\n medal = \"\";\r\n }\r\n }\r\n //Same ranking as previous team\r\n //No need to change the medal or ranking\r\n else {\r\n if (nextMedal == 1){\r\n medal = \"Gold\";\r\n }\r\n else if (nextMedal == 2){\r\n medal = \"Silver\";\r\n }\r\n else if (nextMedal == 3){\r\n medal = \"Bronze\";\r\n }\r\n else {\r\n medal = \"\";\r\n }\r\n }\r\n \r\n //Add the team details to the string\r\n str[i] = String.format(\"%15s%10s%10s%10s%10s%10s%10s%10s%10s%10s%n\",\r\n this.centerAlign(t.getName(), 15),\r\n this.centerAlign(Integer.toString(t.getRank()), 10),\r\n this.centerAlign(Integer.toString(t.getMatchWon()), 10),\r\n this.centerAlign(Integer.toString(t.getMatchDrawn()), 10),\r\n this.centerAlign(Integer.toString(t.getMatchLost()), 10),\r\n this.centerAlign(Integer.toString(t.getGoalsFor()), 10),\r\n this.centerAlign(Integer.toString(t.getGoalsAgainst()), 10),\r\n this.centerAlign(Integer.toString(t.getPoints()), 10),\r\n this.centerAlign(Integer.toString(t.goalDiff()), 10),\r\n this.centerAlign(medal, 10));\r\n \r\n i++;\r\n }\r\n \r\n //Transform the array into a single String\r\n StringBuilder sb = new StringBuilder();\r\n for(String s : str) {\r\n sb.append(s);\r\n }\r\n \r\n return sb.toString();\r\n }", "public List<PlayerRecord> display3() {\n List<PlayerRecord> l = new List<PlayerRecord>();\n int max = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n int c = curr.getWinninggoals();\n if (c > max) {// if is a new maximum value, empty the list\n l.clear();\n l.add(curr);\n max = c;\n } else if (c == max) { // if there are more than one maximum value,\n // add it\n l.add(curr);\n }\n curr = playerlist.next();\n }\n return l;\n }", "void printScore(double sum[]){\n \n if((sum[1] > sum [4]) && (sum[1] > sum[5]) ){\n System.out.println(\"among 1 4 5 => 1\");\n }\n if((sum[4] > sum [1]) && (sum[4] > sum[5]) ){\n System.out.println(\"among 1 4 5 => 4\");\n }\n if((sum[5] > sum [1]) && (sum[5] > sum[4]) ){\n System.out.println(\"among 1 4 5 => 5\");\n }\n if((sum[2] > sum [6]) && (sum[2] > sum[8]) ){\n System.out.println(\"among 2 6 8 => 2\");\n }\n if((sum[6] > sum [2]) && (sum[6] > sum[8]) ){\n System.out.println(\"among 2 6 8 => 6\");\n }\n if((sum[8] > sum [2]) && (sum[8] > sum[6]) ){\n System.out.println(\"among 2 6 8 => 8\");\n }\n if((sum[3] > sum [0]) && (sum[3] > sum[7]) ){\n System.out.println(\"among 3 0 7 => 3\");\n }\n if((sum[0] > sum [3]) && (sum[0] > sum[7]) ){\n System.out.println(\"among 3 0 7 => 0\");\n }\n if((sum[7] > sum [3]) && (sum[7] > sum[0]) ){\n System.out.println(\"among 3 0 7 => 7\");\n }\n }", "public int calcRank() {\n sortCardsInHand();\n\n // check Royal flush\n if (this.areCardsInStraight() && this.cards[0].getValue() == 10 && areCardsInSameSuite()) return 10;\n\n // Straight flush: All five cards in consecutive value order, with the same suit\n if (areCardsInSameSuite() && areCardsInStraight()) return 9;\n\n int pairCheck = CardOperations.numberOfPairs(this.getHashMapOfValues());\n\n // Four of a kind: Four cards of the same value\n if (pairCheck == 4) return 8;\n\n // Full house: Three of a kind and a Pair\n if (pairCheck == 5) return 7;\n\n // Flush: All five cards having the same suit\n if (areCardsInSameSuite()) return 6;\n\n // Straight: All five cards in consecutive value order\n if (areCardsInStraight()) return 5;\n\n // Three of a kind: Three cards of the same value\n if (pairCheck == 3) return 4;\n\n // Two pairs: Two different pairs\n if (pairCheck == 2) return 3;\n\n // A pair: Two cards of same value\n if (pairCheck == 1) return 2;\n\n // High card: Highest value card\n return 1;\n }", "public double getBestScore();", "private static int getFavoriteTeamIndexWithSpace(\n final List<List<Integer>> teams,\n final List<Integer> finalTeamSizes,\n final List<Agent> agents,\n final Agent selfAgent\n ) {\n // find mean value of other agents not yet on a team.\n double untakenOtherAgentsValue = 0.0;\n int untakenOtherAgentCount = 0;\n for (int i = 0; i < agents.size(); i++) {\n // don't count the self agent when evaluating\n // the mean value of other remaining agents.\n if (agents.get(i).equals(selfAgent)) {\n continue;\n }\n if (!EachDraftHelper.isAgentTaken(teams, i)) {\n final UUID currentAgentId = agents.get(i).getUuid();\n untakenOtherAgentsValue += \n selfAgent.getValueByUUID(currentAgentId);\n untakenOtherAgentCount++;\n }\n }\n \n double meanValueOtherRemainingAgents = 0.0;\n if (untakenOtherAgentCount > 0) {\n meanValueOtherRemainingAgents =\n untakenOtherAgentsValue / untakenOtherAgentCount;\n }\n\n double maxTeamValue = -1.0;\n int bestTeamIndex = -1;\n for (int i = 0; i < teams.size(); i++) {\n final List<Integer> currentTeam = teams.get(i);\n final int currentTeamMaxSize = finalTeamSizes.get(i);\n \n // don't consider teams that are already full.\n if (currentTeam.size() == currentTeamMaxSize) {\n continue;\n }\n \n double currentTeamValue = 0.0;\n if (currentTeam.isEmpty()) {\n // team is empty.\n // you'd pick your favorite agent to join if there is room, \n // so add its value if the team has space.\n // then add \"final team size - 2\" * \n // mean value of remaining agents\n // excluding the favorite.\n if (currentTeamMaxSize > 1) {\n // there is room to pick favorite agent to join\n final List<UUID> idsHighToLowValue = \n selfAgent.getAgentIdsHighValueToLow();\n UUID favoriteUUID = null;\n for (final UUID id: idsHighToLowValue) {\n if (!EachDraftHelper.isAgentTaken(teams, agents, id)) {\n favoriteUUID = id;\n break;\n }\n }\n if (favoriteUUID != null) {\n // some other agent is left besides self\n final double favoriteRemainingValue = \n selfAgent.getValueByUUID(favoriteUUID);\n currentTeamValue += favoriteRemainingValue;\n assert untakenOtherAgentCount > 0;\n double meanValueRemainingWithoutFavorite = 0.0;\n if (untakenOtherAgentCount > 1) {\n meanValueRemainingWithoutFavorite = \n (untakenOtherAgentsValue \n - favoriteRemainingValue) \n / (untakenOtherAgentCount - 1.0);\n }\n final int extraSpaces = currentTeamMaxSize - 2;\n currentTeamValue += \n meanValueRemainingWithoutFavorite * extraSpaces;\n } \n }\n } else {\n // team already has an agent.\n // sum values of current agents,\n // then add (spaces - 1) * mean value of remaining agents.\n for (final Integer playerIndex: currentTeam) {\n final UUID playerUUID = agents.get(playerIndex).getUuid();\n final double playerValue = \n selfAgent.getValueByUUID(playerUUID);\n currentTeamValue += playerValue;\n }\n \n if (currentTeam.size() + 1 < currentTeamMaxSize) {\n // team has room for another \n // agent besides self agent. \n final int extraSpaces = \n currentTeamMaxSize - (1 + currentTeam.size());\n currentTeamValue += \n extraSpaces * meanValueOtherRemainingAgents;\n }\n }\n\n \n if (currentTeamValue > maxTeamValue) {\n maxTeamValue = currentTeamValue;\n bestTeamIndex = i;\n }\n \n // only allowed to join the first empty team, not some other\n // empty team which may have more spaces.\n if (currentTeam.isEmpty()) {\n break;\n }\n }\n \n assert bestTeamIndex != -1;\n return bestTeamIndex;\n }", "public void awardMedals(){\n ArrayList<Competeable> podium = new ArrayList<>();\n Competeable winningAthletes = event.get(0);\n while( podium.size() < 3){\n for (Competeable competitor : event) {\n if(competitor.getSkillLevel() > winningAthletes.getSkillLevel())\n winningAthletes = competitor;\n }\n podium.add(winningAthletes);\n event.remove(winningAthletes);\n }\n podium.get(0).addMedal(MedalType.GOLD);\n podium.get(1).addMedal(MedalType.SILVER);\n podium.get(2).addMedal(MedalType.BRONZE);\n }", "public ArrayList<Map.Entry<String, Double>> recommendations(int number){\r\n\t\tArrayList<Map.Entry<String, Double>> res = new ArrayList<Map.Entry<String, Double>>();\r\n\t\t//Create a heap for storing the movies and sorting them by the predict rates.\r\n\t\tPriorityQueue<Map.Entry<String, Double>> heap = new PriorityQueue<Map.Entry<String, Double>>(read.rateMap.get(userID).size(), new Comparator<Map.Entry<String, Double>>() {\r\n\t\t\tpublic int compare(Map.Entry<String, Double> a, Map.Entry<String, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t\tfor(int i = 0; i < read.rateMap.get(userID).size(); i++){\r\n\t\t\theap.add(read.rateMap.get(userID).get(i));\r\n\t\t}\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tfor(int j = 0; j < read.rateMap.get(i).size(); j++){\r\n\t\t\t\tif(!ratedID.contains(read.rateMap.get(i).get(j).getKey())){\r\n\t\t\t\t\tdouble predict = this.prediction(read.rateMap.get(i).get(j).getKey());\r\n\t\t\t\t\tMap.Entry<String, Double> newest = new AbstractMap.SimpleEntry(read.rateMap.get(i).get(j).getKey(), predict);\r\n\t\t\t\t\t//Optimization starts here....\r\n\t\t\t\t\tif(fuckUser){\r\n\t\t\t\t\t\tres.add(newest);\r\n\t\t\t\t\t\tif(res.size() == number){\r\n\t\t\t\t\t\t\treturn res;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(predict > read.maxScore - 1){\r\n\t\t\t\t\t\t\theap.add(newest);\r\n\t\t\t\t\t\t\tif(heap.size() >= (number + read.rateMap.get(userID).size())){\r\n\t\t\t\t\t\t\t\tfor(int k = 0; k < number; k++){\r\n\t\t\t\t\t\t\t\t\tres.add(heap.poll());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn res;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "@Override\n public int compareTo(Straight t) \n {\n int index = 0;\n while (index < this.getNumCards())\n {\n if (this.get(index).getRank() == 1 && t.get(index).getRank() == 1)\n {\n index++;\n }\n else if (this.get(index).getRank() == 1 && t.get(index).getRank() != 1)\n {\n return 1;\n }\n else if (this.get(index).getRank() != 1 && t.get(index).getRank() == 1)\n {\n return -1;\n }\n else\n {\n //neither hand has an ace at index\n break;\n }\n }\n \n //then continue on handling high cards\n index = this.getNumCards() - 1;\n while (this.get(index).getRank() == t.get(index).getRank())\n {\n index--;\n if (index < 0) return 0;\n }\n \n if (this.get(index).getRank() < t.get(index).getRank())\n {\n return - 1;\n }\n else\n {\n return 1;\n }\n }", "public static double orderStatistic(int[] a, int rank) {\n\t\tif (a == null || a.length <= rank)\n\t\t\tthrow new IndexOutOfBoundsException();\n\n\t\tint from = 0, to = a.length - 1;\n\n\t\t// if from == to we reached the kth element\n\t\twhile (from < to) {\n\t\t\tint r = from, w = to;\n\t\t\tint mid = a[(r + w) / 2];\n\n\t\t\t// stop if the reader and writer meets\n\t\t\twhile (r < w) {\n\n\t\t\t\tif (a[r] >= mid) { // put the large values at the end\n\t\t\t\t\tint tmp = a[w];\n\t\t\t\t\ta[w] = a[r];\n\t\t\t\t\ta[r] = tmp;\n\t\t\t\t\tw--;\n\t\t\t\t} else { // the value is smaller than the pivot, skip\n\t\t\t\t\tr++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if we stepped up (r++) we need to step one down\n\t\t\tif (a[r] > mid)\n\t\t\t\tr--;\n\n\t\t\t// the r pointer is on the end of the first k elements\n\t\t\tif (rank <= r) {\n\t\t\t\tto = r;\n\t\t\t} else {\n\t\t\t\tfrom = r + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn a[rank];\n\t}", "protected void printBest(int n) {\n for (int i = 0; i < n; i++) {\n System.out.printf(\"%.5f\", individuals[i].score);\n if (i < n - 1)\n System.out.print(\", \");\n // forwardPropagate(i, input).printMatrix();\n // System.out.println();\n }\n }", "public ArrayList<String> getOffendersRanking() {\n if (damages.isEmpty())\n return new ArrayList<>();\n\n ArrayList<String> tempNames = new ArrayList<>();\n int[] ricorrenze = new int[12];\n //TODO Do this with an HashMap like in KillShotTrack.getRanking()\n for (int i = 0; i < 12; i++)\n ricorrenze[i] = 0;\n\n Iterator i = damages.iterator();\n\n while (i.hasNext()) {\n String t = (String) i.next();\n if (tempNames.contains(t)) {\n ricorrenze[tempNames.indexOf(t)]++;\n } else {\n tempNames.add(t);\n ricorrenze[tempNames.indexOf(t)]++;\n }\n }\n\n return tempNames;\n /*return players who gave damages to this.player in order(in 0 highest damage)*/\n }", "public static Vector<Double> getPerfectRanking(Vector<Double> rels){\n Vector<Double> ideal = new Vector<Double>();\n for(int i=0;i<rels.size();i++){\n ideal.add(rels.get(i));\n }\n Comparator<Double> comp = Collections.reverseOrder(); \t\t\n Collections.sort(ideal,comp);\n return ideal;\n }", "public static List<Player> getRankedPlayers(List<Player> players) {\n Comparator<Player> playerComparator = new Comparator<Player>() {\n @Override\n public int compare(Player o1, Player o2) {\n return o2.getCurrentScore() - o1.getCurrentScore();\n }\n };\n players.sort(playerComparator);\n return players;\n }", "public static List<Double> sortScores(List<Double> results) {\n\t\t\n\t\t\n\t\tfor (int i = 0; i < results.size()-1; i++) {\n\t\t\tif (results.get(i)>results.get(i+1)) {\n\t\t\t\t//highScore = results.get(i);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tDouble temp = results.get(i);\n\t\t\t\t\n\t\t\t\tresults.set(i, results.get(i+1));\n\t\t\t\t\n\t\t\tresults.set(i+1, temp);\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t\t\n\t\treturn results;\n\t\t//return null;\n\t}", "public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}", "@Test\n\tpublic void testRankingSortedByName() throws BattleshipException {\n\t\t\n\t\t//Play Julia\n\t\tinitScores(playerJulia);\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\t//Play Raul\n\t\tinitScores(playerRaul);\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\t//Play Laura\n\t\tinitScores(playerLaura);\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\t//Play Simon\n\t\tinitScores(playerSimon);\n\t\tcraftRanking.addScore(craftScore);\n\t\thitRanking.addScore(hitScore);\n\t\tcompareRankings(SRANKING5, rankingsToString());\n\t}", "Response<Integer> getRank(String leaderboardId, int score, int scope);", "public static List<Player> getRankedPlayersInTeam(List<Player> players, Player.PlayerTeam team) {\n List<Player> choosenTeam = players.stream()\n .filter(player -> player.getTeam() == team)\n .collect(Collectors.toList());\n\n\n Comparator<Player> playerComparator = new Comparator<Player>() {\n @Override\n public int compare(Player o1, Player o2) {\n return o2.getCurrentScore() - o1.getCurrentScore();\n }\n };\n choosenTeam.sort(playerComparator);\n return choosenTeam;\n\n }", "public void give_score(int n){\n final_score=0.25*(n-m.get_m()+1)+0.2*(n-h.get_h()+1)+0.25*(n-l.get_l()+1)+0.3*(n-a.get_a()+1);\r\n }", "public void cutoffForTopNVals(String attrName, int numItemsWanted, boolean bottomN) {\n NST attrDataNST = getAttrDataNST(attrName);\n String columnToSort = \"value\";\n // See what the value is at exactly the cutoff we want\n NST scoreNST = attrDataNST.sort(columnToSort, \"*\");\n int totalRows = scoreNST.getRowCount();\n int rowWanted;\n if (bottomN) { // bottom scores\n rowWanted = Math.min(numItemsWanted - 1, totalRows - 1);\n } else { // top scores\n rowWanted = Math.max(0, totalRows - numItemsWanted);\n }\n String range = rowWanted + \"-\" + rowWanted;\n ResultSet rs = scoreNST.selectRows(\"*\", columnToSort, range);\n\n String cutoffLoose;\n boolean hasRows = rs.next();\n\n if (hasRows) {\n cutoffLoose = rs.getString(1);\n } else {\n log.warn(\"Got 0 rows in Attributes.cutoffForTopNVals()\");\n scoreNST.release();\n return;\n }\n\n // How many items will this cutoff and the next smaller give us?\n NST tooManyNST, tooFewNST;\n if (bottomN) {\n tooManyNST = scoreNST.filter(columnToSort + \" LE '\" + cutoffLoose + \"'\");\n tooFewNST = scoreNST.filter(columnToSort + \" LT '\" + cutoffLoose + \"'\");\n } else {\n tooManyNST = scoreNST.filter(columnToSort + \" GE '\" + cutoffLoose + \"'\");\n tooFewNST = scoreNST.filter(columnToSort + \" GT '\" + cutoffLoose + \"'\");\n }\n log.debug(\"Cutoff of \" + cutoffLoose + \" gives \" + tooManyNST.getRowCount() + \" items\");\n\n if (numItemsWanted > totalRows) {\n log.debug(\"This is all the items we have\");\n scoreNST.release();\n tooManyNST.release();\n tooFewNST.release();\n return;\n }\n\n // What is the next smaller?\n if (bottomN) {\n int lastRow = Math.max(tooFewNST.getRowCount() - 1, 0);\n rs = scoreNST.selectRows(columnToSort + \" LT '\" + cutoffLoose + \"'\",\n \"sortedScore, \" + columnToSort, lastRow + \"-\" + lastRow);\n } else {\n rs = scoreNST.selectRows(columnToSort + \" GT '\" + cutoffLoose + \"'\",\n \"sortedScore, \" + columnToSort, \"0-0\");\n }\n hasRows = rs.next();\n String cutoffTight;\n if (hasRows) {\n cutoffTight = rs.getString(2);\n log.debug(\"Next cutoff of \" + cutoffTight + \" gives only \" + tooFewNST.getRowCount() + \" items\");\n } else {\n log.debug(\"There is no tighter cutoff than this\");\n }\n scoreNST.release();\n tooManyNST.release();\n tooFewNST.release();\n }", "private void sortPlayerScores(){\n text=\"<html>\";\n for (int i = 1; i <= Options.getNumberOfPlayers(); i++){\n if(Collections.max(playerScores.entrySet(), (entry1, entry2) -> entry1.getValue() - entry2.getValue()).getKey() != null){\n Integer pl = Collections.max(playerScores.entrySet(), (entry1, entry2) -> entry1.getValue() - entry2.getValue()).getKey();\n if(pl != null && playerScores.containsKey(pl)){\n text += \"<p>Player \" + pl + \" Scored : \" + playerScores.get(pl) + \" points </p></br>\";\n playerScores.remove(pl);\n }\n }\n }\n text += \"</html>\";\n }", "public static double[][] calculate_rank(double accuracyTst[][]){\r\n MatchedData array_acc = new MatchedData(accuracyTst);\r\n //test = new FriedmanTest(array_acc, 0.015,true);\r\n FriedmanTest test = new FriedmanTest(array_acc);\r\n MatchedData ranks = test.getRanks();\r\n \r\n return ranks.getData(); \r\n }", "@Override\n\tpublic List<WalkerRanking> listRanking() {\n\t\tList<Walker> all = walkerRepo.findAllPublic();\n\t\tList<WalkerRanking> allRank = new ArrayList<>();\n\t\t\n\t\tfor(Walker walker : all) {\n\t\t\tallRank.add(getRankingById(walker.getId()));\n\t\t}\n\t\t\n\t\treturn allRank;\n\t}", "public int getRank ()\n {\n return this.ranks; \n }", "private void sortByRank(Card[] hand) {\n\t\tfor (int i = 0; i < hand.length; i++) {\n\t\t\tfor (int j = i + 1; j < hand.length; j++) {\n\t\t\t\tif (hand[i].getRank().getValue() > hand[j].getRank().getValue()) {\n\t\t\t\t\tCard temp = hand[i];\n\t\t\t\t\thand[i] = hand[j];\n\t\t\t\t\thand[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "int getPopularity();", "public int getHighScore(int i) {\n return topScores.get(i);\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\t// Prompt user to enter the number of students\n\t\tSystem.out.print(\"Enter the number of students: \");\n\t\tint numberOfStudents = input.nextInt();\n\n\t\tdouble score, \t\t\t\t// Holds student's score\t\t\n\t\t\thighest = 0, \t\t\t// Highest score \n\t\t\tsecondHighest = 0;\t\t// Second highest score\n\t\tString name = \"\", \t\t\t// Holds student's name\n\t\t\tstudent1 = \"\", \t\t\t// Highest scoring student name\n\t\t\tstudent2 = \"\";\t\t\t// Second highest scoring student name\n\t\t\n\t\t// Prompt user to enter name and score of each student\n\t\tfor (int i = 0; i < numberOfStudents; i++) {\n\t\t\tSystem.out.print(\n\t\t\t\t\"Enter a student name: \");\n\t\t\tname = input.next();\n\t\t\tSystem.out.print(\"Enter a student score: \");\n\t\t\tscore = input.nextInt();\n\n\t\t\tif (i == 0) {\n\t\t\t\t// Make the first student the highest scoring student so far\n\t\t\t\thighest = score;\n\t\t\t\tstudent1 = name;\n\t\t\t}\n\t\t\telse if (i == 1 && score > highest) {\n\t\t\t\t/* Second student entered scored \n\t\t\t\t * higher than first student */\n\t\t\t\tsecondHighest = highest;\n\t\t\t\thighest = score;\n\t\t\t\tstudent2 = student1;\n\t\t\t\tstudent1 = name;\n\t\t\t}\n\t\t\telse if (i == 1) {\n\t\t\t\t/* Second student entered scored\n\t\t\t\t * lower than first student */\n\t\t\t\tsecondHighest = score;\n\t\t\t\tstudent2 = name;\n\t\t\t}\t\t\n\t\t\telse if (i > 1 && score > highest && score > secondHighest) {\n\t\t\t\t// Last student entered has the highest score \n\t\t\t\tsecondHighest = highest;\n\t\t\t\tstudent2 = student1;\n\t\t\t\thighest = score;\n\t\t\t\tstudent1 = name;\n\t\t\t}\n\t\t\telse if (i > 1 && score > secondHighest) {\n\t\t\t\t// Last student entered has the second highest score \n\t\t\t\tstudent2 = name;\n\t\t\t\tsecondHighest = score;\n\t\t\t}\n\t\t}\n\n\t\t/* Display the student with the highest score \n\t\t * and the student with the second highest score. */\n\t\tSystem.out.println(\n\t\t\t\"Top two students: \\n\" +\n\t\t\tstudent1 + \"'s score is \" + highest + \"\\n\" + \n\t\t\tstudent2 + \"'s score is \" + secondHighest);\n\t\n\t\tinput.close();\n\t}", "private int[] sauvegarde_scores() {\r\n\t\tint n = moteur_joueur.getJoueurs().length;\r\n\t\tint[] scores_precedents = new int[n];\r\n\t\t\t\t\r\n\t\tfor(int i = 0 ; i < n ; i++) {\r\n\t\t\tscores_precedents[i] = (int)moteur_joueur.getJoueurs()[i].getScore();\r\n\t\t}\r\n\t\t\r\n\t\treturn scores_precedents;\r\n\t}", "static List<String> topToys (int numToys, int topToys, List<String> toys, int numQuotes, List<String> quotes) {\n Map<String, List<Integer>> map = new HashMap<>();\n //Step 2: Put all the toys in hashmap with count 0\n for (String toy : toys) {\n map.put(toy, new ArrayList<>(Arrays.asList(0,0)));\n }\n //Collections.addAll(toys);\n //Step 3: split the quotes\n for (String quote :quotes) {\n //Step 3: Create a hashSet for all the toys\n Set<String> hashSet = new HashSet<>();//Fresh for each quote to count how many different quotes does the toy appear\n String[] splitQuote = quote.toLowerCase().split(\"\\\\W+\");//all non-word characters besides[a-z,0-9]\n for (String sq : splitQuote) {\n if (!map.containsKey(sq)) {//this is none of the toy\n //map.get(sq).set(0,1);\n continue;\n }\n else {\n map.get(sq).set(0,map.get(sq).get(0)+1);//increment the first element of list: this is total count of toys appearance\n if (!hashSet.contains(sq)) {\n map.get(sq).set(1,map.get(sq).get(1)+1);//increment the second element of the list: and then added to hash Set.\n //hashSet and index 1 will decide how many quotes the toys did appear\n }\n System.out.println(\"adding this to hashSet-->\"+sq);\n hashSet.add(sq);\n }\n }\n }\n map.forEach((key, value) -> System.out.println(\"Key=\" + key + \" and Value=\" + value));\n PriorityQueue<String> pq = new PriorityQueue<>((t1,t2) ->{\n if (!map.get(t1).get(0).equals(map.get(t2).get(0))) return map.get(t1).get(0)-map.get(t2).get(0);\n if (!map.get(t1).get(1).equals(map.get(t2).get(1))) return map.get(t1).get(1) - map.get(t2).get(1);\n return t1.compareTo(t2);\n });\n if (topToys > numToys) {\n for (String toy : map.keySet()) {\n if (map.get(toy).get(0)>0) pq.add(toy);\n }\n }\n else {\n for (String toy: toys) {\n pq.add(toy);\n if (pq.size() > topToys) pq.poll();\n }\n }\n List<String> output = new ArrayList<>();\n while (!pq.isEmpty()) {\n output.add(pq.poll());\n }\n Collections.reverse(output);\n return output;\n }", "public List<Integer> majorityElementBoyerMoore(int[] nums) {\n int n=nums.length;\n List<Integer> result = new ArrayList<Integer>();\n int num1=-1,num2=-1;\n int count1=0,count2=0;\n for(int i=0;i<n;i++){\n if(num1==nums[i]){\n count1++;\n }\n else if(num2==nums[i]){\n count2++;\n }\n else if(count1==0){\n num1=nums[i];\n count1=1;\n } \n else if(count2==0){\n num2=nums[i];\n count2=1;\n }\n else{\n count1--;\n count2--;\n }\n }\n count1=0;\n count2=0;\n for(int i=0;i<n;i++){\n if(nums[i]==num1){\n count1++;\n }\n else if(nums[i]==num2){\n count2++;\n }\n }\n System.out.println(num1+\" \"+num2);\n if(count1>n/3)result.add(num1);\n if(count2>n/3)result.add(num2);\n return result;\n }", "public PlayerProfile[] getLeaderboardOrdered() {\r\n PlayerProfile[] temp = new PlayerProfile[players.length];\r\n for(int i = 0; i < players.length; i++) {\r\n temp[i] = players[i].getPlayerProfile();\r\n }\r\n int n = temp.length;\r\n //bubble sort...\r\n for (int i = 0; i < n-1; i++)\r\n for (int j = 0; j < n-i-1; j++)\r\n if (temp[j].getWins() > temp[j+1].getWins())\r\n {\r\n // swap arr[j+1] and arr[j]\r\n PlayerProfile temp2 = temp[j];\r\n temp[j] = temp[j+1];\r\n temp[j+1] = temp2;\r\n }\r\n return temp;\r\n }", "public ArrayList<CollegeFootballTeam> rankTeams()\r\n\t{\r\n\t\tArrayList<CollegeFootballTeam> rankedTeams = new ArrayList<>();\r\n\t\t\r\n\t\t// Calls the selection sort method, which ranks the teams from lower to higher scores based on the sum of their votes.\r\n\t\t// The teams are placed into a new ArrayList. \r\n\t\trankedTeams = selectionSort(teams);\r\n\t\t\r\n\t\treturn rankedTeams;\r\n\t}", "public int getScore(int index) {\n return ranking.get(index).getvalue();\n }", "public void printAndDeleteHighestItem(){\n RankedItem highestItem = new RankedItem();\n\n //find the highest ranked item\n for (RankedItem rankedItem: rankedResults){\n if(rankedItem.getWin() >= highestItem.getWin()){\n highestItem = rankedItem;\n }\n }\n //print the highest ranked item if the item doesn't have all 0 values\n if(highestItem.getWin() != 0 || highestItem.getLoss() != 0 || highestItem.getTie() != 0) {\n resultList.append(highestItem.getItemText() + \"\\t\" +\n highestItem.getWin() + \"\\t\" +\n highestItem.getLoss() + \"\\t\" +\n highestItem.getTie() + \"\\n\");\n }\n //remove the highest ranked item from the list\n rankedResults.remove(highestItem);\n }", "private static double getHighestScore (List<Double> inputScores) {\n\n\t\tCollections.sort(inputScores, Collections.reverseOrder());\n\n\t\treturn inputScores.get(0);\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tList<Integer> a = new ArrayList<>();\n\t\ta.add(1);\n\t\ta.add(1);\n\t\ta.add(2);\n\t\ta.add(2);\n\t\ta.add(4);\n\t\ta.add(3);\n\t\tList<Integer> b = new ArrayList<>();\n\t\tb.add(2);\n\t\tb.add(3);\n\t\tb.add(3);\n\t\tb.add(4);\n\t\tb.add(4);\n\t\tb.add(5);\n\t\tgetMinScore(6, a, b);\n\t}", "public static void main(String[] args) {\n\t\tint n = 4;\r\n\t\tint arr[] = {2, 6, 3, 8, 5, 1, 99, 4};\r\n\t\tnthHighestNumber(arr, n);\r\n\t}", "public Card getHighestCard() {\n Card rtrnCard = cardsPlayed[0];\n int i;\n int tempInt;\n int currentHighestRank = cardsPlayed[0].getIntValue();\n for(i = 0; i < cardsPlayed.length; i++){\n if(cardsPlayed[i].getSuit().equals(suit)){\n tempInt = cardsPlayed[i].getIntValue();\n if((currentHighestRank < tempInt)&&(!(cardsPlayed[i].equals(rtrnCard)))){\n rtrnCard = cardsPlayed[i];\n currentHighestRank = cardsPlayed[i].getIntValue();\n }\n }\n }\n return rtrnCard;\n }", "static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }", "private static void findLeader(Integer[] array) {\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < array.length; i++) {\n // Map key -> value from input array\n Integer key = array[i];\n // Map value -> occurrences number\n Integer count = map.get(key);\n if (count == null) {\n // if null put new occurrence with count 1\n map.put(key, 1);\n } else {\n // if not null increment occurrences and replace in map (put works the same in this situation)\n // https://stackoverflow.com/a/35297640\n count++;\n map.replace(key, count);\n }\n }\n Integer leader = 0;\n Integer maxCount = 0;\n // Iterator enables you to cycle through a collection, obtaining or removing elements\n // https://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html\n // Take map iterator\n Iterator it = map.entrySet().iterator();\n // Loop till iterator has next element\n while (it.hasNext()) {\n // Take map next entry -> map entry consists of key and value\n Map.Entry pair = (Map.Entry) it.next();\n // Check if map value (occurrences number) is greater than current maximum\n if ((Integer) pair.getValue() > maxCount) {\n // if true swap current maxCount and leader\n maxCount = (Integer) pair.getValue();\n leader = (Integer) pair.getKey();\n }\n }\n // Check if occur more than 50%\n if(maxCount < array.length / 2 + 1){\n leader = -1;\n }\n System.out.println(leader);\n }", "private void organiseWinnerWords(String word1, String word2, String word3) {\n ArrayList<String> firstWords = new ArrayList<>(Arrays.asList(word1.split(\"\\\\s*,\\\\s*\")));\n ArrayList<String> secondWords = new ArrayList<>(Arrays.asList(word2.split(\"\\\\s*,\\\\s*\")));\n ArrayList<String> thirdWords = new ArrayList<>(Arrays.asList(word3.split(\"\\\\s*,\\\\s*\")));\n int minWinners = 1;\n for (int i = 0; i < firstWords.size() || i < secondWords.size() || i < thirdWords.size() || i < minWinners; ++i) {\n String first = (firstWords.size() <= i) ? \"\" : firstWords.get(i);\n String second = (secondWords.size() <= i) ? \"\" : secondWords.get(i);\n String third = (thirdWords.size() <= i) ? \"\" : thirdWords.get(i);\n words.add(new ArrayList<String>(Arrays.asList(\n first,\n second,\n third)));\n }\n }", "public static Student[] sortScore( Student s[]){\n\t\tStudent temp ;\r\n\t\tfor(int i=0; i<s.length; i++){\r\n\t\t\tfor(int j=i+1; j<s.length;j++)\r\n\t\t\t\tif(s[i].score > s[j].score){\r\n\t\t\t\t\ttemp = s[i];\r\n\t\t\t\t\ts[i] = s[j];\r\n\t\t\t\t\ts[j]= temp;\r\n\t\t\t\t} \t\t\t\r\n\t\t\t}\r\n\t\t\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Students with score<50 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score<50){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Students with score>=50 and <65 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score>=50 && s[i].score<65){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Students with score>=65 and <80 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score>=65 && s[i].score<80){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Students with score>=80 and <100 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score>=80 && s[i].score<=100){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn s;\r\n\r\n\r\n\t}", "public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}", "private static void findStrongestMMAFighter(int[] arr, int k)\n\t{\n\n\t\tDeque<Integer> dq = new LinkedList<Integer>();\n\t\t// Dequeue first element will be the largest one always\n\t\tint i = 0;\n\t\t// We have to process first k elements separately\n\t\tfor (; i < k; i++)\n\t\t{\n\t\t\twhile (!dq.isEmpty() && arr[i] >= arr[dq.peekLast()])\n\t\t\t{\n\t\t\t\tdq.removeLast();\n\t\t\t}\n\t\t\tdq.addLast(i);\n\n\t\t}\n\t\tfor (; i < arr.length; i++)\n\t\t{\n\n\t\t\t// First element will always be larger\n\t\t\tSystem.out.print(arr[dq.peekFirst()] + \" \");\n\n\t\t\t// remove elements which are not in current window\n\t\t\twhile (!dq.isEmpty() && dq.peekFirst() <= i - k)\n\t\t\t{\n\t\t\t\tdq.removeFirst();\n\t\t\t}\n\t\t\t// Remove unwanted elements\n\t\t\twhile (!dq.isEmpty() && arr[i] > arr[dq.peekLast()])\n\t\t\t{\n\t\t\t\tdq.removeLast();\n\t\t\t}\n\t\t\tdq.addLast(i);\n\t\t}\n\t\tif (!dq.isEmpty())\n\t\t\tSystem.out.print(arr[dq.peek()] + \" \");\n\n\t}", "List<Ranking> calculateIncomeRanks(List<Instruction> instructions);", "public Direction playerToHelpGivenRank(Direction ourCorner, int rank) {\r\n PriorityQueue<DirectionScoreBind> scores = new PriorityQueue<DirectionScoreBind>();\r\n for (Direction player : Direction.values()) {\r\n if(player.equals(ourCorner)) // don't look at ourselves\r\n continue;\r\n\r\n scores.add(new DirectionScoreBind(player, getAverage(playerScores.get(player)), getSum(playerScores.get(player))));\r\n }\r\n\r\n for(int i = 1; i < rank; i++) {\r\n scores.poll();\r\n }\r\n\r\n return scores.peek().getDirection();\r\n }", "public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}", "public void ranking(ArrayList<Player> list) {\r\n\t\tCollections.sort(list, new Comparator<Player>(){\r\n\t\t\tpublic int compare(Player a1, Player a2) {\r\n\t\t\t\tint a = a2.getPercent()-a1.getPercent(); \r\n\t\t\t\treturn a==0?a1.getUserName().compareTo(a2.getUserName()):a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile(aa.hasNext()){\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tin.showRanking();\r\n\t\t}\r\n\t}", "public static int singleGameTopScoringPlayer(int[][] scores, int g)\n {\n \n int index = 0;\n int row = 0;\n int max = scores[row][g]; //by default we assign the max value as the first value\n int nextrow = row + 1;\n \n while ( nextrow < scores.length) //total up the rows for that column\n {\n //compare if the max value is smaller than its successive value\n if (max < scores[nextrow][g])\n {\n max = scores[nextrow][g]; //if it is larger, then it becomes the new max value\n index = nextrow; //save the index in the variable called index\n }\n \n nextrow++;\n }\n \n return index;\n \n }", "public void findH()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n if(scores[i][j] > high)\n high = scores[i][j];\n }\n }\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n if(scores[i][j] == high)\n System.out.println(names[i] + \" had the highest score of \" + high);\n break;\n \n }\n \n }\n }", "protected RankList rank(int rankListIndex, int current) {\n/* 472 */ RankList orig = this.samples.get(rankListIndex);\n/* 473 */ double[] scores = new double[orig.size()];\n/* 474 */ for (int i = 0; i < scores.length; i++)\n/* 475 */ scores[i] = this.modelScores[current + i]; \n/* 476 */ int[] idx = MergeSorter.sort(scores, false);\n/* 477 */ return new RankList(orig, idx);\n/* */ }", "private void calcWinner(){\n //local class for finding ties\n class ScoreSorter implements Comparator<Player> {\n public int compare(Player p1, Player p2) {\n return p2.calcFinalScore() - p1.calcFinalScore();\n }\n }\n\n List<Player> winners = new ArrayList<Player>();\n int winningScore;\n\n // convert queue of players into List<Player> for determining winner(s)\n while (players.size() > 0) {\n winners.add(players.remove());\n } \n\n // scoreSorter's compare() should sort in descending order by calcFinalScore()\n // Arrays.sort(winnersPre, new scoreSorter()); // only works w/ normal arrays :(\n Collections.sort(winners, new ScoreSorter());\n\n // remove any players that don't have the winning score\n winningScore = winners.get(0).calcFinalScore();\n for (int i = winners.size()-1; i > 0; i--) { // remove non-ties starting from end, excluding 0\n if (winners.get(i).calcFinalScore() < winningScore) {\n winners.remove(i);\n }\n }\n\n // Announce winners\n boolean hideCalculatingWinnerPopUp = false;\n String winnersString = \"\";\n if (winners.size() > 1) {\n winnersString = \"There's a tie with \" + winners.get(0).calcFinalScore() + \" points. The following players tied: \";\n for (Player p : winners) {\n winnersString += p.getName() + \" \";\n }\n view.showPopUp(hideCalculatingWinnerPopUp, winnersString);\n } else {\n view.showPopUp(hideCalculatingWinnerPopUp, winners.get(0).getName() + \" wins with a score of \" + winners.get(0).calcFinalScore() + \" points! Clicking `ok` will end and close the game.\");\n }\n }", "private static int findWinner(ArrayList<ArrayList<Card>> hands,\n ArrayList<Card> tableCardsFinal) {\n FiveCardHand bestHand = null;\n int bestHandIndex = -1;\n for (int i = 0; i < hands.size(); i++) {\n ArrayList<Card> hand = hands.get(i);\n ArrayList<Card> handOfSeven = (ArrayList<Card>) hand.clone();\n handOfSeven.addAll(tableCardsFinal);\n FiveCardHand best = findBestHand(handOfSeven);\n\n if (bestHand == null) {\n bestHand = best;\n bestHandIndex = i;\n } else if (best.compareTo(bestHand) > 0) {\n bestHand = best;\n bestHandIndex = i;\n } else if (best.compareTo(bestHand) == 0) { // handle ties by returning hands.size()\n bestHandIndex = hands.size();\n }\n }\n\n return bestHandIndex;\n }" ]
[ "0.60127056", "0.59960747", "0.58228606", "0.58220965", "0.5809294", "0.57620317", "0.57136923", "0.5710021", "0.56925136", "0.5691664", "0.5665958", "0.5550308", "0.5518425", "0.5483636", "0.5448221", "0.54207635", "0.5408112", "0.5391431", "0.53897107", "0.5361097", "0.5323302", "0.52943313", "0.5284242", "0.5278947", "0.52678937", "0.52340597", "0.5218082", "0.5205228", "0.52014357", "0.5199057", "0.5197655", "0.51826656", "0.51826656", "0.5172624", "0.51627475", "0.5158359", "0.51448023", "0.5142747", "0.51315814", "0.51239896", "0.512338", "0.51219064", "0.5116668", "0.51073503", "0.5097309", "0.50949776", "0.50857675", "0.50807214", "0.50747603", "0.5073003", "0.5052782", "0.5052729", "0.50501806", "0.5022214", "0.50173545", "0.5014875", "0.5007309", "0.5006226", "0.50046605", "0.50023425", "0.4999545", "0.49971056", "0.49870497", "0.49826363", "0.4977763", "0.49709108", "0.49665788", "0.4960963", "0.49535695", "0.49535587", "0.49484637", "0.49462003", "0.4944057", "0.49439558", "0.49323276", "0.4931003", "0.4925071", "0.49199465", "0.4915048", "0.49074468", "0.4905105", "0.4899329", "0.4898434", "0.4897945", "0.48930967", "0.48927075", "0.4892055", "0.48853716", "0.48842543", "0.48828217", "0.4876909", "0.48739693", "0.4872806", "0.48707235", "0.48645484", "0.48588794", "0.485519", "0.4837572", "0.4828151", "0.4826857", "0.4822579" ]
0.0
-1